]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
* config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2
3 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4
5 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6
7 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8 format_string_diagnostic_t.
9 (fmtwarn_n): Likewise.
10 * substring-locations.c
11 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
12 (format_warning_n_va): Convert to...
13 (format_string_diagnostic_t::emit_warning_n_va): ...this.
14 (format_warning_va): Convert to...
15 (format_string_diagnostic_t::emit_warning_va): ...this.
16 (format_warning_at_substring): Convert to...
17 (format_string_diagnostic_t::emit_warning): ...this.
18 (format_warning_at_substring_n): Convert to...
19 (format_string_diagnostic_t::emit_warning_n): ...this.
20 * substring-locations.h (class format_string_diagnostic_t): New
21 class.
22 (format_warning_va): Convert to
23 format_string_diagnostic_t::emit_warning_va.
24 (format_warning_n_va): Convert to
25 format_string_diagnostic_t::emit_warning_n_va.
26 (format_warning_at_substring): Convert to
27 format_string_diagnostic_t::emit_warning.
28 (format_warning_at_substring_n): Convert to
29 format_string_diagnostic_t::emit_warning_n.
30
31 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
32 Bernd Schmidt <bernds_cb1@t-online.de>
33
34 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
35 SImode args.
36
37 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
38
39 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
40 operand 0 predicate to nonimmediate operand.
41 (rint<mode>2_frndint): Remove insn pattern.
42 (rint<mode>2): Change operand 1 predicate to general_operand.
43 Extend operand 1 to XFmode and generate rintxf2 insn.
44 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
45 Do not use X87MODEF mode macro.
46 (frndintxf2_<rounding>_i387): Rename from
47 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
48 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
49 to XFmode and generate significandxf3 insn.
50
51 2018-09-17 Richard Biener <rguenther@suse.de>
52
53 PR tree-optimization/87328
54 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
55 visiting unexecutable backedges when not iterating.
56 (do_rpo_vn): Mark all edges not executable even when not
57 iterating.
58
59 2018-09-17 Martin Jambor <mjambor@suse.cz>
60
61 PR c/63886
62 * doc/invoke.texi (Warning Options): Likewise.
63
64 2018-09-17 Richard Biener <rguenther@suse.de>
65
66 PR tree-optimization/87301
67 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
68 clean EH info from leftover copy assignments.
69
70 2018-09-17 Martin Liska <mliska@suse.cz>
71
72 PR gcov-profile/85871
73 * gcov.c (output_intermediate_file): Fix out of bounds
74 access.
75
76 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
77
78 * config/arc/arc.c: Object attributes for core4 not reflected
79 correctly.
80 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
81 core3).
82
83 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
84
85 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
86
87 2018-09-17 Martin Liska <mliska@suse.cz>
88
89 * doc/gcov.texi: Document new option --use-hotness-colors.
90 * gcov.c (struct source_info): Declare new field.
91 (source_info::source_info): Set default for maximum_count.
92 (print_usage): Add new -q option.
93 (process_args): Process it.
94 (accumulate_line_info): Save src->maximum_count.
95 (output_line_beginning): Make color line number if
96 flag_use_hotness_colors is set.
97 (output_line_details): Pass default argument value.
98 (output_lines): Pass src->maximum_count.
99
100 2018-09-17 Martin Liska <mliska@suse.cz>
101
102 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
103 Use processor_names table.
104 * config/i386/i386.c (ix86_default_align): Use
105 processor_cost_table for alignment values.
106 (ix86_option_override_internal): Use processor_names.
107 (ix86_function_specific_print): Likewise.
108 * config/i386/i386.h (struct processor_costs):
109 Add alignment values.
110 (struct ptt): Remove and replace with const char *.
111 * config/i386/x86-tune-costs.h (struct processor_costs):
112 Declare default alignments for all costs.
113
114 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
115
116 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
117 symbolics or VR_VARYING ranges for ABS_EXPR.
118 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
119 when range will wrap.
120
121 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
122
123 PR middle-end/86864
124 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
125 before and after a JUMP_TABLE_DATA.
126
127 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
128
129 PR middle-end/87188
130 * dojump.c (do_compare_and_jump): Canonicalize function pointers
131 when one operand is a function pointer. Use POINTER_TYPE_P and
132 FUNC_OR_METHOD_TYPE_P.
133 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
134 * fold-const.c (build_range_check): Likewise.
135 * match.pd (simple_comparison): Likewise.
136
137 2018-09-14 David Malcolm <dmalcolm@redhat.com>
138
139 PR c/82967
140 * spellcheck.c (get_edit_distance_cutoff): New function.
141 (selftest::test_edit_distance_unit_test_oneway): Rename to...
142 (selftest::test_get_edit_distance_one_way): ...this.
143 (selftest::test_get_edit_distance_unit): Rename to...
144 (selftest::test_get_edit_distance_both_ways): ...this.
145 (selftest::test_edit_distances): Move tests to this new function,
146 and test some more pairs of strings. Update for above renaming.
147 (selftest::get_old_cutoff): New function.
148 (selftest::test_get_edit_distance_cutoff): New function.
149 (selftest::assert_suggested_for): New function.
150 (ASSERT_SUGGESTED_FOR): New macro.
151 (selftest::assert_not_suggested_for): New function.
152 (ASSERT_NOT_SUGGESTED_FOR): New macro.
153 (selftest::test_suggestions): New function.
154 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
155 tests to selftest::test_edit_distances and call it. Add calls to
156 selftest::test_get_edit_distance_cutoff and
157 selftest::test_suggestions.
158 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
159 (best_match::consider): Replace hard-coded cutoff calculation with
160 a call to...
161 (best_match::get_cutoff): New declaration.
162 (best_match::get_best_meaningful_candidate): Likewise.
163
164 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
165
166 * builtins.c (fold_builtin_strlen): Remove TODO comment.
167
168 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
169
170 revert:
171 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
172
173 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
174 terminated string literal.
175
176 2018-09-14 Martin Sebor <msebor@redhat.com>
177
178 * builtins.c (unterminated_array): Handle ARRAY_REF.
179 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
180 * builtins.h (unterminated_array): Declare extern.
181 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
182 arrays.
183 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
184 calls.
185
186 2018-09-14 Martin Sebor <msebor@redhat.com>
187 Jeff Law <law@redhat.com>
188
189 * builtins.c (unterminated_array): New.
190 (expand_builtin_strcpy): Adjust.
191 (expand_builtin_strcpy_args): Detect unterminated arrays.
192 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
193 unterminated arrays.
194 * gimple-fold.h (get_maxval_strlen): Add argument.
195 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
196
197 * gimple-fold.c (get_range_strlen): Add argument.
198 (get_maxval_strlen): Adjust.
199 * gimple-fold.h (get_range_strlen): Add argument.
200
201 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
202
203 * config/i386/movdirintrin.h: Fix copyright year.
204
205 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
206
207 * reg-stack.c: Include regs.h.
208 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
209 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
210 FIRST_STACK_REG, not DFmode.
211 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
212 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
213 (change stack): Default register mode to the reg_raw_mode of
214 FIRST_STACK_REG, not DFmode.
215 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
216 (*swapxf): Rename from swapxf.
217
218 2018-09-14 Carl Love <cel@us.ibm.com>
219
220 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
221 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
222
223 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
224
225 PR target/87224
226 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
227 alternatives.
228
229 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
230
231 PR target/85628
232 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
233
234 2018-09-14 Jason Merrill <jason@redhat.com>
235
236 Fix --enable-gather-detailed-mem-stats.
237 * hash-table.c (hash_table_usage): Change from variable to function.
238 * hash-table.h: Adjust.
239 * Makefile.in: Add missing dependencies on hash-table.h.
240
241 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
242
243 PR tree-optimization/87259
244 PR lto/87283
245 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
246 execute_cse_reciprocals_1 has tried transforming.
247
248 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
249
250 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
251 VR_VARYING for PLUS/MINUS_EXPR.
252
253 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
254
255 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
256 formatting.
257
258 2018-09-14 Richard Biener <rguenther@suse.de>
259
260 PR middle-end/63155
261 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
262 bits for the merged partition.
263
264 2018-09-13 Martin Sebor <msebor@redhat.com>
265 Bernd Edlinger <bernd.edlinger@hotmail.de>
266
267 * builtins.h (c_srlen): Add argument.
268 * builtins.c (warn_string_no_nul): New function.
269 (c_strlen): Add argument and use it. Update recursive calls.
270 Pass DECL argument to string_constant to get info on non
271 terminated strings. Update *NONSTR as needed.
272 (fold_builtin_strlen): Add argument to calls to c_strlen.
273 Warn for unterminated arrays.
274 (warn_string_no_null): Add prototype.
275 * expr.c (string_constant): Update arguments. Update recursive
276 calls appropriately. Detect missing NUL terminator and outermost
277 declaration its missing in.
278 Improve checks for arrays with nonzero lower bound or elements
279 that are not a single byte. Simplify offset computation.
280 Simplify checks for non-NUL terminated strings.
281 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
282 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
283
284 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
285
286 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
287 correctly.
288 * fold-const.c (c_getstr): Fix function comment. Remove unused third
289 argument. Fix range checks.
290 * fold-const.h (c_getstr): Adjust protoype.
291 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
292 string is constant but contains no NUL byte.
293
294 * expr.c (string_constant): Adjust function comment.
295 Remove bogus check for zero termination.
296
297 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
298
299 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
300 (get_constant_size): Don't make STRING_CSTs larger than they are.
301 (check_string_literal): New check function for STRING_CSTs.
302 (output_constant): Use it.
303
304 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
305
306 PR target/86812
307 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
308
309 2018-09-13 Richard Biener <rguenther@suse.de>
310
311 PR tree-optimization/87263
312 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
313 (struct unwind_state): Add max_rpo field.
314 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
315 Compute max_rpo, the max RPO number a block can be backwards reached
316 from. Re-write non-iterating mode to a RPO ordered worklist approach,
317 separating it from the iterating mode.
318
319 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
320
321 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
322 (rfs_decision): New scheduling decision.
323
324 2018-09-13 Richard Biener <rguenther@suse.de>
325
326 PR bootstrap/87134
327 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
328 (vn_nary_op_insert_pieces_predicated): Do not write useless
329 valid_dominated_by_p entry outside of the allocated storage.
330
331 2018-09-13 Omar Sandoval <osandov@osandov.com>
332 Tom de Vries <tdevries@suse.de>
333
334 PR debug/86985
335 * dwarf2out.c (is_c): New function.
336 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
337
338 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
339
340 PR target/85628
341 * config/aarch64/aarch64.md (*aarch64_bfxil):
342 Define.
343 * config/aarch64/constraints.md (Ulc): Define.
344 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
345 Define.
346 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
347 New function.
348
349 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
350
351 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
352 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
353 aarch64_layout_frame call.
354 (aarch64_expand_epilogue): Likewise.
355 (aarch64_initial_elimination_offset): Likewise.
356 (aarch64_get_separate_components): Likewise.
357 (aarch64_use_return_insn_p): Likewise.
358 (aarch64_layout_frame): Remove unneeded check.
359
360 2018-09-13 Jakub Jelinek <jakub@redhat.com>
361
362 * configure.ac: Only append
363 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
364 gcc_config_arguments if it was never reconfigured or last reconfigure
365 was with different arguments.
366 * configure: Regenerated.
367
368 2018-09-13 Jakub Jelinek <jakub@redhat.com>
369 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
370
371 PR middle-end/87290
372 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
373 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
374
375 2018-09-13 Jakub Jelinek <jakub@redhat.com>
376
377 PR tree-optimization/87287
378 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
379 X % C == 0 to X % (unsigned) C == 0 optimization to ...
380 * match.pd (X % C == 0): ... here. New optimization.
381
382 2018-09-12 Jakub Jelinek <jakub@redhat.com>
383
384 PR middle-end/82853
385 * expr.h (maybe_optimize_mod_cmp): Declare.
386 * expr.c (mod_inv): New function.
387 (maybe_optimize_mod_cmp): New function.
388 (do_store_flag): Use it.
389 * cfgexpand.c (expand_gimple_cond): Likewise.
390
391 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
392 Julian Brown <julian@codesourcery.com>
393
394 PR middle-end/86336
395 * gimplify.c (gimplify_scan_omp_clauses): Set
396 target_firstprivatize_array_bases in OpenACC parallel and kernels
397 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
398 OpenACC data regions.
399
400 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
401
402 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
403 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
404
405 2018-09-12 Richard Biener <rguenther@suse.de>
406
407 PR tree-optimization/87280
408 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
409 edge but unreachable target.
410 (do_rpo_vn): For conservatively handling a PHI only mark
411 the backedge executable but not the block reachable.
412
413 2018-09-12 Richard Biener <rguenther@suse.de>
414
415 PR tree-optimization/87266
416 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
417 visited blocks.
418
419 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
420
421 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
422 constants.
423 ("trunc<BFP:mode><DFP_ALL:mode>2")
424 ("trunc<DFP_ALL:mode><BFP:mode>2")
425 ("extend<BFP:mode><DFP_ALL:mode>2")
426 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
427 according to the target operand type.
428
429 2018-09-12 Jakub Jelinek <jakub@redhat.com>
430 Andreas Krebbel <krebbel@linux.ibm.com>
431
432 PR tree-optimization/86844
433 * gimple-ssa-store-merging.c
434 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
435 there are any overlapping stores in between them, make sure they are
436 also coalesced or we give up completely.
437
438 2018-09-12 Jakub Jelinek <jakub@redhat.com>
439
440 PR middle-end/87248
441 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
442 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
443
444 2018-09-12 Tom de Vries <tdevries@suse.de>
445
446 * common.opt (gdescribe-dies): Add option.
447 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
448 attribute for artifical and nameless decls.
449 (dwarf2out_register_external_die): Add description attribute to
450 external reference die.
451 (add_desc_attribute): New functions.
452 (gen_subprogram_die): Add description attribute to
453 DW_TAG_call_site_parameter.
454 * tree-pretty-print.c (print_generic_expr_to_str): New function.
455 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
456 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
457 -gno-describe-dies.
458 (@item -gdescribe-dies): Add.
459
460 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
461
462 * tree-vrp.c (vrp_shift_undefined_p): Remove.
463 (extract_range_from_binary_expr_1: Call
464 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
465 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
466 depend on sign.
467
468 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
469
470 * gimple-ssa-warn-alloca.c
471 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
472 field for ALLOCA_BOUND_*_LARGE.
473
474 2018-09-11 Nathan Sidwell <nathan@acm.org>
475
476 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
477
478 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
479
480 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
481 for clobbers. Remove obsolete comment.
482
483 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
484
485 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
486 mpxchk, mpxld and mpxst types.
487 (define_attr length_immediate): Remove all processing of mpx types.
488 (define_attr prefix_0f): Ditto.
489 (define_attr memory): Ditto.
490
491 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
492
493 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
494 (log<mode>2): Change operand 1 predicate to general_operand.
495 Extend operand 1 to XFmode and generate logxf3 insn.
496 (log10<mode>2): Change operand 1 predicate to general_operand.
497 Extend operand 1 to XFmode and generate log10xf3 insn.
498 (log2<mode>2): Change operand 1 predicate to general_operand.
499 Extend operand 1 to XFmode and generate log2xf3 insn.
500 (fyl2xp1_extend<mode>xf3_i387): Remove.
501 (log1p<mode>2): Change operand 1 predicate to general_operand.
502 Extend operand 1 to XFmode and generate log1pxf3 insn.
503 (fxtract_extend<mode>xf3_i387): Remove.
504 (logb<mode>2): Change operand 1 predicate to general_operand.
505 Extend operand 1 to XFmode and generate logbxf3 insn.
506 (ilogb<mode>2): Change operand 1 predicate to general_operand.
507 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
508 (significand<mode>2): Change operand 1 predicate to general_operand.
509 Extend operand 1 to XFmode and generate significandxf3 insn.
510
511 2018-09-11 Nathan Sidwell <nathan@acm.org>
512
513 * gcc.c (perror_with_name, pfatal_with_name): Delete.
514 (load_specs): Use fatal_error.
515 (DELETE_IF_ORDINARY, process_command): Use error.
516 (execute, run_attempt): Use fatal_error.
517
518 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
519
520 * diagnostic-core.h (sorry_at): New prototype.
521 * diagnostic.c (sorry_at): New function.
522
523 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
524
525 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
526 by zero as VR_UNDEFINED.
527
528 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
529
530 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
531 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
532 (<sincos>mode2): New expander.
533 (sincos_extend<mode>xf3_i387): Remove insn pattern.
534 (sincos -> sin, cos splitters): Remove splitter patterns.
535 (sincos<mode>3): Change operand 2 predicate to general_operand.
536 Extend operand 2 to XFmode and generate sincosxf3 insn.
537 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
538 Change operand 3 predicate to const1_operand.
539 (fptan_extend<mode>xf4_i387): Remove insn pattern.
540 (tanxf2): Update operands in the call to fptanxf4_i387.
541 (tan<mode>2): Change operand 1 predicate to general_operand.
542 Extend operand 1 to XFmode and generate tanxf3 insn.
543 (atan2xf3): Rename from *fpatanxf3_i387.
544 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
545 (atan2xf3): Remove expander.
546 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
547 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
548 (atan<mode>2): Change operand 1 predicate to general_operand.
549 Extend operand 1 to XFmode and generate atanxf3 insn.
550
551 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
552
553 * config/i386/i386.md (x87/SSE constant load splitter): Use
554 memory_operand instead of nonimmediate_operand for input operand
555 predicate.
556
557 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
558
559 * config/i386/i386.md (float partial SSE register stall splitter): Move
560 splitter near its instruction pattern.
561 (float_extend partial SSE register stall splitter): Ditto.
562 (float_truncate partial SSE register stall splitter): Ditto.
563
564 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
565
566 PR target/86794
567 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
568 to speculation_safe_value_not_needed.
569
570 PR target/85666
571 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
572 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
573 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
574 leaf_function_p, instead use has_hard_reg_initial_val.
575
576 2018-09-09 Nathan Sidwell <nathan@acm.org>
577
578 * gcc.h (pfatal_with_name): Don't declare here.
579 * gcc.c (pfatal_with_name): Make static.
580
581 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
582
583 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
584 earlyclobber.
585
586 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
587
588 PR rtl-optimization/85458
589 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
590 priority hook to reduce the priority of EXPR.
591
592 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
593
594 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
595 DImode for x87 on 32bit targets. Conditionally disable x87 modes
596 with X87_ENABLE_FLOAT. Remove preparation code.
597 (*float<SWI48:mode><MODEF:mode>2): Rename from
598 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
599 math using "enabled" attribute.
600 (*floatdi<MODEF:mode>2_i387): Rename from
601 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
602 enable for 32bit targets only.
603 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
604 splitter.
605 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
606 as operand 1 predicate. Rewrite as define_insn_and_split.
607 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
608
609 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
610
611 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
612 to fallthru to FLOAT case.
613
614 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
615
616 PR target/86731
617 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
618 around folding of vec_sl to handle out of range shift values.
619
620 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
621
622 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
623 Update callers to gen_fix_trunc<mode>_i387_fisttp
624 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
625 nonimmediate_operand.
626 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
627 and corresponding splitters.
628 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
629 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
630 (fix_truncdi_i387_with_temp): Remove insn pattern
631 and corresponding splitters.
632 (fix_trunc<mode>_i387): Change operand 0 predicate to
633 nonimmediate_operand.
634 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
635 and corresponding splitters.
636 (*fistdi2_1): Remove.
637 (fistdi2): Ditto.
638 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
639 (lrintxfdi2): Remove expander. Reimplement as define_insn.
640 (*fist<mode>2_1): Remove.
641 (fist<mode>2): Ditto.
642 (fist<mode>2_with_temp): Remove insn pattern and corresponding
643 splitters.
644 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
645 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
646 (fistdi2_<rounding>): Change operand 0 predicate to
647 nonimmediate_operand.
648 (fistdi2_<rounding>_with_temp): Remove insn pattern
649 and corresponding splitters.
650 (fist<mode>2_<rounding>): Change operand 0 predicate to
651 nonimmediate_operand.
652 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
653 and corresponding splitters.
654
655 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
656
657 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
658
659 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
660 the init value.
661
662 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
663
664 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
665 early gimple folding of vec_splat().
666 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
667 * gimple-fold.h: Add an extern define for tree_vec_extract().
668
669 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
670
671 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
672 wrappers around TREE_TYPE comparisons.
673
674 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
675
676 PR target/80080
677 * config/s390/predicates.md: Add nonsym_memory_operand.
678 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
679 contains a SYMBOL_REF, load it into an intermediate pseudo.
680 (s390_emit_compare_and_swap): Legitimize operand.
681 * config/s390/s390.md: Use the new nonsym_memory_operand
682 with UNSPECV_CAS patterns.
683
684 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
685
686 PR target/80080
687 * config/s390/s390-passes.def: New file.
688 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
689 declaration.
690 (make_pass_s390_early_mach): Add declaration.
691 * config/s390/s390.c (make_pass_s390_early_mach):
692 (s390_option_override): Remove dynamic registration.
693 * config/s390/t-s390: Add s390-passes.def.
694
695 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
696
697 * config/s390/s390.c (s390_decompose_constant_pool_ref):
698 Remove UNSPEC_LTREL_BASE check.
699 (annotate_constant_pool_refs): Likewise.
700 (find_constant_pool_ref): Likewise.
701 (find_ltrel_base): Removed.
702 (replace_ltrel_base): Removed.
703 (s390_mainpool_finish): Remove replace_ltrel_base call.
704 (s390_chunkify_start): Remove pending LTREL_BASE logic.
705 (s390_chunkify_finish): Remove replace_ltrel_base call.
706 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
707
708 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
709
710 PR target/86779
711 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
712 to speculation_safe_value_not_needed.
713
714 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
715 Bernd Schmidt <bernds_cb1@t-online.de>
716
717 * config/nvptx/nvptx-opts.h: New file.
718 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
719 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
720 (ASM_SPEC): Define.
721 (TARGET_SM35): New macro.
722 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
723 correct predicate.
724 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
725 values.
726 (misa=): New option.
727 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
728
729 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
730
731 * config/i386/i386.md (truncdfsf2): Remove expander.
732 (truncdfsf2_with_temp): Ditto.
733 (truncxf<mode>2): Ditto.
734 (*truncdfsf_fast_mixed): Remove insn pattern.
735 (*truncdfsf_fast_i387): Ditto.
736 (*truncdfsf_mixed): Ditto.
737 (*truncdfsf_i387): Ditto.
738 (*truncdfsf2_i387_1): Ditto.
739 (*truncxfsf2_mixed): Ditto.
740 (*truncxfdf2_mixed): Ditto.
741 (*truncxf<mode>2_i387_noop): Ditto. Update callers
742 to call gen_truncxf<mode>2 instead.
743 (*truncxf<mode>2_i387): Remove.
744 (reg->reg splitters): Remove splitter pattern.
745 (reg->mem splitters): Ditto.
746
747 (truncdfsf2): New insn pattern.
748 (truncxf<mode>2): Ditto.
749
750 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
751
752 * tree-ssa-math-opts.c (is_mult_by): New function.
753 (is_square_of): Use the above.
754 (optimize_recip_sqrt): New function.
755 (pass_cse_reciprocals::execute): Use the above.
756
757 2018-09-05 Richard Biener <rguenther@suse.de>
758
759 PR bootstrap/87134
760 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
761 to zero-init the emplaced vec.
762
763 2018-09-05 Martin Liska <mliska@suse.cz>
764
765 PR tree-optimization/87205
766 * tree-switch-conversion.c (pass_lower_switch::execute):
767 Group cases for switch statements.
768
769 2018-09-05 Richard Biener <rguenther@suse.de>
770
771 PR tree-optimization/87217
772 * tree-ssa-sccvn.c (vuse_valueize): New.
773 (vn_reference_lookup_pieces): Use it.
774 (vn_reference_lookup): Likewise.
775
776 2018-09-05 Nathan Sidwell <nathan@acm.org>
777
778 PR c++/87137
779 * stor-layout.c (place_field): Scan forwards to check last
780 bitfield when ms_bitfield_placement is in effect.
781
782 2018-09-05 Richard Biener <rguenther@suse.de>
783
784 PR bootstrap/87225
785 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
786 return.
787
788 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
789 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
790
791 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
792 * config.gcc (extra_objs): Build it.
793 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
794 Likewise.
795 * config/aarch64/aarch64-passes.def
796 (pass_tag_collision_avoidance): New pass.
797 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
798 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
799 (aarch64_classify_address): Remove static qualifier.
800 (aarch64_address_info, aarch64_address_type): Move to...
801 * config/aarch64/aarch64-protos.h: ... here.
802 (make_pass_tag_collision_avoidance): New function.
803 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
804 New tuning flag.
805
806 2018-09-05 Martin Liska <mliska@suse.cz>
807
808 * doc/gcov.texi: Update documentation of humar
809 readable mode.
810 * gcov.c (format_count): Print one decimal place, it provides
811 more fine number of situations like '1G' vs. '1.4G'.
812
813 2018-09-05 Martin Liska <mliska@suse.cz>
814
815 PR target/87164
816 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
817 * optc-gen.awk: Allow 'Var' for Deprecated options in order
818 to generate a MASK value.
819
820 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
821
822 PR debug/86593
823 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
824 if frame pointer isn't used.
825 (compute_frame_pointer_to_fb_displacement): Likewise.
826
827 2018-09-04 Jakub Jelinek <jakub@redhat.com>
828
829 PR target/87198
830 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
831 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
832 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
833 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
834 and OPTION_MASK_ISA_XSAVEC_UNSET.
835
836 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
837
838 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
839 XOR operations in NAND case.
840
841 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
842
843 * wide-int-range.cc (wide_int_range_convert): New.
844 * wide-int-range.h (wide_int_range_convert): New.
845 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
846 code into wide_int_range_convert.
847 (extract_range_into_wide_ints): Do not munge anti range constants
848 into the entire domain. Just return the range back.
849
850 2018-09-04 Martin Liska <mliska@suse.cz>
851
852 * genmatch.c (output_line_directive): Add new argument
853 fnargs.
854 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
855
856 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
857
858 * doc/invoke.texi (Option Summary): Add whitespace.
859
860 * doc/invoke.texi (Option Summary): Add -Waligned-new.
861
862 2018-09-04 Richard Biener <rguenther@suse.de>
863
864 PR tree-optimization/87211
865 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
866 backedge value we're supposed to treat as VARYING also number
867 the PHI to VARYING in case it got a different value-number already.
868
869 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
870
871 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
872 (extract_range_from_binary_expr_1): Do not call
873 vrp_can_optimize_bit_op.
874 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
875 static.
876 (wide_int_range_get_mask_and_bounds): New.
877 (wide_int_range_optimize_bit_op): New.
878 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
879 (wide_int_range_bit_and): Same.
880 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
881 (wide_int_range_optimize_bit_op): New.
882 (wide_int_range_get_mask_and_bounds): New.
883
884 2018-09-04 Richard Biener <rguenther@suse.de>
885
886 PR tree-optimization/87176
887 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
888 variable. When value-numbering a virtual PHI node make sure
889 to not value-number to the backedge value.
890
891 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
892
893 * doc/extend.texi (Long Long, Hex Floats): Document support for
894 long long and hex floats in more recent versions of ISO C++.
895
896 2018-09-03 Richard Biener <rguenther@suse.de>
897
898 PR tree-optimization/87177
899 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
900 cleanup.
901
902 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
903
904 * bb-reorder.c (edge_order): Convert to C-qsort-style
905 tri-state comparator.
906 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
907
908 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
909
910 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
911 tri-state comparator.
912 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
913
914 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
915
916 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
917 (mergesort): ... here as maximum count for using netsort.
918 (gcc_qsort): Set nlim to 3 if stable sort is requested.
919 (gcc_stablesort): New.
920 * system.h (gcc_stablesort): Declare.
921
922 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
923
924 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
925 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
926 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
927
928 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
929
930 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
931 lxsdx and stxsdx alternatives.
932 (*mov<mode>_hardfloat64): Ditto.
933 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
934
935 2018-09-03 Richard Biener <rguenther@suse.de>
936
937 PR tree-optimization/87200
938 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
939 simplify result.
940
941 2018-09-03 Martin Liska <mliska@suse.cz>
942
943 PR tree-optimization/87201
944 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
945 Fix parenthesis in an expression.
946
947 2018-09-03 Richard Biener <rguenther@suse.de>
948
949 PR tree-optimization/87197
950 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
951 visited. CSE the VN_INFO hashtable lookup.
952
953 PR tree-optimization/87169
954 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
955 iterating make sure there's no extra backedges from irreducible
956 regions feeding the header. Mark the destination block
957 executable.
958
959 2018-09-03 Martin Liska <mliska@suse.cz>
960
961 PR driver/83193
962 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
963 * common/common-targhooks.c (default_get_valid_option_values):
964 New function.
965 * common/common-targhooks.h (default_get_valid_option_values):
966 Likewise.
967 * common/config/i386/i386-common.c: Move processor_target_table
968 from i386.c.
969 (ix86_get_valid_option_values): New function.
970 (TARGET_GET_VALID_OPTION_VALUES): New macro.
971 * config/i386/i386.c (struct ptt): Move to i386-common.c.
972 (PTA_*): Move all defined masks into i386-common.c.
973 (ix86_function_specific_restore): Use new processor_cost_table.
974 * config/i386/i386.h (struct ptt): Moved from i386.c.
975 (struct pta): Likewise.
976 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
977 * doc/tm.texi.in: Likewise.
978 * opt-suggestions.c (option_proposer::suggest_option):
979 Pass prefix to build_option_suggestions.
980 (option_proposer::get_completions): Likewise.
981 (option_proposer::build_option_suggestions): Use the new target
982 hook.
983 * opts.c (struct option_help_tuple): New struct.
984 (print_filtered_help): Use the new target hook.
985
986 2018-09-03 Martin Liska <mliska@suse.cz>
987
988 PR middle-end/59521
989 * predict.c (set_even_probabilities): Add likely_edges
990 argument and handle cases where we have precisely one
991 likely edge.
992 (combine_predictions_for_bb): Catch also likely_edges.
993 (tree_predict_by_opcode): Handle gswitch statements.
994 * tree-cfg.h (find_case_label_for_value): New declaration.
995 (find_taken_edge_switch_expr): Likewise.
996 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
997 Find pivot in decision tree based on probabily, not by number of
998 nodes.
999
1000 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
1001
1002 * doc/standards.texi (Standards): Update Objective-C reference.
1003
1004 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1005
1006 * doc/install.texi (Prerequisites): Update link for MPC.
1007
1008 2018-09-01 Michael Matz <matz@suse.de>
1009
1010 PR tree-optimization/87074
1011 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
1012 PHIs for outer-loop uses.
1013
1014 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1015
1016 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
1017 * doc/invoke.texi (C Dialect Options): Ditto.
1018
1019 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1020
1021 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
1022
1023 2018-08-31 Richard Biener <rguenther@suse.de>
1024
1025 PR tree-optimization/87168
1026 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
1027 (rpo_elim::eliminate_avail): When OP was not visited it must
1028 be available.
1029
1030 2018-08-31 David Malcolm <dmalcolm@redhat.com>
1031
1032 * tree-vrp.c (copy_value_range): Convert param "from" from
1033 "value_range *" to "const value_range *".
1034 (range_is_null): Likewise for param "vr".
1035 (range_int_cst_p): Likewise.
1036 (range_int_cst_singleton_p): Likewise.
1037 (symbolic_range_p): Likewise.
1038 (value_ranges_intersect_p): Likewise for both params.
1039 (value_range_nonnegative_p): Likewise for param "vr".
1040 (value_range_constant_singleton): Likewise.
1041 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
1042 (extract_range_into_wide_ints): Likewise for param "vr".
1043 (extract_range_from_multiplicative_op): Likewise for params "vr0"
1044 and "vr1".
1045 (vrp_can_optimize_bit_op): Likewise.
1046 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
1047 "vr1_".
1048 (extract_range_from_unary_expr): Likewise.
1049 (debug_value_range): Likewise for param "vr".
1050 (value_range::dump): Add "const" qualifier.
1051 (vrp_prop::check_array_ref): Convert local "vr" from
1052 "value_range *" to "const value_range *".
1053 (vrp_prop::check_mem_ref): Likewise.
1054 (vrp_prop::visit_stmt): Likewise for local "old_vr".
1055 (vrp_intersect_ranges_1): Likewise for param "vr_1".
1056 (vrp_intersect_ranges): Likewise.
1057 (simplify_stmt_for_jump_threading): Likewise for local "vr".
1058 (vrp_prop::vrp_finalize): Likewise.
1059 * tree-vrp.h (value_range::dump): Add "const" qualifier.
1060 (vrp_intersect_ranges): Add "const" qualifier to params as above.
1061 (extract_range_from_unary_expr): Likewise.
1062 (value_range_constant_singleton): Likewise.
1063 (symbolic_range_p): Likewise.
1064 (copy_value_range): Likewise.
1065 (extract_range_from_binary_expr_1): Likewise.
1066 (range_int_cst_p): Likewise.
1067 (vrp_set_zero_nonzero_bits): Likewise.
1068 (range_int_cst_singleton_p): Likewise.
1069
1070 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
1071
1072 * config/aarch64/arm_neon.h (vabsd_s64): New.
1073 (vnegd_s64): Likewise.
1074
1075 2018-08-31 Martin Jambor <mjambor@suse.cz>
1076
1077 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
1078
1079 2018-08-31 Martin Liska <mliska@suse.cz>
1080
1081 * ipa-icf.c (sem_item::add_type): Use
1082 sem_item::m_type_hash_cache.
1083 * ipa-icf.h: Move the cache from sem_item_optimizer
1084 to sem_item.
1085
1086 2018-08-31 Nathan Sidwell <nathan@acm.org>
1087
1088 * doc/extend.texi (Backwards Compatibility): Remove implicit
1089 extern C leeway of () being (...).
1090
1091 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1092
1093 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
1094
1095 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1096
1097 PR target/86684
1098 PR target/87149
1099 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1100
1101 2018-08-31 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR middle-end/87138
1104 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
1105 gen_int_mode. Formatting fixes.
1106
1107 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1108
1109 * target.def (custom_function_descriptors): Improve documentation.
1110 * doc/tm.texi.in (Trampolines): Expand discussion of function
1111 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
1112 beginning of the section.
1113 * doc/tm.texi: Regenerated.
1114
1115 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
1116
1117 * cfg.h (class auto_edge_flag): Spell out the template-id of the
1118 base class in the initializer list. This is a workaround for
1119 building with older GCC.
1120 (class auto_bb_flag): Likewise.
1121
1122 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1123
1124 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
1125 (altivec_vcmpequ<VI_char>_p): Remove star.
1126 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
1127 vector load modes.
1128 (expand_strncmp_vec_sequence): New function.
1129 (emit_final_str_compare_vec): New function.
1130 (expand_strn_compare): Add support for vector strncmp.
1131 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
1132 length specification to bytes.
1133 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
1134 (vcmpnezb_p): New pattern.
1135 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
1136 for option -mstring-compare-inline-limit.
1137
1138 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
1139
1140 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
1141 (PTA_SKYLAKE): Add PTA_AES.
1142 (PTA_GOLDMONT): Likewise.
1143
1144 2018-08-29 Jan Hubicka <jh@suse.cz>
1145
1146 PR lto/86517
1147 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1148 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1149
1150 2018-08-29 Jan Hubicka <jh@suse.cz>
1151
1152 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
1153 TYPE_STUB_DECL.
1154 (hash_tree): Do not visit TYPE_STUB_DECL.
1155 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
1156 stream TYPE_STUB_DECL.
1157 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
1158 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
1159 after free_lang_data.
1160 (type_in_anonymous_namespace_p): Likewise.
1161
1162 2018-08-29 Jan Hubicka <jh@suse.cz>
1163
1164 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1165 comment that it has to be even number.
1166 (class sreal): Change m_sig type to int32_t.
1167 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1168 int64_t for temporary calculations.
1169 (sreal_verify_basics): Drop one bit from minimum and maximum.
1170
1171 2018-08-30 Richard Biener <rguenther@suse.de>
1172
1173 PR tree-optimization/87147
1174 * tree-ssa-sccvn.c (SSA_VISITED): New function.
1175 (visit_phi): When the degenerate result is from the backedge and
1176 we didn't visit its definition yet drop to VARYING.
1177 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
1178
1179 2018-08-29 Jan Hubicka <jh@suse.cz>
1180
1181 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
1182 DECL_VINDEX.
1183 (hash_tree): Likewise.
1184
1185 2018-08-29 Jan Hubicka <jh@suse.cz>
1186
1187 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
1188 and TYPE_NEXT_REF_TO.
1189
1190 2018-08-29 Jan Hubicka <jh@suse.cz>
1191
1192 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
1193 comment that it has to be even number.
1194 (class sreal): Change m_sig type to int32_t.
1195 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
1196 int64_t for temporary calculations.
1197 (sreal_verify_basics): Drop one bit from minimum and maximum.
1198
1199 2018-08-30 Tamar Christina <tamar.christina@arm.com>
1200
1201 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
1202
1203 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1204
1205 PR middle-end/86995
1206 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1207 if to_add is negative.
1208
1209 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1210
1211 PR middle-end/87053
1212 * builtins.c (c_strlen): Improve range checks.
1213
1214 2018-08-29 Martin Sebor <msebor@redhat.com>
1215 Jeff Law <law@redhat.com>
1216
1217 PR tree-optimization/86714
1218 PR tree-optimization/86711
1219 * builtins.c (c_strlen): Add arguments to call to string_constant.
1220 * expr.c (string_constant): Add argument. Detect missing nul
1221 terminator and outermost declaration it's missing in.
1222 * expr.h (string_constant): Add argument.
1223 * fold-const.c (read_from_constant_string): Add arguments to call to
1224 string_constant.
1225 (c_getstr): Likewise.
1226 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1227 to string_constant.
1228 * tree-ssa-strlen.c (get_stridx): Likewise.
1229
1230 2018-08-29 Jan Hubicka <jh@suse.cz>
1231
1232 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1233 Do not stream DECL_VINDEX.
1234 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1235 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1236 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1237
1238 2018-08-29 Richard Biener <rguenther@suse.de>
1239
1240 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1241 virtual operands that are not default defs to honor region
1242 boundaries.
1243 (rpo_vn_valueize): Remove ineffective code here.
1244
1245 2018-08-29 Richard Biener <rguenther@suse.de>
1246
1247 PR tree-optimization/87132
1248 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1249 when skipping defs reachable over backedges.
1250
1251 2018-08-29 Richard Biener <rguenther@suse.de>
1252
1253 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1254 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1255 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1256 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1257 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1258 (vn_reference_lookup_3): Remove use of const_parms.
1259 (free_rpo_vn): Do not free const_parms.
1260 (do_rpo_vn): Do not call init_const_parms.
1261 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1262 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1263 (call_may_clobber_ref_p_1): Likewise.
1264
1265 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1266
1267 PR other/86726
1268 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1269 (-O): Ditto.
1270 (-ftree-scev-cprop): Document.
1271
1272 2018-08-29 Jan Hubicka <jh@suse.cz>
1273
1274 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1275 parameters.
1276 (sreal constructor): Update.
1277 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1278 sreal:operator/): Update.
1279
1280 2018-08-29 Martin Liska <mliska@suse.cz>
1281
1282 * tree-switch-conversion.c (switch_conversion::expand):
1283 Strenghten assumption about gswitch statements.
1284
1285 2018-08-29 Richard Biener <rguenther@suse.de>
1286
1287 PR tree-optimization/87117
1288 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1289 re-value-number released SSA VDEFs.
1290
1291 2018-08-29 Richard Biener <rguenther@suse.de>
1292
1293 PR tree-optimization/87126
1294 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1295
1296 2018-08-28 Jim Wilson <jimw@sifive.com>
1297
1298 * config/riscv/pic.md: Rewrite.
1299 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1300 invalid address.
1301 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1302 (SOFTF, default_load, softload, softstore): New.
1303
1304 2018-08-28 Jeff Law <law@redhat.com>
1305
1306 * fold-const.c (fold_binary_loc): Remove recently added assert.
1307
1308 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1309
1310 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1311 to OP parmeter of generated function.
1312
1313 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1314
1315 PR tree-optimization/87009
1316 * match.pd: Add boolean optimizations.
1317
1318 2018-08-28 Martin Sebor <msebor@redhat.com>
1319
1320 PR middle-end/86631
1321 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1322 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1323 (pass_walloca::gate): Use it.
1324 (alloca_call_type): Same.
1325 (pass_walloca::execute): Same.
1326 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1327
1328 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1329
1330 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1331 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1332 >= 3005 to >= 9000.
1333
1334 2018-08-28 Richard Biener <rguenther@suse.de>
1335
1336 PR tree-optimization/87124
1337 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1338 constants before looking up avail.
1339
1340 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR middle-end/87099
1343 * calls.c (maybe_warn_nonstring_arg): Punt early if
1344 warn_stringop_overflow is zero. Don't call get_range_strlen
1345 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1346 Swap comparison operands to have constants on rhs. Only use
1347 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1348 increment lenrng[0].
1349
1350 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1351
1352 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1353 use of tree_to_shwi. Remove duplicated test for the size being
1354 a whole number of bytes.
1355
1356 2018-08-28 Richard Biener <rguenther@suse.de>
1357
1358 PR tree-optimization/87117
1359 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1360 Handle removed stmt without LHS (GIMPLE_NOP).
1361
1362 2018-08-28 Richard Biener <rguenther@suse.de>
1363
1364 PR tree-optimization/87117
1365 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1366 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1367
1368 2018-08-28 Richard Biener <rguenther@suse.de>
1369
1370 PR tree-optimization/87117
1371 * tree-ssa-pre.c (compute_avail): Do not make expressions
1372 with predicated values available.
1373 (get_expr_value_id): Assert we do not run into predicated value
1374 expressions.
1375
1376 2018-08-28 Richard Biener <rguenther@suse.de>
1377
1378 PR tree-optimization/87117
1379 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1380 get virtual operands.
1381 (get_expr_operands): Handle STRING_CST like other decls.
1382
1383 2018-08-28 Martin Liska <mliska@suse.cz>
1384
1385 * tree.h: Update documentation of fndecl_built_in_p
1386 functions.
1387
1388
1389 2018-08-27 Jeff Law <law@redhat.com>
1390 PR tree-optimization/87110
1391 * tree-ssa-dse.c (compute_trims): Handle non-constant
1392 TYPE_SIZE_UNIT.
1393
1394 2018-08-27 Martin Sebor <msebor@redhat.com>
1395
1396 PR tree-optimization/86914
1397 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1398
1399 2018-08-27 Martin Sebor <msebor@redhat.com>
1400
1401 PR tree-optimization/87112
1402 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1403 the type of the bound argument.
1404
1405 2018-08-27 Jeff Law <law@redhat.com>
1406
1407 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1408 type does not have a TYPE_SIZE_UNIT.
1409
1410 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1411
1412 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1413 with include of backend.h.
1414
1415 2018-08-27 Richard Biener <rguenther@suse.de>
1416
1417 PR tree-optimization/86927
1418 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1419 use const cond reduction code.
1420
1421 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1422
1423 PR tree-optimization/85758
1424 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1425
1426 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1427
1428 PR c++/87091
1429 * diagnostic-show-locus.c (class layout_range): Update for
1430 conversion of show_caret_p to a tri-state.
1431 (layout_range::layout_range): Likewise.
1432 (make_range): Likewise.
1433 (layout::maybe_add_location_range): Likewise.
1434 (layout::should_print_annotation_line_p): Don't show annotation
1435 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1436 (layout::get_state_at_point): Update for conversion of
1437 show_caret_p to a tri-state. Bail out early for
1438 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1439 underlining or source colorization.
1440 (gcc_rich_location::add_location_if_nearby): Update for conversion
1441 of show_caret_p to a tri-state.
1442 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1443 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1444 Likewise.
1445 (selftest::test_one_liner_labels): Likewise.
1446 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1447 conversion of show_caret_p to a tri-state.
1448 * pretty-print.c (text_info::set_location): Likewise.
1449 * pretty-print.h (text_info::set_location): Likewise.
1450 * substring-locations.c (format_warning_n_va): Likewise.
1451 * tree-diagnostic.c (default_tree_printer): Likewise.
1452 * tree-pretty-print.c (newline_and_indent): Likewise.
1453
1454 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1455
1456 PR c++/87091
1457 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1458 line above for line-insertion fix-it hints.
1459 (selftest::test_fixit_insert_containing_newline): Update the
1460 expected results, and add a test with line-numbering enabled.
1461
1462 2018-08-27 Martin Liska <mliska@suse.cz>
1463
1464 PR sanitizer/86962
1465 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1466 params with DECL_HAS_VALUE_EXPR_P.
1467
1468 2018-08-27 Martin Liska <mliska@suse.cz>
1469
1470 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1471 selected expansion strategy.
1472
1473 2018-08-27 Martin Liska <mliska@suse.cz>
1474
1475 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1476 * builtins.c (is_builtin_fn): Likewise.
1477 * attribs.c (diag_attr_exclusions): Use new function
1478 fndecl_built_in_p and remove check for FUNCTION_DECL if
1479 possible.
1480 (builtin_mathfn_code): Likewise.
1481 (fold_builtin_expect): Likewise.
1482 (fold_call_expr): Likewise.
1483 (fold_builtin_call_array): Likewise.
1484 (fold_call_stmt): Likewise.
1485 (set_builtin_user_assembler_name): Likewise.
1486 (is_simple_builtin): Likewise.
1487 * calls.c (gimple_alloca_call_p): Likewise.
1488 (maybe_warn_nonstring_arg): Likewise.
1489 * cfgexpand.c (expand_call_stmt): Likewise.
1490 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1491 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1492 (cgraph_node::verify_node): Likewise.
1493 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1494 (cgraph_node::create_clone): Likewise.
1495 * config/arm/arm.c (arm_insert_attributes): Likewise.
1496 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1497 * dse.c (scan_insn): Likewise.
1498 * expr.c (expand_expr_real_1): Likewise.
1499 * fold-const.c (operand_equal_p): Likewise.
1500 (fold_binary_loc): Likewise.
1501 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1502 * gimple-low.c (lower_stmt): Likewise.
1503 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1504 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1505 * gimple.c (gimple_build_call_from_tree): Likewise.
1506 (gimple_call_builtin_p): Likewise.
1507 (gimple_call_combined_fn): Likewise.
1508 * gimplify.c (gimplify_call_expr): Likewise.
1509 (gimple_boolify): Likewise.
1510 (gimplify_modify_expr): Likewise.
1511 (gimplify_addr_expr): Likewise.
1512 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1513 * ipa-cp.c (determine_versionability): Likewise.
1514 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1515 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1516 * ipa-split.c (visit_bb): Likewise.
1517 (split_function): Likewise.
1518 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1519 * lto-cgraph.c (input_node): Likewise.
1520 * lto-streamer-out.c (write_symbol): Likewise.
1521 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1522 (lower_omp_1): Likewise.
1523 * predict.c (strip_predict_hints): Likewise.
1524 * print-tree.c (print_node): Likewise.
1525 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1526 * trans-mem.c (is_tm_irrevocable): Likewise.
1527 (is_tm_load): Likewise.
1528 (is_tm_simple_load): Likewise.
1529 (is_tm_store): Likewise.
1530 (is_tm_simple_store): Likewise.
1531 (is_tm_abort): Likewise.
1532 (tm_region_init_1): Likewise.
1533 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1534 * tree-cfg.c (verify_gimple_call): Likewise.
1535 (move_stmt_r): Likewise.
1536 (stmt_can_terminate_bb_p): Likewise.
1537 * tree-eh.c (lower_eh_constructs_2): Likewise.
1538 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1539 * tree-inline.c (remap_gimple_stmt): Likewise.
1540 (copy_bb): Likewise.
1541 (estimate_num_insns): Likewise.
1542 (fold_marked_statements): Likewise.
1543 * tree-sra.c (scan_function): Likewise.
1544 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1545 (optimize_stack_restore): Likewise.
1546 (pass_fold_builtins::execute): Likewise.
1547 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1548 (mark_all_reaching_defs_necessary_1): Likewise.
1549 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1550 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1551 (pass_forwprop::execute): Likewise.
1552 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1553 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1554 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1555 * tree-ssa-strlen.c (get_string_length): Likewise.
1556 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1557 (find_func_aliases_for_call): Likewise.
1558 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1559 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1560 * tree-tailcall.c (find_tail_calls): Likewise.
1561 * tree.c (need_assembler_name_p): Likewise.
1562 (free_lang_data_in_decl): Likewise.
1563 (get_call_combined_fn): Likewise.
1564 * ubsan.c (is_ubsan_builtin_p): Likewise.
1565 * varasm.c (incorporeal_function_p): Likewise.
1566 * tree.h (DECL_BUILT_IN): Remove and replace with
1567 fndecl_built_in_p.
1568 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1569 (fndecl_built_in_p): New.
1570
1571 2018-08-27 Martin Liska <mliska@suse.cz>
1572
1573 PR tree-optimization/86847
1574 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1575 Dump also subtree probability.
1576 (switch_decision_tree::do_jump_if_equal): New function.
1577 (switch_decision_tree::emit_case_nodes): Handle special
1578 situations in balanced tree that can be emitted much simpler.
1579 Fix calculation of probabilities that happen in tree expansion.
1580 * tree-switch-conversion.h (struct cluster): Add
1581 is_single_value_p.
1582 (struct simple_cluster): Likewise.
1583 (struct case_tree_node): Add new function has_child.
1584 (do_jump_if_equal): New.
1585
1586 2018-08-27 Martin Liska <mliska@suse.cz>
1587
1588 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1589 Add new argument to bit_test_cluster constructor.
1590 (bit_test_cluster::emit): Set bits really number of values
1591 handlel by a test.
1592 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1593 probability argument.
1594 * tree-switch-conversion.h (struct bit_test_cluster):
1595 Add m_handles_entire_switch.
1596
1597 2018-08-27 Martin Liska <mliska@suse.cz>
1598
1599 PR tree-optimization/86702
1600 * tree-switch-conversion.c (jump_table_cluster::emit):
1601 Make probabilities even for values in jump table
1602 according to number of cases handled.
1603 (switch_decision_tree::compute_cases_per_edge): Pass
1604 argument to reset_out_edges_aux function.
1605 (switch_decision_tree::analyze_switch_statement): Likewise.
1606 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1607 Make it static.
1608
1609 2018-08-27 Martin Liska <mliska@suse.cz>
1610
1611 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1612 cfun argument explicitly.
1613 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1614 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1615 function gimple_switch_default_bb.
1616 (convert_switch_statements):
1617 (expand_builtins):
1618 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1619 * stmt.c (label_to_block_fn): Use label_to_block and pass
1620 cfun argument explicitly and use gimple_switch_label_bb.
1621 (expand_case): Likewise.
1622 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1623 cfun argument explicitly. Likewise.
1624 (make_edges_bb): Likewise.
1625 (make_cond_expr_edges): Likewise.
1626 (get_cases_for_edge): Likewise.
1627 (make_gimple_switch_edges): Likewise.
1628 (label_to_block_fn): Likewise.
1629 (label_to_block): Likewise.
1630 (make_goto_expr_edges): Likewise.
1631 (make_gimple_asm_edges): Likewise.
1632 (main_block_label): Likewise.
1633 (group_case_labels_stmt): Likewise.
1634 (find_taken_edge_computed_goto): Likewise.
1635 (find_taken_edge_switch_expr): Likewise.
1636 (gimple_verify_flow_info): Likewise.
1637 (gimple_redirect_edge_and_branch): Likewise.
1638 (gimple_switch_label_bb): New function.
1639 (gimple_switch_default_bb): Likewise.
1640 (gimple_switch_edge): Likewise.
1641 (gimple_switch_default_edge): Likewise.
1642 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1643 (label_to_block): ... with this.
1644 (gimple_switch_label_bb): New.
1645 (gimple_switch_default_bb): Likewise.
1646 (gimple_switch_edge): Likewise.
1647 (gimple_switch_default_edge): Likewise.
1648 * tree-cfgcleanup.c (convert_single_case_switch): Use
1649 new gimple functions and pass new argument to label_to_block.
1650 (cleanup_control_flow_bb):
1651 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1652 cfun argument explicitly.
1653 (make_eh_edges): Likewise.
1654 (redirect_eh_dispatch_edge): Likewise.
1655 (lower_resx): Likewise.
1656 (lower_eh_dispatch): Likewise.
1657 (maybe_remove_unreachable_handlers): Likewise.
1658 (unsplit_eh): Likewise.
1659 (cleanup_empty_eh): Likewise.
1660 (verify_eh_edges): Likewise.
1661 (verify_eh_dispatch_edge): Likewise.
1662 * tree-ssa-dom.c (record_edge_info): Likewise.
1663 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1664 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1665 (thread_through_normal_block): Likewise.
1666 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1667 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1668 * tree-switch-conversion.c (switch_conversion::collect): Use new
1669 gimple functions.
1670 (switch_conversion::check_final_bb): Likewise.
1671 (switch_conversion::gather_default_values): Pass new argument
1672 to label_to_block.
1673 (switch_conversion::build_constructors): Likewise.
1674 (switch_decision_tree::compute_cases_per_edge): Use new
1675 gimple_switch_edge function.
1676 (switch_decision_tree::analyze_switch_statement): Pass new argument
1677 to label_to_block.
1678 (switch_decision_tree::try_switch_expansion): Use
1679 gimple_switch_default_edge.
1680 * tree-vrp.c (find_switch_asserts): Pass new argument
1681 to label_to_block.
1682 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1683 (vr_values::simplify_switch_using_ranges): Likewise.
1684
1685 2018-08-27 Richard Biener <rguenther@suse.de>
1686
1687 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1688 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1689
1690 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1691 (struct vn_nary_op_s): Add unwind_to member. Add
1692 predicated_values flag and put result into a union together
1693 with a linked list of vn_pval.
1694 (struct vn_ssa_aux): Add name member to make maintaining
1695 a map of SSA name to vn_ssa_aux possible. Remove no longer
1696 needed info, dfsnum, low, visited, on_sccstack, use_processed
1697 and range_info_anti_range_p members.
1698 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1699 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1700 New functions.
1701 (vn_valueize): New global.
1702 (vn_context_bb): Likewise.
1703 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1704 VN_INFO_PTR_INFO): Remove.
1705 * tree-ssa-sccvn.c: ... (rewrite)
1706 (pass_fre::execute): For -O2+ initialize loops and run
1707 RPO VN in optimistic mode (iterating). For -O1 and -Og
1708 run RPO VN in non-optimistic mode.
1709 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1710 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1711 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1712 (rpo-vn-max-loop-depth): Document.
1713 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1714 when valuezing the VUSE signals we walked out of the region.
1715 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1716 (phi_translate): Set VN context block to use for availability
1717 lookup.
1718 (compute_avail): Likewise.
1719 (pre_valueize): New function.
1720 (pass_pre::execute): Adjust to the RPO VN API.
1721
1722 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1723 (propagate_constants_for_unrolling): Remove.
1724 (tree_unroll_loops_completely): Perform value-numbering
1725 on the unrolled bodies loop parent.
1726
1727 2018-08-27 Richard Biener <rguenther@suse.de>
1728
1729 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1730 for partial antic compute.
1731
1732 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1733
1734 PR rtl-optimization/87065
1735 * combine.c (simplify_if_then_else): Formatting fix.
1736 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1737 check.
1738 (known_cond): Don't return const_true_rtx for vector modes. Use
1739 CONST0_RTX instead of const0_rtx. Formatting fixes.
1740
1741 2018-08-27 Martin Liska <mliska@suse.cz>
1742
1743 PR gcov-profile/87069
1744 * gcov.c (process_file): Record files already processed
1745 and warn about a file being processed multiple times.
1746
1747 2018-08-27 Martin Liska <mliska@suse.cz>
1748
1749 PR driver/83193
1750 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1751 Set default values for x_aarch64_*_string strings.
1752 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1753 prefix. For -mabi do not print '=ABI' in help and use
1754 <option_value> format for -msve-vector-bits and -moverride
1755 options.
1756
1757 2018-08-26 Jeff Law <law@redhat.com>
1758
1759 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1760 "cfg.h"
1761
1762 2018-08-26 Marek Polacek <polacek@redhat.com>
1763
1764 PR c++/87029, Implement -Wredundant-move.
1765 * doc/invoke.texi: Document -Wredundant-move.
1766
1767 2018-08-25 Martin Sebor <msebor@redhat.com>
1768
1769 PR tree-optimization/87059
1770 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1771 to the same type as the other.
1772 * fold-const.c (fold_binary_loc): Assert expectation.
1773
1774 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1775
1776 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1777 extraneous parentheses, dead code section and formatting.
1778
1779 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1780
1781 PR c++/87091
1782 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1783 wide enough for jumps in the line-numbering to be visible.
1784 (layout::print_gap_in_line_numbering): New member function.
1785 (layout::calculate_line_spans): When using line numbering, merge
1786 line spans that are only 1 line apart.
1787 (diagnostic_show_locus): When printing line numbers, show gaps in
1788 line numbering directly, rather than printing headers.
1789 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1790 line-numbering with multiple line spans.
1791 (selftest::test_fixit_insert_containing_newline_2): Add test of
1792 line-numbering, in which the spans are close enough to be merged.
1793
1794 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1795
1796 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1797 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1798 * tree-vrp.c (range_is_nonnull): Remove.
1799 (range_includes_zero_p): Accept value_range instead of min/max.
1800 (extract_range_from_binary_expr_1): Do not early bail on
1801 POINTER_PLUS_EXPR.
1802 Use range_includes_zero_p instead of range_is_nonnull.
1803 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1804 of range_is_nonnull.
1805 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1806 special case VR_ANTI_RANGE.
1807 (vrp_finalize): Same.
1808 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1809 instead of min/max.
1810 (range_is_nonnull): Remove.
1811 * vr-values.c (vrp_stmt_computes_nonzero): Use
1812 range_includes_zero_p instead of range_is_nonnull.
1813 (extract_range_basic): Pass value_range to range_includes_zero_p
1814 instead of range_is_nonnull.
1815
1816 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1817
1818 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1819 * emit-rtl.h (rtl_data): Remove return_bnd.
1820 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1821 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1822 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1823 (POINTER_BOUNDS_MODE): Remove definition.
1824 (make_pointer_bounds_mode): Remove.
1825 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1826 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1827 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1828 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1829 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1830 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1831 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1832
1833 * config/i386/i386-modes.def (BND32, BND64): Remove.
1834 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1835 (dbx64_register_map): Ditto.
1836 (svr4_dbx_register_map): Ditto.
1837 (indirect_thunk_bnd_needed): Remove.
1838 (indirect_thunks_bnd_used): Ditto.
1839 (indirect_return_bnd_needed): Ditto.
1840 (indirect_return_via_cx_bnd): Ditto.
1841 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1842 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1843 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1844 (output_indirect_thunk_function): Remove handling of
1845 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1846 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1847 (ix86_save_reg): Remove handling of crtl->return_bnd.
1848 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1849 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1850 and UNSPEC_BNDLX_ADDR.
1851 (ix86_output_indirect_branch_via_reg): Remove handling of
1852 indirect_thunk_prefix_bnd.
1853 (ix86_output_indirect_branch_via_push): Ditto.
1854 (ix86_output_function_return): Ditto.
1855 (ix86_output_indirect_function_return): Ditto.
1856 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1857 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1858 (CALL_USED_REGISTERS): Ditto.
1859 (REG_ALLOC_ORDER): Update for removal of bound registers.
1860 (HI_REGISTER_NAMES): Ditto.
1861 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1862 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1863 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1864 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1865 (FIRST_PSEUDO_REG): Update.
1866 (BND): Remove mode iterator.
1867 * config/i386/predicates.md (bnd_mem_operator): Remove.
1868
1869 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1870
1871 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1872 vectors.
1873
1874 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1875
1876 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1877 the case in which the permute needs only a single element and
1878 repeats for every vector of the result. Extend that case to
1879 handle variable-length vectors.
1880 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1881
1882 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1883
1884 PR debug/79342
1885 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1886 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1887
1888 2018-08-24 Richard Biener <rguenther@suse.de>
1889
1890 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1891 bb_flags_allocated members.
1892 (auto_flag): New RAII class for allocating flags.
1893 (auto_edge_flag): New RAII class for allocating edge flags.
1894 (auto_bb_flag): New RAII class for allocating bb flags.
1895 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1896 flag dynamically.
1897 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1898 in favor of temporarily allocated BB flag.
1899 * hsa-brig.c: Re-order includes.
1900 * hsa-dump.c: Likewise.
1901 * hsa-regalloc.c: Likewise.
1902 * print-rtl.c: Likewise.
1903 * profile-count.c: Likewise.
1904
1905 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1906
1907 PR target/86989
1908 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1909 the TOC register.
1910
1911 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1912
1913 PR 87073/bootstrap
1914 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1915 from wide_int_range_multiplicative_op.
1916
1917 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1918
1919 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1920 "permutaion".
1921
1922 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1923
1924 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1925 to 'expanded'.
1926
1927 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1928
1929 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1930 full GENERIC expression used for replacement.
1931
1932 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1933
1934 * tree-vrp.c (abs_extent_range): Remove.
1935 (extract_range_into_wide_ints): Pass wide ints by reference.
1936 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1937 Pass wide ints by reference in all calls to
1938 extract_range_into_wide_ints.
1939 * wide-int-range.cc (wide_int_range_div): New.
1940 * wide-int-range.h (wide_int_range_div): New.
1941 (wide_int_range_includes_zero_p): New.
1942 (wide_int_range_zero_p): New.
1943
1944 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1945
1946 * config/aarch64/aarch64.md (arches): New enum.
1947 (arch): New enum attr.
1948 (arch_enabled): New attr.
1949 (enabled): Now uses arch_enabled only.
1950 (simd, sve, fp16): Removed attribute.
1951 (fp): Attr now defined in terms of 'arch'.
1952 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1953 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1954 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1955 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1956 attributes into 'arch'.
1957 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1958 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1959 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1960 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1961 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1962 'simd' attribute into 'arch'.
1963 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1964 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1965 Convert use of 'fp' attribute to 'arch'.
1966 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1967 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1968 into 'arch'.
1969 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1970 (different modes) Merge 'fp' and 'simd' into 'arch'.
1971 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1972 'simd' into 'arch'.
1973
1974 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1975
1976 PR rtl-optimization/87026
1977 * expmed.c (canonicalize_comparison): If we can no longer create
1978 pseudoregisters, don't.
1979
1980 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1981
1982 PR target/86951
1983 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1984 prototype.
1985 * config/arm/arm.c (speculation_barrier_libfunc): New static
1986 variable.
1987 (arm_init_libfuncs): Initialize it.
1988 (arm_emit_speculation_barrier): New function.
1989 * config/arm/arm.md (speculation_barrier): Call
1990 arm_emit_speculation_barrier for architectures that do not have
1991 DSB or ISB.
1992 (speculation_barrier_insn): Only match on Armv7 or later.
1993
1994 2018-08-23 Richard Biener <rguenther@suse.de>
1995
1996 PR middle-end/87024
1997 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1998 calls.
1999
2000 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2001
2002 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
2003 of single-vector TBLs.
2004 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
2005 one input is given.
2006
2007 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
2008
2009 PR target/85910
2010 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
2011 aarch64_evpc_tbl guard.
2012
2013 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2014
2015 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
2016 behaviour.
2017
2018 2018-08-22 Martin Sebor <msebor@redhat.com>
2019
2020 PR middle-end/87052
2021 * tree-pretty-print.c (pretty_print_string): Add argument.
2022 (dump_generic_node): Call to pretty_print_string with string size.
2023
2024 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2025
2026 PR rtl-optimization/86771
2027 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2028 of two SETs into those two SETs, one to be placed at i2, if that SETs
2029 destination is modified between i2 and i3.
2030
2031 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2032
2033 PR tree-optimization/86725
2034 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
2035 function.
2036 (vect_analyze_scalar_cycles_1): Check it.
2037
2038 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2039
2040 PR tree-optimization/86725
2041 * tree-vect-loop.c (vect_is_simple_reduction): When treating
2042 an outer loop phi as a double reduction, make sure that the
2043 single user of the phi result is an inner loop phi.
2044
2045 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2046
2047 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
2048 grouped stores with gaps to a strided group.
2049
2050 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
2051
2052 * tree-vect-stmts.c (get_group_load_store_type)
2053 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
2054 first statement in a group.
2055
2056 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2057
2058 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
2059 the sequence used in gcc/gcc.c.
2060
2061 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2062
2063 PR other/704
2064 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
2065 building it.
2066
2067 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2068
2069 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
2070 Darwin10-specific unwinder-shim.
2071 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
2072 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
2073 New to cater for Darwin10 Rosetta.
2074
2075 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2076
2077 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
2078 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2079
2080 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2081
2082 PR bootstrap/81033
2083 PR target/81733
2084 PR target/52795
2085 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2086 (dwarf2out_switch_text_section): Generate a local label for the
2087 second function sub-section and apply it as the second FDE start
2088 label.
2089 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2090 second sub-section start.
2091
2092 2018-08-22 Richard Biener <rguenther@suse.de>
2093
2094 PR tree-optimization/86988
2095 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2096
2097 2018-08-22 Richard Biener <rguenther@suse.de>
2098
2099 PR tree-optimization/86945
2100 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2101
2102 2018-08-22 Alexandre Oliva <oliva@adacore.com>
2103
2104 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
2105 a comment about how uses of r2 for .sdata2 come about.
2106
2107 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
2108
2109 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2110
2111 2018-08-21 Marek Polacek <polacek@redhat.com>
2112
2113 PR c++/86981, Implement -Wpessimizing-move.
2114 * doc/invoke.texi: Document -Wpessimizing-move.
2115
2116 2018-08-21 Jan Hubicka <jh@suse.cz>
2117
2118 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
2119 * tree.h (is_redundant_typedef): Remove.
2120 * dwarf2out.c (is_redundant_typedef): Turn into static function.
2121
2122 2018-08-21 Jan Hubicka <jh@suse.cz>
2123
2124 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
2125 when possible.
2126
2127 2018-08-21 Tamar Christina <tamar.christina@arm.com>
2128
2129 * expmed.c (extract_low_bits): Reject invalid subregs early.
2130
2131 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2132
2133 PR middle-end/86121
2134 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
2135 behaviour.
2136
2137 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2138
2139 * config/vxworks.h: Guard vxworks_asm_out_constructor and
2140 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
2141 * config/vxworks.c: Likewise.
2142
2143 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2144
2145 * config/vxworks.c: Set targetm.have_ctors_dtors
2146 if HAVE_INITFINI_ARRAY_SUPPORT.
2147 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
2148 if HAVE_INITFINI_ARRAY_SUPPORT.
2149
2150 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2151
2152 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
2153 default search path for VxWorks < 7.
2154
2155 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2156
2157 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
2158 (get_format_string): Refer to c_getstr.
2159
2160 2018-08-21 Tom de Vries <tdevries@suse.de>
2161
2162 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2163 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2164 (debuginfo_early_stop): Declare.
2165 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
2166 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
2167 (debuginfo_early_stop): New function.
2168 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
2169 and debuginfo_early_stop.
2170 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
2171 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
2172 (general_init): Call debuginfo_early_init.
2173 (finalize): Call debuginfo_fini.
2174 (do_compile): Call debuginfo_init.
2175 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
2176 -fdump-early-debug.
2177 (@item -fdump-debug, @item -fdump-earlydebug): Add.
2178
2179 2018-08-21 Tom de Vries <tdevries@suse.de>
2180
2181 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
2182 flag_dump_noaddr and flag_dump_unnumbered.
2183
2184 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
2185
2186 * wide-int-range.cc (wide_int_range_abs): New.
2187 (wide_int_range_order_set): Rename from wide_int_range_min_max.
2188 * wide-int-range.h (wide_int_range_abs): New.
2189 (wide_int_range_min_max): New.
2190 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
2191 case to call wide_int_range_abs.
2192 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
2193 (extract_range_from_abs_expr): Delete.
2194
2195 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2196
2197 PR target/87033
2198 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2199 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2200 for indexed loads.
2201
2202 2018-08-20 Nathan Sidwell <nathan@acm.org>
2203 Jeff Law <law@redhat.com>
2204
2205 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2206 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2207
2208 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2209
2210 PR other/84889
2211 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2212 (decl_attributes): Likewise.
2213 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2214 instance.
2215 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2216 * diagnostic-core.h (class auto_diagnostic_group): New class.
2217 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2218 (diagnostic_report_diagnostic): Handle the first diagnostics within
2219 a group.
2220 (emit_diagnostic): Add auto_diagnostic_group instance.
2221 (inform): Likewise.
2222 (inform_n): Likewise.
2223 (warning): Likewise.
2224 (warning_at): Likewise.
2225 (warning_n): Likewise.
2226 (pedwarn): Likewise.
2227 (permerror): Likewise.
2228 (error): Likewise.
2229 (error_n): Likewise.
2230 (error_at): Likewise.
2231 (sorry): Likewise.
2232 (fatal_error): Likewise.
2233 (internal_error): Likewise.
2234 (internal_error_no_backtrace): Likewise.
2235 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2236 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2237 * diagnostic.h (struct diagnostic_context): Add fields
2238 "diagnostic_group_nesting_depth",
2239 "diagnostic_group_emission_count", "begin_group_cb",
2240 "end_group_cb".
2241 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2242 Add auto_diagnostic_group instance(s).
2243 (find_explicit_erroneous_behavior): Likewise.
2244 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2245 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2246 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2247 (gimplify_va_arg_expr): Likewise.
2248 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2249 (HSA_SORRY_AT): Likewise.
2250 * ipa-devirt.c (compare_virtual_tables): Likewise.
2251 (warn_odr): Likewise.
2252 * multiple_target.c (expand_target_clones): Likewise.
2253 * opts-common.c (cmdline_handle_error): Likewise.
2254 * reginfo.c (globalize_reg): Likewise.
2255 * substring-locations.c (format_warning_n_va): Likewise.
2256 * tree-inline.c (expand_call_inline): Likewise.
2257 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2258 * tree-ssa-loop-niter.c
2259 (do_warn_aggressive_loop_optimizations): Likewise.
2260 * tree-ssa-uninit.c (warn_uninit): Likewise.
2261 * tree.c (warn_deprecated_use): Likewise.
2262
2263 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2264
2265 PR target/87014
2266 * config/i386/i386.md (eh_return): Always update EH return
2267 address in word_mode.
2268
2269 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2270
2271 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2272 TARGET_SPLIT_COMPLEX_ARG is defined.
2273
2274 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2275
2276 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2277
2278 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2279
2280 PR target/86984
2281 * expr.c (expand_assignment): Assert that bitpos is positive.
2282 (store_field): Likewise
2283 (expand_expr_real_1): Make sure that bitpos is positive.
2284 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2285 integer overflow.
2286
2287 2018-08-20 Nathan Sidwell <nathan@acm.org>
2288
2289 * Makefile.in (CPP_ID_DATA_H): Delete.
2290 (CPP_INTERNAL_H): Don't add it.
2291 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2292 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2293
2294 2018-08-20 Richard Biener <rguenther@suse.de>
2295
2296 PR tree-optimization/78655
2297 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2298 pointer + offset nonnull if either operand is nonnull work.
2299
2300 2018-08-20 Tom de Vries <tdevries@suse.de>
2301
2302 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2303 unless the referenced die describes the added property using
2304 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2305 Otherwise, add a DW_AT_location to the referenced die.
2306
2307 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2308
2309 PR target/86994
2310 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2311 register_operand when calling ix86_set_reg_reg_cost.
2312 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2313 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2314 predicate and to 1 otherwise.
2315
2316 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2317
2318 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2319 emit a diagnostic that it is not supported and reset the option.
2320 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2321 supported and consume the option. (ASM_FINAL_SPEC): New.
2322
2323 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2324
2325 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2326 a sentence.
2327
2328 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2329
2330 C-SKY port: Documentation
2331
2332 * doc/extend.texi (C-SKY Function Attributes): New section.
2333 * doc/invoke.texi (Option Summary): Add C-SKY options.
2334 (C-SKY Options): New section.
2335 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2336
2337 2018-08-17 Jojo <jijie_rong@c-sky.com>
2338 Huibin Wang <huibin_wang@c-sky.com>
2339 Sandra Loosemore <sandra@codesourcery.com>
2340 Chung-Lin Tang <cltang@codesourcery.com>
2341
2342 C-SKY port: Backend implementation
2343
2344 * config/csky/*: New.
2345 * common/config/csky/*: New.
2346
2347 2018-08-17 Jojo <jijie_rong@c-sky.com>
2348 Huibin Wang <huibin_wang@c-sky.com>
2349 Sandra Loosemore <sandra@codesourcery.com>
2350 Chung-Lin Tang <cltang@codesourcery.com>
2351 Andrew Jenner <andrew@codesourcery.com>
2352
2353 C-SKY port: Configury
2354
2355 * config.gcc (csky-*-*): New.
2356 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2357 * configure: Regenerated.
2358
2359 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2360
2361 * dump-context.h: Include "dumpfile.h".
2362 (dump_context::dump_printf_va): Convert final param from va_list
2363 to va_list *. Convert from ATTRIBUTE_PRINTF to
2364 ATTRIBUTE_GCC_DUMP_PRINTF.
2365 (dump_context::dump_printf_loc_va): Likewise.
2366 * dumpfile.c: Include "stringpool.h".
2367 (make_item_for_dump_printf_va): Delete.
2368 (make_item_for_dump_printf): Delete.
2369 (class dump_pretty_printer): New class.
2370 (dump_pretty_printer::dump_pretty_printer): New ctor.
2371 (dump_pretty_printer::emit_items): New member function.
2372 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2373 function.
2374 (dump_pretty_printer::emit_item): New member function.
2375 (dump_pretty_printer::stash_item): New member function.
2376 (dump_pretty_printer::format_decoder_cb): New member function.
2377 (dump_pretty_printer::decode_format): New member function.
2378 (dump_context::dump_printf_va): Reimplement in terms of
2379 dump_pretty_printer.
2380 (dump_context::dump_printf_loc_va): Convert final param from va_list
2381 to va_list *.
2382 (dump_context::begin_scope): Reimplement call to
2383 make_item_for_dump_printf.
2384 (dump_printf): Update for change to dump_printf_va.
2385 (dump_printf_loc): Likewise.
2386 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2387 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2388 with %T, %E, and %G.
2389 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2390 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2391 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2392 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2393 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2394 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2395 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2396 within a dump_printf_loc call to "%wu".
2397 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2398 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2399 missing space after "=".
2400 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2401 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2402 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2403 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2404 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2405 duplicate "vectorized" from message.
2406
2407 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2408
2409 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2410 polyNxK_t element's TYPE_STRING_FLAG.
2411
2412 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2413
2414 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2415 (they were unnamed before). Fix comments.
2416
2417 2018-08-17 Nathan Sidwell <nathan@acm.org>
2418
2419 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2420
2421 2018-08-17 Richard Biener <rguenther@suse.de>
2422
2423 PR tree-optimization/86841
2424 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2425
2426 2018-08-17 Martin Liska <mliska@suse.cz>
2427
2428 * common.opt: Remove Warn, Init and Report for options with
2429 Ignore/Deprecated flag. Warning is done automatically for
2430 Deprecated flags.
2431 * config/i386/i386.opt: Likewise.
2432 * config/ia64/ia64.opt: Likewise.
2433 * config/rs6000/rs6000.opt: Likewise.
2434 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2435 Remove usage of flag_check_pointer_bounds.
2436 * lto-wrapper.c (merge_and_complain): Do not handle
2437 OPT_fcheck_pointer_bounds.
2438 (append_compiler_options): Likewise.
2439 * opt-functions.awk: Do not handle Deprecated.
2440 * optc-gen.awk: Check that Var, Report and Init are not
2441 used for an option with Ignore/Deprecated flag.
2442 * opts-common.c (decode_cmdline_option): Do not report
2443 CL_ERR_DEPRECATED.
2444 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2445 options.
2446 * opts.h (struct cl_option): Remove cl_deprecated flag.
2447 (CL_ERR_DEPRECATED): Remove error enum value.
2448
2449 2018-08-17 Richard Biener <rguenther@suse.de>
2450
2451 PR middle-end/86505
2452 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2453 across a va-arg-pack using call adjust its return value accordingly.
2454
2455 2018-08-16 Martin Sebor <msebor@redhat.com>
2456
2457 PR tree-optimization/86853
2458 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2459 (struct fmtresult): Add member and initialize it in ctors.
2460 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2461 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2462 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2463 (parse_directive): Handle %C same as %c.
2464 (sprintf_dom_walker::compute_format_length): Adjust.
2465 (is_call_safe): Adjust.
2466
2467 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2468
2469 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2470 for determining how to count the elements.
2471 * builtins.h (c_strlen): Adjust prototype.
2472 * expr.c (string_constant): Add new parameter mem_size.
2473 Set *mem_size appropriately.
2474 * expr.h (string_constant): Adjust protoype.
2475 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2476 * gimple-fold.h (get_range_strlen): Adjust prototype.
2477 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2478 (format_string): Call get_string_length with eltsize.
2479
2480 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2481
2482 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2483 to emit the span, rather than setting it as the prefix.
2484
2485 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2486
2487 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2488 "margin_char" parameter, defaulting to space. Use it in place
2489 of pp_space for the initial part of the margin.
2490 (layout::print_leading_fixits): Use '+' when filling the margin
2491 of line-insertion fix-it hints.
2492
2493 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2494
2495 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2496 Delete.
2497
2498 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2499
2500 * config/rs6000/altivec.md: Don't set length attribute to the default
2501 value.
2502 * config/rs6000/darwin.md: Ditto.
2503 * config/rs6000/dfp.md: Ditto.
2504 * config/rs6000/htm.md: Ditto.
2505 * config/rs6000/rs6000.md: Ditto.
2506 * config/rs6000/sync.md: Ditto.
2507 * config/rs6000/vsx.md: Ditto.
2508
2509 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2510
2511 * config/rs6000/altivec.md: Don't set length attribute to the default
2512 value, for branch instructions.
2513 * config/rs6000/darwin.md: Ditto.
2514 * config/rs6000/rs6000.md: Ditto.
2515
2516 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2517
2518 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2519 (unnamed conditional branch define_insn): Set length to 4 or 8
2520 depending on offset.
2521 (<bd>_<mode>): Similar, for alternative 0.
2522 (<bd>tf_<mode>): Ditto.
2523
2524 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2525
2526 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2527
2528 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2529
2530 * doc/rtl.texi: Replace old RTX class names with new names.
2531
2532
2533 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2534
2535 * expmed.h (canonicalize_comparison): New declaration.
2536 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2537 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2538 * optabs.c (prepare_cmp_insn): Likewise.
2539 * rtl.h (unsigned_condition_p): New function which checks if a
2540 comparison operator is unsigned.
2541
2542 2018-08-16 Nathan Sidwell <nathan@acm.org>
2543
2544 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2545 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2546
2547 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2548
2549 PR target/84711
2550 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2551 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2552 (mov<mov>): ..this and enable unconditionally.
2553
2554 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2555
2556 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2557
2558 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2559
2560 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2561 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2562 "Common" with "Target".
2563
2564 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2565
2566 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2567 * doc/invoke.texi (mmitigate-rop): Remove.
2568 * config/i386/i386.c: Do not include "regrename.h".
2569 (ix86_rop_should_change_byte_p, reg_encoded_number)
2570 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2571 Remove.
2572 (ix86_reorg): Remove call to ix86_mitigate_rop.
2573 * config/i386/i386.md (attr "modrm_class"): Remove.
2574 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2575 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2576 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2577
2578 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2579
2580 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2581 allow folding of mergeh() and mergel() for the float and double types.
2582 (fold_mergehl_helper): Rework to handle building a permute tree
2583 for float vectors.
2584
2585 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2586
2587 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2588 for TARGET_SSE.
2589
2590 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2591
2592 * common.opt (fdiagnostics-show-labels): New option.
2593 * diagnostic-show-locus.c (class layout_range): Add field
2594 "m_label".
2595 (class layout): Add field "m_show_labels_p".
2596 (layout_range::layout_range): Add param "label" and use it to
2597 initialize m_label.
2598 (make_range): Pass in NULL for new "label" param of layout_range's
2599 ctor.
2600 (layout::layout): Initialize m_show_labels_p.
2601 (layout::maybe_add_location_range): Pass in loc_range->m_label
2602 when constructing layout_range instances.
2603 (struct line_label): New struct.
2604 (layout::print_any_labels): New member function.
2605 (layout::print_line): Call it if label-printing is enabled.
2606 (selftest::test_one_liner_labels): New test.
2607 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2608 * diagnostic.c (diagnostic_initialize): Initialize
2609 context->show_labels_p.
2610 * diagnostic.h (struct diagnostic_context): Add field
2611 "show_labels_p".
2612 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2613 -fno-diagnostics-show-labels.
2614 * dwarf2out.c (gen_producer_string): Add
2615 OPT_fdiagnostics_show_labels to the ignored options.
2616 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2617 param.
2618 (gcc_rich_location::maybe_add_expr): Likewise.
2619 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2620 label" param, defaulting to NULL.
2621 (gcc_rich_location::add_expr): Add "label" param.
2622 (gcc_rich_location::maybe_add_expr): Likewise.
2623 (class text_range_label): New class.
2624 (class range_label_for_type_mismatch): New class.
2625 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2626 of format_warning_va.
2627 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2628 * lto-wrapper.c (merge_and_complain): Add
2629 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2630 (append_compiler_options): Likewise to the dropped options.
2631 (append_diag_options): Likewise to the passed-on options.
2632 * opts.c (common_handle_option): Handle the new option.
2633 * selftest-diagnostic.c
2634 (test_diagnostic_context::test_diagnostic_context): Enable
2635 show_labels_p.
2636 * substring-locations.c: Include "gcc-rich-location.h".
2637 (format_warning_n_va): Add "fmt_label" and "param_label" params
2638 and use them as appropriate.
2639 (format_warning_va): Add "fmt_label" and "param_label" params,
2640 passing them on to format_warning_n_va.
2641 (format_warning_at_substring): Likewise.
2642 (format_warning_at_substring_n): Likewise.
2643 * substring-locations.h (format_warning_va): Add "fmt_label" and
2644 "param_label" params.
2645 (format_warning_n_va): Likewise.
2646 (format_warning_at_substring): Likewise.
2647 (format_warning_at_substring_n): Likewise.
2648 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2649
2650 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2651
2652 PR testsuite/86519
2653 * builtins.c (expand_builtin_memcmp): Do not expand the call
2654 when overflow is detected.
2655
2656 2018-08-15 Martin Sebor <msebor@redhat.com>
2657
2658 PR tree-optimization/71625
2659 * config/aarch64/aarch64-builtins.c
2660 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2661
2662 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2663
2664 * config/s390/s390.c (s390_reorg): Remove loop.
2665
2666 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2667
2668 * config/darwin.c
2669 (darwin_function_switched_text_sections): Delete.
2670 * gcc/config/darwin.h
2671 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2672
2673 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2674
2675 PR target/81685
2676 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2677 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2678 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2679
2680 2018-08-15 Martin Liska <mliska@suse.cz>
2681
2682 PR tree-optimization/86925
2683 * predict.c (expr_expected_value_1): When taking
2684 later predictor, assign also probability.
2685 Use fold_build2_initializer_loc in order to fold
2686 the expression in -frounding-math.
2687
2688 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2689
2690 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2691 patterns.
2692 (expand_vec_perm_1): Try the new method.
2693
2694 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2695
2696 PR target/86547
2697 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2698 Check whether lra_live_max_point is 0 before dividing.
2699
2700 2018-08-14 Martin Sebor <msebor@redhat.com>
2701
2702 PR tree-optimization/86650
2703 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2704 (vrp_prop::check_mem_ref): Same.
2705
2706 2018-08-13 Liu Hao <lh_mouse@126.com>
2707
2708 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2709 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2710 and clear it thereafter, as it only works for DBCS.
2711
2712 2018-08-13 Liu Hao <lh_mouse@126.com>
2713
2714 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2715 handle returned by _get_osf_handle().
2716
2717 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2718
2719 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2720 for folding vec_perm.
2721
2722 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2723
2724 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2725 Add support for gimple-folding of vec_pack() and vec_unpack()
2726 intrinsics.
2727
2728 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2729
2730 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2731 vec_xst variants to the list.
2732 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2733 vector loads and stores.
2734
2735 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2736
2737 * config.gcc (rs6000-ibm-aix4.x): Delete.
2738 (rs6000-ibm-aix5.1): Delete.
2739 (rs6000-ibm-aix5.2): Delete.
2740 (rs6000-ibm-aix5.3): Delete.
2741 * config/rs6000/aix43.h: Delete.
2742 * config/rs6000/aix51.h: Delete.
2743 * config/rs6000/aix52.h: Delete.
2744 * config/rs6000/t-aix43: Delete.
2745
2746 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2747
2748 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2749 New function.
2750 (s390_decompose_address): Factor out constant pool ref
2751 decomposition.
2752
2753 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2754
2755 * config/nds32/nds32-predicates.c
2756 (nds32_can_use_bclr_p): Change return type as bool.
2757 (nds32_can_use_bset_p): Ditto.
2758 (nds32_can_use_btgl_p): Ditto.
2759 (nds32_can_use_bitci_p): Ditto.
2760 * config/nds32/nds32-protos.h
2761 (nds32_can_use_bclr_p): Change declaration.
2762 (nds32_can_use_bset_p): Ditto.
2763 (nds32_can_use_btgl_p): Ditto.
2764 (nds32_can_use_bitci_p): Ditto.
2765
2766 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2767
2768 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2769 Support -msched-prolog-epilog option.
2770 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2771
2772 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2773
2774 * common/config/nds32/nds32-common.c
2775 (nds32_option_optimization_table): Enalbe -malways-align.
2776
2777 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2778
2779 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2780 extra_headers.
2781 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2782 OPT_misr_secure_ case.
2783 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2784 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2785 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2786 secure attribute.
2787 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2788 (nds32_isr_info): New field security_level.
2789 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2790 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2791 * config/nds32/nds32.opt (misr-secure): New option.
2792 * config/nds32/nds32_init.inc: New file.
2793 * config/nds32/nds32_isr.h: New file.
2794
2795 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2796
2797 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2798 Update comment for atomic instructions.
2799 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2800 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2801 Remove.
2802 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2803 load for __ATOMIC_SEQ_CST model.
2804 (atomic_loaddi_1): Remove float register target.
2805 (atomic_storedi): Handle CONST_INT values.
2806 (atomic_storedi_1): Remove float register source. Add special case
2807 for zero value.
2808 (memory_barrier): New expander and insn.
2809
2810 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2811
2812 PR tree-optimization/86835
2813 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2814 new_stmt after def_gsi, make sure to insert new_square_stmt after
2815 that stmt, not 2 stmts before it.
2816
2817 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2818
2819 PR target/82418
2820 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2821 instead of SWI48.
2822
2823 2018-08-10 Martin Liska <mliska@suse.cz>
2824
2825 PR target/83610
2826 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2827 function type.
2828 * builtins.c (expand_builtin_expect_with_probability):
2829 New function.
2830 (expand_builtin_expect_with_probability): New function.
2831 (build_builtin_expect_predicate): Add new argumnet probability
2832 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2833 (fold_builtin_expect):
2834 (fold_builtin_2):
2835 (fold_builtin_3):
2836 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2837 * builtins.h (fold_builtin_expect): Set new argument.
2838 * doc/extend.texi: Document __builtin_expect_with_probability.
2839 * doc/invoke.texi: Likewise.
2840 * gimple-fold.c (gimple_fold_call): Pass new argument.
2841 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2842 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2843 * predict.c (get_predictor_value): New function.
2844 (expr_expected_value): Add new argument probability. Assume
2845 that predictor and probability are always non-null.
2846 (expr_expected_value_1): Likewise. For __builtin_expect and
2847 __builtin_expect_with_probability set probability. Handle
2848 combination in binary expressions.
2849 (tree_predict_by_opcode): Simplify code by simply calling
2850 get_predictor_value.
2851 (pass_strip_predict_hints::execute): Add handling of
2852 BUILT_IN_EXPECT_WITH_PROBABILITY.
2853 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2854 new predictor.
2855 * tree.h (DECL_BUILT_IN_P): New function.
2856
2857 2018-08-10 Martin Liska <mliska@suse.cz>
2858
2859 PR tree-optimization/85799
2860 * passes.def: Add argument for pass_strip_predict_hints.
2861 * predict.c (class pass_strip_predict_hints): Add new argument
2862 early_p.
2863 (strip_predictor_early): New function.
2864 (pass_strip_predict_hints::execute): Call the function to
2865 strip predictors.
2866 (strip_predict_hints): New function.
2867 * predict.def: Fix comment.
2868
2869 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2870
2871 * Makefile.in: Clarify which tm.texi to copy over to assert the
2872 right to grant a GFDL license for all.
2873
2874 2018-08-09 Jeff Law <law@redhat.com>
2875
2876 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2877 unused variable.
2878
2879 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2880
2881 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2882 prototype.
2883
2884 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2885
2886 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2887 reductions for variable-length vectors.
2888
2889 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2890
2891 PR other/84889
2892 * common.opt (fdiagnostics-show-line-numbers): New option.
2893 * diagnostic-show-locus.c (class layout): Add fields
2894 "m_show_line_numbers_p" and "m_linenum_width";
2895 (num_digits): New function.
2896 (test_num_digits): New function.
2897 (layout::layout): Initialize new fields. Update m_x_offset
2898 logic to handle any left margin.
2899 (layout::print_source_line): Print line number when requested.
2900 (layout::start_annotation_line): New member function.
2901 (layout::print_annotation_line): Call it.
2902 (layout::print_leading_fixits): Likewise.
2903 (layout::print_trailing_fixits): Likewise. Update calls to
2904 move_to_column for new parameter.
2905 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2906 it to potentially call start_annotation_line.
2907 (layout::show_ruler): Call start_annotation_line.
2908 (selftest::test_line_numbers_multiline_range): New selftest.
2909 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2910 and selftest::test_line_numbers_multiline_range.
2911 * diagnostic.c (diagnostic_initialize): Initialize
2912 show_line_numbers_p.
2913 * diagnostic.h (struct diagnostic_context): Add field
2914 "show_line_numbers_p".
2915 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2916 -fno-diagnostics-show-line-numbers.
2917 * dwarf2out.c (gen_producer_string): Add
2918 OPT_fdiagnostics_show_line_numbers to the ignored options.
2919 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2920 one setting" options.
2921 (append_compiler_options): Likewise to the dropped options.
2922 (append_diag_options): Likewise to the passed-on options.
2923 * opts.c (common_handle_option): Handle the new option.
2924 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2925
2926 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2927
2928 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2929 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2930 third argument of type "const signed char" to descriptions of
2931 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2932 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2933 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2934 __builtin_bcdsub_ov functions.
2935
2936 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2937
2938 PR tree-optimization/86858
2939 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2940 flow_bb_inside_loop_p calls.
2941
2942 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2943
2944 PR tree-optimization/86871
2945 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2946 instead of gimple_assign_lhs.
2947
2948 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2949
2950 PR target/86887
2951 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2952 register constraint to operand 0.
2953 (add<mode>3_carryinC): Likewise.
2954 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2955
2956 2018-08-09 Martin Liska <mliska@suse.cz>
2957
2958 PR c/86895
2959 * common.opt: Remove extra line.
2960
2961 2018-08-09 Martin Liska <mliska@suse.cz>
2962
2963 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2964 at the end of a line, make first letter capital and end up
2965 a sentence with a dot.
2966 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2967 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2968 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2969 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2970 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2971 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2972 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2973 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2974 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2975 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2976 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2977 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2978 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2979 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2980 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2981 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2982 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2983 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2984
2985 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2986
2987 PR target/84332
2988 * config/s390/s390.c (s390_option_override_internal): Reduce the
2989 stack-clash-protection-probe-interval param if it would be too big
2990 for z900.
2991
2992 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2993
2994 PR target/46179
2995 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2996 * config/m68k/m68k.c (handle_move_double): Don't call
2997 m68k_final_prescan_insn.
2998 (m68k_adjust_decorated_operand): Renamed from
2999 m68k_final_prescan_insn, remove first and third operand and
3000 simplify.
3001 (print_operand): Call it.
3002 (print_operand_address): Call it.
3003
3004 2018-08-08 Nathan Sidwell <nathan@acm.org>
3005
3006 * diagnostic.c (diagnostic_report_current_module): Use
3007 linemap_included_from & linemap_included_from_linemap.
3008
3009 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
3010
3011 * config/aarch64/aarch64-cores.def: Add phecda core.
3012 * config/aarch64/aarch64-tune.md: Regenerate.
3013 * doc/invoke.texi: Add phecda core.
3014
3015 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3016
3017 PR target/85295
3018 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
3019 definitions.
3020 * config/s390/s390.md ("movti"): Add more alternatives for
3021 constant to GPR copies.
3022
3023 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
3024
3025 * config/s390/s390.c: Fix whitespace damage throughout the file.
3026 * config/s390/s390.h: Likewise.
3027 * config/s390/tpf.h: Likewise.
3028
3029 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3030
3031 * config/s390/s390.c (s390_loadrelative_operand_p):
3032 Remove TARGET_CPU_ZARCH usages.
3033 (s390_rtx_costs): Likewise.
3034 (s390_legitimate_constant_p): Likewise.
3035 (s390_cannot_force_const_mem): Likewise.
3036 (legitimate_reload_constant_p): Likewise.
3037 (s390_preferred_reload_class): Likewise.
3038 (legitimize_pic_address): Likewise.
3039 (legitimize_tls_address): Likewise.
3040 (s390_split_branches): Removed.
3041 (s390_add_execute): Removed.
3042 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
3043 (s390_mainpool_start): Likewise.
3044 (s390_mainpool_finish): Likewise.
3045 (s390_mainpool_cancel): Removed.
3046 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
3047 (s390_chunkify_cancel): Likewise.
3048 (s390_return_addr_rtx): Likewise.
3049 (s390_register_info): Remove split_branches_pending_p uages.
3050 (s390_optimize_register_info): Likewise.
3051 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
3052 split_branches_pending_p usages.
3053 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
3054 (s390_load_got): Likewise.
3055 (s390_expand_split_stack_prologue): Likewise.
3056 (output_asm_nops): Likewise.
3057 (s390_function_profiler): Likewise.
3058 (s390_emit_call): Likewise.
3059 (s390_conditional_register_usage): Likewise.
3060 (s390_optimize_prologue): Likewise.
3061 (s390_reorg): Remove TARGET_CPU_ZARCH and
3062 split_branches_pending_p usages.
3063 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
3064 usages.
3065 (s390_output_indirect_thunk_function): Likewise.
3066 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
3067 (TARGET_CPU_ZARCH_P): Removed.
3068 (struct machine_function): Remove split_branches_pending_p.
3069 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
3070
3071 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
3072
3073 * common/config/s390/s390-common.c (processor_flags_table):
3074 Remove flags.
3075 * config.gcc: Remove with_arch/with_tune support.
3076 * config/s390/2064.md: Remove cpu attribute comparisons.
3077 * config/s390/driver-native.c (s390_host_detect_local_cpu):
3078 Remove MTN.
3079 * config/s390/linux.h (ASM_SPEC):
3080 Remove -march support.
3081 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
3082 Use a table to get an arch level.
3083 * config/s390/s390-opts.h (enum processor_type):
3084 Remove enum values.
3085 * config/s390/s390.c
3086 (processor_table): Remove entries, add arch_level values.
3087 (s390_issue_rate): Remove cases.
3088 (s390_option_override): Adjust
3089 s390_option_override_internal() call.
3090 (s390_option_override_internal): Remove deprecation warning.
3091 (s390_valid_target_attribute_tree): Adjust
3092 s390_option_override_internal() call.
3093 * config/s390/s390.h (struct s390_processor):
3094 Share with s390-c.c, add arch_level field.
3095 * config/s390/s390.md:
3096 Remove occurrences in cpu attribute.
3097 * config/s390/s390.opt: Remove -march/-mtune support.
3098 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
3099 * doc/invoke.texi: Remove deprecation warning.
3100
3101 2018-08-08 Luis Machado <luis.machado@linaro.org>
3102
3103 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
3104 global.
3105 (qdf24xx_tunings): Set vector cost structure to
3106 qdf24xx_vector_cost.
3107
3108 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3109 <register_sextend>: Set to 3.
3110
3111 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
3112
3113 PR target/86838
3114 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
3115 * config/aarch64/aarch64-simd.md
3116 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
3117 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
3118 (aarch64_frecpx<mode>): ...this new pattern.
3119 * config/aarch64/aarch64-simd-builtins.def: Remove comment
3120 about aarch64_frecp<FRECP:frecp_suffix><mode>.
3121
3122 2018-08-07 Martin Liska <mliska@suse.cz>
3123
3124 PR middle-end/83023
3125 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
3126 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
3127 * predict.def (PRED_MALLOC_NONNULL): New predictor.
3128 * doc/extend.texi: Document that malloc attribute adds
3129 hit to compiler.
3130
3131 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
3132
3133 PR target/86785
3134 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3135 Define to speculation_safe_value_not_needed.
3136
3137 2018-08-06 Jeff Law <law@redhat.com>
3138
3139 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
3140 the vr_values instance to cprop_into_stmt.
3141 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
3142 (cprop_operand): Also query EVRP to determine if OP is a constant.
3143
3144 2018-08-06 Nathan Sidwell <nathan@acm.org>
3145
3146 * diagnostic.c (diagnostic_report_current_module): Reroll
3147 included-at loop. Translate text.
3148
3149 2018-08-06 David Malcolm <dmalcolm@redhat.com>
3150
3151 * function-tests.c (selftest::test_expansion_to_rtl): Call
3152 free_after_compilation.
3153
3154 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3155
3156 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
3157
3158 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
3159
3160 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
3161 loops with memory block operations from getting unrolled.
3162
3163 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
3164
3165 PR target/86807
3166 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3167 Define to speculation_safe_value_not_needed.
3168
3169 2018-08-06 Jeff Law <law@redhat.com>
3170
3171 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
3172 assert.
3173
3174 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3175
3176 PR target/86662
3177 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3178 with all enabled __intN types.
3179
3180 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3181
3182 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3183
3184 * alias.c (record_set): Check for clobber high.
3185 * cfgexpand.c (expand_gimple_stmt): Likewise.
3186 * combine-stack-adj.c (single_set_for_csa): Likewise.
3187 * combine.c (find_single_use_1): Likewise.
3188 (set_nonzero_bits_and_sign_copies): Likewise.
3189 (get_combine_src_dest): Likewise.
3190 (is_parallel_of_n_reg_sets): Likewise.
3191 (try_combine): Likewise.
3192 (record_dead_and_set_regs_1): Likewise.
3193 (reg_dead_at_p_1): Likewise.
3194 (reg_dead_at_p): Likewise.
3195 * dce.c (deletable_insn_p): Likewise.
3196 (mark_nonreg_stores_1): Likewise.
3197 (mark_nonreg_stores_2): Likewise.
3198 * df-scan.c (df_find_hard_reg_defs): Likewise.
3199 (df_uses_record): Likewise.
3200 (df_get_call_refs): Likewise.
3201 * dwarf2out.c (mem_loc_descriptor): Likewise.
3202 * haifa-sched.c (haifa_classify_rtx): Likewise.
3203 * ira-build.c (create_insn_allocnos): Likewise.
3204 * ira-costs.c (scan_one_insn): Likewise.
3205 * ira.c (equiv_init_movable_p): Likewise.
3206 (rtx_moveable_p): Likewise.
3207 (interesting_dest_for_shprep): Likewise.
3208 * jump.c (mark_jump_label_1): Likewise.
3209 * postreload-gcse.c (record_opr_changes): Likewise.
3210 * postreload.c (reload_cse_simplify): Likewise.
3211 (struct reg_use): Add source expr.
3212 (reload_combine): Check for clobber high.
3213 (reload_combine_note_use): Likewise.
3214 (reload_cse_move2add): Likewise.
3215 (move2add_note_store): Likewise.
3216 * print-rtl.c (print_pattern): Likewise.
3217 * recog.c (decode_asm_operands): Likewise.
3218 (store_data_bypass_p): Likewise.
3219 (if_test_bypass_p): Likewise.
3220 * regcprop.c (kill_clobbered_value): Likewise.
3221 (kill_set_value): Likewise.
3222 * reginfo.c (reg_scan_mark_refs): Likewise.
3223 * reload1.c (maybe_fix_stack_asms): Likewise.
3224 (eliminate_regs_1): Likewise.
3225 (elimination_effects): Likewise.
3226 (mark_not_eliminable): Likewise.
3227 (scan_paradoxical_subregs): Likewise.
3228 (forget_old_reloads_1): Likewise.
3229 * reorg.c (find_end_label): Likewise.
3230 (try_merge_delay_insns): Likewise.
3231 (redundant_insn): Likewise.
3232 (own_thread_p): Likewise.
3233 (fill_simple_delay_slots): Likewise.
3234 (fill_slots_from_thread): Likewise.
3235 (dbr_schedule): Likewise.
3236 * resource.c (update_live_status): Likewise.
3237 (mark_referenced_resources): Likewise.
3238 (mark_set_resources): Likewise.
3239 * rtl.c (copy_rtx): Likewise.
3240 * rtlanal.c (reg_referenced_p): Likewise.
3241 (single_set_2): Likewise.
3242 (noop_move_p): Likewise.
3243 (note_stores): Likewise.
3244 * sched-deps.c (sched_analyze_reg): Likewise.
3245 (sched_analyze_insn): Likewise.
3246
3247 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3248
3249 * cse.c (invalidate_reg): New function extracted from...
3250 (invalidate): ...here.
3251 (canonicalize_insn): Check for clobber high.
3252 (invalidate_from_clobbers): invalidate clobber highs.
3253 (invalidate_from_sets_and_clobbers): Likewise.
3254 (count_reg_usage): Check for clobber high.
3255 (insn_live_p): Likewise.
3256 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3257 (cselib_invalidate_regno): Check for clobber in setter.
3258 (cselib_invalidate_rtx): Pass through setter.
3259 (cselib_invalidate_rtx_note_stores):
3260 (cselib_process_insn): Check for clobber high.
3261 * cselib.h (cselib_invalidate_rtx): Add operand.
3262
3263 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3264
3265 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3266 (mark_not_eliminable): Likewise.
3267 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3268 * lra-lives.c (process_bb_lives): Check for clobber high.
3269 * lra.c (new_insn_reg): Remember clobber highs.
3270 (collect_non_operand_hard_regs): Check for clobber high.
3271 (lra_set_insn_recog_data): Likewise.
3272 (add_regs_to_insn_regno_info): Likewise.
3273 (lra_update_insn_regno_info): Likewise.
3274
3275 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3276
3277 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3278 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3279
3280 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3281
3282 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3283 (copy_insn_1): Likewise.
3284 (gen_hard_reg_clobber_high): New gen function.
3285 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3286 * genemit.c (gen_exp): Likewise.
3287 (gen_emit_seq): Pass through info.
3288 (gen_insn): Check for CLOBBER_HIGH.
3289 (gen_expand): Pass through info.
3290 (gen_split): Likewise.
3291 (output_add_clobbers): Likewise.
3292 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3293 (remove_clobbers): Likewise.
3294 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3295
3296 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3297
3298 * doc/rtl.texi (clobber_high): Add.
3299 (parallel): Add in clobber high
3300 * rtl.c (rtl_check_failed_code3): Add function.
3301 * rtl.def (CLOBBER_HIGH): Add expression.
3302 * rtl.h (RTL_CHECKC3): Add macro.
3303 (rtl_check_failed_code3): Add declaration.
3304 (XC3EXP): Add macro.
3305
3306 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3307
3308 PR target/86386
3309 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3310 cfun->machine->max_used_stack_alignment if needed.
3311
3312 2018-08-04 Martin Sebor <msebor@redhat.com>
3313
3314 PR tree-optimization/86571
3315 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3316 NaN output to 4.
3317
3318 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3319
3320 PR target/86799
3321 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3322 Define.
3323
3324 2018-08-03 Jeff Law <law@redhat.com>
3325
3326 PR target/86795
3327 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3328 Define to speculation_safe_value_not_needed.
3329
3330 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3331
3332 * doc/gcov.texi (-x): Remove duplicate "to".
3333 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3334 (-Wif-not-aligned): Remove duplicate "is".
3335 (-flto): Remove duplicate "the".
3336 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3337 duplicate "v5.00.b".
3338 (MSP430 Options): Remove duplicate "and" from the description
3339 of "-mgprel-sec=regexp".
3340 (x86 Options): Remove duplicate copies of "vmldLog102" and
3341 vmlsLog104 from description of "-mveclibabi=type".
3342
3343 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3344
3345 * internal-fn.h (first_commutative_argument): Declare.
3346 * internal-fn.c (first_commutative_argument): New function.
3347 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3348 restrictions for pattern statements. Use first_commutative_argument
3349 to look for commutative operands in calls to internal functions.
3350
3351 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3352
3353 * Makefile.in (wide-int-range.o): New.
3354 * tree-vrp.c: Move all the wide_int_* functions to...
3355 * wide-int-range.cc: ...here.
3356 * tree-vrp.h: Move all the wide_int_* prototypes to...
3357 * wide-int-range.h: ...here.
3358
3359 2018-08-03 Tom de Vries <tdevries@suse.de>
3360
3361 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3362 UI_NONE.
3363 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3364 * except.c (output_function_exception_table): Do early exit if
3365 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3366
3367 2018-08-03 Martin Liska <mliska@suse.cz>
3368
3369 * predict.c (dump_prediction): Change to 2 digits
3370 in fraction part.
3371
3372 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3373
3374 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3375 neon_dup_q to...
3376 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3377
3378 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3379
3380 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3381 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3382 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3383 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3384 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3385
3386 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3387
3388 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3389 pp_take_prefix when saving the existing prefix.
3390 * diagnostic.c (diagnostic_append_note): Likewise.
3391 * langhooks.c (lhd_print_error_function): Likewise.
3392 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3393 param's type. Free the existing prefix.
3394 (pp_take_prefix): New function.
3395 (pretty_printer::pretty_printer): Drop the prefix parameter.
3396 Rename the length parameter to match the comment.
3397 (pretty_printer::~pretty_printer): Free the prefix.
3398 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3399 parameter.
3400 (struct pretty_printer): Drop the "const" from "prefix" field's
3401 type and clarify memory management.
3402 (pp_set_prefix): Drop the "const" from the 2nd param.
3403 (pp_take_prefix): New decl.
3404
3405 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3406
3407 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3408 for word_mode_ok here instead of passing as argument.
3409 (expand_block_compare): Change select_block_compare_mode() call.
3410 (expand_strncmp_gpr_sequence): New function.
3411 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3412
3413 2018-08-02 Jeff Law <law@redhat.com>
3414
3415 PR target/86790
3416 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3417 Define to speculation_safe_value_not_needed.
3418
3419 PR target/86784
3420 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3421 Define to speculation_safe_value_not_needed.
3422
3423 2018-08-02 Tom de Vries <tdevries@suse.de>
3424
3425 PR target/86660
3426 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3427 function. Return UI_TARGET unconditionally.
3428 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3429 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3430
3431 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3432
3433 * genemit.c (print_overload_test): Fix typo.
3434
3435 2018-08-02 Richard Biener <rguenther@suse.de>
3436
3437 PR tree-optimization/86816
3438 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3439 which checks for value availability before querying it.
3440 (gvn_uses_equal): Use it.
3441 (same_succ_hash): Likewise.
3442 (gimple_equal_p): Likewise.
3443
3444 2018-08-02 Nick Clifton <nickc@redhat.com>
3445
3446 PR target/86813
3447 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3448 Define to speculation_safe_value_not_needed.
3449
3450 PR target/86810
3451 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3452 Define to speculation_safe_value_not_needed.
3453
3454 PR target/86810
3455 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3456 Define to speculation_safe_value_not_needed.
3457
3458 PR target/86803
3459 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3460 Define to speculation_safe_value_not_needed.
3461
3462 PR target/86797
3463 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3464 Define to speculation_safe_value_not_needed.
3465
3466 PR target/86791
3467 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3468 Define to speculation_safe_value_not_needed.
3469
3470 PR target/86789
3471 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3472 Define to speculation_safe_value_not_needed.
3473
3474 PR target/86787
3475 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3476 Define to speculation_safe_value_not_needed.
3477
3478 PR target/86782
3479 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3480 speculation_safe_value_not_needed.
3481
3482 PR target/86781
3483 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3484 to speculation_safe_value_not_needed.
3485
3486 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3487
3488 * doc/md.texi: Expand the documentation of instruction names
3489 to mention port-local uses. Document '@' in pattern names.
3490 * read-md.h (overloaded_instance, overloaded_name): New structs.
3491 (mapping): Declare.
3492 (md_reader::handle_overloaded_name): New member function.
3493 (md_reader::get_overloads): Likewise.
3494 (md_reader::m_first_overload): New member variable.
3495 (md_reader::m_next_overload_ptr): Likewise.
3496 (md_reader::m_overloads_htab): Likewise.
3497 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3498 m_next_overload_ptr and m_overloads_htab.
3499 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3500 (get_mode_token, get_code_token, get_int_token): New functions.
3501 (map_attr_string): Add an optional argument that passes back
3502 the associated iterator.
3503 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3504 (md_reader::handle_overloaded_name, add_overload_instance): New
3505 functions.
3506 (apply_iterators): Handle '@' names. Report an error if '@'
3507 is used without iterators.
3508 (initialize_iterators): Initialize the new iterator_group fields.
3509 * genopinit.c (handle_overloaded_code_for)
3510 (handle_overloaded_gen): New functions.
3511 (main): Use them to print declarations of maybe_code_for_* and
3512 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3513 * genemit.c (print_overload_arguments, print_overload_test)
3514 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3515 (main): Use it to print definitions of maybe_code_for_* and
3516 maybe_gen_* functions.
3517 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3518 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3519 instead of explicit mode checks.
3520 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3521 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3522 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3523 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3524 (aarch64_expand_compare_and_swap): Likewise
3525 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3526 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3527 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3528 (aarch64_constant_pool_reload_icode): Delete.
3529 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3530 instead of aarch64_constant_pool_reload_icode. Use
3531 code_for_aarch64_reload_mov instead of explicit mode checks.
3532 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3533 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3534 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3535 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3536 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3537 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3538 (aarch64_atomic_load_op_code): Delete.
3539 (aarch64_emit_atomic_load_op): Likewise.
3540 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3541 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3542 instead of aarch64_emit_atomic_load_op.
3543 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3544 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3545 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3546 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3547 character before the pattern name.
3548 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3549 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3550 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3551 (aarch64_frecps<mode>): Likewise.
3552 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3553 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3554 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3555 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3556 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3557
3558 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3559
3560 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3561 Allow HFmode constants if TARGET_FP_F16INST.
3562
3563 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3564
3565 PR target/86014
3566 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3567 No longer check last store for clobber of address register.
3568
3569 2018-08-02 Martin Liska <mliska@suse.cz>
3570
3571 PR gcov-profile/86817
3572 * gcov.c (process_all_functions): New function.
3573 (main): Call it.
3574 (process_file): Move functions processing to
3575 process_all_functions.
3576
3577 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3578
3579 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3580 "const" to the "gimple *" and "rtx_insn *" parameters.
3581 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3582 Likewise.
3583 (dump_location_t::dump_location_t): Likewise.
3584
3585 2018-08-01 Martin Sebor <msebor@redhat.com>
3586
3587 PR tree-optimization/86650
3588 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3589 rather than a "gcall *". Directly pass the data of interest
3590 to percent_K_format, rather than building a temporary CALL_EXPR
3591 to hold it.
3592 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3593 (gimple_fold_builtin_strncat): Adjust.
3594 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3595 gcall* argument with gimple*.
3596 * gimple-ssa-warn-restrict.c (check_call): Same.
3597 (wrestrict_dom_walker::before_dom_children): Same.
3598 (builtin_access::builtin_access): Same.
3599 (check_bounds_or_overlap): Same
3600 (maybe_diag_overlap): Same.
3601 (maybe_diag_offset_bounds): Same.
3602 * tree-diagnostic.c (default_tree_printer): Move usage of
3603 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3604 to this callsite.
3605 * tree-pretty-print.c (percent_K_format): Add argument.
3606 * tree-pretty-print.h: Add argument.
3607 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3608 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3609 (maybe_diag_stxncpy_trunc): Same.
3610 (handle_builtin_stxncpy): Same.
3611 (handle_builtin_strcat): Same.
3612
3613 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3614
3615 * match.pd: Optimise pointer range checks.
3616
3617 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3618
3619 PR tree-optimization/86758
3620 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3621 to remove pattern statements.
3622
3623 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3624
3625 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3626 result of dfs_enumerate_from when constructing stmt_vec_infos,
3627 instead of additionally calling get_loop_body.
3628
3629 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3630
3631 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3632 parameter.
3633 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3634 When creating an iv, assert that the step is not known to be zero.
3635 (vect_setup_realignment): Update call accordingly.
3636 * tree-vect-stmts.c (vectorizable_store): Likewise.
3637 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3638
3639 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3640
3641 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3642 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3643 (vectorizable_reduction): Likewise.
3644 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3645 (vect_detect_hybrid_slp_stmts): Likewise.
3646 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3647
3648 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3649
3650 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3651 (wide_int_set_zero_nonzero_bits): ...this.
3652 (zero_nonzero_bits_from_vr): Rename to...
3653 (vrp_set_zero_nonzero_bits): ...this.
3654 (extract_range_from_multiplicative_op_1): Abstract wide int
3655 code...
3656 (wide_int_range_multiplicative_op): ...here.
3657 (extract_range_from_binary_expr_1): Extract wide int binary
3658 operations into their own functions.
3659 (wide_int_range_lshift): New.
3660 (wide_int_range_can_optimize_bit_op): New.
3661 (wide_int_range_shift_undefined_p): New.
3662 (wide_int_range_bit_xor): New.
3663 (wide_int_range_bit_ior): New.
3664 (wide_int_range_bit_and): New.
3665 (wide_int_range_trunc_mod): New.
3666 (extract_range_into_wide_ints): New.
3667 (vrp_shift_undefined_p): New.
3668 (extract_range_from_multiplicative_op): New.
3669 (vrp_can_optimize_bit_op): New.
3670 * tree-vrp.h (value_range::dump): New.
3671 (wide_int_range_multiplicative_op): New.
3672 (wide_int_range_lshift):New.
3673 (wide_int_range_shift_undefined_p): New.
3674 (wide_int_range_bit_xor): New.
3675 (wide_int_range_bit_ior): New.
3676 (wide_int_range_bit_and): New.
3677 (wide_int_range_trunc_mod): New.
3678 (zero_nonzero_bits_from_bounds): Rename to...
3679 (wide_int_set_zero_nonzero_bits): ...this.
3680 (zero_nonzero_bits_from_vr): Rename to...
3681 (vrp_set_zero_nonzero_bits): ...this.
3682 (range_easy_mask_min_max): Rename to...
3683 (wide_int_range_can_optimize_bit_op): this.
3684 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3685 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3686
3687 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3688
3689 * tree-vectorizer.h (vect_orig_stmt): New function.
3690 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3691 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3692 (vect_create_epilog_for_reduction): Likewise.
3693 (vectorizable_live_operation): Likewise.
3694 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3695 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3696 * tree-vect-stmts.c (vectorizable_call): Likewise.
3697 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3698
3699 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3700
3701 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3702 argument.
3703 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3704 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3705 (vect_transform_loop): Likewise.
3706 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3707
3708 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3709
3710 * tree-vectorizer.h (vect_schedule_slp): Return void.
3711 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3712 (vect_schedule_slp): Likewise.
3713
3714 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3715
3716 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3717 argument.
3718 (vect_transform_loop): Update calls accordingly. Schedule SLP
3719 instances before the main loop, if any exist.
3720
3721 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3722
3723 PR tree-optimization/86749
3724 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3725 If the lhs is used in a COND_EXPR, check that it is being used
3726 as the "then" or "else" value.
3727
3728 2018-08-01 Tom de Vries <tdevries@suse.de>
3729
3730 PR target/86800
3731 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3732 speculation_safe_value_not_needed.
3733
3734 2018-08-01 Richard Biener <rguenther@suse.de>
3735
3736 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3737 as base and offset.
3738
3739 2018-08-01 Martin Liska <mliska@suse.cz>
3740
3741 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3742 format how successful transformation is dumped.
3743 (gimple_mod_pow2_value_transform): Likewise.
3744 (gimple_mod_subtract_transform): Likewise.
3745 (gimple_stringops_transform): Likewise.
3746
3747 2018-08-01 Martin Liska <mliska@suse.cz>
3748
3749 PR value-prof/35543
3750 * value-prof.c (interesting_stringop_to_profile_p):
3751 Simplify the code and add BUILT_IN_MEMMOVE.
3752 (gimple_stringops_transform): Likewise.
3753
3754 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3755
3756 * config/aarch64/aarch64-simd.md
3757 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3758 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3759 use GPI iterator instead of SI mode.
3760
3761 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3762
3763 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3764 rs6000_speculation_barrier.
3765 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3766 new barrier pattern name.
3767
3768 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3769
3770 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3771 (speculation_barrier): New insn.
3772
3773 2018-08-01 Richard Biener <rguenther@suse.de>
3774
3775 PR bootstrap/86724
3776 * graphite.h: Include isl/id.h and isl/space.h to allow build
3777 with ISL 0.20.
3778
3779 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3780
3781 PR target/86651
3782 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3783 mode for COFF targets.
3784 * defaults.h (TARGET_COFF): Define.
3785 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3786 TARGET_COFF): Define.
3787 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3788 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3789 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3790
3791 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3792
3793 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3794 * gimple-streamer-out.c (output_bb): Save it.
3795 * lto-streamer-in.c (input_struct_function_base): Restore
3796 instance discriminator if available. Create map on demand.
3797 * lto-streamer-out.c (output_struct_function_base): Save it if
3798 available.
3799 * final.c (decl_to_instance_map): Document LTO strategy.
3800
3801 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3802 Olivier Hainque <hainque@adacore.com>
3803
3804 * debug.h (decl_to_instance_map_t): New type.
3805 (decl_to_instance_map): Declare.
3806 (maybe_create_decl_to_instance_map): New inline function.
3807 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3808 to track basic block discriminators.
3809 (final_start_function_1): Initialize them.
3810 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3811 bb_discriminator.
3812 (decl_to_instance_map): New variable.
3813 (map_decl_to_instance, maybe_set_discriminator): New functions.
3814 (notice_source_line): Set discriminator.
3815
3816 2018-07-31 Ian Lance Taylor <iant@golang.org>
3817
3818 * targhooks.c (default_have_speculation_safe_value): Add
3819 ATTRIBUTE_UNUSED.
3820
3821 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3822
3823 * dump-context.h: Include "pretty-print.h".
3824 (dump_context::refresh_dumps_are_enabled): New decl.
3825 (dump_context::emit_item): New decl.
3826 (class dump_context): Add fields "m_test_pp" and
3827 "m_test_pp_flags".
3828 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3829 (temp_dump_context::get_dumped_text): New decl.
3830 (class temp_dump_context): Add field "m_pp".
3831 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3832 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3833 m_test_pp.
3834 (set_dump_file): Update for above change.
3835 (set_alt_dump_file): Likewise.
3836 (dump_loc): New overload, taking a pretty_printer *.
3837 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3838 to any test pretty-printer.
3839 (make_item_for_dump_gimple_stmt): New function, adapted from
3840 optinfo::add_gimple_stmt.
3841 (dump_context::dump_gimple_stmt): Call it, and use the result,
3842 eliminating the direct usage of dump_file and alt_dump_file in
3843 favor of indirectly using them via emit_item.
3844 (make_item_for_dump_gimple_expr): New function, adapted from
3845 optinfo::add_gimple_expr.
3846 (dump_context::dump_gimple_expr): Call it, and use the result,
3847 eliminating the direct usage of dump_file and alt_dump_file in
3848 favor of indirectly using them via emit_item.
3849 (make_item_for_dump_generic_expr): New function, adapted from
3850 optinfo::add_tree.
3851 (dump_context::dump_generic_expr): Call it, and use the result,
3852 eliminating the direct usage of dump_file and alt_dump_file in
3853 favor of indirectly using them via emit_item.
3854 (make_item_for_dump_printf_va): New function, adapted from
3855 optinfo::add_printf_va.
3856 (make_item_for_dump_printf): New function.
3857 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3858 and use the result, eliminating the direct usage of dump_file and
3859 alt_dump_file in favor of indirectly using them via emit_item.
3860 (make_item_for_dump_dec): New function.
3861 (dump_context::dump_dec): Call it, and use the result,
3862 eliminating the direct usage of dump_file and alt_dump_file in
3863 favor of indirectly using them via emit_item.
3864 (make_item_for_dump_symtab_node): New function, adapted from
3865 optinfo::add_symtab_node.
3866 (dump_context::dump_symtab_node): Call it, and use the result,
3867 eliminating the direct usage of dump_file and alt_dump_file in
3868 favor of indirectly using them via emit_item.
3869 (dump_context::begin_scope): Reimplement, avoiding direct usage
3870 of dump_file and alt_dump_file in favor of indirectly using them
3871 via emit_item.
3872 (dump_context::emit_item): New member function.
3873 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3874 Set up test pretty-printer on the underlying context. Call
3875 refresh_dumps_are_enabled.
3876 (temp_dump_context::~temp_dump_context): Call
3877 refresh_dumps_are_enabled.
3878 (temp_dump_context::get_dumped_text): New member function.
3879 (selftest::verify_dumped_text): New function.
3880 (ASSERT_DUMPED_TEXT_EQ): New macro.
3881 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3882 and then without optinfo enabled. Add uses of
3883 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3884 * dumpfile.h: Update comment for the dump_* API.
3885 * optinfo-emit-json.cc
3886 (selftest::test_building_json_from_dump_calls): Update for new
3887 param for temp_dump_context ctor.
3888 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3889 and "m_owned" field.
3890 (optinfo_item::~optinfo_item): Likewise.
3891 (optinfo::add_item): New member function.
3892 (optinfo::emit): Update comment.
3893 (optinfo::add_string): Delete.
3894 (optinfo::add_printf): Delete.
3895 (optinfo::add_printf_va): Delete.
3896 (optinfo::add_gimple_stmt): Delete.
3897 (optinfo::add_gimple_expr): Delete.
3898 (optinfo::add_tree): Delete.
3899 (optinfo::add_symtab_node): Delete.
3900 (optinfo::add_dec): Delete.
3901 * optinfo.h (class dump_context): New forward decl.
3902 (optinfo::add_item): New decl.
3903 (optinfo::add_string): Delete.
3904 (optinfo::add_printf): Delete.
3905 (optinfo::add_printf_va): Delete.
3906 (optinfo::add_gimple_stmt): Delete.
3907 (optinfo::add_gimple_expr): Delete.
3908 (optinfo::add_tree): Delete.
3909 (optinfo::add_symtab_node): Delete.
3910 (optinfo::add_dec): Delete.
3911 (optinfo::add_poly_int): Delete.
3912 (optinfo_item::optinfo_item): Remove "owned" param.
3913 (class optinfo_item): Remove field "m_owned".
3914
3915 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3916
3917 PR middle-end/86705
3918 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3919 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3920 requested variable alignment.
3921 (expand_one_ssa_partition): Likewise.
3922 (expand_one_var): Likewise.
3923
3924 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3925
3926 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3927 to speculation_safe_value_not_needed.
3928
3929 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3930
3931 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3932 * targhooks.c (speculation_safe_value_not_needed): New function.
3933 * target.def (have_speculation_safe_value): Update documentation.
3934 * doc/tm.texi: Regenerated.
3935
3936 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3937
3938 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3939 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3940 expand.
3941 (despeculate_copy<ALLI:mode>_insn): New insn.
3942 (despeculate_copyti_insn): New insn.
3943 (despeculate_simple<ALLI:mode>): New insn
3944 (despeculate_simpleti): New insn.
3945 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3946 function.
3947 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3948 aarch64_speculation_safe_value.
3949 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3950
3951 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3952
3953 * config/aarch64/aarch64-speculation.cc: New file.
3954 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3955 before pass_reorder_blocks.
3956 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3957 prototype.
3958 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3959 X14 and X15 when tracking speculation.
3960 * config/aarch64/aarch64.md (register name constants): Add
3961 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3962 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3963 (speculation_barrier): New insn attribute.
3964 (cmp<mode>): Allow SP in comparisons.
3965 (speculation_tracker): New insn.
3966 (speculation_barrier): Add speculation_barrier attribute.
3967 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3968 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3969 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3970
3971 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3972
3973 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3974 aarch64_track_speculation is true.
3975 (tb<optab><mode>1): Likewise.
3976 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3977 generate CB[N]Z when tracking speculation.
3978 (aarch64_split_compare_and_swap): Likewise.
3979 (aarch64_split_atomic_op): Likewise.
3980
3981 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3982
3983 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3984
3985 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3986
3987 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3988 (speculation_barrier): New insn.
3989
3990 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3991
3992 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3993 * config/arm/arm.md (speculation_barrier): New expand.
3994 (speculation_barrier_insn): New pattern.
3995
3996 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3997
3998 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3999 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
4000 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
4001 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
4002 list.
4003 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
4004 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
4005 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
4006 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
4007 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
4008 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
4009 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
4010 * builtins.c (expand_speculation_safe_value): New function.
4011 (expand_builtin): Call it.
4012 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
4013 * doc/extend.texi: Document __builtin_speculation_safe_value.
4014 * doc/md.texi: Document "speculation_barrier" pattern.
4015 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
4016 TARGET_HAVE_SPECULATION_SAFE_VALUE.
4017 * doc/tm.texi: Regenerated.
4018 * target.def (have_speculation_safe_value, speculation_safe_value): New
4019 hooks.
4020 * targhooks.c (default_have_speculation_safe_value): New function.
4021 (default_speculation_safe_value): New function.
4022 * targhooks.h (default_have_speculation_safe_value): Add prototype.
4023 (default_speculation_safe_value): Add prototype.
4024
4025 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4026
4027 * dump-context.h (dump_context::dump_loc): New decl.
4028 * dumpfile.c (dump_context::dump_loc): New member function.
4029 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
4030 and dump_gimple_stmt.
4031 (dump_context::dump_gimple_expr_loc): Likewise, using
4032 dump_gimple_expr.
4033 (dump_context::dump_generic_expr_loc): Likewise, using
4034 dump_generic_expr.
4035 (dump_context::dump_printf_loc_va): Likewise, using
4036 dump_printf_va.
4037 (dump_context::begin_scope): Explicitly using the global function
4038 "dump_loc", rather than the member function.
4039
4040 2018-07-31 Martin Sebor <msebor@redhat.com>
4041
4042 PR tree-optimization/86741
4043 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
4044
4045 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
4046
4047 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
4048 depend on whether prefetch instructions will be emitted or not.
4049 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
4050 will be emitted or not.
4051 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
4052 (TARGET_SETMEM_PFD): New macros.
4053
4054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4055
4056 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
4057 (NULL_STMT_VEC_INFO): Delete.
4058 (stmt_vec_info::operator*): Likewise.
4059 (stmt_vec_info::operator gimple *): Likewise.
4060 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
4061 of NULL_STMT_VEC_INFO.
4062 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4063 (vect_reassociating_reduction_p): Likewise.
4064 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4065 (vectorizable_store): Likewise.
4066 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
4067 (vec_info::free_stmt_vec_infos): Likewise.
4068
4069 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4070
4071 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4072 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
4073
4074 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4075
4076 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4077 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4078 (vec_info::free_stmt_vec_info): New private member functions.
4079 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
4080 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
4081 * tree-parloops.c (gather_scalar_reductions): Remove calls to
4082 set_stmt_vec_info_vec and free_stmt_vec_infos.
4083 * tree-vect-loop.c (_loop_vec_info): Remove call to
4084 set_stmt_vec_info_vec.
4085 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
4086 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
4087 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
4088 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
4089 (vec_info::free_stmt_vec_info): ...these new functions. Remove
4090 assignments in {vec_info::,}new_stmt_vec_info that are redundant
4091 with the clearing in the xcalloc.
4092 (stmt_vec_info_vec): Delete.
4093 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
4094 (vectorize_loops): Likewise.
4095 (vec_info::~vec_info): Remove argument from call to
4096 free_stmt_vec_infos.
4097 (vec_info::add_stmt): Remove vinfo argument from call to
4098 new_stmt_vec_info.
4099
4100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4101
4102 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
4103 rather than a gimple stmt.
4104 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
4105 information for pattern statements when passed the original
4106 statement; instead wait to be passed the pattern statement itself.
4107 Don't call set_vinfo_for_stmt here.
4108 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
4109 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
4110 stmt_vec_infos here.
4111 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
4112 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
4113 stmt_vec_infos entry.
4114
4115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4116
4117 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
4118 * tree-vectorizer.c (vec_info::replace_stmt): New function.
4119 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
4120 * tree-vect-stmts.c (vectorizable_call): Likewise.
4121 (vectorizable_simd_clone_call): Likewise.
4122
4123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4124
4125 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
4126 * tree-vectorizer.c (vec_info::remove_stmt): New function.
4127 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
4128 * tree-vect-loop.c (vect_transform_loop): Likewise.
4129 * tree-vect-slp.c (vect_schedule_slp): Likewise.
4130 * tree-vect-stmts.c (vect_remove_stores): Likewise.
4131
4132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4133
4134 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
4135 (vect_dr_stmt): Delete.
4136 * tree-vectorizer.c (vec_info::lookup_dr): New function.
4137 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
4138 of DR_VECT_AUX.
4139 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
4140 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
4141 (vect_verify_datarefs_alignment, vect_peeling_supportable)
4142 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4143 (vect_analyze_data_refs): Likewise.
4144 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
4145 argument.
4146 (vect_find_same_alignment_drs): Likewise.
4147 (vect_slp_analyze_node_dependences): Update calls accordingly.
4148 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4149 instead of DR_VECT_AUX.
4150 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
4151 of a vector data references. Use vec_info::lookup_dr instead of
4152 DR_VECT_AUX.
4153 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
4154 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
4155 instead of DR_VECT_AUX.
4156
4157 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4158
4159 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
4160 dr_vec_info.
4161 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4162 accordingly.
4163 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4164 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4165 (vect_gen_prolog_loop_niters): Likewise.
4166
4167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4168
4169 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
4170 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
4171 (vect_known_alignment_in_bytes, vect_dr_behavior)
4172 (vect_get_scalar_dr_size): Take references as dr_vec_infos
4173 instead of data_references. Update calls to other routines for
4174 which the same change has been made.
4175 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
4176 dr_vec_infos instead of stmt_vec_infos.
4177 (vect_analyze_data_ref_dependence): Update call accordingly.
4178 (vect_slp_analyze_data_ref_dependence)
4179 (vect_record_base_alignments): Use DR_VECT_AUX.
4180 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
4181 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
4182 (vector_alignment_reachable_p, vect_get_data_access_cost)
4183 (vect_peeling_supportable, vect_analyze_group_access_1)
4184 (vect_analyze_group_access, vect_analyze_data_ref_access)
4185 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
4186 (vect_compile_time_alias, vect_small_gap_p)
4187 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
4188 (vect_supportable_dr_alignment): Take references as dr_vec_infos
4189 instead of data_references. Update calls to other routines for
4190 which the same change has been made.
4191 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
4192 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4193 (vect_slp_analyze_and_verify_node_alignment)
4194 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
4195 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4196 (vect_setup_realignment): Use dr_vec_infos. Update calls after
4197 above changes.
4198 (_vect_peel_info::dr): Replace with...
4199 (_vect_peel_info::dr_info): ...this new field.
4200 (vect_peeling_hash_get_most_frequent)
4201 (vect_peeling_hash_choose_best_peeling): Update accordingly.
4202 (vect_peeling_hash_get_lowest_cost):
4203 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4204 routines for which the same change has been made.
4205 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4206 data_reference.
4207 * tree-vect-loop-manip.c (get_misalign_in_elems)
4208 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4209 above changes.
4210 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4211 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4212 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4213 (get_group_load_store_type, get_negative_load_store_type)
4214 (vect_get_data_ptr_increment, vectorizable_store)
4215 (vectorizable_load): Likewise.
4216 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4217 Update calls to other routines for which the same change has been made.
4218
4219 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4220
4221 * tree-vectorizer.h (vec_info::move_dr): New member function.
4222 (dataref_aux): Rename to...
4223 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4224 (_stmt_vec_info::dr_aux): Update accordingly.
4225 (_stmt_vec_info::data_ref_info): Delete.
4226 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4227 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4228 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4229 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4230 of data_ref.
4231 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4232 (STMT_VINFO_DR_INFO): New macro.
4233 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4234 (set_dr_misalignment): Update after rename of dataref_aux.
4235 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4236 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4237 initialization of STMT_VINFO_DATA_REF.
4238 * tree-vectorizer.c (vec_info::move_dr): New function.
4239 * tree-vect-patterns.c (vect_recog_bool_pattern)
4240 (vect_recog_mask_conversion_pattern)
4241 (vect_recog_gather_scatter_pattern): Use it.
4242 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4243 the "dr" and "stmt" fields of dr_vec_info instead of
4244 STMT_VINFO_DATA_REF.
4245
4246 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4247
4248 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4249 (is_pattern_stmt_p): Use it.
4250 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4251 on pattern statements.
4252
4253 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4254
4255 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4256 original stmt as a stmt_vec_info rather than a gimple stmt.
4257 (vect_pattern_recog_1): Take the statement directly as a
4258 stmt_vec_info, rather than via a gimple_stmt_iterator.
4259 Update call to vect_mark_pattern_stmts.
4260 (vect_pattern_recog): Update calls accordingly.
4261
4262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4263
4264 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4265 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4266 a vect_def_type for the first argument.
4267 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4268 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4269 operand if it isn't defined by a vectorized statement.
4270 (vect_build_gather_load_calls): Remove the mask_dt argument and
4271 update calls to vect_get_vec_def_for_stmt_copy.
4272 (vectorizable_bswap): Likewise the dt argument.
4273 (vectorizable_call): Update calls to vectorizable_bswap and
4274 vect_get_vec_def_for_stmt_copy.
4275 (vectorizable_simd_clone_call, vectorizable_assignment)
4276 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4277 (vectorizable_comparison): Update calls to
4278 vect_get_vec_def_for_stmt_copy.
4279 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4280 vect_is_simple_use.
4281 (vect_get_loop_based_defs): Remove dt argument and update call
4282 to vect_get_vec_def_for_stmt_copy.
4283 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4284 and vect_get_vec_def_for_stmt_copy.
4285 (vectorizable_load): Update calls to vect_build_gather_load_calls
4286 and vect_get_vec_def_for_stmt_copy.
4287 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4288 (vectorizable_reduction, vectorizable_live_operation): Update calls
4289 to vect_get_vec_def_for_stmt_copy.
4290
4291 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4292
4293 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4294 and gimple stmt arguments with a stmt_vec_info.
4295 (vect_record_base_alignments): Update calls accordingly.
4296 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4297 and gimple stmt arguments with a stmt_vec_info.
4298 (vect_build_slp_tree_1): Remove vinfo argument and update call
4299 to vect_record_max_nunits.
4300 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4301 and vect_record_max_nunits.
4302
4303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4304
4305 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4306 file and take a stmt_vec_info instead of a gimple stmt.
4307 (supportable_widening_operation, vect_finish_replace_stmt)
4308 (vect_finish_stmt_generation, vect_get_store_rhs)
4309 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4310 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4311 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4312 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4313 (vect_create_data_ref_ptr, bump_vector_ptr)
4314 (vect_permute_store_chain, vect_setup_realignment)
4315 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4316 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4317 (vectorizable_reduction, vectorizable_induction)
4318 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4319 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4320 than gimple stmts as arguments.
4321 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4322 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4323 (can_group_stmts_p, vect_check_gather_scatter)
4324 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4325 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4326 (vect_permute_load_chain, vect_shift_permute_load_chain)
4327 (vect_transform_grouped_load)
4328 (vect_record_grouped_load_vectors): Likewise.
4329 * tree-vect-loop.c (vect_fixup_reduc_chain)
4330 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4331 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4332 (vectorizable_reduction, vectorizable_induction)
4333 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4334 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4335 (vect_get_load_store_mask): Likewise.
4336 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4337 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4338 * tree-vect-stmts.c (vect_mark_relevant)
4339 (is_simple_and_all_uses_invariant)
4340 (exist_non_indexing_operands_for_use_p, process_use)
4341 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4342 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4343 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4344 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4345 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4346 (get_negative_load_store_type, get_load_store_type)
4347 (vect_check_load_store_mask, vect_check_store_rhs)
4348 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4349 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4350 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4351 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4352 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4353 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4354 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4355 (supportable_widening_operation): Likewise.
4356
4357 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4358
4359 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4360 a stmt_vec_info instead of a gcall.
4361 (vect_check_gather_scatter): Update call accordingly.
4362 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4363 of a gphi.
4364 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4365 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4366 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4367 instead of a gimple stmt.
4368 (vect_transform_loop): Update calls accordingly.
4369 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4370 stmt_vec_infos instead of gimple stmts.
4371 (vect_analyze_slp_instance): Update use accordingly.
4372 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4373 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4374 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4375 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4376 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4377 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4378 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4379 down to subroutines.
4380
4381 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4382
4383 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4384 of the worklist from a vector of gimple stmts to a vector of
4385 stmt_vec_infos.
4386 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4387 (vect_mark_stmts_to_be_vectorized): Likewise
4388
4389 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4390
4391 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4392 statement before passing it to vect_analyze_stmt.
4393 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4394 the chain of phi vector definitions. Track the exit phi via its
4395 stmt_vec_info.
4396 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4397 STMT_VINFO_REDUC_DEF.
4398 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4399 stmt_vec_infos to handle the statement chains.
4400 (vect_get_slp_defs): Record the first statement in the node
4401 using a stmt_vec_info.
4402 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4403 statements here and pass their stmt_vec_info down to subroutines.
4404 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4405 down to vect_finish_stmt_generation.
4406 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4407 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4408 stmt_vec_infos to subroutines.
4409 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4410 chains.
4411
4412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4413
4414 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4415 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4416 (vect_permute_store_chain, vect_setup_realignment)
4417 (vect_permute_load_chain, vect_shift_permute_load_chain)
4418 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4419 stmts internally, and when passing values to other vectorizer routines.
4420 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4421 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4422 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4423 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4424 (vectorizable_reduction, vectorizable_induction)
4425 (vectorizable_live_operation, vect_transform_loop_stmt)
4426 (vect_transform_loop): Likewise.
4427 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4428 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4429 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4430 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4431 (vect_slp_analyze_node_operations_1): Likewise.
4432 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4433 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4434 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4435 (vect_finish_stmt_generation_1, get_group_load_store_type)
4436 (get_load_store_type, vect_build_gather_load_calls)
4437 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4438 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4439 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4440 (vectorizable_store, vectorizable_load, vectorizable_condition)
4441 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4442 (supportable_widening_operation): Likewise.
4443 (vect_get_vector_types_for_stmt): Likewise.
4444 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4445
4446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4447
4448 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4449 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4450 (vect_permute_store_chain, vect_permute_load_chain)
4451 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4452 repeated stmt_vec_info lookups.
4453 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4454 (vect_update_ivs_after_vectorizer): Likewise.
4455 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4456 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4457 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4458 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4459 (vect_bb_slp_scalar_cost): Likewise.
4460 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4461
4462 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4463
4464 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4465 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4466 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4467 to get gassigns and gcalls, rather than operating on generc gimple
4468 stmts.
4469 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4470 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4471 (vectorizable_load, vect_analyze_stmt): Likewise.
4472 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4473
4474 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4475
4476 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4477 return stmt_vec_infos rather than gimple stmts. Do not accept
4478 null arguments.
4479 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4480 of a gimple stmt.
4481 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4482 Update use of get_later_stmt.
4483 (vect_get_constant_vectors): Update call accordingly.
4484 (vect_schedule_slp_instance): Likewise
4485 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4486 (vect_slp_analyze_instance_dependence): Likewise.
4487 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4488
4489 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4490
4491 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4492 (stmt_info_for_cost::stmt_info): ...this new field.
4493 (add_stmt_costs): Update accordingly.
4494 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4495 (vect_get_known_peeling_cost): Likewise.
4496 (vect_estimate_min_profitable_iters): Likewise.
4497 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4498
4499 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4500
4501 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4502 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4503 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4504 accordingly.
4505 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4506
4507 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4508
4509 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4510 a gimple stmt to a stmt_vec_info.
4511 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4512
4513 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4514
4515 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4516 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4517 (_loop_vec_info::reduction_chains): Likewise.
4518 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4519 accordingly.
4520 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4521
4522 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4523
4524 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4525 a gimple stmt to a stmt_vec_info.
4526 (_stmt_vec_info::next_element): Likewise.
4527 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4528 (vect_slp_analyze_and_verify_node_alignment)
4529 (vect_analyze_group_access_1, vect_analyze_group_access)
4530 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4531 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4532 (vect_supportable_dr_alignment): Update accordingly.
4533 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4534 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4535 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4536 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4537 * tree-vect-slp.c (vect_build_slp_tree_1)
4538 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4539 (vect_split_slp_store_group, vect_analyze_slp_instance)
4540 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4541 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4542 (get_group_load_store_type, get_load_store_type)
4543 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4544 (vect_transform_stmt, vect_remove_stores): Likewise.
4545
4546 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4547
4548 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4549 than a gimple stmt.
4550 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4551 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4552 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4553 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4554 (vector_alignment_reachable_p, vect_get_data_access_cost)
4555 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4556 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4557 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4558 (vect_analyze_group_access_1, vect_analyze_group_access)
4559 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4560 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4561 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4562 result of vect_dr_stmt and use the stmt_vec_info instead of
4563 the associated gimple stmt.
4564 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4565 (vect_gen_prolog_loop_niters): Likewise.
4566 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4567
4568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4569
4570 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4571 to a vec<stmt_vec_info>.
4572 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4573 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4574 vec<stmt_vec_info>.
4575 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4576 to a vec<stmt_vec_info>.
4577 (bst_traits::value_type, bst_traits::value_type): Likewise.
4578 (bst_traits::hash): Update accordingly.
4579 (vect_get_and_check_slp_defs): Change the stmts parameter from
4580 a vec<gimple *> to a vec<stmt_vec_info>.
4581 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4582 (vect_build_slp_tree): Likewise.
4583 (vect_build_slp_tree_2): Likewise. Update uses of
4584 SLP_TREE_SCALAR_STMTS.
4585 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4586 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4587 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4588 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4589 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4590 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4591 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4592 (vect_get_constant_vectors, vect_get_slp_defs)
4593 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4594 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4595 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4596 instead of gimple stmts.
4597 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4598 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4599 (vect_slp_analyze_instance_dependence): Update uses of
4600 SLP_TREE_SCALAR_STMTS.
4601 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4602 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4603 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4604 (get_initial_defs_for_reduction): Likewise.
4605 (vect_create_epilog_for_reduction): Likewise.
4606 (vectorize_fold_left_reduction): Likewise.
4607 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4608 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4609 (can_vectorize_live_stmts): Likewise.
4610
4611 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4612
4613 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4614 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4615 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4616 than gimple stmts.
4617 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4618 of a gimple stmt.
4619 (gather_scalar_reductions): Update after above interface changes.
4620 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4621 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4622 than gimple stmts.
4623 (vect_force_simple_reduction): Likewise.
4624 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4625 LOOP_VINFO_REDUCTIONS.
4626 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4627
4628 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4629
4630 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4631 a gimple stmt to a stmt_vec_info.
4632 * tree-vect-loop.c (vect_active_double_reduction_p)
4633 (vect_force_simple_reduction, vectorizable_reduction): Update
4634 accordingly.
4635
4636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4637
4638 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4639 vec<gimple *> to a vec<stmt_vec_info>.
4640 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4641 the reduction_phis argument from a vec<gimple *> to a
4642 vec<stmt_vec_info>.
4643 (vectorizable_reduction): Likewise the phis local variable that
4644 is passed to vect_create_epilog_for_reduction. Update for new type
4645 of SLP_TREE_VEC_STMTS.
4646 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4647 (vectorizable_live_operation): Likewise.
4648 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4649 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4650
4651 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4652
4653 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4654 a gimple stmt to a stmt_vec_info.
4655 (vectorizable_condition, vectorizable_live_operation)
4656 (vectorizable_reduction, vectorizable_induction): Pass back the
4657 vectorized statement as a stmt_vec_info.
4658 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4659 use of STMT_VINFO_VEC_STMT.
4660 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4661 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4662 as stmt_vec_infos rather than gimple stmts.
4663 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4664 to a stmt_vec_info.
4665 (vectorizable_live_operation): Likewise.
4666 (vectorizable_reduction, vectorizable_induction): Likewise,
4667 updating use of STMT_VINFO_VEC_STMT.
4668 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4669 of STMT_VINFO_VEC_STMT.
4670 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4671 (vectorizable_simd_clone_call, vectorizable_conversion)
4672 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4673 (vectorizable_store, vectorizable_load, vectorizable_condition)
4674 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4675 from a gimple stmt to a stmt_vec_info.
4676 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4677 pointer to a stmt_vec_info to the vectorizable_* routines.
4678
4679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4680
4681 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4682 a gimple stmt to a stmt_vec_info.
4683 (is_pattern_stmt_p): Update accordingly.
4684 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4685 (vect_record_grouped_load_vectors): Likewise.
4686 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4687 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4688 (vect_model_reduction_cost): Likewise.
4689 (vect_create_epilog_for_reduction): Likewise.
4690 (vectorizable_reduction, vectorizable_induction): Likewise.
4691 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4692 Return the stmt_vec_info for the pattern statement.
4693 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4694 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4695 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4696 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4697 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4698 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4699 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4700 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4701
4702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4703
4704 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4705 (vect_finish_stmt_generation): Likewise.
4706 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4707 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4708 (vect_build_gather_load_calls): Use the return value of the above
4709 functions instead of a separate call to vinfo_for_stmt. Use narrow
4710 scopes for the input gimple stmt and wider scopes for the associated
4711 stmt_vec_info. Use vec_info::lookup_def when setting these
4712 stmt_vec_infos from an SSA_NAME definition.
4713 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4714 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4715 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4716 (vectorizable_store, vectorizable_load, vectorizable_condition)
4717 (vectorizable_comparison): Likewise.
4718 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4719 (vectorizable_reduction): Likewise.
4720
4721 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4722
4723 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4724 stmt_vec_info * parameter before the optional gimple **.
4725 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4726 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4727 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4728 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4729 (vectorizable_live_operation): Likewise.
4730 * tree-vect-patterns.c (type_conversion_p): Likewise.
4731 (vect_look_through_possible_promotion): Likewise.
4732 (vect_recog_rotate_pattern): Likewise.
4733 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4734
4735 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4736
4737 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4738 a typedef to a wrapper class.
4739 (NULL_STMT_VEC_INFO): New macro.
4740 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4741 (stmt_vec_info::operator*): New function.
4742 (stmt_vec_info::operator gimple *): Likewise.
4743 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4744 (add_stmt_costs): Likewise.
4745 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4746 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4747 (vect_get_known_peeling_cost): Likewise.
4748 (vect_estimate_min_profitable_iters): Likewise.
4749 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4750 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4751 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4752 (vectorizable_store, free_stmt_vec_infos): Likewise.
4753 (new_stmt_vec_info): Change return type of xcalloc to
4754 _stmt_vec_info *.
4755
4756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4757
4758 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4759 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4760 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4761 a single_imm_use-based sequence.
4762 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4763
4764 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4765
4766 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4767 * tree-vectorizer.c (vec_info::lookup_def): New function.
4768 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4769 (vect_widened_op_tree): Likewise.
4770 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4771 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4772 (vectorizable_reduction): Likewise.
4773 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4774 of a gimple *.
4775 (vect_is_slp_reduction): Update calls accordingly. Use
4776 vec_info::lookup_def.
4777 (vect_is_simple_reduction): Likewise
4778 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4779
4780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4781
4782 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4783 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4784 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4785 of vinfo_for_stmt.
4786 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4787 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4788 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4789 (vect_is_slp_reduction, vectorizable_induction)
4790 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4791 * tree-vect-patterns.c (vect_init_pattern_stmt):
4792 (vect_determine_min_output_precision_1, vect_determine_precisions)
4793 (vect_pattern_recog): Likewise.
4794 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4795 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4796 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4797 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4798 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4799 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4800 info field from a loop to a loop_vec_info.
4801
4802 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4803
4804 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4805 (vec_info::add_stmt): Declare.
4806 * tree-vectorizer.c (vec_info::add_stmt): New function.
4807 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4808 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4809 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4810 (vectorizable_induction): Likewise.
4811 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4812 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4813 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4814 (vectorizable_load): Likewise.
4815 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4816 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4817 (vect_recog_gather_scatter_pattern): Likewise.
4818 (append_pattern_def_seq): Likewise. Remove a check that is
4819 performed by add_stmt itself.
4820
4821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4822
4823 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4824 which make_ssa_name was called with new_stmt before new_stmt
4825 had been created.
4826
4827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4828
4829 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4830 split out from...
4831 (vect_is_slp_reduction): ...here...
4832 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4833 that are already known to be false.
4834
4835 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4836
4837 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4838 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4839 STMT_VINFO_NUM_SLP_USES when it's true.
4840 (vect_free_slp_instance): Add a final_p parameter and pass it to
4841 vect_free_slp_tree.
4842 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4843 (vect_analyze_slp_instance): Likewise.
4844 (vect_slp_analyze_operations): Likewise.
4845 (vect_slp_analyze_bb_1): Likewise.
4846 * tree-vectorizer.c (vec_info): Likewise.
4847 * tree-vect-loop.c (vect_transform_loop): Likewise.
4848
4849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4850
4851 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4852 function is not called for second and subsequent members of
4853 a reduction group.
4854
4855 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4856
4857 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4858 cases for nested loops from here to ...
4859 (vect_create_epilog_for_reduction): ...here. Only call
4860 vect_is_simple_use for inner-loop reductions.
4861
4862 2018-07-31 Martin Liska <mliska@suse.cz>
4863
4864 PR gcov-profile/85338
4865 PR gcov-profile/85350
4866 PR gcov-profile/85372
4867 * profile.c (struct location_triplet): New.
4868 (struct location_triplet_hash): Likewise.
4869 (output_location): Do not output a BB that
4870 is already recorded for a line.
4871 (branch_prob): Use streamed_locations.
4872
4873 2018-07-31 Martin Liska <mliska@suse.cz>
4874
4875 PR gcov-profile/85370
4876 * coverage.c (coverage_begin_function): Do not mark target
4877 clones as artificial functions.
4878
4879 2018-07-31 Martin Liska <mliska@suse.cz>
4880
4881 PR gcov-profile/83813
4882 PR gcov-profile/84758
4883 PR gcov-profile/85217
4884 PR gcov-profile/85332
4885 * profile.c (branch_prob): Do not record GOTO expressions
4886 for GIMPLE statements which locations are already streamed.
4887
4888 2018-07-31 Olivier Hainque <hainque@adacore.com>
4889
4890 * gcc.c (handle_spec_function): Accept a soft_matched_part
4891 argument, as do_spec_1. Pass it down to ...
4892 (eval_spec_function): Accept a soft_matched_part argument,
4893 and pass it down to ...
4894 (do_spec_2): Accept a soft_matched_part argument, and pass
4895 it down to do_spec_1.
4896 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4897 (handle_braces): Update call to handle_spec_function.
4898 (driver::set_up_specs): Update calls to do_spec_2.
4899 (compare_debug_dump_opt_spec_function): Likewise.
4900 (compare_debug_self_opt_spec_function): Likewise.
4901
4902 2018-07-31 Olivier Hainque <hainque@adacore.com>
4903
4904 * common.opt (nolibc): New option.
4905 * doc/invoke.texi (Link Options): Document it.
4906 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4907 * config/alpha/linux.h: Likewise.
4908 * config/arc/elf.h: Likewise.
4909 * config/arm/uclinux-elf.h: Likewise.
4910 * config/arm/unknown-elf.h: Likewise.
4911 * config/avr/avrlibc.h: Likewise.
4912 * config/bfin/bfin.h: Likewise.
4913 * config/bfin/linux.h: Likewise.
4914 * config/bfin/uclinux.h: Likewise.
4915 * config/darwin.h: Likewise.
4916 * config/darwin10.h: Likewise.
4917 * config/darwin12.h: Likewise.
4918 * config/gnu-user.h: Likewise.
4919 * config/lm32/uclinux-elf.h: Likewise.
4920 * config/pa/pa-hpux11.h: Likewise.
4921 * config/pa/pa64-hpux.h: Likewise.
4922 * config/sparc/sparc.h: Likewise.
4923
4924 2018-07-31 Olivier Hainque <hainque@adacore.com>
4925
4926 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4927 undefined variables.
4928
4929 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4930
4931 PR target/86640
4932 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4933 instead of GEN_INT.
4934
4935 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4936
4937 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4938 terminated string literal.
4939
4940 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4941
4942 PR rtl-optimization/85160
4943 * combine.c (is_just_move): New function.
4944 (try_combine): Allow combining two instructions into two if neither of
4945 the original instructions was a move.
4946
4947 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4948
4949 PR target/86673
4950 * doc/extend.texi (Global Register Variables): Discourage use of type
4951 qualifiers.
4952 (Local Register Variables): Likewise.
4953
4954 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4955
4956 PR tree-optimization/86506
4957 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4958
4959 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4960
4961 PR target/86547
4962 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4963 hard_regno, make sure no insn between `from` and `to` clobbers it.
4964
4965 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4966 Tom de Vries <tdevries@suse.de>
4967
4968 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4969 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4970 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4971 PTX_DEFAULT_RUNTIME_DIM.
4972 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4973
4974 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4975
4976 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4977 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4978 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4979
4980 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4981
4982 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4983 used.
4984 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4985 predicate to reflect toc fusion has been deleted.
4986 (toc_fusion_mem_raw): Delete, no longer used.
4987 (toc_fusion_mem_wrapped): Likewise.
4988 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4989 fusion mask bit.
4990 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4991 Delete, no longer used.
4992 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4993 meant to be used for toc fusion.
4994 (rs6000_debug_print_mode): Delete toc fusion debugging.
4995 (rs6000_debug_reg_global): Likewise.
4996 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4997 fusion and secondary reload support that were never used.
4998 (rs6000_option_override_internal): Delete TOC fusion, that was only
4999 partially defined, and it did not work unless you also used the
5000 -mcmodel= switch.
5001 (rs6000_legitimate_address_p): Delete TOC fusion support.
5002 (rs6000_opt_masks): Likewise.
5003 (fusion_wrap_memory_address): Delete function, no longer used.
5004 (fusion_split_address); Delete TOC fusion support.
5005 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
5006 longer used with toc fusion being deleted.
5007 (TARGET_TOC_FUSION_FP): Likewise.
5008 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
5009 UNSPEC.
5010 (toc fusion spliter): Delete TOC fusion support.
5011 (toc_fusionload_<mode>): Likewise.
5012 (toc_fusionload_di): Likewise.
5013 (fusion_gpr_load_<mode>): Delete generator function, this insn no
5014 longer needs to be named. Rename predicate to delete TOC fusion.
5015 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5016 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5017 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
5018 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
5019 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
5020
5021 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
5022
5023 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
5024 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
5025 __int128 in built-in function prototypes.
5026 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
5027 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
5028
5029 2018-07-27 Martin Sebor <msebor@redhat.com>
5030
5031 PR tree-optimization/86696
5032 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
5033 types, including enums.
5034 (handle_char_store): Be prepared for the above function to fail.
5035
5036 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
5037
5038 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
5039 when optimization level is lower than 2 or optimize for size.
5040
5041 2018-07-26 Martin Sebor <msebor@redhat.com>
5042
5043 PR tree-optimization/86043
5044 PR tree-optimization/86042
5045 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
5046 (get_string_cst_length): Rename...
5047 (get_min_string_length): ...to this. Add argument.
5048 (handle_char_store): Extend to handle multi-character stores by
5049 MEM_REF.
5050 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
5051 * tree.h (initializer_zerop): Add argument.
5052
5053 2018-07-26 Jakub Jelinek <jakub@redhat.com>
5054
5055 PR middle-end/86660
5056 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
5057 declare target to variables if they have always,{to,from,tofrom} map
5058 kinds.
5059
5060 2018-07-26 Martin Liska <mliska@suse.cz>
5061
5062 PR lto/86548
5063 * lto-wrapper.c: Add linker_output as prefix
5064 for ltrans_output_file.
5065
5066 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
5067
5068 PR rtl-optimization/85805
5069 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
5070 value for hard registers if that was written in the same mode.
5071
5072 2018-07-26 Martin Liska <mliska@suse.cz>
5073
5074 PR gcov-profile/86536
5075 * gcov.c (format_gcov): Use printf format %.*f directly
5076 and do not handle special values.
5077
5078 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5079
5080 * common/config/arc/arc-common.c (arc_option_optimization_table):
5081 Update default optimizations for size.
5082
5083 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5084
5085 * config/arc/arc.md (movsf_insn): Add short instruction selection.
5086 * config/arc/constraints.md (CfZ): New constraint.
5087 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
5088 (subsf3_fpu): Likewise.
5089 (cmpsf_fpu): Likewise.
5090 (cmpsf_fpu_uneq): Likewise.
5091
5092 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5093
5094 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
5095 accesses as well.
5096 (arc_is_uncached_mem_p): uncached applies to both the variable and
5097 the pointer.
5098
5099 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
5100
5101 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
5102 register names.
5103
5104 2018-07-25 David Malcolm <dmalcolm@redhat.com>
5105
5106 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
5107 field "m_scopes" from vec to auto_vec.
5108
5109 2018-07-25 Martin Liska <mliska@suse.cz>
5110
5111 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
5112 return type.
5113
5114 2018-07-25 Richard Biener <rguenther@suse.de>
5115
5116 PR debug/86654
5117 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
5118 special wrt context_die late.
5119 (gen_subprogram_die): Re-use DIEs in local scope.
5120
5121 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
5122
5123 PR tree-optimization/86644
5124 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
5125
5126 2018-07-25 Martin Liska <mliska@suse.cz>
5127
5128 PR middle-end/86645
5129 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
5130 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
5131
5132 2018-07-25 Martin Liska <mliska@suse.cz>
5133
5134 PR sanitizer/79635
5135 * params.def: Explain ASan abbreviation and provide
5136 a documentation link.
5137
5138 2018-07-24 Martin Sebor <msebor@redhat.com>
5139
5140 PR tree-optimization/86622
5141 PR tree-optimization/86532
5142 * builtins.h (string_length): Declare.
5143 * builtins.c (c_strlen): Correct handling of non-constant offsets.
5144 (check_access): Be prepared for non-constant length ranges.
5145 (string_length): Make extern.
5146 * expr.c (string_constant): Only handle the minor non-constant
5147 array index. Use string_constant to compute the length of
5148 a generic string constant.
5149
5150 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
5151
5152 PR tree-optimization/86618
5153 * tree-vect-stmts.c (vectorizable_call): Don't take the address
5154 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
5155
5156 2018-07-24 David Malcolm <dmalcolm@redhat.com>
5157
5158 PR tree-optimization/86636
5159 * json.cc (json::object::set): Fix comment. Add assertions.
5160 (json::array::append): Move here from json.h. Add comment and an
5161 assertion.
5162 (json::string::string): Likewise.
5163 * json.h (json::array::append): Move to json.cc.
5164 (json::string::string): Likewise.
5165 * optinfo-emit-json.cc
5166 (optrecord_json_writer::impl_location_to_json): Assert that we
5167 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
5168 wrapper around it. Expand the location once, rather than three
5169 times.
5170 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
5171 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
5172 wrappers.
5173 (optrecord_json_writer::optinfo_to_json): Likewise, in four
5174 places. Fix some overlong lines.
5175
5176 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
5177
5178 * config/aarch64/aarch64-simd.md
5179 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5180 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
5181 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
5182 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
5183 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
5184 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
5185 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
5186 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
5187 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
5188
5189 2018-07-24 Jakub Jelinek <jakub@redhat.com>
5190
5191 PR middle-end/86627
5192 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
5193 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
5194 and abs_d == d, do the power of two handling if profitable.
5195
5196 2018-07-24 Richard Biener <rguenther@suse.de>
5197
5198 * match.pd: Add BIT_FIELD_REF canonicalizations.
5199
5200 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5201
5202 PR c/86617
5203 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5204
5205 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5206
5207 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5208 terminated STRING_CST object.
5209
5210 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5211
5212 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5213
5214 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5215
5216 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5217 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5218 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5219 the elements into a register.
5220 (rs6000_split_v4si_init_di_reg): Delete.
5221 (rs6000_split_v4si_init): Delete.
5222 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5223 (vsx_init_v4si): Rewrite as a define_expand.
5224
5225 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5226
5227 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5228 zero_extend argument from memory): New.
5229
5230 2018-07-22 Martin Sebor <msebor@redhat.com>
5231
5232 PR bootstrap/86621
5233 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5234 diagnosing calls with unknown arguments unless -Walloca-larger-than
5235 is restricted to less than PTRDIFF_MAX bytes.
5236
5237 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5238
5239 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5240
5241 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5242
5243 * pretty-print.c (text_info::set_location): Remove redundant
5244 "line_table" parameter from call to rich_location::set_range.
5245
5246 2018-07-20 Martin Sebor <msebor@redhat.com>
5247
5248 PR middle-end/82063
5249 * builtins.c (expand_builtin_alloca): Adjust.
5250 * calls.c (alloc_max_size): Simplify.
5251 * cgraphunit.c (cgraph_node::expand): Adjust.
5252 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5253 variables.
5254 (frame_larger_than_size): Same.
5255 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5256 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5257 Initialize.
5258 * doc/invoke.texi (GCC Command Options): Document option arguments.
5259 Explain byte-size arguments and suffixes.
5260 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5261 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5262 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5263 * doc/options.texi (UInteger): Expand.
5264 (Host_Wide_Int, ByteSize): Document new properties.
5265 * final.c (final_start_function_1): Include sizes in an error message.
5266 * function.c (frame_offset_overflow): Same.
5267 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5268 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5269 Diagnose unbounded alloca calls only for limits of less than
5270 PTRDIFF_MAX.
5271 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5272 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5273 for alloca(0).
5274 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5275 only for limits of less than PTRDIFF_MAX.
5276 * langhooks-def.h (lhd_handle_option): Change function argument
5277 to HOST_WIDE_INT.
5278 * langhooks.c (lhd_handle_option): Same.
5279 * langhooks.h (handle_option): Same.
5280 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5281 ByteSize flags.
5282 (var_type, var_type_struct): Same.
5283 (var_set): Handle ByteSize flag.
5284 * optc-gen.awk: Add comments to output to ease debugging. Make
5285 use of HOST_WIDE_INT where appropriate.
5286 * opts-gen-save.awk: Use %lx to format unsigned long.
5287 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5288 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5289 arguments. Parse bytes-size suffixes.
5290 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5291 (enum_value_to_arg): Same.
5292 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5293 (handle_option): Adjust.
5294 (generate_option): Change function argument to HOST_WIDE_INT.
5295 (cmdline_handle_error): Adjust.
5296 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5297 (set_option): Change function argument to HOST_WIDE_INT.
5298 (option_enabled): Handle cl_host_wide_int.
5299 (get_option_state): Handle CLVC_SIZE.
5300 (control_warning_option): Same.
5301 * opts.c (common_handle_option): Change function argument to
5302 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5303 OPT_Wvla_larger_than_.
5304 * opts.h (enum cl_var_type): Add an enumerator.
5305 * stor-layout.c (layout_decl): Print a more meaningful warning.
5306 * toplev.c (output_stack_usage): Adjust.
5307
5308 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5309
5310 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5311 call to inline_expand_builtin_string_cmp.
5312 (expand_builtin_strcmp): Likewise.
5313 (expand_builtin_strncmp): Likewise.
5314 (inline_string_cmp): Delete the last parameter, change char_type_node
5315 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5316 two operands.
5317 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5318 the inlining expansion on target where the type of the call has same or
5319 narrower precision than unsigned char.
5320
5321 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5322
5323 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5324 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5325 * common.opt (fsave-optimization-record): New option.
5326 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5327 * doc/invoke.texi (-fsave-optimization-record): New option.
5328 * dumpfile.c: Include "optinfo-emit-json.h".
5329 (struct kv_pair): Move to coretypes.h.
5330 (optgroup_options): Make non-static.
5331 (dump_context::end_scope): Call
5332 optimization_records_maybe_pop_dump_scope.
5333 * dumpfile.h (optgroup_options): New decl.
5334 * json.cc: New file.
5335 * json.h: New file.
5336 * optinfo-emit-json.cc: New file.
5337 * optinfo-emit-json.h: New file.
5338 * optinfo.cc: Include "optinfo-emit-json.h".
5339 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5340 (optinfo_enabled_p): Check optimization_records_enabled_p.
5341 (optinfo_wants_inlining_info_p): Likewise.
5342 * optinfo.h: Update comment.
5343 * profile-count.c (profile_quality_as_string): New function.
5344 * profile-count.h (profile_quality_as_string): New decl.
5345 (profile_count::quality): New accessor.
5346 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5347 and optinfo_emit_json_cc_tests.
5348 * selftest.h (selftest::json_cc_tests): New decl.
5349 (selftest::optinfo_emit_json_cc_tests): New decl.
5350 * toplev.c: Include "optinfo-emit-json.h".
5351 (compile_file): Call optimization_records_finish.
5352 (do_compile): Call optimization_records_start.
5353 * tree-ssa-live.c: Include optinfo.h.
5354 (remove_unused_scope_block_p): Retain inlining information if
5355 optinfo_wants_inlining_info_p returns true.
5356
5357 2018-07-20 Richard Biener <rguenther@suse.de>
5358
5359 PR debug/86585
5360 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5361 to cover -flto-partition=none.
5362
5363 2018-07-20 Martin Liska <mliska@suse.cz>
5364
5365 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5366 (get_decl_source_range): Remove unused function.
5367
5368 2018-07-20 Richard Biener <rguenther@suse.de>
5369
5370 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5371 (struct vn_phi_s): Likewise.
5372 (struct vn_reference_s): Likewise.
5373 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5374 for searching the slot of an entry known to be in the hash itself.
5375 (vn_phi_hasher::equal): Likewise.
5376 (vn_reference_hasher::equal): Likewise.
5377 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5378 globals.
5379 (optimistic_info, current_info): Remove, keeping only valid_info.
5380 (vn_reference_lookup_1): Remove fallback lookup.
5381 (vn_reference_lookup_2): Likewise.
5382 (vn_nary_op_lookup_1): Likewise.
5383 (vn_phi_lookup): Likewise.
5384 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5385 hash element.
5386 (vn_reference_insert): Adjust, chain the inserted hash element
5387 at last_inserted_ref.
5388 (vn_reference_insert_pieces): Likewise.
5389 (visit_reference_op_call): Likewise.
5390 (vn_nary_op_insert_into): Chain the inserted hash element at
5391 last_inserted_nary.
5392 (vn_nary_op_insert_pieces): Adjust.
5393 (vn_nary_op_insert): Likewise.
5394 (vn_nary_op_insert_stmt): Likewise.
5395 (vn_phi_insert): Adjust, chain the inserted hash element at
5396 last_inserted_phi.
5397 (process_scc): Remove clearing and copying the optimistic
5398 table. Instead remove elements inserted during an optimistic
5399 iteration from the single table we maintain.
5400 (init_scc_vn): Adjust.
5401 (free_scc_vn): Likewise.
5402 (sccvn_dom_walker::record_cond): Likewise.
5403 (sccvn_dom_walker::after_dom_children): Likewise.
5404
5405 2018-07-19 Martin Sebor <msebor@redhat.com>
5406
5407 PR tree-optimization/84047
5408 PR tree-optimization/83776
5409 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5410 (check_array_bounds): Call it.
5411
5412 2018-07-19 Martin Sebor <msebor@redhat.com>
5413
5414 * align.h (align_flags): Use member initialization.
5415
5416 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5417
5418 * Makefile.in (OBJS): Add optinfo.o.
5419 * coretypes.h (class symtab_node): New forward decl.
5420 (struct cgraph_node): New forward decl.
5421 (class varpool_node): New forward decl.
5422 * dump-context.h: New file.
5423 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5424 "tree-pass.h".
5425 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5426 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5427 (set_alt_dump_file): Likewise.
5428 (dump_context::~dump_context): New dtor.
5429 (dump_gimple_stmt): Move implementation to...
5430 (dump_context::dump_gimple_stmt): ...this new member function.
5431 Add the stmt to any pending optinfo, creating one if need be.
5432 (dump_gimple_stmt_loc): Move implementation to...
5433 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5434 Start a new optinfo and add the stmt to it.
5435 (dump_gimple_expr): Move implementation to...
5436 (dump_context::dump_gimple_expr): ...this new member function.
5437 Add the stmt to any pending optinfo, creating one if need be.
5438 (dump_gimple_expr_loc): Move implementation to...
5439 (dump_context::dump_gimple_expr_loc): ...this new member function.
5440 Start a new optinfo and add the stmt to it.
5441 (dump_generic_expr): Move implementation to...
5442 (dump_context::dump_generic_expr): ...this new member function.
5443 Add the tree to any pending optinfo, creating one if need be.
5444 (dump_generic_expr_loc): Move implementation to...
5445 (dump_context::dump_generic_expr_loc): ...this new member
5446 function. Add the tree to any pending optinfo, creating one if
5447 need be.
5448 (dump_printf): Move implementation to...
5449 (dump_context::dump_printf_va): ...this new member function. Add
5450 the text to any pending optinfo, creating one if need be.
5451 (dump_printf_loc): Move implementation to...
5452 (dump_context::dump_printf_loc_va): ...this new member function.
5453 Start a new optinfo and add the stmt to it.
5454 (dump_dec): Move implementation to...
5455 (dump_context::dump_dec): ...this new member function. Add the
5456 value to any pending optinfo, creating one if need be.
5457 (dump_context::dump_symtab_node): New member function.
5458 (dump_context::get_scope_depth): New member function.
5459 (dump_context::begin_scope): New member function.
5460 (dump_context::end_scope): New member function.
5461 (dump_context::ensure_pending_optinfo): New member function.
5462 (dump_context::begin_next_optinfo): New member function.
5463 (dump_context::end_any_optinfo): New member function.
5464 (dump_context::s_current): New global.
5465 (dump_context::s_default): New global.
5466 (dump_scope_depth): Delete global.
5467 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5468 (dump_symtab_node): New function.
5469 (get_dump_scope_depth): Reimplement in terms of dump_context.
5470 (dump_begin_scope): Likewise.
5471 (dump_end_scope): Likewise.
5472 (selftest::temp_dump_context::temp_dump_context): New ctor.
5473 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5474 (selftest::verify_item): New function.
5475 (ASSERT_IS_TEXT): New macro.
5476 (ASSERT_IS_TREE): New macro.
5477 (ASSERT_IS_GIMPLE): New macro.
5478 (selftest::test_capture_of_dump_calls): New test.
5479 (selftest::dumpfile_c_tests): Call it.
5480 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5481 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5482 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5483 descriptive comment.
5484 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5485 (dump_node, dump_bb): Move these unrelated decls.
5486 (class dump_manager): Add leading comment.
5487 * optinfo.cc: New file.
5488 * optinfo.h: New file.
5489
5490 2018-07-19 Michael Collison <michael.collison@arm.com>
5491 Richard Henderson <rth@redhat.com>
5492
5493 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5494 (subti): Handle op1 zero.
5495 (subvti4, usub4ti4): New.
5496 (*sub<GPI>3_compare1_imm): New.
5497 (sub<GPI>3_carryinCV): New.
5498 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5499 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5500
5501 2018-07-19 Michael Collison <michael.collison@arm.com>
5502 Richard Henderson <rth@redhat.com>
5503
5504 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5505 (addti3): Create simpler code if low part is already known to be 0.
5506 (addvti4, uaddvti4): New.
5507 (*add<GPI>3_compareC_cconly_imm): New.
5508 (*add<GPI>3_compareC_cconly): New.
5509 (*add<GPI>3_compareC_imm): New.
5510 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5511 handle constants within this pattern..
5512 (*add<GPI>3_compareV_cconly_imm): New.
5513 (*add<GPI>3_compareV_cconly): New.
5514 (*add<GPI>3_compareV_imm): New.
5515 (add<GPI>3_compareV): New.
5516 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5517 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5518 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5519 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5520 with 'comparison' operator.
5521 (*add<GPI>3_compareV_cconly_imm): Ditto.
5522 (*add<GPI>3_compareV_cconly): Ditto.
5523 (*add<GPI>3_compareV_imm): Ditto.
5524 (add<GPI>3_compareV): Ditto.
5525 (add<mode>3_carryinC): Ditto.
5526 (*add<mode>3_carryinC_zero): Ditto.
5527 (*add<mode>3_carryinC): Ditto.
5528 (add<mode>3_carryinV): Ditto.
5529 (*add<mode>3_carryinV_zero): Ditto.
5530 (*add<mode>3_carryinV): Ditto.
5531
5532 2018-07-19 Michael Collison <michael.collison@arm.com>
5533 Richard Henderson <rth@redhat.com>
5534
5535 * config/aarch64/aarch64-modes.def (CC_V): New.
5536 * config/aarch64/aarch64-protos.h
5537 (aarch64_addti_scratch_regs): Declare
5538 (aarch64_subvti_scratch_regs): Declare.
5539 (aarch64_expand_subvti): Declare.
5540 (aarch64_gen_unlikely_cbranch): Declare
5541 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5542 for signed overflow using CC_Vmode.
5543 (aarch64_get_condition_code_1): Handle CC_Vmode.
5544 (aarch64_gen_unlikely_cbranch): New function.
5545 (aarch64_addti_scratch_regs): New function.
5546 (aarch64_subvti_scratch_regs): New function.
5547 (aarch64_expand_subvti): New function.
5548
5549 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5550
5551 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5552 extension.
5553 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5554 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5555 extension.
5556
5557 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5558
5559 PR target/83009
5560 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5561 address check not strict.
5562
5563 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5564
5565 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5566 Umq with Umn.
5567 (store_pair_lanes<mode>): Likewise.
5568 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5569 enum value 'ADDR_QUERY_LDP_STP_N'.
5570 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5571 (aarch64_print_address_internal): Add declaration.
5572 (aarch64_print_ldpstp_address): Remove.
5573 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5574 (aarch64_print_operand): Change printing of 'y'.
5575 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5576 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5577 'true' rather than '1'.
5578 * config/aarch64/constraints.md (Uml): Likewise.
5579 (Uml): Rename to Umn.
5580 (Umq): Remove.
5581
5582 2018-07-19 Richard Biener <rguenther@suse.de>
5583
5584 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5585 a trailing array.
5586 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5587 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5588 (vn_reference_hasher): Likewise.
5589 (struct vn_tables_s): Remove obstack and alloc-pool members.
5590 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5591 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5592 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5593 (vn_reference_insert_pieces): Likewise.
5594 (alloc_vn_nary_op_noinit): Adjust.
5595 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5596 (vn_phi_eq): Adjust.
5597 (shared_lookup_phiargs): Remove.
5598 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5599 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5600 (visit_reference_op_call): Likewise.
5601 (copy_nary, copy_phi, copy_reference): Remove.
5602 (process_scc): Rewind the obstack when iterating. Do not
5603 copy the elements to valid_info but just move them from one
5604 hashtable to the other.
5605 (allocate_vn_table): Adjust.
5606 (free_vn_table): Likewise.
5607 (init_scc_vn): Likewise.
5608 (free_scc_vn): Likewise.
5609
5610 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5611
5612 PR target/86560
5613 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5614 indirect_return as function type attribute.
5615 (ix86_attribute_table): Change indirect_return to function
5616 type attribute.
5617 * doc/extend.texi: Update indirect_return attribute.
5618
5619 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5620
5621 * wide-int.h (widest2_int): New.
5622 * gimple-fold.c (arith_overflowed_p): Use it.
5623 * tree.h (widest2_int_cst): New.
5624 * tree-vrp.c (wide_int_binop_overflow): Rename from
5625 vrp_int_const_binop.
5626 Rewrite to work on trees.
5627 (extract_range_from_multiplicative_op_1): Abstract code to...
5628 (wide_int_range_min_max): ...here.
5629 (wide_int_range_cross_product): ...and here.
5630 (extract_range_from_binary_expr_1): Abstract overflow code to...
5631 (wide_int_range_mult_wrapping): ...here.
5632 * tree-vrp.h (wide_int_range_cross_product): New.
5633 (wide_int_range_mult_wrapping): New.
5634
5635 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5636 Julia Koval <julia.koval@intel.com>
5637
5638 * config/i386/x86-tune-costs.h (skylake_memcpy,
5639 skylake_memset): Replace rep_prefix with unrolling for size 512.
5640
5641 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5642
5643 PR middle-end/86544
5644 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5645 comparision with EQ_EXPR in last stmt.
5646
5647 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5648
5649 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5650 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5651 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5652 previously known as "PowerPC AltiVec Built-in Functions". Move
5653 some material to new subsubsections "PowerPC AltiVec Built-in
5654 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5655 ISA 2.07".
5656 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5657 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5658 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5659 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5660
5661 2018-07-18 Richard Biener <rguenther@suse.de>
5662
5663 PR tree-optimization/86557
5664 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5665 EXACT_DIV_EXPR.
5666
5667 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5668
5669 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5670
5671 2018-07-17 Jeff Law <law@redhat.com>
5672
5673 * config/arm/arm.c (get_label_padding): Update for recent
5674 changes to label_to_alignment.
5675
5676 PR tree-optimization/86010
5677 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5678
5679 * config/mips/mips.c (vr4130_align_insns): Update for recent
5680 changes to label_to_alignment.
5681
5682 * config/frv/frv.c (frv_label_align): Update for recent changes
5683 to label_to_alignment.
5684
5685 * config/nios2/nios2.c (nios2_label_align): Update for recent
5686 changes which dropped ALIGN_LABELS_LOG.
5687
5688 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5689
5690 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5691 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5692
5693 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5694
5695 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5696 deprecated align_labels_log.
5697
5698 2018-07-17 Richard Biener <rguenther@suse.de>
5699
5700 PR lto/86456
5701 * dwarf2out.c (init_sections_and_labels): Always generate
5702 a debug_line_str_section for early LTO debug.
5703 (dwarf2out_finish): Reset debug_line_str_hash output early.
5704 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5705 with fat LTO part.
5706 (dwarf2out_early_finish): Output debug_line_str.
5707
5708 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5709
5710 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5711 index register on z196 or later.
5712
5713 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5714
5715 * config/s390/s390.c (s390_default_align): Set default function
5716 alignment to 16.
5717 (s390_override_options_after_change): Call s390_default align.
5718 (s390_option_override_internal): Call s390_default_align.
5719 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5720
5721 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5722
5723 PR middle-end/86542
5724 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5725 to _looptemp_ clauses, other than the first two.
5726
5727 2018-07-17 Martin Liska <mliska@suse.cz>
5728
5729 * opts.c: Do not enable OPT_falign_* for -Os.
5730
5731 2018-07-17 Martin Liska <mliska@suse.cz>
5732
5733 * align.h (MAX_CODE_ALIGN): New.
5734 (MAX_CODE_ALIGN_VALUE): New.
5735 * common/config/i386/i386-common.c (ix86_handle_option):
5736 (MAX_CODE_ALIGN): Moved to align.h.
5737 * final.c (MAX_CODE_ALIGN): Likewise.
5738 * opts.c (parse_and_check_align_values):
5739 (MAX_CODE_ALIGN): Likewise.
5740 (MAX_CODE_ALIGN_VALUE): Likewise.
5741
5742 2018-07-17 Martin Liska <mliska@suse.cz>
5743
5744 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5745 in order to fulfil coding style.
5746 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5747 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5748 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5749 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5750 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5751 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5752 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5753 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5754 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5755
5756 2018-07-17 Martin Liska <mliska@suse.cz>
5757
5758 * align.h: New file.
5759 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5760 directly.
5761 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5762 align_flags of label_to_alignment.
5763 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5764 align_flags class.
5765 * config/m68k/m68k.c: Do not use removed align_labels_value and
5766 align_loops_value.
5767 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5768 (LOOP_ALIGN): Likewise.
5769 (LABEL_ALIGN): Likewise.
5770 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5771 Remove not used macro.
5772 (rs6000_loop_align): Change return type to align_flags.
5773 (rs6000_loop_align_max_skip): Remove.
5774 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5775 Change return type to align_flags.
5776 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5777 Remove not used macro.
5778 (rs6000_loop_align): Change return type to align_flags.
5779 (rs6000_loop_align_max_skip): Remove.
5780 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5781 * config/rx/rx-protos.h (rx_align_for_label): Make it
5782 static function.
5783 * config/rx/rx.c (rx_align_for_label): Change return type
5784 to align_flags.
5785 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5786 macro definitions.
5787 into align_flags class.
5788 (LABEL_ALIGN): Likewise.
5789 (LOOP_ALIGN): Likewise.
5790 * config/s390/s390.c (s390_label_align): Use align_flags
5791 class member.
5792 (s390_asm_output_function_label): Likewise.
5793 * config/sh/sh.c (sh_override_options_after_change):
5794 Use align_flags class directly without macros.
5795 (find_barrier): Likewise.
5796 (barrier_align): Likewise.
5797 (sh_loop_align): Likewise.
5798 * config/spu/spu.c (spu_option_override):
5799 Use align_flags_tuple::get_value instead of removed macros.
5800 (spu_sched_init): Likewise.
5801 * config/spu/spu.h (GTY): Likewise.
5802 * config/visium/visium.c (visium_option_override):
5803 Set "8" as default secondary alignment.
5804 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5805 in order to guarantee secondary alignment of 8.
5806 * coretypes.h: Include align.h header file.
5807 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5808 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5809 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5810 * doc/tm.texi.in: Likewise.
5811 * final.c (struct label_alignment): Remove not used structure.
5812 (LABEL_ALIGN): Change type to align_flags.
5813 (LOOP_ALIGN): Likewise.
5814 (JUMP_ALIGN): Likewise.
5815 (default_loop_align_max_skip): Remove.
5816 (default_label_align_max_skip): Likewise.
5817 (default_jump_align_max_skip): Likewise.
5818 (default_label_align_after_barrier_max_skip):
5819 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5820 (LABEL_TO_MAX_SKIP): Remove.
5821 (label_to_alignment): Return align_flags type instead of integer.
5822 (label_to_max_skip): Remove.
5823 (align_fuzz): Use align_flags type.
5824 (compute_alignments): Use align_flags type and use align_flags::max
5825 to combine multiple alignments.
5826 (grow_label_align): Grow vec instead of C array.
5827 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5828 (shorten_branches): Use align_flags type and use align_flags::max
5829 to combine multiple alignments.
5830 (final_scan_insn_1): Remove usage of secondary alignment that comes
5831 from label alignment, but instead use proper secondary alignment
5832 which is computed in grow_label_align.
5833 * flags.h (struct align_flags_tuple): Move to align.h.
5834 (struct align_flags): Likewise.
5835 (state_align_loops): Rename to align_loops.
5836 (state_align_jumps): Rename to align_jumps.
5837 (state_align_labels): Rename to align_labels.
5838 (state_align_functions): Rename to align_functions.
5839 (align_loops_log): Remove.
5840 (align_jumps_log): Remove.
5841 (align_labels_log): Remove.
5842 (align_functions_log): Remove.
5843 (align_loops_max_skip): Remove.
5844 (align_jumps_max_skip): Remove.
5845 (align_labels_max_skip): Remove.
5846 (align_functions_max_skip): Remove.
5847 (align_loops_value): Remove.
5848 (align_jumps_value): Remove.
5849 (align_labels_value): Remove.
5850 (align_functions_value): Remove.
5851 * output.h (label_to_alignment): Change return type to align_flags.
5852 (label_to_max_skip): Remove.
5853 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5854 jump_align_max_skip macros.
5855 * targhooks.h (default_loop_align_max_skip): Remove.
5856 (default_label_align_max_skip): Likewise.
5857 (default_jump_align_max_skip): Likewise.
5858 (default_label_align_after_barrier_max_skip): Remove.
5859 * toplev.c (read_log_maxskip): Use ::normalize function.
5860 (parse_N_M): Remove not used argument and also call ::normalize.
5861 (parse_alignment_opts): Do not pass unused arguments.
5862 * varasm.c (assemble_start_function): Use directly align_functions
5863 instead of removed macros.
5864 * system.h: Do not poison removed macros.
5865
5866 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5867
5868 PR middle-end/86539
5869 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5870 and cond temporaries don't have reference type if iterator has
5871 pointer type. For init use &for_pre_body instead of pre_p if
5872 for_pre_body is non-empty.
5873
5874 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5875
5876 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5877 double-double modes to SFmode directly directly.
5878 (trunc<mode>sf2_fprs): Delete.
5879
5880 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5881
5882 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5883 for conversions between IFmode and the decimal floating point modes.
5884 (init_float128_ieee): Use the correct names for conversions between
5885 KFmode and the decimal floating point modes.
5886
5887 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5888
5889 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5890 for the conversions between TDmode and IFmode.
5891 (init_float128_ieee): Use more correct names for the conversions
5892 between TDmode and KFmode.
5893
5894 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5895
5896 PR tree-optimization/86526
5897 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5898 (inline_expand_builtin_string_cmp): Likewise.
5899 (inline_string_cmp): Likewise. Use c_readstr instead of
5900 builtin_memcpy_read_str. Add unit_mode temporary.
5901
5902 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5903
5904 PR middle-end/86528
5905 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5906 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5907
5908 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5909
5910 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5911 Alphabetize prototypes of built-in functions, separating out
5912 built-in functions that are listed in this section but should be
5913 described elsewhere.
5914
5915 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5916
5917 PR target/86511
5918 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5919 conditional move when trapping comparison was split to a
5920 non-trapping one (and vice versa).
5921
5922 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5923
5924 * config/s390/s390.c (s390_function_profiler): Generate nops
5925 instead of profiler call sequences.
5926 * config/s390/s390.opt: Add the new option.
5927
5928 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5929
5930 * config/s390/s390.c (s390_function_profiler): Generate
5931 __mcount_loc section.
5932 * config/s390/s390.opt: Add the new option.
5933
5934 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5935
5936 * common.opt: Add the new warning.
5937 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5938 %r0,__fentry__" when -mfentry is specified.
5939 (s390_option_override_internal): Disallow -mfentry for 31-bit
5940 CPUs.
5941 * config/s390/s390.opt: Add the new option.
5942
5943 2018-07-16 Richard Biener <rguenther@suse.de>
5944
5945 PR lto/86523
5946 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5947 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5948
5949 2018-07-16 Martin Liska <mliska@suse.cz>
5950
5951 PR ipa/86529
5952 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5953 to ::get_create.
5954
5955 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5956
5957 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5958
5959 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5960
5961 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5962 for ARCHS4x.
5963 * config/arc/arc-cpus.def (hs4x): New cpu.
5964 (hs4xd): Likewise.
5965 * config/arc/arc-tables.opt: Regenerate.
5966 * config/arc/arc.c (arc_sched_issue_rate): New function.
5967 (TARGET_SCHED_ISSUE_RATE): Define.
5968 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5969 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5970 fpu_cvt.
5971 (attr tune): Add ARCHS4x tune values.
5972 (attr tune_dspmpy): Define.
5973 (*tst): Correct instruction type.
5974 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5975 * config/arc/arcHS4x.md: New file.
5976 * config/arc/fpu.md: Update instruction type attributes.
5977 * config/arc/t-multilib: Regenerate.
5978
5979 2018-07-16 Tom de Vries <tdevries@suse.de>
5980
5981 PR debug/86455
5982 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5983
5984 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5985
5986 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5987 early clobber.
5988
5989 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5990
5991 PR tree-optimization/86514
5992 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5993 conversion to a boolean type from a type with greater precision.
5994
5995 2018-07-16 Tom de Vries <tdevries@suse.de>
5996
5997 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5998 dump_flags request TDF_SLIM.
5999
6000 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
6001
6002 * fold-const.c (int_const_binop_1): Abstract...
6003 (wide_int_binop): ...wide int code here.
6004 (poly_int_binop): ...poly int code here.
6005 Abstract the rest of int_const_binop_1 into int_const_binop.
6006 * fold-const.h (wide_int_binop): New.
6007 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
6008 Remove useless PLUS/MINUS_EXPR case.
6009 (zero_nonzero_bits_from_vr): Move wide int code...
6010 (zero_nonzero_bits_from_bounds): ...here.
6011 (extract_range_from_binary_expr_1): Move mask optimization code...
6012 (range_easy_mask_min_max): ...here.
6013 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
6014 (range_easy_mask_min_max): New.
6015
6016 2018-07-15 Jeff Law <law@redhat.com>
6017
6018 PR target/85993
6019 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
6020 block.
6021
6022 2018-07-14 Jim Wilson <jimw@sifive.com>
6023
6024 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
6025
6026 2018-07-14 Paul Koning <ni1d@arrl.net>
6027
6028 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
6029
6030 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
6031
6032 * lto-streamer-out.c (copy_function_or_variable): Dump info about
6033 copying section.
6034
6035 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
6036 Steve Munroe <munroesj52@gmail.com>
6037
6038 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
6039 (_mm_andnot_si128): Likewise.
6040 (_mm_or_si128): Likewise.
6041 (_mm_xor_si128): Likewise.
6042
6043 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
6044
6045 PR middle-end/78809
6046 * builtins.c (expand_builtin_memcmp): Inline the calls first
6047 when result_eq is false.
6048 (expand_builtin_strcmp): Inline the calls first.
6049 (expand_builtin_strncmp): Likewise.
6050 (inline_string_cmp): New routine. Expand a string compare
6051 call by using a sequence of char comparison.
6052 (inline_expand_builtin_string_cmp): New routine. Inline expansion
6053 a call to str(n)cmp/memcmp.
6054 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
6055 New option.
6056 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
6057
6058 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
6059
6060 * config/arm/driver-arm.c: Include arm-native.h.
6061 (host_detect_local_cpu): Use auto-generated data tables.
6062 (vendors, arm_cpu_table): Delete. Move part information to ...
6063 * config/arm/arm-cpus.in: ... here.
6064 * config/arm/parsecpu.awk (gen_native): New function.
6065 (vendor, part): New CPU fields.
6066 (END): Add support for building the native CPU detection tables.
6067 * config/arm/t-arm (arm-native.h): Add build rule.
6068 (driver-arm.o): Add dependency on arm-native.h.
6069
6070 2018-07-13 Richard Biener <rguenther@suse.de>
6071
6072 PR middle-end/85974
6073 * match.pd (addr1 - addr2): Allow either of the operand to
6074 have a conversion.
6075
6076 2018-07-13 Tom de Vries <tdevries@suse.de>
6077
6078 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
6079 in remap_ssa_name.
6080
6081 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
6082
6083 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
6084 arrays instead of numbered variables.
6085
6086 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
6087
6088 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
6089 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
6090
6091 2018-07-13 Richard Biener <rguenther@suse.de>
6092
6093 PR debug/86452
6094 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
6095 instead of get_context_die.
6096
6097 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
6098 Richard Biener <rguenther@suse.de>
6099
6100 PR middle-end/86489
6101 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
6102 that the loop latch destination where phi is defined.
6103
6104 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
6105
6106 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
6107 (riscv_expand_epilogue): Add assertion to check interrupt mode.
6108 (riscv_set_current_function): Extract getting interrupt type to new
6109 function.
6110 (riscv_get_interrupt_type): New function.
6111 (riscv_merge_decl_attributes): New function, checking interrupt type is
6112 same.
6113 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
6114
6115 2018-07-12 Paul Koning <ni1d@arrl.net>
6116
6117 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
6118 directive.
6119
6120 2018-07-12 Paul Koning <ni1d@arrl.net>
6121
6122 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
6123 zero reference, add doloop_end instead.
6124 * doc/md.texi (decrement_and_branch_until_zero): Remove.
6125 (Looping patterns): Remove decrement_and_branch_until_zero. Add
6126 detail for doloop_end.
6127
6128 2018-07-12 Martin Sebor <msebor@redhat.com>
6129
6130 PR c/86453
6131 * attribs.c (decl_attributes): Reject conflicting attributes before
6132 calling attribute handlers.
6133
6134 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6135
6136 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
6137 parameter.
6138 (gcc::dump_manager::get_dump_file_name): likewise.
6139 (dump_begin): Likewise.
6140 * dumpfile.h (dump_begin): Update prototype.
6141 (gcc::dump_manager::get_dump_file_name,
6142 gcc::dump_manager::get_dump_file_name): Update prototype.
6143
6144 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6145
6146 * internal-fn.h (vectorizable_internal_fn_p): New function.
6147 * tree-vect-slp.c (compatible_calls_p): Likewise.
6148 (vect_build_slp_tree_1): Remove nops argument. Handle calls
6149 to internal functions.
6150 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
6151
6152 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6153
6154 * fold-const.h (inverse_conditions_p): Declare.
6155 * fold-const.c (inverse_conditions_p): New function.
6156 * match.pd: Use inverse_conditions_p. Add folds of view_converts
6157 that test the inverse condition of a conditional internal function.
6158 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
6159 * internal-fn.c (internal_fn_mask_index): Handle conditional
6160 internal functions.
6161 (vectorized_internal_fn_supported_p): New function.
6162 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
6163 (any_pred_load_store): Replace with...
6164 (need_to_predicate): ...this new variable.
6165 (redundant_ssa_names): New variable.
6166 (ifcvt_can_use_mask_load_store): Move initial checks to...
6167 (ifcvt_can_predicate): ...this new function. Handle tree codes
6168 for which a conditional internal function exists.
6169 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
6170 instead of ifcvt_can_use_mask_load_store. Update after variable
6171 name change.
6172 (predicate_load_or_store): New function, split out from
6173 predicate_mem_writes.
6174 (check_redundant_cond_expr): New function.
6175 (value_available_p): Likewise.
6176 (predicate_rhs_code): Likewise.
6177 (predicate_mem_writes): Rename to...
6178 (predicate_statements): ...this. Use predicate_load_or_store
6179 and predicate_rhs_code.
6180 (combine_blocks, tree_if_conversion): Update after above name changes.
6181 (ifcvt_local_dce): Handle redundant_ssa_names.
6182 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
6183 general conditional functions.
6184 * tree-vect-stmts.c (vectorizable_call): Likewise.
6185
6186 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6187 Alan Hayward <alan.hayward@arm.com>
6188 David Sherwood <david.sherwood@arm.com>
6189
6190 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6191 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
6192 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
6193 plus and minus and convert them into IFN_COND_FMA-based sequences.
6194 (convert_mult_to_fma): Handle conditional plus and minus.
6195
6196 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6197
6198 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
6199 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
6200 (cond_fnms_optab): New optabs.
6201 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
6202 internal functions.
6203 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6204 * internal-fn.h (get_conditional_internal_fn): Declare.
6205 (get_unconditional_internal_fn): Likewise.
6206 * internal-fn.c (cond_ternary_direct): New macro.
6207 (expand_cond_ternary_optab_fn): Likewise.
6208 (direct_cond_ternary_optab_supported_p): Likewise.
6209 (FOR_EACH_COND_FN_PAIR): Likewise.
6210 (get_conditional_internal_fn): New function.
6211 (get_unconditional_internal_fn): Likewise.
6212 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6213 (gimple_match_op::gimple_match_op): Add a new overload for 5
6214 operands.
6215 (gimple_match_op::set_op): Likewise.
6216 (gimple_resimplify5): Declare.
6217 * genmatch.c (decision_tree::gen): Generate simplifications for
6218 5 operands.
6219 * gimple-match-head.c (gimple_simplify): Define an overload for
6220 5 operands. Handle calls with 5 arguments in the top-level overload.
6221 (convert_conditional_op): Handle conversions from unconditional
6222 internal functions to conditional ones.
6223 (gimple_resimplify5): New function.
6224 (build_call_internal): Pass a fifth operand.
6225 (maybe_push_res_to_seq): Likewise.
6226 (try_conditional_simplification): Try converting conditional
6227 internal functions to unconditional internal functions.
6228 Handle 3-operand unconditional forms.
6229 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6230 Define ternary equivalents of the current rules for binary conditional
6231 internal functions.
6232 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6233 ternary operations.
6234 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6235 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6236 (optab): Handle them.
6237 (SVE_COND_FP_TERNARY): New int iterator.
6238 (sve_fmla_op, sve_fmad_op): New int attributes.
6239 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6240 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6241 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6242
6243 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6244
6245 * target.def (preferred_else_value): New target hook.
6246 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6247 * doc/tm.texi: Regenerate.
6248 * targhooks.h (default_preferred_else_value): Declare.
6249 * targhooks.c (default_preferred_else_value): New function.
6250 * internal-fn.h (conditional_internal_fn_code): Declare.
6251 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6252 (get_conditional_internal_fn): Use it.
6253 (conditional_internal_fn_code): New function.
6254 * gimple-match.h (gimple_match_cond): New struct.
6255 (gimple_match_op): Add a cond member function.
6256 (gimple_match_op::gimple_match_op): Update all forms to take a
6257 gimple_match_cond.
6258 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6259 for the suboperation, but don't specify a particular else_value.
6260 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6261 (visit_nary_op, visit_reference_op_load): Pass
6262 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6263 * gimple-match-head.c: Include tree-eh.h
6264 (convert_conditional_op): New function.
6265 (maybe_resimplify_conditional_op): Likewise.
6266 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6267 (gimple_resimplify2): Likewise.
6268 (gimple_resimplify3): Likewise.
6269 (gimple_resimplify4): Likewise.
6270 (maybe_push_res_to_seq): Return null for conditional operations.
6271 (try_conditional_simplification): New function.
6272 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6273 constructor.
6274 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6275 IFN_COND_* call.
6276 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6277 function.
6278 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6279
6280 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6281
6282 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6283 DECL_FCONTEXT
6284 (hash_tree): Do not hash DECL_FCONTEXT
6285 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6286 Do not stream DECL_FCONTEXT.
6287 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6288 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6289
6290 2018-07-12 Richard Biener <rguenther@suse.de>
6291
6292 PR debug/86462
6293 * dwarf2out.c (gen_block_die): Only output blocks when they have
6294 at least one !DECL_IGNORED_P variable.
6295
6296 2018-07-12 Richard Biener <rguenther@suse.de>
6297
6298 PR target/84829
6299 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6300 Remove -mieee-fp handling.
6301
6302 2018-07-12 Richard Biener <rguenther@suse.de>
6303
6304 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6305 left-over from last patch.
6306
6307 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6308
6309 PR tree-optimization/86492
6310 * gimple-ssa-store-merging.c
6311 (imm_store_chain_info::coalesce_immediate_stores): Call
6312 check_no_overlap even for the merge_overlapping case. Formatting fix.
6313
6314 2018-07-12 Richard Biener <rguenther@suse.de>
6315
6316 PR middle-end/86479
6317 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6318 move possibly trapping operations into the conditional.
6319
6320 2018-07-12 Richard Biener <rguenther@suse.de>
6321
6322 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6323 (vn_lookup_simplify_result): Remove recursion limit applied
6324 here.
6325 (vn_nary_build_or_lookup_1): Adjust.
6326 (try_to_simplify): Likewise.
6327 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6328 here.
6329 (gimple_resimplify2): Likewise.
6330 (gimple_resimplify3): Likewise.
6331 (gimple_resimplify4): Likewise.
6332
6333 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6334
6335 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6336 Use __mmask64 type instead of __mmask8 for __M argument.
6337 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6338 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6339 __U argument.
6340 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6341 __mmask16 for __M argument.
6342 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6343 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6344 to __mmask16 instead of __mmask8.
6345 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6346 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6347 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6348 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6349 instead of __mmask16 for __U argument.
6350 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6351 __mmask16 instead of __mmask8 for __U argument.
6352 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6353 __U argument.
6354 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6355 __mmask16.
6356 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6357 argument.
6358 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6359 __U argument.
6360 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6361 __mmask16.
6362 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6363 of __mmask16.
6364 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6365 __U argument.
6366 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6367 __U argument.
6368 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6369 __U argument.
6370 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6371 __U argument.
6372 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6373 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6374 return type as well as __M argument type and all casts from __mmask8
6375 to __mmask32.
6376 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6377 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6378 return type as well as __M argument type and all casts from __mmask8
6379 to __mmask16.
6380 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6381 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6382 return type as well as __M argument type and all casts from __mmask8
6383 to __mmask32.
6384 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6385 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6386 return type as well as __M argument type and all casts from __mmask8
6387 to __mmask16.
6388 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6389 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6390 __mmask16.
6391
6392 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6393
6394 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6395 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6396 for __U argument.
6397
6398 2018-07-11 Paul Koning <ni1d@arrl.net>
6399
6400 * doc/md.texi (define_subst): Document how multiple occurrences of
6401 the same argument in the replacement pattern are handled.
6402
6403 2018-07-11 Paul Koning <ni1d@arrl.net>
6404
6405 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6406 alphabetical order.
6407 (Common Type Attributes): Add "mode" attribute.
6408
6409 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6410
6411 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6412 stream DECL_ORIGINAL_TYPE.
6413 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6414 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6415 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6416 Do not walk original type.
6417 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6418 external decls.
6419 (write_ts_decl_non_common_tree_pointers): Do not stream
6420 DECL_ORIGINAL_TYPE
6421 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6422 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6423
6424 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6425
6426 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6427 thread twice from the same starting edge.
6428
6429 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6430
6431 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6432 * gimple.c (gimple_call_nonnull_result_p): ...here...
6433 (gimple_call_nonnull_arg): ...and here.
6434 * gimple.h (gimple_call_nonnull_result_p): New.
6435 (gimple_call_nonnull_arg): New.
6436
6437 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6438
6439 * config/arm/arm-cpus.in: Move information from fpu field of each
6440 cpu definition to the isa field.
6441 * config/arm/parsecpu.awk (fpu): Delete match rule.
6442 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6443
6444 2018-07-11 Richard Biener <rguenther@suse.de>
6445
6446 PR debug/86457
6447 * dwarf2out.c (init_sections_and_labels): Use
6448 output_asm_line_debug_info consistently.
6449 (dwarf2out_early_finish): Likewise.
6450 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6451 type units.
6452
6453 2018-07-11 Richard Biener <rguenther@suse.de>
6454
6455 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6456 Rework father_bb setting in a way to avoid propagating constants
6457 multiple times on a loop body.
6458
6459 2018-07-10 Mark Wielaard <mark@klomp.org>
6460
6461 PR debug/86459
6462 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6463
6464 2018-07-10 Richard Biener <rguenther@suse.de>
6465
6466 * hash-map.h (hash_map::iterator::operator*): Return
6467 references to key and value.
6468
6469 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6470
6471 PR c++/86443
6472 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6473 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6474 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6475 (gimplify_omp_for): For composite loops, move outer
6476 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6477 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6478 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6479 TREE_LIST for both the original class iterator and the "last" helper
6480 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6481 loop, remember has_decl_expr from outer composite loops for the
6482 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6483
6484 2018-07-09 Martin Sebor <msebor@redhat.com>
6485
6486 PR middle-end/77357
6487 PR middle-end/86428
6488 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6489 accessing implicitly initialized array elements.
6490 * expr.c (string_constant): Handle string initializers of
6491 character arrays within aggregates.
6492 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6493 Store element offset. As a special case, handle zero size.
6494 (fold_nonarray_ctor_reference): Same.
6495 (fold_ctor_reference): Add argument. Store subobject offset.
6496 * gimple-fold.h (fold_ctor_reference): Add argument.
6497
6498 2018-07-09 Paul Koning <ni1d@arrl.net>
6499
6500 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6501 (pdp11_insn_cost): New function.
6502 (pdp11_md_asm_adjust): New function.
6503 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6504 (pdp11_rtx_costs): Update to match machine better.
6505 (output_addr_const_pdp11): Correct format mismatch warnings.
6506 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6507 * config/pdp11/pdp11.md: General change to add base_cost and/or
6508 length attributes for use by new pdp11_insn_cost function.
6509 (MIN_BRANCH): Correct definition.
6510 (MIN_SOB): Ditto.
6511 (doloop_end): Use standard pattern name for looping pattern.
6512 (doloop_end_nocc): New.
6513 (movsf): Add another constraint alternative.
6514 (zero_extendqihi2): Add constraint alternatives for not in place
6515 extend.
6516 (zero_extendhisi2): Remove.
6517 (shift patterns): Add CC handling variants.
6518 (bswaphi2): New.
6519 (bswapsi2): New.
6520 (rothi3): New.
6521 (define_peephole2): New peephole to recognize mov that sets CC for
6522 subsequent test.
6523
6524 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6525
6526 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6527 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6528 wi::add.
6529
6530 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6531
6532 PR c/86420
6533 * real.c (real_nextafter): Return true if result is denormal.
6534
6535 2018-07-09 Martin Liska <mliska@suse.cz>
6536
6537 * common.opt: Add back wrongly removed attribute.
6538
6539 2018-07-09 Richard Biener <rguenther@suse.de>
6540
6541 PR debug/86413
6542 * dwarf2out.c (gen_block_die): For an early generated DIE
6543 always output high/low PC attributes.
6544
6545 2018-07-09 Tom de Vries <tdevries@suse.de>
6546
6547 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6548 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6549 onto VAR_DECL with abstract origin.
6550
6551 2018-07-07 Jim Wilson <jimw@sifive.com>
6552
6553 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6554
6555 2018-07-07 Tom de Vries <tdevries@suse.de>
6556
6557 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6558
6559 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6560
6561 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6562 overflow_type.
6563 (combine_bound): Use wide-int overflow calculation instead of
6564 rolling our own.
6565 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6566 overflow_type.
6567 * fold-const.c (int_const_binop_2): Same.
6568 (extract_muldiv_1): Same.
6569 (fold_div_compare): Same.
6570 (fold_abs_const): Same.
6571 * match.pd: Same.
6572 * poly-int.h (add): Same.
6573 (sub): Same.
6574 (neg): Same.
6575 (mul): Same.
6576 * predict.c (predict_iv_comparison): Same.
6577 * profile-count.c (slow_safe_scale_64bit): Same.
6578 * simplify-rtx.c (simplify_const_binary_operation): Same.
6579 * tree-chrec.c (tree_fold_binomial): Same.
6580 * tree-data-ref.c (split_constant_offset_1): Same.
6581 * tree-if-conv.c (idx_within_array_bound): Same.
6582 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6583 * tree-ssa-phiopt.c (minmax_replacement): Same.
6584 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6585 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6586 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6587 * wide-int.cc (wi::add_large): Same.
6588 (wi::mul_internal): Same.
6589 (wi::sub_large): Same.
6590 (wi::divmod_internal): Same.
6591 * wide-int.h: Change overflow type to overflow_type for neg, add,
6592 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6593 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6594 mul_internal, divmod_internal.
6595 (overflow_type): New enum.
6596 (accumulate_overflow): New.
6597
6598 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6599
6600 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6601 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6602
6603 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6604
6605 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6606 argument is checked for zero before entering loop, avoid checking again.
6607
6608 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6609
6610 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6611 * gimplify.h (generic_expr_could_trap_p): Likwise.
6612 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6613
6614 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6615
6616 PR tree-optimization/86401
6617 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6618 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6619 (fold_bit_and_mask): ... here. New helper function for match.pd.
6620 * fold-const.h (fold_bit_and_mask): Declare.
6621 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6622
6623 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6624
6625 PR target/86324
6626 * target.def (translate_mode_attribute): New hook.
6627 * targhooks.h (default_translate_mode_attribute): Declare.
6628 * targhooks.c (default_translate_mode_attribute): New function.
6629 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6630 * doc/tm.texi: Regenerate.
6631 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6632 (rs6000_translate_mode_attribute): New function.
6633
6634 2018-07-06 Paul Koning <ni1d@arrl.net>
6635
6636 * doc/md.texi (define_split): Document DONE and FAIL.
6637 (define_peephole2): Ditto.
6638
6639 2018-07-05 Jeff Law <law@redhat.com>
6640
6641 PR tree-optimization/86010
6642 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6643 both the head and tail of mem* and str* calls.
6644
6645 2018-07-05 Jim Wilson <jimw@sifive.com>
6646
6647 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6648
6649 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6650
6651 * config/aarch64/aarch64-simd.md: correct flags text for
6652 MIN_EXPR replacement.
6653
6654 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6655
6656 * configure: Regenerated.
6657
6658 2018-07-05 Carl Love <cel@us.ibm.com>
6659
6660 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6661 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6662 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6663 VSX_BUILTIN_DOUBLEL_V4SF.
6664
6665 2018-07-05 Martin Sebor <msebor@redhat.com>
6666
6667 PR c++/86400
6668 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6669 than its domain to compute its the upper bound of a char array.
6670
6671 2018-07-05 Nathan Sidwell <nathan@acm.org>
6672
6673 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6674 * doc/cpp.texi: Update comment.
6675 * doc/tm.texi: Rebuilt.
6676 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6677 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6678 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6679 headers affected by extern "C".
6680 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6681 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6682 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6683 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6684 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6685 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6686 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6687 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6688 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6689 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6690 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6691 config/sparc/sp64-elf.h, config/spu/spu.h,
6692 config/stormy16/stormy16.h, config/v850/v850.h,
6693 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6694 define NO_IMPLICIT_EXTERN_C.
6695 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6696
6697 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6698
6699 PR target/84711
6700 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6701 instead of GET_MODE_SIZE when comparing Units.
6702
6703 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6704
6705 PR target/84711
6706 * rtlanal.c (set_noop_p): Constrain on mode change,
6707 include hard-reg-set.h
6708
6709 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6710
6711 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6712
6713 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6714
6715 Revert
6716 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6717
6718 PR sanitizer/84250
6719 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6720 libasan.
6721 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6722
6723 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6724
6725 PR sanitizer/84250
6726 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6727 libasan.
6728 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6729
6730 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6731
6732 PR middle-end/86380
6733 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6734
6735 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6736
6737 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6738 neg_*_op* variables.
6739
6740 2018-07-04 Martin Liska <mliska@suse.cz>
6741
6742 * tree-switch-conversion.c: Define
6743 max_ratio_for_speed and max_ratio_for_size constants.
6744
6745 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6746 Martin Liska <mliska@suse.cz>
6747
6748 PR middle-end/66240
6749 PR target/45996
6750 PR c/84100
6751 * common.opt: Rename align options with 'str_' prefix.
6752 * common/config/i386/i386-common.c (set_malign_value): New
6753 function.
6754 (ix86_handle_option): Use it to set -falign-* options/
6755 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6756 type from int to string.
6757 * config/aarch64/aarch64.c: Update default values from int
6758 to string.
6759 * config/alpha/alpha.c (alpha_override_options_after_change):
6760 Likewise.
6761 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6762 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6763 max skip conditionally.
6764 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6765 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6766 max skip conditionally.
6767 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6768 max skip conditionally.
6769 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6770 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6771 max skip conditionally.
6772 * config/i386/i386.c (struct ptt): Change type from int to
6773 string.
6774 (ix86_default_align): Set default values.
6775 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6776 max skip conditionally.
6777 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6778 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6779 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6780 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6781 max skip conditionally.
6782 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6783 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6784 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6785 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6786 max skip conditionally.
6787 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6788 * config/ia64/ia64.c (ia64_option_override): Set default values
6789 for alignment options.
6790 * config/m68k/m68k.c: Handle new str_align_* options.
6791 * config/mips/mips.c (mips_set_compression_mode): Change
6792 type of constants.
6793 (mips_option_override): Set default values for options.
6794 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6795 Likewise.
6796 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6797 Likewise.
6798 * config/rx/rx.c (rx_option_override): Likewise.
6799 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6800 (LABEL_ALIGN): Use align_labels_log.
6801 (LOOP_ALIGN): Use align_loops_align.
6802 * config/s390/s390.c (s390_asm_output_function_label): Use new
6803 macros.
6804 * config/sh/sh.c (sh_override_options_after_change):
6805 Change type of constants.
6806 * config/spu/spu.c (spu_sched_init): Likewise.
6807 * config/sparc/sparc.c (sparc_option_override): Set default
6808 values for options.
6809 * config/visium/visium.c (visium_option_override): Likewise.
6810 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6811 emit p2align format with last argument if it's not needed.
6812 * doc/invoke.texi: Document extended format of -falign-*.
6813 * final.c: Use align_labels alignment.
6814 * flags.h (struct target_flag_state): Change type to use
6815 align_flags.
6816 (struct align_flags_tuple): New.
6817 (struct align_flags): Likewise.
6818 (align_loops_log): Redefine macro to use new types.
6819 (align_loops_max_skip): Redefine macro to use new types.
6820 (align_jumps_log): Redefine macro to use new types.
6821 (align_jumps_max_skip): Redefine macro to use new types.
6822 (align_labels_log): Redefine macro to use new types.
6823 (align_labels_max_skip): Redefine macro to use new types.
6824 (align_functions_log): Redefine macro to use new types.
6825 (align_loops): Redefine macro to use new types.
6826 (align_jumps): Redefine macro to use new types.
6827 (align_labels): Redefine macro to use new types.
6828 (align_functions): Redefine macro to use new types.
6829 (align_functions_max_skip): Redefine macro to use new types.
6830 (align_loops_value): New macro.
6831 (align_jumps_value): New macro.
6832 (align_labels_value): New macro.
6833 (align_functions_value): New macro.
6834 * function.c (invoke_set_current_function_hook): Propagate
6835 alignment values from flags to global variables default in
6836 topleev.h.
6837 * ipa-icf.c (sem_function::equals_wpa): Use
6838 cl_optimization_option_eq instead of memcmp.
6839 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6840 of string types.
6841 (cl_optimization_stream_in): Likewise.
6842 * optc-save-gen.awk: Support strings in cl_optimization.
6843 * opth-gen.awk: Likewise.
6844 * opts.c (finish_options): Remove error checking of invalid
6845 value ranges.
6846 (MAX_CODE_ALIGN): Remove.
6847 (MAX_CODE_ALIGN_VALUE): Likewise.
6848 (parse_and_check_align_values): New function.
6849 (check_alignment_argument): Likewise.
6850 (common_handle_option): Use check_alignment_argument.
6851 * opts.h (parse_and_check_align_values): Declare.
6852 * toplev.c (init_alignments): Remove.
6853 (read_log_maxskip): New.
6854 (parse_N_M): Likewise.
6855 (parse_alignment_opts): Likewise.
6856 (backend_init_target): Remove usage of init_alignments.
6857 * toplev.h (parse_alignment_opts): Declare.
6858 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6859 argument.
6860 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6861 * tree.c (cl_option_hasher::equal): New.
6862 * varasm.c: Use new global macros.
6863
6864 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6865
6866 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6867 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6868 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6869 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6870 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6871 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6872 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6873 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6874 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6875 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6876 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6877 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6878 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6879
6880 2018-07-04 Martin Liska <mliska@suse.cz>
6881 Jonathan Wakely <jwakely@redhat.com>
6882
6883 * coverage.c: Use correct type.
6884 * doc/invoke.texi: Language correction.
6885
6886 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6887
6888 PR target/85620
6889 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6890 ENDBRANCH for non-tail call which may return via indirect branch.
6891 * doc/extend.texi: Document indirect_return attribute.
6892
6893 2018-07-03 Martin Sebor <msebor@redhat.com>
6894
6895 PR tree-optimization/86274
6896 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6897 precondition.
6898 (format_floating): Correct handling of infinities and NaNs.
6899
6900 2018-07-03 Martin Sebor <msebor@redhat.com>
6901
6902 * print-tree.c (print_real_cst): New function.
6903 (print_node_brief): Call it.
6904 (print_node): Ditto.
6905
6906 2018-07-03 Jeff Law <law@redhat.com>
6907
6908 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6909 into a single pattern.
6910
6911 * config/h8300/h8300.md (ors code_iterator): New.
6912 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6913 a single pattern and single splitter.
6914 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6915 (iorqi3_1, xorqi3_1): Likewise.
6916 (iorqi3, xorqi3 expanders): Similarly.
6917
6918 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6919 (movmd_internal) into a single pattern using the P mode iterator.
6920 (movmd splitters): Similarly.
6921 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6922 (movsd splitters): Similarly.
6923
6924 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6925 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6926 right table based on the size of the operand.
6927 * config/h8300/h8300.md (length_table): Corresponding changes. All
6928 references to "addb", "addw" and "addl" changed to "add".
6929 (btst patterns): Merge two variants into a single pattern.
6930 (tstqi, tsthi): Likewise.
6931 (addhi3_incdec, addsi3_incdec): Likewise.
6932 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6933 (mulhi3, mulsi3): Likewise.
6934 (udivhi3, udivsi3): Likewise.
6935 (divhi3, divsi3): Likewise.
6936 (andorqi3, andorhi3, andorsi3): Likewise.
6937
6938 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6939
6940 PR target/85694
6941 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6942 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6943
6944 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6945
6946 PR tree-optimization/85694
6947 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6948 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6949 UNSPEC_URHADD.
6950 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6951 (<u>avg<mode>3_ceil): New patterns.
6952
6953 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6954
6955 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6956 scan-tree-dump directive.
6957 * gcc.dg/vect/slp-perm-2.c: Likewise.
6958 * gcc.dg/vect/slp-perm-3.c: Likewise.
6959 * gcc.dg/vect/slp-perm-5.c: Likewise.
6960 * gcc.dg/vect/slp-perm-6.c: Likewise.
6961 * gcc.dg/vect/slp-perm-7.c: Likewise.
6962 * gcc.dg/vect/slp-perm-8.c: Likewise.
6963
6964 2018-07-03 Marek Polacek <polacek@redhat.com>
6965
6966 PR middle-end/86202
6967 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6968
6969 2018-07-03 Richard Biener <rguenther@suse.de>
6970
6971 PR ipa/86389
6972 * tree-ssa-structalias.c (find_func_clobbers): Properly
6973 handle indirect calls.
6974
6975 2018-07-03 Jeff Law <law@redhat.com>
6976
6977 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6978 (shifts): New code iterator.
6979 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6980 expander. Fix HImode handling on H8/SX.
6981 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6982 (subqi3, subhi3, subsi3 expanders): Likewise.
6983 (andqi3, andhi3, andsi3 expanders): Likewise.
6984 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6985 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6986 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6987 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6988 (zero_extendqihi2, zero_extendqisi2): Likewise.
6989 (extendqihi2, extendqisi2): Likewise.
6990 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6991 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6992 (rotlqi3_1, rotlhi3_1): Likewise.
6993 (logicalhi3_sn, logicalsi3_sn): Likewise.
6994 (logicalhi3, logicalsi3): Likewise.
6995
6996 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6997
6998 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6999 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7000 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
7001 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
7002 type to append_pattern_def_seq instead of creating a stmt_vec_info
7003 directly.
7004 (build_mask_conversion): Likewise. Remove vinfo argument.
7005 (vect_add_conversion_to_patterm): Likewise, renaming to...
7006 (vect_add_conversion_to_pattern): ...this.
7007 (vect_recog_mask_conversion_pattern): Update call to
7008 build_mask_conversion. Pass the vector type to
7009 append_pattern_def_seq here too.
7010 (vect_recog_gather_scatter_pattern): Update call to
7011 vect_add_conversion_to_pattern.
7012
7013 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7014
7015 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
7016 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7017 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
7018 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
7019 STMT_VINFO_PATTERN_DEF_SEQ to null here.
7020 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
7021 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
7022 append_pattern_def_seq instead of new_pattern_def_seq.
7023 (vect_recog_divmod_pattern): Do both of the above.
7024 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
7025 is null.
7026
7027 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7028
7029 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
7030 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
7031 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
7032 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
7033 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
7034 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7035 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
7036 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7037 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7038 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
7039 parameter with a single stmt_vec_info.
7040 (vect_recog_func_ptr): Likewise.
7041 (vect_recog_gather_scatter_pattern): Likewise, folding in...
7042 (vect_try_gather_scatter_pattern): ...this.
7043 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
7044 the stmt_vec_info of the statement to be matched. Don't clear
7045 STMT_VINFO_RELATED_STMT.
7046 (vect_pattern_recog): Update call accordingly.
7047
7048 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7049
7050 PR tree-optimization/85694
7051 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
7052 (uavgM3_ceil): Document new optabs.
7053 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7054 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
7055 functions.
7056 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
7057 (savg_ceil_optab): New optabs.
7058 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
7059 (vect_vect_recog_func_ptrs): Add it.
7060 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
7061 constant directly from the associated lhs.
7062
7063 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7064
7065 * tree-vect-patterns.c (vect_split_statement): New function.
7066 (vect_convert_input): Use it to try to split an existing cast.
7067
7068 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7069
7070 * poly-int.h (print_hex): New function.
7071 * dumpfile.h (dump_dec, dump_hex): Declare.
7072 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
7073 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
7074 min_input_precision, operation_precision and operation_sign.
7075 * tree-vect-patterns.c (vect_get_range_info): New function.
7076 (vect_same_loop_or_bb_p, vect_single_imm_use)
7077 (vect_operation_fits_smaller_type): Delete.
7078 (vect_look_through_possible_promotion): Add an optional
7079 single_use_p parameter.
7080 (vect_recog_over_widening_pattern): Rewrite to use new
7081 stmt_vec_info infomration. Handle one operation at a time.
7082 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
7083 (vect_truncatable_operation_p, vect_set_operation_type)
7084 (vect_set_min_input_precision): New functions.
7085 (vect_determine_min_output_precision_1): Likewise.
7086 (vect_determine_min_output_precision): Likewise.
7087 (vect_determine_precisions_from_range): Likewise.
7088 (vect_determine_precisions_from_users): Likewise.
7089 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
7090 (vect_vect_recog_func_ptrs): Put over_widening first.
7091 Add cast_forwprop.
7092 (vect_pattern_recog): Call vect_determine_precisions.
7093
7094 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
7095
7096 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
7097 statements that have been replaced by further pattern statements.
7098 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
7099
7100 2018-07-03 Richard Biener <rguenther@suse.de>
7101
7102 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
7103 always set *dt. Dump vectype in vectype overload.
7104 * dumpfile.h (dump_gimple_expr): New function.
7105 (dump_gimple_expr_loc): Likewise.
7106 * dumpfile.c (dump_gimple_expr): New function.
7107 (dump_gimple_expr_loc): Likewise.
7108
7109 2018-07-02 Jeff Law <law@redhat.com>
7110
7111 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
7112 the H8/300, H8/300H and H8/S variants into a single pattern.
7113 (movhi_h8300, movqi_h8300hs): Similarly.
7114 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
7115 (QHI mode iterator): New.
7116
7117 * config/h8300/h8300.md: Remove trailing whitespace.
7118
7119 2018-07-02 Jim Wilson <jimw@sifive.com>
7120
7121 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
7122 instead of emit_insn for interrupt returns.
7123 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
7124 (riscv_sret, riscv_uret): Likewise.
7125
7126 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7127
7128 * pretty-print.c (selftest::test_pp_format): Move save and restore
7129 of quotes to class auto_fix_quotes, and add an instance.
7130 * selftest.c: Include "intl.h".
7131 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
7132 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
7133 * selftest.h (selftest::auto_fix_quotes): New class.
7134
7135 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
7136
7137 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
7138 (aarch64_sve_prepare_conditional_op): Remove.
7139 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
7140 Allow aarch64_simd_reg_or_zero as select operand; remove
7141 the aarch64_sve_prepare_conditional_op call.
7142 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
7143 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7144 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
7145 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
7146 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
7147 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
7148 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
7149 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
7150 and a splitters to match all of the *_any patterns.
7151 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
7152
7153 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
7154 (SVE_COND_FP_BINARY_REV): Remove.
7155 (sve_int_op_rev, sve_fp_op_rev): New.
7156 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
7157 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
7158 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
7159 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
7160 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
7161 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
7162 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
7163 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
7164 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
7165
7166 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
7167 Remove match_dup 1 from the inner unspec.
7168 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
7169
7170 * config/aarch64/aarch64.md (movprfx): New attr.
7171 (length): Default movprfx to 8.
7172 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
7173 (*madd<SVE_I>, *msub<SVE_I): Likewise.
7174 (*<su>mul<SVE_I>3_highpart): Likewise.
7175 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
7176 (*v<ASHIFT><SVE_I>3): Likewise.
7177 (*<su><MAXMIN><SVE_I>3): Likewise.
7178 (*<su><MAXMIN><SVE_F>3): Likewise.
7179 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
7180 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
7181 (*div<SVE_F>4): Likewise.
7182
7183 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
7184
7185 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
7186 in dump string.
7187
7188 2018-07-02 Richard Biener <rguenther@suse.de>
7189
7190 PR tree-optimization/86363
7191 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
7192 memset argument refers to a non-variable address.
7193
7194 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7195
7196 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
7197 {PLUS,MINUS}_EXPR code to...
7198 (adjust_symbolic_bound): ...here,
7199 (combine_bound): ...here,
7200 (set_value_range_with_overflow): ...and here.
7201
7202 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
7203
7204 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7205 code...
7206 (extract_range_from_abs_expr): ...here.
7207
7208 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7209
7210 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7211 -fno-omit-frame-pointer when not optimizing.
7212
7213 2018-07-02 Martin Liska <mliska@suse.cz>
7214
7215 PR ipa/86279
7216 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7217 (propagate_nothrow): Likewise.
7218
7219 2018-07-02 Martin Liska <mliska@suse.cz>
7220
7221 PR ipa/86323
7222 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7223
7224 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7225
7226 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7227 function in r262149, changing "loc" param from source_location to
7228 const dump_location_t &.
7229 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7230 declaration, as above.
7231
7232 2018-07-01 Paul Koning <ni1d@arrl.net>
7233
7234 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7235 -munit-asm, -mgnu-asm, -mdec-asm.
7236 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7237 (pdp11_output_labelref): New.
7238 (pdp11_output_def): New.
7239 (pdp11_output_addr_vec_elt): New.
7240 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7241 %# and %@ format codes.
7242 (pdp11_option_override): New.
7243 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7244 (pdp11_output_ident): New.
7245 (pdp11_asm_named_section): New.
7246 (pdp11_asm_init_sections): New.
7247 (pdp11_file_start): New.
7248 (pdp11_file_end): New.
7249 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7250 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7251 %o, like %c but octal.
7252 (pdp11_option_override): New.
7253 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7254 -mdec-asm.
7255 (DATA_SECTION_ASM_OP): Ditto.
7256 (READONLY_DATA_SECTION_ASM_OP): New.
7257 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7258 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7259 (ASM_OUTPUT_LABELREF): Ditto.
7260 (ASM_OUTPUT_DEF): Ditto.
7261 (ASM_OUTPUT_EXTERNAL): New.
7262 (ASM_OUTPUT_SOURCE_FILENAME): New.
7263 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7264 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7265 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7266 %# and %@ format codes.
7267 * config/pdp11/pdp11.opt (mgnu-asm): New.
7268 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7269 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7270 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7271
7272 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7273
7274 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7275 dereferencing path[] beyond its length.
7276 (debug_path): New.
7277 (debug_all_paths): New.
7278 (rewire_first_differing_edge): New.
7279 (adjust_paths_after_duplication): New.
7280 (duplicate_thread_path): Call adjust_paths_after_duplication.
7281 Add new argument.
7282 (thread_through_all_blocks): Add new argument to
7283 duplicate_thread_path.
7284
7285 2018-06-30 Jim Wilson <jimw@sifive.com>
7286
7287 * config/riscv/predicates.md (p2m1_shift_operand): New.
7288 (high_mask_shift_operand): New.
7289 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7290 pattern using p2m1_shift_operand.
7291 (lshsi3_zero_extend_3+2): New combiner pattern using
7292 high_mask_shift_operand.
7293
7294 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7295
7296 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7297 split out from...
7298 (vect_recog_rotate_pattern): ...here.
7299 (vect_convert_input): Try to insert casts of invariants in the
7300 preheader.
7301 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7302 preheader to be empty.
7303
7304 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7305
7306 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7307 vector type. If given, install it in the new statement's
7308 STMT_VINFO_VECTYPE.
7309 (vect_element_precision): New function.
7310 (vect_unpromoted_value): New struct.
7311 (vect_unpromoted_value::vect_unpromoted_value): New function.
7312 (vect_unpromoted_value::set_op): Likewise.
7313 (vect_look_through_possible_promotion): Likewise.
7314 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7315 (vect_widened_op_tree, vect_convert_input): Likewise.
7316 (vect_convert_inputs, vect_convert_output): Likewise.
7317 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7318 to handle the optional cast of the multiplication result and
7319 vect_widened_op_tree to detect the widened multiplication itself.
7320 Do not require the input and output of promotion casts to have
7321 the same sign, but base the signedness of the operation on the
7322 input rather than the result. If the pattern includes two
7323 promotions, check that those promotions have the same sign.
7324 Do not restrict the MULT_EXPR handling to a double-width result;
7325 handle quadruple-width results and wider. Use vect_convert_inputs
7326 to convert the inputs to the common type.
7327 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7328 to handle the optional cast of the ABS result. Also allow a sign
7329 change or a sign extension between the ABS and MINUS.
7330 Use vect_widened_op_tree to detect the widened subtraction and use
7331 vect_convert_inputs to convert the inputs to the common type.
7332 (vect_handle_widen_op_by_const): Delete.
7333 (vect_recog_widen_op_pattern): New function.
7334 (vect_recog_widen_mult_pattern): Use it.
7335 (vect_recog_widen_shift_pattern): Likewise.
7336 (vect_recog_widen_sum_pattern): Use
7337 vect_look_through_possible_promotion to handle the promoted
7338 PLUS_EXPR operand.
7339
7340 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7341
7342 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7343 the containing gimple_seq *.
7344 * gimple-iterator.h (gsi_for_stmt): Declare it.
7345 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7346 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7347 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7348 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7349 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7350 checks.
7351 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7352 split out from...
7353 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7354 statement being replaced is part of an existing pattern
7355 definition sequence, inserting the new pattern statements before
7356 the original one.
7357 (vect_pattern_recog_1): Don't return a bool. If the statement
7358 is already part of a pattern, instead apply pattern matching
7359 to the pattern definition statements. Don't clear the
7360 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7361 (vect_pattern_recog): Don't break after the first match;
7362 continue processing the pattern definition statements instead.
7363 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7364
7365 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7366
7367 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7368 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7369 (vect_recog_widen_sum_pattern): Use it.
7370
7371 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7372
7373 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7374 phi is not a pattern statement and has not been replaced by
7375 a pattern statement.
7376 * tree-vect-patterns.c (type_conversion_p): Don't check
7377 STMT_VINFO_IN_PATTERN_P.
7378 (vect_recog_vector_vector_shift_pattern): Likewise.
7379 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7380 the pattern statement rather than the original statement; check
7381 directly for a WIDEN_MULT_EXPR here.
7382 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7383 vect_is_simple_use to return the pattern statement rather
7384 than the original statement; use is_pattern_stmt_p to check
7385 for such a pattern statement.
7386 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7387 to return the pattern statement rather than the original statement;
7388 don't do the same transformation here.
7389 (vect_is_simple_use): If the defining statement has been replaced
7390 by a pattern statement, return the pattern statement instead.
7391 Remove the corresponding (local) transformation from the vectype
7392 overload.
7393
7394 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7395
7396 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7397 end and default to null.
7398 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7399 (vectorizable_reduction): Update calls accordingly, dropping the
7400 gimple ** argument if the passed-back statement isn't needed.
7401 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7402 (vect_recog_rotate_pattern): Likewise.
7403 (vect_recog_mask_conversion_pattern): Likewise.
7404 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7405 (vect_mask_constant_operand_p): Likewise.
7406 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7407 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7408 (get_group_load_store_type, get_load_store_type): Likewise.
7409 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7410 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7411 (vectorizable_conversion, vectorizable_assignment): Likewise.
7412 (vectorizable_shift, vectorizable_operation): Likewise.
7413 (vectorizable_store, vect_is_simple_cond): Likewise.
7414 (vectorizable_condition, vectorizable_comparison): Likewise.
7415 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7416 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7417 and move it to the end. Cope with null def_stmt_outs.
7418
7419 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7420
7421 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7422
7423 2018-06-29 Jeff Law <law@redhat.com>
7424
7425 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7426 displacements for TARGET_V850E2V3 and newer.
7427 (TARGET_LRA_P): Remove. Defaults to LRA now.
7428 * config/v850/v850.md (sign23byte_load): Remove.
7429 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7430 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7431
7432 2018-06-29 Martin Liska <mliska@suse.cz>
7433
7434 PR lto/85759
7435 * coverage.c (coverage_init): Mangle full path name.
7436 * doc/invoke.texi: Document the change.
7437 * gcov-io.c (mangle_path): New.
7438 * gcov-io.h (mangle_path): Likewise.
7439 * gcov.c (mangle_name): Use mangle_path for path mangling.
7440
7441 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7442
7443 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7444 if starting source register is not even.
7445
7446 2018-06-29 Martin Liska <mliska@suse.cz>
7447
7448 PR tree-optimization/86263
7449 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7450 Make edge redirection.
7451
7452 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7453
7454 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7455 (dump_scope_depth): New variable.
7456 (get_dump_scope_depth): New function.
7457 (dump_begin_scope): New function.
7458 (dump_end_scope): New function.
7459 * dumpfile.h (get_dump_scope_depth): New declaration.
7460 (dump_begin_scope): New declaration.
7461 (dump_end_scope): New declaration.
7462 (class auto_dump_scope): New class.
7463 (AUTO_DUMP_SCOPE): New macro.
7464 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7465 AUTO_DUMP_SCOPE.
7466
7467 2018-06-29 Richard Biener <rguenther@suse.de>
7468
7469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7470 compute_all_dependences succeeds.
7471 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7472 exceed --param loop-max-datarefs-for-datadeps.
7473
7474 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7475
7476 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7477
7478 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7479
7480 PR target/86348
7481 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7482 alternative 0 in preferred_for_speed attribute.
7483
7484 2018-06-28 Paul Koning <ni1d@arrl.net>
7485
7486 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7487 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7488 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7489 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7490 for shift insn patterns.
7491
7492 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7493
7494 * cgraph.c (cgraph_node::get_body): Replace assignments to
7495 "dump_file" with calls to set_dump_file.
7496 * dumpfile.c (alt_dump_file): Make static, and group with...
7497 (alt_flags): ...this definition.
7498 (dumps_are_enabled): New variable.
7499 (refresh_dumps_are_enabled): New function.
7500 (set_dump_file): New function.
7501 (set_alt_dump_file): New function.
7502 (gcc::dump_manager::dump_start): Replace assignments to
7503 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7504 set_alt_dump_file.
7505 (gcc::dump_manager::dump_finish): Likewise.
7506 * dumpfile.h (alt_dump_file): Delete decl.
7507 (dumps_are_enabled): New variable decl.
7508 (set_dump_file): New function decl.
7509 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7510 global.
7511 * tree-nested.c (lower_nested_functions): Replace assignments to
7512 "dump_file" with calls to set_dump_file.
7513
7514 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7515
7516 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7517 goto_locus of each outgoing edge of each basic block.
7518
7519 2018-06-28 Richard Biener <rguenther@suse.de>
7520
7521 * dwarf2out.c (decl_scope_table): Remove.
7522 (push_decl_scope): Likewise.
7523 (pop_decl_scope): Likewise.
7524 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7525 (gen_struct_or_union_type_die): Likewise.
7526 (gen_tagged_type_die): Likewise.
7527 (dwarf2out_init): Do not initialize decl_scope_table.
7528 (dwarf2out_c_finalize): Do not free it.
7529
7530 2018-06-28 Richard Biener <rguenther@suse.de>
7531
7532 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7533 deciding whether to not re-use a DIE.
7534
7535 2018-06-28 Richard Biener <rguenther@suse.de>
7536
7537 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7538 DW_AT_abstract_origin attribute.
7539
7540 2018-06-28 Martin Liska <mliska@suse.cz>
7541
7542 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7543 Use newly introduced constants.
7544 * tree-switch-conversion.h (struct jump_table_cluster):
7545 Define max_ratio_for_size and max_ratio_for_speed.
7546
7547 2018-06-28 Martin Liska <mliska@suse.cz>
7548
7549 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7550 Add new checking assert to catch invalid state.
7551 (jump_table_cluster::can_be_handled): Handle single case
7552 clusters.
7553 (jump_table_cluster::is_beneficial): Bail out for such case.
7554 (bit_test_cluster::find_bit_tests):
7555 Add new checking assert to catch invalid state.
7556 (bit_test_cluster::can_be_handled): Handle single case
7557 clusters.
7558 (bit_test_cluster::is_beneficial): Bail out for such case.
7559 (switch_decision_tree::analyze_switch_statement):
7560 Fix comment.
7561
7562 2018-06-28 Martin Liska <mliska@suse.cz>
7563
7564 * common.opt: Introduce -completion option.
7565 * gcc.c (driver_handle_option): Handle it.
7566 (driver::main): Print completions if completion
7567 is set.
7568 * opt-suggestions.c (option_proposer::get_completions):
7569 New function.
7570 (option_proposer::suggest_completion): Likewise.
7571 (option_proposer::find_param_completions): Likewise.
7572 (verify_autocompletions): Likewise.
7573 (test_completion_valid_options): Likewise.
7574 (test_completion_valid_params): Likewise.
7575 (in_completion_p): Likewise.
7576 (empty_completion_p): Likewise.
7577 (test_completion_partial_match): Likewise.
7578 (test_completion_garbage): Likewise.
7579 (opt_proposer_c_tests): Likewise.
7580 * opt-suggestions.h: Declare new functions.
7581 * opts.c (common_handle_option): Handle OPT__completion_.
7582 * selftest-run-tests.c (selftest::run_tests): Add
7583 opt_proposer_c_tests.
7584 * selftest.c (assert_str_startswith): New.
7585 * selftest.h (assert_str_startswith): Likewise.
7586 (opt_proposer_c_tests): New.
7587 (ASSERT_STR_STARTSWITH): Likewise.
7588
7589 2018-06-28 Martin Liska <mliska@suse.cz>
7590
7591 * Makefile.in: Add opt-suggestions.o.
7592 * gcc-main.c: Include opt-suggestions.h.
7593 * gcc.c (driver::driver): Likewise.
7594 (driver::~driver): Remove m_option_suggestions.
7595 (driver::build_option_suggestions): Moved to option_proposer.
7596 (driver::suggest_option): Likewise.
7597 (driver::handle_unrecognized_options): Use option_proposer.
7598 * gcc.h (class driver): Add new memver m_option_proposer.
7599 * opt-suggestions.c: New file.
7600 * opt-suggestions.h: New file.
7601
7602 2018-06-28 Martin Liska <mliska@suse.cz>
7603
7604 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7605 (auto_string_vec::~auto_string_vec): Likewise.
7606
7607 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7608
7609 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7610 prevent_decl_creation_for_types fields up and add reset_location field.
7611 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7612 statement if id->reset_location is true.
7613 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7614 id->reset_location is true.
7615 (copy_phis_for_bb): Force input_location on the arguments if
7616 id->reset_location is true.
7617 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7618 is set on the function to be inlined.
7619
7620 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7621
7622 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7623
7624 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7625
7626 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7627 registers for Pmode.
7628 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7629 hard registers for the clobbered pseudo.
7630
7631 2018-06-27 Paul Koning <ni1d@arrl.net>
7632
7633 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7634 mutually exclusive options.
7635 * config/pdp11/constraints.md (h): New constraint.
7636 (O): Update definition to match shift code generation.
7637 (D): New constraint.
7638 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7639 (CCFP): Remove.
7640 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7641 function.
7642 (output_jump): Change arguments.
7643 (pdp11_fixed_cc_regs): New function.
7644 (pdp11_cc_mode): Ditto.
7645 (pdp11_expand_shift): Ditto.
7646 (pdp11_assemble_shift): Ditto.
7647 (pdp11_small_shift): Ditto.
7648 (pdp11_branch_cost): Remove.
7649 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7650 from output.
7651 (pdp11_register_move_cost): Update for CC registers.
7652 (pdp11_rtx_costs): Add case for LSHIFTRT.
7653 (pdp11_output_jump): Add CCNZ mode conditional branches.
7654 (notice_update_cc_on_set): Remove.
7655 (pdp11_cc_mode): New function.
7656 (simple_memory_operand): Correct pre/post decrement case.
7657 (no_side_effect_operand): New function.
7658 (pdp11_regno_reg_class): Add CC_REGS class.
7659 (pdp11_fixed_cc_regs): New function.
7660 (pdp11_small_shift): New function.
7661 (pdp11_expand_shift): New function to expand shift insns.
7662 (pdp11_assemble_shift): New function to output shifts.
7663 (pdp11_branch_cost): Remove.
7664 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7665 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7666 (WCHAR_TYPE): Ditto.
7667 (PTRDIFF_TYPE): Ditto.
7668 (ADJUST_INSN_LENGTH): New macro.
7669 (FIXED_REGISTERS): Add CC registers.
7670 (CALL_USED_REGISTERS): Ditto.
7671 (reg_class): Ditto.
7672 (REG_CLASS_NAMES): Ditto.
7673 (REG_CLASS_CONTENTS): Ditto.
7674 (SELECT_CC_MODE): Use new function.
7675 (TARGET_FLAGS_REGNUM): New macro.
7676 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7677 (cc0_reg_rtx): Remove.
7678 (CC_STATUS_MDEP): Remove.
7679 (CC_STATUS_MDEFP_INIT): Remove.
7680 (CC_IN_FPU): Remove.
7681 (NOTICE_UPDATE_CC): Remove.
7682 (REGISTER_NAMES): Add CC registers.
7683 (BRANCH_COST): Change to constant 1.
7684 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7685 handling.
7686 * config/pdp11/pdp11.opt (mbcopy): Remove.
7687 (mbcopy-builtin): Remove.
7688 (mbranch-cheap): Remove.
7689 (mbranch-expensive): Remove.
7690 * config/pdp11/predicates.md (expand_shift_operand): Update to
7691 match shift code generation.
7692 (ccnz_operator): New predicate.
7693 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7694 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7695 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7696 exclusive options.
7697 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7698 description of O constraint.
7699
7700 2018-06-27 Jeff Law <law@redhat.com>
7701 Austin Law <austinklaw@gmail.com>
7702
7703 * config/v850/v850.md (addsi3_set_flags): New pattern.
7704 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7705 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7706 (zero_extendhisi2_v850_set_flags): Likewise.
7707 (zero_extendqisi2_v850_set_flags): Likewise.
7708 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7709 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7710 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7711
7712 * config/v850/v850-protos.h (notice_update_cc): Remove.
7713 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7714 (v850_print_operand): Handle 'D' and "d".
7715 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7716 Add handling of arithmetic/logical operations compared against zero.
7717 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7718 Do not look at v850_compare_op, instead get mode from last argument.
7719 (v850_gen_compare): Remove
7720 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7721 after reload for prologue insns.
7722 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7723 patterns.
7724 (construct_save_jarl): Likewise.
7725 (TARGET_FLAGS_REGNUM): Define.
7726 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7727 (NOTICE_UPDATE_CC): Remove.
7728 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7729 than cc0. Conditionalize on reload_completed.
7730 (cmpsi_insn, setfcc_insn): Likewise.
7731 (tst1 splitter): Turn into define_and_split which sets the flags
7732 after reload.
7733 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7734 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7735 (cstoresf4, cstoredf4): Clobber the flags.
7736 (cmpsi, cmpsf, cmpdf): Remove expanders.
7737 (setf_insn): Remove pattern.
7738 (addsi3): Turn into define_and_split which clobbers the flags after
7739 reload and a suitable pattern (addsi3_clobber_flags) for use after
7740 reload.
7741 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7742 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7743 (ashrsi3, ashrsi3_v850e2): Likewise.
7744 (bins): Clobber the flags.
7745 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7746 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7747 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7748 (call_value_internal_short, call_value_internal_long): Likewise.
7749 (callt_save_interrupt, callt_return_interrupt): Likewise.
7750 (save_interrupt, return_interrupt): Likewise.
7751 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7752 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7753 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7754 (All FP comparisons): Only allow after reload has completed.
7755 (trfsr): Likewise.
7756 (divh, divhu): Tweak output template.
7757 (branch_z_normal, branch_z_invert): Remove
7758 (branch_nz_normal, branch_nz_invert): Likewise.
7759 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7760
7761 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7762 * config/v850/v850.c (notice_update_cc): Remove.
7763 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7764 (CC_NO_CARRY): Likewise.
7765 (NOTICE_UPDATE_CC): Define to nothing.
7766 * config/v850/v850.md: Remove block comment on cc0 handling
7767 Remove "cc" attribute from all patterns. Remove cc_status handling
7768 from all patterns. Minor formatting fixes.
7769
7770 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7771
7772 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7773 (cortex-a76.cortex-a55): Likewise.
7774 * config/aarch64/aarch64-tune.md: Regenerate.
7775 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7776 cortex-a76.cortex-a55.
7777
7778 2018-06-27 Jeff Law <law@redhat.com>
7779
7780 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7781 (MULTILIB_DIRNAMES): Similarly.
7782
7783 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7784
7785 * gimple.h (gimple_return_retbnd): Delete.
7786 (gimple_return_set_retbnd): Likewise.
7787 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7788 gimple_return_set_retbnd.
7789 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7790 gimple_return_retbnd and adjust.
7791 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7792 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7793 Explicitly return NULL in a couple more cases. Move assertion
7794 on debug statements and remove unreachable code.
7795 (reset_debug_binding): Do not test id->retbnd.
7796 (expand_call_inline): Do not set it.
7797
7798 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7799
7800 * configure.ac: Add --disable-gcov option.
7801 * configure: Regenerate.
7802 * Makefile.in: Honour @enable_gcov@.
7803 * doc/install.texi: Document --disable-gcov.
7804
7805 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7806
7807 * config/arm/arm-cpus.in (cortex-a76): New entry.
7808 (cortex-a76.cortex-a55): Likewise.
7809 * config/arm/arm-tables.opt: Regenerate.
7810 * config/arm/arm-tune.md: Likewise.
7811 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7812 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7813 cortex-a76.cortex-a55.
7814
7815 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7816
7817 PR target/85769
7818 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7819
7820 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7821
7822 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7823 comment.
7824 (EPILOGUE_USES): Likewise.
7825
7826 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7827
7828 * tree-inline.c (remap_location): New function extracted from...
7829 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7830 (copy_phis_for_bb): ...here. Call remap_location.
7831 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7832
7833 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7834
7835 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7836 unaligned vsx for 16B memset.
7837
7838 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7839
7840 PR target/86285
7841 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7842 ieee128_float_type_node to long_double_type_node unless
7843 TARGET_LONG_DOUBLE_128 is set.
7844
7845 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7846
7847 * cfgloop.c (get_loop_location): Convert return type from
7848 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7849 by implicit construction from rtx_insn *, and using
7850 dump_user_location_t::from_function_decl for the fallback case.
7851 * cfgloop.h (get_loop_location): Convert return type from
7852 location_t to dump_user_location_t.
7853 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7854 dump_printf_loc to pass in a dump_location_t rather than a
7855 location_t, via the gimple stmt.
7856 * coverage.c (get_coverage_counts): Update calls to
7857 dump_printf_loc to pass in dump_location_t rather than a
7858 location_t.
7859 * doc/optinfo.texi (Dump types): Convert example of
7860 dump_printf_loc from taking "locus" to taking "insn". Update
7861 description of the "_loc" calls to cover dump_location_t.
7862 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7863 "selftest.h".
7864 (dump_user_location_t::dump_user_location_t): New constructors,
7865 from gimple *stmt and rtx_insn *.
7866 (dump_user_location_t::from_function_decl): New function.
7867 (dump_loc): Make static.
7868 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7869 const dump_location_t &.
7870 (dump_generic_expr_loc): Delete.
7871 (dump_printf_loc): Convert param "loc" from location_t to
7872 const dump_location_t &.
7873 (selftest::test_impl_location): New function.
7874 (selftest::dumpfile_c_tests): New function.
7875 * dumpfile.h: Include "profile-count.h".
7876 (class dump_user_location_t): New class.
7877 (struct dump_impl_location_t): New struct.
7878 (class dump_location_t): New class.
7879 (dump_printf_loc): Convert 2nd param from source_location to
7880 const dump_location_t &.
7881 (dump_generic_expr_loc): Delete.
7882 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7883 const dump_location_t &.
7884 * gimple-fold.c (fold_gimple_assign): Update call to
7885 dump_printf_loc to pass in a dump_location_t rather than a
7886 location_t, via the gimple stmt.
7887 (gimple_fold_call): Likewise.
7888 * gimple-loop-interchange.cc
7889 (loop_cand::analyze_iloop_reduction_var): Update for change to
7890 check_reduction_path.
7891 (tree_loop_interchange::interchange): Update for change to
7892 find_loop_location.
7893 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7894 change in return-type of find_loop_location.
7895 (graphite_regenerate_ast_isl): Likewise.
7896 * graphite-optimize-isl.c (optimize_isl): Likewise.
7897 * graphite.c (graphite_transform_loops): Likewise.
7898 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7899 pass in a dump_location_t rather than a location_t, via the
7900 gimple stmt.
7901 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7902 * ipa.c (walk_polymorphic_call_targets): Likewise.
7903 * loop-unroll.c (report_unroll): Convert "locus" param from
7904 location_t to dump_location_t.
7905 (decide_unrolling): Update for change to get_loop_location's
7906 return type.
7907 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7908 location_t to dump_user_location_t.
7909 (grid_find_single_omp_among_assignments_1): Updates calls to
7910 dump_printf_loc to pass in a dump_location_t rather than a
7911 location_t, via the gimple stmt.
7912 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7913 location_t to dump_location_t. Updates calls to dump_printf_loc
7914 to pass in a dump_location_t rather than a location_t, via the
7915 gimple stmt.
7916 (grid_inner_loop_gridifiable_p): Likewise.
7917 (grid_dist_follows_simple_pattern): Likewise.
7918 (grid_gfor_follows_tiling_pattern): Likewise.
7919 (grid_target_follows_gridifiable_pattern): Likewise.
7920 (grid_attempt_target_gridification): Convert initialization
7921 of local "grid" from memset to zero-initialization; FIXME: does
7922 this require C++11? Update call to dump_printf_loc to pass in a
7923 optinfo_location rather than a location_t, via the gimple stmt.
7924 * profile.c (read_profile_edge_counts): Updates call to
7925 dump_printf_loc to pass in a dump_location_t rather than a
7926 location_t
7927 (compute_branch_probabilities): Likewise.
7928 * selftest-run-tests.c (selftest::run_tests): Call
7929 dumpfile_c_tests.
7930 * selftest.h (dumpfile_c_tests): New decl.
7931 * tree-loop-distribution.c (pass_loop_distribution::execute):
7932 Update for change in return type of find_loop_location.
7933 * tree-parloops.c (parallelize_loops): Likewise.
7934 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7935 "locus" from location_t to dump_user_location_t.
7936 (canonicalize_loop_induction_variables): Likewise.
7937 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7938 for change in return type of find_loop_location.
7939 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7940 to dump_printf_loc to pass in a dump_location_t rather than a
7941 location_t, via the stmt.
7942 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7943 Likewise.
7944 * tree-vect-loop-manip.c (find_loop_location): Convert return
7945 type from source_location to dump_user_location_t.
7946 (vect_do_peeling): Update for above change.
7947 (vect_loop_versioning): Update for change in type of
7948 vect_location.
7949 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7950 from location_t to dump_user_location_t.
7951 (vect_estimate_min_profitable_iters): Update for change in type
7952 of vect_location.
7953 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7954 location_t to dump_location_t.
7955 (vect_slp_bb): Update for change in type of vect_location.
7956 * tree-vectorizer.c (vect_location): Convert from source_location
7957 to dump_user_location_t.
7958 (try_vectorize_loop_1): Update for change in vect_location's type.
7959 (vectorize_loops): Likewise.
7960 (increase_alignment): Likewise.
7961 * tree-vectorizer.h (vect_location): Convert from source_location
7962 to dump_user_location_t.
7963 (find_loop_location): Convert return type from source_location to
7964 dump_user_location_t.
7965 (check_reduction_path): Convert 1st param from location_t to
7966 dump_user_location_t.
7967 * value-prof.c (check_counter): Update call to dump_printf_loc to
7968 pass in a dump_user_location_t rather than a location_t; update
7969 call to error_at for change in type of "locus".
7970 (check_ic_target): Update call to dump_printf_loc to
7971 pass in a dump_user_location_t rather than a location_t, via the
7972 call_stmt.
7973
7974 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7975
7976 * config/s390/s390.h (enum processor_flags): Do not use
7977 default tune parameter when -march was specified.
7978
7979 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7980
7981 PR target/86314
7982 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7983 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7984 operands.
7985
7986 2018-06-26 Richard Biener <rguenther@suse.de>
7987
7988 PR tree-optimization/86287
7989 PR bootstrap/86316
7990 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7991 (vect_analyze_loop): Initialize n_stmts.
7992
7993 2018-06-26 Richard Biener <rguenther@suse.de>
7994
7995 PR middle-end/86271
7996 * fold-const.c (fold_convertible_p): Pointer extension
7997 isn't valid.
7998
7999 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
8000
8001 PR debug/86064
8002 * dwarf2out.c (loc_list_has_views): Adjust comments.
8003 (dw_loc_list): Split single cross-partition range with
8004 nonzero locview.
8005
8006 2018-06-25 Jeff Law <law@redhat.com>
8007
8008 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
8009 on -mbig-switch by default.
8010
8011 * config/v850/predicates.md (const_float_1_operand): Fix match_code
8012 test.
8013 (const_float_0_operand): Remove unused predicate.
8014 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
8015 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
8016 (recipsf2): New expander. Original pattern now called
8017 (recipsf2_insn).
8018 (recipdf2, recipdf2_insn): Similarly.
8019 (rsqrtsf2, rsqrtsf2_insn): Similarly
8020 (rsqrtdf2, rsqrtdf2_insn): Similarly
8021
8022 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
8023
8024 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
8025 Simplify logic for FreeBSD (twice).
8026
8027 2018-06-25 Martin Sebor <msebor@redhat.com>
8028
8029 PR tree-optimization/86204
8030 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
8031 a strnlen result if it's less than the length of the string.
8032
8033 2018-06-25 Martin Sebor <msebor@redhat.com>
8034
8035 PR tree-optimization/85700
8036 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
8037 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
8038 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
8039
8040 2018-06-25 Martin Sebor <msebor@redhat.com>
8041
8042 * doc/extend.texi (Zero-length arrays): Update and clarify.
8043
8044 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
8045
8046 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8047 added IEEE/IBM long double multilib support on PowerPC little
8048 endian Linux systems.
8049 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
8050 (MULTILIB_DEFAULTS): Likewise.
8051 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8052 Likewise.
8053 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
8054 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
8055 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
8056
8057 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
8058
8059 PR middle-end/86311
8060 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
8061 (REORDER_45): Likewise.
8062
8063 2018-06-25 Jeff Law <law@redhat.com>
8064
8065 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
8066 dividend to 32 bits. Adjust length.
8067 (udivmodhi4): Cleanup output template. Fix length.
8068
8069 2018-06-25 Carl Love <cel@us.ibm.com>
8070
8071 * config/rs6000/vsx.md: Change word selector to prefered location.
8072
8073 2018-06-25 Richard Biener <rguenther@suse.de>
8074
8075 PR tree-optimization/86304
8076 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
8077 epilogue-if-converted loops as well.
8078
8079 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
8080
8081 * lto-section-out.c (lto_begin_section): Do not print section
8082 name for noaddr and unnumbered dumps.
8083
8084 2018-06-25 Richard Biener <rguenther@suse.de>
8085
8086 * tree-vectorizer.h (struct vec_info_shared): New structure
8087 with parts split out from struct vec_info and loop_nest from
8088 struct _loop_vec_info.
8089 (struct vec_info): Adjust accordingly.
8090 (struct _loop_vec_info): Likewise.
8091 (LOOP_VINFO_LOOP_NEST): Adjust.
8092 (LOOP_VINFO_DATAREFS): Likewise.
8093 (LOOP_VINFO_DDRS): Likewise.
8094 (struct _bb_vec_info): Likewise.
8095 (BB_VINFO_DATAREFS): Likewise.
8096 (BB_VINFO_DDRS): Likewise.
8097 (struct _stmt_vec_info): Add dr_aux member.
8098 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
8099 (DR_MISALIGNMENT_UNINITIALIZED): New.
8100 (set_dr_misalignment): Adjust.
8101 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
8102 (vect_analyze_loop): Adjust prototype.
8103 (vect_analyze_loop_form): Likewise.
8104 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8105 Compute dependences lazily.
8106 (vect_record_base_alignments): Use shared datarefs/ddrs.
8107 (vect_verify_datarefs_alignment): Likewise.
8108 (vect_analyze_data_refs_alignment): Likewise.
8109 (vect_analyze_data_ref_accesses): Likewise.
8110 (vect_analyze_data_refs): Likewise.
8111 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
8112 constructor parameter for shared part.
8113 (vect_analyze_loop_form): Pass in shared part and adjust.
8114 (vect_analyze_loop_2): Pass in storage for the number of
8115 stmts. Move loop nest finding to the caller. Compute
8116 datarefs lazily.
8117 (vect_analyze_loop): Pass in shared part.
8118 (vect_transform_loop): Verify shared datarefs are unchanged.
8119 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
8120 constructor parameter for shared part.
8121 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
8122 (vect_slp_bb): Verify shared datarefs are unchanged before
8123 transform.
8124 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
8125 change.
8126 (new_stmt_vec_info): Initialize DR_AUX misalignment to
8127 DR_MISALIGNMENT_UNINITIALIZED.
8128 * tree-vectorizer.c (vec_info::vec_info): Add constructor
8129 parameter for shared part.
8130 (vec_info::~vec_info): Adjust.
8131 (vec_info_shared::vec_info_shared): New.
8132 (vec_info_shared::~vec_info_shared): Likewise.
8133 (vec_info_shared::save_datarefs): Likewise.
8134 (vec_info_shared::check_datarefs): Likewise.
8135 (try_vectorize_loop_1): Construct shared part live for analyses
8136 of a single loop for multiple vector sizes.
8137 * tree-parloops.c (gather_scalar_reductions): Adjust.
8138
8139 2018-06-25 Richard Biener <rguenther@suse.de>
8140
8141 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
8142 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
8143 (vect_analyze_data_refs): Remove similar code from here and
8144 simplify accordingly.
8145
8146 2018-06-25 Richard Biener <rguenther@suse.de>
8147
8148 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
8149 for reverse storage order accesses rather than asserting
8150 they cannot happen here.
8151
8152 2018-06-25 Tom de Vries <tdevries@suse.de>
8153
8154 PR debug/86257
8155 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
8156 Use data16 instead of .byte for insn prefix.
8157
8158 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
8159
8160 PR C++/86082
8161 * parser.c (make_char_string_pack): Pass this literal chars
8162 through cpp_interpret_string.
8163 (cp_parser_userdef_numeric_literal): Check the result of
8164 make_char_string_pack.
8165
8166 2018-06-24 Maya Rashish <coypu@sdf.org>
8167
8168 * ginclude/stddef.h: Simplify conditions around avoiding
8169 re-definition of __size_t.
8170
8171 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8172
8173 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
8174 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
8175
8176 2018-06-22 Maya Rashish <coypu@sdf.org>
8177
8178 * doc/invoke.texi (mno-fancy-math-387): Update for changes
8179 made to OpenBSD and NetBSD through the years.
8180
8181 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
8182
8183 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8184 behavior of vec_pack (vector double, vector double) to match
8185 behavior of vec_float2 (vector double, vector double).
8186
8187 2018-06-22 Olivier Hainque <hainque@adacore.com>
8188
8189 * gimplify.c (gimplify_function_tree): Prevent creation
8190 of a trampoline for the address of the current function
8191 passed to entry/exit instrumentation hooks.
8192
8193 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
8194
8195 PR target/86222
8196 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
8197 correctly.
8198
8199 2018-06-22 Martin Liska <mliska@suse.cz>
8200
8201 PR tree-optimization/86263
8202 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8203 Bail out if is_enabled is false.
8204 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8205 New declaration.
8206 (jump_table_cluster::is_enabled): New function.
8207
8208 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8209
8210 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8211 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8212 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8213 (lto_input_ts_binfo_tree_pointers): Likewise.
8214 * tree-streamer-out.c (streamer_write_tree_bitfields,
8215 write_ts_binfo_tree_pointers): Likewise.
8216 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8217
8218 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8219
8220 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8221
8222 2018-06-22 Martin Liska <mliska@suse.cz>
8223
8224 * symbol-summary.h (get): Make it pure and inline move
8225 functionality from ::get function.
8226 (get): Remove and inline into ::get and ::get_create.
8227 (get_create): Move code from ::get function.
8228
8229 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8230
8231 PR target/85994
8232 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8233 -x assembler-with-cpp.
8234
8235 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8236
8237 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8238 _FILE_OFFSET_BITS=64 for C++.
8239
8240 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8241
8242 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8243 conversion insn that shows up when pr85657-3.c is compiled using
8244 IEEE 128-bit long double.
8245 (neg<mode>2_internal): Use the correct mode to check whether the
8246 mode is IBM extended.
8247 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8248 multiply and divide external functions from being created more
8249 than once.
8250
8251 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8252
8253 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8254 functions.
8255 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8256 the edge can be forwarded.
8257 (cfg_layout_merge_blocks): Likewise.
8258
8259 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8260
8261 * except.c (finish_eh_generation): Commit edge insertions only after
8262 the EH edges have been redirected from post-landing to landing pads.
8263
8264 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8265
8266 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8267 create_tmp_var_for to create the FRAME decl.
8268 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8269
8270 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8271
8272 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8273 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8274 debug statement when resetting its value.
8275 (expand_call_inline): Copy the locus of the call onto the assignment
8276 of the return value, if any. Use local variable in more cases.
8277
8278 2018-06-21 Martin Liska <mliska@suse.cz>
8279
8280 * ipa-pure-const.c (propagate_nothrow): Use
8281 funct_state_summaries->get.
8282 (dump_malloc_lattice): Likewise.
8283 (propagate_malloc): Likewise.
8284
8285 2018-06-21 Richard Biener <rguenther@suse.de>
8286
8287 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8288 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8289 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8290 comment.
8291 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8292 BLOCK_ABSTRACT_ORIGIN unconditionally.
8293
8294 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8295
8296 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8297 deleting it.
8298 * ipa-reference.c (ipa_reference_c_finalize): Delete
8299 ipa_ref_opt_sum_summaries and set it to NULL.
8300
8301 2018-06-21 Tom de Vries <tdevries@suse.de>
8302
8303 PR tree-optimization/85859
8304 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8305 test with comment from bb_no_side_effects_p.
8306
8307 2018-06-21 Richard Biener <rguenther@suse.de>
8308
8309 PR tree-optimization/86232
8310 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8311 max for constant niter.
8312
8313 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8314
8315 * config/aarch64/aarch64-simd.md
8316 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8317
8318 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8319
8320 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8321 Make opernads of the unspec commutative.
8322
8323 2018-06-21 Richard Biener <rguenther@suse.de>
8324
8325 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8326 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8327 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8328 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8329 NULL DR_STEP.
8330 (vect_record_base_alignments): Do not record base alignment
8331 for gathers or scatters.
8332 (vect_compute_data_ref_alignment): Drop return value that is always
8333 true. Bail out early for gathers or scatters.
8334 (vect_enhance_data_refs_alignment): Bail out early for gathers
8335 or scatters.
8336 (vect_find_same_alignment_drs): Likewise.
8337 (vect_analyze_data_refs_alignment): Remove dead code.
8338 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8339 (vect_analyze_data_refs): For possible gathers or scatters do
8340 not create an alternate DR, just check their possible validity
8341 and mark them. Adjust DECL_NONALIASED handling to not rely
8342 on DR_BASE_ADDRESS.
8343 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8344 update inits of gathers or scatters.
8345 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8346 Also copy gather/scatter flag to pattern vinfo.
8347
8348 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8349
8350 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8351 behavior of vec_packsu (vector unsigned long long, vector unsigned
8352 long long) to match behavior of vec_packs with same signature.
8353
8354 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8355 Thomas Schwinge <thomas@codesourcery.com>
8356 Cesar Philippidis <cesar@codesourcery.com>
8357
8358 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8359 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8360 (gimplify_adjust_omp_clauses): Likewise.
8361 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8362 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8363 (gimplify_omp_target_update): Update handling of acc update and
8364 enter/exit data.
8365 * omp-low.c (install_var_field): Remove unused parameter
8366 base_pointers_restrict.
8367 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8368 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8369 FINALIZE}
8370 (omp_target_base_pointers_restrict_p): Delete.
8371 (scan_omp_target): Update call to scan_sharing_clauses.
8372 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8373 FINALIZE}.
8374 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8375 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8376 (convert_local_omp_clauses): Likewise.
8377 * tree-pretty-print.c (dump_omp_clause): Likewise.
8378 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8379 FINALIZE}.
8380 (omp_clause_code_name): Likewise.
8381
8382 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8383
8384 PR debug/86194
8385 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8386 be narrowed.
8387
8388 PR tree-optimization/86231
8389 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8390 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8391
8392 2018-06-20 Tom de Vries <tdevries@suse.de>
8393
8394 PR tree-optimization/86097
8395 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8396 iv type if signedness of iv type is not the same as that of *nit.
8397
8398 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8399
8400 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8401 EDGE_EH edges, verify they are all EDGE_EH.
8402
8403 2018-06-20 Maya Rashish <coypu@sdf.org>
8404
8405 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8406
8407 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8408
8409 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8410 * config/aarch64/aarch64.c (xgene1_tunings): Add
8411 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8412 (aarch64_mode_valid_for_sched_fusion_p):
8413 Allow 16-byte modes.
8414 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8415 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8416 128-bit modes.
8417 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8418 New pattern.
8419 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8420 * config/aarch64/iterators.md (VQ2): New mode iterator.
8421
8422 2018-06-20 Martin Liska <mliska@suse.cz>
8423
8424 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8425 Change default ratio from 10 to 8.
8426
8427 2018-06-20 Martin Liska <mliska@suse.cz>
8428
8429 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8430 New.
8431 (bit_test_cluster::find_bit_tests): Likewise.
8432 (switch_decision_tree::analyze_switch_statement): Find clusters.
8433 * tree-switch-conversion.h (struct jump_table_cluster): Document
8434 hierarchy.
8435
8436 2018-06-20 Martin Liska <mliska@suse.cz>
8437
8438 * tree-switch-conversion.c (switch_conversion::collect):
8439 Record m_uniq property.
8440 (switch_conversion::expand): Bail out for special conditions.
8441 (group_cluster::~group_cluster): New.
8442 (group_cluster::group_cluster): Likewise.
8443 (group_cluster::dump): Likewise.
8444 (jump_table_cluster::emit): New.
8445 (switch_decision_tree::fix_phi_operands_for_edges): New.
8446 (struct case_node): Remove struct.
8447 (jump_table_cluster::can_be_handled): New.
8448 (case_values_threshold): Moved to header.
8449 (reset_out_edges_aux): Likewise.
8450 (jump_table_cluster::is_beneficial): New.
8451 (bit_test_cluster::can_be_handled): Likewise.
8452 (add_case_node): Remove.
8453 (bit_test_cluster::is_beneficial): New.
8454 (case_bit_test::cmp): New.
8455 (bit_test_cluster::emit): New.
8456 (expand_switch_as_decision_tree_p): Remove.
8457 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8458 (fix_phi_operands_for_edge): Likewise.
8459 (switch_decision_tree::analyze_switch_statement): New.
8460 (compute_cases_per_edge): Move ...
8461 (switch_decision_tree::compute_cases_per_edge): ... here.
8462 (try_switch_expansion): Likewise.
8463 (switch_decision_tree::try_switch_expansion): Likewise.
8464 (record_phi_operand_mapping): Likewise.
8465 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8466 (emit_case_decision_tree): Likewise.
8467 (switch_decision_tree::emit): Likewise.
8468 (balance_case_nodes): Likewise.
8469 (switch_decision_tree::balance_case_nodes): Likewise.
8470 (dump_case_nodes): Likewise.
8471 (switch_decision_tree::dump_case_nodes): Likewise.
8472 (emit_jump): Likewise.
8473 (switch_decision_tree::emit_jump): Likewise.
8474 (emit_cmp_and_jump_insns): Likewise.
8475 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8476 (emit_case_nodes): Likewise.
8477 (switch_decision_tree::emit_case_nodes): Likewise.
8478 (conditional_probability): Remove.
8479 * tree-switch-conversion.h (enum cluster_type): New.
8480 (PRINT_CASE): New.
8481 (struct cluster): Likewise.
8482 (cluster::cluster): Likewise.
8483 (struct simple_cluster): Likewise.
8484 (simple_cluster::simple_cluster): Likewise.
8485 (struct group_cluster): Likewise.
8486 (struct jump_table_cluster): Likewise.
8487 (struct bit_test_cluster): Likewise.
8488 (struct min_cluster_item): Likewise.
8489 (struct case_tree_node): Likewise.
8490 (case_tree_node::case_tree_node): Likewise.
8491 (jump_table_cluster::case_values_threshold): Likewise.
8492 (struct case_bit_test): Likewise.
8493 (struct switch_decision_tree): Likewise.
8494 (struct switch_conversion): Likewise.
8495 (switch_decision_tree::reset_out_edges_aux): Likewise.
8496
8497 2018-06-20 Martin Liska <mliska@suse.cz>
8498
8499 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8500 (hoist_edge_and_branch_if_true): Likewise.
8501 (expand_switch_using_bit_tests_p): Likewise.
8502 (struct case_bit_test): Likewise.
8503 (case_bit_test_cmp): Likewise.
8504 (emit_case_bit_tests): Likewise.
8505 (switch_conversion::switch_conversion): New class.
8506 (struct switch_conv_info): Remove old struct.
8507 (collect_switch_conv_info): More to ...
8508 (switch_conversion::collect): ... this.
8509 (check_range): Likewise.
8510 (switch_conversion::check_range): Likewise.
8511 (check_all_empty_except_final): Likewise.
8512 (switch_conversion::check_all_empty_except_final): Likewise.
8513 (check_final_bb): Likewise.
8514 (switch_conversion::check_final_bb): Likewise.
8515 (create_temp_arrays): Likewise.
8516 (switch_conversion::create_temp_arrays): Likewise.
8517 (free_temp_arrays): Likewise.
8518 (gather_default_values): Likewise.
8519 (switch_conversion::gather_default_values): Likewise.
8520 (build_constructors): Likewise.
8521 (switch_conversion::build_constructors): Likewise.
8522 (constructor_contains_same_values_p): Likewise.
8523 (switch_conversion::contains_same_values_p): Likewise.
8524 (array_value_type): Likewise.
8525 (switch_conversion::array_value_type): Likewise.
8526 (build_one_array): Likewise.
8527 (switch_conversion::build_one_array): Likewise.
8528 (build_arrays): Likewise.
8529 (switch_conversion::build_arrays): Likewise.
8530 (gen_def_assigns): Likewise.
8531 (switch_conversion::gen_def_assigns): Likewise.
8532 (prune_bbs): Likewise.
8533 (switch_conversion::prune_bbs): Likewise.
8534 (fix_phi_nodes): Likewise.
8535 (switch_conversion::fix_phi_nodes): Likewise.
8536 (gen_inbound_check): Likewise.
8537 (switch_conversion::gen_inbound_check): Likewise.
8538 (process_switch): Use the newly created class.
8539 (switch_conversion::expand): New.
8540 (switch_conversion::~switch_conversion): New.
8541 * tree-switch-conversion.h: New file.
8542
8543 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8544
8545 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8546 tree-vect-patterns.c.
8547 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8548 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8549 (vect_recog_sad_pattern): Likewise.
8550 (vect_recog_widen_sum_pattern): Likewise.
8551 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8552 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8553 (vect_recog_rotate_pattern): Likewise.
8554 (vect_recog_mult_pattern): Likewise.
8555 (vect_recog_vector_vector_shift_pattern): Likewise.
8556 (vect_recog_divmod_pattern): Likewise.
8557 (vect_recog_mixed_size_cond_pattern): Likewise.
8558 (vect_recog_bool_pattern): Likewise.
8559 (vect_recog_mask_conversion_pattern): Likewise.
8560 (vect_try_gather_scatter_pattern): Likewise.
8561 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8562 (vect_recog_over_widening_pattern): Likewise.
8563 (vect_recog_gather_scatter_pattern): Likewise.
8564 (vect_recog_func_ptr): Move from tree-vectorizer.h
8565 (vect_vect_recog_func_ptrs): Move further down the file.
8566 (vect_recog_func): Likewise. Remove the third argument.
8567 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8568 (vect_pattern_recog_1): Expect the pattern function to do any
8569 necessary target tests. Also expect it to provide a vector type.
8570 Remove the type_in handling.
8571
8572 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8573
8574 * tree-vect-patterns.c (vect_pattern_detected): New function.
8575 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8576 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8577 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8578 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8579 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8580 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8581 (vect_recog_mask_conversion_pattern)
8582 (vect_try_gather_scatter_pattern): Likewise.
8583
8584 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8585
8586 * tree-vect-patterns.c (vect_get_internal_def): New function.
8587 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8588 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8589 (search_type_for_mask_1): Use it.
8590
8591 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8592
8593 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8594 redundant WIDEN_SUM_EXPR handling.
8595 (vect_recog_sad_pattern): Likewise.
8596
8597 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8598
8599 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8600 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8601 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8602 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8603 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8604
8605 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8606
8607 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8608 use the stmt_vec_info of the original bb statement for the
8609 new zero assignment, even if the call is part of a pattern.
8610
8611 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8612
8613 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8614 that the sequence is attached to the original statement rather
8615 than the pattern statement.
8616 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8617 PATTERN_DEF_SEQ from the original statement rather than
8618 the main pattern statement.
8619 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8620 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8621 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8622
8623 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8624
8625 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8626 definition statements before the early exit for statements that aren't
8627 live or relevant.
8628 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8629 split out from...
8630 (vect_transform_loop): ...here. Process pattern definition
8631 statements without first checking whether the main pattern
8632 statement is live or relevant.
8633
8634 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8635
8636 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8637 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8638
8639 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8640
8641 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8642 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8643 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8644 (expand_block_compare): Change select_block_compare_mode call.
8645 (expand_strncmp_align_check): Use new functions, fix comment.
8646 (emit_final_str_compare_gpr): New function.
8647 (expand_strn_compare): Refactor and clean up code.
8648 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8649
8650 2018-06-19 Tony Reix <tony.reix@atos.com>
8651 Damien Bergamini <damien.bergamini@atos.com>
8652 David Edelsohn <dje.gcc@gmail.com>
8653
8654 * collect2.c (static_obj): New variable.
8655 (static_libs): New variable.
8656 (is_in_list): Uncomment declaration.
8657 (main): Track AIX libraries linked statically.
8658 (is_in_list): Uncomment definition.
8659 (scan_prog_file): Don't add AIX shared libraries initializer
8660 to constructor list if linking statically.
8661
8662 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8663
8664 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8665 constant.
8666 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8667
8668 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8669
8670 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8671 blocks.
8672
8673 2018-06-19 Martin Liska <mliska@suse.cz>
8674
8675 * config/i386/i386.c (ix86_can_inline_p): Do not use
8676 ipa_fn_summaries::get_create.
8677 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8678 get.
8679 (devirtualization_time_bonus): Likewise.
8680 (ipcp_propagate_stage): Likewise.
8681 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8682 (edge_set_predicate): Likewise.
8683 (evaluate_conditions_for_known_args): Likewise.
8684 (evaluate_properties_for_edge): Likewise.
8685 (ipa_call_summary::reset): Tranform to ...
8686 (ipa_call_summary::~ipa_call_summary): ... this.
8687 (ipa_fn_summary::reset): Transform to ...
8688 (ipa_fn_summary::~ipa_fn_summary): ... this.
8689 (ipa_fn_summary_t::remove): Rename to ...
8690 (ipa_fn_summary_t::remove_callees): ... this.
8691 (ipa_fn_summary_t::duplicate): Use placement new
8692 instead of memory copy.
8693 (ipa_call_summary_t::duplicate): Likewise.
8694 (ipa_call_summary_t::remove): Remove.
8695 (dump_ipa_call_summary): Change get_create to get.
8696 (ipa_dump_fn_summary): Dump only when summary exists.
8697 (analyze_function_body): Use symbol_summary::get instead
8698 of get_create.
8699 (compute_fn_summary): Likewise.
8700 (estimate_edge_devirt_benefit): Likewise.
8701 (estimate_edge_size_and_time): Likewise.
8702 (inline_update_callee_summaries): Likewise.
8703 (remap_edge_change_prob): Likewise.
8704 (remap_edge_summaries): Likewise.
8705 (ipa_merge_fn_summary_after_inlining): Likewise.
8706 (write_ipa_call_summary): Likewise.
8707 (ipa_fn_summary_write): Likewise.
8708 (ipa_free_fn_summary): Likewise.
8709 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8710 (struct ipa_call_summary): Likewise.
8711 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8712 of get_create.
8713 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8714 (estimate_size_after_inlining): Likewise.
8715 (estimate_growth): Likewise.
8716 (growth_likely_positive): Likewise.
8717 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8718 (inline_call): Likewise.
8719 * ipa-inline.c (caller_growth_limits): Likewise.
8720 (can_inline_edge_p): Likewise.
8721 (can_inline_edge_by_limits_p): Likewise.
8722 (compute_uninlined_call_time): Likewise.
8723 (compute_inlined_call_time): Likewise.
8724 (want_inline_small_function_p): Likewise.
8725 (edge_badness): Likewise.
8726 (update_caller_keys): Likewise.
8727 (update_callee_keys): Likewise.
8728 (inline_small_functions): Likewise.
8729 (inline_to_all_callers_1): Likewise.
8730 (dump_overall_stats): Likewise.
8731 (early_inline_small_functions): Likewise.
8732 (early_inliner): Likewise.
8733 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8734 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8735 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8736 * ipa-split.c (execute_split_functions): Likewise.
8737 * symbol-summary.h: Likewise.
8738 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8739
8740 2018-06-19 Richard Biener <rguenther@suse.de>
8741
8742 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8743 (vectorize_loops): ... here. Fix dbgcnt handling.
8744 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8745
8746 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8747
8748 PR target/86197
8749 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8750 ieee128 argument takes up only one (vector) register, not two (floating
8751 point) registers.
8752
8753 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8754
8755 * gimplify.c (gimplify_init_constructor): Really never clear for an
8756 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8757
8758 2018-06-19 Richard Biener <rguenther@suse.de>
8759
8760 PR tree-optimization/86179
8761 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8762 after failed recognition.
8763
8764 2018-06-18 Martin Sebor <msebor@redhat.com>
8765
8766 PR middle-end/85602
8767 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8768 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8769 Handle integer subtraction.
8770 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8771 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8772
8773 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8774
8775 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8776 param from rtx to rtx_insn *.
8777 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8778 param.
8779 (frv_ifcvt_modify_insn): Likwise.
8780 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8781 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8782 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8783 as_a <rtx_insn *> cast to local "unprotected_region" once
8784 it's been established that it's not NULL or pc_rtx.
8785 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8786 param "sethi" from rtx to rtx_insn *.
8787 (nds32_group_float_insns): Likewise for param "insn".
8788 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8789 param.
8790 (vax_output_int_subtract): Likewise.
8791 * config/vax/vax.c (vax_output_int_add): Likewise for param
8792 "insn".
8793 (vax_output_int_subtract): Likewise.
8794 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8795 (emit_pattern_after): Likewise for param "after".
8796 (emit_insn_after): Likewise.
8797 (emit_jump_insn_after): Likewise.
8798 (emit_call_insn_after): Likewise.
8799 (emit_debug_insn_after): Likewise.
8800 (emit_pattern_before): Likewise for param "before".
8801 (emit_insn_before): Likewise.
8802 (emit_jump_insn_before): Likewise.
8803 * final.c (get_insn_template): Likewise for param "insn", removing
8804 a cast.
8805 * output.h (get_insn_template): Likewise for 2nd param.
8806 * rtl.h (emit_insn_before): Likewise.
8807 (emit_jump_insn_before): Likewise.
8808 (emit_debug_insn_before_noloc): Likewise.
8809 (emit_insn_after): Likewise.
8810 (emit_jump_insn_after): Likewise.
8811 (emit_call_insn_after): Likewise.
8812 (emit_debug_insn_after): Likewise.
8813 (set_insn_deleted): Likewise for param.
8814
8815 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8816
8817 PR target/85358
8818 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8819 floating point modes, so that IFmode is numerically greater than
8820 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8821 to declare the ordering. This prevents IFmode from being
8822 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8823 machine. Include rs6000-modes.h to share the fractional values
8824 between genmodes* and the rest of the compiler.
8825 (IFmode): Likewise.
8826 (KFmode): Likewise.
8827 (TFmode): Likewise.
8828 * config/rs6000/rs6000-modes.h: New file.
8829 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8830 meaning of rs6000_long_double_size so that 126..128 selects an
8831 appropriate 128-bit floating point type.
8832 (rs6000_option_override_internal): Likewise.
8833 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8834 (TARGET_LONG_DOUBLE_128): Change the meaning of
8835 rs6000_long_double_size so that 126..128 selects an appropriate
8836 128-bit floating point type.
8837 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8838 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8839 source and destination to match the standard usage.
8840 (truncifkf2): Likewise.
8841 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8842 ISA 2.07 to use an explicit clobber, instead of passing in a
8843 temporary.
8844 (copysign<mode>3_soft): Likewise.
8845
8846 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8847
8848 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8849 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8850 (vect_slp_analyze_instance_dependence): Likewise.
8851 (vect_enhance_data_refs_alignment): Likewise.
8852 (vect_analyze_data_refs_alignment): Likewise.
8853 (vect_slp_analyze_and_verify_instance_alignment
8854 (vect_analyze_data_ref_accesses): Likewise.
8855 (vect_prune_runtime_alias_test_list): Likewise.
8856 (vect_analyze_data_refs): Likewise.
8857 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8858 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8859 (vect_analyze_scalar_cycles_1): Likewise.
8860 (vect_get_loop_niters): Likewise.
8861 (vect_analyze_loop_form_1): Likewise.
8862 (vect_update_vf_for_slp): Likewise.
8863 (vect_analyze_loop_operations): Likewise.
8864 (vect_analyze_loop): Likewise.
8865 (vectorizable_induction): Likewise.
8866 (vect_transform_loop): Likewise.
8867 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8868 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8869 (vect_make_slp_decision): Likewise.
8870 (vect_detect_hybrid_slp): Likewise.
8871 (vect_slp_analyze_operations): Likewise.
8872 (vect_slp_bb): Likewise.
8873 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8874 (vectorizable_bswap): Likewise.
8875 (vectorizable_call): Likewise.
8876 (vectorizable_simd_clone_call): Likewise.
8877 (vectorizable_conversion): Likewise.
8878 (vectorizable_assignment): Likewise.
8879 (vectorizable_shift): Likewise.
8880 (vectorizable_operation): Likewise.
8881 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8882
8883 2018-06-18 Martin Sebor <msebor@redhat.com>
8884
8885 PR tree-optimization/81384
8886 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8887 * builtins.c (expand_builtin_strnlen): New function.
8888 (expand_builtin): Call it.
8889 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8890 * builtins.def (BUILT_IN_STRNLEN): New.
8891 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8892 Warn for bounds in excess of maximum object size.
8893 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8894 single-value ranges. Handle strnlen.
8895 (handle_builtin_strlen): Handle strnlen.
8896 (strlen_check_and_optimize_stmt): Same.
8897 * doc/extend.texi (Other Builtins): Document strnlen.
8898
8899 2018-06-18 Maya Rashish <coypu@sdf.org>
8900
8901 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8902 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8903 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8904
8905 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8906 here to ...
8907 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8908
8909 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8910
8911 * tree.c (escaped_string::escape): Replace cast to char * by
8912 const_cast<char *> (unescaped).
8913
8914 2018-06-18 Nick Clifton <nickc@redhat.com>
8915
8916 PR 84195
8917 * tree.c (escaped_string): New class. Converts an unescaped
8918 string into its escaped equivalent.
8919 (warn_deprecated_use): Use the new class to convert the
8920 deprecation message, if present.
8921 (test_escaped_strings): New self test.
8922 (test_c_tests): Add test_escaped_strings.
8923 * doc/extend.texi (deprecated): Add a note that the
8924 deprecation message is affected by the -fmessage-length
8925 option, and that control characters will be escaped.
8926 (#pragma GCC error): Document this pragma.
8927 (#pragma GCC warning): Likewise.
8928 * doc/invoke.texi (-fmessage-length): Document this option's
8929 effect on the #warning and #error preprocessor directives and
8930 the deprecated attribute.
8931
8932 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8933
8934 * tree.c (decl_value_expr_lookup): Revert latest change.
8935 (decl_value_expr_insert): Likewise.
8936
8937 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8938
8939 * gimplify.c (nonlocal_vlas): Delete.
8940 (nonlocal_vla_vars): Likewise.
8941 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8942 referenced VLAs.
8943 (gimplify_body): Do not create and destroy nonlocal_vlas.
8944 * tree-nested.c: Include diagnostic.h.
8945 (use_pointer_in_frame): Tweak.
8946 (lookup_field_for_decl): Add assertion and declare the transformation.
8947 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8948 internal error when the reference is in a wrong context. Do not
8949 create a debug decl by default.
8950 (note_nonlocal_block_vlas): Delete.
8951 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8952 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8953 create a debug decl by default.
8954 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8955 call is in a wrong context.
8956 (fixup_vla_decls): New function.
8957 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8958 debug variables were created.
8959 * tree.c (decl_value_expr_lookup): Add checking assertion.
8960 (decl_value_expr_insert): Likewise.
8961
8962 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8963
8964 PR middle-end/82479
8965 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8966 * tree-scalar-evolution.c (interpret_expr): Likewise.
8967 (expression_expensive_p): Likewise.
8968 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8969 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8970 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8971 (ssa_defined_by_minus_one_stmt_p): New.
8972
8973 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8974
8975 PR middle-end/64946
8976 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8977 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8978 * dojump.c (do_jump): Likewise.
8979 * expr.c (expand_expr_real_2): Check operand type's sign.
8980 * fold-const.c (const_unop): Handle ABSU_EXPR.
8981 (fold_abs_const): Likewise.
8982 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8983 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8984 (strip_sign_op_1): Likesise.
8985 * match.pd: Add new pattern to generate ABSU_EXPR.
8986 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8987 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8988 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8989 * tree-inline.c (estimate_operator_cost): Likewise.
8990 * tree-pretty-print.c (dump_generic_node): Likewise.
8991 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8992 * tree.def (ABSU_EXPR): New.
8993
8994 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8995
8996 PR middle-end/86095
8997 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8998 documented as preserved for backward compatibility only.
8999 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
9000
9001 PR rtl-optimization/86108
9002 * bb-reorder.c (create_forwarder_block): Renamed to ...
9003 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
9004 jump from new landing pad to the second part.
9005 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
9006 Adjust callers.
9007
9008 2018-06-15 Jakub Jelinek <jakub@redhat.com>
9009
9010 PR middle-end/85878
9011 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
9012 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
9013 Only call store_expr for halves if the mode is the same.
9014
9015 PR middle-end/86123
9016 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
9017 Fix up comment formatting.
9018
9019 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
9020
9021 * typed-splay-tree.h (typed_splay_tree::remove): New function.
9022 (typed_splay_tree::closure,
9023 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
9024 (typed_splay_tree::typed_splay_tree,
9025 typed_splay_tree::operator =): Declared private.
9026 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
9027 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
9028 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
9029 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
9030 typed_splay_tree::splay_tree_splay,
9031 typed_splay_tree::splay_tree_foreach_helper,
9032 typed_splay_tree::splay_tree_insert,
9033 typed_splay_tree::splay_tree_remove,
9034 typed_splay_tree::splay_tree_lookup,
9035 typed_splay_tree::splay_tree_predecessor,
9036 typed_splay_tree::splay_tree_successor,
9037 typed_splay_tree::splay_tree_min,
9038 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
9039 (typed_splay_tree::root, typed_splay_tree::comp,
9040 typed_splay_tree::delete_key,
9041 typed_splay_tree::delete_value): New data members.
9042 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
9043 typed_splay_tree::remove.
9044
9045 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
9046
9047 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
9048 -mginv and -mno-ginv to the assembler.
9049 * config/mips/mips.opt (-mcrc): New option.
9050 (-mginv): Likewise.
9051 * doc/invoke.text (-mcrc): Document.
9052 (-mginv): Likewise.
9053
9054 2018-06-15 Nick Clifton <nickc@redhat.com>
9055
9056 PR 84195
9057 * tree.c (escaped_string): New class. Converts an unescaped
9058 string into its escaped equivalent.
9059 (warn_deprecated_use): Use the new class to convert the
9060 deprecation message, if present.
9061 (test_escaped_strings): New self test.
9062 (test_c_tests): Add test_escaped_strings.
9063 * doc/extend.texi (deprecated): Add a note that the
9064 deprecation message is affected by the -fmessage-length
9065 option, and that control characters will be escaped.
9066 (#pragma GCC error): Document this pragma.
9067 (#pragma GCC warning): Likewise.
9068 * doc/invoke.texi (-fmessage-length): Document this option's
9069 effect on the #warning and #error preprocessor directives and
9070 the deprecated attribute.
9071
9072 2018-06-15 Richard Biener <rguenther@suse.de>
9073
9074 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
9075 here, also noting vector size used.
9076 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
9077 size used in MSG_OPTIMIZED_LOCATIONS dump.
9078 (pass_slp_vectorize::execute): Adjust.
9079
9080 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
9081
9082 PR target/85968
9083 * config/arc/arc.c (arc_return_address_register): Fix
9084 if-condition.
9085
9086 2018-06-15 Richard Biener <rguenther@suse.de>
9087
9088 PR middle-end/86159
9089 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
9090 leave useless conversion stripping to force_gimple_operand_gsi.
9091 (gimplify_build2): Likewise.
9092 (gimplify_build1): Likewise.
9093
9094 2018-06-15 Richard Biener <rguenther@suse.de>
9095
9096 PR middle-end/86076
9097 * tree-cfg.c (move_stmt_op): unshare invariant addresses
9098 before adjusting their block.
9099
9100 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
9101
9102 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
9103 multilibs for *-*-rtems*.
9104 * config/riscv/t-rtems: New file.
9105
9106 2018-06-14 Jakub Jelinek <jakub@redhat.com>
9107
9108 PR middle-end/86122
9109 * match.pd ((A +- CST1) +- CST2): Punt if last resort
9110 unsigned_type_for returns NULL.
9111
9112 PR target/85945
9113 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
9114 subregs of multi-word pseudos unless the float mode has word size.
9115
9116 2018-06-14 Richard Biener <rguenther@suse.de>
9117
9118 PR middle-end/86139
9119 * tree-vect-generic.c (build_word_mode_vector_type): Remove
9120 duplicate and harmful type_hash_canon.
9121 * tree.c (type_hash_canon): Assert we didn't find ourselves.
9122
9123 2018-06-14 Richard Biener <rguenther@suse.de>
9124
9125 PR ipa/86124
9126 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
9127 NULL cgraph_node.
9128
9129 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
9130
9131 * config/rtems.h (STDINT_LONG32): Define.
9132
9133 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
9134 Prachi Godbole <prachi.godbole@imgtec.com>
9135
9136 * config/mips/mips-cpus.def: Define P6600.
9137 * config/mips/mips-tables.opt: Regenerate.
9138 * config/mips/mips.c (mips_ucbranch_type): New enum.
9139 (mips_rtx_cost_data): Add support for P6600.
9140 (mips_issue_rate): Likewise.
9141 (mips_multipass_dfa_lookahead): Likewise.
9142 (mips_avoid_hazard): Likewise.
9143 (mips_reorg_process_insns): Likewise.
9144 (mips_classify_branch_p6600): New function.
9145 * config/mips/mips.h (TUNE_P6600): New define.
9146 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
9147 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
9148 * config/mips/mips.md: Include p6600.md.
9149 (processor): Add p6600.
9150 * config/mips/p6600.md: New file.
9151 * doc/invoke.texi: Add p6600 to supported architectures.
9152
9153 2018-06-13 Martin Sebor <msebor@redhat.com>
9154
9155 PR tree-optimization/86114
9156 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
9157 of integer types.
9158 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
9159
9160 2018-06-13 Richard Biener <rguenther@suse.de>
9161
9162 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
9163 Properly set vector type of the intermediate stmt.
9164 * tree-vect-stmts.c (vectorizable_operation): The destination
9165 var always has vectype_out type.
9166
9167 2018-06-13 Jeff Law <law@redhat.com>
9168
9169 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
9170 integer 0 for argument to print_rtl_with_bb.
9171 (rl78_reorg): Likewise.
9172
9173 2018-06-13 David Malcolm <dmalcolm@redhat.com>
9174
9175 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
9176 from rtx to rtx_insn *.
9177 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
9178 "label".
9179 (add_sched_insns_for_speculation): Likewise for local "target",
9180 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9181 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
9182 from rtx_insn ** to rtx_code_label **.
9183 (reorg_emit_nops): Likewise.
9184 (c6x_reorg): Likewise for local "call_labels".
9185 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
9186 rtx to rtx_insn *.
9187 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
9188 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
9189 the loops over LABEL_REFS.
9190 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
9191 braf_label.
9192 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
9193 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
9194 (split_branches): Strengthen local "olabel" from rtx to
9195 rtx_insn *, adding a safe_as_a cast.
9196 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
9197 to "rtx_insn *".
9198 (add_insn_after): Likewise for first two params.
9199 (add_insn_before): Likewise.
9200 (remove_insn): Likewise for param.
9201 (emit_pattern_before_noloc): Likewise for second and third params.
9202 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
9203 (emit_call_insn_before_noloc): Likewise.
9204 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9205 to "rtx_insn *".
9206 (emit_barrier_before): Likewise.
9207 (emit_label_before): Strengthen "label" param from "rtx" to
9208 "rtx_code_label *". Strengthen "before" param from "rtx" to
9209 "rtx_insn *".
9210 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9211 "rtx_insn *".
9212 (emit_pattern_after_noloc): Likewise.
9213 (emit_insn_after_noloc): Likewise.
9214 (emit_jump_insn_after_noloc): Likewise.
9215 (emit_call_insn_after_noloc): Likewise.
9216 (emit_debug_insn_after_noloc): Likewise.
9217 (emit_barrier_after): Likewise.
9218 (emit_label_after): Likewise for both params.
9219 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9220 "loc" param from "int" to "location_t".
9221 (emit_insn_after_setloc): Likewise.
9222 (emit_jump_insn_after_setloc): Likewise.
9223 (emit_call_insn_after_setloc): Likewise.
9224 (emit_debug_insn_after_setloc): Likewise.
9225 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9226 "loc" param from "int" to "location_t".
9227 (emit_pattern_before): Convert NULL_RTX to NULL.
9228 (emit_insn_before_setloc): Convert "loc" param from "int" to
9229 "location_t".
9230 (emit_jump_insn_before_setloc): Likewise.
9231 (emit_call_insn_before_setloc): Likewise.
9232 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9233 rtx_insn *. Convert "loc" param from "int" to "location_t".
9234 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9235 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9236 Convert 3rd param from "int" to "location_t".
9237 (emit_barrier_before, emit_barrier_after, next_real_insn):
9238 Strengthen param from rtx to rtx_insn *.
9239 (emit_label_before): Strengthen 1st param from "rtx" to
9240 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9241 "rtx_insn *".
9242 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9243 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9244 Strengthen 2nd param from "rtx" to "rtx_insn *".
9245 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9246 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9247 Likewise. Convert 3rd param from "int" to "location_t".
9248 (emit_label_after): Strengthen 1st param from "rtx" to
9249 "rtx_code_label *".
9250 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9251 "rtx_insn *".
9252 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9253 from "rtx" to "rtx_insn *".
9254
9255 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9256
9257 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9258 bodies streamed in with -Q.
9259 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9260 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9261 * gimple-streamer-out.c: Include gimple-pretty-print.h
9262 (output_bb): Dump stmts streamed.
9263 * lto-section-out.c: Include print-tree.h
9264 (lto_begin_section): Dump sections created.
9265 (lto_output_decl_index): Dump decl encoded.
9266 * lto-streamer-out.c: Include print-tree.h
9267 (create_output_block): Dump output block created.
9268 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9269 (output_function): Dump function output.
9270 (output_constructor): Dump constructor streamed.
9271 (write_global_stream): Output indexes encoded.
9272 (produce_asm_for_decls): Dump streams encoded.
9273 * lto-streamer.c (streamer_dump_file): New global var.
9274 * lto-streamer.h (streamer_dump_file): Declare.
9275 * passes.c (ipa_write_summaries): Initialize streamer dump.
9276 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9277 in.
9278
9279 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9280
9281 PR target/86048
9282 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9283 offsets for register save directives. Emit a second batch of save
9284 directives, if need be, when the function accesses prior frames.
9285
9286 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9287
9288 * config/arc/fpu.md (fmasf4): Force operand to register.
9289 (fnmasf4): Likewise.
9290
9291 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9292
9293 * config/arc/arc-protos.h (arc_pad_return): Remove.
9294 * config/arc/arc.c (machine_function): Remove force_short_suffix
9295 and size_reason.
9296 (arc_print_operand): Adjust printing of '&'.
9297 (arc_verify_short): Remove conditional printing of short suffix.
9298 (arc_final_prescan_insn): Remove reference to size_reason.
9299 (pad_return): New function.
9300 (arc_reorg): Call pad_return.
9301 (arc_pad_return): Remove.
9302 (arc_init_machine_status): Remove reference to force_short_suffix.
9303 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9304 (attr length): When attribute iscompact is true force to 2
9305 regardless; in the case of maybe check if we want to force the
9306 instruction to have 4 bytes length.
9307 (nopv): Change it to generate 4 byte long nop as well.
9308 (blockage): New pattern.
9309 (simple_return): Remove call to arc_pad_return.
9310 (p_return_i): Likewise.
9311
9312 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9313
9314 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9315
9316 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9317
9318 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9319 ARC cores.
9320
9321 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9322
9323 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9324 for ARC700 and ARCv2.
9325
9326 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9327
9328 PR target/86076
9329 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9330 operands[2] instead of operands[1].
9331
9332
9333 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9334
9335 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9336 case, check whether the outer register overlaps an unallocatable
9337 register, not just whether it fits the required class.
9338
9339 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9340
9341 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9342 are poly_ints.
9343 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9344 (memrefs_conflict_p): Likewise.
9345 (init_alias_analysis): Likewise.
9346 * cfgexpand.c (expand_debug_expr): Likewise.
9347 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9348 * cse.c (fold_rtx): Likewise.
9349 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9350 * expr.c (emit_block_move_hints): Likewise.
9351 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9352 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9353 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9354 (emit_group_store): Likewise.
9355 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9356 to read the PRE/POST_MODIFY increment.
9357 * calls.c (store_one_arg): Use strip_offset.
9358 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9359 poly_int_rtx_p.
9360 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9361 by a VEC_SELECT.
9362 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9363 (simplify_binary_operation_1): Extend CONST_INT handling to
9364 poly_int_rtx_p.
9365 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9366 than a HOST_WIDE_INT.
9367 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9368 poly_int64.
9369 (adjust_mems, add_stores): Update accodingly.
9370 (vt_canonicalize_addr): Track polynomial offsets.
9371 (emit_note_insn_var_location): Likewise.
9372 (vt_add_function_parameter): Likewise.
9373 (vt_initialize): Likewise.
9374
9375 2018-06-12 Jeff Law <law@redhat.com>
9376
9377 * config.gcc (alpha*-*-freebsd*): Remove.
9378 * config/alpha/freebsd.h: Remove.
9379
9380 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9381
9382 PR other/69968
9383 * spellcheck-tree.c (levenshtein_distance): Rename to...
9384 (get_edit_distance): ...this, and update for underlying renaming.
9385 * spellcheck-tree.h (levenshtein_distance): Rename to...
9386 (get_edit_distance): ...this.
9387 * spellcheck.c (levenshtein_distance): Rename to...
9388 (get_edit_distance): ...this. Convert from Levenshtein distance
9389 to Damerau-Levenshtein distance by supporting transpositions of
9390 adjacent characters. Rename "v1" to "v_next" and "v0" to
9391 "v_one_ago".
9392 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9393 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9394 update for underlying renaming.
9395 (selftest::levenshtein_distance_unit_test): Rename to...
9396 (selftest::test_get_edit_distance_unit): ...this, and update for
9397 underlying renaming.
9398 (selftest::test_find_closest_string): Add example from PR 69968
9399 where transposition helps
9400 (selftest::test_metric_conditions): Update for renaming.
9401 (selftest::test_metric_conditions): Likewise.
9402 (selftest::spellcheck_c_tests): Likewise.
9403 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9404 (get_edit_distance): ...this.
9405 (best_match::consider): Update for renaming.
9406
9407 2018-06-12 Martin Sebor <msebor@redhat.com>
9408
9409 PR tree-optimization/85259
9410 * builtins.c (compute_objsize): Handle constant offsets.
9411 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9412 true iff a warning has been issued.
9413 * gimple.h (gimple_nonartificial_location): New function.
9414 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9415 gimple_nonartificial_location and handle -Wno-system-headers.
9416 (handle_builtin_stxncpy): Same.
9417
9418 2018-06-12 Martin Sebor <msebor@redhat.com>
9419
9420 PR c/85931
9421 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9422
9423 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9424
9425 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9426 BUILTIN_VEC_XST entries for pointer to double and long long.
9427
9428 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9429
9430 PR target/85990
9431 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9432 Update comments.
9433 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9434 Likewise.
9435
9436 2018-06-12 Martin Liska <mliska@suse.cz>
9437
9438 * doc/options.texi: Document IntegerRange.
9439
9440 2018-06-12 Martin Liska <mliska@suse.cz>
9441
9442 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9443 * opt-functions.awk: Handle Deprecated flag.
9444 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9445 and report error.
9446 (read_cmdline_option): Report warning for a deprecated option.
9447 * opts.h (struct cl_option): Add new field cl_deprecated.
9448 (CL_ERR_DEPRECATED): New.
9449
9450 2018-06-12 Martin Liska <mliska@suse.cz>
9451
9452 * doc/options.texi: Document Deprecated option flag.
9453
9454 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9455
9456 * config/arc/arc-arch.h (arc_extras): New enum.
9457 (arc_cpu_t):Add field extra.
9458 (arc_cpu_types): Consider the extras.
9459 * config/arc/arc-cpus.def: Add extras info.
9460 * config/arc/arc-opts.h (processor_type): Consider extra field.
9461 * config/arc/arc.c (arc_override_options): Handle extra field.
9462
9463 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9464
9465 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9466 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9467 field.
9468 * config/arc/arc.c (arc_init): Update pic warning.
9469 (irq_range): Update irq range parsing warnings.
9470 (arc_override_options): Update various warning messages.
9471 (arc_handle_aux_attribute): Likewise.
9472
9473 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9474
9475 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9476
9477 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9478
9479 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9480 compiler messages directives.
9481
9482 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9483
9484 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9485 * config/mips/mips-tables.opt: Regenerate.
9486 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9487 mips64r6.
9488 * doc/invoke.texi: Document -march=i6500.
9489
9490 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9491
9492 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9493 (i6400_gpmul): Add cpu_unit.
9494 (i6400_gpdiv): Likewise.
9495 (i6400_msa_add_d): Update reservations.
9496 (i6400_msa_int_add) Likewise.
9497 (i6400_msa_short_logic3) Likewise.
9498 (i6400_msa_short_logic2) Likewise.
9499 (i6400_msa_short_logic) Likewise.
9500 (i6400_msa_move) Likewise.
9501 (i6400_msa_cmp) Likewise.
9502 (i6400_msa_short_float2) Likewise.
9503 (i6400_msa_div_d) Likewise.
9504 (i6400_msa_long_logic1) Likewise.
9505 (i6400_msa_long_logic2) Likewise.
9506 (i6400_msa_mult) Likewise.
9507 (i6400_msa_long_float2) Likewise.
9508 (i6400_msa_long_float4) Likewise.
9509 (i6400_msa_long_float5) Likewise.
9510 (i6400_msa_long_float8) Likewise.
9511 (i6400_fpu_fadd): Include frint type.
9512 (i6400_fpu_store): New define_insn_reservation.
9513 (i6400_fpu_load): Likewise.
9514 (i6400_fpu_move): Likewise.
9515 (i6400_fpu_fcmp): Likewise.
9516 (i6400_fpu_fmadd): Likewise.
9517 (i6400_int_mult): Include imul3nc type and update reservation.
9518 (i6400_int_div): Include idiv3 type and update reservation.
9519 (i6400_int_load): Update to check type not move_type.
9520 (i6400_int_store): Likewise.
9521 (i6400_int_prefetch): Set zero latency.
9522
9523 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9524
9525 * gcc.c: Document new %@{...} sequence.
9526 (LINK_COMMAND_SPEC): Use it for the -L switches.
9527 (cpp_unique_options): Use it for the -I switches.
9528 (at_file_argbuf): New global variable.
9529 (in_at_file): Likewise.
9530 (alloc_args): Create at_file_argbuf.
9531 (clear_args): Truncate at_file_argbuf.
9532 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9533 (open_at_file): New function.
9534 (close_at_file): Likewise.
9535 (create_at_file): Delete.
9536 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9537 <'o'>: Likewise.
9538 <'@'>: New case.
9539 (validate_switches_from_spec): Deal with %@{...} sequence.
9540 (validate_switches): Likewise.
9541 (driver::finalize): Call clear_args.
9542
9543 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9544
9545 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9546
9547 2018-06-11 Martin Sebor <msebor@redhat.com>
9548
9549 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9550 (Wno-class-memaccess): Add @opindex.
9551 (Wno-templates, Wno-multiple-inheritance): Same.
9552 (Wno-virtual-inheritance, Wno-namespaces): Same.
9553 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9554 (Wno-format-overflow, Wno-format-truncation): Same.
9555 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9556 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9557 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9558 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9559 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9560 (Wno-misspelled-isr): Same.
9561
9562 2018-06-11 Martin Sebor <msebor@redhat.com>
9563
9564 * PR tree-optimization/86083
9565 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9566
9567 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9568
9569 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9570
9571 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9572
9573 PR target/85755
9574 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9575 on the correct operand.
9576 (*movdi_internal64): Ditto.
9577
9578 2018-06-11 Martin Liska <mliska@suse.cz>
9579
9580 PR tree-optimization/86089
9581 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9582
9583 2018-06-11 Julia Koval <julia.koval@intel.com>
9584
9585 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9586 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9587 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9588
9589 2018-06-11 Olivier Hainque <hainque@adacore.com>
9590
9591 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9592 for Ada with strict dwarf2.
9593
9594 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9595
9596 PR target/85755
9597 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9598 addresses.
9599
9600 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9601
9602 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9603
9604 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9605
9606 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9607 TARGET_ELF.
9608
9609 2018-06-08 Martin Liska <mliska@suse.cz>
9610
9611 * tree-cfg.h (debug_function): Fix argument type to match
9612 implementation.
9613
9614 2018-06-08 Martin Liska <mliska@suse.cz>
9615
9616 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9617 Remove usage of MPX-related (and removed) fields.
9618 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9619
9620 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9621
9622 * cfg.c (debug): Use TDF_NONE rather than 0.
9623 * cfghooks.c (debug): Likewise.
9624 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9625 (struct dump_option_value_info): Convert to...
9626 (struct kv_pair): ...this template type.
9627 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9628 rather than 0.
9629 (optinfo_verbosity_options): Likewise.
9630 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9631 OPTGROUP_NONE.
9632 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9633 than int for "optgroup_flags" param.
9634 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9635 "dump_kind" param.
9636 (dump_dec): Likewise.
9637 (dump_finish): Use TDF_NONE rather than 0.
9638 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9639 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9640 than 0. Update for change to option_ptr.
9641 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9642 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9643 0. Update for changes to optinfo_verbosity_options and
9644 optgroup_options.
9645 (opt_info_switch_p): Convert optgroup_flags from int to
9646 optgroup_flags_t.
9647 (dump_basic_block): Use dump_flags_t rather than int
9648 for "dump_kind" param.
9649 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9650 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9651 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9652 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9653 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9654 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9655 TDF_NONE): Convert from macros to...
9656 (enum dump_flag): ...this new enum.
9657 (dump_flags_t): Update to use enum.
9658 (operator|, operator&, operator~, operator|=, operator&=):
9659 Implement for dump_flags_t.
9660 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9661 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9662 Convert from macros to...
9663 (enum optgroup_flag): ...this new enum.
9664 (optgroup_flags_t): New typedef.
9665 (operator|, operator|=): Implement for optgroup_flags_t.
9666 (struct dump_file_info): Convert field "alt_flags" to
9667 dump_flags_t. Convert field "optgroup_flags" to
9668 optgroup_flags_t.
9669 (dump_basic_block): Use dump_flags_t rather than int for param.
9670 (dump_generic_expr_loc): Likewise.
9671 (dump_dec): Likewise.
9672 (dump_register): Convert param "optgroup_flags" to
9673 optgroup_flags_t.
9674 (opt_info_enable_passes): Likewise.
9675 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9676 than 0.
9677 * gimple-pretty-print.c (debug): Likewise.
9678 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9679 (merged_store_group::apply_stores): Likewise.
9680 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9681 * gimple.c (verify_gimple_pp): Likewise.
9682 * graphite-poly.c (print_pbb_body): Likewise.
9683 * passes.c (pass_manager::register_one_dump_file): Convert
9684 local "optgroup_flags" to optgroup_flags_t.
9685 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9686 (debug): Likewise.
9687 (debug_body): Likewise.
9688 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9689 to optgroup_flags_t.
9690 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9691 than 0.
9692 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9693 (convert_mult_to_fma): Likewise.
9694 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9695 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9696 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9697 "dump_kind" to dump_flags_t.
9698
9699 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9700
9701 * config/rs6000/rs6000.c (min, max): Delete.
9702
9703 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9704
9705 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9706 -mabi=spe and -mabi=no-spe.
9707
9708 2018-06-08 Martin Liska <mliska@suse.cz>
9709
9710 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9711 where we expect an existing summary.
9712
9713 2018-06-08 Martin Liska <mliska@suse.cz>
9714
9715 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9716 * ipa-inline.h (estimate_edge_growth): Likewise.
9717
9718 2018-06-08 Martin Liska <mliska@suse.cz>
9719
9720 * cgraph.c (function_version_hasher::hash): Use
9721 cgraph_node::get_uid ().
9722 (function_version_hasher::equal):
9723 * cgraph.h (cgraph_node::get_uid): New method.
9724 * ipa-inline.c (update_caller_keys): Use
9725 cgraph_node::get_uid ().
9726 (update_callee_keys): Likewise.
9727 * ipa-utils.c (searchc): Likewise.
9728 (ipa_reduced_postorder): Likewise.
9729 * lto-cgraph.c (input_node): Likewise.
9730 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9731 * symbol-summary.h (symtab_insertion): Likewise.
9732 (symtab_removal): Likewise.
9733 (symtab_duplication): Likewise.
9734 * tree-pretty-print.c (dump_function_header): Likewise.
9735 * tree-sra.c (convert_callers_for_node): Likewise.
9736
9737 2018-06-08 Martin Liska <mliska@suse.cz>
9738
9739 * cgraph.c (symbol_table::create_edge): Always assign a new
9740 unique number.
9741 (symbol_table::free_edge): Do not recycle numbers.
9742 * cgraph.h (cgraph_edge::get): New method.
9743 * symbol-summary.h (symtab_removal): Use it.
9744 (symtab_duplication): Likewise.
9745 (call_summary::hashable_uid): Remove.
9746
9747 2018-06-08 Martin Liska <mliska@suse.cz>
9748
9749 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9750 (initialize_growth_caches): Remove.
9751 (free_growth_caches): Likewise.
9752 (do_estimate_edge_time): Use edge_growth_cache.
9753 (do_estimate_edge_size): Likewise.
9754 (do_estimate_edge_hints): Likewise.
9755 * ipa-inline.c (reset_edge_caches): Likewise.
9756 (recursive_inlining): Likewise.
9757 (inline_small_functions): Likewise.
9758 * ipa-inline.h (initialize_growth_caches): Remove.
9759 (estimate_edge_size): Likewise.
9760 (estimate_edge_time): Likewise.
9761 (estimate_edge_hints): Likewise.
9762 (reset_edge_growth_cache): Likewise.
9763 * symbol-summary.h (call_summary::remove): New method.
9764
9765 2018-06-08 Martin Liska <mliska@suse.cz>
9766
9767 * ipa-cp.c (class edge_clone_summary): New summary.
9768 (grow_edge_clone_vectors): Remove.
9769 (ipcp_edge_duplication_hook): Remove.
9770 (class edge_clone_summary_t): New call_summary class.
9771 (ipcp_edge_removal_hook): Remove.
9772 (edge_clone_summary_t::duplicate): New function.
9773 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9774 (create_specialized_node): Likewise.
9775 (ipcp_driver): Initialize edge_clone_summaries and do not
9776 register hooks.
9777
9778 2018-06-08 Martin Liska <mliska@suse.cz>
9779
9780 * symbol-summary.h (get): New function.
9781 (call_summary::m_initialize_when_cloning): New class member.
9782
9783 2018-06-08 Martin Liska <mliska@suse.cz>
9784
9785 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9786 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9787 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9788 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9789 (remove_cgraph_node_from_order): Use the removed_nodes set.
9790 (do_per_function_toporder): Likwise.
9791 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9792 instead of summary_uid.
9793 (symtab_removal): Likewise.
9794 (symtab_duplication): Likewise.
9795
9796 2018-06-08 Martin Liska <mliska@suse.cz>
9797
9798 * ipa-cp.c (ipcp_store_bits_results): Use
9799 ipcp_transformation_sum.
9800 (ipcp_store_vr_results): Likewise.
9801 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9802 to ...
9803 (ipcp_transformation_initialize): ... this.
9804 (ipa_set_node_agg_value_chain):
9805 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9806 (write_ipcp_transformation_info): Likewise.
9807 (read_ipcp_transformation_info): Likewise.
9808 (ipcp_update_bits): Likewise.
9809 (ipcp_update_vr): Likewise.
9810 (ipcp_transform_function): Likewise.
9811 * ipa-prop.h: Rename ipcp_transformation_summary to
9812 ipcp_transformation.
9813 (class ipcp_transformation_t): New function summary.
9814 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9815 (ipa_get_agg_replacements_for_node): Likewise.
9816
9817 2018-06-08 Martin Liska <mliska@suse.cz>
9818
9819 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9820 of struct.
9821 (class funct_state_summary_t): New function_summary class.
9822 (has_function_state): Remove.
9823 (get_function_state): Likewise.
9824 (set_function_state): Likewise.
9825 (add_new_function): Likewise.
9826 (funct_state_summary_t::insert): New function.
9827 (duplicate_node_data): Remove.
9828 (remove_node_data): Remove.
9829 (funct_state_summary_t::duplicate): New function.
9830 (register_hooks): Create new funct_state_summaries.
9831 (pure_const_generate_summary): Use it.
9832 (pure_const_write_summary): Likewise.
9833 (pure_const_read_summary): Likewise.
9834 (propagate_pure_const): Likewise.
9835 (propagate_nothrow): Likewise.
9836 (dump_malloc_lattice): Likewise.
9837 (propagate_malloc): Likewise.
9838 (execute): Do not register hooks, just remove summary
9839 instead.
9840 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9841 constructor.
9842
9843 2018-06-08 Martin Liska <mliska@suse.cz>
9844
9845 * ipa-reference.c (remove_node_data): Remove.
9846 (duplicate_node_data): Likewise.
9847 (class ipa_ref_var_info_summary_t): New class.
9848 (class ipa_ref_opt_summary_t): Likewise.
9849 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9850 (get_reference_optimization_summary): Use
9851 ipa_ref_opt_sum_summaries.
9852 (set_reference_vars_info): Remove.
9853 (set_reference_optimization_summary): Likewise.
9854 (ipa_init): Create summaries.
9855 (init_function_info): Use function summary.
9856 (ipa_ref_opt_summary_t::duplicate): New function.
9857 (ipa_ref_opt_summary_t::remove): New function.
9858 (get_read_write_all_from_node): Fix GNU coding style.
9859 (propagate): Use function summary.
9860 (write_node_summary_p): Fix GNU coding style.
9861 (stream_out_bitmap): Likewise.
9862 (ipa_reference_read_optimization_summary): Use function summary.
9863 (ipa_reference_c_finalize): Do not release hooks.
9864
9865 2018-06-08 Martin Liska <mliska@suse.cz>
9866
9867 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9868 (analyze_function_body): Extract multiple calls of get_create.
9869 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9870 * ipa-inline.c (recursive_inlining): Use ::get method.
9871 * ipa-inline.h (estimate_edge_growth): Likewise.
9872
9873 2018-06-08 Martin Liska <mliska@suse.cz>
9874
9875 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9876 HSA_INVALID.
9877 (hsa_function_summary::hsa_function_summary): Use the new enum
9878 value.
9879 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9880 * hsa-gen.c (hsa_get_host_function): Likewise.
9881 (get_brig_function_name): Likewise.
9882 * ipa-hsa.c (process_hsa_functions): Likewise.
9883 (ipa_hsa_write_summary): Likewise.
9884 * symbol-summary.h (symtab_duplication): Use ::get function/
9885 (get): New function.
9886
9887 2018-06-08 Martin Liska <mliska@suse.cz>
9888
9889 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9890 of get.
9891 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9892 (hsa_register_kernel): Likewise.
9893 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9894 * hsa-gen.c (hsa_get_host_function): Likewise.
9895 (get_brig_function_name): Likewise.
9896 (generate_hsa): Likewise.
9897 (pass_gen_hsail::execute): Likewise.
9898 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9899 (devirtualization_time_bonus): Likewise.
9900 (ipcp_propagate_stage): Likewise.
9901 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9902 (edge_set_predicate): Likewise.
9903 (evaluate_conditions_for_known_args): Likewise.
9904 (evaluate_properties_for_edge): Likewise.
9905 (ipa_fn_summary::reset): Likewise.
9906 (ipa_fn_summary_t::duplicate): Likewise.
9907 (dump_ipa_call_summary): Likewise.
9908 (ipa_dump_fn_summary): Likewise.
9909 (analyze_function_body): Likewise.
9910 (compute_fn_summary): Likewise.
9911 (estimate_edge_devirt_benefit): Likewise.
9912 (estimate_edge_size_and_time): Likewise.
9913 (estimate_calls_size_and_time): Likewise.
9914 (estimate_node_size_and_time): Likewise.
9915 (inline_update_callee_summaries): Likewise.
9916 (remap_edge_change_prob): Likewise.
9917 (remap_edge_summaries): Likewise.
9918 (ipa_merge_fn_summary_after_inlining): Likewise.
9919 (ipa_update_overall_fn_summary): Likewise.
9920 (read_ipa_call_summary): Likewise.
9921 (inline_read_section): Likewise.
9922 (write_ipa_call_summary): Likewise.
9923 (ipa_fn_summary_write): Likewise.
9924 (ipa_free_fn_summary): Likewise.
9925 * ipa-hsa.c (process_hsa_functions): Likewise.
9926 (ipa_hsa_write_summary): Likewise.
9927 (ipa_hsa_read_section): Likewise.
9928 * ipa-icf.c (sem_function::merge): Likewise.
9929 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9930 (do_estimate_edge_time): Likewise.
9931 (estimate_size_after_inlining): Likewise.
9932 (estimate_growth): Likewise.
9933 (growth_likely_positive): Likewise.
9934 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9935 (inline_call): Likewise.
9936 * ipa-inline.c (caller_growth_limits): Likewise.
9937 (can_inline_edge_p): Likewise.
9938 (can_inline_edge_by_limits_p): Likewise.
9939 (compute_uninlined_call_time): Likewise.
9940 (compute_inlined_call_time): Likewise.
9941 (want_inline_small_function_p): Likewise.
9942 (edge_badness): Likewise.
9943 (update_caller_keys): Likewise.
9944 (update_callee_keys): Likewise.
9945 (recursive_inlining): Likewise.
9946 (inline_small_functions): Likewise.
9947 (inline_to_all_callers_1): Likewise.
9948 (dump_overall_stats): Likewise.
9949 (early_inline_small_functions): Likewise.
9950 (early_inliner): Likewise.
9951 * ipa-inline.h (estimate_edge_growth): Likewise.
9952 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9953 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9954 * ipa-prop.h (IPA_NODE_REF): Likewise.
9955 (IPA_EDGE_REF): Likewise.
9956 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9957 (propagate_malloc): Likewise.
9958 * ipa-split.c (execute_split_functions): Likewise.
9959 * symbol-summary.h: Rename get to get_create.
9960 (get): Likewise.
9961 (get_create): Likewise.
9962 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9963
9964 2018-06-08 Martin Liska <mliska@suse.cz>
9965
9966 * symbol-summary.h (release): Move definition out of class
9967 declaration.
9968 (symtab_removal): Likewise.
9969 (symtab_duplication): Likewise.
9970
9971 2018-06-08 Martin Liska <mliska@suse.cz>
9972
9973 * symbol-summary.h (function_summary): Move constructor
9974 implementation out of class declaration.
9975 (release): Likewise.
9976 (symtab_insertion): Likewise.
9977 (symtab_removal): Likewise.
9978 (symtab_duplication): Likewise.
9979 (get): Likewise.
9980
9981 2018-06-08 Martin Liska <mliska@suse.cz>
9982
9983 * Makefile.in: Remove support for MPX (macros, related functions,
9984 fields in cgraph_node, ...).
9985 * builtin-types.def (BT_BND): Likewise.
9986 (BT_FN_BND_CONST_PTR): Likewise.
9987 (BT_FN_CONST_PTR_BND): Likewise.
9988 (BT_FN_VOID_PTR_BND): Likewise.
9989 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9990 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9991 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9992 (expand_builtin_mempcpy_with_bounds): Likewise.
9993 (expand_builtin_memset_with_bounds): Likewise.
9994 (expand_builtin_memset_args): Likewise.
9995 (std_expand_builtin_va_start): Likewise.
9996 (expand_builtin): Likewise.
9997 (expand_builtin_with_bounds): Likewise.
9998 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9999 (DEF_LIB_BUILTIN_CHKP): Likewise.
10000 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
10001 (DEF_CHKP_BUILTIN): Likewise.
10002 (BUILT_IN_MEMCPY): Likewise.
10003 (BUILT_IN_MEMMOVE): Likewise.
10004 (BUILT_IN_MEMPCPY): Likewise.
10005 (BUILT_IN_MEMSET): Likewise.
10006 (BUILT_IN_STPCPY): Likewise.
10007 (BUILT_IN_STRCAT): Likewise.
10008 (BUILT_IN_STRCHR): Likewise.
10009 (BUILT_IN_STRCPY): Likewise.
10010 (BUILT_IN_STRLEN): Likewise.
10011 (BUILT_IN_MEMCPY_CHK): Likewise.
10012 (BUILT_IN_MEMMOVE_CHK): Likewise.
10013 (BUILT_IN_MEMPCPY_CHK): Likewise.
10014 (BUILT_IN_MEMSET_CHK): Likewise.
10015 (BUILT_IN_STPCPY_CHK): Likewise.
10016 (BUILT_IN_STRCAT_CHK): Likewise.
10017 (BUILT_IN_STRCPY_CHK): Likewise.
10018 * calls.c (store_bounds): Likewise.
10019 (emit_call_1): Likewise.
10020 (special_function_p): Likewise.
10021 (maybe_warn_nonstring_arg): Likewise.
10022 (initialize_argument_information): Likewise.
10023 (finalize_must_preallocate): Likewise.
10024 (compute_argument_addresses): Likewise.
10025 (expand_call): Likewise.
10026 * cfgexpand.c (expand_call_stmt): Likewise.
10027 (expand_return): Likewise.
10028 (expand_gimple_stmt_1): Likewise.
10029 (pass_expand::execute): Likewise.
10030 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
10031 (cgraph_node::remove): Likewise.
10032 (cgraph_node::dump): Likewise.
10033 (cgraph_node::verify_node): Likewise.
10034 * cgraph.h (chkp_function_instrumented_p): Likewise.
10035 (symtab_node::get_alias_target): Likewise.
10036 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
10037 (cgraph_local_p): Likewise.
10038 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
10039 (cgraph_edge::rebuild_references): Likewise.
10040 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
10041 (walk_polymorphic_call_targets): Likewise.
10042 (cgraph_node::expand_thunk): Likewise.
10043 (symbol_table::output_weakrefs): Likewise.
10044 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
10045 (ix86_handle_option): Likewise.
10046 * config/i386/constraints.md: Likewise.
10047 * config/i386/i386-builtin-types.def (BND): Likewise.
10048 (VOID): Likewise.
10049 (PVOID): Likewise.
10050 (ULONG): Likewise.
10051 * config/i386/i386-builtin.def (BDESC_END): Likewise.
10052 (BDESC_FIRST): Likewise.
10053 (BDESC): Likewise.
10054 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
10055 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
10056 * config/i386/i386.c (enum reg_class): Likewise.
10057 (ix86_target_string): Likewise.
10058 (ix86_option_override_internal): Likewise.
10059 (ix86_conditional_register_usage): Likewise.
10060 (ix86_valid_target_attribute_inner_p): Likewise.
10061 (ix86_set_indirect_branch_type): Likewise.
10062 (ix86_set_current_function): Likewise.
10063 (ix86_function_arg_regno_p): Likewise.
10064 (init_cumulative_args): Likewise.
10065 (ix86_function_arg_advance): Likewise.
10066 (ix86_function_arg): Likewise.
10067 (ix86_pass_by_reference): Likewise.
10068 (ix86_function_value_regno_p): Likewise.
10069 (ix86_function_value_1): Likewise.
10070 (ix86_function_value_bounds): Likewise.
10071 (ix86_return_in_memory): Likewise.
10072 (ix86_setup_incoming_vararg_bounds): Likewise.
10073 (ix86_va_start): Likewise.
10074 (indirect_thunk_need_prefix): Likewise.
10075 (print_reg): Likewise.
10076 (ix86_print_operand): Likewise.
10077 (ix86_expand_call): Likewise.
10078 (ix86_output_function_return): Likewise.
10079 (reg_encoded_number): Likewise.
10080 (BDESC_VERIFYS): Likewise.
10081 (ix86_init_mpx_builtins): Likewise.
10082 (ix86_init_builtins): Likewise.
10083 (ix86_emit_cmove): Likewise.
10084 (ix86_emit_move_max): Likewise.
10085 (ix86_expand_builtin): Likewise.
10086 (ix86_builtin_mpx_function): Likewise.
10087 (ix86_get_arg_address_for_bt): Likewise.
10088 (ix86_load_bounds): Likewise.
10089 (ix86_store_bounds): Likewise.
10090 (ix86_load_returned_bounds): Likewise.
10091 (ix86_store_returned_bounds): Likewise.
10092 (ix86_class_likely_spilled_p): Likewise.
10093 (ix86_hard_regno_mode_ok): Likewise.
10094 (x86_order_regs_for_local_alloc): Likewise.
10095 (ix86_mitigate_rop): Likewise.
10096 (ix86_bnd_prefixed_insn_p): Likewise.
10097 (ix86_mpx_bound_mode): Likewise.
10098 (ix86_make_bounds_constant): Likewise.
10099 (ix86_initialize_bounds): Likewise.
10100 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
10101 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
10102 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
10103 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
10104 (TARGET_CHKP_BOUND_MODE): Likewise.
10105 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
10106 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
10107 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
10108 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
10109 * config/i386/i386.h (TARGET_MPX): Likewise.
10110 (TARGET_MPX_P): Likewise.
10111 (VALID_BND_REG_MODE): Likewise.
10112 (FIRST_BND_REG): Likewise.
10113 (LAST_BND_REG): Likewise.
10114 (enum reg_class): Likewise.
10115 (BND_REG_P): Likewise.
10116 (BND_REGNO_P): Likewise.
10117 (BNDmode): Likewise.
10118 (ADJUST_INSN_LENGTH): Likewise.
10119 * config/i386/i386.md: Likewise.
10120 * config/i386/i386.opt: Likewise.
10121 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
10122 (defined): Likewise.
10123 (LINK_MPX): Likewise.
10124 (MPX_SPEC): Likewise.
10125 (LIBMPX_SPEC): Likewise.
10126 (LIBMPXWRAPPERS_SPEC): Likewise.
10127 (CHKP_SPEC): Likewise.
10128 * config/i386/predicates.md: Likewise.
10129 * dbxout.c (dbxout_type): Likewise.
10130 * doc/extend.texi: Likewise.
10131 * doc/invoke.texi: Likewise.
10132 * doc/md.texi: Likewise.
10133 * doc/tm.texi: Likewise.
10134 * doc/tm.texi.in: Likewise.
10135 * dwarf2out.c (is_base_type): Likewise.
10136 (gen_formal_types_die): Likewise.
10137 (gen_subprogram_die): Likewise.
10138 (gen_type_die_with_usage): Likewise.
10139 (gen_decl_die): Likewise.
10140 (dwarf2out_late_global_decl): Likewise.
10141 * expr.c (expand_assignment): Likewise.
10142 (emit_storent_insn): Likewise.
10143 (store_expr_with_bounds): Likewise.
10144 (store_expr): Likewise.
10145 (expand_expr_real_1): Likewise.
10146 * expr.h (store_expr_with_bounds): Likewise.
10147 * function.c (use_register_for_decl): Likewise.
10148 (struct bounds_parm_data): Likewise.
10149 (assign_parms_augmented_arg_list): Likewise.
10150 (assign_parm_find_entry_rtl): Likewise.
10151 (assign_parm_is_stack_parm): Likewise.
10152 (assign_parm_load_bounds): Likewise.
10153 (assign_bounds): Likewise.
10154 (assign_parms): Likewise.
10155 (expand_function_start): Likewise.
10156 * gcc.c (CHKP_SPEC): Likewise.
10157 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10158 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
10159 (wrestrict_dom_walker::check_call): Likewise.
10160 * gimple.c (gimple_build_call_from_tree): Likewise.
10161 * gimple.h (enum gf_mask): Likewise.
10162 (gimple_call_with_bounds_p): Likewise.
10163 (gimple_call_set_with_bounds): Likewise.
10164 * gimplify.c (gimplify_init_constructor): Likewise.
10165 * ipa-cp.c (initialize_node_lattices): Likewise.
10166 (propagate_constants_across_call): Likewise.
10167 (find_more_scalar_values_for_callers_subset): Likewise.
10168 * ipa-hsa.c (process_hsa_functions): Likewise.
10169 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
10170 * ipa-icf.c (sem_function::merge): Likewise.
10171 * ipa-inline.c (early_inliner): Likewise.
10172 * ipa-pure-const.c (warn_function_noreturn): Likewise.
10173 (warn_function_cold): Likewise.
10174 (propagate_pure_const): Likewise.
10175 * ipa-ref.h (enum GTY): Likewise.
10176 * ipa-split.c (find_retbnd): Likewise.
10177 (consider_split): Likewise.
10178 (split_function): Likewise.
10179 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10180 * ipa.c (walk_polymorphic_call_targets): Likewise.
10181 (symbol_table::remove_unreachable_nodes): Likewise.
10182 (process_references): Likewise.
10183 (cgraph_build_static_cdtor_1): Likewise.
10184 * lto-cgraph.c (lto_output_node): Likewise.
10185 (output_refs): Likewise.
10186 (compute_ltrans_boundary): Likewise.
10187 (input_overwrite_node): Likewise.
10188 (input_node): Likewise.
10189 (input_cgraph_1): Likewise.
10190 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
10191 * passes.c (pass_manager::execute_early_local_passes): Likewise.
10192 (class pass_chkp_instrumentation_passes): Likewise.
10193 (make_pass_chkp_instrumentation_passes): Likewise.
10194 * passes.def: Likewise.
10195 * rtl.h (struct GTY): Likewise.
10196 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
10197 * stor-layout.c (layout_type): Likewise.
10198 * symtab.c: Likewise.
10199 * target.def: Likewise.
10200 * targhooks.c (default_chkp_bound_type): Likewise.
10201 (default_chkp_bound_mode): Likewise.
10202 (default_builtin_chkp_function): Likewise.
10203 (default_chkp_function_value_bounds): Likewise.
10204 (default_chkp_make_bounds_constant): Likewise.
10205 (default_chkp_initialize_bounds): Likewise.
10206 * targhooks.h (default_chkp_bound_type): Likewise.
10207 (default_chkp_bound_mode): Likewise.
10208 (default_builtin_chkp_function): Likewise.
10209 (default_chkp_function_value_bounds): Likewise.
10210 (default_chkp_make_bounds_constant): Likewise.
10211 (default_chkp_initialize_bounds): Likewise.
10212 * toplev.c (compile_file): Likewise.
10213 (process_options): Likewise.
10214 * tree-core.h (DEF_BUILTIN): Likewise.
10215 (DEF_BUILTIN_CHKP): Likewise.
10216 * tree-inline.c (declare_return_variable): Likewise.
10217 (remap_gimple_stmt): Likewise.
10218 (copy_bb): Likewise.
10219 (initialize_inlined_parameters): Likewise.
10220 (expand_call_inline): Likewise.
10221 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10222 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10223 (make_pass_ipa_chkp_produce_thunks): Likewise.
10224 (make_pass_chkp): Likewise.
10225 (make_pass_chkp_opt): Likewise.
10226 (make_pass_chkp_instrumentation_passes): Likewise.
10227 * tree-pretty-print.c (dump_generic_node): Likewise.
10228 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10229 * tree-ssa-dce.c (propagate_necessity): Likewise.
10230 (eliminate_unnecessary_stmts): Likewise.
10231 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10232 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10233 * tree-ssa-sccvn.h: Likewise.
10234 * tree-ssa-strlen.c (get_string_length): Likewise.
10235 (valid_builtin_call): Likewise.
10236 (adjust_last_stmt): Likewise.
10237 (handle_builtin_strchr): Likewise.
10238 (handle_builtin_strcpy): Likewise.
10239 (handle_builtin_stxncpy): Likewise.
10240 (handle_builtin_memcpy): Likewise.
10241 (handle_builtin_strcat): Likewise.
10242 (strlen_check_and_optimize_stmt): Likewise.
10243 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10244 * tree-streamer-in.c: Likewise.
10245 * tree-streamer.c (record_common_node): Likewise.
10246 * tree.c (tree_code_size): Likewise.
10247 (wide_int_to_tree_1): Likewise.
10248 (type_contains_placeholder_1): Likewise.
10249 (build_common_tree_nodes): Likewise.
10250 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10251 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10252 (POINTER_BOUNDS_P): Likewise.
10253 (BOUNDED_TYPE_P): Likewise.
10254 (BOUNDED_P): Likewise.
10255 (CALL_WITH_BOUNDS_P): Likewise.
10256 (pointer_bounds_type_node): Likewise.
10257 * value-prof.c (gimple_ic): Likewise.
10258 * var-tracking.c (vt_add_function_parameters): Likewise.
10259 * varasm.c (make_decl_rtl): Likewise.
10260 (assemble_start_function): Likewise.
10261 (output_constant): Likewise.
10262 (maybe_assemble_visibility): Likewise.
10263 * varpool.c (ctor_for_folding): Likewise.
10264 * chkp-builtins.def: Remove.
10265 * ipa-chkp.c: Remove.
10266 * ipa-chkp.h: Remove.
10267 * rtl-chkp.c: Remove.
10268 * rtl-chkp.h: Remove.
10269 * tree-chkp-opt.c: Remove.
10270 * tree-chkp.c: Remove.
10271 * tree-chkp.h: Remove.
10272
10273 2018-06-07 Carl Love <cel@us.ibm.com>
10274
10275 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10276 vextract_fp_from_shortl): Add BE support.
10277
10278 2018-06-07 Paul Koning <ni1d@arrl.net>
10279
10280 * compare-elim.c (try_merge_compare): Don't merge compare if
10281 address contains a side effect.
10282 (try_eliminate_compare): Likewise.
10283
10284 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10285
10286 * config.gcc: Support "tremont".
10287 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10288 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10289 PROCESSOR_TREMONT.
10290 * config/i386/i386.c (m_TREMONT): Define.
10291 (processor_target_table): Add "tremont".
10292 (PTA_TREMONT): Define.
10293 (ix86_lea_outperforms): Add TARGET_TREMONT.
10294 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10295 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10296 and M_INTEL_GOLDMONT_PLUS.
10297 (fold_builtin_cpu): Add "tremont".
10298 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10299 (ix86_option_override_internal): Add "tremont".
10300 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10301 (processor_type): Add PROCESSOR_TREMONT.
10302 * config/i386/x86-tune.def: Add m_TREMONT.
10303 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10304
10305 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10306
10307 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10308 symbol defined for msp430i* devices to be lower case.
10309
10310 2018-06-07 Richard Biener <rguenther@suse.de>
10311
10312 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10313 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10314 Properly wrap signed arithmetic if overflow wraps.
10315
10316 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10317
10318 PR tree-optimization/69615
10319 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10320 of a cast from a same precision integral SSA_NAME in a bb dominated
10321 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10322 cast to utype if rhs2 has already a compatible type.
10323
10324 2018-06-07 Richard Biener <rguenther@suse.de>
10325
10326 PR tree-optimization/85935
10327 * graphite-scop-detection.c (find_params_in_bb): Analyze
10328 condition operands with respect to the correct loop. Assert
10329 the analysis doesn't fail.
10330
10331 2018-06-04 Carl Love <cel@us.ibm.com>
10332
10333 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10334 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10335 as it is slightly cheaper.
10336 (first_match_or_eos_index_<mode>):
10337 Calculate index using natural element order.
10338 (first_match_index_<mode>):
10339 Calculate index using natural element order.
10340 (first_match_or_eos_index_<mode>):
10341 Calculate index using natural order.
10342 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10343 for BE and LE modes.
10344 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10345 P9V_BUILTIN_VCLZLSBB_V16QI.
10346 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10347 specific.
10348
10349 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10350
10351 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10352 indentation and line wrap for many prototypes. Add missing
10353 @smallexample directives around block of prototypes for vec_xl and
10354 vec_xst.
10355
10356 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10357
10358 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10359 track if we pass or return IEEE 128-bit floating point.
10360 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10361 C++ mangling that is compatible with GCC 8.1.
10362 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10363 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10364 floating point types.
10365 (rs6000_function_arg_advance_1): Likewise.
10366 (rs6000_mangle_type): Optionally generate mangled names that match
10367 what GCC 8.1 generated for IEEE 128-bit floating point types.
10368 (rs6000_globalize_decl_name): If we have an external function that
10369 passes or returns IEEE 128-bit types, generate a weak reference
10370 from the mangled name used in GCC 8.1 to the current mangled
10371 name.
10372 (rs6000_init_builtins): Make __ibm128 use the long double type if
10373 long double is IBM extended double. Make __float128 use the long
10374 double type if long double is IEEE 128-bit.
10375
10376 PR target/85657
10377 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10378 macro for __ibm128 built-in functions.
10379 (PACK_IF): Add __ibm128 pack/unpack functions.
10380 (UNPACK_IF): Likewise.
10381 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10382 enable long double built-in functions if long double is IEEE
10383 128-bit floating point.
10384 (rs6000_invalid_builtin): Update long double built-in function
10385 error message.
10386 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10387 functions, adjust the built-in function to use the long double
10388 built-in function if __ibm128 and long double are the same type.
10389 * doc/extend.texi (PowerPC builtins): Update documention for
10390 __builtin_{,un}pack_longdouble. Add documentation for
10391 __builtin_{,un}pack_ibm128.
10392
10393 2018-06-06 Jim Wilson <jimw@sifive.com>
10394
10395 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10396 (struct machine_function): New field interrupt_mode.
10397 (riscv_handle_type_attribute): New function. Add forward declaration.
10398 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10399 (riscv_expand_epilogue): Check interrupt_mode field.
10400 (riscv_set_current_function): Check interrupt attribute args and
10401 set interrupt_mode field.
10402 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10403 (riscv_sret, riscv_uret): New.
10404 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10405 new arguments to interrupt attribute.
10406
10407 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10408
10409 PR target/63177
10410 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10411 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10412
10413 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10414
10415 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10416 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10417 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10418 several redundant entries.
10419
10420 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10421
10422 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10423 type from "rtx" to "rtx_insn *".
10424 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10425 for local "call_insn", removing cast.
10426 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10427
10428 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10429
10430 PR tree-optimization/86066
10431 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10432 for BIT_INSERT_EXPR stores.
10433
10434 2018-06-06 Richard Biener <rguenther@suse.de>
10435
10436 PR tree-optimization/86062
10437 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10438 component refs ontop
10439 of to be offsetted base.
10440
10441 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10442
10443 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10444 to be static and remove check on interrupt attribute name.
10445
10446 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10447
10448 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10449 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10450
10451 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10452
10453 PR target/79924
10454 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10455 second argument.
10456 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10457 Remove second argument, change how error is called.
10458 (aarch64_layout_arg): Remove second argument from
10459 aarch64_err_no_fpadvsimd call.
10460 (aarch64_init_cumulative_args): Ditto.
10461 (aarch64_gimplify_va_arg_expr): Ditto.
10462 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10463
10464 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10465
10466 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10467 (*simple_return_indirect_internal<mode>): Rename from
10468 simple_return_indirect_internal. Use W mode iterator.
10469 (rstorssp): New expander.
10470 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10471 (clrssbsy): New expander.
10472 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10473
10474 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10475
10476 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10477 __typeof__.
10478 (cmse_check_pointed_object): Likewise.
10479
10480 2018-06-05 Martin Liska <mliska@suse.cz>
10481
10482 PR gcov-profile/47618
10483 * doc/invoke.texi: Document how -fprofile-dir format
10484 is extended.
10485
10486 2018-06-05 Richard Biener <rguenther@suse.de>
10487
10488 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10489 removal pretend DOM info isn't available so we do not update
10490 it and only remove edges, not dominated blocks. Actually free
10491 DOM info in case we removed something. Remove unreachable blocks.
10492 (mfb_keep_latches): Work with either DOM info or marked backedges.
10493 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10494 first. Mark backedges if DOM info isn't available.
10495 (Re-)compute DOM info after cleanup_control_flow_pre.
10496
10497 2018-06-05 Richard Biener <rguenther@suse.de>
10498
10499 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10500 (locus_discrim_hasher::hash): Adjust.
10501 (locus_discrim_hasher::equal): Likewise.
10502 (next_discriminator_for_locus): Work on line directly.
10503 (same_line_p): Pass in expanded locus1 as well.
10504 (assign_discriminators): Avoid redundant location expansions.
10505
10506 2018-06-05 Richard Biener <rguenther@suse.de>
10507
10508 PR tree-optimization/86046
10509 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10510 if required after clearing TREE_ADDRESSABLE.
10511
10512 2018-06-05 Richard Biener <rguenther@suse.de>
10513
10514 PR tree-optimization/86047
10515 * tree-ssa-loop.c (for_each_index): Glob handling of all
10516 decls and constants and really handle all of them.
10517
10518 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10519
10520 PR target/81497
10521 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10522 qualifier_void_pointer and qualifier_const_void_pointer.
10523 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10524 (arm_init_builtins): Handle the above.
10525 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10526 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10527 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10528 void intrinsics.
10529
10530 2018-06-05 Martin Liska <mliska@suse.cz>
10531
10532 * auto-profile.c (read_autofdo_file): Do not use
10533 gcov_ctr_summary struct.
10534 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10535 * coverage.c (struct counts_entry): Likewise.
10536 (read_counts_file): Read just single summary entry.
10537 (get_coverage_counts): Use gcov_summary struct.
10538 * coverage.h (get_coverage_counts): Likewise.
10539 * gcov-dump.c (dump_working_sets): Likewise.
10540 (tag_summary): Dump just single summary.
10541 * gcov-io.c (gcov_write_summary): Write just histogram
10542 summary.
10543 (gcov_read_summary): Read just single summary.
10544 (compute_working_sets): Use gcov_summary struct.
10545 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10546 of GCOV_COUNTERS_SUMMABLE.
10547 (GCOV_COUNTERS_SUMMABLE): Remove.
10548 (GCOV_FIRST_VALUE_COUNTER): Replace with
10549 GCOV_COUNTER_V_INTERVAL.
10550 (struct gcov_ctr_summary): Remove.
10551 (struct gcov_summary): Directly use fields of former
10552 gcov_ctr_summary.
10553 (compute_working_sets): Use gcov_summary struct.
10554 * gcov.c (read_count_file): Do not use ctrs fields.
10555 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10556 struct.
10557 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10558 struct.
10559 * profile.c: Likewise.
10560 * profile.h: Likewise.
10561
10562 2018-06-05 Martin Liska <mliska@suse.cz>
10563
10564 PR gcov-profile/84846
10565 * gcov.c (output_lines): Print working directory only
10566 in intermediate format.
10567
10568 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10569
10570 * config/s390/s390-builtin-types.def: Add void function type.
10571 * config/s390/s390-builtins.def: Use the function type for the
10572 tbeginc builtin.
10573
10574 2018-06-04 Jim Wilson <jimw@sifive.com>
10575
10576 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10577 to int.
10578 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10579 and maybe_eh_return. Change regno to unsigned int. Use new args to
10580 handle EH_RETURN_DATA_REGNO registers properly.
10581 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10582 (riscv_expand_epilogue): Update comment. Change argument name and
10583 type. Update code to use new name and type. Pass new args to
10584 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10585 EXCEPTION_RETURN.
10586 * config/riscv/riscv.md (NORMAL_RETURN): New.
10587 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10588 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10589 (eh_return): Call gen_eh_return_internal and emit barrier.
10590 (eh_return_internal): Call riscv_expand_epilogue.
10591
10592 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10593
10594 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10595 bit_insertion field and declare can_be_merged_into method.
10596 (merged_store_group::can_be_merged_into): New method.
10597 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10598 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10599 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10600
10601 2018-06-04 Richard Biener <rguenther@suse.de>
10602
10603 PR tree-optimization/85955
10604 * builtins.c (fold_builtin_sincos): Convert pointers to
10605 destination to appropriate type before dereferencing.
10606
10607 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10608
10609 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10610
10611 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10612
10613 * expr.c (expand_expr_real_1): Force the operand into memory if
10614 its TYPE_MODE is BLKmode and if there is no integer mode for
10615 the number of bits being extracted.
10616
10617 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10618
10619 PR target/85832
10620 PR target/86036
10621 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10622 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10623
10624 2018-06-04 Richard Biener <rguenther@suse.de>
10625
10626 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10627 (cleanup_tree_cfg_noloop): ... single caller. Do
10628 start_recording_case_labels later.
10629
10630 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10631
10632 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10633 to _IMMINTRIN_H_INCLUDED.
10634 * config/i386/pconfigintrin.h: Ditto.
10635 * config/i386/waitpkgintrin.h: Ditto.
10636 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10637 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10638 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10639 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10640 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10641 waitpkgintrin.h and cldemoteintrin.h.
10642
10643 2018-06-04 Richard Biener <rguenther@suse.de>
10644
10645 PR tree-optimization/86038
10646 * tracer.c (find_best_successor): Check probability for
10647 being initialized, bail out if not.
10648
10649 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10650
10651 PR target/86003
10652 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10653 of bits to ignore when comparing architectures.
10654
10655 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10656
10657 PR tree-optimization/69615
10658 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10659 maximum or minimum of the type, try to merge it also as if
10660 range1 is + [-, x - 1] or + [x + 1, -].
10661
10662 PR c++/86025
10663 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10664
10665 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10666
10667 PR tree-optimization/86034
10668 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10669 the unsigned bitfield type in a bit insertion sequence if it does not
10670 have a larger precision than the bitfield size.
10671 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10672
10673 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10674
10675 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10676
10677 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10678
10679 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10680 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10681 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10682 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10683
10684 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10685
10686 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10687 Disable -fdelete-null-pointer-checks for ELF toolchain.
10688
10689 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10690 Kito Cheng <kito.cheng@gmail.com>
10691
10692 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10693 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10694 (nds32*-*-*): Add glibc and uclibc conditions.
10695 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10696 (TARGET_EXCEPT_UNWIND_INFO): Define.
10697 * config/nds32/elf.h: New file.
10698 * config/nds32/linux.h: New file.
10699 * config/nds32/nds32-elf.opt: New file.
10700 * config/nds32/nds32-linux.opt: New file.
10701 * config/nds32/nds32-fp-as-gp.c
10702 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10703 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10704 TARGET_LINUX_ABI.
10705 (nds32_asm_file_end): Ditto.
10706 (nds32_print_operand): Ditto.
10707 (nds32_insert_attributes): Ditto.
10708 (nds32_init_libfuncs): New function.
10709 (TARGET_HAVE_TLS): Define.
10710 (TARGET_INIT_LIBFUNCS): Define.
10711 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10712 spec content.
10713 (TARGET_ELF): Apply different mcmodel setting.
10714 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10715 been migrated into elf.h and linux.h files.
10716 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10717 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10718 (mcmodel): The content has been migrated into nds32-elf.opt and
10719 nds32-linux.opt files.
10720 * config/nds32/t-elf: New file.
10721 * config/nds32/t-linux: New file.
10722
10723 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10724 Shiva Chen <shiva0217@gmail.com>
10725
10726 * config/nds32/constants.md (unspec_volatile_element): Add
10727 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10728 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10729 optimization.
10730 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10731 (make_pass_nds32_fp_as_gp): Declare.
10732 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10733 optmization pass.
10734 (nds32_asm_function_end_prologue): Remove unused asm output.
10735 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10736 (nds32_asm_file_start): Output necessary fp_as_gp information.
10737 (nds32_option_override): Adjust register usage.
10738 (nds32_expand_prologue): Consider fp_as_gp situation.
10739 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10740 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10741 (epilogue): Ditto.
10742 (return): Ditto.
10743 (simple_return): Ditto.
10744 (omit_fp_begin): Output special directive for fp_as_gp.
10745 (omit_fp_end): Output special directive for fp_as_gp.
10746 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10747 mforbid-fp-as-gp): New options.
10748
10749 2018-06-01 Mark Wielaard <mark@klomp.org>
10750
10751 * dwarf2out.c (dwarf2out_finish): Remove generation of
10752 DW_AT_loclists_base.
10753
10754 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10755
10756 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10757 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10758 (struct merged_store_group): Add bit_insertion field.
10759 (dump_char_array): Use standard hexadecimal format.
10760 (merged_store_group::merged_store_group): Set bit_insertion to false.
10761 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10762 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10763 also print the mask in the dump file.
10764 (pass_store_merging::gate): Minor tweak.
10765 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10766 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10767 stores with INTEGER_CST stores.
10768 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10769 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10770 and use it throughout. Generate bit insertion sequences if need be.
10771 (pass_store_merging::process_store): Remove redundant condition.
10772 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10773
10774 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10775
10776 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10777 the 128-bit floating point types. Fix function comment.
10778
10779 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10780
10781 * config/aarch64/aarch64-simd.md
10782 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10783 mnemonics.
10784 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10785 mnemonics.
10786
10787 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10788
10789 PR tree-optimization/85989
10790 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10791 variable.
10792 (backprop::intersect_uses): Check it when deciding whether this
10793 is a backedge reference.
10794 (backprop::process_block): Add each phi to m_visited_phis
10795 after visiting it, then clear it at the end.
10796
10797 2018-06-01 Richard Biener <rguenther@suse.de>
10798
10799 * tree-vectorizer.h (vect_dr_stmt): New function.
10800 (vect_get_load_cost): Adjust.
10801 (vect_get_store_cost): Likewise.
10802 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10803 Use vect_dr_stmt instead of DR_SMTT.
10804 (vect_record_base_alignments): Likewise.
10805 (vect_calculate_target_alignment): Likewise.
10806 (vect_compute_data_ref_alignment): Likewise and make static.
10807 (vect_update_misalignment_for_peel): Likewise.
10808 (vect_verify_datarefs_alignment): Likewise.
10809 (vector_alignment_reachable_p): Likewise.
10810 (vect_get_data_access_cost): Likewise. Pass down
10811 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10812 (vect_get_peeling_costs_all_drs): Likewise.
10813 (vect_peeling_hash_get_lowest_cost): Likewise.
10814 (vect_enhance_data_refs_alignment): Likewise.
10815 (vect_find_same_alignment_drs): Likewise.
10816 (vect_analyze_data_refs_alignment): Likewise.
10817 (vect_analyze_group_access_1): Likewise.
10818 (vect_analyze_group_access): Likewise.
10819 (vect_analyze_data_ref_access): Likewise.
10820 (vect_analyze_data_ref_accesses): Likewise.
10821 (vect_vfa_segment_size): Likewise.
10822 (vect_small_gap_p): Likewise.
10823 (vectorizable_with_step_bound_p): Likewise.
10824 (vect_prune_runtime_alias_test_list): Likewise.
10825 (vect_analyze_data_refs): Likewise.
10826 (vect_supportable_dr_alignment): Likewise.
10827 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10828 (vect_gen_prolog_loop_niters): Likewise.
10829 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10830 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10831 modify DR_STMT.
10832 (vect_recog_mask_conversion_pattern): Likewise.
10833 (vect_try_gather_scatter_pattern): Likewise.
10834 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10835 to vect_get_store_cost.
10836 (vect_get_store_cost): Get stmt_info instead of DR.
10837 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10838 (vect_get_load_cost): Get stmt_info instead of DR.
10839
10840 2018-06-01 Richard Biener <rguenther@suse.de>
10841
10842 PR middle-end/86017
10843 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10844 vars wrapped in MEM_REFs.
10845
10846 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10847
10848 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10849 Fix subreg tests so that we only return a choice between
10850 GENERAL_REGS and FP_REGS if the original classes included both.
10851
10852 2018-06-01 Richard Biener <rguenther@suse.de>
10853
10854 PR ipa/85960
10855 * tree-ssa-structalias.c (get_function_part_constraint):
10856 Handle NULL fi->decl.
10857 (find_func_aliases_for_call): Properly handle indirect
10858 fi from direct call.
10859 (find_func_clobbers): Likewise.
10860 (ipa_pta_execute): Likewise.
10861 (create_variable_info_for): For functions that are ifunc_resolver
10862 resolve to a varinfo that contains the result of the resolver call.
10863 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10864 aliases.
10865
10866 2018-05-31 Michael Collison <michael.collison@arm.com>
10867
10868 * config/aarch64/aarch64.md:
10869 (*fix_to_zero_extenddfdi2): New pattern.
10870 * gcc.target/aarch64/fix_extend1.c: New testcase.
10871
10872 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10873
10874 PR middle-end/78809
10875 PR middle-end/83026
10876 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10877 and BUILT_IN_STRNCMP_EQ.
10878 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10879 BUILT_IN_STRNCMP_EQ.
10880 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10881 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10882 (gimple_fold_builtin): Likewise.
10883 * tree-ssa-strlen.c (compute_string_length): New function.
10884 (determine_min_obsize): New function.
10885 (handle_builtin_string_cmp): New function to handle calls to
10886 string compare functions.
10887 (strlen_optimize_stmt): Add handling to builtin string compare
10888 calls.
10889 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10890 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10891 * tree.c (build_common_builtin_nodes): Add new defines of
10892 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10893
10894 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10895
10896 PR target/85984
10897 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10898 functions with naked attribute.
10899
10900 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10901
10902 * config/i386/sse.md (avx_vec_concat<mode>):
10903 Substitute concat_tg_mode mode attribute with xtg_mode.
10904 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10905 (concat_tg_mode): Remove mode attribute.
10906
10907 2018-05-31 Martin Sebor <msebor@redhat.com>
10908
10909 PR c/82063
10910 * calls.c (alloc_max_size): Correct a logic error/typo.
10911 Treat excessive arguments as infinite. Warn for invalid arguments.
10912 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10913
10914 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10915
10916 PR target/85829
10917 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10918 and movx for Haswell.
10919
10920 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10921 Cesar Philippidis <cesar@codesourcery.com>
10922
10923 PR middle-end/85879
10924 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10925 when emitting error on private/firstprivate reductions.
10926 * omp-low.c (lower_omp_target): Avoid reference-type processing
10927 on pointers for firstprivate clause.
10928
10929 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10930
10931 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10932 (st1x2): Likewise.
10933 (st1x3): Likewise.
10934 * config/aarch64/aarch64-simd.md
10935 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10936 (aarch64_ld1_x3_<mode>): Likewise
10937 (aarch64_st1x2<VALLDIF:mode>): Likewise
10938 (aarch64_st1_x2_<mode>): Likewise
10939 (aarch64_st1x3<VALLDIF:mode>): Likewise
10940 (aarch64_st1_x3_<mode>): Likewise
10941 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10942 (vld1_s8_x3): Likewise.
10943 (vld1_u16_x3): Likewise.
10944 (vld1_s16_x3): Likewise.
10945 (vld1_u32_x3): Likewise.
10946 (vld1_s32_x3): Likewise.
10947 (vld1_u64_x3): Likewise.
10948 (vld1_s64_x3): Likewise.
10949 (vld1_f16_x3): Likewise.
10950 (vld1_f32_x3): Likewise.
10951 (vld1_f64_x3): Likewise.
10952 (vld1_p8_x3): Likewise.
10953 (vld1_p16_x3): Likewise.
10954 (vld1_p64_x3): Likewise.
10955 (vld1q_u8_x3): Likewise.
10956 (vld1q_s8_x3): Likewise.
10957 (vld1q_u16_x3): Likewise.
10958 (vld1q_s16_x3): Likewise.
10959 (vld1q_u32_x3): Likewise.
10960 (vld1q_s32_x3): Likewise.
10961 (vld1q_u64_x3): Likewise.
10962 (vld1q_s64_x3): Likewise.
10963 (vld1q_f16_x3): Likewise.
10964 (vld1q_f32_x3): Likewise.
10965 (vld1q_f64_x3): Likewise.
10966 (vld1q_p8_x3): Likewise.
10967 (vld1q_p16_x3): Likewise.
10968 (vld1q_p64_x3): Likewise.
10969 (vst1_s64_x2): Likewise.
10970 (vst1_u64_x2): Likewise.
10971 (vst1_f64_x2): Likewise.
10972 (vst1_s8_x2): Likewise.
10973 (vst1_p8_x2): Likewise.
10974 (vst1_s16_x2): Likewise.
10975 (vst1_p16_x2): Likewise.
10976 (vst1_s32_x2): Likewise.
10977 (vst1_u8_x2): Likewise.
10978 (vst1_u16_x2): Likewise.
10979 (vst1_u32_x2): Likewise.
10980 (vst1_f16_x2): Likewise.
10981 (vst1_f32_x2): Likewise.
10982 (vst1_p64_x2): Likewise.
10983 (vst1q_s8_x2): Likewise.
10984 (vst1q_p8_x2): Likewise.
10985 (vst1q_s16_x2): Likewise.
10986 (vst1q_p16_x2): Likewise.
10987 (vst1q_s32_x2): Likewise.
10988 (vst1q_s64_x2): Likewise.
10989 (vst1q_u8_x2): Likewise.
10990 (vst1q_u16_x2): Likewise.
10991 (vst1q_u32_x2): Likewise.
10992 (vst1q_u64_x2): Likewise.
10993 (vst1q_f16_x2): Likewise.
10994 (vst1q_f32_x2): Likewise.
10995 (vst1q_f64_x2): Likewise.
10996 (vst1q_p64_x2): Likewise.
10997 (vst1_s64_x3): Likewise.
10998 (vst1_u64_x3): Likewise.
10999 (vst1_f64_x3): Likewise.
11000 (vst1_s8_x3): Likewise.
11001 (vst1_p8_x3): Likewise.
11002 (vst1_s16_x3): Likewise.
11003 (vst1_p16_x3): Likewise.
11004 (vst1_s32_x3): Likewise.
11005 (vst1_u8_x3): Likewise.
11006 (vst1_u16_x3): Likewise.
11007 (vst1_u32_x3): Likewise.
11008 (vst1_f16_x3): Likewise.
11009 (vst1_f32_x3): Likewise.
11010 (vst1_p64_x3): Likewise.
11011 (vst1q_s8_x3): Likewise.
11012 (vst1q_p8_x3): Likewise.
11013 (vst1q_s16_x3): Likewise.
11014 (vst1q_p16_x3): Likewise.
11015 (vst1q_s32_x3): Likewise.
11016 (vst1q_s64_x3): Likewise.
11017 (vst1q_u8_x3): Likewise.
11018 (vst1q_u16_x3): Likewise.
11019 (vst1q_u32_x3): Likewise.
11020 (vst1q_u64_x3): Likewise.
11021 (vst1q_f16_x3): Likewise.
11022 (vst1q_f32_x3): Likewise.
11023 (vst1q_f64_x3): Likewise.
11024 (vst1q_p64_x3): Likewise.
11025
11026 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11027
11028 * config/msp430/msp430.c (msp430_output_labelref): Prepend
11029 user_label_prefix to name.
11030
11031 * tree-core.h: Update comment about the format of NAME string
11032 passed to handler in attribute_spec.
11033
11034 * config/msp430/msp430.md: Remove erroneous subreg expression from
11035 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
11036 zero_extend{q,h}isi2.
11037
11038 2018-05-30 Borislav Petkov <bp@suse.de>
11039
11040 * doc/extend.texi: Document some architecture specific
11041 constraints and sort entries.
11042
11043 2018-05-30 Martin Sebor <msebor@redhat.com>
11044
11045 PR middle-end/85369
11046 * builtins.c (expand_builtin_stpcpy_1): New function.
11047 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
11048 only if the former succeeds.
11049
11050 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
11051
11052 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
11053 in saphira.
11054
11055 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11056
11057 * doc/invoke.texi (-flinker-output): Document
11058
11059 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11060
11061 * passes.c (ipa_write_summaries): Only modify statements if body
11062 is in memory.
11063 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
11064 incrementally linking.
11065 (ipa_passes): Likewise.
11066 * lto-cgraph.c (lto_output_node): When incrementally linking do not
11067 pass down resolution info.
11068 * common.opt (flag_incremental_link): Update info.
11069 * gcc.c (plugin specs): Turn flinker-output=* to
11070 -plugin-opt=-linker-output-known
11071 * toplev.c (compile_file): Also cut compilation when doing incremental
11072 link.
11073 * flag-types. (enum lto_partition_model): Add
11074 LTO_LINKER_OUTPUT_NOLTOREL.
11075 (invoke.texi): Add -flinker-output docs.
11076 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
11077 link same way as WPA; do not stream in dead initializers.
11078
11079 * dwarf2out.c (dwarf2out_die_ref_for_decl,
11080 darf2out_register_external_decl): Support incremental link.
11081
11082 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11083
11084 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
11085
11086 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
11087
11088 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
11089 it down to simple_object_copy_lto_debug_sections.
11090 (run_gcc): Determine incremental LTO link time and configure
11091 lto1 into non-wpa mode, disable renaming of debug sections.
11092
11093 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
11094
11095 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11096 descriptions of various incorrectly documented functions.
11097
11098 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
11099
11100 Revert:
11101 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11102 address check not strict.
11103
11104 2018-05-30 Richard Biener <rguenther@suse.de>
11105
11106 PR tree-optimization/85964
11107 * tracer.c (better_p): Drop initialized count check, we only
11108 call the function with initialized counts now.
11109 (find_best_successor): Do find a best edge if one
11110 has uninitialized count.
11111 (find_best_predecessor): Likewise. Do BB frequency check only
11112 if count is initialized.
11113
11114 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
11115
11116 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
11117 (aarch64_ldrstr_offset_compare): New.
11118 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
11119 load/store orderings.
11120 (aarch64_gen_adjusted_ldpstp): Likewise.
11121
11122 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
11123
11124 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
11125 Check for subset of GENERAL_REGS and FP_REGS.
11126 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
11127 r=w alternative.
11128
11129 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
11130
11131 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
11132 and wi::to_poly_offset. Add the current offset and then check
11133 whether the sum fits, rather than using an unchecked addition of
11134 a checked term. Check for a shwi rather than a uhwi.
11135 * expr.c (get_bit_range): Use tree_to_poly_uint64.
11136 (store_constructor): Use poly_int_tree_p.
11137 (expand_expr_real_1): Likewise.
11138 * function.c (assign_temp): Likewise.
11139 * fold-const.c (const_binop): Use poly_int_tree_p and
11140 wi::to_poly_offset.
11141 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
11142 division.
11143 * ipa-icf-gimple.c (func_checker::compare_operand): Use
11144 to_poly_offset for MEM offsets.
11145 * ipa-icf.c (sem_variable::equals): Likewise.
11146 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
11147 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
11148 wi::to_poly_offset for BIT_FIELD_REF offsets.
11149 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
11150 wi::to_poly_offset.
11151 * var-tracking.c (emit_note_insn_var_location): Use
11152 tree_to_poly_uint64.
11153
11154 2018-05-29 Jim Wilson <jimw@sifive.com>
11155
11156 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
11157
11158 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
11159
11160 PR target/85950
11161 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
11162 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
11163 sequence.
11164 (sse4_1_round<mode>2): Use nonimmediate_operand
11165 for operand 1 predicate.
11166
11167 2018-05-29 Martin Sebor <msebor@redhat.com>
11168 Richard Biener <rguenther@suse.de>
11169
11170 PR testsuite/85888
11171 * calls.c (get_size_range): Call determine_value_range instead
11172 of get_value_range..
11173 * tree-vrp.h (determine_value_range): Declared new function.
11174 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
11175
11176 2018-05-29 Richard Biener <rguenther@suse.de>
11177
11178 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
11179 sure to use non-pattern stmts for get_earlier_stmt arguments.
11180 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
11181 called on pattern stmts.
11182 (get_later_stmt): Likewise.
11183
11184 2018-05-29 Martin Liska <mliska@suse.cz>
11185
11186 PR gcov-profile/85759
11187 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
11188 env variables.
11189
11190 2018-05-29 Jakub Jelinek <jakub@redhat.com>
11191
11192 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
11193 VEC_UNPACK_*_EXPR.
11194 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
11195 VEC_PACK_*_EXPR.
11196
11197 PR target/85918
11198 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11199 VEC_PACK_FLOAT_EXPR): New tree codes.
11200 * tree-pretty-print.c (op_code_prio): Handle
11201 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11202 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11203 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11204 * tree-inline.c (estimate_operator_cost): Likewise.
11205 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11206 * fold-const.c (const_binop): Likewise.
11207 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11208 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11209 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11210 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11211 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11212 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11213 * expr.c (expand_expr_real_2): Likewise.
11214 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11215 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11216 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11217 optabs.
11218 * optabs.c (expand_widen_pattern_expr): For
11219 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11220 sign from result type rather than operand's type.
11221 (expand_binop_directly): For vec_packu_float_optab and
11222 vec_packs_float_optab allow result type to be different from operand's
11223 type.
11224 * optabs-tree.c (optab_for_tree_code): Handle
11225 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11226 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11227 * tree-vect-generic.c (expand_vector_operations_1): Handle
11228 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11229 VEC_PACK_FLOAT_EXPR.
11230 * tree-vect-stmts.c (supportable_widening_operation): Handle
11231 FIX_TRUNC_EXPR.
11232 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11233 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11234 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11235 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11236 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11237 mode attributes.
11238 (vec_pack<floatprefix>_float_<mode>): New expander.
11239 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11240 attributes.
11241 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11242 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11243 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11244 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11245 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11246 Document.
11247 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11248 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11249 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11250 VEC_PACK_FLOAT_EXPR): Document.
11251
11252 2018-05-29 Richard Biener <rguenther@suse.de>
11253
11254 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11255 member.
11256 (stmt_vec_info_vec): Make pointer.
11257 (init_stmt_vec_info_vec): Remove.
11258 (free_stmt_vec_info_vec): Likewise.
11259 (set_stmt_vec_info_vec): New function.
11260 (free_stmt_vec_infos): Likewise.
11261 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11262 (set_vinfo_for_stmt): Likewise.
11263 (get_earlier_stmt): Likewise.
11264 (get_later_stmt): Likewise.
11265 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11266 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11267 (vec_info::~vec_info): Free stmt_vec_infos.
11268 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11269 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11270 (pass_slp_vectorize::execute): Likewise.
11271 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11272 (free_stmt_vec_info_vec): Likewise.
11273 (set_stmt_vec_info_vec): New function.
11274 (free_stmt_vec_infos): Likewise.
11275 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11276 the global stmt_vec_info_vec.
11277 * tree-parloops.c (gather_scalar_reductions): Use
11278 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11279 vector.
11280
11281 2018-05-29 Richard Biener <rguenther@suse.de>
11282
11283 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11284
11285 2018-05-29 Martin Liska <mliska@suse.cz>
11286 David Malcolm <dmalcolm@redhat.com>
11287
11288 * vec.c (test_reverse): New.
11289 (vec_c_tests): Add new test.
11290 * vec.h (vl_ptr>::reverse): New function.
11291
11292 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11293
11294 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11295
11296 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11297 and later.
11298
11299 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11300
11301 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11302
11303 2018-05-28 Richard Biener <rguenther@suse.de>
11304
11305 PR tree-optimization/85933
11306 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11307 look at stmts marked as vectorizable.
11308
11309 2018-05-28 Richard Biener <rguenther@suse.de>
11310
11311 PR tree-optimization/85934
11312 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11313 vector boolean check before scalar optimization.
11314
11315 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11316
11317 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11318 for armv5te.
11319
11320 2018-05-28 Mark Wielaard <mark@klomp.org>
11321
11322 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11323 if it is an expression containing a minus sign.
11324
11325 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11326
11327 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11328
11329 2018-05-27 Paul Koning <ni1d@arrl.net>
11330
11331 * config/pdp11/pdp11.md (truncsihi2): Remove.
11332
11333 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11334 Chung-Ju Wu <jasonwucj@gmail.com>
11335
11336 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11337 implementation.
11338 (unaligned_store_dw): Ditto.
11339 * config/nds32/nds32-memory-manipulation.c
11340 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11341 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11342 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11343 (emit_setmem_word_loop): Rename to ...
11344 (emit_setmem_doubleword_loop): ... this.
11345 (nds32_gen_dup_4_byte_to_word_value): New function.
11346 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11347 (nds32_expand_setmem_loop): Refine implementation.
11348 (nds32_expand_setmem_loop_v3m): Ditto.
11349 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11350 pattern.
11351
11352 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11353
11354 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11355
11356 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11357
11358 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11359 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11360 machine->attr_no_prologue_p.
11361 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11362 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11363 (nds32_expand_epilogue): Consider attr_naked_p.
11364 (nds32_expand_epilogue_v3pop): Likewise.
11365 (nds32_can_use_return_insn): Likewise.
11366 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11367 attr_no_prologue_p fields.
11368 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11369
11370 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11371
11372 PR target/85918
11373 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11374 attributes.
11375 * config/i386/sse.md
11376 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11377 Rename to ...
11378 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11379 ... this.
11380 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11381 Rename to ...
11382 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11383 ... this.
11384 (*<floatsuffix>floatv2div2sf2): Rename to ...
11385 (*float<floatunssuffix>v2div2sf2): ... this.
11386 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11387 (float<floatunssuffix>v2div2sf2_mask): ... this.
11388 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11389 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11390 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11391 to ...
11392 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11393 ... this.
11394 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11395 Rename to ...
11396 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11397 ... this.
11398 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11399 Rename to ...
11400 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11401 ... this.
11402 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11403 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11404 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11405 gen_ufix_truncv8dfv8si2.
11406 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11407 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11408 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11409 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11410 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11411 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11412 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11413 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11414
11415 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11416
11417 PR target/85900
11418 PR target/85345
11419 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11420
11421 2018-05-25 Jim Wilson <jimw@sifive.com>
11422
11423 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11424 * config/riscv/riscv.c (struct machine_function): Add
11425 interrupt_handler_p and attribute_checked_p fields.
11426 (riscv_attribute_table): Add interrupt.
11427 (riscv_interrupt_type_p): New.
11428 (riscv_save_reg_p): Save extra regs for interrupt handler.
11429 (riscv_use_save_libcall): Return false for interrupt handler.
11430 (riscv_first_stack_step): Add forward declaration.
11431 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11432 for interrupt handler with large frame. Use it for saved reg list.
11433 (riscv_expand_prologue): Move flag_stack_usage_info support to
11434 eliminate duplication.
11435 (riscv_expand_epilogue): Generate mret for interrupt handler.
11436 (riscv_epilogue_uses): New.
11437 (riscv_can_use_return_insn): Return false for interrupt handler.
11438 (riscv_function_ok_for_sibcall): Likewise.
11439 (riscv_set_current_function): Add interrupt handler support.
11440 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11441 * config/riscv/riscv.md (UNSPECV_MRET): New.
11442 (GP_REGNUM): New.
11443 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11444 (riscv_mret): New.
11445 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11446
11447 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11448
11449 PR tree-optimization/85712
11450 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11451 this candidate has already been replaced in-situ by a copy.
11452
11453 2018-05-25 Jason Merrill <jason@redhat.com>
11454
11455 PR c++/80485 - inline function non-zero address.
11456 * symtab.c (nonzero_address): Check DECL_COMDAT.
11457
11458 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11459
11460 PR target/83628
11461 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11462 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11463 extension of SImode operation. Use const123_operand predicate.
11464 (*saddsi_1): Remove.
11465 (*saddl_se_1): Ditto.
11466 (*ssubsi_1): Ditto.
11467 (*ssubl_se_1): Ditto.
11468 * config/alpha/predicates.md (const123_operand): New predicate.
11469 * config/alpha/constraints.md (P): Use IN_RANGE.
11470
11471 2018-05-25 Richard Biener <rguenther@suse.de>
11472
11473 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11474 defaulted to true.
11475 (ref_maybe_used_by_stmt_p): Likewise.
11476 (stmt_may_clobber_ref_p): Likewise.
11477 (stmt_may_clobber_ref_p_1): Likewise.
11478 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11479 and pass it along.
11480 (ref_maybe_used_by_stmt_p): Likewise.
11481 (stmt_may_clobber_ref_p): Likewise.
11482 (stmt_may_clobber_ref_p_1): Likewise.
11483 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11484 the alias oracle to disambiguate DRs with stmts DR analysis
11485 couldn't handle.
11486 (vect_analyze_data_refs): Do not give up on not analyzable
11487 DRs for BB vectorization. Remove code truncating the dataref
11488 vector.
11489
11490 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11491
11492 PR target/85832
11493 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11494 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11495 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11496
11497 2018-05-25 Richard Biener <rguenther@suse.de>
11498
11499 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11500 function, combining stmt data ref gathering and fatal analysis
11501 parts.
11502 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11503 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11504 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11505 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11506 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11507
11508 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11509
11510 PR tree-optimization/85720
11511 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11512 SCC if all partitions are builtins.
11513 (version_loop_by_alias_check): New parameter. Generate cancelable
11514 runtime alias check if all partitions are builtins.
11515 (distribute_loop): Update call to above function.
11516
11517 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11518
11519 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11520 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11521 (parm_default_def_partition_arg): Ditto.
11522 (set_parm_default_def_partition): Ditto.
11523 (get_parm_default_def_partitions): Ditto and make it static.
11524 (get_undefined_value_partitions): Ditto and make it static.
11525 (remove_ssa_form): Refactor call to init_var_map here.
11526 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11527 computation for loop region.
11528 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11529 (register_default_def): Delete.
11530 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11531 (parm_default_def_partition_arg): Ditto.
11532 (set_parm_default_def_partition): Ditto.
11533 (get_parm_default_def_partitions): Ditto and make it static.
11534 (get_undefined_value_partitions): Ditto and make it static.
11535 (coalesce_with_default, coalesce_with_default): Update comment.
11536 (create_coalesce_list_for_region): New func factored out from
11537 create_outofssa_var_map.
11538 (populate_coalesce_list_for_outofssa): New func factored out from
11539 create_outofssa_var_map and coalesce_ssa_name.
11540 (create_outofssa_var_map): Delete.
11541 (coalesce_ssa_name): Refactor to support live range computation.
11542 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11543 (get_parm_default_def_partitions): Delete.
11544 (get_undefined_value_partitions): Ditto.
11545 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11546 computation for loop region.
11547 (new_tree_live_info, loe_visit_block): Ditto.
11548 (live_worklist, set_var_live_on_entry): Ditto.
11549 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11550 * tree-ssa-live.h (struct _var_map): New fields.
11551 (init_var_map): Change decl.
11552 (region_contains_p): New.
11553
11554 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11555
11556 * tree-ssa-live.h (live_merge_and_clear): Delete.
11557
11558 2018-05-25 Richard Biener <rguenther@suse.de>
11559
11560 PR c++/85912
11561 * tree-dump.c (dequeue_and_dump): Remove access to removed
11562 operand 2 of a SWITCH_EXPR.
11563
11564 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11565
11566 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11567 multiplication and division.
11568 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11569 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11570 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11571 (cond_udiv_optab, cond_umod_optab): New optabs.
11572 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11573 (IFN_COND_RDIV): New internal functions.
11574 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11575 TRUNC_MOD_EXPR and RDIV_EXPR.
11576 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11577 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11578 New unspecs.
11579 (SVE_INT_BINARY): Include mult.
11580 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11581 (optab, sve_int_op): Handle mult.
11582 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11583 UNSPEC_COND_DIV.
11584 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11585 for SVE_INT_BINARY_SD.
11586
11587 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11588
11589 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11590 (optab, sve_int_op): Handle div and udiv.
11591 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11592 for SVE_INT_BINARY_SD.
11593 (*<optab><mode>3): New insn for the same.
11594
11595 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11596
11597 * tree-vect-patterns.c: Include predict.h.
11598 (vect_recog_divmod_pattern): Restrict check for division support
11599 to when optimizing for size.
11600
11601 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11602
11603 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11604 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11605 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11606 (gimple_match_op::set_op): Likewise.
11607 (gimple_resimplify4): Declare.
11608 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11609 (expr::gen_transform): Likewise.
11610 (decision_tree::gen): Generate a simplification routine for 4 operands.
11611 * gimple-match-head.c (gimple_simplify): Add an overload for
11612 4 operands. In the top-level function, handle up to 4 call
11613 arguments and call gimple_resimplify4.
11614 (gimple_resimplify4): New function.
11615 (build_call_internal): Pass a fourth operand.
11616 (maybe_push_to_seq): Likewise.
11617 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11618 Fold VEC_COND_EXPRs of an operation and a default value into
11619 an IFN_COND_* function if possible.
11620 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11621 New unspecs.
11622 (SVE_COND_FP_BINARY): Include them.
11623 (optab, sve_fp_op): Handle them.
11624 (SVE_INT_BINARY_REV): New code iterator.
11625 (SVE_COND_FP_BINARY_REV): New int iterator.
11626 (commutative): New int attribute.
11627 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11628 Declare.
11629 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11630 function.
11631 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11632 (*cond_<optab><mode>): New patterns for reversed operands.
11633
11634 2018-05-25 Richard Biener <rguenther@suse.de>
11635
11636 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11637 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11638 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11639 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11640 * tree-vect-data-refs.c (everywhere): Adjust users.
11641 * tree-vect-loop.c (everywhere): Likewise.
11642 * tree-vect-slp.c (everywhere): Likewise.
11643 * tree-vect-stmts.c (everywhere): Likewise.
11644 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11645
11646 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11647
11648 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11649 Rename to...
11650 (gcc_cv_as_section_exclude): ... this.
11651 Try Solaris as #exclude syntax.
11652 * configure: Regenerate.
11653 * config.in: Regenerate.
11654 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11655 SECTION_EXCLUDE.
11656 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11657 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11658
11659 * varasm.c (default_elf_asm_named_section): Don't check if
11660 HAVE_GAS_SECTION_EXCLUDE is defined.
11661
11662 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11663
11664 * doc/md.texi: Update the documentation of the cond_* optabs
11665 to mention the new final operand. Fix GET_MODE_NUNITS call.
11666 Describe the scalar case too.
11667 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11668 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11669 instead of 2.
11670 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11671 (get_conditional_internal_fn): Update comment.
11672 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11673 accumulator value as a final argument to conditional functions.
11674 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11675 a define_expand and add an "else" operand. Assert for now that
11676 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11677 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11678 (*cond_<optab><mode>): New patterns.
11679 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11680 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11681 (UNSPEC_COND_EOR): Delete.
11682 (optab): Remove associated mappings.
11683 (SVE_INT_BINARY): New code iterator.
11684 (sve_int_op): Remove int attribute and add "minus" to the code
11685 attribute.
11686 (SVE_COND_INT_OP): Delete.
11687 (SVE_COND_FP_OP): Rename to...
11688 (SVE_COND_FP_BINARY): ...this.
11689
11690 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11691
11692 * optabs.c (can_reuse_operands_p): New function.
11693 (maybe_legitimize_operands): Try to reuse the results for
11694 earlier operands.
11695
11696 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11697
11698 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11699 Add {q} suffix to insn mnemonic.
11700
11701 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11702
11703 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11704 (msp430_warn_func_return): New.
11705
11706 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11707
11708 * fold-const.c (tree_nonzero_bits): New function.
11709 * fold-const.h (tree_nonzero_bits): Likewise.
11710 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11711 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11712
11713 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11714
11715 PR target/85900
11716 PR target/85345
11717 * varasm.c (assemble_alias): Check ifunc_resolver only on
11718 FUNCTION_DECL.
11719
11720 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11721
11722 PR target/85903
11723 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11724 when memory input operand is handled.
11725
11726 2018-05-24 Luis Machado <luis.machado@linaro.org>
11727
11728 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11729 global.
11730 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11731
11732 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11733
11734 * match.pd: Delay FMA folds until after vectorization.
11735
11736 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11737
11738 PR target/83009
11739 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11740 address check not strict.
11741
11742 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11743
11744 * gimple-match.h (gimple_match_op): New class.
11745 (mprts_hook): Replace parameters with a gimple_match_op *.
11746 (maybe_build_generic_op): Likewise.
11747 (gimple_simplified_result_is_gimple_val): Replace parameters with
11748 a const gimple_match_op *.
11749 (gimple_simplify): Replace code_helper * and tree * parameters with
11750 a gimple_match_op * parameter.
11751 (gimple_resimplify1): Replace code_helper *, tree and tree *
11752 parameters with a gimple_match_op * parameter.
11753 (gimple_resimplify2): Likewise.
11754 (gimple_resimplify3): Likewise.
11755 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11756 parameters with a gimple_match_op * parameter.
11757 * gimple-match-head.c (gimple_simplify): Change prototypes of
11758 auto-generated functions to take a gimple_match_op * instead of
11759 separate code_helper * and tree * parameters. Make the same
11760 change in the top-level overload and update calls to the
11761 gimple_resimplify routines. Update calls to the auto-generated
11762 functions and to maybe_push_res_to_seq in the publicly-facing
11763 operation-specific gimple_simplify overloads.
11764 (gimple_match_op::MAX_NUM_OPS): Define.
11765 (gimple_resimplify1): Replace rcode and ops with a single res_op
11766 parameter. Update call to gimple_simplify.
11767 (gimple_resimplify2): Likewise.
11768 (gimple_resimplify3): Likewise.
11769 (mprts_hook): Replace parameters with a gimple_match_op *.
11770 (maybe_build_generic_op): Likewise.
11771 (build_call_internal): Replace type, nargs and ops with
11772 a gimple_match_op *.
11773 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11774 with a single gimple_match_op *. Update calls to mprts_hook,
11775 build_call_internal and gimple_simplified_result_is_gimple_val.
11776 Factor out code that is common to the tree_code and combined_fn cases.
11777 * genmatch.c (expr::gen_transform): Replace tem_code and
11778 tem_ops with a gimple_match_op called tem_op. Update calls
11779 to the gimple_resimplify functions and maybe_push_res_to_seq.
11780 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11781 res_ops. Update call to the gimple_resimplify functions.
11782 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11783 (decision_tree::gen): Make the functions take a gimple_match_op *
11784 called res_op instead of separate res_code and res_ops parameters.
11785 Update call accordingly.
11786 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11787 and ops with a single res_op parameter. Update calls to
11788 maybe_build_generic_op and maybe_push_res_to_seq.
11789 (fold_stmt_1): Update calls to gimple_simplify and
11790 replace_stmt_with_simplification.
11791 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11792 and gimple_simplified_result_is_gimple_val.
11793 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11794 gimple_simplify.
11795 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11796 with a gimple_match_op *.
11797 (vn_nary_build_or_lookup): Likewise. Update call to
11798 vn_nary_build_or_lookup_1.
11799 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11800 gimple_match_op *. Update calls to the gimple_resimplify routines
11801 and to gimple_simplified_result_is_gimple_val.
11802 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11803 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11804 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11805 (visit_nary_op): Likewise.
11806 (visit_reference_op_load): Likewise.
11807
11808 2018-05-23 Luis Machado <luis.machado@linaro.org>
11809
11810 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11811 modifier for printing the step amount.
11812
11813 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11814
11815 PR target/78849
11816 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11817 types.
11818
11819 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11820
11821 * doc/sourcebuild.texi (Endianness): New subsubsection.
11822
11823 2018-05-23 Luis Machado <luis.machado@linaro.org>
11824
11825 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11826 <prefetch_dynamic_strides>: New const bool field.
11827 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11828 prefetch_dynamic_strides.
11829 (exynosm1_prefetch_tune): Likewise.
11830 (thunderxt88_prefetch_tune): Likewise.
11831 (thunderx_prefetch_tune): Likewise.
11832 (thunderx2t99_prefetch_tune): Likewise.
11833 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11834 false.
11835 (aarch64_override_options_internal): Update to set
11836 PARAM_PREFETCH_DYNAMIC_STRIDES.
11837 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11838 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11839 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11840 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11841 prefetch-dynamic-strides setting.
11842
11843 2018-05-23 Luis Machado <luis.machado@linaro.org>
11844
11845 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11846 <minimum_stride>: New const int field.
11847 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11848 minimum_stride field defaulting to -1.
11849 (exynosm1_prefetch_tune): Likewise.
11850 (thunderxt88_prefetch_tune): Likewise.
11851 (thunderx_prefetch_tune): Likewise.
11852 (thunderx2t99_prefetch_tune): Likewise.
11853 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11854 <default_opt_level>: Set to 3.
11855 (aarch64_override_options_internal): Update to set
11856 PARAM_PREFETCH_MINIMUM_STRIDE.
11857 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11858 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11859 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11860 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11861 stride is constant and is below the minimum stride threshold.
11862
11863 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11864
11865 * config/arm/arm-cpus.in (mode26): Delete.
11866 (armv4): Delete mode26 reference.
11867 * config/arm/arm.c (arm_configure_build_target): Delete use of
11868 isa_bit_mode26.
11869
11870 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11871
11872 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11873 New insn pattern.
11874 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11875 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11876 for non-SSE modes.
11877 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11878 (floatunsdidf2): Ditto.
11879
11880 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11881
11882 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11883 (fixuns_trunc<mode>si2_avx512f): Ditto.
11884 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11885 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11886 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11887
11888 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11889
11890 PR rtl-optimization/79985
11891 * df-scan.c (df_insn_refs_collect): Remove special case for
11892 global registers and asm statements.
11893
11894 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11895
11896 * extend.texi (Global Register Variables): Rewrite the bullet list.
11897 Note that the register is available for allocation. Note that access
11898 via inline asm must use constraints. Add note about async-signal
11899 handlers. Remove paragraph about automagic register selection.
11900
11901 2018-05-23 Richard Biener <rguenther@suse.de>
11902
11903 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11904 of fixed offset from memset VN.
11905
11906 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11907
11908 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11909 first_interp field.
11910 (alloc_cand_and_find_basis): Initialize first_interp field.
11911 (slsr_process_mul): Modify first_interp field.
11912 (slsr_process_add): Likewise.
11913 (slsr_process_cast): Modify first_interp field for each new
11914 interpretation.
11915 (slsr_process_copy): Likewise.
11916 (dump_candidate): Dump first_interp field.
11917 (replace_mult_candidate): Process all interpretations, not just
11918 subsequent ones.
11919 (replace_rhs_if_not_dup): Likewise.
11920 (replace_one_candidate): Likewise.
11921
11922 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11923
11924 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11925 Add new boolean.
11926 (aarch64_needs_frame_chain): New function.
11927 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11928
11929 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11930
11931 PR target/84882
11932 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11933 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11934 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11935 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11936 as true for strict-align.
11937 (aarch64_can_inline_p): Perform checks even when callee has no
11938 attributes to check for strict alignment.
11939 * doc/extend.texi (AArch64 Function Attributes): Document
11940 no-strict-align.
11941 * doc/invoke.texi: (AArch64 Options): Likewise.
11942
11943 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11944
11945 PR tree-optimization/85853
11946 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11947 the handling of the root of the node to...
11948 (vect_slp_analyze_node_operations_1): ...this new function,
11949 and run the whole thing with the child nodes' def types
11950 set according to their SLP node's def type.
11951
11952 2018-05-23 Richard Biener <rguenther@suse.de>
11953
11954 PR middle-end/85874
11955 * tree-data-ref.c (create_runtime_alias_checks): Defer
11956 and ignore overflow warnings.
11957
11958 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11959
11960 PR tree-optimization/85822
11961 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11962 constants.
11963
11964 2018-05-23 Richard Biener <rguenther@suse.de>
11965
11966 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11967 memset constants via native_interpret_expr.
11968
11969 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11970
11971 PR target/85345
11972 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11973 attribute.
11974 (cgraph_node::create_alias): Likewise.
11975 (cgraph_node::get_availability): Check ifunc_resolver instead
11976 of looking up ifunc attribute.
11977 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11978 * varasm.c (do_assemble_alias): Likewise.
11979 (assemble_alias): Likewise.
11980 (default_binds_local_p_3): Likewise.
11981 * cgraph.h (cgraph_node): Add ifunc_resolver.
11982 (cgraph_node::only_called_directly_or_aliased_p): Return false
11983 for IFUNC resolver.
11984 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11985 attribute.
11986 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11987 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11988 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11989 instead of looking up ifunc attribute.
11990
11991 2018-05-22 Luis Machado <luis.machado@linaro.org>
11992
11993 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11994
11995 2018-05-22 Martin Sebor <msebor@redhat.com>
11996
11997 PR middle-end/85359
11998 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11999 only when expasion succeeds.
12000 (expand_builtin_strcmp): Same.
12001 (expand_builtin_strncmp): Same.
12002
12003 2018-05-22 Martin Sebor <msebor@redhat.com>
12004
12005 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
12006
12007 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12008 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12009
12010 * config/aarch64/aarch64-ldpstp.md: Replace uses of
12011 aarch64_mem_pair_operand with memory_operand and delete operand swapping
12012 code.
12013 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12014 Add check for legitimate_address.
12015 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
12016 (aarch64_swap_ldrstr_operands): New.
12017 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
12018 Define prototype.
12019
12020 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
12021 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12022
12023 * config/aarch64/aarch64.md: New patterns to generate stp
12024 and ldp.
12025 (store_pair_sw, store_pair_dw): New patterns to generate stp for
12026 single words and double words.
12027 (load_pair_sw, load_pair_dw): Likewise.
12028 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
12029 Delete.
12030 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
12031 Delete.
12032 * config/aarch64/aarch64-ldpstp.md: Modify peephole
12033 for different mode ldpstp and add peephole for merged zero stores.
12034 Likewise for loads.
12035 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
12036 Add size check.
12037 (aarch64_gen_store_pair): Rename calls to match new patterns.
12038 (aarch64_gen_load_pair): Rename calls to match new patterns.
12039 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
12040 (load_pair<DREG:mode><DREG2:mode>): ... This.
12041 (store_pair<mode>): Rename to...
12042 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
12043 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
12044 New mode iterators.
12045 (V_INT_EQUIV): Handle SImode.
12046 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
12047 New predicate.
12048
12049 2018-05-22 Martin Sebor <msebor@redhat.com>
12050
12051 PR c/85623
12052 * calls.c (maybe_warn_nonstring_arg): Use string length to set
12053 or ajust the presumed bound on an operation to avoid unnecessary
12054 warnings.
12055
12056 2018-05-22 Martin Sebor <msebor@redhat.com>
12057
12058 PR tree-optimization/85826
12059 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
12060 assuming that a DECL necesarily has a constant size.
12061
12062 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
12063
12064 PR middle-end/85862
12065 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
12066
12067 2018-05-22 Richard Biener <rguenther@suse.de>
12068
12069 PR tree-optimization/85834
12070 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
12071 non-constant and non-zero memset arguments.
12072
12073 2018-05-22 Martin Liska <mliska@suse.cz>
12074
12075 PR ipa/85607
12076 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
12077
12078 2018-05-22 Richard Biener <rguenther@suse.de>
12079
12080 PR tree-optimization/85863
12081 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
12082 comparisons when vectype is specified.
12083 (vectorizable_condition): Do not specify vectype for
12084 vect_is_simple_cond when SLP vectorizing.
12085
12086 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
12087
12088 PR target/85657
12089 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
12090 define __ibm128 as long double.
12091 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
12092 as a distinct type when IEEE 128-bit support is enabled.
12093 (init_float128_ieee): Fix up conversions between IFmode and IEEE
12094 128-bit types to use the correct functions.
12095 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
12096 convert between 128-bit floating point types that have different
12097 modes but the same representation, instead of using gen_lowpart to
12098 makean alias.
12099 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
12100 KFmode.
12101 (IFKF_reg): New attributes to give the register constraints for
12102 IFmode and KFmode.
12103 (extend<mode>tf2_internal): New insns to mark an explicit
12104 conversion between 128-bit floating point types that have a
12105 different mode but share the same representation.
12106
12107 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
12108
12109 PR tree-optimization/85814
12110 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
12111 a null return from get_strinfo when unsharing the next
12112 strinfo in the chain.
12113
12114 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12115
12116 PR gcc/84923
12117 * varasm.c (weak_finish): Clean up weak_decls.
12118
12119 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12120
12121 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
12122 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
12123 UNSPEC_UADALP values.
12124 * config/aarch64/iterators.md (ABAL): New int iterator.
12125 (ABDL2): Likewise.
12126 (ADALP): Likewise.
12127 (sur): Add mappings for the above.
12128 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
12129 New define_insn.
12130 (aarch64_<sur>abal<mode>_4): Likewise.
12131 (aarch64_<sur>adalp<mode>_3): Likewise.
12132 (<sur>sadv16qi): New define_expand.
12133
12134 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
12135
12136 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
12137 (*movdf_internal): Ditto.
12138 (*rcpsf2_sse): Ditto.
12139 (*rsqrtsf2_sse): Ditto.
12140 (*sqrt<mode>2_sse): Ditto.
12141
12142 2018-05-21 Tamar Christina <tamar.christina@arm.com>
12143
12144 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
12145 eor3q<mode>4.
12146 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
12147 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
12148 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
12149 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
12150 vbcaxq_s64): New.
12151 * config/aarch64/arm_neon.h: Likewise.
12152 * config/aarch64/iterators.md (VQ_I): New.
12153
12154 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
12155
12156 * config.gcc: Add arc/t-multilib-linux to tmake_file for
12157 arc*-*-linux*.
12158 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
12159 MULTILIB_DIRNAMES
12160
12161 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12162
12163 * config/nds32/constraints.md (S): New constraint.
12164 * config/nds32/nds32.md (call_internal): Use constraint S.
12165 (call_value_internal): Likewise.
12166 (sibcall_internal): Likewise.
12167 (sibcall_value_internal): Likewise.
12168
12169 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12170 Chung-Ju Wu <jasonwucj@gmail.com>
12171
12172 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
12173 into consideration.
12174
12175 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
12176 Chung-Ju Wu <jasonwucj@gmail.com>
12177
12178 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
12179 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
12180 (nds32_rtx_costs_impl): Simplify.
12181 (nds32_address_cost_impl): Simplify.
12182 (nds32_init_rtx_costs): New function.
12183 (nds32_rtx_costs_speed_prefer): Likewise.
12184 (nds32_rtx_costs_size_prefer): Likewise.
12185 (nds32_address_cost_speed_prefer): Likewise.
12186 (nds32_address_cost_speed_fwprop): Likewise.
12187 (nds32_address_cost_size_prefer): Likewise.
12188 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
12189 * config/nds32/nds32.c (nds32_option_override): Use
12190 nds32_init_rtx_costs function.
12191
12192 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
12193
12194 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
12195 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
12196 (TARGET_PIPELINE_N8): Likewise.
12197 (TARGET_PIPELINE_N10): Likewise.
12198 (TARGET_PIPELINE_N13): Likewise.
12199 (TARGET_PIPELINE_GRAYWOLF): Likewise.
12200
12201 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
12202
12203 * config/nds32/nds32-fpu.md: Update copyright year.
12204
12205 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12206
12207 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12208
12209 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12210
12211 * config/nds32/nds32.c
12212 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12213 * config/nds32/nds32.opt (minline-asm-r15): New option.
12214
12215 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12216
12217 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12218 MASK_HW_ABS.
12219 * config/nds32/nds32.md (abssi2): New pattern.
12220
12221 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12222
12223 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12224 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12225 Merge insn pattern from sse_cvtsi2ss<round_name> and
12226 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12227 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12228 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12229 using SWI48 mode iterator.
12230 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12231 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12232 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12233 pattern from sse_cvttss2si<round_saeonly_name>
12234 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12235 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12236 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12237 using SWI48 mode iterator.
12238 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12239 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12240 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12241 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12242 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12243 using SWI48 mode iterator.
12244 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12245 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12246 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12247 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12248 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12249 SWI48 mode iterator.
12250 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12251 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12252 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12253 pattern from sse_cvttsd2si<round_saeonly_name>
12254 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12255
12256 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12257
12258 * config/nds32/nds32-md-auxiliary.c
12259 (nds32_valid_smw_lwm_base_p): Refine.
12260 (nds32_output_smw_single_word): Refine.
12261 (nds32_output_smw_double_word): New.
12262 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12263
12264 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12265
12266 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12267 (nds32_output_stack_pop): Refine.
12268 (nds32_expand_unaligned_load): Refine.
12269 (nds32_expand_unaligned_store): Refine.
12270
12271 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12272 Chung-Ju Wu <jasonwucj@gmail.com>
12273
12274 * config/nds32/constants.md: Add TP_REGNUM constant.
12275 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12276 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12277 UNSPEC_ADD32.
12278 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12279 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12280 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12281 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12282 and PIC code generation.
12283 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12284 code generation.
12285 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12286 optimization.
12287 * config/nds32/nds32.md: Support TLS and PIC.
12288 * config/nds32/nds32.c: Support TLS and PIC.
12289 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12290 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12291 predicate.
12292
12293 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12294
12295 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12296 mode with E_ prefix.
12297
12298 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12299 Chung-Ju Wu <jasonwucj@gmail.com>
12300
12301 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12302 * config/nds32/nds32-md-auxiliary.c
12303 (symbolic_reference_mentioned_p): New.
12304 (nds32_legitimize_ict_address): New.
12305 (nds32_expand_ict_move): New.
12306 (nds32_indirect_call_referenced_p): New.
12307 (nds32_symbol_binds_local_p): Delete.
12308 (nds32_long_call_p): Modify.
12309 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12310 * config/nds32/nds32-protos.h
12311 (symbolic_reference_mentioned_p): Declare.
12312 (nds32_legitimize_ict_address): Declare.
12313 (nds32_expand_ict_move): Declare.
12314 (nds32_indirect_call_referenced_p): Declare.
12315 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12316 (nds32_relax_group): Use nds32_ict_const_p as condition.
12317 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12318 (nds32_asm_file_start): Output ict_model directive in asm code.
12319 (nds32_legitimate_address_p): Consider indirect call.
12320 (nds32_print_operand): Consider indirect call.
12321 (nds32_print_operand_address): Consider indirect call.
12322 (nds32_insert_attributes): Handle "indirect_call" attribute.
12323 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12324 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12325 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12326 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12327 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12328 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12329 (TARGET_ICT_MODEL_SMALL): Define.
12330 (TARGET_ICT_MODEL_LARGE): Define.
12331 * config/nds32/nds32.md (movsi): Consider ict model.
12332 (call, call_value): Consider ict model.
12333 (sibcall, sibcall_value): Consider ict model.
12334 * config/nds32/nds32.opt (mict-model): New option.
12335 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12336 model.
12337
12338 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12339 Monk Chiang <sh.chiang04@gmail.com>
12340 Jim Wilson <jimw@sifive.com>
12341
12342 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12343 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12344 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12345 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12346 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12347 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12348 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12349 compute save_libcall_adjustment properly.
12350 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12351 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12352 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12353 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12354 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12355 (ABI_SPEC): Handle mabi=ilp32e.
12356 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12357 (RVE): Add RVE mask.
12358 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12359 <-march>: Add rv32e as an example.
12360
12361 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12362
12363 PR c++/82899
12364 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12365 (intra_create_variable_infos): Handle C++ constructors.
12366
12367 2018-05-18 Martin Liska <mliska@suse.cz>
12368
12369 * passes.def: Remove a redundant pass.
12370
12371 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12372
12373 PR bootstrap/85838
12374 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12375
12376 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12377
12378 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12379 (ARMv4): Update.
12380 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12381 (ARMv6m): Update.
12382 (armv2, armv2a, armv3, armv3m): Delete architectures.
12383 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12384 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12385 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12386 Delete cpus.
12387 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12388 (*mulsidi3adddi): Likewise.
12389 (mulsidi3): Likewise.
12390 (*mulsidi3_nov6): Likewise.
12391 (umulsidi3): Likewise.
12392 (umulsidi3_nov6): Likewise.
12393 (umaddsidi4): Likewise.
12394 (*umulsidi3adddi): Likewise.
12395 (smulsi3_highpart): Likewise.
12396 (*smulsi3_highpart_nov6): Likewise.
12397 (umulsi3_highpart): Likewise.
12398 (*umulsi3_highpart_nov6): Likewise.
12399 * config/arm/arm.h (arm_arch3m): Delete.
12400 * config/arm/arm.c (arm_arch3m): Delete.
12401 (arm_option_override_internal): Update armv3-related comment.
12402 (arm_configure_build_target): Delete use of isa_bit_mode32.
12403 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12404 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12405 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12406 (mulsa3): Likewise.
12407 (mulusa3): Likewise.
12408 * config/arm/arm-protos.h (arm_arch3m): Delete.
12409 * config/arm/arm-tables.opt: Regenerate.
12410 * config/arm/arm-tune.md: Likewise.
12411 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12412 deleted architectures.
12413
12414 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12415
12416 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12417 (armv5t, armv5te): New features.
12418 (ARMv5, ARMv5e): Delete fgroups.
12419 (ARMv5t, ARMv5te): Adjust for above changes.
12420 (ARMv6m): Likewise.
12421 (armv5, armv5e): Delete arches.
12422 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12423 arm_arch5.
12424 (*call_reg_arm): Likewise.
12425 (*call_value_reg_armv5): Likewise.
12426 (*call_value_reg_arm): Likewise.
12427 (*call_symbol): Likewise.
12428 (*call_value_symbol): Likewise.
12429 (*sibcall_insn): Likewise.
12430 (*sibcall_value_insn): Likewise.
12431 (clzsi2): Likewise.
12432 (prefetch): Likewise.
12433 (define_split and define_peephole2 dependent on arm_arch5):
12434 Likewise.
12435 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12436 arm_arch5e.
12437 (TARGET_ARM_QBIT): Likewise.
12438 (TARGET_DSP_MULTIPLY): Likewise.
12439 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12440 (arm_arch5, arm_arch5e): Delete.
12441 (arm_arch5t, arm_arch5te): Declare.
12442 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12443 (arm_arch5t): Declare.
12444 (arm_option_reconfigure_globals): Update for the above.
12445 (arm_options_perform_arch_sanity_checks): Update comment, replace
12446 use of arm_arch5 with arm_arch5t.
12447 (use_return_insn): Likewise.
12448 (arm_emit_call_insn): Likewise.
12449 (output_return_instruction): Likewise.
12450 (arm_final_prescan_insn): Likewise.
12451 (arm_coproc_builtin_available): Likewise.
12452 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12453 arm_arch5e with arm_arch5t and arm_arch5te.
12454 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12455 (arm_arch5t, arm_arch5te): Declare.
12456 * config/arm/arm-tables.opt: Regenerate.
12457 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12458 * config/arm/t-multilib: Likewise.
12459 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12460 instead of arm_arch5.
12461 (*call_reg_thumb1): Likewise.
12462 (*call_value_reg_thumb1_v5): Likewise.
12463 (*call_value_reg_thumb1): Likewise.
12464 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12465 unreachable path.
12466 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12467
12468 2018-05-18 Martin Liska <mliska@suse.cz>
12469
12470 PR gcov-profile/84846
12471 * doc/gcov.texi: Document -t option of gcov tool.
12472
12473 2018-05-18 Martin Liska <mliska@suse.cz>
12474
12475 PR gcov-profile/84846
12476 * gcov.c (print_usage): Add new -t option.
12477 (process_args): Handle the option.
12478 (generate_results): Use stdout as output when requested by
12479 the option.
12480
12481 2018-05-18 Martin Liska <mliska@suse.cz>
12482
12483 PR gcov-profile/84846
12484 * coverage.c (coverage_init): Write PWD to .gcno file.
12485 * doc/gcov.texi: Document how working directory is printed.
12486 * gcov-dump.c (dump_gcov_file): Print PWD.
12487 * gcov.c (output_intermediate_file): Likewise.
12488 (read_graph_file): Read PWD string.
12489 (output_lines): Print PWD.
12490
12491 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12492
12493 PR middle-end/85817
12494 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12495 for retval and return false if all args to phi are zero.
12496
12497 2018-05-18 Richard Biener <rguenther@suse.de>
12498
12499 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12500 method.
12501 (evrp_dom_walker::before_dom_children): Call it.
12502
12503 2018-05-18 Richard Biener <rguenther@suse.de>
12504
12505 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12506 results when processing array refs with variable index.
12507
12508 2018-05-18 Toon Moene <toon@moene.org>
12509
12510 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12511 directly after that of -floop-interchange. Indicate that both
12512 options are enabled by default when specifying -O3.
12513
12514 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12515
12516 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12517 iterator. Delete separate integer-mode vec_set<mode> expander.
12518 (aarch64_simd_vec_setv2di): Delete.
12519 (vec_setv2di): Delete.
12520 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12521 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12522 the "w, r" alternative.
12523
12524 2018-05-18 Martin Liska <mliska@suse.cz>
12525
12526 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12527 * tree-pass.h (make_pass_lower_switch_O0): New function.
12528 * tree-switch-conversion.c (node_has_low_bound): Remove.
12529 (node_has_high_bound): Likewise.
12530 (node_is_bounded): Likewise.
12531 (class pass_lower_switch): Make it a template type and create
12532 two instances.
12533 (pass_lower_switch::execute): Add template argument.
12534 (make_pass_lower_switch): New function.
12535 (make_pass_lower_switch_O0): New function.
12536 (do_jump_if_equal): Remove.
12537 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12538 all the hard work to tree optimization passes.
12539
12540 2018-05-18 Martin Liska <mliska@suse.cz>
12541
12542 * dbgcnt.c (limit_low): Renamed from limit.
12543 (limit_high): New variable.
12544 (dbg_cnt_is_enabled): Check for upper limit.
12545 (dbg_cnt): Adjust dumping.
12546 (dbg_cnt_set_limit_by_index): Add new argument for high
12547 value.
12548 (dbg_cnt_set_limit_by_name): Likewise.
12549 (dbg_cnt_process_single_pair): Parse new format.
12550 (dbg_cnt_process_opt): Use strtok.
12551 (dbg_cnt_list_all_counters): Remove 'value' and add
12552 'limit_high'.
12553 * doc/invoke.texi: Document changes.
12554
12555 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12556
12557 * doc/sourcebuild.texi (scalar_all_fma): Document.
12558 * tree.def (FMA_EXPR): Delete.
12559 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12560 * internal-fn.c (ternary_direct): New macro.
12561 (expand_ternary_optab_fn): Likewise.
12562 (direct_ternary_optab_supported_p): Likewise.
12563 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12564 * builtins.c (fold_builtin_fma): Delete.
12565 (fold_builtin_3): Don't call it.
12566 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12567 * expr.c (expand_expr_real_2): Likewise.
12568 * fold-const.c (operand_equal_p): Likewise.
12569 (fold_ternary_loc): Likewise.
12570 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12571 * gimple.c (DEFTREECODE): Likewise.
12572 * gimplify.c (gimplify_expr): Likewise.
12573 * optabs-tree.c (optab_for_tree_code): Likewise.
12574 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12575 * tree-eh.c (operation_could_trap_p): Likewise.
12576 (stmt_could_throw_1_p): Likewise.
12577 * tree-inline.c (estimate_operator_cost): Likewise.
12578 * tree-pretty-print.c (dump_generic_node): Likewise.
12579 (op_code_prio): Likewise.
12580 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12581 * tree-ssa-operands.c (get_expr_operands): Likewise.
12582 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12583 * fold-const-call.h (fold_fma): Delete.
12584 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12585 CFN_FNMA and CFN_FNMS.
12586 (fold_fma): Delete.
12587 * genmatch.c (combined_fn): New enum.
12588 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12589 (commutative_op): New function.
12590 (commutate): Use it. Handle more than 2 operands.
12591 (dt_operand::gen_gimple_expr): Use commutative_op.
12592 (parser::parse_expr): Allow :c to be used with non-binary
12593 operators if the commutative operand is known.
12594 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12595 CFN_FMS, CFN_FNMA and CFN_FNMS.
12596 (backprop::process_assign_use): Remove FMA_EXPR handling.
12597 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12598 (gen_hsa_fma): New function.
12599 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12600 IFN_FNMA and IFN_FNMS.
12601 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12602 * gimple-fold.h (follow_all_ssa_edges): Declare.
12603 * gimple-fold.c (follow_all_ssa_edges): New function.
12604 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12605 gimple_build interface and use follow_all_ssa_edges to fold the result.
12606 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12607 instead of checking for optabs directly.
12608 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12609 rather than FMA_EXPRs.
12610 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12611 call to IFN_FMA instead of an FMA_EXPR.
12612
12613 2018-05-17 Jim Wilson <jimw@sifive.com>
12614
12615 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12616 sign extended promoted subreg, and the range does not have the sign bit
12617 set, then do a sign extend.
12618
12619 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12620 test, check for sign extended subreg and/or constant operands, and
12621 do a sign extend in that case.
12622
12623 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12624
12625 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12626 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12627 Add untyped.
12628 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12629 Change logics_shift_reg to logics_shift_imm.
12630 (thunderx2t99_fp_loadpair_basic): Delete.
12631 (thunderx2t99_fp_storepair_basic): Delete.
12632 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12633 (thunderx2t99_asimd_polynomial): Delete.
12634 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12635 and neon_fp_mul_d_scalar_q.
12636 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12637 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12638 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12639 (thunderx2t99_asimd_lut): Add missing tbl types.
12640 (thunderx2t99_asimd_ext): Delete.
12641 (thunderx2t99_asimd_load1_1_mult): Delete.
12642 (thunderx2t99_asimd_load1_2_mult): Delete.
12643 (thunderx2t99_asimd_load1_ldp): New.
12644 (thunderx2t99_asimd_load1): New.
12645 (thunderx2t99_asimd_load2): Add missing *load2* types.
12646 (thunderx2t99_asimd_load3): New.
12647 (thunderx2t99_asimd_load4): New.
12648 (thunderx2t99_asimd_store1_1_mult): Delete.
12649 (thunderx2t99_asimd_store1_2_mult): Delete.
12650 (thunderx2t99_asimd_store2_mult): Delete.
12651 (thunderx2t99_asimd_store2_onelane): Delete.
12652 (thunderx2t99_asimd_store_stp): New.
12653 (thunderx2t99_asimd_store1): New.
12654 (thunderx2t99_asimd_store2): New.
12655 (thunderx2t99_asimd_store3): New.
12656 (thunderx2t99_asimd_store4): New.
12657
12658 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12659
12660 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12661 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12662
12663 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12664 Segher Boessenkool <segher@kernel.crashing.org>
12665
12666 PR target/85698
12667 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12668 operand.
12669
12670 2018-05-17 Richard Biener <rguenther@suse.de>
12671
12672 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12673 for pruning loop and prune defs feeding only already visited PHIs.
12674
12675 2018-05-17 Richard Biener <rguenther@suse.de>
12676
12677 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12678
12679 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12680 Richard Biener <rguenther@suse.de>
12681
12682 PR tree-optimization/85793
12683 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12684 for VMAT_ELEMENTWISE.
12685
12686 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12687
12688 * internal-fn.h (lookup_internal_fn): Declare
12689 * internal-fn.c (lookup_internal_fn): New function.
12690 * gimple.c (gimple_build_call_from_tree): Handle calls to
12691 internal functions.
12692 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12693 internal function names.
12694 * tree-pretty-print.c (dump_generic_node): Likewise.
12695 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12696
12697 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12698
12699 * gimple-fold.h (gimple_build): Make the function forms take
12700 combined_fn rather than built_in_function.
12701 (gimple_simplify): Likewise.
12702 * gimple-match-head.c (gimple_simplify): Likewise.
12703 * gimple-fold.c (gimple_build): Likewise.
12704 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12705 rather than gimple_build_call_internal.
12706 (get_initial_defs_for_reduction): Likewise.
12707 (vect_create_epilog_for_reduction): Likewise.
12708 (vectorizable_live_operation): Likewise.
12709
12710 2018-05-17 Martin Liska <mliska@suse.cz>
12711
12712 * gimple-ssa-sprintf.c (format_directive): Do not use
12713 space in between 'G_' and '('.
12714
12715 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12716
12717 PR target/85323
12718 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12719 even if the mask is not all ones.
12720
12721 PR target/85323
12722 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12723 vector.
12724 (ix86_gimple_fold_builtin): Likewise.
12725
12726 PR target/85323
12727 * config/i386/i386.c: Include tree-vector-builder.h.
12728 (ix86_vector_shift_count): New function.
12729 (ix86_fold_builtin): Fold shift builtins by scalar count.
12730 (ix86_gimple_fold_builtin): Likewise.
12731
12732 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12733 _mm512_setzero): New intrinsics.
12734
12735 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12736 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12737
12738 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12739 code generation for cases where splatting a value is not useful.
12740 * simplify-rtx.c (simplify_ternary_operation): Simplify
12741 vec_merge across a vec_duplicate and a paradoxical subreg forming
12742 a vector mode to a vec_concat.
12743
12744 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12745
12746 * config.gcc: Support "goldmont-plus".
12747 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12748 "goldmont-plus".
12749 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12750 PROCESSOR_GOLDMONT_PLUS.
12751 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12752 (processor_target_table): Add "goldmont-plus".
12753 (PTA_GOLDMONT_PLUS): Define.
12754 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12755 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12756 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12757 (fold_builtin_cpu): Add "goldmont-plus".
12758 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12759 (ix86_option_override_internal): Add "goldmont-plus".
12760 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12761 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12762 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12763 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12764
12765 2018-05-17 Richard Biener <rguenther@suse.de>
12766
12767 PR tree-optimization/85757
12768 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12769 remove defs that only feed that PHI from further processing.
12770
12771 2018-05-16 Jim Wilson <jimw@sifive.com>
12772
12773 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12774 asterisk to name.
12775 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12776
12777 2018-05-16 Mark Wielaard <mark@klomp.org>
12778
12779 * dwarf2out.c (count_index_strings): New function.
12780 (output_indirect_strings): Call count_index_strings and generate
12781 header for dwarf_version >= 5.
12782
12783 2018-05-16 Mark Wielaard <mark@klomp.org>
12784
12785 * dwarf2out.c (dwarf_FORM): New function.
12786 (set_indirect_string): Use dwarf_FORM.
12787 (reset_indirect_string): Likewise.
12788 (size_of_die): Likewise.
12789 (value_format): Likewise.
12790 (output_die): Likewise.
12791 (add_skeleton_AT_string): Likewise.
12792 (output_macinfo_op): Likewise.
12793 (index_string): Likewise.
12794 (output_index_string_offset): Likewise.
12795 (output_index_string): Likewise.
12796 (count_index_strings): Likewise.
12797
12798 2018-05-16 Carl Love <cel@us.ibm.com>
12799
12800 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12801 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12802
12803 2018-05-16 Martin Jambor <mjambor@suse.cz>
12804
12805 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12806 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12807
12808 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12809
12810 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12811 (fnma<mode>4): Likewise.
12812 (fms<mode>4): Likewise.
12813 (fnms<mode>4): Likewise.
12814 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12815 (aarch64_fnma<mode>4): Likewise.
12816 (aarch64_fms<mode>4): Likewise.
12817 (aarch64_fnms<mode>4): Likewise.
12818 (aarch64_fnmadd<mode>4): Likewise.
12819
12820 2018-05-16 Jason Merrill <jason@redhat.com>
12821
12822 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12823
12824 2018-05-16 Richard Biener <rguenther@suse.de>
12825
12826 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12827 (dump_stmt_cost): Declare.
12828 (add_stmt_cost): Dump cost we add.
12829 (add_stmt_costs): New function.
12830 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12831 No longer exported.
12832 (vect_analyze_stmt): Adjust prototype.
12833 (vectorizable_condition): Likewise.
12834 (vectorizable_live_operation): Likewise.
12835 (vectorizable_reduction): Likewise.
12836 (vectorizable_induction): Likewise.
12837 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12838 cost vector to pass to vectorizable_ and record afterwards.
12839 (vect_model_reduction_cost): Take cost vector argument and adjust.
12840 (vect_model_induction_cost): Likewise.
12841 (vectorizable_reduction): Likewise.
12842 (vectorizable_induction): Likewise.
12843 (vectorizable_live_operation): Likewise.
12844 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12845 SLP_TREE_NUMBER_OF_VEC_STMTS.
12846 (vect_analyze_slp_cost_1): Remove.
12847 (vect_analyze_slp_cost): Likewise.
12848 (vect_slp_analyze_node_operations): Take visited args and
12849 a target cost vector. Avoid processing already visited stmt sets.
12850 (vect_slp_analyze_operations): Use a local cost vector to gather
12851 costs and register those of non-discarded instances.
12852 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12853 (vect_schedule_slp_instance): Remove copying of
12854 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12855 zero.
12856 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12857 adding cost. Record cost entry location.
12858 (vect_prologue_cost_for_slp_op): Function to compute cost of
12859 a constant or invariant generated for SLP vect in the prologue,
12860 split out from vect_analyze_slp_cost_1.
12861 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12862 (vect_model_promotion_demotion_cost): Likewise.
12863 (vect_model_store_cost): Likewise, make static.
12864 (vect_model_load_cost): Likewise.
12865 (vectorizable_bswap): Add cost vector arg and adjust.
12866 (vectorizable_call): Likewise.
12867 (vectorizable_simd_clone_call): Likewise.
12868 (vectorizable_conversion): Likewise.
12869 (vectorizable_assignment): Likewise.
12870 (vectorizable_shift): Likewise.
12871 (vectorizable_operation): Likewise.
12872 (vectorizable_store): Likewise.
12873 (vectorizable_load): Likewise.
12874 (vectorizable_condition): Likewise.
12875 (vectorizable_comparison): Likewise.
12876 (can_vectorize_live_stmts): Likewise.
12877 (vect_analyze_stmt): Likewise.
12878 (vect_transform_stmt): Adjust calls to vectorizable_*.
12879 * tree-vectorizer.c: Include gimple-pretty-print.h.
12880 (dump_stmt_cost): New function.
12881
12882 2018-05-16 Richard Biener <rguenther@suse.de>
12883
12884 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12885 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12886 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12887 (check_name): New callback.
12888 (dse_classify_store): Track cycles via a visited bitmap of PHI
12889 defs and simplify handling of in-loop and across loop dead stores
12890 and properly fail for loop-variant refs. Handle byte-tracking with
12891 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12892 limiting the walk.
12893
12894 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12895
12896 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12897 (vect_get_mask_type_for_stmt): Likewise.
12898 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12899 split out from...
12900 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12901 to determine the statement's vector type and the vector type that
12902 should be used for calculating nunits. Deal with cases in which
12903 the type has to be deferred.
12904 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12905 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12906 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12907 (vect_determine_vf_for_stmt): New functions, split out from...
12908 (vect_determine_vectorization_factor): ...here.
12909 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12910 (vect_get_mask_type_for_stmt): New functions, split out from
12911 vect_determine_vectorization_factor.
12912
12913 2018-05-16 Richard Biener <rguenther@suse.de>
12914
12915 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12916 verify the [VEC_]COND_EXPR embedded comparison.
12917
12918 2018-05-15 Martin Sebor <msebor@redhat.com>
12919
12920 PR tree-optimization/85753
12921 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12922 RECORD_TYPE in addition to ARRAY_TYPE.
12923
12924 2018-05-15 Martin Sebor <msebor@redhat.com>
12925
12926 PR middle-end/85643
12927 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12928
12929 2018-05-15 Richard Biener <rguenther@suse.de>
12930
12931 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12932 add by_clobber_p one. Change algorithm to collect all defs
12933 representing uses we need to walk and try reducing them to
12934 a single one before failing.
12935 (dse_dom_walker::dse_optimize_stmt): Adjust.
12936
12937 2018-05-13 Mark Wielaard <mark@klomp.org>
12938
12939 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12940 (size_of_loc_descr): Likewise.
12941 (output_loc_operands): Likewise.
12942 (output_loc_operands_raw): Likewise.
12943 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12944 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12945 (hash_loc_operands): Likewise.
12946 (compare_loc_operands): Likewise.
12947
12948 2018-05-14 Mark Wielaard <mark@klomp.org>
12949
12950 * dwarf2out.c (count_index_addrs): New function.
12951 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12952
12953 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12954
12955 PR tree-optimization/83648
12956 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12957 return value as malloc candidate.
12958
12959 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12960
12961 PR ipa/85734
12962 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12963 param as true in call to suggest_attribute.
12964
12965 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12966
12967 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12968 -mreadonly-in-sdata.
12969
12970 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12971
12972 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12973 New pattern.
12974 (aarch64_crypto_aesd_fused): Likewise.
12975
12976 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12977
12978 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12979 (movsi_aarch64): Likewise.
12980 (load_pairsi): Likewise.
12981 (load_pairdi): Likewise.
12982 (store_pairsi): Likewise.
12983 (store_pairdi): Likewise.
12984 (load_pairsf): Likewise.
12985 (load_pairdf): Likewise.
12986 (store_pairsf): Likewise.
12987 (store_pairdf): Likewise.
12988 (zero_extend): Likewise.
12989 (trunc): Swap alternatives.
12990 (fcvt_target): Add '?' to prefer w over r.
12991
12992 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12993
12994 PR target/85756
12995 * config/i386/i386.md: Disallow non-commutative arithmetics in
12996 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12997 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12998 in the peephole2 before it.
12999
13000 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
13001
13002 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
13003 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
13004 (ix86_handle_option): Handle -mcldemote.
13005 * config.gcc: New header.
13006 * config/i386/cldemoteintrin.h: New file.
13007 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
13008 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
13009 -mcldemote.
13010 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13011 OPTION_MASK_ISA_CLDEMOTE.
13012 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
13013 (ix86_valid_target_attribute_inner_p): Ditto.
13014 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
13015 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
13016 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
13017 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
13018 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
13019 (cldemote): New.
13020 * config/i386/i386.opt: Add -mcldemote.
13021 * config/i386/x86intrin.h: New header.
13022 * doc/invoke.texi: Add -mcldemote.
13023
13024 2018-05-14 Richard Biener <rguenther@suse.de>
13025
13026 * doc/match-and-simplify.texi: Adjust :s documentation.
13027
13028 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
13029
13030 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
13031 intended memcpy size.
13032 (REORDER_45): Likewise.
13033
13034 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
13035
13036 * sort.cc: New file.
13037 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
13038 * vec.c (qsort_chk): Use gcc_qsort.
13039 * Makefile.in (OBJS-libcommon): Add sort.o.
13040 (build/sort.o): New target. Use it...
13041 (BUILD_RTL): ... here, and...
13042 (build/gencfn-macros): ... here, and...
13043 (build/genmatch): ... here.
13044
13045 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13046 Chung-Ju Wu <jasonwucj@gmail.com>
13047
13048 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
13049 * config/nds32/nds32-graywolf.md: New file.
13050 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
13051 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
13052 pipeline.
13053 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
13054 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
13055 * config/nds32/nds32.md (pipeline_model): Add graywolf.
13056 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
13057 * config/nds32/pipelines.md: Include n15 settings.
13058
13059 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13060 Chung-Ju Wu <jasonwucj@gmail.com>
13061
13062 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
13063 * config/nds32/nds32-n13.md: New file.
13064 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
13065 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
13066 pipeline.
13067 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
13068 * config/nds32/nds32.md (pipeline_model): Add n13.
13069 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
13070 * config/nds32/pipelines.md: Include n13 settings.
13071
13072 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
13073 Chung-Ju Wu <jasonwucj@gmail.com>
13074
13075 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
13076 * config/nds32/nds32-n10.md: New file.
13077 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
13078 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
13079 pipeline.
13080 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
13081 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
13082 * config/nds32/nds32.md (pipeline_model): Add n10.
13083 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
13084 * config/nds32/pipelines.md: Include n10 settings.
13085
13086 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
13087 Kito Cheng <kito.cheng@gmail.com>
13088 Chung-Ju Wu <jasonwucj@gmail.com>
13089
13090 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
13091 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13092 Add enum values for DSP extension instructions.
13093 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
13094 New constraints.
13095 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
13096 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
13097 New code iterators.
13098 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
13099 * config/nds32/nds32-dspext.md: New file for DSP implementation.
13100 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
13101 * config/nds32/nds32-intrinsic.md: Likewise.
13102 * config/nds32/nds32_intrinsic.h: Likewise.
13103 * config/nds32/nds32-md-auxiliary.c: Likewise.
13104 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
13105 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
13106 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
13107 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
13108 * config/nds32/nds32-protos.h: New declarations for DSP extension.
13109 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
13110 TYPE_DMAC in switch statement.
13111 * config/nds32/nds32.c: New checking and implementation for DSP
13112 extension instructions.
13113 * config/nds32/nds32.h: Likewise.
13114 * config/nds32/nds32.md: Likewise.
13115 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
13116 * config/nds32/predicates.md: Implement new predicates for DSP
13117 extension.
13118
13119 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13120
13121 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
13122 Reformat alternatives and attributes so it is easier to identify
13123 which constraints/attributes go with which instruction.
13124 (mov<mode>_hardfloat32, FMOVE64): Likewise.
13125 (mov<mode>_softfloat32, FMOVE64): Likewise.
13126 (mov<mode>_hardfloat64, FMOVE64): Likewise.
13127 (mov<mode>_softfloat64, FMOVE64): Likewise.
13128
13129 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
13130
13131 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13132 subsection.
13133 (Basic PowerPC Built-in Functions): The new name of the
13134 subsection previously known as "PowerPC Built-in Functions".
13135 (Basic PowerPC Built-in Functions Available on all Configurations):
13136 New subsubsection.
13137 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
13138 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
13139 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
13140 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
13141
13142 2018-05-11 Martin Jambor <mjambor@suse.cz>
13143
13144 PR ipa/85655
13145 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
13146 single const.
13147
13148 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13149
13150 PR target/85733
13151 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
13152
13153 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
13154
13155 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
13156 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
13157 (ix86_handle_option): Handle -mwaitpkg.
13158 * config.gcc: New header.
13159 * config/i386/cpuid.h (bit_WAITPKG): New bit.
13160 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
13161 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
13162 function type.
13163 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13164 OPTION_MASK_ISA_WAITPKG.
13165 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
13166 (ix86_option_override_internal): Add PTA_WAITPKG.
13167 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
13168 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
13169 IX86_BUILTIN_TPAUSE.
13170 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
13171 __builtin_ia32_umwait and __builtin_ia32_tpause.
13172 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
13173 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
13174 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
13175 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
13176 UNSPECV_TPAUSE): New.
13177 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
13178 * config/i386/i386.opt: Add -mwaitpkg.
13179 * config/i386/waitpkgintrin.h: New file.
13180 * config/i386/x86intrin.h: New header.
13181 * doc/invoke.texi: Add -mwaitpkg.
13182
13183 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
13184
13185 PR target/85606
13186 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
13187 equivalent.
13188 (cortex-m0): Use armv6s-m isa.
13189 (cortex-m0plus): Likewise.
13190 (cortex-m1): Likewise.
13191 (cortex-m0.small-multiply): Likewise.
13192 (cortex-m0plus.small-multiply): Likewise.
13193 (cortex-m1.small-multiply): Likewise.
13194
13195 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
13196 Jakub Jelinek <jakub@redhat.com>
13197
13198 PR tree-optimization/85692
13199 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
13200 source permute as well.
13201
13202 2018-05-11 Martin Liska <mliska@suse.cz>
13203
13204 PR sanitizer/85556
13205 * doc/extend.texi: Document LLVM style format for no_sanitize
13206 attribute.
13207
13208 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13209
13210 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13211 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13212 (mode_supports_vsx_dform_quad): Likewise.
13213 (mode_supports_vmx_dform): Move these functions to be next to the
13214 other mode_supports functions.
13215 (mode_supports_dq_form): Likewise.
13216 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13217 mode_supports_dq_form.
13218 (reg_offset_addressing_ok_p): Likewise.
13219 (offsettable_ok_by_alignment): Likewise.
13220 (rs6000_legitimate_offset_address_p): Likewise.
13221 (legitimate_lo_sum_address_p): Likewise.
13222 (rs6000_legitimize_address): Likewise.
13223 (rs6000_legitimize_reload_address): Likewise.
13224 (rs6000_secondary_reload_inner): Likewise.
13225 (rs6000_preferred_reload_class): Likewise.
13226 (rs6000_output_move_128bit): Likewise.
13227
13228 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13229
13230 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13231 Generate SImode target register for null target.
13232 <case IX86_BUILTIN_XGETBV>: Ditto.
13233 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13234 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13235
13236 2018-05-10 Carl Love <cel@us.ibm.com>
13237
13238 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13239 dcbtt and dcbtstt if operands[2] is 0.
13240
13241 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13242
13243 PR target/85693
13244 * config/i386/sse.md (usadv64qi): New expander.
13245
13246 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13247
13248 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13249 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13250 -maltivec=be support.
13251 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13252 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13253 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13254 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13255 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13256 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13257 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13258 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13259 altivec_vsumsws): Adjust.
13260 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13261 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13262 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13263 support.
13264 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13265 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13266 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13267 (altivec_lve<VI_char>x): Delete expand.
13268 (*altivec_lve<VI_char>x_internal): Rename to...
13269 (altivec_lve<VI_char>x): ... this.
13270 (altivec_lvxl_<mode>): Delete expand.
13271 (*altivec_lvxl_<mode>_internal): Rename to ...
13272 (altivec_lvxl_<mode>): ... this.
13273 (altivec_stvxl_<mode>): Delete expand.
13274 (*altivec_stvxl_<mode>_internal): Rename to ...
13275 (altivec_stvxl_<mode>): ... this.
13276 (altivec_stve<VI_char>x): Delete expand.
13277 (*altivec_stve<VI_char>x_internal): Rename to ...
13278 (altivec_stve<VI_char>x): ... this.
13279 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13280 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13281 reduc_plus_scal_<mode>): Adjust.
13282 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13283 comment.
13284 (rs6000_cpu_cpp_builtins): Adjust.
13285 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13286 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13287 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13288 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13289 -maltivec=be support.
13290 (rs6000_split_vec_extract_var): Adjust.
13291 (rs6000_split_v4si_init): Adjust.
13292 (swap_selector_for_mode): Delete.
13293 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13294 altivec_expand_stvex_be): Delete.
13295 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13296 -maltivec=be support.
13297 (rs6000_gimple_fold_builtin): Ditto.
13298 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13299 Adjust.
13300 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13301 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13302 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13303 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13304 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13305 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13306 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13307 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13308 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13309 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13310 anonymous split): Adjust.
13311 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13312 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13313
13314 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13315
13316 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13317 when --with-gxx-include-dir is also specified.
13318 * configure: Regenerate.
13319
13320 2018-05-09 Jim Wilson <jimw@sifive.com>
13321
13322 PR target/84797
13323 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13324 * config/riscv/t-withmultilib: New.
13325 * config/riscv/withmultilib.h: New.
13326 * doc/install.texi: Document RISC-V --with-multilib-list support.
13327
13328 2018-05-09 Richard Biener <rguenther@suse.de>
13329
13330 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13331 vector.
13332 (vect_bb_vectorization_profitable_p): Adjust. Compute
13333 actual scalar cost using the cost vector and the add_stmt_cost
13334 machinery.
13335
13336 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13337
13338 PR rtl-optimization/85645
13339 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13340 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13341
13342 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13343
13344 PR rtl-optimization/85645
13345 * shrink-wrap.c (spread_components): Return a boolean saying if
13346 anything was changed.
13347 (try_shrink_wrapping_separate): Iterate spread_components until
13348 nothing changes anymore.
13349
13350 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13351
13352 PR rtl-optimization/85645
13353 * regrename.c (build_def_use): Also kill the chains that include the
13354 destination of a REG_CFA_REGISTER note.
13355
13356 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13357
13358 PR rtl-optimization/85645
13359 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13360 insn that has a REG_CFA_REGISTER note.
13361
13362 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13363
13364 * cfgexpand.c (expand_clobber): New function.
13365 (expand_gimple_stmt_1): Use it.
13366 * tree-vect-stmts.c (vect_clobber_variable): New function,
13367 split out from...
13368 (vectorizable_simd_clone_call): ...here.
13369 (vectorizable_store): Emit a clobber either side of an
13370 IFN_STORE_LANES sequence.
13371 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13372
13373 2018-05-09 Tom de Vries <tom@codesourcery.com>
13374
13375 PR target/85626
13376 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13377 (define_insn "trap_if_false"): Add exit after trap.
13378
13379 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13380
13381 PR rtl-optimization/85638
13382 * bb-reorder.c: Include common/common-target.h.
13383 (create_forwarder_block): New function extracted from...
13384 (fix_up_crossing_landing_pad): ...here. Rename into...
13385 (dw2_fix_up_crossing_landing_pad): ...this.
13386 (sjlj_fix_up_crossing_landing_pad): New function.
13387 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13388 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13389 from both partitions and exit the loop after one iteration.
13390
13391 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13392
13393 Revert:
13394 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13395 subsection.
13396 (Basic PowerPC Built-in Functions): The new name of the
13397 subsection previously known as "PowerPC Built-in Functions".
13398 (Basic PowerPC Built-in Functions Available on all Configurations):
13399 New subsubsection.
13400 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13401 subsubsection.
13402 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13403 subsubsection.
13404 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13405 subsubsection.
13406 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13407 subsubsection.
13408
13409 2018-05-08 Jim Wilson <jimw@sifive.com>
13410
13411 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13412 (LD_EMUL_SUFFIX): New.
13413 (LINK_SPEC): Use it.
13414
13415 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13416
13417 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13418 subsection.
13419 (Basic PowerPC Built-in Functions): The new name of the
13420 subsection previously known as "PowerPC Built-in Functions".
13421 (Basic PowerPC Built-in Functions Available on all Configurations):
13422 New subsubsection.
13423 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13424 subsubsection.
13425 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13426 subsubsection.
13427 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13428 subsubsection.
13429 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13430 subsubsection.
13431
13432 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13433
13434 PR target/85683
13435 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13436 after cmpelim optimization.
13437
13438 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13439
13440 * config.gcc: Support "goldmont".
13441 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13442 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13443 PROCESSOR_GOLDMONT.
13444 * config/i386/i386.c (m_GOLDMONT): Define.
13445 (processor_target_table): Add "goldmont".
13446 (PTA_GOLDMONT): Define.
13447 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13448 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13449 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13450 (fold_builtin_cpu): Add "goldmont".
13451 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13452 (ix86_option_override_internal): Add "goldmont".
13453 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13454 (processor_type): Add PROCESSOR_GOLDMONT.
13455 * config/i386/i386.md: Add CPU "glm".
13456 * config/i386/glm.md: New file.
13457 * config/i386/x86-tune.def: Add m_GOLDMONT.
13458 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13459
13460 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13461
13462 PR target/85572
13463 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13464 E_V4DImode.
13465 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13466 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13467 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13468
13469 PR target/85317
13470 * config/i386/i386.c (ix86_fold_builtin): Handle
13471 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13472
13473 PR target/85480
13474 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13475 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13476
13477 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13478
13479 PR target/85658
13480 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13481 (check_arch): Likewise.
13482 (check_fpu): Return the result rather than printing it.
13483 (end arch): Fix operator precedence.
13484 (end cpu): Likewise.
13485 (END): Print the result from check_fpu.
13486
13487 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13488 Alan Hayward <alan.hayward@arm.com>
13489 David Sherwood <david.sherwood@arm.com>
13490
13491 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13492 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13493 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13494 (*fcmuo<mode>_and): New patterns.
13495
13496 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13497
13498 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13499 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13500 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13501 (cmp_op, sve_imm_con): New code attributes.
13502 (SVE_COND_INT_CMP, imm_con): Delete.
13503 (cmp_op): Remove above unspecs from int attribute.
13504 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13505 to...
13506 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13507 comparison-specific unspecs.
13508 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13509 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13510 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13511 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13512 (*vec_fcm<cmp_op><mode>): Rename to...
13513 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13514 (*vec_fcmuo<mode>): Rename to...
13515 (*fcmuo<mode>): ...this and adjust likewise.
13516 (*pred_fcm<cmp_op><mode>): New pattern.
13517 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13518 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13519 functions.
13520 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13521 and UNORDERED.
13522 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13523 (aarch64_emit_sve_predicated_cond): New function.
13524 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13525 (aarch64_emit_unspec_cond_or): Replace with...
13526 (aarch64_emit_sve_or_conds): ...this new function. Use
13527 aarch64_emit_sve_ptrue_op for the individual comparisons and
13528 aarch64_emit_binop to OR them together.
13529 (aarch64_emit_inverted_unspec_cond): Replace with...
13530 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13531 aarch64_emit_sve_ptrue_op for the comparison and
13532 aarch64_emit_unop to invert the result.
13533 (aarch64_expand_sve_vec_cmp_float): Update after the above
13534 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13535
13536 2018-05-07 Nathan Sidwell <nathan@acm.org>
13537
13538 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13539 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13540 (Backwards Compatibility): Likewise.
13541
13542 2018-05-07 Luis Machado <luis.machado@linaro.org>
13543
13544 PR bootstrap/85681
13545 Revert:
13546 2018-05-07 Luis Machado <luis.machado@linaro.org>
13547
13548 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13549 <prefetch_dynamic_strides>: New const bool field.
13550 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13551 prefetch_dynamic_strides.
13552 (exynosm1_prefetch_tune): Likewise.
13553 (thunderxt88_prefetch_tune): Likewise.
13554 (thunderx_prefetch_tune): Likewise.
13555 (thunderx2t99_prefetch_tune): Likewise.
13556 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13557 to false.
13558 (aarch64_override_options_internal): Update to set
13559 PARAM_PREFETCH_DYNAMIC_STRIDES.
13560 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13561 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13562 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13563 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13564 prefetch-dynamic-strides setting.
13565
13566 2018-05-07 Luis Machado <luis.machado@linaro.org>
13567
13568 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13569 <minimum_stride>: New const int field.
13570 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13571 minimum_stride field.
13572 (exynosm1_prefetch_tune): Likewise.
13573 (thunderxt88_prefetch_tune): Likewise.
13574 (thunderx_prefetch_tune): Likewise.
13575 (thunderx2t99_prefetch_tune): Likewise.
13576 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13577 (aarch64_override_options_internal): Update to set
13578 PARAM_PREFETCH_MINIMUM_STRIDE.
13579 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13580 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13581 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13582 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13583 stride is constant and is below the minimum stride threshold.
13584
13585 2018-05-07 Luis Machado <luis.machado@linaro.org>
13586
13587 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13588 to 512.
13589
13590 2018-05-07 Luis Machado <luis.machado@linaro.org>
13591
13592 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13593 <prefetch_dynamic_strides>: New const bool field.
13594 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13595 prefetch_dynamic_strides.
13596 (exynosm1_prefetch_tune): Likewise.
13597 (thunderxt88_prefetch_tune): Likewise.
13598 (thunderx_prefetch_tune): Likewise.
13599 (thunderx2t99_prefetch_tune): Likewise.
13600 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13601 to false.
13602 (aarch64_override_options_internal): Update to set
13603 PARAM_PREFETCH_DYNAMIC_STRIDES.
13604 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13605 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13606 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13607 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13608 prefetch-dynamic-strides setting.
13609
13610 2018-05-07 Luis Machado <luis.machado@linaro.org>
13611
13612 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13613 <minimum_stride>: New const int field.
13614 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13615 minimum_stride field.
13616 (exynosm1_prefetch_tune): Likewise.
13617 (thunderxt88_prefetch_tune): Likewise.
13618 (thunderx_prefetch_tune): Likewise.
13619 (thunderx2t99_prefetch_tune): Likewise.
13620 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13621 (aarch64_override_options_internal): Update to set
13622 PARAM_PREFETCH_MINIMUM_STRIDE.
13623 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13624 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13625 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13626 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13627 stride is constant and is below the minimum stride threshold.
13628
13629 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13630
13631 PR c++/85659
13632 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13633 the type is addressable. Don't force op into register if it has
13634 BLKmode.
13635
13636 2018-05-05 Roland McGrath <mcgrathr@google.com>
13637
13638 PR other/77609
13639 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13640 any section for which we don't know a specific type it should have,
13641 regardless of name. Previously this was done only for the exact
13642 names ".init_array", ".fini_array", and ".preinit_array".
13643 (default_elf_asm_named_section): Add comment about
13644 relationship with default_section_type_flags and SECTION_NOTYPE.
13645 (get_section): Don't consider it a type conflict if one side has
13646 SECTION_NOTYPE and the other doesn't, as long as neither has the
13647 SECTION_BSS et al used in the default_section_type_flags logic.
13648
13649 2018-05-05 Tom de Vries <tom@codesourcery.com>
13650
13651 PR target/85653
13652 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13653 (workaround_barsyncs): New function.
13654 (nvptx_reorg): Use workaround_barsyncs.
13655 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13656 (define_expand "nvptx_membar_cta"): New define_expand.
13657 (define_insn "*nvptx_membar_cta"): New insn.
13658
13659 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13660
13661 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13662 To improve optimization opportunities.
13663 * builtin-types.def: The new needed builtin types for the above.
13664
13665 2018-05-04 Richard Biener <rguenther@suse.de>
13666
13667 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13668 * gimple-ssa-store-merging.c
13669 (imm_store_chain_info::output_merged_store): Remove redundant create,
13670 release split_store vector contents on failure.
13671 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13672 scalar stmt vector on cache hit.
13673
13674 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13675
13676 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13677 Xilinx FP support.
13678 * config.gcc (powerpc-xilinx-eabi*): Remove.
13679 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13680 support.
13681 (fusion_addis_mem_combo_load): Ditto.
13682 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13683 FP support.
13684 (rs6000_cpu_cpp_builtins): Ditto.
13685 * config/rs6000/rs6000-linux.c
13686 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13687 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13688 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13689 support.
13690 (rs6000_setup_reg_addr_masks): Ditto.
13691 (rs6000_init_hard_regno_mode_ok): Ditto.
13692 (rs6000_option_override_internal): Ditto.
13693 (legitimate_lo_sum_address_p): Ditto.
13694 (rs6000_legitimize_address): Ditto.
13695 (rs6000_legitimize_reload_address): Ditto.
13696 (rs6000_legitimate_address_p): Ditto.
13697 (abi_v4_pass_in_fpr): Ditto.
13698 (setup_incoming_varargs): Ditto.
13699 (rs6000_gimplify_va_arg): Ditto.
13700 (rs6000_split_multireg_move): Ditto.
13701 (rs6000_savres_strategy): Ditto.
13702 (rs6000_emit_prologue_components): Ditto.
13703 (rs6000_emit_epilogue_components): Ditto.
13704 (rs6000_emit_prologue): Ditto.
13705 (rs6000_emit_epilogue): Ditto.
13706 (rs6000_elf_file_end): Ditto.
13707 (rs6000_function_value): Ditto.
13708 (rs6000_libcall_value): Ditto.
13709 * config/rs6000/rs6000.h: Ditto.
13710 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13711 (TARGET_MINMAX): ... this. New.
13712 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13713 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13714 (*movsi_internal1_single): Delete.
13715 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13716 mfpu=, mxilinx-fpu): Delete.
13717 * config/rs6000/singlefp.h: Delete.
13718 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13719 * config/rs6000/t-rs6000: Ditto.
13720 * config/rs6000/t-xilinx: Delete.
13721 * config/rs6000/titan.md: Adjust for fp_type removal.
13722 * config/rs6000/vsx.md: Remove Xilinx FP support.
13723 (VStype_simple): Delete.
13724 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13725 * config/rs6000/xfpu.h: Delete.
13726 * config/rs6000/xfpu.md: Delete.
13727 * config/rs6000/xilinx.h: Delete.
13728 * config/rs6000/xilinx.opt: Delete.
13729 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13730 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13731
13732 2018-05-04 Tom de Vries <tom@codesourcery.com>
13733
13734 PR libgomp/85639
13735 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13736 if ignore == 0.
13737
13738 2018-05-04 Richard Biener <rguenther@suse.de>
13739
13740 PR middle-end/85627
13741 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13742 (expand_complex_div_wide): Likewise.
13743 (expand_complex_operations_1): Likewise.
13744 (expand_complex_libcall): Preserve EH info of the original stmt.
13745 (tree_lower_complex): Handle removed blocks.
13746 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13747 on complex multiplication and division libcall builtins.
13748
13749 2018-05-04 Richard Biener <rguenther@suse.de>
13750
13751 PR middle-end/85574
13752 * fold-const.c (negate_expr_p): Restrict negation of operand
13753 zero of a division to when we know that can happen without
13754 overflow.
13755 (fold_negate_expr_1): Likewise.
13756
13757 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13758
13759 PR libstdc++/85466
13760 * real.h (real_nextafter): Declare.
13761 * real.c (real_nextafter): New function.
13762 * fold-const-call.c (fold_const_nextafter): New function.
13763 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13764 CASE_CFN_NEXTTOWARD.
13765 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13766 even when arg1_mode is different from arg0_mode.
13767
13768 2018-05-03 Nathan Sidwell <nathan@acm.org>
13769
13770 * doc/extend.texi (Deprecated Features): Remove
13771 -ffriend-injection.
13772 (Backwards Compatibility): Likewise.
13773 * doc/invoke.texi (C++ Language Options): Likewise.
13774 (C++ Dialect Options): Likewise.
13775
13776 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13777
13778 PR target/85530
13779 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13780 _mm512_mask_mullox_epi64): New intrinsics.
13781
13782 2018-05-03 Tom de Vries <tom@codesourcery.com>
13783
13784 PR testsuite/85106
13785 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13786 dump files): Add offload-tree.
13787
13788 2018-05-03 Richard Biener <rguenther@suse.de>
13789
13790 PR tree-optimization/85615
13791 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13792 to loops not nested in BBs loop father to avoid creating multi-entry
13793 loops.
13794
13795 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13796
13797 PR tree-optimization/70291
13798 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13799 arguments. Change return type to tree. Emit libcall as a new
13800 statement rather than replacing existing one when inplace_p is true.
13801 (expand_complex_multiplication_components): New function.
13802 (expand_complex_multiplication): Expand floating-point complex
13803 multiplication using the above.
13804 (expand_complex_division): Rename inner_type parameter to type.
13805 Update expand_complex_libcall call-site.
13806 (expand_complex_operations_1): Update expand_complex_multiplication
13807 and expand_complex_division call-sites.
13808
13809 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13810
13811 PR target/85582
13812 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13813 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13814 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13815 the highest significant bit of the shift count mask is clear. In
13816 check whether and[sq]i3 is needed verify that all significant bits
13817 of the shift count other than the highest are set.
13818
13819 2018-05-02 Tom de Vries <tom@codesourcery.com>
13820
13821 PR libgomp/82428
13822 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13823 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13824 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13825 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13826 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13827 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13828 __builtin_goacc_parlevel_size.
13829
13830 2018-05-02 Richard Biener <rguenther@suse.de>
13831
13832 PR tree-optimization/85597
13833 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13834 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13835 directly.
13836
13837 2018-05-02 Tom de Vries <tom@codesourcery.com>
13838
13839 PR testsuite/85106
13840 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13841 dump files): Add ltrans-tree.
13842
13843 2018-05-02 Tom de Vries <tom@codesourcery.com>
13844
13845 PR testsuite/85106
13846 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13847 dump files): Add wpa-ipa.
13848
13849 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13850
13851 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13852 powerpc*-*-linux*paired* target.
13853 * config/rs6000/750cl.h: Delete.
13854 * config/rs6000/paired.h: Delete.
13855 * config/rs6000/paired.md: Delete.
13856 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13857 float support.
13858 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13859 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13860 comment. Remove paired float support.
13861 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13862 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13863 VECTOR_PAIRED.
13864 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13865 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13866 declarations.
13867 * config/rs6000/rs6000.c: Remove paired float support.
13868 (paired_expand_vector_init, paired_expand_vector_move,
13869 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13870 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13871 paired_expand_builtin, paired_expand_predicate_builtin,
13872 paired_init_builtins): Delete.
13873 * config/rs6000/rs6000.h: Remove paired float support.
13874 * config/rs6000/rs6000.md: Remove paired float support.
13875 (move_from_CR_ov_bit): Delete.
13876 * config/rs6000/rs6000.opt (mpaired): Delete.
13877 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13878 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13879
13880 2018-05-02 Richard Biener <rguenther@suse.de>
13881
13882 PR middle-end/85567
13883 * gimplify.c (gimplify_save_expr): When in SSA form allow
13884 SAVE_EXPRs to compute to SSA vars.
13885
13886 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13887
13888 PR target/85582
13889 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13890 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13891 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13892 clobber operands[2], instead use a new pseudo. Formatting fixes.
13893
13894 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13895
13896 PR tree-optimization/85586
13897 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13898 exit early for statements in the same group if the accesses are
13899 not strided.
13900
13901 2018-05-02 Tom de Vries <tom@codesourcery.com>
13902
13903 PR lto/85451
13904 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13905 error message.
13906
13907 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13908
13909 PR tree-optimization/85143
13910 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13911
13912 2018-05-01 Tom de Vries <tom@codesourcery.com>
13913
13914 PR lto/85451
13915 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13916 not found" error message.
13917
13918 2018-05-01 Tom de Vries <tom@codesourcery.com>
13919
13920 PR other/83786
13921 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13922 * vec.c (test_ordered_remove_if): New function.
13923 (vec_c_tests): Call test_ordered_remove_if.
13924 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13925 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13926 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13927 VEC_ORDERED_REMOVE_IF.
13928
13929 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13930
13931 PR tree-optimization/82665
13932 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13933 pointer subtraction where arguments come from a memchr call.
13934
13935 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13936
13937 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13938 --push-state --as-needed and --pop-state instead of --as-needed and
13939 --no-as-needed if ld supports it.
13940 * configure: Regenerated.
13941
13942 PR web/85578
13943 * doc/install.texi2html: Replace _002d with - and _002a with * in
13944 generated html files using sed.
13945
13946 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13947
13948 PR c++/85523
13949 * gcc-rich-location.c (blank_line_before_p): New function.
13950 (use_new_line): New function.
13951 (gcc_rich_location::add_fixit_insert_formatted): New function.
13952 * gcc-rich-location.h
13953 (gcc_rich_location::add_fixit_insert_formatted): New function.
13954
13955 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13956
13957 * selftest.c (assert_streq): Rename "expected" and "actual" to
13958 "val1" and "val2". Extend NULL-handling to cover both inputs
13959 symmetrically, while still requiring both to be non-NULL for a pass.
13960 * selftest.h (assert_streq): Rename "expected" and "actual" to
13961 "val1" and "val2".
13962 (ASSERT_EQ): Likewise.
13963 (ASSERT_EQ_AT): Likewise.
13964 (ASSERT_KNOWN_EQ): Likewise.
13965 (ASSERT_KNOWN_EQ_AT): Likewise.
13966 (ASSERT_NE): Likewise.
13967 (ASSERT_MAYBE_NE): Likewise.
13968 (ASSERT_MAYBE_NE_AT): Likewise.
13969 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13970 the assertion to pass.
13971 (ASSERT_STREQ_AT): Likewise.
13972
13973 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13974
13975 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13976 interaction with -pie.
13977
13978 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13979
13980 * selftest.h: Fix alphabetization of per-source-file selftest
13981 declarations.
13982
13983 2018-04-30 Jason Merrill <jason@redhat.com>
13984
13985 PR c++/61982 - dead stores to destroyed objects.
13986 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13987 of clobber.
13988
13989 2018-04-30 Jason Merrill <jason@redhat.com>
13990
13991 * tree.c (build_clobber): New.
13992 * tree.h: Declare it.
13993 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13994
13995 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13996
13997 * diagnostic-show-locus.c (layout::layout): Update for
13998 location_get_source_line returning a char_span.
13999 (struct char_span): Move to input.h.
14000 (struct correction): Update for fields in char_span becoming
14001 private.
14002 (struct source_line): Update for location_get_source_line
14003 returning a char_span.
14004 (layout::print_line): Likewise.
14005 * edit-context.c (edited_file::print_content): Likewise.
14006 (edited_file::print_diff_hunk): Likewise.
14007 (edited_file::print_run_of_changed_lines): Likewise.
14008 (edited_file::get_num_lines): Likewise.
14009 (edited_line::edited_line): Likewise.
14010 * final.c (asm_show_source): Likewise.
14011 * input.c (location_get_source_line): Convert return type
14012 from const char * to char_span, losing the final "line_len"
14013 param.
14014 (dump_location_info): Update for the above.
14015 (get_substring_ranges_for_loc): Likewise. Use a char_span
14016 when handling the literal within the line.
14017 (test_reading_source_line): Update for location_get_source_line
14018 returning a char_span.
14019 * input.h (class char_span): Move here from
14020 diagnostic-show-locus.c, converting from a struct to a class.
14021 Make data members private.
14022 (char_span::operator bool): New.
14023 (char_span::length): New.
14024 (char_span::get_buffer): New.
14025 (char_span::operator[]): New.
14026 (char_span::subspan): Make const.
14027 (char_span::xstrdup): New.
14028 (location_get_source_line): Convert return type from const char *
14029 to char_span, losing the final "line_size" param.
14030
14031 2018-04-30 Jan Hubicka <jh@suse.cz>
14032
14033 * lto-wrapper.c (ltrans_priorities): New static var.
14034 (cmp_priority): New.
14035 (run_gcc): Read priorities and if doing parallel build order
14036 the Makefile by them.
14037
14038 2018-04-30 David Malcolm <dmalcolm@redhat.com>
14039
14040 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
14041
14042 2018-04-30 Richard Biener <rguenther@suse.de>
14043
14044 * tree-cfg.c (verify_address): Remove base argument, add
14045 flag whether to check TREE_ADDRESSABLE and do that.
14046 (verify_expr): Remove.
14047 (verify_types_in_gimple_reference): Add pieces from verify_expr.
14048 (verify_gimple_assign_single): Likewise.
14049 (verify_gimple_switch): Likewise.
14050 (verify_expr_location_1): Dereference tp once. Add (disabled)
14051 piece from verify_expr.
14052 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
14053
14054 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14055
14056 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
14057
14058 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14059
14060 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
14061 (small_data_pattern): Likewise.
14062 (arc_rewrite_small_data): Likewise.
14063 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
14064 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
14065 (get_symbol_alignment): New function.
14066 (legitimate_small_data_address_p): Likewise.
14067 (legitimate_scaled_address): Update, call
14068 legitimate_small_data_address_p.
14069 (output_sdata): New static variable.
14070 (arc_print_operand): Update how we handle small data operands.
14071 (arc_print_operand_address): Likewise.
14072 (arc_legitimate_address_p): Update, use
14073 legitimate_small_data_address_p.
14074 (arc_rewrite_small_data_p): Remove.
14075 (arc_rewrite_small_data_1): Likewise.
14076 (arc_rewrite_small_data): Likewise.
14077 (small_data_pattern): Likewise.
14078 (compact_sda_memory_operand): Update to use
14079 legitimate_small_data_address_p and get_symbol_alignment.
14080 (prepare_move_operands): Don't rewite sdata pattern.
14081 (prepare_extend_operands): Remove.
14082 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
14083 pattern.
14084 (zero_extendqisi2): Likewise.
14085 (zero_extendhisi2): Likewise.
14086 (extendqihi2): Likewise.
14087 (extendqisi2): Likewise.
14088 (extendhisi2): Likewise.
14089 (addsi3): Likewise.
14090 (subsi3): Likewise.
14091 (andsi3): Likewise.
14092 * config/arc/constraints.md (Usd): Change it to memory constraint.
14093
14094 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
14095
14096 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
14097 as source of std instructions.
14098 * config/arc/arc.md (movsi_insn): Update pattern predicate to
14099 allow 6-bit constants as source for store instructions.
14100 (movdi_insn): Update instruction pattern to allow 6-bit constants
14101 as source for store instructions.
14102
14103 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
14104
14105 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
14106
14107 2018-04-30 Nathan Sidwell <nathan@acm.org>
14108 Sandra Loosemore <sandra@codesourcery.com>
14109
14110 * dumpfile.c (dump_open): Allow '-' for stdout.
14111 * doc/invoke.texi (Developer Options): Document dump filename
14112 determination early. Document stdin/stdout selection.
14113
14114 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
14115
14116 Microblaze Target: PIC data text relative
14117
14118 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
14119 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
14120 Add declaration.
14121 * config/microblaze/microblaze.h (microblaze_constant_address_p):
14122 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
14123 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
14124 New addressing mode for data-text relative position indepenedent code.
14125 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
14126 'ADDRESS_SYMBOLIC_TXT_REL'.
14127 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
14128 (microblaze_legitimate_pic_operand): Exclude function calls from
14129 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
14130 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
14131 addresses cases.
14132 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14133 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
14134 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
14135 for 'address + offset'.
14136 (microblaze_expand_prologue): Add new function prologue call for
14137 'r20' assignation.
14138 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
14139 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
14140 table in case of TARGET_PIC_DATA_TEXT_REL.
14141 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
14142 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
14143 Add new macros 'UNSPEC_TEXT',
14144 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
14145 + exclude function calls from 'UNSPEC_PLT' in case of data text
14146 relative mode.
14147 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14148 new target hook for generating address diff vector tables in case of
14149 flag_pic.
14150 * doc/tm.texi : Regenerate.
14151 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
14152 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
14153 of addr diff vector generation.
14154 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
14155 target hook definition.
14156 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
14157 Add default function for generate_pic_addr_diff_vec -> flag_pic.
14158 * doc/invoke.texi (Add new pic option): Add new microblaze pic
14159 option for data text relative.
14160
14161 2018-04-30 Richard Biener <rguenther@suse.de>
14162
14163 * tree-chrec.h (evolution_function_is_constant_p): Remove
14164 redundant check.
14165 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
14166
14167 2018-04-30 Richard Biener <rguenther@suse.de>
14168
14169 PR bootstrap/85571
14170 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
14171
14172 2018-04-30 Richard Biener <rguenther@suse.de>
14173
14174 PR tree-optimization/28364
14175 PR tree-optimization/85275
14176 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
14177 copying first exit test.
14178
14179 2018-04-28 Mark Wielaard <mark@klomp.org>
14180
14181 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
14182 dwarf_version >= 5.
14183 (dwarf_AT): Handle DW_AT_addr_base.
14184 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
14185
14186 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
14187
14188 PR target/84431
14189 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
14190 (*ashl<dwi>3_doubleword_mask_1): Ditto.
14191 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
14192 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
14193
14194 2018-04-28 Richard Biener <rguenther@suse.de>
14195
14196 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
14197 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
14198 to reflect use. Only add interesting stmts.
14199
14200 2018-04-27 Martin Jambor <mjambor@suse.cz>
14201
14202 PR ipa/85549
14203 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14204 the jump function allows for passing through aggregate values.
14205
14206 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14207
14208 * input.h (in_system_header_at): Convert from macro to inline
14209 function.
14210 (from_macro_expansion_at): Likewise.
14211 (from_macro_definition_at): Likewise.
14212
14213 2018-04-27 Jeff Law <law@redhat.com>
14214
14215 * config.gcc: Mark tile* targets as deprecated/obsolete.
14216
14217 2018-04-27 Richard Biener <rguenther@suse.de>
14218
14219 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14220 fix for ILP32.
14221
14222 2018-04-27 Richard Biener <rguenther@suse.de>
14223
14224 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14225
14226 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14227
14228 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14229 with Yd constraint. Set "preferred_for_speed" attribute from
14230 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14231 with Yd constraint.
14232 (*movdi_internal): Ditto.
14233 (movti_interunit splitters): Remove
14234 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14235 (movdi_interunit splitters): Ditto.
14236 * config/i386/constraints.md (Ye): Remove.
14237 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14238
14239 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14240
14241 PR target/85512
14242 * config/aarch64/constraints.md (Usg): Limit to 31.
14243 (Usj): Limit to 63.
14244
14245 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14246
14247 PR tree-optimization/85529
14248 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14249 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14250 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14251 zero extension or masking of the MSB bit.
14252 (optimize_range_tests): Add FIRST_BB argument, pass it through
14253 to optimize_range_tests_var_bound.
14254 (maybe_optimize_range_tests, reassociate_bb): Adjust
14255 optimize_range_tests callers.
14256
14257 2018-04-26 Richard Biener <rguenther@suse.de>
14258 Jakub Jelinek <jakub@redhat.com>
14259
14260 * cgraph.h (symbol_table): Just declare debug method here.
14261 * symtab.c (symbol_table::debug): Define.
14262
14263 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14264
14265 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14266
14267 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14268
14269 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14270 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14271 (*movdi_internal): Substitute Yi and Yj constraint with x
14272 and Ym and Yn constraint with y constraint. Update "isa"
14273 attribute and set "preferred_for_speed" attribute from
14274 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14275 (*movsi_internal): Ditto.
14276 (*movdf_internal): Ditto.
14277 (*movsf_internal): Ditto.
14278 (*zero_extendsidi2): Ditto.
14279 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14280 (sse2_loadld): Ditto.
14281 (*vec_extract<ssevecmodelower>_0): Ditto.
14282 (*vec_extractv4si_0_zext_sse4): Ditto.
14283 (vec_concatv2di): Ditto.
14284 (*vec_dup<mode>): Ditto.
14285 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14286 * config/i386/constraints.md (Yi): Remove.
14287 (Yj): Remove.
14288 (Ym): Remove.
14289 (Yn): Remove.
14290
14291 2018-04-26 Nathan Sidwell <nathan@acm.org>
14292
14293 * dumpfile.c (dump_open): New.
14294 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14295 (dump_finish): Detect stdio/stderr by value not name.
14296
14297 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14298
14299 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14300
14301 2018-04-26 Tom de Vries <tom@codesourcery.com>
14302
14303 PR target/84952
14304 * config/nvptx/nvptx.c (verify_neutering_jumps)
14305 (verify_neutering_labels): New function
14306 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14307
14308 2018-04-26 Tom de Vries <tom@codesourcery.com>
14309
14310 PR target/84025
14311 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14312 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14313 need neutering.
14314
14315 2018-04-26 Richard Biener <rguenther@suse.de>
14316 Tom de Vries <tom@codesourcery.com>
14317
14318 PR lto/85422
14319 * lto-streamer-out.c (output_function): Fixup loops if required to match
14320 discovery done in the reader.
14321
14322 2018-04-26 Richard Biener <rguenther@suse.de>
14323
14324 PR tree-optimization/85116
14325 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14326 have a loop exit from the single latch predecessor. Remove
14327 case of header with just condition.
14328 (ch_base::copy_headers): Exclude infinite loops from any
14329 processing.
14330 (pass_ch::execute): Record exits.
14331
14332 2018-04-26 Richard Biener <rguenther@suse.de>
14333
14334 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14335 prologue cost vector and pass it to vect_get_load_cost.
14336 (vect_get_peeling_costs_all_drs): Likewise.
14337 (vect_peeling_hash_get_lowest_cost): Likewise.
14338 (vect_enhance_data_refs_alignment): Likewise.
14339
14340 2018-04-26 Richard Biener <rguenther@suse.de>
14341
14342 PR middle-end/85450
14343 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14344 checking of integer<->pointer conversions.
14345 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14346 sign-/zero-extending pointer types.
14347 (expand_omp_for_static_chunk): Likewise.
14348
14349 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14350 Jean Lee <xiaoyur347@gmail.com>
14351
14352 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14353 (TARGET_ASAN_SHADOW_OFFSET): Define.
14354 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14355 true for -fsanitize=address.
14356
14357 2018-04-25 Mark Wielaard <mark@klomp.org>
14358
14359 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14360 shorter ones.
14361
14362 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14363
14364 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14365 than "alu", remove explicit "memory" and "imm_disp" attributes.
14366 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14367
14368 PR middle-end/85414
14369 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14370 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14371 gen_lowpart_no_emit.
14372
14373 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14374
14375 PR target/85473
14376 * config/i386/i386.c (ix86_expand_builtin): Change memory
14377 operand to XI, extend p0 to Pmode.
14378 * config/i386/i386.md: Change unspec volatile and operand
14379 1 mode to XI, change operand 0 mode to P.
14380
14381 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14382
14383 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14384 GET_MODE_MASK before any checking.
14385 (nds32_can_use_bset_p): Likewise.
14386 (nds32_can_use_btgl_p): Likewise.
14387
14388 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14389
14390 * config/nds32/nds32-doubleword.md: New define_split pattern for
14391 illegal register number.
14392
14393 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14394
14395 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14396
14397 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14398
14399 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14400
14401 2018-04-25 Richard Biener <rguenther@suse.de>
14402
14403 * lto-streamer.h (LTO_major_version): Bump to 8.
14404
14405 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14406
14407 * BASE-VER: Set to 9.0.0.
14408
14409 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14410
14411 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14412 in __abskf2 and __powikf2.
14413
14414 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14415
14416 PR target/85512
14417 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14418 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14419 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14420 Use the above on operand 2. Reindent.
14421 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14422
14423 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14424
14425 PR target/85485
14426 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14427 handle OPT_mcet.
14428 * config/i386/i386.opt (mcet): Removed.
14429 * doc/install.texi: Remove -mcet documentation.
14430 * doc/invoke.texi: Likewise.
14431
14432 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14433
14434 PR target/85485
14435 * doc/install.texi: Remove -mcet from bootstrap-cet.
14436
14437 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14438
14439 PR target/85511
14440 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14441 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14442 if TARGET_64BIT.
14443
14444 PR target/85503
14445 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14446 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14447 containing a CONST_VECTOR.
14448
14449 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14450
14451 * doc/install.texi: Update newlib dependency for nvptx.
14452
14453 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14454
14455 PR target/85508
14456 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14457 instead of INTVAL when shifting x left.
14458
14459 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14460
14461 PR tree-optimization/85478
14462 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14463 vect_grouped_store_supported for single element vectors.
14464
14465 2018-04-24 Richard Biener <rguenther@suse.de>
14466
14467 PR target/85491
14468 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14469 load cost increase to the case of non-constant step.
14470
14471 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14472
14473 PR target/84828
14474 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14475 destination if any_malformed_asm.
14476
14477 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14478
14479 PR middle-end/85496
14480 * expr.c (store_field): In the bitfield case, if the value comes from
14481 a function call and is returned in registers by means of a PARALLEL,
14482 do not change the mode of the temporary unless BLKmode and VOIDmode.
14483
14484 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14485
14486 PR rtl-optimization/85423
14487 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14488 dependencies to debug insns when the previous insn is non-debug.
14489
14490 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14491
14492 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14493 enums into a single definition.
14494 (fls): Fix predicates and printing.
14495 (seti): Likewise.
14496
14497 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14498
14499 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14500 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14501 and short u6 immediate.
14502 (check_if_valid_sleep_operand): Remove.
14503 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14504
14505 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14506
14507 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14508 flag_always_save_lp condition.
14509 * config/nds32/nds32.opt (malways-save-lp): New option.
14510
14511 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14512
14513 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14514 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14515 * config/nds32/nds32.h
14516 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14517 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14518
14519 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14520
14521 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14522 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14523
14524 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14525 Chung-Ju Wu <jasonwucj@gmail.com>
14526
14527 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14528 Declare.
14529 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14530 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14531
14532 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14533
14534 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14535
14536 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14537
14538 * config/nds32/nds32-protos.h (nds32_data_alignment,
14539 nds32_local_alignment): Declare.
14540 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14541 nds32_local_alignment): New functions.
14542 (TARGET_CONSTANT_ALIGNMENT): Define.
14543 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14544
14545 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14546
14547 * config/nds32/nds32.c
14548 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14549 (TARGET_MODES_TIEABLE_P): Likewise.
14550
14551 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14552
14553 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14554 level Ofast and Og.
14555
14556 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14557 Chung-Ju Wu <jasonwucj@gmail.com>
14558
14559 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14560 for unaligned access.
14561 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14562 unaligned access.
14563 * config/nds32/nds32-intrinsic.md: Likewise.
14564 * config/nds32/nds32_intrinsic.h: Likewise.
14565 * config/nds32/nds32.h (nds32_builtins): Likewise.
14566 * config/nds32/nds32.opt (munaligned-access): New option.
14567 * config/nds32/nds32.c (nds32_asm_file_start): Display
14568 flag_unaligned_access status.
14569
14570 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14571
14572 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14573 -mno-relax is present.
14574 * config/riscv/linux.h (LINK_SPEC): Ditto.
14575
14576 2018-04-20 Martin Sebor <msebor@redhat.com>
14577
14578 PR c/85365
14579 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14580 for null pointers.
14581 (gimple_fold_builtin_stxcpy_chk): Same.
14582 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14583
14584 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14585
14586 PR target/85456
14587 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14588 __powikf2 when long double is IEEE 128-bit.
14589
14590 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14591
14592 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14593 step to make sure stack always aligned.
14594
14595 2018-04-20 Carl Love <cel@us.ibm.com>
14596
14597 PR target/83402
14598 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14599 size check for arg0.
14600
14601 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14602 Tom de Vries <tom@codesourcery.com>
14603
14604 PR target/85445
14605 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14606 Emit insns for calls too.
14607 (nvptx_find_par): Always look for worker-level predecessor insn.
14608 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14609 calls.
14610 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14611 (nvptx_process_pars): Propagate frames for calls.
14612
14613 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14614
14615 PR target/85469
14616 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14617 Removed.
14618 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14619 (ix86_handle_option): Don't handle OPT_mibt.
14620 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14621 __SHSTK__.
14622 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14623 has_ibt and ibt.
14624 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14625 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14626 (ix86_target_macros): Define __CET__ with flag_cf_protection
14627 for -fcf-protection.
14628 * config/i386/i386.c (isa2_opts): Remove -mibt.
14629 * config/i386/i386.h (TARGET_IBT): Removed.
14630 (TARGET_IBT_P): Likewise.
14631 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14632 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14633 * config/i386/i386.opt (mcet): Update help message.
14634 (mshstk): Likewise.
14635 (mibt): Removed.
14636 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14637 -mcet as an alias for -mshstk.
14638
14639 2018-04-20 Richard Biener <rguenther@suse.de>
14640
14641 PR middle-end/85475
14642 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14643 complexity by forcing a single use of the multiply operand.
14644
14645 2018-04-20 Martin Jambor <mjambor@suse.cz>
14646
14647 ipa/85449
14648 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14649 recursion dependency to only apply to non-clones.
14650
14651 2018-04-20 Martin Jambor <mjambor@suse.cz>
14652
14653 ipa/85447
14654 * ipa-cp.c (create_specialized_node): Check that clones of
14655 self-recursive edges exist during IPA-CP.
14656
14657 2018-04-19 Toon Moene <toon@moene.org>
14658
14659 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14660 by -O3.
14661
14662 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14663
14664 PR tree-optimization/85467
14665 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14666 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14667 VECTOR_CST element to type.
14668
14669 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14670
14671 PR target/85397
14672 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14673 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14674 (builtin_longjmp): Likewise.
14675 (save_stack_nonlocal): New pattern.
14676 (restore_stack_nonlocal): Likewise.
14677
14678 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14679
14680 PR target/85404
14681 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14682 Replace ASM_OUTPUT_LABEL with fprintf.
14683
14684 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14685
14686 PR target/85417
14687 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14688 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14689 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14690 define __IBT__ and __SHSTK__ for -fcf-protection.
14691 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14692 TARGET_IBT.
14693 (ix86_trampoline_init): Likewise.
14694 (x86_output_mi_thunk): Likewise.
14695 (ix86_notrack_prefixed_insn_p): Likewise.
14696 (ix86_option_override_internal): Don't disallow -fcf-protection.
14697 * config/i386/i386.md (rdssp<mode>): Also enable for
14698 -fcf-protection.
14699 (incssp<mode>): Likewise.
14700 (nop_endbr): Likewise.
14701 * config/i386/i386.opt (mcet): Change help message to built-in
14702 functions only.
14703 (mibt): Likewise.
14704 (mshstk): Likewise.
14705 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14706 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14707 enable CET built-in functions.
14708
14709 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14710
14711 * common/config/i386/i386-common.c
14712 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14713 OPTION_MASK_ISA_MOVDIRI_UNSET,
14714 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14715 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14716 * config.gcc (movdirintrin.h): New header.
14717 * config/i386/cpuid.h (bit_MOVDIRI,
14718 bit_MOVDIR64B): New bits.
14719 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14720 and -mmvodir64b.
14721 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14722 (VOID, PVOID, PCVOID)): New function types.
14723 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14724 __builtin_ia32_directstoreu_u64,
14725 __builtin_ia32_movdir64b): New builtins.
14726 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14727 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14728 and -mmovdiri.
14729 (ix86_valid_target_attribute_inner_p): Ditto.
14730 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14731 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14732 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14733 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14734 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14735 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14736 (movdiri<mode>, movdir64b_<mode>): New.
14737 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14738 * config/i386/immintrin.h: Include movdirintrin.h.
14739 * config/i386/movdirintrin.h: New file.
14740 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14741
14742 2018-04-19 Richard Biener <rguenther@suse.de>
14743
14744 PR middle-end/85455
14745 * cfg.c (clear_bb_flags): When loop state says we have
14746 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14747
14748 2018-04-19 Richard Biener <rguenther@suse.de>
14749
14750 PR tree-optimization/84737
14751 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14752 copying restrict info.
14753 (vect_setup_realignment): Use it.
14754 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14755 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14756 the first DR to all generated stores.
14757 (vectorizable_load): Likewise for loads.
14758
14759 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14760
14761 PR tree-optimization/85446
14762 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14763 the integral and pointer types to have the same precision.
14764
14765 * doc/install.texi: Document --disable-cet being the default and
14766 --enable-cet=auto.
14767
14768 2018-04-18 Martin Liska <mliska@suse.cz>
14769
14770 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14771 style.
14772
14773 2018-04-18 Martin Liska <mliska@suse.cz>
14774
14775 Revert
14776 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14777
14778 PR ipa/83983
14779 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14780 arguments if they are comparable.
14781
14782 2018-04-18 Martin Liska <mliska@suse.cz>
14783
14784 Revert
14785 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14786
14787 PR lto/84805
14788 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14789 incomplete types.
14790
14791 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14792
14793 PR target/85388
14794 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14795 ENDBR after calling __morestack.
14796
14797 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14798
14799 PR jit/85384
14800 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14801 by using gcc_base_ver to generate a gcc_driver_version, and use
14802 it when generating GCC_DRIVER_NAME.
14803 * configure: Regenerate.
14804
14805 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14806
14807 PR target/81084
14808 * config.gcc: Obsolete powerpc*-*-*spe*.
14809
14810 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14811
14812 PR debug/84637
14813 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14814 (stabstr_D): Change type of unum from unsigned int to
14815 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14816 type.
14817
14818 2018-04-17 Jim Wilson <jimw@sifive.com>
14819
14820 PR 84856
14821 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14822 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14823 Set arg_pointer_offset after using pretend_args_size.
14824
14825 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14826
14827 PR rtl-optimization/85431
14828 * dse.c (record_store): Ignore zero width stores.
14829
14830 PR sanitizer/85230
14831 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14832 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14833 __builtin_stack_restore rather than after it.
14834 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14835 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14836 argument instead of virtual_dynamic_stack_rtx.
14837
14838 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14839
14840 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14841 New prototype.
14842 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14843 Add note to error message to explain internal mapping of overloaded
14844 built-in function name to non-overloaded built-in function name.
14845 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14846 function.
14847
14848 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14849
14850 PR target/85424
14851 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14852 where the inputs overlap with the output.
14853
14854 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14855
14856 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14857 (=v, v) alternative and explicit "memory" attribute.
14858 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14859 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14860 attributes.
14861 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14862 "sselog1" type instead of "sselog".
14863 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14864 "sselog". Remove explicit "memory" attribute.
14865 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14866 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14867 attributes.
14868 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14869 "sselog1" type instead of "sselog". Remove explicit "memory"
14870 attribute.
14871 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14872 use "sselog1" type instead of "sselog". Remove explicit "memory"
14873 attribute.
14874 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14875 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14876 attributes.
14877 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14878 "sselog1" type instead of "sselog". Remove explicit "memory"
14879 attribute.
14880 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14881 use "sselog1" type instead of "sselog". Remove explicit "memory"
14882 attribute.
14883
14884 PR target/85430
14885 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14886
14887 PR middle-end/85414
14888 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14889 on a SUBREG.
14890
14891 2018-04-17 Martin Jambor <mjambor@suse.cz>
14892
14893 PR ipa/85421
14894 * ipa-cp.c (create_specialized_node): Call
14895 expand_all_artificial_thunks if necessary.
14896
14897 2018-04-17 Martin Liska <mliska@suse.cz>
14898
14899 PR lto/85405
14900 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14901 in message, remote space in between '_G' and '('.
14902
14903 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14904
14905 PR target/85281
14906 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14907 avx512f_vmcmp<mode>3<round_saeonly_name>,
14908 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14909 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14910 avx512f_rndscale<mode><round_saeonly_name>,
14911 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14912 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14913 Use %<iptr>2 instead of %2 for -masm=intel.
14914 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14915 avx512f_vcvttss2usi<round_saeonly_name>,
14916 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14917 -masm=intel.
14918 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14919 avx512f_vcvttsd2usi<round_saeonly_name>,
14920 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14921 Use %q1 instead of %1 for -masm=intel.
14922 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14923 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14924 of %3 for -masm=intel.
14925 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14926 -masm=intel.
14927 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14928 -masm=intel.
14929 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14930 -masm=intel.
14931 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14932 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14933 %g1.
14934 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14935 -masm=intel.
14936 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14937 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14938 %g1 and one with %0 and %1.
14939 (avx512er_vmrcp28<mode><round_saeonly_name>,
14940 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14941 %1 for -masm=intel.
14942 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14943 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14944 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14945 of %0 and %{%4%} for -masm=intel.
14946 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14947 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14948 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14949 order of %0 and %{%5%}%{z%} for -masm=intel.
14950
14951 2018-04-17 Jan Hubicka <jh@suse.cz>
14952
14953 PR lto/85405
14954 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14955
14956 2018-04-17 Martin Liska <mliska@suse.cz>
14957
14958 PR ipa/85329
14959 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14960 for target_clone error message. Make default implementation
14961 clone to be a local declaration.
14962 (separate_attrs): Add new argument and check for an empty
14963 string.
14964 (expand_target_clones): Handle it.
14965 (ipa_target_clone): Make redirection just for target_clones
14966 functions.
14967
14968 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14969 Tom de Vries <tom@codesourcery.com>
14970
14971 PR middle-end/84955
14972 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14973 tiled basic blocks without omp continue statements.
14974
14975 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14976
14977 PR target/83660
14978 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14979 vec_extract expression as having side effects to make sure it gets
14980 a cleanup point.
14981
14982 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14983
14984 PR target/85403
14985 * config/i386/i386.c (get_builtin_code_for_version): Check
14986 error_mark_node.
14987
14988 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14989
14990 PR target/84331
14991 * config.gcc: Support "skylake".
14992 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14993 PROCESSOR_SKYLAKE.
14994 * config/i386/i386.c (m_SKYLAKE): Define.
14995 (processor_target_table): Add "skylake".
14996 (ix86_option_override_internal): Add "skylake".
14997 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14998 PROCESSOR_CANNONLAKE.
14999 (get_builtin_code_for_version): Fix priority for
15000 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
15001 PROCESSOR_SKYLAKE-AVX512.
15002 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
15003 (processor_type): Add PROCESSOR_SKYLAKE.
15004
15005 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
15006 Jason Merrill <jason@redhat.com>
15007
15008 PR c++/85112
15009 * convert.c (convert_to_integer_1): Use direct recursion for
15010 enumeral types and types with a precision less than the number
15011 of bits in their mode.
15012
15013 2018-04-16 Julia Koval <julia.koval@intel.com>
15014
15015 PR target/84413
15016 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
15017 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
15018
15019 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
15020
15021 PR target/85293
15022 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
15023 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
15024 and -mno-direct-move.
15025
15026 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
15027
15028 PR target/83402
15029 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
15030 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
15031 Ensure negative shifts result in {0}.
15032
15033 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
15034
15035 PR rtl-optimization/79916
15036 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
15037 regs (if any) to define how to gnerate SD moves when LRA is in
15038 progress.
15039
15040 2018-04-13 Jakub Jelinek <jakub@redhat.com>
15041
15042 PR rtl-optimization/85393
15043 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
15044 * except.c (expand_dw2_landing_pad_for_region): Make static.
15045 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
15046 a label and unconditional jump to old_bb, rather than
15047 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
15048 basic block.
15049
15050 PR rtl-optimization/85376
15051 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
15052 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
15053 instead of a specific value.
15054
15055 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15056 Bin Cheng <bin.cheng@arm.com>
15057
15058 PR tree-optimization/82965
15059 PR tree-optimization/83991
15060 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
15061 by_profile_only parameter.
15062 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
15063 information if the loop was predicted to iterate too many times.
15064 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
15065
15066 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
15067
15068 PR lto/71991
15069 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
15070 always inline.
15071
15072 2018-04-13 Martin Liska <mliska@suse.cz>
15073 Jakub Jelinek <jakub@redhat.com>
15074
15075 PR middle-end/81657
15076 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
15077 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
15078 * builtins.c (expand_builtin_memory_copy_args): Use
15079 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
15080 handle dest_addr == pc_rtx.
15081
15082 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
15083
15084 PR target/85291
15085 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
15086 asked to not generate direct moves.
15087 (fix_trunc<mode>si2_stfiwx): Similar.
15088 (fix_trunc<mode>si2_internal): Similar.
15089
15090 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15091
15092 PR debug/83157
15093 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
15094 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
15095 lookup if dest in some wider mode is known to be const0_rtx and
15096 if so, record permanent equivalence for it to be ZERO_EXTEND of
15097 the narrower mode destination.
15098
15099 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15100
15101 * lto-streamer-out.c (output_function): Revert 259346.
15102 * omp-expand.c (expand_oacc_for): Likewise.
15103
15104 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
15105
15106 PR rtl-optimization/85354
15107 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
15108 * sel-sched.c (sel_global_init): ... here.
15109
15110 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
15111
15112 PR target/85238
15113 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
15114 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
15115 mode for PE-COFF targets.
15116 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
15117 (i386_pe_asm_lto_end): Likewise.
15118 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
15119 (TARGET_ASM_LTO_END): Likewise.
15120 * config/i386/winnt.c (saved_debug_info_level): New static variable.
15121 (i386_pe_asm_lto_start): New function.
15122 (i386_pe_asm_lto_end): Likewise.
15123
15124 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
15125 Richard Biener <rguenther@suse.de>
15126
15127 PR middle-end/84955
15128 * lto-streamer-out.c (output_function): Fix CFG loop state before
15129 streaming out.
15130 * omp-expand.c (expand_oacc_for): Handle calls to internal
15131 functions like regular functions.
15132
15133 2018-04-12 Richard Biener <rguenther@suse.de>
15134
15135 PR lto/85371
15136 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
15137 for the early LTO debug to properly generate references to it
15138 during DIE emission. Do not re-use that for the skeleton for
15139 split-dwarf.
15140 (dwarf2out_early_finish): Likewise.
15141
15142 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15143
15144 PR target/85328
15145 * config/i386/sse.md
15146 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
15147 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
15148 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
15149 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
15150 and output is a reg, avoid creating invalid lowpart subreg, but
15151 instead split into a 512-bit move. Don't split if not AVX512VL,
15152 input is xmm16+ reg and output is a mem.
15153 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
15154 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
15155 xmm16+ reg and output is a mem.
15156
15157 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15158
15159 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
15160 also for flag_dwarf2_cfi_asm.
15161
15162 2018-04-12 Jakub Jelinek <jakub@redhat.com>
15163
15164 PR rtl-optimization/85342
15165 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
15166 a bool scalar var inside of the loop instead. Don't try to update
15167 recog_data.operand after failed apply_change_group.
15168
15169 2018-04-12 Tom de Vries <tom@codesourcery.com>
15170
15171 PR target/85296
15172 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
15173 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
15174 array with flexible array member as array without given dimension.
15175 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
15176 argument for undefined param to true.
15177
15178 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
15179
15180 PR target/85321
15181 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15182 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
15183 from PowerPC section.
15184 * config/rs6000/sysv4.opt (mcall-): Improve help text.
15185 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
15186 help text that is too long.
15187 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
15188 help text that is too long.
15189 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
15190 help text that is too long.
15191
15192 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
15193
15194 * config/alpha/alpha.md (stack_probe_internal): Rename
15195 from "probe_stack". Update all callers.
15196
15197 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15198
15199 PR rtl-optimization/84566
15200 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
15201 sched_macro_fuse_insns.
15202
15203 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15204
15205 PR target/84301
15206 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15207 (compute_block_dependences): ... from here.
15208
15209 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15210
15211 PR tree-optimization/85331
15212 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15213 from int to HOST_WIDE_INT.
15214
15215 2018-04-11 Martin Jambor <mjambor@suse.cz>
15216
15217 PR ipa/84149
15218 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15219 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15220 not the same as the source val.
15221 (cgraph_edge_brings_value_p): New parameter.
15222 (gather_edges_for_value): Pass destination value to
15223 cgraph_edge_brings_value_p.
15224 (perhaps_add_new_callers): Likewise.
15225 (get_info_about_necessary_edges): Likewise and exclude values brought
15226 only by self-recursive edges.
15227 (create_specialized_node): Redirect only clones of self-calling edges.
15228 (+self_recursive_pass_through_p): New function.
15229 (find_more_scalar_values_for_callers_subset): Use it.
15230 (find_aggregate_values_for_callers_subset): Likewise.
15231 (known_aggs_to_agg_replacement_list): Removed.
15232 (decide_whether_version_node): Re-calculate known constants for all
15233 remaining context clones.
15234
15235 2018-04-11 Richard Biener <rguenther@suse.de>
15236
15237 PR lto/85339
15238 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15239 from early DWARF output.
15240 (dwarf2out_early_finish): Output line info unconditionally into
15241 early DWARF and add reference to it.
15242
15243 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15244
15245 PR target/85281
15246 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15247 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15248 other than V2DFmode using iptr mode attribute.
15249 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15250
15251 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15252
15253 PR rtl-optimization/84659
15254 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15255
15256 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15257
15258 PR debug/85302
15259 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15260 SIZEP is NULL.
15261 (output_loc_list): Pass address of a dummy size variable even in the
15262 locview handling loop.
15263 (index_location_lists): Add comment on why skip_loc_list_entry can't
15264 call size_of_locs.
15265
15266 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15267
15268 PR target/85261
15269 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15270 into register.
15271
15272 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15273
15274 PR target/85321
15275 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15276 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15277 and -mstring-compare-inline-limit.
15278
15279 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15280
15281 PR target/85287
15282 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15283 for stack clash protection in a register whenever we need it to be in
15284 a register.
15285
15286 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15287
15288 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15289 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15290
15291 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15292
15293 PR target/85321
15294 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15295 the help text.
15296 (mlong-double-): Ditto.
15297 * config/rs6000/sysv4.opt (msdata=): Ditto.
15298 (mtls-size=): Ditto.
15299
15300 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15301
15302 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15303 erroneous entries for
15304 "vector int vec_ldl (int, long int *)", and
15305 "vector unsigned int vec_ldl (int, unsigned long int *)".
15306 Add comments and entries for
15307 "vector bool char vec_ldl (int, bool char *)",
15308 "vector bool short vec_ldl (int, bool short *)",
15309 "vector bool int vec_ldl (int, bool int *)",
15310 "vector bool long long vec_ldl (int, bool long long *)",
15311 "vector pixel vec_ldl (int, pixel *)",
15312 "vector long long vec_ldl (int, long long *)",
15313 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15314 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15315 type tree bool_long_long_type_node and correct definition of
15316 bool_V2DI_type_node to make reference to this new type tree.
15317 (rs6000_mangle_type): Replace erroneous reference to
15318 bool_long_type_node with bool_long_long_type_node.
15319 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15320 comments to emphasize sign distinctions for char and int types and
15321 replace RS6000_BTI_bool_long constant with
15322 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15323 use of RS6000_BTI_pixel.
15324 (bool_long_type_node): Remove this macro definition.
15325 (bool_long_long_type_node): New macro definition
15326
15327 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15328
15329 PR rtl-optimization/85300
15330 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15331 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15332 simplify_unary_operation fails.
15333
15334 2018-04-10 Martin Liska <mliska@suse.cz>
15335
15336 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15337 cgraph_edge and ipa_ref.
15338
15339 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15340
15341 PR target/85177
15342 PR target/85255
15343 * config/i386/sse.md
15344 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15345 computation of the VEC_MERGE selector from mask.
15346 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15347 Fix decoding of the VEC_MERGE selector into mask.
15348
15349 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15350
15351 PR tree-optimization/85286
15352 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15353
15354 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15355
15356 * final.c (final_1): Set insn_last_address as well as
15357 insn_current_address.
15358
15359 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15360
15361 PR target/85173
15362 * explow.c (emit_stack_probe): Call validize_mem on memory location
15363 before passing it to gen_probe_stack. Create address operand and
15364 legitimize it for the probe_stack_address case.
15365
15366 2018-04-09 Jan Hubicka <jh@suse.cz>
15367
15368 PR lto/85078
15369 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15370 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15371 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15372 walk basetypes.
15373 (free_lang_data): Rebuild type inheritance graph.
15374
15375 2018-04-09 Martin Sebor <msebor@redhat.com>
15376
15377 * invoke.texi (-finline-small-functions): Mention other optimization
15378 options.
15379 (-findirect-inlining, -fpartial-inlining): Same.
15380 (-finline-functions-called-once): Same.
15381 (-freorder-blocks-and-partition): Same.
15382
15383 2018-04-09 Jan Hubicka <jh@suse.cz>
15384
15385 PR rtl/84058
15386 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15387 jumps; choose last target that matches the criteria (i.e.
15388 no partition changes for non-crossing jumps).
15389 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15390 support for redirecting crossing jumps to non-crossing.
15391
15392 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15393
15394 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15395 also for naked functions.
15396
15397 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15398
15399 * config/arc/arc.md (add_shift): New pattern.
15400 (add_shift2): Likewise.
15401 (sub_shift): Likewise.
15402 (sub_shift_cmp0_noout): Likewise.
15403 (compare_si_ashiftsi): Likewise.
15404 (xbfu_cmp0_noout): New combine pattern.
15405 (xbfu_cmp0"): Likewise.
15406 (movsi_set_cc_insn): Place the predicable variant first.
15407 (commutative_binary_cmp0_noout): Remove clobber.
15408 (commutative_binary_cmp0): New pattern.
15409 (noncommutative_binary_cmp0): Likewise.
15410 (noncommutative_binary_cmp0_noout): Likewise.
15411 (noncommutative_binary_comparison_result_used): Removed.
15412 (rsub_cmp0): New pattern.
15413 (rsub_cmp0_noout): Likewise.
15414 (extzvsi): Changed, keep only meaningful variants.
15415 (SQH, SEZ): New iterators.
15416 (SQH_postfix): New mode attribute.
15417 (SEZ_prefix): New code attribute.
15418 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15419 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15420 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15421 of numerical value.
15422 (noncommutative_operator): Check the availability of barrel
15423 shifter option.
15424
15425 2018-04-09 Richard Biener <rguenther@suse.de>
15426
15427 PR tree-optimization/85284
15428 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15429 Only use the niter constraining form of simple_iv when the exit
15430 is always executed.
15431
15432 2018-04-09 Tom de Vries <tom@codesourcery.com>
15433
15434 PR target/84041
15435 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15436 (define_expand "*memory_barrier"): New define_expand.
15437 (define_insn "memory_barrier"): New insn.
15438
15439 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15440
15441 PR rtl-optimization/80463
15442 PR rtl-optimization/83972
15443 PR rtl-optimization/83480
15444
15445 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15446 correct producer for the insn.
15447 (tidy_control_flow): Fixup seqnos in case of debug insns.
15448
15449 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15450
15451 PR rtl-optimization/83913
15452
15453 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15454 different sched-times when merging exprs.
15455
15456 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15457
15458 PR rtl-optimization/83962
15459
15460 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15461 tidy_fallthru_edge and tidy_control_flow.
15462
15463 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15464
15465 PR rtl-optimization/83530
15466
15467 * sel-sched.c (force_next_insn): New global variable.
15468 (remove_insn_for_debug): When force_next_insn is true, also leave only
15469 next insn in the ready list.
15470 (sel_sched_region): When the region wasn't scheduled, make another pass
15471 over it with force_next_insn set to 1.
15472
15473 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15474
15475 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15476 into tm_file.
15477 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15478 for interrupt control.
15479 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15480 functions for interrupt control.
15481 * config/nds32/nds32-intrinsic.md: Likewise.
15482 * config/nds32/nds32_intrinsic.h: Likewise.
15483 * config/nds32/nds32.h (nds32_builtins): Likewise.
15484
15485 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15486
15487 * config/nds32/nds32.c (nds32_init_machine_status,
15488 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15489 strict_aligned_p field.
15490 (nds32_expand_to_rtl_hook): New function.
15491 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15492 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15493
15494 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15495 Chung-Ju Wu <jasonwucj@gmail.com>
15496
15497 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15498 * config/nds32/nds32-n7.md: New file.
15499 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15500 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15501 pipeline.
15502 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15503 * config/nds32/nds32.md (pipeline_model): Add n7.
15504 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15505 * config/nds32/pipelines.md: Include n7 settings.
15506
15507 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15508 Chung-Ju Wu <jasonwucj@gmail.com>
15509
15510 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15511 * config/nds32/nds32-e8.md: New file.
15512 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15513 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15514 pipeline.
15515 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15516 * config/nds32/nds32.md (pipeline_model): Add e8.
15517 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15518 * config/nds32/pipelines.md: Include e8 settings.
15519
15520 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15521 Chung-Ju Wu <jasonwucj@gmail.com>
15522
15523 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15524 * config/nds32/nds32-n8.md: New file.
15525 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15526 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15527 pipeline.
15528 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15529 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15530 * config/nds32/nds32.md (pipeline_model): Add n8.
15531 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15532 * config/nds32/pipelines.md: Include n8 settings.
15533
15534 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15535 Chung-Ju Wu <jasonwucj@gmail.com>
15536
15537 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15538 * config/nds32/nds32-n9-2r1w.md: New file.
15539 * config/nds32/nds32-n9-3r2w.md: New file.
15540 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15541 nds32_register_ports): New or modify for cpu n9.
15542 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15543 pipeline.
15544 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15545 * config/nds32/nds32-utils.c: New file.
15546 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15547 TARGET_MUL_SLOW): Define.
15548 * config/nds32/nds32.md (pipeline_model): New attribute.
15549 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15550 New options that support cpu n9.
15551 * config/nds32/pipelines.md: Include n9 settings.
15552 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15553
15554 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15555
15556 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15557 information if necessary.
15558 (output_cond_branch_compare_zero): Likewise.
15559 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15560 (nds32_target_alignment): Refine for alignment.
15561 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15562 (FUNCTION_BOUNDARY): Modify.
15563 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15564 align case.
15565 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15566
15567 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15568
15569 * config/nds32/constants.md (unspec_volatile_element): Add values for
15570 TLB operation and data prefetch.
15571 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15572 functions for TLB operation and data prefetch.
15573 * config/nds32/nds32-intrinsic.md: Likewise.
15574 * config/nds32/nds32_intrinsic.h: Likewise.
15575 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15576 (nds32_print_operand): Likewise.
15577 * config/nds32/nds32.h (nds32_builtins): Likewise.
15578
15579 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15580 Andrew Pinski <pinsika@gcc.gnu.org>
15581
15582 PR middle-end/82976
15583 * match.pd: Use constant_boolean_node of correct type instead of
15584 boolean_true_node or boolean_false_node for simplifying
15585 pointer comparisons to zero.
15586
15587 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15588
15589 PR tree-optimization/80021
15590 * tree.c (verify_type_variant): Make error call in verify_variant_match
15591 translatable and remove final full stop.
15592
15593 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15594
15595 * config/nds32/constants.md (unspec_volatile_element): Add
15596 UNSPEC_VOLATILE_EH_RETURN.
15597 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15598 nds32_output_stack_pop): Support dwarf exception handling process.
15599 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15600 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15601 exception handling process.
15602 (nds32_compute_stack_frame): Likewise.
15603 (nds32_return_addr_rtx): Likewise.
15604 (nds32_initial_elimination_offset): Likewise.
15605 (nds32_expand_prologue): Likewise.
15606 (nds32_expand_epilogue): Likewise.
15607 (nds32_dynamic_chain_address): New function.
15608 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15609 exception handling.
15610 (DYNAMIC_CHAIN_ADDRESS): Define.
15611 (EH_RETURN_DATA_REGNO): Define.
15612 (EH_RETURN_STACKADJ_RTX): Define.
15613 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15614 patterns for dwarf exception handling.
15615
15616 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15617
15618 * config/nds32/nds32.h: Clean up obsolete macros.
15619
15620 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15621
15622 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15623 Add enum values for particular instructions.
15624 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15625 particular intrinsic functions.
15626 * config/nds32/nds32-intrinsic.md: Likewise.
15627 * config/nds32/nds32_intrinsic.h: Likewise.
15628 * config/nds32/nds32.h (nds32_builtins): Likewise.
15629 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15630 (btst, ave): New patterns for particular instructions.
15631
15632 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15633
15634 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15635 Add enum values for atomic load/store and memory sync.
15636 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15637 and memory sync.
15638 * config/nds32/nds32-intrinsic.md: Likewise.
15639 * config/nds32/nds32_intrinsic.h: Likewise.
15640 * config/nds32/nds32.h (nds32_builtins): Likewise.
15641
15642 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15643
15644 PR tree-optimization/85257
15645 * fold-const.c (native_encode_vector): If not all elts could fit
15646 and off is -1, return 0 rather than offset.
15647 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15648 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15649 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15650 adjust buffer in native_interpret_expr call.
15651
15652 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15653
15654 * config/nds32/constants.md (unspec_volatile_element): Add cache
15655 control enum values.
15656 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15657 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15658 * config/nds32/nds32.c (nds32_cctl_names): New.
15659 (nds32_print_operand): Handle cache control register names.
15660 * config/nds32/nds32.h (nds32_builtins): New enum values.
15661 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15662 macros.
15663 * config/nds32/nds32.md (type): Add mmu.
15664 * config/nds32/pipelines.md (simple_insn): Add mmu.
15665
15666 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15667
15668 * config/nds32/nds32.md (type): Remove call.
15669 * config/nds32/pipelines.md (simple_insn): Likewise.
15670
15671 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15672
15673 * config/nds32/constants.md (unspec_volatile_element): Add
15674 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15675 UNSPEC_VOLATILE_FMFCFG.
15676 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15677 description for fmfcfg and fmfcsr.
15678 (bdesc_1arg): Add fmtcsr.
15679 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15680 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15681 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15682 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15683 unspec_fmfcfg): New patterns.
15684 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15685 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15686 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15687 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15688 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15689 __nds32__fmfcfg): Define.
15690
15691 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15692
15693 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15694 intrinsic register names.
15695 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15696 intrinsic register enum values and macros.
15697
15698 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15699
15700 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15701 for load/store addressing form.
15702 (nds32_print_operand_address): Likewise.
15703
15704 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15705
15706 PR target/85196
15707 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15708 based on LABEL_REF. Remove useless assertion.
15709 (pic_address_needs_scratch): Fix formatting.
15710 (sparc_legitimize_pic_address): Minor tweaks.
15711 (sparc_delegitimize_address): Adjust assertion accordingly.
15712 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15713 into symbolic_operand.
15714 (movsi_high_pic_label_ref): Likewise.
15715 (movsi_lo_sum_pic_label_ref): Likewise.
15716 (movdi_pic_label_ref): Likewise.
15717 (movdi_high_pic_label_ref): Likewise.
15718 (movdi_lo_sum_pic_label_ref): Likewise.
15719
15720 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15721
15722 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15723 custom LIB_SPEC setup.
15724
15725 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15726 Kito Cheng <kito.cheng@gmail.com>
15727
15728 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15729 * config/riscv/freebsd.h: New.
15730
15731 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15732
15733 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15734 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15735 file.
15736
15737 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15738 Kito Cheng <kito.cheng@gmail.com>
15739
15740 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15741 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15742 * config/nds32/nds32-protos.h (nds32_output_call,
15743 nds32_output_return): Declare.
15744 * config/nds32/nds32.md: Refine all the call and return patterns.
15745
15746 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15747
15748 PR debug/85252
15749 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15750 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15751
15752 PR rtl-optimization/84872
15753 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15754 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15755 EDGE_CROSSING edge.
15756
15757 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15758
15759 * expr.c (copy_blkmode_to_reg): Revert 254862.
15760 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15761
15762 2018-04-06 Richard Biener <rguenther@suse.de>
15763
15764 PR middle-end/85244
15765 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15766 after seeing a component reference with an adjacent field. Treat
15767 refs to arrays at struct end of external decls similar to
15768 refs to unconstrained commons.
15769
15770 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15771
15772 PR sanitizer/85213
15773 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15774 look through SAVE_EXPRs with non-side-effects argument. Adjust
15775 recursive calls.
15776 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15777 save_p here.
15778
15779 2018-04-06 Richard Biener <rguenther@suse.de>
15780
15781 PR middle-end/85180
15782 * alias.c (find_base_term): New wrapper around find_base_term
15783 unwinding CSELIB_VAL_PTR changes.
15784 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15785 recursion.
15786
15787 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15788
15789 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15790 instructions.
15791 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15792 constant definitions.
15793 ("nop"): lr 0,0 -> nopr r0
15794 ("nop_lr0", "nop_lr1"): New insn definitions.
15795
15796 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15797
15798 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15799 NDS32_V3PUSH_AVAILABLE_P macro.
15800
15801 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15802 Chung-Ju Wu <jasonwucj@gmail.com>
15803
15804 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15805 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15806 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15807 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15808 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15809 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15810 * config/nds32/constraints.md: New constraints and checking for hard
15811 float configuration.
15812 * config/nds32/iterators.md: New mode iterator and attribute for hard
15813 float configuration.
15814 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15815 patterns.
15816 * config/nds32/nds32-fpu.md: New file.
15817 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15818 deal with hard float code generation.
15819 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15820 ARCH_V3S.
15821 (abi_type, float_reg_number): New enum type.
15822 * config/nds32/nds32-predicates.c: New predicates for hard float.
15823 * config/nds32/nds32-protos.h: Declare functions for hard float.
15824 * config/nds32/nds32.c: Implementation for hard float configuration.
15825 * config/nds32/nds32.h: Definitions for hard float configuration.
15826 * config/nds32/nds32.md: Include hard float machine description and
15827 modify patterns for hard float configuration.
15828 * config/nds32/nds32.opt: New options for hard float configuration.
15829 * config/nds32/predicates.md: New predicates for hard float
15830 configuration.
15831
15832 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15833
15834 * common/config/nds32/nds32-common.c
15835 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15836
15837 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15838
15839 PR middle-end/85195
15840 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15841 CONSTRUCTOR_ELT (ctor, ...)->value.
15842
15843 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15844
15845 PR target/85193
15846 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15847
15848 2018-04-05 Tom de Vries <tom@codesourcery.com>
15849
15850 PR target/85204
15851 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15852 cond jump.
15853
15854 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15855 Kito Cheng <kito.cheng@gmail.com>
15856
15857 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15858 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15859 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15860 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15861
15862 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15863 Kito Cheng <kito.cheng@gmail.com>
15864
15865 * config/nds32/constraints.md (Ufe): New memory constraint.
15866 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15867 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15868 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15869 operands.
15870 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15871 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15872
15873 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15874
15875 * config/nds32/nds32.md: Use optimize_size in the condition for
15876 alu-shift instructions.
15877
15878 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15879
15880 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15881
15882 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15883
15884 * config/nds32/nds32.md (negsi2): Refine pattern.
15885
15886 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15887 Chung-Ju Wu <jasonwucj@gmail.com>
15888
15889 * config/nds32/iterators.md (shift_rotate): New code iterator.
15890 (shift): New code attribute.
15891 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15892 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15893 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15894 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15895 bit-wise operations.
15896 (andsi3, *andsi3): Ditto.
15897 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15898 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15899 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15900 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15901 nds32_ior_operand, nds32_xor_operand): New predicates.
15902
15903 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15904
15905 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15906 (addsi3, subsi3): ... this.
15907
15908 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15909
15910 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15911
15912 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15913
15914 * config/nds32/nds32.md: Adjust indention.
15915
15916 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15917
15918 * config/nds32/nds32.md (feature): New attribute.
15919
15920 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15921
15922 * config/nds32/nds32.md (subtype): New attribute.
15923
15924 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15925
15926 PR target/85203
15927 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15928 expansion to perform a bitwise AND of the argument followed by a
15929 boolean negation of the result.
15930
15931 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15932
15933 PR rtl-optimization/84878
15934 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15935 the basic block. Assert the use reference is not artificial and that
15936 it has an associated insn.
15937
15938 2018-04-04 Michael Matz <matz@suse.de>
15939
15940 * builtins.c (compute_objsize): Pass correct operand
15941 to array_at_struct_end_p.
15942
15943 2018-04-04 Richard Biener <rguenther@suse.de>
15944
15945 PR lto/85176
15946 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15947 from contexts for DINFO_LEVEL_TERSE and below.
15948
15949 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15950
15951 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15952 resiter_operand condition.
15953 * config/nds32/nds32.md (*move<mode>): Ditto.
15954
15955 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15956 Monk Chiang <sh.chiang04@gmail.com>
15957
15958 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15959
15960 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15961
15962 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15963
15964 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15965 Kito Cheng <kito.cheng@gmail.com>
15966
15967 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15968 nds32_cond_code_str, output_cond_branch,
15969 output_cond_branch_compare_zero, nds32_expand_cbranch,
15970 nds32_expand_cstore, nds32_expand_movcc,
15971 nds32_output_cbranchsi4_equality_zero,
15972 nds32_output_cbranchsi4_equality_reg,
15973 nds32_output_cbranchsi4_equality_reg_or_const_int,
15974 nds32_output_cbranchsi4_greater_less_zero: New functions.
15975 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15976 nds32_expand_cstore, nds32_expand_movcc,
15977 nds32_output_cbranchsi4_equality_zero,
15978 nds32_output_cbranchsi4_equality_reg,
15979 nds32_output_cbranchsi4_equality_reg_or_const_int,
15980 nds32_output_cbranchsi4_greater_less_zero): Declare.
15981 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15982 nds32_rimm11s_operand): New predicates.
15983 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15984 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15985 patterns.
15986
15987 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15988
15989 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15990 * config/nds32/nds32.md: Ditto.
15991 * config/nds32/pipelines.md: Ditto.
15992
15993 2018-04-04 Richard Biener <rguenther@suse.de>
15994
15995 PR tree-optimization/85168
15996 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15997 propagating abnormals.
15998
15999 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16000
16001 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
16002
16003 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
16004 Kito Cheng <kito.cheng@gmail.com>
16005
16006 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
16007 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
16008 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
16009 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
16010 * config/nds32/nds32.md (sibcall_internal): New.
16011 (sibcall_register): Remove.
16012 (sibcall_immediate): Remove.
16013 (sibcall_value_internal): New.
16014 (sibcall_value_register): Remove.
16015 (sibcall_value_immediate): Remove.
16016 * config/nds32/predicates.md (nds32_general_register_operand): New.
16017 (nds32_call_address_operand): New.
16018
16019 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16020
16021 PR rtl-optimization/85167
16022 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
16023 bb_defs if *split_p, instead preinitialize it to NULL.
16024
16025 PR tree-optimization/85156
16026 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
16027 evaluating the argument multiple times.
16028
16029 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
16030
16031 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
16032 than vector.
16033 (_mm_cvtpd_ps): Likewise.
16034 (_mm_cvttpd_epi32): Likewise.
16035 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
16036 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
16037 vector, pixel, and bool following altivec.h include.
16038
16039 2018-04-03 Martin Sebor <msebor@redhat.com>
16040
16041 * doc/extend.texi (Common Function Attributes): Clarify.
16042 (const attribute): Likewise.
16043 (pure attribute): Likewise.
16044
16045 2018-04-03 Jakub Jelinek <jakub@redhat.com>
16046
16047 PR target/85169
16048 * config/i386/i386.c (ix86_expand_vector_set): Use
16049 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
16050
16051 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
16052
16053 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
16054 instructions when changing rounding bits to preserve precision bits
16055 in the x87 control word.
16056
16057 2018-04-03 Martin Liska <mliska@suse.cz>
16058
16059 PR tree-optimization/82491
16060 * rtl.h (strip_offset_and_add): Replace += suboffset with
16061 poly_uint64 () + suboffset.
16062
16063 2018-03-29 Martin Liska <mliska@suse.cz>
16064 Martin Jambor <mjambor@suse.cz>
16065
16066 PR ipa/84947
16067 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
16068 param_type is not an integral or pointer type.
16069
16070 2018-04-03 Richard Biener <rguenther@suse.de>
16071
16072 * sese.h (recompute_all_dominators): Remove.
16073
16074 2018-04-02 Martin Sebor <msebor@redhat.com>
16075
16076 * doc/invoke.texi (-Wrestrict): Fix typos.
16077
16078 2018-04-02 Jim Wilson <jimw@sifive.com>
16079
16080 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
16081 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
16082 (<optab>di3, <optab>si3_extend): Likewise.
16083 (<optab>si3_mask, <optab>si3_mask_1): New.
16084 (<optab>di3_mask, <optab>di3_mask_1): New.
16085 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
16086 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
16087 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
16088
16089 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
16090
16091 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
16092 example.
16093
16094 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
16095
16096 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
16097 (nds32_canonicalize_comparison): New function.
16098
16099 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16100 Kito Cheng <kito.cheng@gmail.com>
16101 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16102
16103 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
16104 * config/nds32/constants.md (unspec_volatile_element): Add
16105 UNSPEC_VOLATILE_RELAX_GROUP.
16106 * config/nds32/nds32-relax-opt.c: New file.
16107 * config/nds32/nds32-predicates.c
16108 (nds32_symbol_load_store_p): New function.
16109 * config/nds32/nds32-protos.h
16110 (nds32_symbol_load_store_p): Declare function.
16111 (make_pass_nds32_relax_opt): Declare new rtl pass function.
16112 * config/nds32/nds32.c
16113 (nds32_register_pass): New function to register pass.
16114 (nds32_register_passes): New function to register passes.
16115 * config/nds32/nds32.md (relax_group): New pattern.
16116 * config/nds32/nds32.opt (mrelax-hint): New option.
16117 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
16118
16119 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
16120
16121 * config/nds32/t-nds32: Modify files dependency.
16122
16123 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16124
16125 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
16126 (PROFILE_HOOK): Define its implementation.
16127
16128 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
16129
16130 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
16131 type and 32-bit size.
16132
16133 2018-04-01 Jakub Jelinek <jakub@redhat.com>
16134
16135 PR middle-end/85090
16136 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
16137 (V_128_256): New mode iterator.
16138 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
16139 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
16140 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
16141 of V.
16142 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
16143 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
16144
16145 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
16146
16147 PR target/83315
16148 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
16149 NaN inputs correctly.
16150
16151 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
16152
16153 PR target/80546
16154 * config/rs6000/vsx.md (??r): New mode attribute.
16155 (*vsx_mov<mode>_64bit): Use it.
16156 (*vsx_mov<mode>_32bit): Likewise.
16157
16158 2018-03-30 Martin Sebor <msebor@redhat.com>
16159
16160 PR tree-optimization/84818
16161 * builtins.c (check_access): Use warning_n.
16162
16163 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16164
16165 PR target/83822
16166 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
16167 condition.
16168 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
16169 condition.
16170
16171 2018-03-30 Julia Koval <julia.koval@intel.com>
16172
16173 PR target/84413
16174 * x86-tune.def (movx, partial_reg_dependency): Enable for
16175 m_SKYLAKE_AVX512.
16176
16177 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
16178
16179 PR inline-asm/84985
16180 * lra-constraints.c (process_alt_operands): Move setting
16181 this_alternative_matches below.
16182
16183 2018-03-29 Martin Liska <mliska@suse.cz>
16184
16185 PR lto/84995.
16186 * doc/invoke.texi: Document how LTO works with debug info.
16187 Describe auto-load support of binutils. Mention 'x86-64'
16188 as valid option value of -march option.
16189
16190 2018-03-29 Jakub Jelinek <jakub@redhat.com>
16191
16192 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
16193
16194 PR c/85094
16195 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
16196 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
16197 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
16198 checking.
16199
16200 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16201
16202 PR target/84912
16203 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16204 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16205 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16206 for RS6000_BTM_POWERPC64.
16207 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16208 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16209 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16210 definition.
16211 (DIVDE): Use it.
16212 (DIVDEU): Likewise.
16213
16214 2018-03-28 Carl Love <cel@us.ibm.com>
16215
16216 Revert
16217 2017-09-27 Carl Love <cel@us.ibm.com>
16218
16219 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16220 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16221 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16222 fctiw instruction.
16223
16224 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16225
16226 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16227 instead of __vector bool.
16228 (_mm_max_pu8): Likewise.
16229 (_mm_min_pi16): Likewise.
16230
16231 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16232
16233 PR target/84912
16234 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16235 (DIVWEUO): Likewise.
16236 (DIVDEO): Likewise.
16237 (DIVDEUO): Likewise.
16238 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16239 DIVWEUO and DIVDEUO.
16240 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16241 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16242 (div_extend): Likewise.
16243 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16244 builtin function.
16245 (__builtin_divweuo): Likewise.
16246 (__builtin_divdeo): Likewise.
16247 (__builtin_divdeuo): Likewise.
16248
16249 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16250
16251 PR target/85095
16252 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16253 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16254
16255 PR tree-optimization/82004
16256 * gimple-match-head.c (optimize_pow_to_exp): New function.
16257 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16258 Don't fold to exp if optimize_pow_to_exp is false.
16259
16260 2018-03-28 Martin Liska <mliska@suse.cz>
16261
16262 PR other/84819
16263 * calls.c (initialize_argument_information): Fix trailing space.
16264 * common.opt: Fix typo and provide better explanation for
16265 -fsanitize-coverage option.
16266 * config/i386/i386.opt: Fix typo.
16267
16268 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16269 Martin Liska <mliska@suse.cz>
16270
16271 PR sanitizer/85081
16272 * gimplify.c (asan_poison_variable): Don't do the check for
16273 gimplify_omp_ctxp here.
16274 (gimplify_decl_expr): Do it here.
16275 (gimplify_target_expr): Likewise.
16276
16277 2018-03-28 Martin Liska <mliska@suse.cz>
16278
16279 PR target/84988
16280 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16281 chkp_type_bounds_count if MPX is not enabled.
16282
16283 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16284
16285 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16286
16287 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16288
16289 PR target/84914
16290 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16291 function to create the function decl for complex long double
16292 multiply and divide for -mabi=ieeelongdouble.
16293 (init_float128_ieee): Call it.
16294
16295 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16296
16297 PR target/85044
16298 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16299 -fcf-protection=branch -mibt.
16300 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16301
16302 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16303
16304 PR target/81863
16305 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16306 arm_word_relocations.
16307
16308 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16309
16310 PR target/85056
16311 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16312 extern array declarations.
16313
16314 2018-03-27 Richard Biener <rguenther@suse.de>
16315
16316 PR middle-end/84067
16317 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16318 explicit single_use checks.
16319
16320 2018-03-27 Richard Biener <rguenther@suse.de>
16321
16322 PR tree-optimization/85082
16323 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16324 Valueize the VUSE.
16325
16326 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16327
16328 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16329 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16330 Turn on fasynchronous-unwind-tables and funwind-tables.
16331
16332 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16333
16334 PR target/85073
16335 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16336 (*bmi_blsr_<mode>_ccz): Ditto.
16337
16338 2018-03-26 Tom de Vries <tom@codesourcery.com>
16339
16340 PR tree-optimization/85063
16341 * omp-general.c (offloading_function_p): New function. Factor out
16342 of ...
16343 * omp-offload.c (pass_omp_target_link::gate): ... here.
16344 * omp-general.h (offloading_function_p): Declare.
16345 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16346 with attribute omp declare target for offloading functions.
16347
16348 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16349
16350 PR tree-optimization/84005
16351 * tree-data-ref.h (get_base_for_alignment): Declare.
16352 * tree-data-ref.c (get_base_for_alignment_1): New function.
16353 (get_base_for_alignment): Likewise.
16354 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16355 get_base_for_alignment to find a suitable base object, instead
16356 of always using drb->base_address.
16357
16358 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16359
16360 PR inline-asm/85022
16361 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16362 known size by default.
16363
16364 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16365
16366 PR inline-asm/85030
16367 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16368 and non BLKmode operands.
16369
16370 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16371
16372 PR target/85026
16373 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16374 Clean up attributes.
16375
16376 2018-03-23 Richard Biener <rguenther@suse.de>
16377
16378 PR debug/85020
16379 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16380 we are going to emit early debug for LTO.
16381
16382 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16383
16384 PR inline-asm/85034
16385 * function.c (match_asm_constraints_1): Don't optimize if input
16386 doesn't satisfy general_operand predicate for output's mode.
16387
16388 PR inline-asm/85022
16389 * alias.c (write_dependence_p): Don't require for x_canonicalized
16390 non-VOIDmode if x has VOIDmode.
16391
16392 PR sanitizer/85029
16393 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16394 just don't try to optimize it rather than assert it never happens.
16395
16396 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16397
16398 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16399 macro expansions for definition of ST_INTERNAL_<mode> and
16400 LD_INTERNAL_<mode> builtins.
16401 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16402 Remove prototype.
16403 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16404 function.
16405 (altivec_expand_st_builtin): Likewise.
16406 (altivec_expand_builtin): Remove calls to deleted functions.
16407 (rs6000_address_for_altivec): Delete this function.
16408 * config/rs6000/vector.md: Remove expands for
16409 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16410
16411 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16412
16413 PR target/84826
16414 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16415 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16416 re-computing once computed.
16417 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16418 (arm_init_machine_status): Initialize
16419 machine->static_chain_stack_bytes.
16420
16421 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16422
16423 PR target/84760
16424 * doc/extend.texi: Add four new prototypes for vec_ld.
16425 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16426 definitions for more logical presentation.
16427 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16428 entries for V1TI variants of __builtin_altivec_ld builtin.
16429 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16430 handling of V1TI variant of LVX icode pattern.
16431 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16432 (rs6000_gimple_fold_builtin): Likewise.
16433 (altivec_init_builtins): Add code to define
16434 __builtin_altivec_lvx_v1ti function.
16435
16436 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16437
16438 PR inline-asm/84941
16439 * function.c (match_asm_constraints_1): Don't do the optimization
16440 if input isn't a REG, SUBREG, MEM or constant.
16441
16442 2018-03-22 Tom de Vries <tom@codesourcery.com>
16443
16444 PR tree-optimization/84956
16445 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16446 bb_has_abnormal_pred.
16447
16448 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16449
16450 PR sanitizer/85018
16451 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16452 DECL_INITIAL (decl) to decl at the end.
16453 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16454 adjust the comment.
16455
16456 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16457
16458 * doc/extend.texi (__builtin_tgmath): Document when complex
16459 integer types are treated as _Complex _Float64.
16460
16461 2018-03-21 Tom de Vries <tom@codesourcery.com>
16462
16463 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16464
16465 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16466
16467 PR tree-optimization/84960
16468 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16469 if it is ENTRY block, move them into single succ of ENTRY in that case.
16470
16471 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16472
16473 PR tree-optimization/84811
16474 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16475 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16476 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16477 (known_subrange_p): Update accordingly. Cast each value involved
16478 in the size comparison, rather than casting the result of the
16479 subtraction.
16480
16481 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16482
16483 PR tree-optimization/84982
16484 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16485 by flipping the least significant bit rather than all bits from
16486 bitpos to bitpos + bitsize - 1.
16487
16488 2018-03-21 Nathan Sidwell <nathan@acm.org>
16489
16490 * doc/extend.texi (Deprecated Features): Remove mention of
16491 long-deleted deprecations.
16492
16493 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16494
16495 PR jit/84288
16496 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16497 * configure: Regenerate.
16498
16499 2018-03-21 Tom de Vries <tom@codesourcery.com>
16500
16501 PR tree-optimization/83126
16502 * tree-parloops.c (num_phis): New function.
16503 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16504
16505 2018-03-21 Nathan Sidwell <nathan@acm.org>
16506
16507 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16508 mention anon-struct/union members and trailing attributes.
16509
16510 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16511
16512 PR tree-optimization/84969
16513 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16514 builtin memset partitions if they set different rhs values.
16515
16516 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16517
16518 PR rtl-optimization/84989
16519 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16520 VEC_DUPLICATE with scalar result mode.
16521
16522 2018-03-21 Martin Liska <mliska@suse.cz>
16523
16524 PR ipa/84963
16525 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16526 not intended return statement.
16527
16528 2018-03-21 Martin Liska <mliska@suse.cz>
16529
16530 PR target/84988
16531 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16532 (chkp_find_bound_slots_1): Limit number of iterations.
16533
16534 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16535
16536 PR target/84838
16537 * Minor grammar fixes for x86 options.
16538
16539 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16540
16541 PR debug/84875
16542 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16543 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16544
16545 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16546
16547 PR target/83789
16548 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16549 (altivec_lvx_<mode>_1op): Likewise.
16550 (altivec_stvx_<mode>_2op): Likewise.
16551 (altivec_stvx_<mode>_1op): Likewise.
16552 (altivec_lvx_<VM2:mode>): New define_expand.
16553 (altivec_stvx_<VM2:mode>): Likewise.
16554 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16555 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16556 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16557 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16558 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16559 (rs6000_gen_lvx): Likewise.
16560 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16561 (altivec_expand_stv_builtin): Likewise.
16562 (altivec_expand_builtin): Likewise.
16563 * config/rs6000/vector.md: Likewise.
16564
16565 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16566
16567 PR target/82518
16568 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16569 BYTES_BIG_ENDIAN.
16570
16571 2018-03-20 Richard Biener <rguenther@suse.de>
16572
16573 PR target/84986
16574 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16575 sign-conversions as zero, fall back to standard scalar_stmt
16576 cost for the rest.
16577
16578 2018-03-20 Martin Liska <mliska@suse.cz>
16579
16580 PR ipa/84825
16581 * predict.c (rebuild_frequencies): Handle case when we have
16582 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16583
16584 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16585
16586 PR target/84990
16587 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16588 flag_section_anchors.
16589 * varasm.c (use_blocks_for_decl_p): Remove hack for
16590 dw2_force_const_mem.
16591
16592 PR target/84845
16593 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16594 to ...
16595 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16596 be created, use lowpart_subreg of operands[0] rather than operands[0]
16597 itself.
16598 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16599 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16600 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16601 and n constraint instead of aarch64_shift_imm_di and Usd.
16602 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16603 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16604
16605 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16606
16607 PR target/82989
16608 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16609 to favor GPR over NEON registers.
16610 (<shift>di3_neon): Likewise.
16611
16612 2018-03-20 Tom de Vries <tom@codesourcery.com>
16613
16614 PR target/84952
16615 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16616 (nvptx_process_pars): Emit bar.sync asap and alap.
16617
16618 2018-03-20 Tom de Vries <tom@codesourcery.com>
16619
16620 PR target/84954
16621 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16622 seen_label if seen_label is already set.
16623
16624 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16625
16626 PR target/84945
16627 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16628 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16629 Use 1U instead of 1. Formatting fixes.
16630
16631 PR c/84953
16632 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16633 instead of TREE_TYPE (s1) for the return value.
16634
16635 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16636
16637 PR tree-optimization/84946
16638 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16639 bitsize + bitsize in poly_uint64 rather than poly_int64.
16640
16641 PR sanitizer/78651
16642 * dwarf2asm.c: Include fold-const.c.
16643 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16644 of decl rather than decl itself.
16645
16646 PR rtl-optimization/84643
16647 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16648
16649 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16650
16651 PR sanitizer/78651
16652 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16653 calling assemble_variable.
16654
16655 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16656
16657 PR target/81647
16658 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16659 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16660
16661 2018-03-19 Jim Wilson <jimw@sifive.com>
16662
16663 PR bootstrap/84856
16664 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16665 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16666 (riscv_first_stack_step): Likewise.
16667 (riscv_option_override): Use STACK_BOUNDARY instead of
16668 MIN_STACK_BOUNDARY.
16669 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16670 MIN_STACK_BOUNDARY.
16671 (BIGGEST_ALIGNMENT): Set to 128.
16672 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16673 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16674 STACK_BOUNDARY.
16675
16676 2018-03-19 Richard Biener <rguenther@suse.de>
16677
16678 PR tree-optimization/84933
16679 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16680 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16681
16682 2018-03-19 Richard Biener <rguenther@suse.de>
16683
16684 PR tree-optimization/84859
16685 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16686 (cond_if_else_store_replacement): Perform sinking operation on
16687 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16688 Generalize what a BB with a single eligible store is.
16689
16690 2018-03-19 Richard Biener <rguenther@suse.de>
16691
16692 PR tree-optimization/84929
16693 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16694 chrec_is_positive against non-chrec arg.
16695
16696 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16697
16698 PR target/84711
16699 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16700
16701 2018-03-18 Martin Liska <mliska@suse.cz>
16702
16703 PR rtl-optimization/84635
16704 * regrename.c (build_def_use): Use matches_mode only when
16705 matches >= 0.
16706
16707 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16708
16709 PR tree-optimization/84913
16710 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16711 vectorize chains of COND_EXPRs.
16712
16713 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16714
16715 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16716
16717 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16718
16719 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16720
16721 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16722
16723 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16724
16725 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16726 Kito Cheng <kito.cheng@gmail.com>
16727
16728 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16729 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16730 (nds32_adjust_reg_alloc_order): New function.
16731 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16732
16733 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16734
16735 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16736 nds32_print_operand, nds32_print_operand_address): Use
16737 HOST_WIDE_INT_PRINT_DEC instead.
16738
16739 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16740
16741 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16742
16743 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16744
16745 PR target/84902
16746 * config/i386/i386.c (initial_ix86_tune_features,
16747 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16748 unsigned long long.
16749 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16750 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16751 rather than 1u << ix86_tune. Formatting fix.
16752 (ix86_option_override_internal): Change ix86_arch_mask from
16753 unsigned int to unsigned HOST_WIDE_INT, initialize to
16754 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16755 (ix86_function_specific_restore): Likewise.
16756
16757 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16758
16759 PR target/84899
16760 * postreload.c (reload_combine_recognize_pattern): Perform
16761 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16762 truncate_int_for_mode the result for the destination's mode.
16763
16764 PR c/84909
16765 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16766 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16767 Likewise.
16768 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16769 Likewise.
16770
16771 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16772
16773 PR target/84876
16774 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16775 regno_allocno_class_array and sorted_pseudos.
16776 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16777 insns where regno is used.
16778
16779 2018-03-16 Martin Liska <mliska@suse.cz>
16780
16781 PR ipa/84833
16782 * multiple_target.c (create_dispatcher_calls): Redirect
16783 reference in the symbol table.
16784
16785 2018-03-16 Martin Liska <mliska@suse.cz>
16786
16787 PR ipa/84722
16788 * multiple_target.c (create_dispatcher_calls): Redirect also
16789 an alias.
16790
16791 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16792
16793 PR c++/79937
16794 PR c++/82410
16795 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16796 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16797 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16798
16799 2018-03-16 Julia Koval <julia.koval@intel.com>
16800
16801 * doc/invoke.texi (Skylake Server): Add CLWB.
16802 Cannonlake): Remove CLWB.
16803
16804 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16805
16806 PR tree-optimization/84841
16807 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16808 1 << 3.
16809 (FLOAT_ONE_CONST_TYPE): Define.
16810 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16811 (sort_by_operand_rank): Put entries with higher constant_type last
16812 rather than first to match comments.
16813
16814 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16815
16816 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16817 split predicate.
16818
16819 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16820
16821 PR c++/79085
16822 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16823 check and use address of target always.
16824
16825 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16826
16827 PR target/84574
16828 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16829 (indirect_thunk_bnd_needed): Likewise.
16830 (indirect_thunks_used): Likewise.
16831 (indirect_thunks_bnd_used): Likewise.
16832 (indirect_return_needed): New.
16833 (indirect_return_bnd_needed): Likewise.
16834 (output_indirect_thunk_function): Add a bool argument for
16835 function return.
16836 (output_indirect_thunk_function): Don't generate alias for
16837 function return thunk.
16838 (ix86_code_end): Call output_indirect_thunk_function to generate
16839 function return thunks.
16840 (ix86_output_function_return): Set indirect_return_bnd_needed
16841 and indirect_return_needed instead of indirect_thunk_bnd_needed
16842 and indirect_thunk_needed.
16843
16844 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16845
16846 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16847 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16848 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16849
16850 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16851 Paul Hua <paul.hua.gm@gmail.com>
16852
16853 PR c/84852
16854 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16855
16856 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16857
16858 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16859 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16860 resp. SFmode cases.
16861
16862 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16863
16864 PR target/84711
16865 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16866 instead of GET_MODE_SIZE when comparing Units.
16867
16868 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16869
16870 PR target/68256
16871 * varasm.c (hash_section): Return an unchangeble hash value
16872 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16873 Return !aarch64_can_use_per_function_literal_pools_p ().
16874
16875 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16876
16877 PR target/84860
16878 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16879 rather than address of cmode as last argument to prepare_cmp_insn.
16880
16881 2018-03-15 Julia Koval <julia.koval@intel.com>
16882
16883 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16884 F_AVX512VNNI, F_AVX512BITALG): New.
16885
16886 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16887
16888 PR target/83451
16889 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16890 insn for floating-point loads and stores.
16891
16892 2018-03-14 Carl Love <cel@us.ibm.com>
16893
16894 * config/rs6000/rs6000-c.c: Add macro definitions for
16895 ALTIVEC_BUILTIN_VEC_PERMXOR.
16896 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16897 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16898 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16899 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16900 UNSPEC_VPERMXOR.
16901 * config/doc/extend.texi: Add prototypes for vec_permxor.
16902
16903 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16904
16905 PR c/84852
16906 * diagnostic-show-locus.c (class layout_point): Convert m_line
16907 from int to linenum_type.
16908 (line_span::comparator): Use linenum "compare" function when
16909 comparing line numbers.
16910 (test_line_span): New function.
16911 (layout_range::contains_point): Convert param "row" from int to
16912 linenum_type.
16913 (layout_range::intersects_line_p): Likewise.
16914 (layout::will_show_line_p): Likewise.
16915 (layout::print_source_line): Likewise.
16916 (layout::should_print_annotation_line_p): Likewise.
16917 (layout::print_annotation_line): Likewise.
16918 (layout::print_leading_fixits): Likewise.
16919 (layout::annotation_line_showed_range_p): Likewise.
16920 (struct line_corrections): Likewise for field m_row.
16921 (line_corrections::line_corrections): Likewise for param "row".
16922 (layout::print_trailing_fixits): Likewise.
16923 (layout::get_state_at_point): Likewise.
16924 (layout::get_x_bound_for_row): Likewise.
16925 (layout::print_line): Likewise.
16926 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16927 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16928 * input.c (selftest::test_linenum_comparisons): New function.
16929 (selftest::input_c_tests): Call it.
16930 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16931 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16932 * selftest.h (ASSERT_GT): New macro.
16933 (ASSERT_GT_AT): New macro.
16934 (ASSERT_LT): New macro.
16935 (ASSERT_LT_AT): New macro.
16936
16937 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16938
16939 PR rtl-optimization/84780
16940 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16941
16942 2018-03-14 Martin Liska <mliska@suse.cz>
16943
16944 * tree.c (record_node_allocation_statistics): Use
16945 get_stats_node_kind.
16946 (get_stats_node_kind): New function extracted from
16947 record_node_allocation_statistics.
16948 (free_node): Use get_stats_node_kind.
16949
16950 2018-03-14 Richard Biener <rguenther@suse.de>
16951
16952 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16953 that the value-set of ANTIC_IN doesn't grow.
16954
16955 Revert
16956 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16957 member.
16958 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16959 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16960
16961 2018-03-14 Julia Koval <julia.koval@intel.com>
16962
16963 * config.gcc (icelake-client, icelake-server): New.
16964 (icelake): Remove.
16965 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16966 (initial_ix86_arch_features): Ditto.
16967 (PTA_SKYLAKE): Add SGX.
16968 (PTA_ICELAKE): Remove.
16969 (PTA_ICELAKE_CLIENT): New.
16970 (PTA_ICELAKE_SERVER): New.
16971 (ix86_option_override_internal): Split up icelake on icelake client and
16972 icelake server.
16973 (get_builtin_code_for_version): Ditto.
16974 (fold_builtin_cpu): Ditto.
16975 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16976 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16977 * config/i386/i386.h (processor_type): Ditto.
16978 * doc/invoke.texi: Ditto.
16979
16980 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16981
16982 PR sanitizer/83392
16983 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16984 INTEGER_CST offset, add it together with bitpos / 8 and
16985 sign extend based on POINTER_SIZE.
16986
16987 PR target/84844
16988 Revert
16989 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16990
16991 PR target/78090
16992 * config/i386/constraints.md (Yc): New register constraint.
16993 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16994 Use Yc constraint for alternative 2 of operand 0. Remove
16995 preferred_for_speed attribute.
16996
16997 2018-03-14 Richard Biener <rguenther@suse.de>
16998
16999 PR tree-optimization/84830
17000 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
17001 with the old one to avoid oscillations.
17002
17003 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
17004
17005 PR target/83712
17006 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
17007 pseudos.
17008 (assign_by_spills): Return a flag of reload assignment failure.
17009 Do not process the reload assignment failures. Do not spill other
17010 reload pseudos if they has the same reg class. Update n if
17011 necessary.
17012 (lra_assign): Add a return arg. Set up from the result of
17013 assign_by_spills call.
17014 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17015 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17016 usage_insns if it is not NULL.
17017 (spill_hard_reg_in_range): New function.
17018 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17019 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17020 function prototypes.
17021 (lra_assign): Change prototype.
17022 * lra.c (lra): Add code to deal with fails by splitting hard reg
17023 live ranges.
17024
17025 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
17026
17027 * config/riscv/riscv.opt (mrelax): New option.
17028 * config/riscv/riscv.c (riscv_file_start): Emit ".option
17029 "norelax" when riscv_mrelax is disabled.
17030 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
17031
17032 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17033
17034 PR target/84743
17035 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
17036 reassociation for int modes.
17037
17038 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17039
17040 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
17041 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
17042 for big-endian.
17043 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
17044 * config/aarch64/aarch64-sve.md
17045 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
17046 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
17047 (*extend<mode><Vwide>2): Rename to...
17048 (aarch64_sve_extend<mode><Vwide>2): ...this.
17049 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
17050 renaming the old pattern to...
17051 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
17052 unsigned packs.
17053 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
17054 define_expand, renaming the old pattern to...
17055 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
17056 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
17057 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
17058 account when deciding which SVE instruction the optab should use.
17059 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
17060
17061 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17062
17063 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
17064 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
17065 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
17066 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
17067 (tlsdesc_small_<mode>): Turn a define_expand and use
17068 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
17069 (tlsdesc_small_advsimd_<mode>): ...this.
17070 (tlsdesc_small_sve_<mode>): New pattern.
17071
17072 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
17073
17074 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
17075 (UNSPEC_UMUL_HIGHPART): New constants.
17076 (MUL_HIGHPART): New int iteraor.
17077 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
17078 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
17079 define_expand.
17080 (*<su>mul<mode>3_highpart): New define_insn.
17081
17082 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17083
17084 PR lto/84805
17085 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17086 incomplete types.
17087
17088 2018-03-13 Martin Liska <mliska@suse.cz>
17089
17090 PR ipa/84658.
17091 * (sem_item_optimizer::sem_item_optimizer): Initialize new
17092 vector.
17093 (sem_item_optimizer::~sem_item_optimizer): Release it.
17094 (sem_item_optimizer::merge_classes): Register variable aliases.
17095 (sem_item_optimizer::fixup_pt_set): New function.
17096 (sem_item_optimizer::fixup_points_to_sets): Likewise.
17097 * ipa-icf.h: Declare new variables and functions.
17098
17099 2018-03-13 Jakub Jelinek <jakub@redhat.com>
17100
17101 PR middle-end/84834
17102 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
17103 integer_pow2p@2 and test integer_pow2p in condition.
17104 (A < 0 ? C : 0): Similarly for @1.
17105
17106 PR middle-end/84831
17107 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
17108 characters starting at p contain '\0' character, don't look beyond
17109 that.
17110
17111 PR target/84827
17112 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
17113 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
17114
17115 PR target/84828
17116 * reg-stack.c (change_stack): Change update_end var from int to
17117 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
17118 also call set_block_for_insn on the newly added insns and rescan.
17119
17120 PR target/84786
17121 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
17122 on the last operand.
17123
17124 PR c++/84704
17125 * tree.c (stabilize_reference_1): Return save_expr (e) for
17126 STATEMENT_LIST even if it doesn't have side-effects.
17127
17128 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
17129
17130 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
17131
17132 2018-03-12 Renlin Li <renlin.li@arm.com>
17133
17134 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
17135 aarch64_output_scalar_simd_mov_immediate.
17136
17137 2018-03-12 Martin Sebor <msebor@redhat.com>
17138
17139 PR tree-optimization/83456
17140 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
17141 for perfectly overlapping calls to memcpy.
17142 (gimple_fold_builtin_memory_chk): Same.
17143 (gimple_fold_builtin_strcpy): Handle no-warning.
17144 (gimple_fold_builtin_stxcpy_chk): Same.
17145 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
17146
17147 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17148
17149 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
17150 parameter. Use it for SFmode.
17151 (rs6000_function_arg_advance_1): Adjust.
17152 (rs6000_function_arg): Adjust.
17153 (rs6000_gimplify_va_arg): Pass false for that new parameter.
17154
17155 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
17156
17157 PR rtl-optimization/84169
17158 PR rtl-optimization/84780
17159 * combine.c (can_combine_p): Check for a 2-insn combination whether
17160 the destination register is used between the two insns, too.
17161
17162 2018-03-12 Richard Biener <rguenther@suse.de>
17163
17164 PR tree-optimization/84803
17165 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
17166 for refs DR analysis didn't process.
17167
17168 2018-03-12 Richard Biener <rguenther@suse.de>
17169
17170 PR tree-optimization/84777
17171 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
17172 force-vectorize loops ignore whether we are optimizing for size.
17173
17174 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
17175
17176 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
17177 (TARGET_MD_ASM_ADJUST): Define.
17178
17179 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
17180 Kito Cheng <kito.cheng@gmail.com>
17181 Chung-Ju Wu <jasonwucj@gmail.com>
17182
17183 * config/nds32/nds32.c (nds32_compute_stack_frame,
17184 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
17185 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
17186 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
17187 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
17188 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
17189 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
17190 * config/nds32/nds32.md (prologue, epilogue): Use macro
17191 NDS32_V3PUSH_AVAILABLE_P to do checking.
17192
17193 2018-03-11 Jakub Jelinek <jakub@redhat.com>
17194
17195 PR debug/58150
17196 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
17197 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
17198 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
17199 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
17200 addition of most attributes on !orig_type_die or the attribute not
17201 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
17202
17203 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17204 Chung-Ju Wu <jasonwucj@gmail.com>
17205
17206 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17207 __NDS32_VH__ macro.
17208 * config/nds32/nds32.opt (mvh): New option.
17209
17210 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17211 Chung-Ju Wu <jasonwucj@gmail.com>
17212
17213 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17214 function.
17215 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17216 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17217 definition.
17218
17219 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17220 Chung-Ju Wu <jasonwucj@gmail.com>
17221
17222 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17223 function.
17224 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17225 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17226
17227 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17228 Kito Cheng <kito.cheng@gmail.com>
17229 Chung-Ju Wu <jasonwucj@gmail.com>
17230
17231 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17232 UNSPEC_FFMISM and UNSPEC_FLMISM.
17233 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17234 for ffb, ffmism and flmism.
17235 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17236 (unspec_ffmism): Ditto.
17237 (unspec_flmism): Ditto.
17238 (nds32_expand_builtin_impl): Check if string extension is available.
17239 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17240 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17241
17242 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17243
17244 Reverting patch:
17245 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17246
17247 PR target/83712
17248 * lra-assigns.c (assign_by_spills): Return a flag of reload
17249 assignment failure. Do not process the reload assignment
17250 failures. Do not spill other reload pseudos if they has the same
17251 reg class.
17252 (lra_assign): Add a return arg. Set up from the result of
17253 assign_by_spills call.
17254 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17255 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17256 usage_insns if it is not NULL.
17257 (spill_hard_reg_in_range): New function.
17258 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17259 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17260 function prototypes.
17261 (lra_assign): Change prototype.
17262 * lra.c (lra): Add code to deal with fails by splitting hard reg
17263 live ranges.
17264
17265 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17266
17267 PR target/84807
17268 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17269
17270 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17271
17272 PR debug/84620
17273 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17274 (dw_val_node): Add val_symbolic_view.
17275 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17276 (symview_upper_bound): New.
17277 (new_line_info_table): Initialize symviews_since_reset.
17278 (dwarf2out_source_line): Count symviews_since_reset and set
17279 symview_upper_bound.
17280 (dw_val_equal_p): Handle symview.
17281 (add_AT_symview): New.
17282 (print_dw_val): Handle symview.
17283 (attr_checksum, attr_checksum_ordered): Likewise.
17284 (same_dw_val_p, size_of_die): Likewise.
17285 (value_format, output_die): Likewise.
17286 (add_high_low_attributes): Use add_AT_symview for entry_view.
17287 (dwarf2out_finish): Reset symview_upper_bound, clear
17288 zero_view_p.
17289
17290 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17291
17292 PR target/83969
17293 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17294 Add strict argument and use it.
17295 (rs6000_split_multireg_move): Update for new strict argument.
17296 (mem_operand_gpr): Disallow all non-offsettable addresses.
17297 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17298
17299 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17300
17301 PR target/84772
17302 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17303 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17304 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17305
17306 PR c++/84767
17307 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17308 decl, use remap_type if we want to use the type.
17309
17310 2018-03-09 Martin Sebor <msebor@redhat.com>
17311
17312 PR tree-optimization/84526
17313 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17314 Remove dead code.
17315 (builtin_access::generic_overlap): Be prepared to handle non-array
17316 base objects.
17317
17318 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17319
17320 PR rtl-optimization/84682
17321 * lra-constraints.c (process_address_1): Check is_address flag
17322 for address constraints.
17323 (process_alt_operands): Likewise.
17324 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17325 preprocess_constraints.
17326 * recog.h (preprocess_constraints): Add oploc parameter.
17327 Adjust callers.
17328 * recog.c (preprocess_constraints): Test address_operand for
17329 CT_ADDRESS constraints.
17330
17331 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17332
17333 PR target/83712
17334 * lra-assigns.c (assign_by_spills): Return a flag of reload
17335 assignment failure. Do not process the reload assignment
17336 failures. Do not spill other reload pseudos if they has the same
17337 reg class.
17338 (lra_assign): Add a return arg. Set up from the result of
17339 assign_by_spills call.
17340 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17341 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17342 usage_insns if it is not NULL.
17343 (spill_hard_reg_in_range): New function.
17344 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17345 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17346 function prototypes.
17347 (lra_assign): Change prototype.
17348 * lra.c (lra): Add code to deal with fails by splitting hard reg
17349 live ranges.
17350
17351 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17352
17353 PR target/83193
17354 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17355 Accept complain bool parameter. Only emit errors if it is true.
17356 (arm_parse_cpu_option_name): Likewise.
17357 (arm_target_thumb_only): Adjust callers of the above.
17358 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17359 prototype to take a default true bool parameter.
17360 (arm_parse_arch_option_name): Likewise.
17361
17362 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17363 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17364
17365 PR jit/64089
17366 PR jit/84288
17367 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17368 * configure: Regenerate.
17369 * configure.ac ("linker --version-script option"): New.
17370 ("linker soname option"): New.
17371
17372 2018-03-09 Richard Biener <rguenther@suse.de>
17373
17374 PR tree-optimization/84775
17375 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17376 immediate uses of predicate stmts and mark them modified.
17377
17378 Revert
17379 PR tree-optimization/84178
17380 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17381 to caller.
17382 (version_loop_for_if_conversion): Delay update_ssa call.
17383 (tree_if_conversion): Delay update_ssa until after predicate
17384 insertion.
17385
17386 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17387
17388 PR target/84763
17389 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17390 when the function accesses prior frames.
17391
17392 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17393
17394 PR debug/84456
17395 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17396 gen_llsym, otherwise call maybe_gen_llsym.
17397
17398 PR inline-asm/84742
17399 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17400 has ',' character inside of it.
17401
17402 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17403
17404 PR target/84748
17405 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17406 as clobbering CC_REGNUM.
17407
17408 2018-03-08 Richard Biener <rguenther@suse.de>
17409
17410 PR middle-end/84552
17411 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17412 (follow_copies_to_constant): Do not follow SSA names registered
17413 for update.
17414
17415 2018-03-08 Richard Biener <rguenther@suse.de>
17416
17417 PR tree-optimization/84178
17418 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17419 to caller.
17420 (version_loop_for_if_conversion): Delay update_ssa call.
17421 (tree_if_conversion): Delay update_ssa until after predicate
17422 insertion.
17423
17424 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17425
17426 PR tree-optimization/84178
17427 * tree-if-conv.c (release_bb_predicate): Remove the
17428 the assertion that the stmts have NULL use_ops.
17429 Discard the statements, asserting that they haven't
17430 yet been added to a BB.
17431
17432 2018-03-08 Richard Biener <rguenther@suse.de>
17433
17434 PR tree-optimization/84746
17435 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17436 (phi_translate): Pass in destination ANTIC_OUT set.
17437 (phi_translate_1): Likewise. For a simplified result lookup
17438 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17439 (phi_translate_set): Adjust.
17440 (do_pre_regular_insertion): Likewise.
17441 (do_pre_partial_partial_insertion): Likewise.
17442
17443 2018-03-08 Martin Liska <mliska@suse.cz>
17444
17445 PR gcov-profile/84735
17446 * doc/gcov.texi: Document usage of profile files.
17447 * gcov-io.h: Document changes in the format.
17448
17449 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17450
17451 PR debug/84404
17452 PR debug/84408
17453 * dwarf2out.c (struct dw_line_info_table): Update comments for
17454 view == -1.
17455 (FORCE_RESET_NEXT_VIEW): New.
17456 (FORCE_RESETTING_VIEW_P): New.
17457 (RESETTING_VIEW_P): Check for -1 too.
17458 (ZERO_VIEW_P): Likewise.
17459 (new_line_info_table): Force-reset next view.
17460 (dwarf2out_begin_function): Likewise.
17461 (dwarf2out_source_line): Simplify zero_view_p initialization.
17462 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17463 view directly. Omit view when omitting .loc at line 0.
17464
17465 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17466
17467 PR tree-optimization/84740
17468 * tree-switch-conversion.c (process_switch): Call build_constructors
17469 only if info.phi_count is non-zero.
17470
17471 PR tree-optimization/84739
17472 * tree-tailcall.c (find_tail_calls): Check call arguments against
17473 DECL_ARGUMENTS (current_function_decl) rather than
17474 DECL_ARGUMENTS (func) when checking for tail recursion.
17475
17476 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17477
17478 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17479 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17480 Volker Reichelt's entry and add entries for people that perform
17481 GCC fuzzy testing and report numerous bugs.
17482
17483 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17484
17485 PR target/82411
17486 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17487 readonly data in sdata, if that is disabled.
17488 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17489 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17490 -mreadonly-in-sdata option.
17491
17492 2018-03-07 Martin Sebor <msebor@redhat.com>
17493
17494 PR tree-optimization/84468
17495 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17496 basic block when looking for nul assignment.
17497
17498 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17499
17500 PR target/84277
17501 * except.h (output_function_exception_table): Adjust prototype.
17502 * except.c (output_function_exception_table): Remove FNNAME parameter
17503 and add SECTION parameter. Ouput one part of the table at a time.
17504 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17505 the first part of the exception table and emit unwind directives.
17506 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17507 (i386_pe_seh_cold_init): Likewise.
17508 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17509 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17510 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17511 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17512 * config/i386/winnt.c: Include except.h.
17513 (struct seh_frame_state): Add reg_offset, after_prologue and
17514 in_cold_section fields.
17515 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17516 (i386_pe_seh_cold_init): New function.
17517 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17518 to seh->in_cold_section.
17519 (seh_emit_push): Record the offset of the push.
17520 (seh_emit_save): Record the offet of the save.
17521 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17522 Test seh->after_prologue to disregard the epilogue.
17523 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17524 (i386_pe_end_cold_function): New function.
17525
17526 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17527
17528 PR fortran/84565
17529 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17530 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17531
17532 PR c++/84704
17533 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17534 on tmp_var.
17535 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17536 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17537
17538 PR middle-end/84723
17539 * multiple_target.c: Include tree-inline.h and intl.h.
17540 (expand_target_clones): Diagnose and fail if node->definition and
17541 !tree_versionable_function_p (node->decl).
17542
17543 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17544
17545 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17546 sprint_ul.
17547 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17548 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17549 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17550
17551 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17552
17553 PR target/84710
17554 * combine.c (try_combine): Use reg_or_subregno instead of handling
17555 just paradoxical SUBREGs and REGs.
17556
17557 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17558
17559 * config/arc/arc.c (arc_finalize_pic): Remove function.
17560 (arc_must_save_register): We use single base PIC register, remove
17561 checks to save/restore the PIC register.
17562 (arc_expand_prologue): Likewise.
17563 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17564 Remove.
17565 (arc_verify_short): Likewise.
17566 (arc_attr_type): Likewise.
17567 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17568 (walk_stores): Likewise.
17569 (arc_address_cost): Make it static.
17570 (arc_verify_short): Likewise.
17571 (branch_dest): Likewise.
17572 (arc_attr_type): Likewise.
17573 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17574 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17575 (arc_final_prescan_insn): Remove inserting the nops due to
17576 hardware hazards. It is done in reorg step.
17577 (insn_length_variant_t): Remove.
17578 (insn_length_parameters_t): Likewise.
17579 (arc_insn_length_parameters): Likewise.
17580 (arc_get_insn_variants): Likewise.
17581 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17582
17583 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17584
17585 PR inline-asm/84683
17586 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17587 assertion failure.
17588
17589 PR tree-optimization/84687
17590 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17591 on new_node->decl.
17592 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17593
17594 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17595
17596 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17597 Rename to ppc_speculation_barrier.
17598 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17599 __builtin_ppc_speculation_barrier.
17600
17601 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17602
17603 PR target/84700
17604 * combine.c (combine_simplify_rtx): Don't try to simplify if
17605 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17606 are equal to x.
17607
17608 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17609
17610 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17611 to 32 bytes when compiling for POWER9.
17612
17613 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17614
17615 PR target/84564
17616 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17617 regparm >= 3 with no arg reg available also for calls with
17618 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17619
17620 PR target/84524
17621 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17622 orig,vex.
17623 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17624
17625 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17626
17627 PR target/84264
17628 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17629
17630 2018-03-05 Richard Biener <rguenther@suse.de>
17631
17632 PR tree-optimization/84486
17633 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17634 When inserting a __builtin_assume_aligned call set the LHS
17635 SSA name alignment info accordingly.
17636
17637 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17638
17639 PR tree-optimization/84114
17640 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17641 Avoid reassociation of FLOAT_MODE addition.
17642
17643 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17644
17645 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17646 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17647 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17648 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17649 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17650 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17651 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17652 and -mwbnoinvd.
17653 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17654 __builtin_ia32_wbinvd): New builtins.
17655 (SPECIAL_ARGS2): New.
17656 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17657 (SPECIAL_ARGS2): New.
17658 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17659 (ix86_valid_target_attribute_inner_p): Ditto.
17660 (ix86_init_mmx_sse_builtins): Add special_args2.
17661 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17662 TARGET_WBNOINVD_P): New.
17663 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17664 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17665 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17666 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17667 * config/i386/pconfigintrin.h: New file.
17668 * config/i386/wbnoinvdintrin.h: Ditto.
17669 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17670 wbnoinvdintrin.h.
17671 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17672
17673 2018-03-05 Richard Biener <rguenther@suse.de>
17674
17675 PR tree-optimization/84670
17676 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17677 member.
17678 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17679 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17680 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17681 doesn't grow if all successors (recursively) were visited at least
17682 once.
17683
17684 2018-03-05 Richard Biener <rguenther@suse.de>
17685
17686 PR tree-optimization/84650
17687 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17688 if executed in the loop pipeline.
17689
17690 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17691
17692 * doc/configfiles.texi (Configuration Files): Move info about
17693 conditionalizing $target-protos.h to...
17694 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17695 differs from $target-protos.h.
17696
17697 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17698 Chung-Ju Wu <jasonwucj@gmail.com>
17699
17700 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17701 * config/nds32/nds32-multiple.md (setmemsi): Define.
17702 * config/nds32/nds32-memory-manipulation.c
17703 (nds32_gen_dup_4_byte_to_word_value): New.
17704 (emit_setmem_word_loop): New.
17705 (emit_setmem_byte_loop): New.
17706 (nds32_expand_setmem_loop): New.
17707 (nds32_expand_setmem_loop_v3m): New.
17708 (nds32_expand_setmem_unroll): New.
17709 (nds32_expand_setmem): New.
17710
17711 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17712 Chung-Ju Wu <jasonwucj@gmail.com>
17713
17714 * config/nds32/nds32-memory-manipulation.c
17715 (nds32_emit_load_store): New.
17716 (nds32_emit_post_inc_load_store): New.
17717 (nds32_emit_mem_move): New.
17718 (nds32_emit_mem_move_block): New.
17719 (nds32_expand_movmemsi_loop_unknown_size): New.
17720 (nds32_expand_movmemsi_loop_known_size): New.
17721 (nds32_expand_movmemsi_loop): New.
17722 (nds32_expand_movmemsi_unroll): New.
17723 (nds32_expand_movmemqi): Rename ...
17724 (nds32_expand_movmemsi): ... to this.
17725 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17726 (movmemsi): ... to this.
17727 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17728 (nds32_expand_movmemsi): ... to this.
17729
17730 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17731 Monk Chiang <sh.chiang04@gmail.com>
17732 Chung-Ju Wu <jasonwucj@gmail.com>
17733
17734 * config/nds32/nds32-protos.h
17735 (nds32_expand_load_multiple): New arguments.
17736 (nds32_expand_store_multiple): Ditto.
17737 (nds32_valid_multiple_load_store): Rename ...
17738 (nds32_valid_multiple_load_store_p): ... to this.
17739 * config/nds32/nds32-memory-manipulation.c
17740 (nds32_expand_load_multiple): Refine implementation.
17741 (nds32_expand_store_multiple): Ditto.
17742 * config/nds32/nds32-multiple.md
17743 (load_multiple): Update nds32_expand_load_multiple interface.
17744 (store_multiple): Update nds32_expand_store_multiple interface.
17745 * config/nds32/nds32-predicates.c
17746 (nds32_valid_multiple_load_store): Rename ...
17747 (nds32_valid_multiple_load_store_p): ... to this and refine
17748 implementation.
17749 * config/nds32/predicates.md
17750 (nds32_load_multiple_and_update_address_operation): New predicate.
17751 (nds32_store_multiple_and_update_address_operation): New predicate.
17752
17753 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17754 Chung-Ju Wu <jasonwucj@gmail.com>
17755
17756 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17757 (combo): New attribute.
17758 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17759
17760 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17761
17762 * config/nds32/nds32.opt: Change -mcmodel= default value.
17763
17764 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17765 Monk Chiang <sh.chiang04@gmail.com>
17766 Chung-Ju Wu <jasonwucj@gmail.com>
17767
17768 * config/nds32/constants.md (unspec_element): New enum.
17769 * config/nds32/constraints.md (Umw): New constraint.
17770 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17771 * config/nds32/nds32-intrinsic.md: Likewise.
17772 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17773 (nds32_valid_smw_lwm_base_p): New.
17774 (nds32_output_smw_single_word): New.
17775 (nds32_output_lmw_single_word): New.
17776 (nds32_expand_unaligned_load): New.
17777 (nds32_expand_unaligned_store): New.
17778 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17779 (nds32_output_smw_single_word): Declare.
17780 (nds32_output_lmw_single_word): Declare.
17781 (nds32_expand_unaligned_load): Declare.
17782 (nds32_expand_unaligned_store): Declare.
17783 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17784 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17785 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17786 NDS32_BUILTIN_UASTORE_DW.
17787 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17788 predicate.
17789
17790 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17791 Kito Cheng <kito.cheng@gmail.com>
17792 Chung-Ju Wu <jasonwucj@gmail.com>
17793
17794 * config/nds32/nds32-intrinsic.c
17795 (nds32_expand_builtin_null_ftype_reg): Delete.
17796 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17797 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17798 (nds32_read_argument): New.
17799 (nds32_legitimize_target): Ditto.
17800 (nds32_legitimize_argument): Ditto.
17801 (nds32_check_constant_argument): Ditto.
17802 (nds32_expand_unop_builtin): Ditto.
17803 (nds32_expand_unopimm_builtin): Ditto.
17804 (nds32_expand_binop_builtin): Ditto.
17805 (nds32_builtin_decl_impl): Ditto.
17806 (builtin_description): Ditto.
17807 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17808 (nds32_init_builtins_impl): Ditto.
17809 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17810 (nds32_builtin_decl): New.
17811 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17812 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17813
17814 2018-03-02 Jeff Law <law@redhat.com>
17815
17816 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17817 (redundant_insn, fill_simple_delay_slots): Likewise.
17818 (fill_slots_from_thread): Likewise.
17819 * resource.c (mark_referenced_resources): Likewise.
17820 (mark_set_resources, find_dead_or_set_registers): Likewise.
17821
17822 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17823
17824 * substring-locations.h (format_warning_va): Formatting fix for
17825 ATTRIBUTE_GCC_DIAG.
17826 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17827 argument.
17828 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17829 * substring-locations.c: Include intl.h.
17830 (format_warning_va): Turned into small wrapper around
17831 format_warning_n_va, renamed to ...
17832 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17833 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17834 use ngettext.
17835 (format_warning_at_substring_n): New function.
17836 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17837 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17838 format_warning_at_substring with just a shorter name instead of
17839 const function pointer.
17840 (fmtwarn_n): New function.
17841 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17842 appropriate, get rid of all the fmtstr temporaries, move conditionals
17843 with G_() wrapped string literals directly into fmtwarn arguments,
17844 cast dir.len to (int), formatting fixes.
17845
17846 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17847
17848 * doc/invoke.texi: Remove "Cilk Plus" references.
17849
17850 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17851 Richard Biener <rguenther@suse.de>
17852
17853 PR ipa/84628
17854 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17855 for error or warning attributes if CALL_FROM_THUNK_P is set.
17856 Formatting fixes.
17857
17858 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17859
17860 PR target/56540
17861 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17862 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17863
17864 PR target/56540
17865 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17866 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17867
17868 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17869 instead of -1U in last predictors element's probability member.
17870
17871 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17872
17873 PR ipa/83983
17874 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17875 arguments if they are comparable.
17876
17877 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17878
17879 PR tree-optimization/84634
17880 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17881 masks and masked_loop_p with a single loop_masks, making sure it's
17882 null for bb vectorization.
17883
17884 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17885
17886 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17887 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17888 loop->force_vectorize to check whether there is no alias.
17889
17890 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17891
17892 PR target/84614
17893 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17894 prototypes.
17895 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17896 comments.
17897 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17898 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17899 instead of a loop around prev_real_insn.
17900 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17901 prev_real_insn.
17902
17903 PR inline-asm/84625
17904 * config/i386/i386.c (ix86_print_operand): Use conditional
17905 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17906 zero vector.
17907
17908 2018-03-02 Richard Biener <rguenther@suse.de>
17909
17910 PR tree-optimization/84427
17911 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17912 (bitmap_set_subtract_values): Rewrite to handle multiple
17913 exprs per value.
17914 (clean): Likewise.
17915 (prune_clobbered_mems): Likewise.
17916 (phi_translate): Take edge instead of pred/phiblock.
17917 (phi_translate_1): Likewise.
17918 (phi_translate_set): Likewise. Insert all translated
17919 exprs for a value into the set, keeping possibly multiple
17920 expressions per value.
17921 (compute_antic_aux): Adjust for phi_translate changes.
17922 When intersecting union the expressions and prune those
17923 not in the final value set, keeping possibly multiple
17924 expressions per value. Do not use value-insertion
17925 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17926 all expressions. Add verification that the value-sets
17927 only shrink during iteration.
17928 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17929 (do_pre_regular_insertion): Likewise.
17930 (do_pre_partial_partial_insertion): Likewise.
17931
17932 2018-03-02 Richard Biener <rguenther@suse.de>
17933
17934 PR target/82005
17935 * config/darwin.c (saved_debug_info_level): New static global.
17936 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17937 (darwin_asm_lto_end): Restore debug info generation settings.
17938
17939 2018-03-01 Martin Liska <mliska@suse.cz>
17940
17941 PR sanitizer/82484
17942 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17943 volatile arguments.
17944
17945 2018-03-01 Richard Biener <rguenther@suse.de>
17946
17947 PR debug/84645
17948 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17949 type annotation with LTO when debug was disabled at compile-time.
17950
17951 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17952
17953 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17954 XINT with INTVAL.
17955 (mips_final_postscan_insn): Likewise.
17956
17957 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17958
17959 PR rtl-optimization/84528
17960 * alias.c (init_alias_target): Add commentary.
17961 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17962 a unique base value if the frame pointer is not eliminated
17963 to the stack pointer.
17964
17965 2018-03-01 Tom de Vries <tom@codesourcery.com>
17966
17967 PR rtl-optimization/83327
17968 * lra-int.h (hard_regs_spilled_into): Declare.
17969 * lra.c (hard_regs_spilled_into): Define.
17970 (init_reg_info): Init hard_regs_spilled_into.
17971 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17972 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17973 (process_bb_lives): Handle hard_regs_spilled_into.
17974 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17975 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17976
17977 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17978
17979 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17980 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17981 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17982 * config/rs6000/aix72.h: New file.
17983
17984 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17985
17986 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17987 instead of warning_at with conditional singular and plural messages
17988 where possible.
17989
17990 PR target/52991
17991 * stor-layout.c (update_alignment_for_field): For
17992 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17993 && !DECL_PACKED (field), do the alignment update, just use
17994 only desired_align instead of MAX (type_align, desired_align)
17995 as the alignment.
17996 (place_field): Don't do known_align < desired_align handling
17997 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17998 is non-NULL, instead do it after rli->prev_field handling and
17999 only if not within a bitfield word. For DECL_PACKED (field)
18000 use type_align of BITS_PER_UNIT.
18001
18002 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
18003
18004 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
18005 superfluous parentheses and trailing spaces.
18006
18007 2018-02-28 Richard Biener <rguenther@suse.de>
18008
18009 PR tree-optimization/84584
18010 * graphite-scop-detection.c (scop_detection::add_scop): Discard
18011 SCoPs with fake exit edge.
18012
18013 2018-02-28 Martin Liska <mliska@suse.cz>
18014
18015 PR testsuite/84597
18016 * timevar.c (timer::print): Fix format to properly print 100%
18017 values.
18018
18019 2018-02-28 Richard Biener <rguenther@suse.de>
18020
18021 PR middle-end/84607
18022 * genmatch.c (capture_info::walk_match): Do not mark
18023 captured expressions without operands as expr_p given
18024 they act more like predicates and should be subject to
18025 "lost tail" side-effect preserving.
18026
18027 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
18028
18029 PR rtl-optimization/81611
18030 * auto-inc-dec.c (attempt_change): Move dead note from
18031 mem_insn if it's the next use of regno
18032 (find_address): Take address use of reg holding
18033 non-incremented value. Add parm to limit search to the named
18034 reg only.
18035 (merge_in_block): Attempt to use a mem insn that is the next
18036 use of the original regno.
18037
18038 2018-02-27 Martin Sebor <msebor@redhat.com>
18039
18040 PR c++/83871
18041 * doc/invoke.texi (-Wmissing-attributes): New option.
18042 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
18043
18044 2018-02-27 Martin Sebor <msebor@redhat.com>
18045
18046 PR translation/84207
18047 * diagnostic-core.h (warning_n, error_n, inform_n): Change
18048 n argument to unsigned HOST_WIDE_INT.
18049 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
18050 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
18051 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
18052 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
18053
18054 2018-02-27 Richard Biener <rguenther@suse.de>
18055
18056 PR tree-optimization/84512
18057 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
18058 Do not use the estimate returned from record_stmt_cost for
18059 the scalar iteration cost but sum properly using add_stmt_cost.
18060
18061 2018-02-27 Richard Biener <rguenther@suse.de>
18062
18063 PR tree-optimization/84466
18064 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18065 Adjust last change to less strictly validate use operands.
18066
18067 2018-02-27 Martin Liska <mliska@suse.cz>
18068
18069 PR gcov-profile/84548
18070 * gcov.c (process_file): Allow partial overlap and consider it
18071 also as group functions.
18072 (output_lines): Properly calculate range of lines for a group.
18073
18074 2018-02-27 Martin Liska <mliska@suse.cz>
18075
18076 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
18077 'ggc' suffixes. Change first column width.
18078 (timer::print): Fix formatting of the column.
18079
18080 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
18081
18082 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
18083 preserve inline entry blocks for the sake of debug inline
18084 entry point markers alone.
18085 (remove_unused_locals): Suggest in comments a better place to
18086 force the preservation of inline entry blocks that are
18087 otherwise unused, but do not preserve them.
18088
18089 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18090
18091 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
18092
18093 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18094
18095 PR target/84039
18096 * config/i386/constraints.md (Bs): Replace
18097 ix86_indirect_branch_register with
18098 TARGET_INDIRECT_BRANCH_REGISTER.
18099 (Bw): Likewise.
18100 * config/i386/i386.md (indirect_jump): Likewise.
18101 (tablejump): Likewise.
18102 (*sibcall_memory): Likewise.
18103 (*sibcall_value_memory): Likewise.
18104 Peepholes of indirect call and jump via memory: Likewise.
18105 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
18106 (*sibcall_value_GOT_32): Likewise.
18107 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18108 (GOT_memory_operand): Likewise.
18109 (call_insn_operand): Likewise.
18110 (sibcall_insn_operand): Likewise.
18111 (GOT32_symbol_operand): Likewise.
18112 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
18113
18114 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18115
18116 PR rtl-optimization/83496
18117 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
18118 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
18119 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
18120 redundant insn, if any.
18121 (relax_delay_slots): Likewise.
18122 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
18123
18124 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
18125
18126 PR tree-optimization/83965
18127 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
18128 that grouped statements are part of a reduction chain. Return
18129 true if the statement is not marked as a reduction itself but
18130 is part of a group.
18131 (vect_recog_dot_prod_pattern): Don't check whether the statement
18132 is part of a group here.
18133 (vect_recog_sad_pattern): Likewise.
18134 (vect_recog_widen_sum_pattern): Likewise.
18135
18136 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
18137
18138 PR debug/84545
18139 * final.c (rest_of_clean_state): Also look for calls inside sequences.
18140
18141 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
18142
18143 PR target/84530
18144 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
18145 the bool argument.
18146 (ix86_output_indirect_function_return): New prototype.
18147 (ix86_split_simple_return_pop_internal): Likewise.
18148 * config/i386/i386.c (indirect_return_via_cx): New.
18149 (indirect_return_via_cx_bnd): Likewise.
18150 (indirect_thunk_name): Handle return va CX_REG.
18151 (output_indirect_thunk_function): Create alias for
18152 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
18153 (ix86_output_indirect_jmp): Remove the bool argument.
18154 (ix86_output_indirect_function_return): New function.
18155 (ix86_split_simple_return_pop_internal): Likewise.
18156 * config/i386/i386.md (*indirect_jump): Don't pass false
18157 to ix86_output_indirect_jmp.
18158 (*tablejump_1): Likewise.
18159 (simple_return_pop_internal): Change it to define_insn_and_split.
18160 Call ix86_split_simple_return_pop_internal to split it for
18161 -mfunction-return=.
18162 (simple_return_indirect_internal): Call
18163 ix86_output_indirect_function_return instead of
18164 ix86_output_indirect_jmp.
18165
18166 2018-02-26 Jakub Jelinek <jakub@redhat.com>
18167
18168 PR bootstrap/84405
18169 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
18170 memset and value initialization afterwards.
18171
18172 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
18173
18174 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
18175
18176 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18177
18178 PR target/84521
18179 * common/config/aarch64/aarch64-common.c
18180 (aarch_option_optimization_table[]): Switch
18181 off fomit-frame-pointer
18182
18183 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18184 Chung-Ju Wu <jasonwucj@gmail.com>
18185
18186 * config/nds32/nds32-multiple.md (load_multiple): Disallow
18187 volatile memory.
18188 (store_multiple): Ditto.
18189
18190 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
18191
18192 * config.gcc: Add --with-cpu support for nds32 target.
18193 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
18194 * config/nds32/nds32.opt: Add -mcpu= option.
18195
18196 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
18197
18198 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
18199 isel=yes): Warn for these deprecated options.
18200
18201 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
18202
18203 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18204 ISA_2_5_MASKS_EMBEDDED.
18205
18206 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18207
18208 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18209 p->max as pointers rather than using iterative_hash_expr.
18210
18211 2018-02-23 Carl Love <cel@us.ibm.com>
18212
18213 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18214 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18215 BU_P8V_OVERLOAD_2.
18216 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18217 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18218 P8V_BUILTIN_VEC_VUNSIGNED2.
18219
18220 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18221
18222 PR target/81572
18223 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18224 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18225 LRA_UNKNOWN_ALT.
18226 * lra-constraints.c (curr_insn_transform): Set up
18227 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18228 LRA_UNKNOWN_ALT.
18229 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18230 * lra-eliminations.c (spill_pseudos): Ditto.
18231 (process_insn_for_elimination): Ditto.
18232 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18233 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18234 LRA_NON_CLOBBERED_ALT.
18235
18236 2018-02-22 Martin Sebor <msebor@redhat.com>
18237
18238 PR tree-optimization/84480
18239 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18240 to maybe_diag_stxncpy_trunc. Call it.
18241 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18242 from gimple_fold_builtin_strcpy. Print inlining stack.
18243 (handle_builtin_stxncpy): Print inlining stack.
18244 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18245
18246 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18247
18248 PR target/84176
18249 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18250 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18251 and -fcheck-pointer-bounds are used together.
18252 (indirect_thunk_prefix): New enum.
18253 (indirect_thunk_need_prefix): New function.
18254 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18255 "_nt" instead of "_bnd" for NOTRACK prefix.
18256 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18257 (output_indirect_thunk_function): Likewise.
18258 (): Likewise.
18259 (ix86_code_end): Update output_indirect_thunk_function calls.
18260 (ix86_output_indirect_branch_via_reg): Replace
18261 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18262 (ix86_output_indirect_branch_via_push): Likewise.
18263 (ix86_output_function_return): Likewise.
18264 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18265 incompatible with -fcf-protection=branch and
18266 -fcheck-pointer-bounds.
18267
18268 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18269
18270 PR target/83335
18271 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18272 Change gcc_assert call to output_operand_lossage.
18273
18274 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18275
18276 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18277
18278 2018-02-22 DJ Delorie <dj@redhat.com>
18279 Sebastian Perta <sebastian.perta@renesas.com>
18280 Oleg Endo <olegendo@gcc.gnu.org>
18281
18282 * config/rx/rx.c (rx_rtx_costs): New function.
18283 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18284
18285 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18286
18287 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18288
18289 2018-02-22 Martin Liska <mliska@suse.cz>
18290
18291 PR driver/83193
18292 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18293 Add "native" as a possible value.
18294
18295 2018-02-22 Martin Liska <mliska@suse.cz>
18296
18297 PR driver/83193
18298 * config/i386/i386.c (ix86_option_override_internal):
18299 Add "native" as a possible value for -march and -mtune.
18300
18301 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18302
18303 PR target/84502
18304 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18305 to all type variants.
18306
18307 PR tree-optimization/84503
18308 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18309 width as info->bitpos + info->bitsize - start.
18310 (merged_store_group::merge_overlapping): Simplify width computation.
18311 (check_no_overlap): New function.
18312 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18313 start + width and last_order of the group, fail if check_no_overlap
18314 fails.
18315 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18316 to group if check_no_overlap fails.
18317
18318 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18319
18320 * config/rs6000/altivec.md: Delete contraint arguments to
18321 define_expand, define_split, and define_peephole2, and in
18322 define_insn_and_split if always unused.
18323 * config/rs6000/darwin.md: Ditto.
18324 * config/rs6000/dfp.md: Ditto.
18325 * config/rs6000/rs6000.md: Ditto.
18326 * config/rs6000/sync.md: Ditto.
18327 * config/rs6000/vector.md: Ditto.
18328 * config/rs6000/vsx.md: Ditto.
18329
18330 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18331
18332 * config/rs6000/altivec.md: Write output control strings as braced
18333 blocks instead of double-quoted strings.
18334 * config/rs6000/darwin.md: Ditto.
18335 * config/rs6000/rs6000.md: Ditto.
18336 * config/rs6000/vector.md: Ditto.
18337 * config/rs6000/vsx.md: Ditto.
18338
18339 2018-02-21 Jason Merrill <jason@redhat.com>
18340
18341 PR c++/84314 - ICE with templates and fastcall attribute.
18342 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18343
18344 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18345
18346 * ipa-cp.c (determine_versionability): Fix comment typos.
18347
18348 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18349
18350 PR c/84229
18351 * ipa-cp.c (determine_versionability): Do not version functions caling
18352 va_arg_pack.
18353
18354 2018-02-21 Martin Liska <mliska@suse.cz>
18355
18356 PR driver/83193
18357 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18358 Add "native" as a possible value.
18359 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18360 the macro when native cpu detection is available.
18361
18362 2018-02-21 Martin Liska <mliska@suse.cz>
18363
18364 PR driver/83193
18365 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18366 Add "native" as a possible value.
18367 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18368 when native cpu detection is available.
18369
18370 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18371 Martin Sebor <msebor@redhat.com>
18372
18373 PR tree-optimization/84478
18374 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18375 false.
18376 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18377 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18378 support which is conservatively correct, for 2 only stay conservative
18379 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18380 argument to the 2 argument get_range_strlen, adjust 6 arg
18381 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18382 false.
18383 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18384 (gimple_fold_builtin_strlen): Pass true as last argument to
18385 get_range_strlen.
18386
18387 2018-02-20 Martin Sebor <msebor@redhat.com>
18388
18389 PR middle-end/84095
18390 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18391 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18392 (builtin_memref::builtin_memref): Factor out parts into
18393 set_base_and_offset and call it.
18394
18395 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18396
18397 PR middle-end/84406
18398 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18399 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18400 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18401 search at the associated MODE_INT.
18402
18403 2018-02-20 Jeff Law <law@redhat.com>
18404
18405 PR middle-end/82123
18406 PR tree-optimization/81592
18407 PR middle-end/79257
18408 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18409 for range data rather than using global data.
18410 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18411 range data rather than using global data.
18412 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18413 pass it to children as needed.
18414 (struct directive::fmtresult): Similarly.
18415 (struct directive::set_width): Similarly.
18416 (struct directive::set_precision): Similarly.
18417 (format_integer, format_directive, parse_directive): Similarly.
18418 (format_none): Accept unnamed vr_values parameter.
18419 (format_percent, format_floating, format_character): Similarly.
18420 (format_string, format_plain): Similarly.
18421 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18422 the EVRP range analyzer for range data rather than using global data.
18423 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18424 gimple-ssa-evrp-analyze.h
18425 (class sprintf_dom_walker): Add after_dom_children member function.
18426 Add evrp_range_analyzer member.
18427 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18428 range analyzer as needed.
18429 (sprintf_dom_walker::after_dom_children): New member function.
18430 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18431 if not optimizing.
18432 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18433 (evrp_range_analyzer::pop_to_marker): Likewise.
18434
18435 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18436
18437 PR tree-optimization/84419
18438 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18439 with the required type if its current type is compatible but
18440 different.
18441
18442 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18443
18444 PR middle-end/82004
18445 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18446 after vectorization.
18447
18448 2018-02-20 Martin Liska <mliska@suse.cz>
18449
18450 PR driver/83193
18451 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18452 possible values if we don't have a hint.
18453
18454 2018-02-20 Martin Liska <mliska@suse.cz>
18455
18456 PR c/84310
18457 PR target/79747
18458 * final.c (shorten_branches): Build align_tab array with one
18459 more element.
18460 * opts.c (finish_options): Add alignment option limit check.
18461 (MAX_CODE_ALIGN): Likewise.
18462 (MAX_CODE_ALIGN_VALUE): Likewise.
18463 * doc/invoke.texi: Document maximum allowed option value for
18464 all -falign-* options.
18465
18466 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18467
18468 PR target/84146
18469 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18470 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18471 * var-tracking.c (emit_note_insn_var_location): Remove all references
18472 to NOTE_INSN_CALL_ARG_LOCATION.
18473 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18474 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18475 Use copy_rtx_if_shared.
18476 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18477 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18478 (dwarf2out_var_location): Remove handling of
18479 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18480 on call_insn.
18481 * final.c (final_scan_insn): Remove all references to
18482 NOTE_INSN_CALL_ARG_LOCATION.
18483 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18484 before dumping final insns.
18485 * except.c (emit_note_eh_region_end): Remove all references to
18486 NOTE_INSN_CALL_ARG_LOCATION.
18487 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18488 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18489 * config/arc/arc.c (hwloop_optimize): Likewise.
18490 * config/arm/arm.c (create_fix_barrier): Likewise.
18491 * config/s390/s390.c (s390_chunkify_start): Likewise.
18492 * config/sh/sh.c (find_barrier): Likewise.
18493 * config/i386/i386.c (rest_of_insert_endbranch,
18494 ix86_seh_fixup_eh_fallthru): Likewise.
18495 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18496 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18497 * config/frv/frv.c (frv_function_prologue): Likewise.
18498 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18499 reg note.
18500 (note_outside_basic_block_p): Remove all references to
18501 NOTE_INSN_CALL_ARG_LOCATION.
18502 * gengtype.c (adjust_field_rtx_def): Likewise.
18503 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18504 Likewise.
18505 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18506 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18507
18508 PR c++/84444
18509 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18510 is ADDR_EXPR.
18511
18512 PR tree-optimization/84452
18513 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18514 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18515 is NULL.
18516
18517 2018-02-19 Martin Liska <mliska@suse.cz>
18518
18519 PR sanitizer/82183
18520 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18521
18522 2018-02-19 Martin Liska <mliska@suse.cz>
18523 Richard Sandiford <richard.sandiford@linaro.org>
18524
18525 PR tree-optimization/82491
18526 * gimple-fold.c (get_base_constructor): Make earlier bail out
18527 to prevent ubsan.
18528
18529 2018-02-19 Carl Love <cel@us.ibm.com>
18530
18531 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18532 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18533 BU_P8V_OVERLOAD_1.
18534 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18535 P8V_BUILTIN_VEC_NEG.
18536
18537 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18538
18539 * config/rl78/rl78.md (movdf): New define expand.
18540
18541 2018-02-19 Martin Liska <mliska@suse.cz>
18542
18543 PR other/80589
18544 * doc/invoke.texi: Fix typo.
18545 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18546
18547 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18548
18549 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18550 handle rs6000_single_float and rs6000_double_float specially for
18551 e500 family CPUs.
18552
18553 2018-02-16 Jeff Law <law@redhat.com>
18554
18555 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18556 (pop_regs): Use it.
18557
18558 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18559
18560 PR ipa/84425
18561 * ipa-inline.c (inline_small_functions): Fix a typo.
18562
18563 2018-02-16 Nathan Sidwell <nathan@acm.org>
18564
18565 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18566
18567 2018-02-16 Carl Love <cel@us.ibm.com>
18568
18569 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18570 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18571 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18572 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18573 expansion to P8V_BUILTIN_VEC_FLOAT2.
18574
18575 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18576
18577 PR rtl-optimization/70023
18578 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18579 src_regno into account.
18580
18581 2018-02-16 Carl Love <cel@us.ibm.com>
18582
18583 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18584 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18585 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18586 * config/rs6000/rs6000.c: Remove case statements for
18587 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18588 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18589 and P9V_BUILTIN_VEC_VINSERT4B.
18590 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18591 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18592 * config/rs6000/vsx.md:
18593 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18594 vec_insert4b.
18595
18596 2018-02-16 Carl Love <cel@us.ibm.com>
18597
18598 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18599 vec_insert4b.
18600 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18601 definitions.
18602 * config/rs6000/rs6000-c.c: Add the definitions for
18603 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18604 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18605 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18606 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18607 definition for insert4b and define insn *insert3b_internal.
18608 * doc/extend.texi: Add documentation for vec_extract4b.
18609
18610 2018-02-16 Nathan Sidwell <nathan@acm.org>
18611
18612 * doc/extend.texi (Backwards Compatibility): Mention friend
18613 injection. Note for-scope is deprecated.
18614 * doc/invoke.texi (-ffriend-injection): Deprecate.
18615
18616 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18617
18618 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18619 that moved to I2, also allow destinations that are a paradoxical
18620 subreg (instead of a normal reg).
18621
18622 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18623
18624 PR target/83831
18625 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18626 to QImode.
18627
18628 2018-02-16 Richard Biener <rguenther@suse.de>
18629
18630 PR tree-optimization/84037
18631 PR tree-optimization/84016
18632 PR target/82862
18633 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18634 Adjust vec_construct for the fact we need additional higher latency
18635 128bit inserts for AVX256 and AVX512 vector builds.
18636 (ix86_add_stmt_cost): Scale vector construction cost for
18637 elementwise loads.
18638
18639 2018-02-16 Richard Biener <rguenther@suse.de>
18640
18641 PR tree-optimization/84417
18642 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18643 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18644 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18645
18646 2018-02-16 Martin Liska <mliska@suse.cz>
18647
18648 PR sanitizer/84307
18649 * internal-fn.def (ASAN_CHECK): Set proper flags.
18650 (ASAN_MARK): Likewise.
18651
18652 2018-02-16 Julia Koval <julia.koval@intel.com>
18653
18654 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18655 from PTA_CANNONLAKE.
18656
18657 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18658
18659 PR target/84272
18660 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18661 Use ++iter rather than iter++ for std::list iterators.
18662 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18663 defer deleting them until all nodes in the forest are processed. Do
18664 free even leaf nodes. Change to_process into auto_vec.
18665
18666 PR bootstrap/84405
18667 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18668 * vec.h (vec_default_construct): Use memset instead of placement new
18669 if BROKEN_VALUE_INITIALIZATION is defined.
18670 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18671 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18672 is defined.
18673
18674 PR rtl-optimization/83723
18675 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18676 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18677 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18678 recursive calls.
18679 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18680 callers.
18681 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18682
18683 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18684
18685 PR rtl-optimization/81443
18686 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18687 from inner REGs to paradoxical SUBREGs.
18688
18689 2018-02-16 Richard Biener <rguenther@suse.de>
18690
18691 PR tree-optimization/84399
18692 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18693 For operands we can analyze at their definition make sure we can
18694 analyze them at each use as well.
18695
18696 2018-02-16 Richard Biener <rguenther@suse.de>
18697
18698 PR tree-optimization/84190
18699 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18700 volatile accesses if the decl isn't volatile.
18701
18702 2018-02-15 Jason Merrill <jason@redhat.com>
18703
18704 PR c++/84314 - ICE with templates and fastcall attribute.
18705 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18706 TYPE_CANONICAL on an existing type.
18707
18708 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18709
18710 PR tree-optimization/84383
18711 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18712 dstoff nor call operand_equal_p if dstbase is NULL.
18713
18714 PR tree-optimization/84334
18715 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18716 also a CONSTANT_CLASS_P, punt.
18717
18718 2018-02-14 Jim Wilson <jimw@sifive.com>
18719
18720 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18721 first SMALL_OPERAND check. New local min_second_step. Move assert
18722 to where locals are set. Add TARGET_RVC support.
18723 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18724
18725 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18726
18727 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18728
18729 2018-02-14 Martin Sebor <msebor@redhat.com>
18730
18731 PR tree-optimization/83698
18732 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18733 arrays constrain the offset range to their bounds.
18734 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18735 (builtin_access::overlap): Avoid setting the size of overlap if it's
18736 already been set.
18737 (maybe_diag_overlap): Also consider arrays when deciding what values
18738 of offsets to include in diagnostics.
18739
18740 2018-02-14 Martin Sebor <msebor@redhat.com>
18741
18742 PR c/84108
18743 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18744 that correspond to the kind of a declaration.
18745
18746 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18747
18748 PR target/83984
18749 * config/pa/pa.md: Load address of PIC label using the linkage table
18750 if the label is nonlocal.
18751
18752 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18753
18754 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18755 warning message if user requests -maltivec=be.
18756 * doc/invoke.texi: Document deprecation of -maltivec=be.
18757
18758 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18759
18760 PR target/84220
18761 * config/rs6000/rs6000-c.c: Update definitions for
18762 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18763 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18764
18765 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18766
18767 PR target/84239
18768 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18769 add _get_ssp intrinsics. Remove argument from
18770 __builtin_ia32_rdssp[d|q].
18771 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18772 * config/i386/i386-builtin.def: Remove argument from
18773 __builtin_ia32_rdssp[d|q].
18774 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18775 ix86_expand_special_args_builtin for _rdssp[d|q].
18776 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18777 Clear register before usage.
18778 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18779 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18780
18781 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18782
18783 PR tree-optimization/84357
18784 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18785 operand 1 of an ARRAY_REF too.
18786
18787 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18788
18789 PR target/83831
18790 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18791 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18792 declarations.
18793 (set_of_reg): New struct.
18794 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18795 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18796 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18797 functions.
18798 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18799 Split into bitclr, bitset, bitinvert patterns if appropriate.
18800 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18801 use rx_fuse_in_memory_bitop.
18802 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18803 to named insn, correct maximum insn length.
18804
18805 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18806
18807 PR target/79242
18808 * machmode.def: Define a complex mode for PARTIAL_INT.
18809 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18810 MODE_PARTIAL_INT.
18811 * doc/rtl.texi: Document CSPImode.
18812 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18813 handling.
18814 (msp430_hard_regno_nregs_with_padding): Likewise.
18815
18816 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18817
18818 PR target/84279
18819 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18820
18821 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18822
18823 PR rtl-optimization/84169
18824 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18825 we generated a parallel as new i3 and we split that to new i2 and i3
18826 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18827 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18828 those to i2, not i1. Partially rewrite this scan code.
18829
18830 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18831
18832 PR c/82210
18833 * stor-layout.c (place_field): For variable length fields, adjust
18834 offset_align afterwards not just based on the field's alignment,
18835 but also on the size.
18836
18837 PR middle-end/84309
18838 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18839 of exps and logs in the use_exp2 case.
18840
18841 2018-02-13 Jeff Law <law@redhat.com>
18842
18843 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18844 entry for "vector".
18845
18846 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18847 ARGS as unused.
18848
18849 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18850
18851 PR debug/84342
18852 PR debug/84319
18853 * common.opt (gas-loc-support, gas-locview-support): New.
18854 (ginline-points, ginternal-reset-location-views): New.
18855 * doc/invoke.texi: Document them. Use @itemx where intended.
18856 (gvariable-location-views): Adjust.
18857 * target.def (reset_location_view): New.
18858 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18859 (TARGET_RESET_LOCATION_VIEW): New.
18860 * doc/tm.texi: Rebuilt.
18861 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18862 (dwarf2out_default_as_locview_support): New.
18863 (output_asm_line_debug_info): Use option variables.
18864 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18865 (output_loc_list): Likewise.
18866 (add_high_low_attributes): Check option variables.
18867 Don't output entry view attribute in strict mode.
18868 (gen_inlined_subroutine_die): Check option variables.
18869 (dwarf2out_inline_entry): Likewise.
18870 (init_sections_and_labels): Likewise.
18871 (dwarf2out_early_finish): Likewise.
18872 (maybe_reset_location_view): New, from...
18873 (dwarf2out_var_location): ... here. Call it.
18874 * debug.h (dwarf2out_default_as_loc_support): Declare.
18875 (dwarf2out_default_as_locview_support): Declare.
18876 * hooks.c (hook_int_rtx_insn_0): New.
18877 * hooks.h (hook_int_rtx_insn_0): Declare.
18878 * toplev.c (process_options): Take -gas-loc-support and
18879 -gas-locview-support from dwarf2out. Enable
18880 -gvariable-location-views by default only with locview
18881 assembler support. Enable -ginternal-reset-location-views by
18882 default only if the target defines the corresponding hook.
18883 Enable -ginline-points by default if location views are
18884 enabled; force it disabled if statement frontiers are
18885 disabled.
18886 * tree-inline.c (expand_call_inline): Check option variables.
18887 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18888
18889 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18890
18891 PR tree-optimization/84321
18892 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18893 handling. Also check whether the anti-range contains any values
18894 that satisfy the mask; switch to a VR_RANGE if not.
18895
18896 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18897
18898 PR sanitizer/84340
18899 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18900
18901 2018-02-13 Martin Jambor <mjambor@suse.cz>
18902
18903 PR c++/83990
18904 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18905 of call statements, also set location of a load to a temporary.
18906
18907 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18908
18909 * config/rl78/rl78.c (add_vector_labels): New function.
18910 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18911 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18912 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18913 which checks that no arguments are passed.
18914 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18915 * doc/extend.texi: Documentation for the new attribute.
18916
18917 2018-02-13 Andreas Schwab <schwab@suse.de>
18918
18919 * config/riscv/linux.h (CPP_SPEC): Define.
18920
18921 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18922
18923 PR target/84335
18924 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18925 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18926 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18927 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18928 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18929 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18930 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18931 temporarily for AES and PCLMUL builtins.
18932
18933 PR tree-optimization/84339
18934 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18935 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18936 Formatting fixes.
18937
18938 PR middle-end/84309
18939 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18940 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18941 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18942 inline function.
18943 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18944 inline function.
18945 * omp-simd-clone.h: New file.
18946 * omp-simd-clone.c: Include omp-simd-clone.h.
18947 (expand_simd_clones): No longer static.
18948 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18949 cgraph.h and omp-simd-clone.h.
18950 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18951 (vect_recog_widen_shift_pattern): Formatting fix.
18952 (vect_pattern_recog_1): Don't check optab for calls.
18953
18954 PR target/84336
18955 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18956 operands[2] into a REG before using gen_lowpart on it.
18957
18958 2018-02-12 Jeff Law <law@redhat.com>
18959
18960 PR target/83760
18961 * config/sh/sh.c (find_barrier): Consider a sibling call
18962 a barrier as well.
18963
18964 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18965 successfully back substituting a reg.
18966
18967 2018-02-12 Richard Biener <rguenther@suse.de>
18968
18969 PR tree-optimization/84037
18970 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18971 parameter, move visited init to caller.
18972 (vect_slp_analyze_operations): Separate cost from validity
18973 check, initialize visited once for all instances.
18974 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18975 for all instances.
18976 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18977 out an assert.
18978 (vect_model_promotion_demotion_cost): Likewise.
18979 (vectorizable_bswap): Guard cost modeling with !slp_node
18980 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18981 SLP stmts.
18982 (vectorizable_call): Likewise.
18983 (vectorizable_conversion): Likewise.
18984 (vectorizable_assignment): Likewise.
18985 (vectorizable_shift): Likewise.
18986 (vectorizable_operation): Likewise.
18987 (vectorizable_store): Likewise.
18988 (vectorizable_load): Likewise.
18989 (vectorizable_condition): Likewise.
18990 (vectorizable_comparison): Likewise.
18991
18992 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18993
18994 PR sanitizer/84307
18995 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18996 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18997 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18998
18999 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19000
19001 PR middle-end/83665
19002 * params.def (inline-min-speedup): Increase from 8 to 15.
19003 (max-inline-insns-auto): Decrease from 40 to 30.
19004 * ipa-split.c (consider_split): Add some buffer for function to
19005 be considered inlining candidate.
19006 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
19007 default values.
19008
19009 2018-02-12 Richard Biener <rguenther@suse.de>
19010
19011 PR tree-optimization/84037
19012 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
19013 matched stmts if we cannot swap the non-matched ones.
19014
19015 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19016
19017 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
19018 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
19019 _mm_maskz_scalef_round_ss): New intrinsics.
19020 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
19021 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
19022 __builtin_ia32_scalefss_round): Remove.
19023 (__builtin_ia32_scalefsd_mask_round,
19024 __builtin_ia32_scalefss_mask_round): New intrinsics.
19025 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
19026 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
19027 ((match_operand:VF_128 2 "<round_nimm_predicate>"
19028 "<round_constraint>")): Changed to ...
19029 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
19030 "<round_scalar_constraint>")): ... this.
19031 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
19032 %0, %1, %2<round_op3>}"): Changed to ...
19033 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
19034 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
19035 %2<round_scalar_mask_op3>}"): ... this.
19036 * config/i386/subst.md (round_scalar_nimm_predicate): New.
19037
19038 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
19039
19040 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
19041 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
19042 (_mm_maskz_sqrt_round_ss): New intrinsics.
19043 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
19044 (__builtin_ia32_sqrtsd_mask_round)
19045 (__builtin_ia32_sqrtss_mask_round): New builtins.
19046 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
19047 (__builtin_ia32_sqrtss_round): Remove.
19048 (__builtin_ia32_sqrtsd_mask_round)
19049 (__builtin_ia32_sqrtss_mask_round): New builtins.
19050 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
19051 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
19052 ((match_operand:VF_128 1 "vector_operand"
19053 "xBm,<round_constraint>")): Changed to ...
19054 ((match_operand:VF_128 1 "vector_operand"
19055 "xBm,<round_scalar_constraint>")): ... this.
19056 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
19057 %0, %2, %<iptr>1<round_op3>}): Changed to ...
19058 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
19059 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
19060 %<iptr>1<round_scalar_mask_op3>}): ... this.
19061 ((set_attr "prefix" "<round_prefix>")): Changed to ...
19062 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
19063
19064 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
19065
19066 PR target/84266
19067 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
19068 Cast vec_cmpeq result to correct type.
19069 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
19070 Cast vec_cmpgt result to correct type.
19071
19072 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
19073
19074 * final.c (final_scan_insn_1): Renamed from...
19075 (final_scan_insn): ... this. New wrapper, to recover
19076 seen from the outermost call in recursive ones.
19077 * config/sparc/sparc.c (output_return): Drop seen from call.
19078 (output_sibcall): Likewise.
19079 * config/visium/visium.c (output_branch): Likewise.
19080
19081 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
19082
19083 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
19084 function label.
19085
19086 2018-02-10 Alan Modra <amodra@gmail.com>
19087
19088 PR target/84300
19089 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
19090 Specify LR as an input.
19091
19092 2018-02-10 Jakub Jelinek <jakub@redhat.com>
19093
19094 PR sanitizer/83987
19095 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
19096 remove_member_access_dummy_vars): New functions.
19097 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
19098 lower_omp_1, execute_lower_omp): Use them.
19099
19100 PR rtl-optimization/84308
19101 * shrink-wrap.c (spread_components): Release todo vector.
19102
19103 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
19104
19105 PR rtl-optimization/57193
19106 * ira-color.c (struct allocno_color_data): Add member
19107 conflict_allocno_hard_prefs.
19108 (update_conflict_allocno_hard_prefs): New.
19109 (bucket_allocno_compare_func): Add a preference based on
19110 conflict_allocno_hard_prefs.
19111 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
19112 (color_allocnos): Remove a dead code. Initiate
19113 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
19114
19115 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19116
19117 PR target/84226
19118 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
19119 constraint from =wa to wa. Avoid a subreg on the output operand,
19120 instead use a pseudo and subreg it in a move.
19121 (p9_xxbrd_<mode>): Changed to ...
19122 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
19123 (p9_xxbrd_v2df): New expander.
19124 (p9_xxbrw_<mode>): Changed to ...
19125 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
19126 (p9_xxbrw_v4sf): New expander.
19127
19128 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19129
19130 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
19131
19132 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
19133
19134 PR target/83926
19135 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
19136 multiply in 32-bit mode.
19137 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
19138 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
19139 mode.
19140
19141 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
19142
19143 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
19144 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
19145 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
19146 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
19147
19148 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
19149
19150 PR lto/84213
19151 * dwarf2out.c (is_trivial_indirect_ref): New function.
19152 (dwarf2out_late_global_decl): Do not generate a location
19153 attribute for variables that have a non-trivial DECL_VALUE_EXPR
19154 and that are not defined in the current unit.
19155
19156 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19157
19158 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
19159 instead of a libcall for UNORDERED.
19160
19161 2018-02-09 Tamar Christina <tamar.christina@arm.com>
19162
19163 PR target/82641
19164 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
19165 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
19166
19167 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19168
19169 PR target/PR84295
19170 * config/s390/s390.c (s390_set_current_function): Invoke
19171 s390_indirect_branch_settings also if fndecl didn't change.
19172
19173 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19174
19175 * config/rs6000/rs6000.md (blockage): Set length to zero.
19176
19177 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
19178
19179 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
19180
19181 2018-02-09 Jakub Jelinek <jakub@redhat.com>
19182
19183 PR sanitizer/84285
19184 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
19185 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
19186 -static-lib*san.
19187
19188 PR debug/84252
19189 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
19190 PARALLEL incoming that failed vt_get_decl_and_offset check.
19191
19192 PR middle-end/84237
19193 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
19194 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
19195 TREE_READONLY bit.
19196 (get_variable_section): For decls in named .bss* sections pass true as
19197 second argument to bss_initializer_p.
19198
19199 2018-02-09 Marek Polacek <polacek@redhat.com>
19200 Jakub Jelinek <jakub@redhat.com>
19201
19202 PR c++/83659
19203 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19204 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19205 Sync some changes from cxx_fold_indirect_ref.
19206
19207 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19208
19209 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19210 markers.
19211 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19212 (BLOCK_INLINE_ENTRY_LABEL): New.
19213 (dwarf2out_var_location): Disregard inline entry markers.
19214 (inline_entry_data): New struct.
19215 (inline_entry_data_hasher): New hashtable type.
19216 (inline_entry_data_hasher::hash): New.
19217 (inline_entry_data_hasher::equal): New.
19218 (inline_entry_data_table): New variable.
19219 (add_high_low_attributes): Add DW_AT_entry_pc and
19220 DW_AT_GNU_entry_view attributes if a pending entry is found
19221 in inline_entry_data_table. Add old entry_pc attribute only
19222 if debug nonbinding markers are disabled.
19223 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19224 markers are enabled.
19225 (block_within_block_p, dwarf2out_inline_entry): New.
19226 (dwarf2out_finish): Check that no entries remained in
19227 inline_entry_data_table.
19228 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19229 (final_scan_insn, notice_source_line): Likewise.
19230 (rest_of_clean_state): Skip inline entry markers.
19231 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19232 markers.
19233 * gimple.c (gimple_build_debug_inline_entry): New.
19234 * gimple.h (enum gimple_debug_subcode): Add
19235 GIMPLE_DEBUG_INLINE_ENTRY.
19236 (gimple_build_debug_inline_entry): Declare.
19237 (gimple_debug_inline_entry_p): New.
19238 (gimple_debug_nonbind_marker_p): Adjust.
19239 * insn-notes.def (INLINE_ENTRY): New.
19240 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19241 inline entry marker notes.
19242 (print_insn): Likewise.
19243 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19244 (INSN_DEBUG_MARKER_KIND): Likewise.
19245 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19246 * tree-inline.c (expand_call_inline): Build and insert
19247 debug_inline_entry stmt.
19248 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19249 inline entry blocks early, if nonbind markers are enabled.
19250 (dump_scope_block): Dump fragment info.
19251 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19252 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19253 (gimple_build_debug_inline_entry): New.
19254 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19255 Enable/disable inline entry points too.
19256 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19257 (DEBUG_INSN): Describe inline entry markers.
19258
19259 * common.opt (gvariable-location-views): New.
19260 (gvariable-location-views=incompat5): New.
19261 * config.in: Rebuilt.
19262 * configure: Rebuilt.
19263 * configure.ac: Test assembler for view support.
19264 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19265 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19266 * dwarf2out.c (var_loc_view): New typedef.
19267 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19268 (dwarf2out_locviews_in_attribute): New.
19269 (dwarf2out_locviews_in_loclist): New.
19270 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19271 (enum dw_line_info_opcode): Add LI_adv_address.
19272 (struct dw_line_info_table): Add view.
19273 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19274 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19275 (zero_view_p): New variable.
19276 (ZERO_VIEW_P): New macro.
19277 (output_asm_line_debug_info): New.
19278 (struct var_loc_node): Add view.
19279 (add_AT_view_list, AT_loc_list): New.
19280 (add_var_loc_to_decl): Add view param. Test it against last.
19281 (new_loc_list): Add view params. Record them.
19282 (AT_loc_list_ptr): Handle loc and view lists.
19283 (view_list_to_loc_list_val_node): New.
19284 (print_dw_val): Handle dw_val_class_view_list.
19285 (size_of_die): Likewise.
19286 (value_format): Likewise.
19287 (loc_list_has_views): New.
19288 (gen_llsym): Set vl_symbol too.
19289 (maybe_gen_llsym, skip_loc_list_entry): New.
19290 (dwarf2out_maybe_output_loclist_view_pair): New.
19291 (output_loc_list): Output view list or entries too.
19292 (output_view_list_offset): New.
19293 (output_die): Handle dw_val_class_view_list.
19294 (output_dwarf_version): New.
19295 (output_compilation_unit_header): Use it.
19296 (output_skeleton_debug_sections): Likewise.
19297 (output_rnglists, output_line_info): Likewise.
19298 (output_pubnames, output_aranges): Update version comments.
19299 (output_one_line_info_table): Output view numbers in asm comments.
19300 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19301 Call maybe_gen_llsym.
19302 (loc_list_from_tree_1): Adjust.
19303 (add_AT_location_description): Create view list attribute if
19304 needed, check it's absent otherwise.
19305 (convert_cfa_to_fb_loc_list): Adjust.
19306 (maybe_emit_file): Call output_asm_line_debug_info for test.
19307 (dwarf2out_var_location): Reset views as needed. Precompute
19308 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19309 attribute. Set view.
19310 (new_line_info_table): Reset next view.
19311 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19312 (dwarf2out_source_line): Likewise. Output view resets and labels to
19313 the assembler, or select appropriate line info opcodes.
19314 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19315 (optimize_string_length): Catch it. Adjust.
19316 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19317 dw_val_class_view_list, and remove it if no longer needed.
19318 (hash_loc_list): Hash view numbers.
19319 (loc_list_hasher::equal): Compare them.
19320 (optimize_location_lists): Check whether a view list symbol is
19321 needed, and whether the locview attribute is present, and
19322 whether they match. Remove the locview attribute if no longer
19323 needed.
19324 (index_location_lists): Call skip_loc_list_entry for test.
19325 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19326 Use output_dwarf_version.
19327 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19328 (struct dw_val_node): Add val_view_list.
19329 * final.c (SEEN_NEXT_VIEW): New.
19330 (set_next_view_needed): New.
19331 (clear_next_view_needed): New.
19332 (maybe_output_next_view): New.
19333 (final_start_function): Rename to...
19334 (final_start_function_1): ... this. Take pointer to FIRST,
19335 add SEEN parameter. Emit param bindings in the initial view.
19336 (final_start_function): Reintroduce SEEN-less interface.
19337 (final): Rename to...
19338 (final_1): ... this. Take SEEN parameter. Output final pending
19339 next view at the end.
19340 (final): Reintroduce seen-less interface.
19341 (final_scan_insn): Output pending next view before switching
19342 sections or ending a block. Mark the next view as needed when
19343 outputting variable locations. Notify debug backend of section
19344 changes, and of location view changes.
19345 (rest_of_handle_final): Adjust.
19346 * toplev.c (process_options): Autodetect value for debug variable
19347 location views option. Warn on incompat5 without -gdwarf-5.
19348 * doc/invoke.texi (gvariable-location-views): New.
19349 (gvariable-location-views=incompat5): New.
19350 (gno-variable-location-views): New.
19351
19352 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19353
19354 PR tree-optimization/84136
19355 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19356 that the result of find_edge is non-NULL.
19357
19358 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19359
19360 PR target/83008
19361 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19362 storing integer register in SImode. Fix cost of 256 and 512
19363 byte aligned SSE register store.
19364
19365 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19366
19367 * config/i386/i386.c (ix86_multiplication_cost): Fix
19368 multiplication cost for TARGET_AVX512DQ.
19369
19370 2018-02-08 Marek Polacek <polacek@redhat.com>
19371
19372 PR tree-optimization/84238
19373 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19374 get_range_strlen.
19375
19376 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19377
19378 PR tree-optimization/84265
19379 * tree-vect-stmts.c (vectorizable_store): Don't treat
19380 VMAT_CONTIGUOUS accesses as grouped.
19381 (vectorizable_load): Likewise.
19382
19383 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19384
19385 PR tree-optimization/81635
19386 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19387 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19388 (test_round_for_mask): New functions.
19389 (wide_int_cc_tests): Call test_round_for_mask.
19390 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19391 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19392 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19393 range returned by get_range_info.
19394
19395 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19396
19397 PR ipa/81360
19398 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19399 * symtab.c: Include builtins.h
19400 (symtab_node::output_to_lto_symbol_table_p): Move here
19401 from lto-streamer-out.c:output_symbol_p.
19402 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19403 (output_symbol_p): Move all logic to symtab.c
19404 (produce_symtab): Update.
19405
19406 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19407
19408 * config/s390/s390-opts.h (enum indirect_branch): Define.
19409 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19410 (s390_indirect_branch_via_thunk)
19411 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19412 (enum s390_indirect_branch_type): Define.
19413 * config/s390/s390.c (struct s390_frame_layout, struct
19414 machine_function): Remove.
19415 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19416 (indirect_branch_table_label_no, indirect_branch_table_name):
19417 Define variables.
19418 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19419 (enum s390_indirect_branch_option): Define.
19420 (s390_return_addr_from_memory): New function.
19421 (s390_handle_string_attribute): New function.
19422 (s390_attribute_table): Add new attribute handler.
19423 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19424 (s390_indirect_branch_via_thunk): New function.
19425 (s390_indirect_branch_via_inline_thunk): New function.
19426 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19427 sibling call optimization for non z10 compiles.
19428 (s390_emit_call): Force indirect branch target to be a single
19429 register. Add r1 clobber for non-z10 compiles.
19430 (s390_emit_epilogue): Emit return jump via return_use expander.
19431 (s390_reorg): Handle JUMP_INSNs as execute targets.
19432 (s390_option_override_internal): Perform validity checks for the
19433 new command line options.
19434 (s390_indirect_branch_attrvalue): New function.
19435 (s390_indirect_branch_settings): New function.
19436 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19437 (s390_output_indirect_thunk_function): New function.
19438 (s390_code_end): Implement target hook.
19439 (s390_case_values_threshold): Implement target hook.
19440 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19441 macros.
19442 * config/s390/s390.h (struct s390_frame_layout)
19443 (struct machine_function): Move here from s390.c.
19444 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19445 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19446 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19447 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19448 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19449 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19450 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19451 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19452 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19453 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19454 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19455 (mnemonic attribute): Add values which aren't recognized
19456 automatically.
19457 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19458 pattern for branch conversion. Fix mnemonic attribute.
19459 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19460 indirect branch via thunk if requested.
19461 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19462 ("*indirect_jump"): Disable for branch conversion using out of
19463 line thunks.
19464 ("indirect_jump_via_thunk<mode>_z10")
19465 ("indirect_jump_via_thunk<mode>")
19466 ("indirect_jump_via_inlinethunk<mode>_z10")
19467 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19468 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19469 ("casesi_jump_via_inlinethunk<mode>_z10")
19470 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19471 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19472 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19473 ("*indirect2_jump"): Disable for branch conversion.
19474 ("casesi_jump"): Turn into expander and expand patterns for branch
19475 conversion.
19476 ("return_use"): New expander.
19477 ("*return"): Emit return via thunk and rename it to ...
19478 ("*return<mode>"): ... this one.
19479 * config/s390/s390.opt: Add new options and and enum for the
19480 option values.
19481
19482 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19483
19484 * lra-constraints.c (match_reload): Unconditionally use
19485 gen_lowpart_SUBREG, rather than selecting between that
19486 and equivalent gen_rtx_SUBREG code.
19487
19488 2018-02-08 Richard Biener <rguenther@suse.de>
19489
19490 PR tree-optimization/84233
19491 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19492 changed flag instead of boguously re-using phi_inserted.
19493
19494 2018-02-08 Martin Jambor <mjambor@suse.cz>
19495
19496 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19497 static local variables.
19498
19499 2018-02-08 Richard Biener <rguenther@suse.de>
19500
19501 PR tree-optimization/84278
19502 * tree-vect-stmts.c (vectorizable_store): When looking for
19503 smaller vector types to perform grouped strided loads/stores
19504 make sure the mode is supported by the target.
19505 (vectorizable_load): Likewise.
19506
19507 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19508
19509 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19510 Increase LDP/STP opportunities by adding adjacent callee-saves.
19511
19512 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19513
19514 PR rtl-optimization/84068
19515 PR rtl-optimization/83459
19516 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19517
19518 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19519
19520 PR tree-optimization/84224
19521 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19522 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19523 non-zero arguments.
19524
19525 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19526
19527 PR target/84113
19528 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19529 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19530 count, remove one USE.
19531
19532 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19533
19534 * doc/install.texi (Configuration): Document the
19535 --with-long-double-format={ibm,ieee} PowerPC configuration
19536 options.
19537
19538 PR target/84154
19539 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19540 Convert from define_expand to be define_insn_and_split. Rework
19541 float/double/_Float128 conversions to QI/HI/SImode to work with
19542 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19543 conversions to QI/HImode types did a store and then a load to
19544 truncate the value. For conversions to VSX registers, don't split
19545 the insn, instead emit the code directly. Use the code iterator
19546 any_fix to combine signed and unsigned conversions.
19547 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19548 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19549 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19550 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19551 (fix_<mode>di2_hw): Likewise.
19552 (fixuns_<mode>di2_hw): Likewise.
19553 (fix_<mode>si2_hw): Likewise.
19554 (fixuns_<mode>si2_hw): Likewise.
19555 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19556 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19557 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19558 fix<uns>_trunc<SFDF:mode>si2_p8.
19559 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19560 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19561 (fix<uns>_<mode>_mem): Likewise.
19562 (fctiw<u>z_<mode>_mem): Likewise.
19563 (fix<uns>_<mode>_mem): Likewise.
19564 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19565 the register allocator from doing a direct move to the GPRs to do
19566 a store, and instead use the ISA 3.0 store byte/half-word from
19567 vector register instruction. For IEEE 128-bit floating point,
19568 also optimize stores of 32-bit ints.
19569 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19570
19571 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19572
19573 * genextract.c (push_pathstr_operand): New function to support
19574 [a-zA-Z].
19575 (walk_rtx): Call push_pathstr_operand.
19576 (print_path): Support [a-zA-Z].
19577
19578 2018-02-07 Richard Biener <rguenther@suse.de>
19579
19580 PR tree-optimization/84037
19581 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19582 (cse_and_gimplify_to_preheader): Declare.
19583 (vect_get_place_in_interleaving_chain): Likewise.
19584 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19585 ivexpr_map.
19586 (_loop_vec_info::~_loop_vec_info): Delete it.
19587 (cse_and_gimplify_to_preheader): New function.
19588 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19589 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19590 (vectorizable_load): Likewise. For grouped stores always base
19591 the IV on the first element.
19592 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19593 condition before gimplifying.
19594
19595 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19596
19597 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19598 *DIV_EXPR and *MOD_EXPR.
19599
19600 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19601
19602 PR target/84248
19603 * config/i386/i386.c (ix86_option_override_internal): Mask out
19604 the CF_SET bit when checking -fcf-protection.
19605
19606 2018-02-07 Tom de Vries <tom@codesourcery.com>
19607
19608 PR libgomp/84217
19609 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19610 enough.
19611
19612 2018-02-07 Richard Biener <rguenther@suse.de>
19613
19614 PR tree-optimization/84204
19615 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19616 this place.
19617
19618 PR tree-optimization/84205
19619 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19620 special-case isl_ast_op_zdiv_r.
19621
19622 PR tree-optimization/84223
19623 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19624 Only add conditions from within the region.
19625 (gather_bbs::after_dom_children): Adjust.
19626
19627 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19628
19629 PR target/84209
19630 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19631 * config/avr/avr.md: Only post-reload split REG-REG moves if
19632 either register is GENERAL_REG_P.
19633
19634 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19635
19636 PR tree-optimization/84235
19637 * tree-ssa-scopedtables.c
19638 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19639 if the subtraction is performed in floating point type where NaNs are
19640 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19641 build 1. Formatting fix.
19642
19643 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19644
19645 PR target/84146
19646 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19647 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19648 and skip it regardless of bb boundaries. Use CALL_P macro,
19649 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19650 unnecessarily, formatting fix.
19651
19652 2018-02-06 Michael Collison <michael.collison@arm.com>
19653
19654 * config/arm/thumb2.md:
19655 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19656 (*thumb_mov_notscc): Ditto.
19657
19658 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19659
19660 PR target/84154
19661 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19662 unsigned_fix, not "s".
19663
19664 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19665
19666 * configure.ac (gcc_fn_eh_frame_ro): New function.
19667 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19668 correct .eh_frame permissions.
19669 * configure: Regenerate.
19670
19671 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19672
19673 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19674 irrelevant options.
19675
19676 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19677
19678 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19679 Display warning message for -mno-speculate-indirect-jumps.
19680
19681 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19682
19683 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19684 Undocumented.
19685 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19686
19687 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19688
19689 PR tree-optimization/84225
19690 * tree-eh.c (find_trapping_overflow): Only call
19691 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19692
19693 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19694
19695 PR target/84145
19696 * config/i386/i386.c: Reimplement the check of possible options
19697 -mibt/-mshstk conbination. Change error messages.
19698 * doc/invoke.texi: Fix a typo: remove extra '='.
19699
19700 2018-02-06 Marek Polacek <polacek@redhat.com>
19701
19702 PR tree-optimization/84228
19703 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19704
19705 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19706
19707 PR target/82641
19708 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19709 emitted arch directives.
19710 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19711 __ARM_FEATURE_COPROC before changing architectures.
19712
19713 2018-02-06 Richard Biener <rguenther@suse.de>
19714
19715 * config/i386/i386.c (print_reg): Fix typo.
19716 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19717
19718 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19719
19720 * configure: Regenerate.
19721
19722 2018-02-05 Martin Sebor <msebor@redhat.com>
19723
19724 PR tree-optimization/83369
19725 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19726 inlining context.
19727
19728 2018-02-05 Martin Liska <mliska@suse.cz>
19729
19730 * doc/invoke.texi: Cherry-pick upstream r323995.
19731
19732 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19733
19734 * ira.c (ira_init_register_move_cost): Adjust comment.
19735
19736 2018-02-05 Martin Liska <mliska@suse.cz>
19737
19738 PR gcov-profile/84137
19739 * doc/gcov.texi: Fix typo in documentation.
19740
19741 2018-02-05 Martin Liska <mliska@suse.cz>
19742
19743 PR gcov-profile/83879
19744 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19745 using dlopen functionality.
19746
19747 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19748
19749 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19750 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19751 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19752 _mm_maskz_range_round_ss): New intrinsics.
19753 (__builtin_ia32_rangesd128_round)
19754 (__builtin_ia32_rangess128_round): Remove.
19755 (__builtin_ia32_rangesd128_mask_round,
19756 __builtin_ia32_rangess128_mask_round): New builtins.
19757 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19758 __builtin_ia32_rangess128_round): Remove.
19759 (__builtin_ia32_rangesd128_mask_round,
19760 __builtin_ia32_rangess128_mask_round): New builtins.
19761 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19762 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19763 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19764 "<round_saeonly_constraint>")): Changed to ...
19765 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19766 "<round_saeonly_scalar_constraint>")): ... this.
19767 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19768 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19769 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19770 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19771 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19772
19773 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19774
19775 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19776 options.
19777 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19778 Remove all values except native, 8540 and 8548.
19779
19780 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19781
19782 * config/i386/i386.c (ix86_output_function_return): Pass
19783 INVALID_REGNUM, instead of -1, as invalid register number to
19784 indirect_thunk_name and output_indirect_thunk.
19785
19786 2018-02-02 Julia Koval <julia.koval@intel.com>
19787
19788 * config.gcc: Add -march=icelake.
19789 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19790 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19791 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19792 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19793 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19794 (processor_target_table): Add icelake.
19795 (ix86_option_override_internal): Handle new PTAs.
19796 (get_builtin_code_for_version): Handle icelake.
19797 (M_INTEL_COREI7_ICELAKE): New.
19798 (fold_builtin_cpu): Handle icelake.
19799 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19800 * doc/invoke.texi: Add -march=icelake.
19801
19802 2018-02-02 Julia Koval <julia.koval@intel.com>
19803
19804 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19805 to wide_int_bitmask.
19806 * wide-int-bitmask.h: New.
19807
19808 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19809
19810 PR target/84066
19811 * config/i386/i386.md: Replace Pmode with word_mode in
19812 builtin_setjmp_setup and builtin_longjmp to support x32.
19813
19814 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19815
19816 PR target/56010
19817 PR target/83743
19818 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19819 #include "opts.h".
19820 (rs6000_supported_cpu_names): New static variable.
19821 (linux_cpu_translation_table): Likewise.
19822 (elf_platform) <cpu>: Define new static variable and use it.
19823 Translate kernel AT_PLATFORM name to canonical name if needed.
19824 Error if platform name is unknown.
19825
19826 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19827
19828 PR target/84089
19829 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19830
19831 2018-02-01 Jeff Law <law@redhat.com>
19832
19833 PR target/84128
19834 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19835 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19836 the scratch if RELEASE_VIA_POP is false.
19837 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19838 If we have to save a temporary register, decrement SIZE appropriately.
19839 Pass new arguments to release_scratch_register_on_entry.
19840 (ix86_adjust_stack_and_probe): Likewise.
19841 (ix86_emit_probe_stack_range): Pass new arguments to
19842 release_scratch_register_on_entry.
19843
19844 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19845
19846 PR rtl-optimization/84157
19847 * combine.c (change_zero_ext): Use REG_P predicate in
19848 front of HARD_REGISTER_P predicate.
19849
19850 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19851
19852 * config/avr/avr.c (avr_option_override): Move disabling of
19853 -fdelete-null-pointer-checks to...
19854 * common/config/avr/avr-common.c (avr_option_optimization_table):
19855 ...here.
19856
19857 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19858
19859 PR tree-optimization/81635
19860 * tree-data-ref.c (split_constant_offset_1): For types that
19861 wrap on overflow, try to use range info to prove that wrapping
19862 cannot occur.
19863
19864 2018-02-01 Renlin Li <renlin.li@arm.com>
19865
19866 PR target/83370
19867 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19868 TAILCALL_ADDR_REGS.
19869 (aarch64_register_move_cost): Likewise.
19870 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19871 TAILCALL_ADDR_REGS.
19872 (REG_CLASS_NAMES): Likewise.
19873 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19874 TAILCALL_ADDR_REGS. Remove IP registers.
19875 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19876
19877 2018-02-01 Richard Biener <rguenther@suse.de>
19878
19879 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19880 for specifying RPO order and allow NULL for that.
19881 * domwalk.c (dom_walker::dom_walker): Likewise.
19882 (dom_walker::walk): Handle NULL RPO order.
19883 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19884 in RPO order.
19885 (rewrite_update_dom_walker): Likewise.
19886 (mark_def_dom_walker): Likewise.
19887
19888 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19889
19890 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19891 (aarch64_maybe_expand_sve_subreg_move): Declare.
19892 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19893 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19894 predicate.
19895 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19896 that are semantically a reverse operation.
19897 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19898 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19899 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19900 functions.
19901 (aarch64_can_change_mode_class): For big-endian, forbid changes
19902 between two SVE modes if they have different element sizes.
19903
19904 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19905
19906 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19907 the TImode handling for big-endian targets.
19908
19909 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19910
19911 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19912 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19913 not just bytes.
19914 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19915 Remove BSWAP handing for big-endian targets and use the form of
19916 LD1RQ appropariate for the mode.
19917
19918 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19919
19920 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19921 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19922 duplicated element.
19923
19924 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19925
19926 PR tearget/83845
19927 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19928 check for operands that need to go through aarch64_sve_reload_be.
19929
19930 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19931
19932 PR tree-optimization/81661
19933 PR tree-optimization/84117
19934 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19935 * tree-eh.c: Include gimplify.h.
19936 (find_trapping_overflow, replace_trapping_overflow,
19937 rewrite_to_non_trapping_overflow): New functions.
19938 * tree-vect-loop.c: Include tree-eh.h.
19939 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19940 * tree-data-ref.c: Include tree-eh.h.
19941 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19942
19943 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19944
19945 PR rtl-optimization/84123
19946 * combine.c (change_zero_ext): Check if hard register satisfies
19947 can_change_dest_mode before calling gen_lowpart_SUBREG.
19948
19949 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19950
19951 PR target/82444
19952 * ira.c (ira_init_register_move_cost): Remove assert.
19953
19954 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19955
19956 PR rtl-optimization/84071
19957 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19958 * doc/tm.texi: Regenerate.
19959
19960 2018-01-31 Richard Biener <rguenther@suse.de>
19961
19962 PR tree-optimization/84132
19963 * tree-data-ref.c (analyze_miv_subscript): Properly
19964 check whether evolution_function_is_affine_multivariate_p
19965 before calling gcd_of_steps_may_divide_p.
19966
19967 2018-01-31 Julia Koval <julia.koval@intel.com>
19968
19969 PR target/83618
19970 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19971 * config/i386/i386.md (rdpid_rex64) New.
19972 (rdpid): Make 32bit only.
19973
19974 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19975
19976 PR lto/84105
19977 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19978 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19979
19980 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19981
19982 Revert
19983 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19984
19985 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19986
19987 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19988
19989 PR rtl-optimization/84071
19990 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19991 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19992
19993 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19994
19995 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19996 (arc_attribute_table): Add 'aux' attribute.
19997 (arc_in_small_data_p): Consider aux like variables.
19998 (arc_is_aux_reg_p): New function.
19999 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
20000 (arc_get_aux_arg): New function.
20001 (prepare_move_operands): Handle aux-register access.
20002 (arc_handle_aux_attribute): New function.
20003 * doc/extend.texi (ARC Variable attributes): Add subsection.
20004
20005 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
20006
20007 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
20008 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
20009 (arc_attribute_table): Add 'uncached' attribute.
20010 (arc_print_operand): Print '.di' flag for uncached memory
20011 accesses.
20012 (arc_in_small_data_p): Do not consider for small data the uncached
20013 types.
20014 (arc_is_uncached_mem_p): New function.
20015 * config/arc/predicates.md (compact_store_memory_operand): Check
20016 for uncached memory accesses.
20017 (nonvol_nonimm_operand): Likewise.
20018 * doc/extend.texi (ARC Type Attribute): New subsection.
20019
20020 2018-01-31 Jakub Jelinek <jakub@redhat.com>
20021
20022 PR c/84100
20023 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
20024 falign-loops=): Add Optimization flag.
20025
20026 2018-01-30 Jeff Law <law@redhat.com>
20027
20028 PR target/84064
20029 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
20030 INT_REGISTERS_SAVED. Check it prior to calling
20031 get_scratch_register_on_entry.
20032 (ix86_adjust_stack_and_probe): Similarly.
20033 (ix86_emit_probe_stack_range): Similarly.
20034 (ix86_expand_prologue): Corresponding changes.
20035
20036 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20037
20038 PR target/40411
20039 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
20040 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
20041
20042 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
20043
20044 PR target/84112
20045 * lra-constraints.c (curr_insn_transform): Process AND in the
20046 address.
20047
20048 2018-01-30 Jakub Jelinek <jakub@redhat.com>
20049
20050 PR rtl-optimization/83986
20051 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
20052 dependence against last_pending_memory_flush in addition to
20053 pending_jump_insns.
20054
20055 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
20056
20057 PR tree-optimization/81611
20058 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
20059 copies.
20060
20061 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20062
20063 PR target/83758
20064 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
20065 a reg rtx.
20066
20067 2018-01-30 Richard Biener <rguenther@suse.de>
20068 Jakub Jelinek <jakub@redhat.com>
20069
20070 PR tree-optimization/84111
20071 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
20072 inner loops added during recursion, as they don't have up-to-date
20073 SSA form.
20074
20075 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20076
20077 PR ipa/81360
20078 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
20079 (can_inline_edge_by_limits_p): ... here.
20080 (can_early_inline_edge_p, check_callers,
20081 update_caller_keys, update_callee_keys, recursive_inlining,
20082 add_new_edges_to_heap, speculation_useful_p,
20083 inline_small_functions,
20084 inline_small_functions, flatten_function,
20085 inline_to_all_callers_1): Update.
20086
20087 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
20088
20089 * profile-count.c (profile_count::combine_with_ipa_count): Handle
20090 zeros correctly.
20091
20092 2018-01-30 Richard Biener <rguenther@suse.de>
20093
20094 PR tree-optimization/83008
20095 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
20096 invariant and constant vector uses in stmts when they need
20097 more than one stmt.
20098
20099 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20100
20101 PR bootstrap/84017
20102 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
20103 * configure: Regenerate.
20104
20105 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20106
20107 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
20108 pattern.
20109 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
20110 Use gen_rtx_REG rather than gen_lowpart.
20111
20112 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20113
20114 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
20115 rather than 0 when creating partial subregs.
20116
20117 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
20118
20119 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
20120 of usage.
20121
20122 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
20123
20124 PR target/81550
20125 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
20126 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
20127 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
20128 flags. This restores the settings used before the 2017-07-24.
20129 Turning off pre increment/decrement/modify allows IVOPTS to
20130 optimize DF/SF loops where the index is an int.
20131
20132 2018-01-29 Richard Biener <rguenther@suse.de>
20133 Kelvin Nilsen <kelvin@gcc.gnu.org>
20134
20135 PR bootstrap/80867
20136 * tree-vect-stmts.c (vectorizable_call): Don't call
20137 targetm.vectorize_builtin_md_vectorized_function if callee is
20138 NULL.
20139
20140 2018-01-22 Carl Love <cel@us.ibm.com>
20141
20142 * doc/extend.tex: Fix typo in second arg in
20143 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
20144
20145 2018-01-29 Richard Biener <rguenther@suse.de>
20146
20147 PR tree-optimization/84086
20148 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
20149 (flush_ssaname_freelist): When SSA names were released reset
20150 the SCEV hash table.
20151
20152 2018-01-29 Richard Biener <rguenther@suse.de>
20153
20154 PR tree-optimization/84057
20155 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
20156 removed paths when removing edges.
20157
20158 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
20159
20160 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
20161 -mfunction-return=@var{choice}.
20162
20163 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
20164
20165 PR diagnostic/84034
20166 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
20167 Handle CR like TAB.
20168 (layout::print_source_line): Likewise.
20169 (test_get_line_width_without_trailing_whitespace): Add test cases.
20170
20171 2018-01-27 Jakub Jelinek <jakub@redhat.com>
20172
20173 PR middle-end/84040
20174 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
20175 debug insns.
20176
20177 2018-01-26 Jim Wilson <jimw@sifive.com>
20178
20179 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
20180
20181 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
20182 specified.
20183
20184 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20185
20186 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
20187 and CMP + SUB-immediate -> SUBS.
20188
20189 2018-01-26 Martin Sebor <msebor@redhat.com>
20190
20191 PR tree-optimization/83896
20192 * tree-ssa-strlen.c (get_string_len): Rename...
20193 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
20194 Avoid assuming length is constant.
20195 (handle_char_store): Use HOST_WIDE_INT for string length.
20196
20197 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
20198
20199 PR target/81763
20200 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
20201 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
20202
20203 2018-01-26 Richard Biener <rguenther@suse.de>
20204
20205 PR rtl-optimization/84003
20206 * dse.c (record_store): Only record redundant stores when
20207 the earlier store aliases at least all accesses the later one does.
20208
20209 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20210
20211 PR rtl-optimization/83985
20212 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20213 REG_CFA_RESTORE insns.
20214 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20215 REG_CFA_RESTORE insns here.
20216
20217 PR c/83989
20218 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20219 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20220
20221 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20222
20223 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20224 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20225 (arc_init): Likewise.
20226 (arc_override_options): Likewise.
20227 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20228 value.
20229 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20230 support.
20231 * config/arc/arc.h (TARGET_DBNZ): Define.
20232 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20233 properly set the tune attribute.
20234 (dbnz): Use TARGET_DBNZ guard.
20235 * config/arc/arc.opt (mtune): Add core3 option.
20236
20237 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20238
20239 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20240 recognize new pic like addresses.
20241 (arc_delegitimize_address): Clean up.
20242
20243 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20244
20245 * config/arc/arc-arches.def: Option mrf16 valid for all
20246 architectures.
20247 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20248 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20249 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20250 * config/arc/arc-tables.opt: Regenerate.
20251 * config/arc/arc.c (arc_conditional_register_usage): Handle
20252 reduced register file case.
20253 (arc_file_start): Set must have build attributes.
20254 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20255 mrf16 option value.
20256 * config/arc/arc.opt (mrf16): Add new option.
20257 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20258 * config/arc/genmultilib.awk: Handle new mrf16 option.
20259 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20260 * config/arc/t-multilib: Regenerate.
20261 * doc/invoke.texi (ARC Options): Document mrf16 option.
20262
20263 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20264
20265 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20266 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20267 (arc_attribute_table): Add 'secure_call' attribute.
20268 (arc_print_operand): Print secure call operand.
20269 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20270 secure.
20271 (arc_is_secure_call_p): New function. * config/arc/arc.md
20272 (call_i): Add support for sjli instruction.
20273 (call_value_i): Likewise.
20274 * config/arc/constraints.md (Csc): New constraint.
20275
20276 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20277 John Eric Martin <John.Martin@emmicro-us.com>
20278
20279 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20280 * config/arc/arc.c (_arc_jli_section): New struct.
20281 (arc_jli_section): New type.
20282 (rc_jli_sections): New static variable.
20283 (arc_handle_jli_attribute): New function.
20284 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20285 (arc_file_end): New function.
20286 (TARGET_ASM_FILE_END): Define.
20287 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20288 (arc_add_jli_section): New function.
20289 (jli_call_scan): Likewise.
20290 (arc_reorg): Call jli_call_scan.
20291 (arc_output_addsi): Remove 'S' from printing asm operand.
20292 (arc_is_jli_call_p): New function.
20293 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20294 operand.
20295 (movhi_insn): Likewise.
20296 (movsi_insn): Likewise.
20297 (movsi_set_cc_insn): Likewise.
20298 (loadqi_update): Likewise.
20299 (load_zeroextendqisi_update): Likewise.
20300 (load_signextendqisi_update): Likewise.
20301 (loadhi_update): Likewise.
20302 (load_zeroextendhisi_update): Likewise.
20303 (load_signextendhisi_update): Likewise.
20304 (loadsi_update): Likewise.
20305 (loadsf_update): Likewise.
20306 (movsicc_insn): Likewise.
20307 (bset_insn): Likewise.
20308 (bxor_insn): Likewise.
20309 (bclr_insn): Likewise.
20310 (bmsk_insn): Likewise.
20311 (bicsi3_insn): Likewise.
20312 (cmpsi_cc_c_insn): Likewise.
20313 (movsi_ne): Likewise.
20314 (movsi_cond_exec): Likewise.
20315 (clrsbsi2): Likewise.
20316 (norm_f): Likewise.
20317 (normw): Likewise.
20318 (swap): Likewise.
20319 (divaw): Likewise.
20320 (flag): Likewise.
20321 (sr): Likewise.
20322 (kflag): Likewise.
20323 (ffs): Likewise.
20324 (ffs_f): Likewise.
20325 (fls): Likewise.
20326 (call_i): Remove 'S' asm letter, add jli instruction.
20327 (call_value_i): Likewise.
20328 * config/arc/arc.op (mjli-always): New option.
20329 * config/arc/constraints.md (Cji): New constraint.
20330 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20331 operand.
20332 (subsf3_fpx): Likewise.
20333 (mulsf3_fpx): Likewise.
20334 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20335 asm operand.
20336 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20337 function attrbutes.
20338 * doc/invoke.texi (ARC): Document mjli-always option.
20339
20340 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20341
20342 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20343 avoid addition with 0 and use incw and decw where possible.
20344
20345 2018-01-26 Richard Biener <rguenther@suse.de>
20346
20347 PR tree-optimization/81082
20348 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20349 association if it requires casting to unsigned.
20350 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20351 from fold_plusminus_mult_expr to catch important cases late when
20352 range info is available.
20353
20354 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20355
20356 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20357 * configure.ac (hidden_linkonce): New test.
20358 * configure: Regenerate.
20359 * config.in: Regenerate.
20360
20361 2018-01-26 Julia Koval <julia.koval@intel.com>
20362
20363 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20364 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20365 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20366 _mm_mask_bitshuffle_epi64_mask): Fix type.
20367 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20368 USI_FTYPE_V4DI_V4DI_USI): Remove.
20369 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20370 __builtin_ia32_vpshufbitqmb256_mask,
20371 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20372 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20373 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20374
20375 2018-01-26 Alan Modra <amodra@gmail.com>
20376
20377 PR target/84033
20378 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20379 UNSPEC_VBPERMQ. Sort other unspecs.
20380
20381 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20382
20383 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20384
20385 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20386
20387 PR middle-end/83055
20388 * predict.c (drop_profile): Do not push/pop cfun; update also
20389 node->count.
20390 (handle_missing_profiles): Fix logic looking for zero profiles.
20391
20392 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20393
20394 PR middle-end/83977
20395 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20396 on functions with #pragma omp declare simd or functions with simd
20397 attribute.
20398 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20399 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20400 Remove trailing \n from warning_at calls.
20401
20402 2018-01-25 Tom de Vries <tom@codesourcery.com>
20403
20404 PR target/84028
20405 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20406 for neutered workers.
20407
20408 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20409
20410 PR target/68467
20411 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20412 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20413
20414 2018-01-24 Jeff Law <law@redhat.com>
20415
20416 PR target/83994
20417 * i386.c (get_probe_interval): Move to earlier point.
20418 (ix86_compute_frame_layout): If -fstack-clash-protection and
20419 the frame is larger than the probe interval, then use pushes
20420 to save registers rather than reg->mem moves.
20421 (ix86_expand_prologue): Remove conditional for int_registers_saved
20422 assertion.
20423
20424 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20425
20426 PR target/84014
20427 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20428 min/max for never referenced object.
20429
20430 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20431
20432 PR middle-end/83977
20433 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20434 here.
20435 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20436 attributes from DECL_ATTRIBUTES (decl) without affecting
20437 DECL_ATTRIBUTES (current_function_decl).
20438 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20439 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20440
20441 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20442
20443 PR tree-optimization/83979
20444 * fold-const.c (fold_comparison): Use constant_boolean_node
20445 instead of boolean_{true,false}_node.
20446
20447 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20448
20449 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20450 with zero counts.
20451
20452 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20453
20454 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20455 Simplify the clause that sets the length attribute.
20456 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20457 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20458 clause that sets the length attribute.
20459 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20460
20461 2018-01-24 Tom de Vries <tom@codesourcery.com>
20462
20463 PR target/83589
20464 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20465 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20466 Add strict parameter.
20467 (prevent_branch_around_nothing): Insert dummy insn between branch to
20468 label and label with no ptx insn inbetween.
20469 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20470
20471 2018-01-24 Tom de Vries <tom@codesourcery.com>
20472
20473 PR target/81352
20474 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20475 for neutered threads in warp.
20476 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20477
20478 2018-01-24 Richard Biener <rguenther@suse.de>
20479
20480 PR tree-optimization/83176
20481 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20482 operands.
20483
20484 2018-01-24 Richard Biener <rguenther@suse.de>
20485
20486 PR tree-optimization/82819
20487 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20488 code generating pluses that are no-ops in the target precision.
20489
20490 2018-01-24 Richard Biener <rguenther@suse.de>
20491
20492 PR middle-end/84000
20493 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20494
20495 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20496
20497 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20498 to merge probabilities.
20499 * predict.c (probably_never_executed): Also mark as cold functions
20500 with global 0 profile and guessed local profile.
20501 * profile-count.c (profile_probability::combine_with_count): New
20502 member function.
20503 * profile-count.h (profile_probability::operator*,
20504 profile_probability::operator*=, profile_probability::operator/,
20505 profile_probability::operator/=): Reduce precision to adjusted
20506 and set value to guessed on contradictory divisions.
20507 (profile_probability::combine_with_freq): Remove.
20508 (profile_probability::combine_wiht_count): Declare.
20509 (profile_count::force_nonzero):: Set to adjusted.
20510 (profile_count::probability_in):: Set quality to adjusted.
20511 * tree-ssa-tail-merge.c (replace_block_by): Use
20512 combine_with_count.
20513
20514 2018-01-23 Andrew Waterman <andrew@sifive.com>
20515 Jim Wilson <jimw@sifive.com>
20516
20517 * config/riscv/riscv.c (riscv_stack_boundary): New.
20518 (riscv_option_override): Set riscv_stack_boundary. Handle
20519 riscv_preferred_stack_boundary_arg.
20520 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20521 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20522 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20523 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20524 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20525 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20526
20527 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20528
20529 PR target/83905
20530 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20531 of struct ix86_frame.
20532 (ix86_expand_epilogue): Likewise. Add a local variable for
20533 the reg_save_offset field in struct ix86_frame.
20534
20535 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20536
20537 PR tree-optimization/82604
20538 * tree-loop-distribution.c (enum partition_kind): New enum item
20539 PKIND_PARTIAL_MEMSET.
20540 (partition_builtin_p): Support above new enum item.
20541 (generate_code_for_partition): Ditto.
20542 (compute_access_range): Differentiate cases that equality can be
20543 proven at all loops, the innermost loops or no loops.
20544 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20545 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20546 (finalize_partitions, distribute_loop): Don't fuse partition of
20547 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20548 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20549 parloop is enabled.
20550
20551 2018-01-23 Martin Liska <mliska@suse.cz>
20552
20553 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20554 order to ignore the predictor.
20555 (PRED_POLYMORPHIC_CALL): Likewise.
20556 (PRED_RECURSIVE_CALL): Likewise.
20557
20558 2018-01-23 Martin Liska <mliska@suse.cz>
20559
20560 * tree-profile.c (tree_profiling): Print function header to
20561 aware reader which function we are working on.
20562 * value-prof.c (gimple_find_values_to_profile): Do not print
20563 not interesting value histograms.
20564
20565 2018-01-23 Martin Liska <mliska@suse.cz>
20566
20567 * profile-count.h (enum profile_quality): Add
20568 profile_uninitialized as the first value. Do not number values
20569 as they are zero based.
20570 (profile_count::verify): Update sanity check.
20571 (profile_probability::verify): Likewise.
20572
20573 2018-01-23 Nathan Sidwell <nathan@acm.org>
20574
20575 * doc/invoke.texi (ffor-scope): Deprecate.
20576
20577 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20578
20579 PR tree-optimization/83510
20580 * domwalk.c (set_all_edges_as_executable): New function.
20581 (dom_walker::dom_walker): Convert bool param
20582 "skip_unreachable_blocks" to enum reachability. Move setup of
20583 edge flags to set_all_edges_as_executable and only do it when
20584 reachability is REACHABLE_BLOCKS.
20585 * domwalk.h (enum dom_walker::reachability): New enum.
20586 (dom_walker::dom_walker): Convert bool param
20587 "skip_unreachable_blocks" to enum reachability.
20588 (set_all_edges_as_executable): New decl.
20589 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20590 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20591 "reachability".
20592 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20593 but converting true to REACHABLE_BLOCKS.
20594 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20595 * tree-vrp.c
20596 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20597 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20598 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20599 REACHABLE_BLOCKS.
20600 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20601 if check_all_array_refs will be called.
20602
20603 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20604
20605 * tree.c (selftest::test_location_wrappers): Add more test
20606 coverage.
20607
20608 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20609
20610 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20611 (selftest::test_bit_in_range): Likewise.
20612
20613 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20614
20615 PR testsuite/83888
20616 * doc/sourcebuild.texi (vect_float): Say that the selector
20617 only describes the situation when -funsafe-math-optimizations is on.
20618 (vect_float_strict): Document.
20619
20620 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20621
20622 PR tree-optimization/83965
20623 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20624 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20625 instead of checking only for a reduction.
20626 (vect_recog_widen_sum_pattern): Likewise.
20627
20628 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20629
20630 * predict.c (probably_never_executed): Only use precise profile info.
20631 (compute_function_frequency): Skip after inlining hack since we now
20632 have quality checking.
20633
20634 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20635
20636 * profile-count.h (profile_probability::very_unlikely,
20637 profile_probability::unlikely, profile_probability::even): Set
20638 precision to guessed.
20639
20640 2018-01-23 Richard Biener <rguenther@suse.de>
20641
20642 PR tree-optimization/83963
20643 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20644 Properly terminate dominator walk when crossing the exit edge not
20645 when visiting its source block.
20646
20647 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20648
20649 PR c++/83918
20650 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20651 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20652
20653 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20654
20655 PR tree-optimization/83957
20656 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20657 semicolon after for body surrounded by braces.
20658
20659 PR tree-optimization/83081
20660 * profile-count.h (profile_probability::split): New method.
20661 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20662 Use profile_probability::split.
20663 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20664 when splitting a single conditional jump into 2.
20665
20666 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20667
20668 PR tree-optimization/69452
20669 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20670 decl.
20671
20672 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20673
20674 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20675 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20676 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20677
20678 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20679
20680 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20681 declaration.
20682 * config/rl78/rl78.md (movdi): New define_expand.
20683 * config/rl78/rl78.c (rl78_split_movdi): New function.
20684
20685 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20686
20687 PR target/83862
20688 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20689 no longer used.
20690 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20691 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20692 128-bit to produce an UNSPEC move to get the double word with the
20693 signbit and then a shift directly to do signbit.
20694 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20695 implementation with a new version that just does either a direct
20696 move or a regular move. Move memory interface to separate insns.
20697 Move insns so they are next to the expander.
20698 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20699 with signbit move. Split big and little endian case.
20700 (signbit<mode>2_dm_mem_le): Likewise.
20701 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20702 (signbit<mode>2_dm2): Likewise.
20703
20704 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20705
20706 * config/rl78/rl78.md (anddi3): New define_expand.
20707
20708 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20709
20710 * config/rl78/rl78.md (umindi3): New define_expand.
20711
20712 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20713
20714 * config/rl78/rl78.md (smindi3): New define_expand.
20715
20716 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20717
20718 * config/rl78/rl78.md (smaxdi3): New define_expand.
20719
20720 2018-01-22 Carl Love <cel@us.ibm.com>
20721
20722 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20723 LVX_V1TI): Add macro expansion.
20724 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20725 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20726 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20727 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20728 Change check to determine if the instruction is a byte reversing
20729 entry. Fix typo in comment.
20730 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20731 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20732 Add def_builtin calls for new builtins.
20733 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20734 Add define_insn expansion.
20735
20736 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20737
20738 * config/rl78/rl78.md (umaxdi3): New define_expand.
20739
20740 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20741
20742 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20743 for non-QImode registers.
20744
20745 2018-01-22 Richard Biener <rguenther@suse.de>
20746
20747 PR tree-optimization/83963
20748 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20749 including the loop exit block.
20750 (scop_detection::merge_sese): Likewise.
20751 (scop_detection::add_scop): Do it here instead.
20752
20753 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20754
20755 * doc/sourcebuild.texi (arm_softfloat): Document.
20756
20757 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20758
20759 PR gcc/77734
20760 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20761 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20762 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20763
20764 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20765 David Edelsohn <dje.gcc@gmail.com>
20766
20767 PR target/83946
20768 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20769 Change "crset eq" to "crset 2".
20770 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20771 (*call_indirect_aix<mode>_nospec): Likewise.
20772 (*call_value_indirect_aix<mode>_nospec): Likewise.
20773 (*call_indirect_elfv2<mode>_nospec): Likewise.
20774 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20775 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20776 change assembly output from . to $.
20777 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20778 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20779 (*tablejump<mode>_internal1_nospec): Likewise.
20780
20781 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20782
20783 PR target/80870
20784 * config/sh/sh_optimize_sett_clrt.cc:
20785 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20786
20787 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20788
20789 PR tree-optimization/83940
20790 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20791 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20792 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20793 use it to pass back the definition type.
20794 (vect_check_store_rhs): Likewise rhs_dt_out.
20795 (vect_build_gather_load_calls): Add a mask_dt argument and use
20796 it instead of a call to vect_is_simple_use.
20797 (vectorizable_store): Update calls to vect_check_load_store_mask
20798 and vect_check_store_rhs. Use the dt returned by the latter instead
20799 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20800 instead of calls to vect_is_simple_use. Pass the scalar rather
20801 than the vector operand to vect_is_simple_use when handling
20802 second and subsequent copies of an rhs value.
20803 (vectorizable_load): Update calls to vect_check_load_store_mask
20804 and vect_build_gather_load_calls. Use the cached mask_dt and
20805 gs_info.offset_dt instead of calls to vect_is_simple_use.
20806
20807 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20808
20809 PR middle-end/83945
20810 * tree-emutls.c: Include gimplify.h.
20811 (lower_emutls_2): New function.
20812 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20813 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20814 it before further processing.
20815
20816 PR target/83930
20817 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20818 UINTVAL (trueop1) instead of INTVAL (op1).
20819
20820 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20821
20822 PR debug/81570
20823 PR debug/83728
20824 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20825 INCOMING_FRAME_SP_OFFSET if not defined.
20826 (scan_trace): Add ENTRY argument. If true and
20827 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20828 emit a note to adjust the CFA offset.
20829 (create_cfi_notes): Adjust scan_trace callers.
20830 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20831 INCOMING_FRAME_SP_OFFSET in the CIE.
20832 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20833 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20834 Likewise.
20835 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20836 * doc/tm.texi: Regenerated.
20837
20838 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20839
20840 PR rtl-optimization/83147
20841 * lra-constraints.c (remove_inheritance_pseudos): Use
20842 lra_substitute_pseudo_within_insn.
20843
20844 2018-01-19 Tom de Vries <tom@codesourcery.com>
20845 Cesar Philippidis <cesar@codesourcery.com>
20846
20847 PR target/83920
20848 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20849
20850 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20851
20852 PR target/83790
20853 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20854 spaces for function labels.
20855
20856 2018-01-19 Martin Liska <mliska@suse.cz>
20857
20858 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20859 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20860 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20861 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20862 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20863 (PRED_CONST_RETURN): Change from 69 to 65.
20864 (PRED_NULL_RETURN): Change from 91 to 71.
20865 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20866 (PRED_LOOP_GUARD): Change from 66 to 73.
20867
20868 2018-01-19 Martin Liska <mliska@suse.cz>
20869
20870 * predict.c (predict_insn_def): Add new assert.
20871 (struct branch_predictor): Change type to signed integer.
20872 (test_prediction_value_range): Amend test to cover
20873 PROB_UNINITIALIZED.
20874 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20875 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20876 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20877 (PRED_LOOP_IV_COMPARE): Likewise.
20878 * predict.h (PROB_UNINITIALIZED): Define new constant.
20879
20880 2018-01-19 Martin Liska <mliska@suse.cz>
20881
20882 * predict.c (dump_prediction): Add new format for
20883 analyze_brprob.py script which is enabled with -details
20884 suboption.
20885 * profile-count.h (precise_p): New function.
20886
20887 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20888
20889 PR tree-optimization/83922
20890 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20891 there are no statements that need masking.
20892 (vect_active_double_reduction_p): New function.
20893 (vect_analyze_loop_operations): Use it when handling phis that
20894 are not in the loop header.
20895
20896 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20897
20898 PR tree-optimization/83914
20899 * tree-vect-loop.c (vectorizable_induction): Don't convert
20900 init_expr or apply the peeling adjustment for inductions
20901 that are nested within the vectorized loop.
20902
20903 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20904
20905 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20906 instead of NEG.
20907
20908 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20909
20910 PR sanitizer/81715
20911 PR testsuite/83882
20912 * function.h (gimplify_parameters): Add gimple_seq * argument.
20913 * function.c: Include gimple.h and options.h.
20914 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20915 for the added local temporaries if needed.
20916 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20917 if there are any parameter cleanups, wrap whole body into a
20918 try/finally with the cleanups.
20919
20920 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20921
20922 PR target/82964
20923 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20924 Use GET_MODE_CLASS for scalar floating point.
20925
20926 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20927
20928 PR ipa/82256
20929 patch by PaX Team
20930 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20931 Fix call of call_cgraph_insertion_hooks.
20932
20933 2018-01-18 Martin Sebor <msebor@redhat.com>
20934
20935 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20936
20937 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20938
20939 PR ipa/83619
20940 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20941 frequencies.
20942
20943 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20944
20945 PR other/70268
20946 * common.opt: (-ffile-prefix-map): New option.
20947 * opts.c (common_handle_option): Defer it.
20948 * opts-global.c (handle_common_deferred_options): Handle it.
20949 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20950 * file-prefix-map.h: New file.
20951 (remap_debug_filename, add_debug_prefix_map): ...here.
20952 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20953 * final.c (debug_prefix_map, add_debug_prefix_map
20954 remap_debug_filename): Move to...
20955 * file-prefix-map.c: New file.
20956 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20957 generalize, get rid of alloca(), use strrchr() instead of strchr().
20958 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20959 Implement in terms of add_prefix_map().
20960 (remap_macro_filename, remap_debug_filename): Implement in term of
20961 remap_filename().
20962 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20963 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20964 * dbxout.c: Include file-prefix-map.h.
20965 * varasm.c: Likewise.
20966 * vmsdbgout.c: Likewise.
20967 * xcoffout.c: Likewise.
20968 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20969 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20970 * doc/invoke.texi (-ffile-prefix-map): Document.
20971 (-fdebug-prefix-map): Update description.
20972
20973 2018-01-18 Martin Liska <mliska@suse.cz>
20974
20975 * config/i386/i386.c (indirect_thunk_name): Document that also
20976 lfence is emitted.
20977 (output_indirect_thunk): Document why both instructions
20978 (pause and lfence) are generated.
20979
20980 2018-01-18 Richard Biener <rguenther@suse.de>
20981
20982 PR tree-optimization/83887
20983 * graphite-scop-detection.c
20984 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20985 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20986 (scop_detection::merge_sese): Re-implement with a flood-fill
20987 algorithm that properly finds a SESE region if it exists.
20988
20989 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20990
20991 PR c/61240
20992 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20993 pointer_diff optimizations use view_convert instead of convert.
20994
20995 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20996
20997 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20998 Generate different code for -mno-speculate-indirect-jumps.
20999 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21000 (*call_indirect_aix<mode>): Disable for
21001 -mno-speculate-indirect-jumps.
21002 (*call_indirect_aix<mode>_nospec): New define_insn.
21003 (*call_value_indirect_aix<mode>): Disable for
21004 -mno-speculate-indirect-jumps.
21005 (*call_value_indirect_aix<mode>_nospec): New define_insn.
21006 (*sibcall_nonlocal_sysv<mode>): Generate different code for
21007 -mno-speculate-indirect-jumps.
21008 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21009
21010 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21011
21012 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
21013 long double type, set the flags for noting the default long double
21014 type, even if we don't pass or return a long double type.
21015
21016 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
21017
21018 PR ipa/83051
21019 * ipa-inline.c (flatten_function): Do not overwrite final inlining
21020 failure.
21021
21022 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
21023
21024 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
21025 support for merge[hl].
21026 (fold_mergehl_helper): New helper function.
21027 (tree-vector-builder.h): New #include for tree_vector_builder usage.
21028 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
21029 (altivec_vmrglw_direct): Add xxmrglw insn.
21030
21031 2018-01-17 Andrew Waterman <andrew@sifive.com>
21032
21033 * config/riscv/riscv.c (riscv_conditional_register_usage): If
21034 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
21035
21036 2018-01-17 David Malcolm <dmalcolm@redhat.com>
21037
21038 PR lto/83121
21039 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
21040 call the lto_location_cache before reading the
21041 DECL_SOURCE_LOCATION of the types.
21042
21043 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
21044 Richard Sandiford <richard.sandiford@linaro.org>
21045
21046 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
21047 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
21048 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
21049 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
21050 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
21051 Add declaration.
21052 * config/aarch64/constraints.md (aarch64_movti_operand):
21053 Limit immediates.
21054 * config/aarch64/predicates.md (Uti): Add new constraint.
21055
21056 2018-01-17 Carl Love <cel@us.ibm.com>
21057
21058 * config/rs6000/vsx.md (define_expand xl_len_r,
21059 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
21060 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
21061 lxvll.
21062 (define_expand, define_insn): Move the shift left from the
21063 define_insn to the define_expand for lxvl and stxvl instructions.
21064 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
21065 and XL_LEN_R definitions to PURE.
21066
21067 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
21068
21069 * config/i386/i386.c (indirect_thunk_name): Declare regno
21070 as unsigned int. Compare regno with INVALID_REGNUM.
21071 (output_indirect_thunk): Ditto.
21072 (output_indirect_thunk_function): Ditto.
21073 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
21074 in the call to output_indirect_thunk_function.
21075
21076 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
21077
21078 PR middle-end/83884
21079 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
21080 rather than the size of inner_type to determine the stack slot size
21081 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
21082
21083 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
21084
21085 PR target/83546
21086 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
21087 to PTA_SILVERMONT.
21088
21089 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
21090
21091 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
21092 endian Linux systems to optionally enable multilibs for selecting
21093 the long double type if the user configured an explicit type.
21094 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
21095 have no long double multilibs if not defined.
21096 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
21097 warn if the user used -mabi={ieee,ibm}longdouble and we built
21098 multilibs for long double.
21099 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
21100 appropriate multilib option.
21101 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
21102 multilib options.
21103 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
21104 for building long double multilibs.
21105 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
21106
21107 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
21108
21109 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
21110 copies.
21111
21112 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
21113 64 bits.
21114 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
21115 128 bits.
21116
21117 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
21118 variables.
21119
21120 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
21121 return value.
21122
21123 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21124
21125 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
21126 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
21127
21128 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
21129
21130 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
21131 different rtl trees depending on TARGET_64BIT.
21132 (rs6000_gen_lvx): Likewise.
21133
21134 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
21135
21136 * config/visium/visium.md (nop): Tweak comment.
21137 (hazard_nop): Likewise.
21138
21139 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21140
21141 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
21142 -mspeculate-indirect-jumps.
21143 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
21144 for -mno-speculate-indirect-jumps.
21145 (*call_indirect_elfv2<mode>_nospec): New define_insn.
21146 (*call_value_indirect_elfv2<mode>): Disable for
21147 -mno-speculate-indirect-jumps.
21148 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
21149 (indirect_jump): Emit different RTL for
21150 -mno-speculate-indirect-jumps.
21151 (*indirect_jump<mode>): Disable for
21152 -mno-speculate-indirect-jumps.
21153 (*indirect_jump<mode>_nospec): New define_insn.
21154 (tablejump): Emit different RTL for
21155 -mno-speculate-indirect-jumps.
21156 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
21157 (tablejumpsi_nospec): New define_expand.
21158 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
21159 (tablejumpdi_nospec): New define_expand.
21160 (*tablejump<mode>_internal1): Disable for
21161 -mno-speculate-indirect-jumps.
21162 (*tablejump<mode>_internal1_nospec): New define_insn.
21163 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
21164 option.
21165
21166 2018-01-16 Artyom Skrobov tyomitch@gmail.com
21167
21168 * caller-save.c (insert_save): Drop unnecessary parameter. All
21169 callers updated.
21170
21171 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21172 Richard Biener <rguenth@suse.de>
21173
21174 PR libgomp/83590
21175 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
21176 return early, inline manually is_gimple_sizepos. Make sure if we
21177 call gimplify_expr we don't end up with a gimple constant.
21178 * tree.c (variably_modified_type_p): Don't return true for
21179 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
21180 * gimplify.h (is_gimple_sizepos): Remove.
21181
21182 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21183
21184 PR tree-optimization/83857
21185 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
21186 vectorizable_live_operation for pure SLP statements.
21187 (vectorizable_live_operation): Handle PHIs.
21188
21189 2018-01-16 Richard Biener <rguenther@suse.de>
21190
21191 PR tree-optimization/83867
21192 * tree-vect-stmts.c (vect_transform_stmt): Precompute
21193 nested_in_vect_loop_p since the scalar stmt may get invalidated.
21194
21195 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21196
21197 PR c/83844
21198 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
21199 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
21200 If off is not INTEGER_CST, issue a may not be aligned warning
21201 rather than isn't aligned. Use isn%'t rather than isn't.
21202 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
21203 into MULT_EXPR.
21204 <case MULT_EXPR>: Improve the case when bottom and one of the
21205 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21206 operand, in that case check if the other operand is multiple of
21207 bottom divided by the INTEGER_CST operand.
21208
21209 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21210
21211 PR target/83858
21212 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21213 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21214 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21215 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21216 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21217 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21218 (pa_function_arg_size): New function.
21219
21220 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21221
21222 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21223 in a separate statement.
21224
21225 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21226
21227 PR tree-optimization/83847
21228 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21229 group gathers and scatters.
21230
21231 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21232
21233 PR rtl-optimization/86620
21234 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21235
21236 PR rtl-optimization/83213
21237 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21238 to last if both are JUMP_INSNs.
21239
21240 PR tree-optimization/83843
21241 * gimple-ssa-store-merging.c
21242 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21243 store_immediate_info for bswap/nop orig_stores.
21244
21245 2018-01-15 Andrew Waterman <andrew@sifive.com>
21246
21247 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21248 !TARGET_MUL.
21249 <UDIV>: Increase cost if !TARGET_DIV.
21250
21251 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21252
21253 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21254 (define_attr "cr_logical_3op"): New.
21255 (cceq_ior_compare): Adjust.
21256 (cceq_ior_compare_complement): Adjust.
21257 (*cceq_rev_compare): Adjust.
21258 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21259 (is_cracked_insn): Adjust.
21260 (insn_must_be_first_in_group): Adjust.
21261 * config/rs6000/40x.md: Adjust.
21262 * config/rs6000/440.md: Adjust.
21263 * config/rs6000/476.md: Adjust.
21264 * config/rs6000/601.md: Adjust.
21265 * config/rs6000/603.md: Adjust.
21266 * config/rs6000/6xx.md: Adjust.
21267 * config/rs6000/7450.md: Adjust.
21268 * config/rs6000/7xx.md: Adjust.
21269 * config/rs6000/8540.md: Adjust.
21270 * config/rs6000/cell.md: Adjust.
21271 * config/rs6000/e300c2c3.md: Adjust.
21272 * config/rs6000/e500mc.md: Adjust.
21273 * config/rs6000/e500mc64.md: Adjust.
21274 * config/rs6000/e5500.md: Adjust.
21275 * config/rs6000/e6500.md: Adjust.
21276 * config/rs6000/mpc.md: Adjust.
21277 * config/rs6000/power4.md: Adjust.
21278 * config/rs6000/power5.md: Adjust.
21279 * config/rs6000/power6.md: Adjust.
21280 * config/rs6000/power7.md: Adjust.
21281 * config/rs6000/power8.md: Adjust.
21282 * config/rs6000/power9.md: Adjust.
21283 * config/rs6000/rs64.md: Adjust.
21284 * config/rs6000/titan.md: Adjust.
21285
21286 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21287
21288 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21289 ix86_indirect_branch_register logic.
21290
21291 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21292
21293 * config/i386/constraints.md (Bs): Update
21294 ix86_indirect_branch_register check. Don't check
21295 ix86_indirect_branch_register with GOT_memory_operand.
21296 (Bw): Likewise.
21297 * config/i386/predicates.md (GOT_memory_operand): Don't check
21298 ix86_indirect_branch_register here.
21299 (GOT32_symbol_operand): Likewise.
21300
21301 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21302
21303 * config/i386/predicates.md (constant_call_address_operand):
21304 Rewrite ix86_indirect_branch_register logic.
21305 (sibcall_insn_operand): Likewise.
21306
21307 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21308
21309 * config/i386/constraints.md (Bs): Replace
21310 ix86_indirect_branch_thunk_register with
21311 ix86_indirect_branch_register.
21312 (Bw): Likewise.
21313 * config/i386/i386.md (indirect_jump): Likewise.
21314 (tablejump): Likewise.
21315 (*sibcall_memory): Likewise.
21316 (*sibcall_value_memory): Likewise.
21317 Peepholes of indirect call and jump via memory: Likewise.
21318 * config/i386/i386.opt: Likewise.
21319 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21320 (GOT_memory_operand): Likewise.
21321 (call_insn_operand): Likewise.
21322 (sibcall_insn_operand): Likewise.
21323 (GOT32_symbol_operand): Likewise.
21324
21325 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21326
21327 PR middle-end/83837
21328 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21329 type rather than type addr's type points to.
21330 (expand_omp_atomic_mutex): Likewise.
21331 (expand_omp_atomic): Likewise.
21332
21333 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21334
21335 PR target/83839
21336 * config/i386/i386.c (output_indirect_thunk_function): Use
21337 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21338 for __x86_return_thunk.
21339
21340 2018-01-15 Richard Biener <rguenther@suse.de>
21341
21342 PR middle-end/83850
21343 * expmed.c (extract_bit_field_1): Fix typo.
21344
21345 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21346
21347 PR target/83687
21348 * config/arm/iterators.md (VF): New mode iterator.
21349 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21350 Remove integer-related logic from pattern.
21351 (neon_vabd<mode>_3): Likewise.
21352
21353 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21354
21355 PR middle-end/82694
21356 * common.opt (fstrict-overflow): No longer an alias.
21357 (fwrapv-pointer): New option.
21358 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21359 also for pointer types based on flag_wrapv_pointer.
21360 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21361 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21362 opts->x_flag_wrapv got set.
21363 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21364 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21365 POINTER_TYPE_OVERFLOW_UNDEFINED.
21366 * match.pd: Likewise in address comparison pattern.
21367 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21368
21369 2018-01-15 Richard Biener <rguenther@suse.de>
21370
21371 PR lto/83804
21372 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21373 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21374 Reset type names to their identifier if their TYPE_DECL doesn't
21375 have linkage (and thus is used for ODR and devirt).
21376 (save_debug_info_for_decl): Remove.
21377 (save_debug_info_for_type): Likewise.
21378 (add_tree_to_fld_list): Adjust.
21379 * tree-pretty-print.c (dump_generic_node): Make dumping of
21380 type names more robust.
21381
21382 2018-01-15 Richard Biener <rguenther@suse.de>
21383
21384 * BASE-VER: Bump to 8.0.1.
21385
21386 2018-01-14 Martin Sebor <msebor@redhat.com>
21387
21388 PR other/83508
21389 * builtins.c (check_access): Avoid warning when the no-warning bit
21390 is set.
21391
21392 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21393
21394 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21395 * ira-color (allocno_hard_regs_compare): Likewise.
21396
21397 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21398
21399 PR target/83013
21400 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21401 Use .pushsection/.popsection.
21402
21403 2018-01-14 Martin Sebor <msebor@redhat.com>
21404
21405 PR c++/81327
21406 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21407
21408 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21409
21410 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21411 entry from extra_headers.
21412 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21413 extra_headers, make the list bitwise identical to the i?86-*-* one.
21414
21415 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21416
21417 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21418 -mcmodel=large with -mindirect-branch=thunk,
21419 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21420 -mfunction-return=thunk-extern.
21421 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21422 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21423 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21424
21425 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21426
21427 * config/i386/i386.c (print_reg): Print the name of the full
21428 integer register without '%'.
21429 (ix86_print_operand): Handle 'V'.
21430 * doc/extend.texi: Document 'V' modifier.
21431
21432 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21433
21434 * config/i386/constraints.md (Bs): Disallow memory operand for
21435 -mindirect-branch-register.
21436 (Bw): Likewise.
21437 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21438 (GOT_memory_operand): Likewise.
21439 (call_insn_operand): Likewise.
21440 (sibcall_insn_operand): Likewise.
21441 (GOT32_symbol_operand): Likewise.
21442 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21443 for -mindirect-branch-register.
21444 (tablejump): Likewise.
21445 (*sibcall_memory): Likewise.
21446 (*sibcall_value_memory): Likewise.
21447 Disallow peepholes of indirect call and jump via memory for
21448 -mindirect-branch-register.
21449 (*call_pop): Replace m with Bw.
21450 (*call_value_pop): Likewise.
21451 (*sibcall_pop_memory): Replace m with Bs.
21452 * config/i386/i386.opt (mindirect-branch-register): New option.
21453 * doc/invoke.texi: Document -mindirect-branch-register option.
21454
21455 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21456
21457 * config/i386/i386-protos.h (ix86_output_function_return): New.
21458 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21459 set function_return_type.
21460 (indirect_thunk_name): Add ret_p to indicate thunk for function
21461 return.
21462 (output_indirect_thunk_function): Pass false to
21463 indirect_thunk_name.
21464 (ix86_output_indirect_branch_via_reg): Likewise.
21465 (ix86_output_indirect_branch_via_push): Likewise.
21466 (output_indirect_thunk_function): Create alias for function
21467 return thunk if regno < 0.
21468 (ix86_output_function_return): New function.
21469 (ix86_handle_fndecl_attribute): Handle function_return.
21470 (ix86_attribute_table): Add function_return.
21471 * config/i386/i386.h (machine_function): Add
21472 function_return_type.
21473 * config/i386/i386.md (simple_return_internal): Use
21474 ix86_output_function_return.
21475 (simple_return_internal_long): Likewise.
21476 * config/i386/i386.opt (mfunction-return=): New option.
21477 (indirect_branch): Mention -mfunction-return=.
21478 * doc/extend.texi: Document function_return function attribute.
21479 * doc/invoke.texi: Document -mfunction-return= option.
21480
21481 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21482
21483 * config/i386/i386-opts.h (indirect_branch): New.
21484 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21485 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21486 with local indirect jump when converting indirect call and jump.
21487 (ix86_set_indirect_branch_type): New.
21488 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21489 (indirectlabelno): New.
21490 (indirect_thunk_needed): Likewise.
21491 (indirect_thunk_bnd_needed): Likewise.
21492 (indirect_thunks_used): Likewise.
21493 (indirect_thunks_bnd_used): Likewise.
21494 (INDIRECT_LABEL): Likewise.
21495 (indirect_thunk_name): Likewise.
21496 (output_indirect_thunk): Likewise.
21497 (output_indirect_thunk_function): Likewise.
21498 (ix86_output_indirect_branch_via_reg): Likewise.
21499 (ix86_output_indirect_branch_via_push): Likewise.
21500 (ix86_output_indirect_branch): Likewise.
21501 (ix86_output_indirect_jmp): Likewise.
21502 (ix86_code_end): Call output_indirect_thunk_function if needed.
21503 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21504 needed.
21505 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21506 (ix86_attribute_table): Add indirect_branch.
21507 * config/i386/i386.h (machine_function): Add indirect_branch_type
21508 and has_local_indirect_jump.
21509 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21510 to true.
21511 (tablejump): Likewise.
21512 (*indirect_jump): Use ix86_output_indirect_jmp.
21513 (*tablejump_1): Likewise.
21514 (simple_return_indirect_internal): Likewise.
21515 * config/i386/i386.opt (mindirect-branch=): New option.
21516 (indirect_branch): New.
21517 (keep): Likewise.
21518 (thunk): Likewise.
21519 (thunk-inline): Likewise.
21520 (thunk-extern): Likewise.
21521 * doc/extend.texi: Document indirect_branch function attribute.
21522 * doc/invoke.texi: Document -mindirect-branch= option.
21523
21524 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21525
21526 PR ipa/83051
21527 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21528
21529 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21530
21531 * ipa-inline.c (want_inline_small_function_p): Return false if
21532 inlining has already failed with CIF_FINAL_ERROR.
21533 (update_caller_keys): Call want_inline_small_function_p before
21534 can_inline_edge_p.
21535 (update_callee_keys): Likewise.
21536
21537 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21538
21539 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21540 New function.
21541 (rs6000_quadword_masked_address_p): Likewise.
21542 (quad_aligned_load_p): Likewise.
21543 (quad_aligned_store_p): Likewise.
21544 (const_load_sequence_p): Add comment to describe the outer-most loop.
21545 (mimic_memory_attributes_and_flags): New function.
21546 (rs6000_gen_stvx): Likewise.
21547 (replace_swapped_aligned_store): Likewise.
21548 (rs6000_gen_lvx): Likewise.
21549 (replace_swapped_aligned_load): Likewise.
21550 (replace_swapped_load_constant): Capitalize argument name in
21551 comment describing this function.
21552 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21553 and stores that access quad-word aligned addresses and replace
21554 with stvx or lvx instructions when appropriate.
21555 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21556 New function prototype.
21557 (rs6000_quadword_masked_address_p): Likewise.
21558 (rs6000_gen_lvx): Likewise.
21559 (rs6000_gen_stvx): Likewise.
21560 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21561 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21562 when memory address is aligned.
21563 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21564 this split to select lvx instruction when memory address is aligned.
21565 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21566 instruction when memory address is aligned.
21567 (*vsx_le_perm_load_v16qi): Likewise.
21568 (four unnamed splitters): Modify to select the stvx instruction
21569 when memory is aligned.
21570
21571 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21572
21573 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21574 which appears in the queue multiple times.
21575
21576 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21577 Alan Hayward <alan.hayward@arm.com>
21578 David Sherwood <david.sherwood@arm.com>
21579
21580 * tree-vectorizer.h (vec_lower_bound): New structure.
21581 (_loop_vec_info): Add check_nonzero and lower_bounds.
21582 (LOOP_VINFO_CHECK_NONZERO): New macro.
21583 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21584 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21585 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21586 fields. Make seg_len the distance travelled, not including the
21587 access size.
21588 (dr_direction_indicator): Declare.
21589 (dr_zero_step_indicator): Likewise.
21590 (dr_known_forward_stride_p): Likewise.
21591 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21592 tree-ssanames.h.
21593 (runtime_alias_check_p): Allow runtime alias checks with
21594 variable strides.
21595 (operator ==): Compare access_size and align.
21596 (prune_runtime_alias_test_list): Rework for new distinction between
21597 the access_size and seg_len.
21598 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21599 segment lengths.
21600 (get_segment_min_max): New function.
21601 (create_intersect_range_checks): Use it.
21602 (dr_step_indicator): New function.
21603 (dr_direction_indicator): Likewise.
21604 (dr_zero_step_indicator): Likewise.
21605 (dr_known_forward_stride_p): Likewise.
21606 * tree-loop-distribution.c (data_ref_segment_size): Return
21607 DR_STEP * (niters - 1).
21608 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21609 constructor.
21610 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21611 (vect_preserves_scalar_order_p): New function, split out from...
21612 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21613 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21614 (vect_vfa_access_size): New function.
21615 (vect_vfa_align): Likewise.
21616 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21617 (dump_lower_bound): New function.
21618 (vect_check_lower_bound): Likewise.
21619 (vect_small_gap_p): Likewise.
21620 (vectorizable_with_step_bound_p): Likewise.
21621 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21622 depencies if the vectorization factor is 1. Convert the checks
21623 for nonzero steps into checks on the bounds of DR_STEP. Try using
21624 a bunds check for variable steps if the minimum required step is
21625 relatively small. Update calls to the dr_with_seg_len
21626 constructor and to vect_compile_time_alias.
21627 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21628 function.
21629 (vect_loop_versioning): Call it.
21630 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21631 when retrying.
21632 (vect_estimate_min_profitable_iters): Account for any bounds checks.
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 * doc/sourcebuild.texi (vect_scatter_store): Document.
21639 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21640 optabs.
21641 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21642 Document.
21643 * genopinit.c (main): Add supports_vec_scatter_store and
21644 supports_vec_scatter_store_cached to target_optabs.
21645 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21646 IFN_MASK_SCATTER_STORE.
21647 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21648 functions.
21649 * internal-fn.h (internal_store_fn_p): Declare.
21650 (internal_fn_stored_value_index): Likewise.
21651 * internal-fn.c (scatter_store_direct): New macro.
21652 (expand_scatter_store_optab_fn): New function.
21653 (direct_scatter_store_optab_supported_p): New macro.
21654 (internal_store_fn_p): New function.
21655 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21656 IFN_MASK_SCATTER_STORE.
21657 (internal_fn_mask_index): Likewise.
21658 (internal_fn_stored_value_index): New function.
21659 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21660 for scatter stores.
21661 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21662 * optabs-query.c (supports_vec_scatter_store_p): New function.
21663 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21664 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21665 true for scatter stores.
21666 (vect_gather_scatter_fn_p): Handle scatter stores too.
21667 (vect_check_gather_scatter): Consider using scatter stores if
21668 supports_vec_scatter_store_p.
21669 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21670 scatter stores too.
21671 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21672 internal_fn_stored_value_index.
21673 (check_load_store_masking): Handle scatter stores too.
21674 (vect_get_store_rhs): Make public.
21675 (vectorizable_call): Use internal_store_fn_p.
21676 (vectorizable_store): Handle scatter store internal functions.
21677 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21678 when deciding whether the end of the group has been reached.
21679 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21680 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21681 (mask_scatter_store<mode>): New insns.
21682
21683 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21684 Alan Hayward <alan.hayward@arm.com>
21685 David Sherwood <david.sherwood@arm.com>
21686
21687 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21688 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21689 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21690 function.
21691 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21692 Use vect_truncate_gather_scatter_offset if we can't treat the
21693 operation as a normal gather load or scatter store.
21694 (get_group_load_store_type): Take the gather_scatter_info
21695 as argument. Try using a gather load or scatter store for
21696 single-element groups.
21697 (get_load_store_type): Update calls to get_group_load_store_type
21698 and vect_use_strided_gather_scatters_p.
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 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21705 optional tree argument.
21706 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21707 null target hooks.
21708 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21709 but continue to use the current value as a fallback.
21710 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21711 to compare the updates.
21712 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21713 (get_load_store_type): Use it when handling a strided access.
21714 (vect_get_strided_load_store_ops): New function.
21715 (vect_get_data_ptr_increment): Likewise.
21716 (vectorizable_load): Handle strided gather loads. Always pass
21717 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21718
21719 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21720 Alan Hayward <alan.hayward@arm.com>
21721 David Sherwood <david.sherwood@arm.com>
21722
21723 * doc/md.texi (gather_load@var{m}): Document.
21724 (mask_gather_load@var{m}): Likewise.
21725 * genopinit.c (main): Add supports_vec_gather_load and
21726 supports_vec_gather_load_cached to target_optabs.
21727 * optabs-tree.c (init_tree_optimization_optabs): Use
21728 ggc_cleared_alloc to allocate target_optabs.
21729 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21730 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21731 functions.
21732 * internal-fn.h (internal_load_fn_p): Declare.
21733 (internal_gather_scatter_fn_p): Likewise.
21734 (internal_fn_mask_index): Likewise.
21735 (internal_gather_scatter_fn_supported_p): Likewise.
21736 * internal-fn.c (gather_load_direct): New macro.
21737 (expand_gather_load_optab_fn): New function.
21738 (direct_gather_load_optab_supported_p): New macro.
21739 (direct_internal_fn_optab): New function.
21740 (internal_load_fn_p): Likewise.
21741 (internal_gather_scatter_fn_p): Likewise.
21742 (internal_fn_mask_index): Likewise.
21743 (internal_gather_scatter_fn_supported_p): Likewise.
21744 * optabs-query.c (supports_at_least_one_mode_p): New function.
21745 (supports_vec_gather_load_p): Likewise.
21746 * optabs-query.h (supports_vec_gather_load_p): Declare.
21747 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21748 and memory_type field.
21749 (NUM_PATTERNS): Bump to 15.
21750 * tree-vect-data-refs.c: Include internal-fn.h.
21751 (vect_gather_scatter_fn_p): New function.
21752 (vect_describe_gather_scatter_call): Likewise.
21753 (vect_check_gather_scatter): Try using internal functions for
21754 gather loads. Recognize existing calls to a gather load function.
21755 (vect_analyze_data_refs): Consider using gather loads if
21756 supports_vec_gather_load_p.
21757 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21758 (vect_get_gather_scatter_offset_type): Likewise.
21759 (vect_convert_mask_for_vectype): Likewise.
21760 (vect_add_conversion_to_patterm): Likewise.
21761 (vect_try_gather_scatter_pattern): Likewise.
21762 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21763 (vect_vect_recog_func_ptrs): Add it.
21764 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21765 internal_fn_mask_index and internal_gather_scatter_fn_p.
21766 (check_load_store_masking): Take the gather_scatter_info as an
21767 argument and handle gather loads.
21768 (vect_get_gather_scatter_ops): New function.
21769 (vectorizable_call): Check internal_load_fn_p.
21770 (vectorizable_load): Likewise. Handle gather load internal
21771 functions.
21772 (vectorizable_store): Update call to check_load_store_masking.
21773 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21774 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21775 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21776 (aarch64_gather_scale_operand_d): New predicates.
21777 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21778 (mask_gather_load<mode>): New insns.
21779
21780 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21781 Alan Hayward <alan.hayward@arm.com>
21782 David Sherwood <david.sherwood@arm.com>
21783
21784 * optabs.def (fold_left_plus_optab): New optab.
21785 * doc/md.texi (fold_left_plus_@var{m}): Document.
21786 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21787 * internal-fn.c (fold_left_direct): Define.
21788 (expand_fold_left_optab_fn): Likewise.
21789 (direct_fold_left_optab_supported_p): Likewise.
21790 * fold-const-call.c (fold_const_fold_left): New function.
21791 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21792 * tree-parloops.c (valid_reduction_p): New function.
21793 (gather_scalar_reductions): Use it.
21794 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21795 (vect_finish_replace_stmt): Declare.
21796 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21797 (needs_fold_left_reduction_p): New function, split out from...
21798 (vect_is_simple_reduction): ...here. Accept reductions that
21799 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21800 (vect_force_simple_reduction): Also store the reduction type in
21801 the assignment's STMT_VINFO_REDUC_TYPE.
21802 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21803 (merge_with_identity): New function.
21804 (vect_expand_fold_left): Likewise.
21805 (vectorize_fold_left_reduction): Likewise.
21806 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21807 scalar phi in place for it. Check for target support and reject
21808 cases that would reassociate the operation. Defer the transform
21809 phase to vectorize_fold_left_reduction.
21810 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21811 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21812 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21813
21814 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21815
21816 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21817 call to ifc_temp_var.
21818
21819 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21820 Alan Hayward <alan.hayward@arm.com>
21821 David Sherwood <david.sherwood@arm.com>
21822
21823 * target.def (legitimize_address_displacement): Take the original
21824 offset as a poly_int.
21825 * targhooks.h (default_legitimize_address_displacement): Update
21826 accordingly.
21827 * targhooks.c (default_legitimize_address_displacement): Likewise.
21828 * doc/tm.texi: Regenerate.
21829 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21830 as an argument, moving assert of ad->disp == ad->disp_term to...
21831 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21832 Try calling targetm.legitimize_address_displacement before expanding
21833 the address rather than afterwards, and adjust for the new interface.
21834 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21835 Match the new hook interface. Handle SVE addresses.
21836 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21837 new hook interface.
21838
21839 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21840
21841 * Makefile.in (OBJS): Add early-remat.o.
21842 * target.def (select_early_remat_modes): New hook.
21843 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21844 * doc/tm.texi: Regenerate.
21845 * targhooks.h (default_select_early_remat_modes): Declare.
21846 * targhooks.c (default_select_early_remat_modes): New function.
21847 * timevar.def (TV_EARLY_REMAT): New timevar.
21848 * passes.def (pass_early_remat): New pass.
21849 * tree-pass.h (make_pass_early_remat): Declare.
21850 * early-remat.c: New file.
21851 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21852 function.
21853 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21854
21855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21856 Alan Hayward <alan.hayward@arm.com>
21857 David Sherwood <david.sherwood@arm.com>
21858
21859 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21860 vfm1 with a bound_epilog parameter.
21861 (vect_do_peeling): Update calls accordingly, and move the prologue
21862 call earlier in the function. Treat the base bound_epilog as 0 for
21863 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21864 this base when peeling for gaps.
21865 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21866 with fully-masked loops.
21867 (vect_estimate_min_profitable_iters): Handle the single peeled
21868 iteration in that case.
21869
21870 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21871 Alan Hayward <alan.hayward@arm.com>
21872 David Sherwood <david.sherwood@arm.com>
21873
21874 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21875 single-element interleaving even if the size is not a power of 2.
21876 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21877 accesses for single-element interleaving if the group size is
21878 not a power of 2.
21879
21880 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21881 Alan Hayward <alan.hayward@arm.com>
21882 David Sherwood <david.sherwood@arm.com>
21883
21884 * doc/md.texi (fold_extract_last_@var{m}): Document.
21885 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21886 * optabs.def (fold_extract_last_optab): New optab.
21887 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21888 * internal-fn.c (fold_extract_direct): New macro.
21889 (expand_fold_extract_optab_fn): Likewise.
21890 (direct_fold_extract_optab_supported_p): Likewise.
21891 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21892 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21893 EXTRACT_LAST_REDUCTION.
21894 (get_initial_def_for_reduction): Do not create an initial vector
21895 for EXTRACT_LAST_REDUCTION reductions.
21896 (vectorizable_reduction): Leave the scalar phi in place for
21897 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21898 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21899 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21900 transform phase to vectorizable_condition.
21901 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21902 split out from...
21903 (vect_finish_stmt_generation): ...here.
21904 (vect_finish_replace_stmt): New function.
21905 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21906 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21907 pattern.
21908 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21909
21910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21911 Alan Hayward <alan.hayward@arm.com>
21912 David Sherwood <david.sherwood@arm.com>
21913
21914 * doc/md.texi (extract_last_@var{m}): Document.
21915 * optabs.def (extract_last_optab): New optab.
21916 * internal-fn.def (EXTRACT_LAST): New internal function.
21917 * internal-fn.c (cond_unary_direct): New macro.
21918 (expand_cond_unary_optab_fn): Likewise.
21919 (direct_cond_unary_optab_supported_p): Likewise.
21920 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21921 loops using EXTRACT_LAST.
21922 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21923 (extract_last_<mode>): ...this optab.
21924 (vec_extract<mode><Vel>): Update accordingly.
21925
21926 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21927 Alan Hayward <alan.hayward@arm.com>
21928 David Sherwood <david.sherwood@arm.com>
21929
21930 * target.def (empty_mask_is_expensive): New hook.
21931 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21932 * doc/tm.texi: Regenerate.
21933 * targhooks.h (default_empty_mask_is_expensive): Declare.
21934 * targhooks.c (default_empty_mask_is_expensive): New function.
21935 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21936 if the target says that empty masks are expensive.
21937 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21938 New function.
21939 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21940
21941 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21942 Alan Hayward <alan.hayward@arm.com>
21943 David Sherwood <david.sherwood@arm.com>
21944
21945 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21946 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21947 (vect_use_loop_mask_for_alignment_p): New function.
21948 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21949 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21950 niters_skip argument. Make sure that the first niters_skip elements
21951 of the first iteration are inactive.
21952 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21953 Update call to vect_set_loop_masks_directly.
21954 (get_misalign_in_elems): New function, split out from...
21955 (vect_gen_prolog_loop_niters): ...here.
21956 (vect_update_init_of_dr): Take a code argument that specifies whether
21957 the adjustment should be added or subtracted.
21958 (vect_update_init_of_drs): Likewise.
21959 (vect_prepare_for_masked_peels): New function.
21960 (vect_do_peeling): Skip prologue peeling if we're using a mask
21961 instead. Update call to vect_update_inits_of_drs.
21962 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21963 mask_skip_niters.
21964 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21965 alignment. Do not include the number of peeled iterations in
21966 the minimum threshold in that case.
21967 (vectorizable_induction): Adjust the start value down by
21968 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21969 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21970 Take the number of skipped iterations into account when calculating
21971 the loop bounds.
21972 * tree-vect-stmts.c (vect_gen_while_not): New function.
21973
21974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21975 Alan Hayward <alan.hayward@arm.com>
21976 David Sherwood <david.sherwood@arm.com>
21977
21978 * doc/sourcebuild.texi (vect_fully_masked): Document.
21979 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21980 default value to 0.
21981 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21982 split out from...
21983 (vect_analyze_loop_2): ...here. Don't check the vectorization
21984 factor against the number of loop iterations if the loop is
21985 fully-masked.
21986
21987 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21988 Alan Hayward <alan.hayward@arm.com>
21989 David Sherwood <david.sherwood@arm.com>
21990
21991 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21992 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21993 (dump_groups): Update accordingly.
21994 (iv_use::mem_type): New member variable.
21995 (address_p): New function.
21996 (record_use): Add a mem_type argument and initialize the new
21997 mem_type field.
21998 (record_group_use): Add a mem_type argument. Use address_p.
21999 Remove obsolete null checks of base_object. Update call to record_use.
22000 (find_interesting_uses_op): Update call to record_group_use.
22001 (find_interesting_uses_cond): Likewise.
22002 (find_interesting_uses_address): Likewise.
22003 (get_mem_type_for_internal_fn): New function.
22004 (find_address_like_use): Likewise.
22005 (find_interesting_uses_stmt): Try find_address_like_use before
22006 calling find_interesting_uses_op.
22007 (addr_offset_valid_p): Use the iv mem_type field as the type
22008 of the addressed memory.
22009 (add_autoinc_candidates): Likewise.
22010 (get_address_cost): Likewise.
22011 (split_small_address_groups_p): Use address_p.
22012 (split_address_groups): Likewise.
22013 (add_iv_candidate_for_use): Likewise.
22014 (autoinc_possible_for_pair): Likewise.
22015 (rewrite_groups): Likewise.
22016 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
22017 (determine_group_iv_cost): Update after split of USE_ADDRESS.
22018 (get_alias_ptr_type_for_ptr_address): New function.
22019 (rewrite_use_address): Rewrite address uses in calls that were
22020 identified by find_address_like_use.
22021
22022 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22023 Alan Hayward <alan.hayward@arm.com>
22024 David Sherwood <david.sherwood@arm.com>
22025
22026 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
22027 TARGET_MEM_REFs.
22028 * gimple-expr.h (is_gimple_addressable: Likewise.
22029 * gimple-expr.c (is_gimple_address): Likewise.
22030 * internal-fn.c (expand_call_mem_ref): New function.
22031 (expand_mask_load_optab_fn): Use it.
22032 (expand_mask_store_optab_fn): Likewise.
22033
22034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22035 Alan Hayward <alan.hayward@arm.com>
22036 David Sherwood <david.sherwood@arm.com>
22037
22038 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
22039 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
22040 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
22041 (cond_umax@var{mode}): Document.
22042 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
22043 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
22044 (cond_umin_optab, cond_umax_optab): New optabs.
22045 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
22046 (COND_IOR, COND_XOR): New internal functions.
22047 * internal-fn.h (get_conditional_internal_fn): Declare.
22048 * internal-fn.c (cond_binary_direct): New macro.
22049 (expand_cond_binary_optab_fn): Likewise.
22050 (direct_cond_binary_optab_supported_p): Likewise.
22051 (get_conditional_internal_fn): New function.
22052 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
22053 Cope with reduction statements that are vectorized as calls rather
22054 than assignments.
22055 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
22056 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
22057 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
22058 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22059 (UNSPEC_COND_EOR): New unspecs.
22060 (optab): Add mappings for them.
22061 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
22062 (sve_int_op, sve_fp_op): New int attributes.
22063
22064 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22065 Alan Hayward <alan.hayward@arm.com>
22066 David Sherwood <david.sherwood@arm.com>
22067
22068 * optabs.def (while_ult_optab): New optab.
22069 * doc/md.texi (while_ult@var{m}@var{n}): Document.
22070 * internal-fn.def (WHILE_ULT): New internal function.
22071 * internal-fn.h (direct_internal_fn_supported_p): New override
22072 that takes two types as argument.
22073 * internal-fn.c (while_direct): New macro.
22074 (expand_while_optab_fn): New function.
22075 (convert_optab_supported_p): Likewise.
22076 (direct_while_optab_supported_p): New macro.
22077 * wide-int.h (wi::udiv_ceil): New function.
22078 * tree-vectorizer.h (rgroup_masks): New structure.
22079 (vec_loop_masks): New typedef.
22080 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
22081 and fully_masked_p.
22082 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
22083 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
22084 (vect_max_vf): New function.
22085 (slpeel_make_loop_iterate_ntimes): Delete.
22086 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
22087 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
22088 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
22089 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
22090 internal-fn.h, stor-layout.h and optabs-query.h.
22091 (vect_set_loop_mask): New function.
22092 (add_preheader_seq): Likewise.
22093 (add_header_seq): Likewise.
22094 (interleave_supported_p): Likewise.
22095 (vect_maybe_permute_loop_masks): Likewise.
22096 (vect_set_loop_masks_directly): Likewise.
22097 (vect_set_loop_condition_masked): Likewise.
22098 (vect_set_loop_condition_unmasked): New function, split out from
22099 slpeel_make_loop_iterate_ntimes.
22100 (slpeel_make_loop_iterate_ntimes): Rename to..
22101 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
22102 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
22103 (vect_do_peeling): Update call accordingly.
22104 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
22105 loops.
22106 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22107 mask_compare_type, can_fully_mask_p and fully_masked_p.
22108 (release_vec_loop_masks): New function.
22109 (_loop_vec_info): Use it to free the loop masks.
22110 (can_produce_all_loop_masks_p): New function.
22111 (vect_get_max_nscalars_per_iter): Likewise.
22112 (vect_verify_full_masking): Likewise.
22113 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
22114 retries, and free the mask rgroups before retrying. Check loop-wide
22115 reasons for disallowing fully-masked loops. Make the final decision
22116 about whether use a fully-masked loop or not.
22117 (vect_estimate_min_profitable_iters): Do not assume that peeling
22118 for the number of iterations will be needed for fully-masked loops.
22119 (vectorizable_reduction): Disable fully-masked loops.
22120 (vectorizable_live_operation): Likewise.
22121 (vect_halve_mask_nunits): New function.
22122 (vect_double_mask_nunits): Likewise.
22123 (vect_record_loop_mask): Likewise.
22124 (vect_get_loop_mask): Likewise.
22125 (vect_transform_loop): Handle the case in which the final loop
22126 iteration might handle a partial vector. Call vect_set_loop_condition
22127 instead of slpeel_make_loop_iterate_ntimes.
22128 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
22129 (check_load_store_masking): New function.
22130 (prepare_load_store_mask): Likewise.
22131 (vectorizable_store): Handle fully-masked loops.
22132 (vectorizable_load): Likewise.
22133 (supportable_widening_operation): Use vect_halve_mask_nunits for
22134 booleans.
22135 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
22136 (vect_gen_while): New function.
22137 * config/aarch64/aarch64.md (umax<mode>3): New expander.
22138 (aarch64_uqdec<mode>): New insn.
22139
22140 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22141 Alan Hayward <alan.hayward@arm.com>
22142 David Sherwood <david.sherwood@arm.com>
22143
22144 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
22145 (reduc_xor_scal_optab): New optabs.
22146 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
22147 (reduc_xor_scal_@var{m}): Document.
22148 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
22149 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
22150 internal functions.
22151 * fold-const-call.c (fold_const_call): Handle them.
22152 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
22153 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
22154 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
22155 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
22156 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
22157 (UNSPEC_XORV): New unspecs.
22158 (optab): Add entries for them.
22159 (BITWISEV): New int iterator.
22160 (bit_reduc_op): New int attributes.
22161
22162 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22163 Alan Hayward <alan.hayward@arm.com>
22164 David Sherwood <david.sherwood@arm.com>
22165
22166 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
22167 * internal-fn.def (VEC_SHL_INSERT): New internal function.
22168 * optabs.def (vec_shl_insert_optab): New optab.
22169 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
22170 (duplicate_and_interleave): Likewise.
22171 * tree-vect-loop.c: Include internal-fn.h.
22172 (neutral_op_for_slp_reduction): New function, split out from
22173 get_initial_defs_for_reduction.
22174 (get_initial_def_for_reduction): Handle option 2 for variable-length
22175 vectors by loading the neutral value into a vector and then shifting
22176 the initial value into element 0.
22177 (get_initial_defs_for_reduction): Replace the code argument with
22178 the neutral value calculated by neutral_op_for_slp_reduction.
22179 Use gimple_build_vector for constant-length vectors.
22180 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
22181 but the first group_size elements have a neutral value.
22182 Use duplicate_and_interleave otherwise.
22183 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
22184 Update call to get_initial_defs_for_reduction. Handle SLP
22185 reductions for variable-length vectors by creating one vector
22186 result for each scalar result, with the elements associated
22187 with other scalar results stubbed out with the neutral value.
22188 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
22189 Require IFN_VEC_SHL_INSERT for double reductions on
22190 variable-length vectors, or SLP reductions that have
22191 a neutral value. Require can_duplicate_and_interleave_p
22192 support for variable-length unchained SLP reductions if there
22193 is no neutral value, such as for MIN/MAX reductions. Also require
22194 the number of vector elements to be a multiple of the number of
22195 SLP statements when doing variable-length unchained SLP reductions.
22196 Update call to vect_create_epilog_for_reduction.
22197 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
22198 and remove initial values.
22199 (duplicate_and_interleave): Make public.
22200 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
22201 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
22202
22203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22204 Alan Hayward <alan.hayward@arm.com>
22205 David Sherwood <david.sherwood@arm.com>
22206
22207 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22208 (can_duplicate_and_interleave_p): New function.
22209 (vect_get_and_check_slp_defs): Take the vector of statements
22210 rather than just the current one. Remove excess parentheses.
22211 Restriction rejectinon of vect_constant_def and vect_external_def
22212 for variable-length vectors to boolean types, or types for which
22213 can_duplicate_and_interleave_p is false.
22214 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22215 (duplicate_and_interleave): New function.
22216 (vect_get_constant_vectors): Use gimple_build_vector for
22217 constant-length vectors and suitable variable-length constant
22218 vectors. Use duplicate_and_interleave for other variable-length
22219 vectors. Don't defer the update when inserting new statements.
22220
22221 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22222 Alan Hayward <alan.hayward@arm.com>
22223 David Sherwood <david.sherwood@arm.com>
22224
22225 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22226 min_profitable_iters doesn't go negative.
22227
22228 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22229 Alan Hayward <alan.hayward@arm.com>
22230 David Sherwood <david.sherwood@arm.com>
22231
22232 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22233 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22234 * optabs.def (vec_mask_load_lanes_optab): New optab.
22235 (vec_mask_store_lanes_optab): Likewise.
22236 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22237 (MASK_STORE_LANES): Likewise.
22238 * internal-fn.c (mask_load_lanes_direct): New macro.
22239 (mask_store_lanes_direct): Likewise.
22240 (expand_mask_load_optab_fn): Handle masked operations.
22241 (expand_mask_load_lanes_optab_fn): New macro.
22242 (expand_mask_store_optab_fn): Handle masked operations.
22243 (expand_mask_store_lanes_optab_fn): New macro.
22244 (direct_mask_load_lanes_optab_supported_p): Likewise.
22245 (direct_mask_store_lanes_optab_supported_p): Likewise.
22246 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22247 parameter.
22248 (vect_load_lanes_supported): Likewise.
22249 * tree-vect-data-refs.c (strip_conversion): New function.
22250 (can_group_stmts_p): Likewise.
22251 (vect_analyze_data_ref_accesses): Use it instead of checking
22252 for a pair of assignments.
22253 (vect_store_lanes_supported): Take a masked_p parameter.
22254 (vect_load_lanes_supported): Likewise.
22255 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22256 vect_store_lanes_supported and vect_load_lanes_supported.
22257 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22258 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22259 parameter. Don't allow gaps for masked accesses.
22260 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22261 and vect_load_lanes_supported.
22262 (get_load_store_type): Take a masked_p parameter and update
22263 call to get_group_load_store_type.
22264 (vectorizable_store): Update call to get_load_store_type.
22265 Handle IFN_MASK_STORE_LANES.
22266 (vectorizable_load): Update call to get_load_store_type.
22267 Handle IFN_MASK_LOAD_LANES.
22268
22269 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22270 Alan Hayward <alan.hayward@arm.com>
22271 David Sherwood <david.sherwood@arm.com>
22272
22273 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22274 modes for SVE.
22275 * config/aarch64/aarch64-protos.h
22276 (aarch64_sve_struct_memory_operand_p): Declare.
22277 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22278 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22279 (VPRED, vpred): Handle SVE structure modes.
22280 * config/aarch64/constraints.md (Utx): New constraint.
22281 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22282 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22283 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22284 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22285 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22286 structure modes. Split into pieces after RA.
22287 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22288 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22289 New patterns.
22290 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22291 SVE structure modes.
22292 (aarch64_classify_address): Likewise.
22293 (sizetochar): Move earlier in file.
22294 (aarch64_print_operand): Handle SVE register lists.
22295 (aarch64_array_mode): New function.
22296 (aarch64_sve_struct_memory_operand_p): Likewise.
22297 (TARGET_ARRAY_MODE): Redefine.
22298
22299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22300 Alan Hayward <alan.hayward@arm.com>
22301 David Sherwood <david.sherwood@arm.com>
22302
22303 * target.def (array_mode): New target hook.
22304 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22305 * doc/tm.texi: Regenerate.
22306 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22307 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22308 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22309 targetm.array_mode.
22310 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22311 type sizes.
22312
22313 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22314 Alan Hayward <alan.hayward@arm.com>
22315 David Sherwood <david.sherwood@arm.com>
22316
22317 * fold-const.c (fold_binary_loc): Check the argument types
22318 rather than the result type when testing for a vector operation.
22319
22320 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22321
22322 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22323 * doc/tm.texi: Regenerate.
22324
22325 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22326 Alan Hayward <alan.hayward@arm.com>
22327 David Sherwood <david.sherwood@arm.com>
22328
22329 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22330 (sve): Document new AArch64 extension.
22331 * doc/md.texi (w): Extend the description of the AArch64
22332 constraint to include SVE vectors.
22333 (Upl, Upa): Document new AArch64 predicate constraints.
22334 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22335 enum.
22336 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22337 (msve-vector-bits=): New option.
22338 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22339 SVE when these are disabled.
22340 (sve): New extension.
22341 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22342 modes. Adjust their number of units based on aarch64_sve_vg.
22343 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22344 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22345 aarch64_addr_query_type.
22346 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22347 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22348 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22349 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22350 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22351 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22352 (aarch64_simd_imm_zero_p): Delete.
22353 (aarch64_check_zero_based_sve_index_immediate): Declare.
22354 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22355 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22356 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22357 (aarch64_sve_float_mul_immediate_p): Likewise.
22358 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22359 rather than an rtx.
22360 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22361 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22362 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22363 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22364 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22365 (aarch64_regmode_natural_size): Likewise.
22366 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22367 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22368 left one place.
22369 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22370 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22371 for VG and the SVE predicate registers.
22372 (V_ALIASES): Add a "z"-prefixed alias.
22373 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22374 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22375 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22376 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22377 (REG_CLASS_NAMES): Add entries for them.
22378 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22379 and the predicate registers.
22380 (aarch64_sve_vg): Declare.
22381 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22382 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22383 (REGMODE_NATURAL_SIZE): Define.
22384 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22385 SVE macros.
22386 * config/aarch64/aarch64.c: Include cfgrtl.h.
22387 (simd_immediate_info): Add a constructor for series vectors,
22388 and an associated step field.
22389 (aarch64_sve_vg): New variable.
22390 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22391 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22392 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22393 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22394 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22395 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22396 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22397 (aarch64_get_mask_mode): New functions.
22398 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22399 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22400 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22401 predicate modes and predicate registers. Explicitly restrict
22402 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22403 to store a vector mode if it is recognized by
22404 aarch64_classify_vector_mode.
22405 (aarch64_regmode_natural_size): New function.
22406 (aarch64_hard_regno_caller_save_mode): Return the original mode
22407 for predicates.
22408 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22409 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22410 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22411 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22412 functions.
22413 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22414 does not overlap dest if the function is frame-related. Handle
22415 SVE constants.
22416 (aarch64_split_add_offset): New function.
22417 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22418 them aarch64_add_offset.
22419 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22420 and update call to aarch64_sub_sp.
22421 (aarch64_add_cfa_expression): New function.
22422 (aarch64_expand_prologue): Pass extra temporary registers to the
22423 functions above. Handle the case in which we need to emit new
22424 DW_CFA_expressions for registers that were originally saved
22425 relative to the stack pointer, but now have to be expressed
22426 relative to the frame pointer.
22427 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22428 functions above.
22429 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22430 IP0 and IP1 values for SVE frames.
22431 (aarch64_expand_vec_series): New function.
22432 (aarch64_expand_sve_widened_duplicate): Likewise.
22433 (aarch64_expand_sve_const_vector): Likewise.
22434 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22435 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22436 into the register, rather than emitting a SET directly.
22437 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22438 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22439 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22440 (offset_9bit_signed_scaled_p): New functions.
22441 (aarch64_replicate_bitmask_imm): New function.
22442 (aarch64_bitmask_imm): Use it.
22443 (aarch64_cannot_force_const_mem): Reject expressions involving
22444 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22445 (aarch64_classify_index): Handle SVE indices, by requiring
22446 a plain register index with a scale that matches the element size.
22447 (aarch64_classify_address): Handle SVE addresses. Assert that
22448 the mode of the address is VOIDmode or an integer mode.
22449 Update call to aarch64_classify_symbol.
22450 (aarch64_classify_symbolic_expression): Update call to
22451 aarch64_classify_symbol.
22452 (aarch64_const_vec_all_in_range_p): New function.
22453 (aarch64_print_vector_float_operand): Likewise.
22454 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22455 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22456 and the FP immediates 1.0 and 0.5.
22457 (aarch64_print_address_internal): Handle SVE addresses.
22458 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22459 (aarch64_regno_regclass): Handle predicate registers.
22460 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22461 data modes.
22462 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22463 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22464 (aarch64_convert_sve_vector_bits): New function.
22465 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22466 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22467 rather than an rtx.
22468 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22469 Handle SVE vector and predicate modes. Accept VL-based constants
22470 that need only one temporary register, and VL offsets that require
22471 no temporary registers.
22472 (aarch64_conditional_register_usage): Mark the predicate registers
22473 as fixed if SVE isn't available.
22474 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22475 Return true for SVE vector and predicate modes.
22476 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22477 rather than an unsigned int. Handle SVE modes.
22478 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22479 SVE modes.
22480 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22481 if SVE is enabled.
22482 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22483 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22484 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22485 (aarch64_sve_float_mul_immediate_p): New functions.
22486 (aarch64_sve_valid_immediate): New function.
22487 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22488 Explicitly reject structure modes. Check for INDEX constants.
22489 Handle PTRUE and PFALSE constants.
22490 (aarch64_check_zero_based_sve_index_immediate): New function.
22491 (aarch64_simd_imm_zero_p): Delete.
22492 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22493 vector modes. Accept constants in the range of CNT[BHWD].
22494 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22495 ask for an Advanced SIMD mode.
22496 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22497 (aarch64_simd_vector_alignment): Handle SVE predicates.
22498 (aarch64_vectorize_preferred_vector_alignment): New function.
22499 (aarch64_simd_vector_alignment_reachable): Use it instead of
22500 the vector size.
22501 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22502 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22503 functions.
22504 (MAX_VECT_LEN): Delete.
22505 (expand_vec_perm_d): Add a vec_flags field.
22506 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22507 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22508 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22509 for SVE modes.
22510 (aarch64_evpc_rev): Rename to...
22511 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22512 (aarch64_evpc_rev_global): New function.
22513 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22514 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22515 MAX_VECT_LEN.
22516 (aarch64_evpc_sve_tbl): New function.
22517 (aarch64_expand_vec_perm_const_1): Update after rename of
22518 aarch64_evpc_rev. Handle SVE permutes too, trying
22519 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22520 than aarch64_evpc_tbl.
22521 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22522 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22523 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22524 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22525 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22526 (aarch64_expand_sve_vcond): New functions.
22527 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22528 of aarch64_vector_mode_p.
22529 (aarch64_dwarf_poly_indeterminate_value): New function.
22530 (aarch64_compute_pressure_classes): Likewise.
22531 (aarch64_can_change_mode_class): Likewise.
22532 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22533 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22534 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22535 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22536 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22537 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22538 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22539 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22540 constraints.
22541 (Dn, Dl, Dr): Accept const as well as const_vector.
22542 (Dz): Likewise. Compare against CONST0_RTX.
22543 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22544 of "vector" where appropriate.
22545 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22546 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22547 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22548 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22549 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22550 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22551 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22552 (v_int_equiv): Extend to SVE modes.
22553 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22554 mode attributes.
22555 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22556 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22557 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22558 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22559 (SVE_COND_FP_CMP): New int iterators.
22560 (perm_hilo): Handle the new unpack unspecs.
22561 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22562 attributes.
22563 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22564 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22565 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22566 (aarch64_equality_operator, aarch64_constant_vector_operand)
22567 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22568 (aarch64_sve_nonimmediate_operand): Likewise.
22569 (aarch64_sve_general_operand): Likewise.
22570 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22571 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22572 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22573 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22574 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22575 (aarch64_sve_float_arith_immediate): Likewise.
22576 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22577 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22578 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22579 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22580 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22581 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22582 (aarch64_sve_float_arith_operand): Likewise.
22583 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22584 (aarch64_sve_float_mul_operand): Likewise.
22585 (aarch64_sve_vec_perm_operand): Likewise.
22586 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22587 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22588 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22589 as well as const_vector.
22590 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22591 in file. Use CONST0_RTX and CONSTM1_RTX.
22592 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22593 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22594 Use aarch64_simd_imm_zero.
22595 * config/aarch64/aarch64-sve.md: New file.
22596 * config/aarch64/aarch64.md: Include it.
22597 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22598 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22599 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22600 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22601 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22602 (sve): New attribute.
22603 (enabled): Disable instructions with the sve attribute unless
22604 TARGET_SVE.
22605 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22606 aarch64_expand_mov_immediate.
22607 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22608 CNT[BHSD] immediates.
22609 (movti): Split CONST_POLY_INT moves into two halves.
22610 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22611 Split additions that need a temporary here if the destination
22612 is the stack pointer.
22613 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22614 (*add<mode>3_poly_1): New instruction.
22615 (set_clobber_cc): New expander.
22616
22617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22618
22619 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22620 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22621 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22622 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22623 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22624 Change innermode from fixed_mode_size to machine_mode.
22625 (simplify_subreg): Update call accordingly. Handle a constant-sized
22626 subreg of a variable-length CONST_VECTOR.
22627
22628 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22629 Alan Hayward <alan.hayward@arm.com>
22630 David Sherwood <david.sherwood@arm.com>
22631
22632 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22633 (add_offset_to_base): New function, split out from...
22634 (create_mem_ref): ...here. When handling a scale other than 1,
22635 check first whether the address is valid without the offset.
22636 Add it into the base if so, leaving the index and scale as-is.
22637
22638 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22639
22640 PR c++/83778
22641 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22642 fold_for_warn before checking if arg2 is INTEGER_CST.
22643
22644 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22645
22646 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22647 (store_multiple_operation): Delete.
22648 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22649 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22650 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22651 guarded by TARGET_STRING.
22652 (rs6000_output_load_multiple): Delete.
22653 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22654 OPTION_MASK_STRING / TARGET_STRING handling.
22655 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22656 (const rs6000_opt_masks) <"string">: Change mask to 0.
22657 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22658 (MASK_STRING): Delete.
22659 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22660 parts. Simplify.
22661 (load_multiple): Delete.
22662 (*ldmsi8): Delete.
22663 (*ldmsi7): Delete.
22664 (*ldmsi6): Delete.
22665 (*ldmsi5): Delete.
22666 (*ldmsi4): Delete.
22667 (*ldmsi3): Delete.
22668 (store_multiple): Delete.
22669 (*stmsi8): Delete.
22670 (*stmsi7): Delete.
22671 (*stmsi6): Delete.
22672 (*stmsi5): Delete.
22673 (*stmsi4): Delete.
22674 (*stmsi3): Delete.
22675 (movmemsi_8reg): Delete.
22676 (corresponding unnamed define_insn): Delete.
22677 (movmemsi_6reg): Delete.
22678 (corresponding unnamed define_insn): Delete.
22679 (movmemsi_4reg): Delete.
22680 (corresponding unnamed define_insn): Delete.
22681 (movmemsi_2reg): Delete.
22682 (corresponding unnamed define_insn): Delete.
22683 (movmemsi_1reg): Delete.
22684 (corresponding unnamed define_insn): Delete.
22685 * config/rs6000/rs6000.opt (mno-string): New.
22686 (mstring): Replace by deprecation warning stub.
22687 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22688
22689 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22690
22691 * regrename.c (regrename_do_replace): If replacing the same
22692 reg multiple times, try to reuse last created gen_raw_REG.
22693
22694 PR debug/81155
22695 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22696 main to workaround a bug in GDB.
22697
22698 2018-01-12 Tom de Vries <tom@codesourcery.com>
22699
22700 PR target/83737
22701 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22702
22703 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22704
22705 PR rtl-optimization/80481
22706 * ira-color.c (get_cap_member): New function.
22707 (allocnos_conflict_by_live_ranges_p): Use it.
22708 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22709 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22710
22711 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22712
22713 PR target/83628
22714 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22715 (*saddl_se_1): Ditto.
22716 (*ssubsi_1): Ditto.
22717 (*ssubl_se_1): Ditto.
22718
22719 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22720
22721 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22722 rather than wi::to_widest for DR_INITs.
22723 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22724 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22725 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22726 INTEGER_CSTs.
22727 (vect_analyze_group_access_1): Note that here.
22728
22729 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22730
22731 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22732 polynomial type sizes.
22733
22734 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22735
22736 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22737 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22738 (gimple_add_tmp_var): Likewise.
22739
22740 2018-01-12 Martin Liska <mliska@suse.cz>
22741
22742 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22743 (gimple_alloc_sizes): Likewise.
22744 (dump_gimple_statistics): Use PRIu64 in printf format.
22745 * gimple.h: Change uint64_t to int.
22746
22747 2018-01-12 Martin Liska <mliska@suse.cz>
22748
22749 * tree-core.h: Use uint64_t instead of int.
22750 * tree.c (tree_node_counts): Likewise.
22751 (tree_node_sizes): Likewise.
22752 (dump_tree_statistics): Use PRIu64 in printf format.
22753
22754 2018-01-12 Martin Liska <mliska@suse.cz>
22755
22756 * Makefile.in: As qsort_chk is implemented in vec.c, add
22757 vec.o to linkage of gencfn-macros.
22758 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22759 passing the info to record_node_allocation_statistics.
22760 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22761 and pass the info.
22762 * ggc-common.c (struct ggc_usage): Add operator== and use
22763 it in operator< and compare function.
22764 * mem-stats.h (struct mem_usage): Likewise.
22765 * vec.c (struct vec_usage): Remove operator< and compare
22766 function. Can be simply inherited.
22767
22768 2018-01-12 Martin Jambor <mjambor@suse.cz>
22769
22770 PR target/81616
22771 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22772 * tree-ssa-math-opts.c: Include domwalk.h.
22773 (convert_mult_to_fma_1): New function.
22774 (fma_transformation_info): New type.
22775 (fma_deferring_state): Likewise.
22776 (cancel_fma_deferring): New function.
22777 (result_of_phi): Likewise.
22778 (last_fma_candidate_feeds_initial_phi): Likewise.
22779 (convert_mult_to_fma): Added deferring logic, split actual
22780 transformation to convert_mult_to_fma_1.
22781 (math_opts_dom_walker): New type.
22782 (math_opts_dom_walker::after_dom_children): New method, body moved
22783 here from pass_optimize_widening_mul::execute, added deferring logic
22784 bits.
22785 (pass_optimize_widening_mul::execute): Moved most of code to
22786 math_opts_dom_walker::after_dom_children.
22787 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22788 * config/i386/i386.c (ix86_option_override_internal): Added
22789 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22790
22791 2018-01-12 Richard Biener <rguenther@suse.de>
22792
22793 PR debug/83157
22794 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22795 inline instance vars.
22796
22797 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22798
22799 PR target/81819
22800 * config/rx/rx.c (rx_is_restricted_memory_address):
22801 Handle SUBREG case.
22802
22803 2018-01-12 Richard Biener <rguenther@suse.de>
22804
22805 PR tree-optimization/80846
22806 * target.def (split_reduction): New target hook.
22807 * targhooks.c (default_split_reduction): New function.
22808 * targhooks.h (default_split_reduction): Declare.
22809 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22810 target requests first reduce vectors by combining low and high
22811 parts.
22812 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22813 (get_vectype_for_scalar_type_and_size): Export.
22814 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22815 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22816 * doc/tm.texi: Regenerate.
22817 * config/i386/i386.c (ix86_split_reduction): Implement
22818 TARGET_VECTORIZE_SPLIT_REDUCTION.
22819
22820 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22821
22822 PR target/83368
22823 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22824 in PIC mode except for TARGET_VXWORKS_RTP.
22825 * config/sparc/sparc.c: Include cfgrtl.h.
22826 (TARGET_INIT_PIC_REG): Define.
22827 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22828 (sparc_pic_register_p): New predicate.
22829 (sparc_legitimate_address_p): Use it.
22830 (sparc_legitimize_pic_address): Likewise.
22831 (sparc_delegitimize_address): Likewise.
22832 (sparc_mode_dependent_address_p): Likewise.
22833 (gen_load_pcrel_sym): Remove 4th parameter.
22834 (load_got_register): Adjust call to above. Remove obsolete stuff.
22835 (sparc_expand_prologue): Do not call load_got_register here.
22836 (sparc_flat_expand_prologue): Likewise.
22837 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22838 (sparc_use_pseudo_pic_reg): New function.
22839 (sparc_init_pic_reg): Likewise.
22840 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22841 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22842
22843 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22844
22845 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22846 Add item for branch_cost.
22847
22848 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22849
22850 PR rtl-optimization/83565
22851 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22852 not extend the result to a larger mode for rotate operations.
22853 (num_sign_bit_copies1): Likewise.
22854
22855 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22856
22857 PR target/40411
22858 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22859 -symbolic.
22860 Use values-Xc.o for -pedantic.
22861 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22862
22863 2018-01-12 Martin Liska <mliska@suse.cz>
22864
22865 PR ipa/83054
22866 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22867 New function.
22868 (possible_polymorphic_call_targets): Use it.
22869 (ipa_devirt): Likewise.
22870
22871 2018-01-12 Martin Liska <mliska@suse.cz>
22872
22873 * profile-count.h (enum profile_quality): Use 0 as invalid
22874 enum value of profile_quality.
22875
22876 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22877
22878 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22879 -mext-string options.
22880
22881 2018-01-12 Richard Biener <rguenther@suse.de>
22882
22883 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22884 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22885 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22886 Likewise.
22887 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22888
22889 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22890
22891 * configure.ac (--with-long-double-format): Add support for the
22892 configuration option to change the default long double format on
22893 PowerPC systems.
22894 * config.gcc (powerpc*-linux*-*): Likewise.
22895 * configure: Regenerate.
22896 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22897 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22898 used without modification.
22899
22900 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22901
22902 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22903 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22904 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22905 MISC_BUILTIN_SPEC_BARRIER.
22906 (rs6000_init_builtins): Likewise.
22907 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22908 enum value.
22909 (speculation_barrier): New define_insn.
22910 * doc/extend.texi: Document __builtin_speculation_barrier.
22911
22912 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22913
22914 PR target/83203
22915 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22916 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22917 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22918 iterators.
22919 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22920 integral modes instead of "ss" and "sd".
22921 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22922 vectors with 32-bit and 64-bit elements.
22923 (vecdupssescalarmodesuffix): New mode attribute.
22924 (vec_dup<mode>): Use it.
22925
22926 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22927
22928 PR target/83330
22929 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22930 frame if argument is passed on stack.
22931
22932 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22933
22934 PR target/82682
22935 * ree.c (combine_reaching_defs): Optimize also
22936 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22937 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22938
22939 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22940
22941 PR middle-end/83189
22942 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22943
22944 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22945
22946 PR middle-end/83718
22947 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22948 after they are computed.
22949
22950 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22951
22952 PR tree-optimization/83695
22953 * gimple-loop-linterchange.cc
22954 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22955 reset cached scev information after interchange.
22956 (pass_linterchange::execute): Remove call to scev_reset_htab.
22957
22958 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22959
22960 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22961 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22962 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22963 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22964 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22965 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22966 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22967 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22968 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22969 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22970 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22971 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22972 (V_lane_reg): Likewise.
22973 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22974 New define_expand.
22975 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22976 (vfmal_lane_low<mode>_intrinsic,
22977 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22978 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22979 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22980 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22981 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22982 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22983
22984 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22985
22986 * config/arm/arm-cpus.in (fp16fml): New feature.
22987 (ALL_SIMD): Add fp16fml.
22988 (armv8.2-a): Add fp16fml as an option.
22989 (armv8.3-a): Likewise.
22990 (armv8.4-a): Add fp16fml as part of fp16.
22991 * config/arm/arm.h (TARGET_FP16FML): Define.
22992 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22993 when appropriate.
22994 * config/arm/arm-modes.def (V2HF): Define.
22995 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22996 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22997 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22998 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22999 vfmsl_low, vfmsl_high): New set of builtins.
23000 * config/arm/iterators.md (PLUSMINUS): New code iterator.
23001 (vfml_op): New code attribute.
23002 (VFMLHALVES): New int iterator.
23003 (VFML, VFMLSEL): New mode attributes.
23004 (V_reg): Define mapping for V2HF.
23005 (V_hi, V_lo): New mode attributes.
23006 (VF_constraint): Likewise.
23007 (vfml_half, vfml_half_selector): New int attributes.
23008 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
23009 define_expand.
23010 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
23011 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
23012 New define_insn.
23013 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
23014 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
23015 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
23016 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
23017 documentation.
23018 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
23019 Document new effective target and option set.
23020
23021 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23022
23023 * config/arm/arm-cpus.in (armv8_4): New feature.
23024 (ARMv8_4a): New fgroup.
23025 (armv8.4-a): New arch.
23026 * config/arm/arm-tables.opt: Regenerate.
23027 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
23028 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
23029 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
23030 Add matching rules for -march=armv8.4-a and extensions.
23031 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
23032
23033 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
23034
23035 PR target/81821
23036 * config/rx/rx.md (BW): New mode attribute.
23037 (sync_lock_test_and_setsi): Add mode suffix to insn output.
23038
23039 2018-01-11 Richard Biener <rguenther@suse.de>
23040
23041 PR tree-optimization/83435
23042 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
23043 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
23044 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
23045
23046 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23047 Alan Hayward <alan.hayward@arm.com>
23048 David Sherwood <david.sherwood@arm.com>
23049
23050 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
23051 field.
23052 (aarch64_classify_address): Initialize it. Track polynomial offsets.
23053 (aarch64_print_address_internal): Use it to check for a zero offset.
23054
23055 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23056 Alan Hayward <alan.hayward@arm.com>
23057 David Sherwood <david.sherwood@arm.com>
23058
23059 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
23060 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
23061 Return a poly_int64 rather than a HOST_WIDE_INT.
23062 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
23063 rather than a HOST_WIDE_INT.
23064 * config/aarch64/aarch64.h (aarch64_frame): Protect with
23065 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
23066 hard_fp_offset, frame_size, initial_adjust, callee_offset and
23067 final_offset from HOST_WIDE_INT to poly_int64.
23068 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
23069 to_constant when getting the number of units in an Advanced SIMD
23070 mode.
23071 (aarch64_builtin_vectorized_function): Check for a constant number
23072 of units.
23073 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
23074 GET_MODE_SIZE.
23075 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
23076 attribute instead of GET_MODE_NUNITS.
23077 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
23078 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
23079 GET_MODE_SIZE for fixed-size registers.
23080 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
23081 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
23082 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
23083 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
23084 (aarch64_print_operand, aarch64_print_address_internal)
23085 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
23086 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
23087 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
23088 Handle polynomial GET_MODE_SIZE.
23089 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
23090 wider than SImode without modification.
23091 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
23092 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
23093 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
23094 passing and returning SVE modes.
23095 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
23096 rather than GEN_INT.
23097 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
23098 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
23099 (aarch64_allocate_and_probe_stack_space): Likewise.
23100 (aarch64_layout_frame): Cope with polynomial offsets.
23101 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
23102 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
23103 polynomial offsets.
23104 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
23105 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
23106 poly_int64 rather than a HOST_WIDE_INT.
23107 (aarch64_get_separate_components, aarch64_process_components)
23108 (aarch64_expand_prologue, aarch64_expand_epilogue)
23109 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
23110 (aarch64_anchor_offset): New function, split out from...
23111 (aarch64_legitimize_address): ...here.
23112 (aarch64_builtin_vectorization_cost): Handle polynomial
23113 TYPE_VECTOR_SUBPARTS.
23114 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
23115 GET_MODE_NUNITS.
23116 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
23117 number of elements from the PARALLEL rather than the mode.
23118 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
23119 rather than GET_MODE_BITSIZE.
23120 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
23121 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
23122 (aarch64_expand_vec_perm_const_1): Handle polynomial
23123 d->perm.length () and d->perm elements.
23124 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
23125 Apply to_constant to d->perm elements.
23126 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
23127 polynomial CONST_VECTOR_NUNITS.
23128 (aarch64_move_pointer): Take amount as a poly_int64 rather
23129 than an int.
23130 (aarch64_progress_pointer): Avoid temporary variable.
23131 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
23132 the mode attribute instead of GET_MODE.
23133
23134 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23135 Alan Hayward <alan.hayward@arm.com>
23136 David Sherwood <david.sherwood@arm.com>
23137
23138 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
23139 x exists before using it.
23140 (aarch64_add_constant_internal): Rename to...
23141 (aarch64_add_offset_1): ...this. Replace regnum with separate
23142 src and dest rtxes. Handle the case in which they're different,
23143 including when the offset is zero. Replace scratchreg with an rtx.
23144 Use 2 additions if there is no spare register into which we can
23145 move a 16-bit constant.
23146 (aarch64_add_constant): Delete.
23147 (aarch64_add_offset): Replace reg with separate src and dest
23148 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
23149 Use aarch64_add_offset_1.
23150 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
23151 an rtx rather than an int. Take the delta as a poly_int64
23152 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
23153 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
23154 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
23155 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
23156 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
23157 and aarch64_add_sp.
23158 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
23159 aarch64_add_constant.
23160
23161 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23162
23163 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
23164 Use scalar_float_mode.
23165
23166 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23167
23168 * config/aarch64/aarch64-simd.md
23169 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
23170 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
23171 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
23172 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
23173 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
23174 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
23175 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
23176 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
23177 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
23178 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
23179
23180 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23181
23182 PR target/83514
23183 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
23184 targ_options->x_arm_arch_string is non NULL.
23185
23186 2018-01-11 Tamar Christina <tamar.christina@arm.com>
23187
23188 * config/aarch64/aarch64.h
23189 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
23190
23191 2018-01-11 Sudakshina Das <sudi.das@arm.com>
23192
23193 PR target/82096
23194 * expmed.c (emit_store_flag_force): Swap if const op0
23195 and change VOIDmode to mode of op0.
23196
23197 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
23198
23199 PR rtl-optimization/83761
23200 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
23201 than bytes to mode_for_size.
23202
23203 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23204
23205 PR middle-end/83189
23206 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23207 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23208 profile.
23209
23210 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23211
23212 PR middle-end/83575
23213 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23214 when in layout mode.
23215 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23216 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23217 partition fixup.
23218
23219 2018-01-10 Michael Collison <michael.collison@arm.com>
23220
23221 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23222 * config/aarch64/aarch64-option-extension.def: Add
23223 AARCH64_OPT_EXTENSION of 'fp16fml'.
23224 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23225 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23226 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23227 * config/aarch64/constraints.md (Ui7): New constraint.
23228 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23229 (VFMLA_SEL_W): Ditto.
23230 (f16quad): Ditto.
23231 (f16mac1): Ditto.
23232 (VFMLA16_LOW): New int iterator.
23233 (VFMLA16_HIGH): Ditto.
23234 (UNSPEC_FMLAL): New unspec.
23235 (UNSPEC_FMLSL): Ditto.
23236 (UNSPEC_FMLAL2): Ditto.
23237 (UNSPEC_FMLSL2): Ditto.
23238 (f16mac): New code attribute.
23239 * config/aarch64/aarch64-simd-builtins.def
23240 (aarch64_fmlal_lowv2sf): Ditto.
23241 (aarch64_fmlsl_lowv2sf): Ditto.
23242 (aarch64_fmlalq_lowv4sf): Ditto.
23243 (aarch64_fmlslq_lowv4sf): Ditto.
23244 (aarch64_fmlal_highv2sf): Ditto.
23245 (aarch64_fmlsl_highv2sf): Ditto.
23246 (aarch64_fmlalq_highv4sf): Ditto.
23247 (aarch64_fmlslq_highv4sf): Ditto.
23248 (aarch64_fmlal_lane_lowv2sf): Ditto.
23249 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23250 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23251 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23252 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23253 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23254 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23255 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23256 (aarch64_fmlal_lane_highv2sf): Ditto.
23257 (aarch64_fmlsl_lane_highv2sf): Ditto.
23258 (aarch64_fmlal_laneq_highv2sf): Ditto.
23259 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23260 (aarch64_fmlalq_lane_highv4sf): Ditto.
23261 (aarch64_fmlsl_lane_highv4sf): Ditto.
23262 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23263 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23264 * config/aarch64/aarch64-simd.md:
23265 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23266 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23267 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23268 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23269 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23270 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23271 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23272 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23273 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23274 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23275 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23276 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23277 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23278 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23279 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23280 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23281 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23282 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23283 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23284 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23285 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23286 (vfmlsl_low_u32): Ditto.
23287 (vfmlalq_low_u32): Ditto.
23288 (vfmlslq_low_u32): Ditto.
23289 (vfmlal_high_u32): Ditto.
23290 (vfmlsl_high_u32): Ditto.
23291 (vfmlalq_high_u32): Ditto.
23292 (vfmlslq_high_u32): Ditto.
23293 (vfmlal_lane_low_u32): Ditto.
23294 (vfmlsl_lane_low_u32): Ditto.
23295 (vfmlal_laneq_low_u32): Ditto.
23296 (vfmlsl_laneq_low_u32): Ditto.
23297 (vfmlalq_lane_low_u32): Ditto.
23298 (vfmlslq_lane_low_u32): Ditto.
23299 (vfmlalq_laneq_low_u32): Ditto.
23300 (vfmlslq_laneq_low_u32): Ditto.
23301 (vfmlal_lane_high_u32): Ditto.
23302 (vfmlsl_lane_high_u32): Ditto.
23303 (vfmlal_laneq_high_u32): Ditto.
23304 (vfmlsl_laneq_high_u32): Ditto.
23305 (vfmlalq_lane_high_u32): Ditto.
23306 (vfmlslq_lane_high_u32): Ditto.
23307 (vfmlalq_laneq_high_u32): Ditto.
23308 (vfmlslq_laneq_high_u32): Ditto.
23309 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23310 (AARCH64_FL_FOR_ARCH8_4): New.
23311 (AARCH64_ISA_F16FML): New ISA flag.
23312 (TARGET_F16FML): New feature flag for fp16fml.
23313 (doc/invoke.texi): Document new fp16fml option.
23314
23315 2018-01-10 Michael Collison <michael.collison@arm.com>
23316
23317 * config/aarch64/aarch64-builtins.c:
23318 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23319 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23320 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23321 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23322 (AARCH64_ISA_SHA3): New ISA flag.
23323 (TARGET_SHA3): New feature flag for sha3.
23324 * config/aarch64/iterators.md (sha512_op): New int attribute.
23325 (CRYPTO_SHA512): New int iterator.
23326 (UNSPEC_SHA512H): New unspec.
23327 (UNSPEC_SHA512H2): Ditto.
23328 (UNSPEC_SHA512SU0): Ditto.
23329 (UNSPEC_SHA512SU1): Ditto.
23330 * config/aarch64/aarch64-simd-builtins.def
23331 (aarch64_crypto_sha512hqv2di): New builtin.
23332 (aarch64_crypto_sha512h2qv2di): Ditto.
23333 (aarch64_crypto_sha512su0qv2di): Ditto.
23334 (aarch64_crypto_sha512su1qv2di): Ditto.
23335 (aarch64_eor3qv8hi): Ditto.
23336 (aarch64_rax1qv2di): Ditto.
23337 (aarch64_xarqv2di): Ditto.
23338 (aarch64_bcaxqv8hi): Ditto.
23339 * config/aarch64/aarch64-simd.md:
23340 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23341 (aarch64_crypto_sha512su0qv2di): Ditto.
23342 (aarch64_crypto_sha512su1qv2di): Ditto.
23343 (aarch64_eor3qv8hi): Ditto.
23344 (aarch64_rax1qv2di): Ditto.
23345 (aarch64_xarqv2di): Ditto.
23346 (aarch64_bcaxqv8hi): Ditto.
23347 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23348 (vsha512h2q_u64): Ditto.
23349 (vsha512su0q_u64): Ditto.
23350 (vsha512su1q_u64): Ditto.
23351 (veor3q_u16): Ditto.
23352 (vrax1q_u64): Ditto.
23353 (vxarq_u64): Ditto.
23354 (vbcaxq_u16): Ditto.
23355 * config/arm/types.md (crypto_sha512): New type attribute.
23356 (crypto_sha3): Ditto.
23357 (doc/invoke.texi): Document new sha3 option.
23358
23359 2018-01-10 Michael Collison <michael.collison@arm.com>
23360
23361 * config/aarch64/aarch64-builtins.c:
23362 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23363 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23364 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23365 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23366 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23367 (AARCH64_ISA_SM4): New ISA flag.
23368 (TARGET_SM4): New feature flag for sm4.
23369 * config/aarch64/aarch64-simd-builtins.def
23370 (aarch64_sm3ss1qv4si): Ditto.
23371 (aarch64_sm3tt1aq4si): Ditto.
23372 (aarch64_sm3tt1bq4si): Ditto.
23373 (aarch64_sm3tt2aq4si): Ditto.
23374 (aarch64_sm3tt2bq4si): Ditto.
23375 (aarch64_sm3partw1qv4si): Ditto.
23376 (aarch64_sm3partw2qv4si): Ditto.
23377 (aarch64_sm4eqv4si): Ditto.
23378 (aarch64_sm4ekeyqv4si): Ditto.
23379 * config/aarch64/aarch64-simd.md:
23380 (aarch64_sm3ss1qv4si): Ditto.
23381 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23382 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23383 (aarch64_sm4eqv4si): Ditto.
23384 (aarch64_sm4ekeyqv4si): Ditto.
23385 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23386 (sm3part_op): Ditto.
23387 (CRYPTO_SM3TT): Ditto.
23388 (CRYPTO_SM3PART): Ditto.
23389 (UNSPEC_SM3SS1): New unspec.
23390 (UNSPEC_SM3TT1A): Ditto.
23391 (UNSPEC_SM3TT1B): Ditto.
23392 (UNSPEC_SM3TT2A): Ditto.
23393 (UNSPEC_SM3TT2B): Ditto.
23394 (UNSPEC_SM3PARTW1): Ditto.
23395 (UNSPEC_SM3PARTW2): Ditto.
23396 (UNSPEC_SM4E): Ditto.
23397 (UNSPEC_SM4EKEY): Ditto.
23398 * config/aarch64/constraints.md (Ui2): New constraint.
23399 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23400 * config/arm/types.md (crypto_sm3): New type attribute.
23401 (crypto_sm4): Ditto.
23402 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23403 (vsm3tt1aq_u32): Ditto.
23404 (vsm3tt1bq_u32): Ditto.
23405 (vsm3tt2aq_u32): Ditto.
23406 (vsm3tt2bq_u32): Ditto.
23407 (vsm3partw1q_u32): Ditto.
23408 (vsm3partw2q_u32): Ditto.
23409 (vsm4eq_u32): Ditto.
23410 (vsm4ekeyq_u32): Ditto.
23411 (doc/invoke.texi): Document new sm4 option.
23412
23413 2018-01-10 Michael Collison <michael.collison@arm.com>
23414
23415 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23416 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23417 (AARCH64_FL_FOR_ARCH8_4): New.
23418 (AARCH64_FL_V8_4): New flag.
23419 (doc/invoke.texi): Document new armv8.4-a option.
23420
23421 2018-01-10 Michael Collison <michael.collison@arm.com>
23422
23423 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23424 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23425 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23426 * config/aarch64/aarch64-option-extension.def: Add
23427 AARCH64_OPT_EXTENSION of 'sha2'.
23428 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23429 (crypto): Disable sha2 and aes if crypto disabled.
23430 (crypto): Enable aes and sha2 if enabled.
23431 (simd): Disable sha2 and aes if simd disabled.
23432 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23433 New flags.
23434 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23435 (TARGET_SHA2): New feature flag for sha2.
23436 (TARGET_AES): New feature flag for aes.
23437 * config/aarch64/aarch64-simd.md:
23438 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23439 conditional on TARGET_AES.
23440 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23441 (aarch64_crypto_sha1hsi): Make pattern conditional
23442 on TARGET_SHA2.
23443 (aarch64_crypto_sha1hv4si): Ditto.
23444 (aarch64_be_crypto_sha1hv4si): Ditto.
23445 (aarch64_crypto_sha1su1v4si): Ditto.
23446 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23447 (aarch64_crypto_sha1su0v4si): Ditto.
23448 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23449 (aarch64_crypto_sha256su0v4si): Ditto.
23450 (aarch64_crypto_sha256su1v4si): Ditto.
23451 (doc/invoke.texi): Document new aes and sha2 options.
23452
23453 2018-01-10 Martin Sebor <msebor@redhat.com>
23454
23455 PR tree-optimization/83781
23456 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23457 as string arrays.
23458
23459 2018-01-11 Martin Sebor <msebor@gmail.com>
23460 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23461
23462 PR tree-optimization/83501
23463 PR tree-optimization/81703
23464
23465 * tree-ssa-strlen.c (get_string_cst): Rename...
23466 (get_string_len): ...to this. Handle global constants.
23467 (handle_char_store): Adjust.
23468
23469 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23470 Jim Wilson <jimw@sifive.com>
23471
23472 * config/riscv/riscv-protos.h (riscv_output_return): New.
23473 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23474 (riscv_attribute_table, riscv_output_return),
23475 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23476 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23477 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23478 function.
23479 (riscv_expand_prologue): Add early return for naked function.
23480 (riscv_expand_epilogue): Likewise.
23481 (riscv_function_ok_for_sibcall): Return false for naked function.
23482 (riscv_set_current_function): New.
23483 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23484 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23485 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23486 * doc/extend.texi (RISC-V Function Attributes): New.
23487
23488 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23489
23490 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23491 check for 128-bit long double before checking TCmode.
23492 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23493 128-bit long doubles before checking TFmode or TCmode.
23494 (FLOAT128_IBM_P): Likewise.
23495
23496 2018-01-10 Martin Sebor <msebor@redhat.com>
23497
23498 PR tree-optimization/83671
23499 * builtins.c (c_strlen): Unconditionally return zero for the empty
23500 string.
23501 Use -Warray-bounds for warnings.
23502 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23503 for non-constant array indices with COMPONENT_REF, arrays of
23504 arrays, and pointers to arrays.
23505 (gimple_fold_builtin_strlen): Determine and set length range for
23506 non-constant character arrays.
23507
23508 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23509
23510 PR middle-end/81897
23511 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23512 empty blocks.
23513
23514 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23515
23516 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23517
23518 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23519
23520 PR target/83399
23521 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23522 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23523 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23524 indexed_or_indirect_operand predicate.
23525 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23526 (*vsx_le_perm_load_v8hi): Likewise.
23527 (*vsx_le_perm_load_v16qi): Likewise.
23528 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23529 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23530 (*vsx_le_perm_store_v8hi): Likewise.
23531 (*vsx_le_perm_store_v16qi): Likewise.
23532 (eight unnamed splitters): Likewise.
23533
23534 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23535
23536 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23537 * config/rs6000/emmintrin.h: Likewise.
23538 * config/rs6000/mmintrin.h: Likewise.
23539 * config/rs6000/xmmintrin.h: Likewise.
23540
23541 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23542
23543 PR c++/43486
23544 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23545 "public_flag".
23546 * tree.c (tree_nop_conversion): Return true for location wrapper
23547 nodes.
23548 (maybe_wrap_with_location): New function.
23549 (selftest::check_strip_nops): New function.
23550 (selftest::test_location_wrappers): New function.
23551 (selftest::tree_c_tests): Call it.
23552 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23553 (maybe_wrap_with_location): New decl.
23554 (EXPR_LOCATION_WRAPPER_P): New macro.
23555 (location_wrapper_p): New inline function.
23556 (tree_strip_any_location_wrapper): New inline function.
23557
23558 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23559
23560 PR target/83735
23561 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23562 stack_realign_offset for the largest alignment of stack slot
23563 actually used.
23564 (ix86_find_max_used_stack_alignment): New function.
23565 (ix86_finalize_stack_frame_flags): Use it. Set
23566 max_used_stack_alignment if we don't realign stack.
23567 * config/i386/i386.h (machine_function): Add
23568 max_used_stack_alignment.
23569
23570 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23571
23572 * config/arm/arm.opt (-mbranch-cost): New option.
23573 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23574 account.
23575
23576 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23577
23578 PR target/83629
23579 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23580 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23581
23582 2018-01-10 Richard Biener <rguenther@suse.de>
23583
23584 PR debug/83765
23585 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23586 early out so it also covers the case where we have a non-NULL
23587 origin.
23588
23589 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23590
23591 PR tree-optimization/83753
23592 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23593 for non-strided grouped accesses if the number of elements is 1.
23594
23595 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23596
23597 PR target/81616
23598 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23599 * i386.h (TARGET_USE_GATHER): Define.
23600 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23601
23602 2018-01-10 Martin Liska <mliska@suse.cz>
23603
23604 PR bootstrap/82831
23605 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23606 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23607 partitioning.
23608 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23609 CLEANUP_NO_PARTITIONING is not set.
23610
23611 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23612
23613 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23614 for vectors, as a partial revert of r254296.
23615 * rtl.h (const_vec_p): Delete.
23616 (const_vec_duplicate_p): Don't test for vector CONSTs.
23617 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23618 * expmed.c (make_tree): Likewise.
23619
23620 Revert:
23621 * common.md (E, F): Use CONSTANT_P instead of checking for
23622 CONST_VECTOR.
23623 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23624 checking for CONST_VECTOR.
23625
23626 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23627
23628 PR middle-end/83575
23629 * predict.c (force_edge_cold): Handle in more sane way edges
23630 with no prediction.
23631
23632 2018-01-09 Carl Love <cel@us.ibm.com>
23633
23634 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23635 V4SI, V4SF types.
23636 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23637 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23638 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23639 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23640 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23641 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23642 * config/rs6000/rs6000-protos.h: Add extern defition for
23643 rs6000_generate_float2_double_code.
23644 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23645 function.
23646 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23647 (float2_v2df): Add define_expand.
23648
23649 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23650
23651 PR target/83628
23652 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23653 op_mode in the force_to_mode call.
23654
23655 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23656
23657 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23658 instead of checking each element individually.
23659 (aarch64_evpc_uzp): Likewise.
23660 (aarch64_evpc_zip): Likewise.
23661 (aarch64_evpc_ext): Likewise.
23662 (aarch64_evpc_rev): Likewise.
23663 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23664 instead of checking each element individually. Return true without
23665 generating rtl if
23666 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23667 whether all selected elements come from the same input, instead of
23668 checking each element individually. Remove calls to gen_rtx_REG,
23669 start_sequence and end_sequence and instead assert that no rtl is
23670 generated.
23671
23672 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23673
23674 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23675 order of HIGH and CONST checks.
23676
23677 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23678
23679 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23680 if the destination isn't an SSA_NAME.
23681
23682 2018-01-09 Richard Biener <rguenther@suse.de>
23683
23684 PR tree-optimization/83668
23685 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23686 move prologue...
23687 (canonicalize_loop_form): ... here, renamed from ...
23688 (canonicalize_loop_closed_ssa_form): ... this and amended to
23689 swap successor edges for loop exit blocks to make us use
23690 the RPO order we need for initial schedule generation.
23691
23692 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23693
23694 PR tree-optimization/64811
23695 * match.pd: When optimizing comparisons with Inf, avoid
23696 introducing or losing exceptions from comparisons with NaN.
23697
23698 2018-01-09 Martin Liska <mliska@suse.cz>
23699
23700 PR sanitizer/82517
23701 * asan.c (shadow_mem_size): Add gcc_assert.
23702
23703 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23704
23705 Don't save registers in main().
23706
23707 PR target/83738
23708 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23709 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23710 * config/avr/avr.c (avr_set_current_function): Don't error if
23711 naked, OS_task or OS_main are specified at the same time.
23712 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23713 OS_main.
23714 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23715 attribute.
23716 * common/config/avr/avr-common.c (avr_option_optimization_table):
23717 Switch on -mmain-is-OS_task for optimizing compilations.
23718
23719 2018-01-09 Richard Biener <rguenther@suse.de>
23720
23721 PR tree-optimization/83572
23722 * graphite.c: Include cfganal.h.
23723 (graphite_transform_loops): Connect infinite loops to exit
23724 and remove fake edges at the end.
23725
23726 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23727
23728 * ipa-inline.c (edge_badness): Revert accidental checkin.
23729
23730 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23731
23732 PR ipa/80763
23733 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23734 symbols; not inline clones.
23735
23736 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23737
23738 PR target/83507
23739 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23740 hard registers. Formatting fixes.
23741
23742 PR preprocessor/83722
23743 * gcc.c (try_generate_repro): Pass
23744 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23745 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23746 do_report_bug.
23747
23748 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23749 Kito Cheng <kito.cheng@gmail.com>
23750
23751 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23752 (riscv_leaf_function_p): Delete.
23753 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23754
23755 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23756
23757 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23758 function.
23759 (do_ifelse): New function.
23760 (do_isel): New function.
23761 (do_sub3): New function.
23762 (do_add3): New function.
23763 (do_load_mask_compare): New function.
23764 (do_overlap_load_compare): New function.
23765 (expand_compare_loop): New function.
23766 (expand_block_compare): Call expand_compare_loop() when appropriate.
23767 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23768 option description.
23769 (-mblock-compare-inline-loop-limit): New option.
23770
23771 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23772
23773 PR target/83677
23774 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23775 Reverse order of second and third operands in first alternative.
23776 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23777 of first and second elements in UNSPEC_VPERMR vector.
23778 (altivec_expand_vec_perm_le): Likewise.
23779
23780 2018-01-08 Jeff Law <law@redhat.com>
23781
23782 PR rtl-optimizatin/81308
23783 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23784 (process_switch): If group_case_labels makes a change, then set
23785 cfg_altered.
23786 (pass_convert_switch::execute): If a switch is converted, then
23787 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23788
23789 PR rtl-optimization/81308
23790 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23791 splitting insns.
23792
23793 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23794
23795 PR target/83663 - Revert r255946
23796 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23797 generation for cases where splatting a value is not useful.
23798 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23799 across a vec_duplicate and a paradoxical subreg forming a vector
23800 mode to a vec_concat.
23801
23802 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23803
23804 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23805 -march=armv8.3-a variants.
23806 * config/arm/t-multilib: Likewise.
23807 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23808
23809 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23810
23811 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23812 to generate rtl.
23813 (cceq_ior_compare_complement): Give it a name so I can use it, and
23814 change boolean_or_operator predicate to boolean_operator so it can
23815 be used to generate a crand.
23816 (eqne): New code iterator.
23817 (bd/bd_neg): New code_attrs.
23818 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23819 a single define_insn.
23820 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23821 decrement (bdnzt/bdnzf/bdzt/bdzf).
23822 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23823 with the new names of the branch decrement patterns, and added the
23824 names of the branch decrement conditional patterns.
23825
23826 2018-01-08 Richard Biener <rguenther@suse.de>
23827
23828 PR tree-optimization/83563
23829 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23830 cache.
23831
23832 2018-01-08 Richard Biener <rguenther@suse.de>
23833
23834 PR middle-end/83713
23835 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23836
23837 2018-01-08 Richard Biener <rguenther@suse.de>
23838
23839 PR tree-optimization/83685
23840 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23841 references to abnormals.
23842
23843 2018-01-08 Richard Biener <rguenther@suse.de>
23844
23845 PR lto/83719
23846 * dwarf2out.c (output_indirect_strings): Handle empty
23847 skeleton_debug_str_hash.
23848 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23849
23850 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23851
23852 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23853 (emit_store_direct): Likewise.
23854 (arc_trampoline_adjust_address): Likewise.
23855 (arc_asm_trampoline_template): New function.
23856 (arc_initialize_trampoline): Use asm_trampoline_template.
23857 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23858 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23859 * config/arc/arc.md (flush_icache): Delete pattern.
23860
23861 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23862
23863 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23864 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23865 munaligned-access.
23866
23867 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23868
23869 PR target/83681
23870 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23871 by not USED_FOR_TARGET.
23872 (make_pass_resolve_sw_modes): Likewise.
23873
23874 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23875
23876 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23877 USED_FOR_TARGET.
23878
23879 2018-01-08 Richard Biener <rguenther@suse.de>
23880
23881 PR middle-end/83580
23882 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23883
23884 2018-01-08 Richard Biener <rguenther@suse.de>
23885
23886 PR middle-end/83517
23887 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23888
23889 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23890
23891 PR middle-end/81897
23892 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23893 basic blocks with a small number of successors.
23894 (convert_control_dep_chain_into_preds): Improve handling of
23895 forwarder blocks.
23896 (dump_predicates): Split apart into...
23897 (dump_pred_chain): ...here...
23898 (dump_pred_info): ...and here.
23899 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23900 (can_chain_union_be_invalidated_p): Improve check for invalidation
23901 of paths.
23902 (uninit_uses_cannot_happen): Avoid unnecessary if
23903 convert_control_dep_chain_into_preds yielded nothing.
23904
23905 2018-01-06 Martin Sebor <msebor@redhat.com>
23906
23907 PR tree-optimization/83640
23908 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23909 subtracting negative offset from size.
23910 (builtin_access::overlap): Adjust offset bounds of the access to fall
23911 within the size of the object if possible.
23912
23913 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23914
23915 PR rtl-optimization/83699
23916 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23917 extract_bit_field_as_subreg to cases in which the extracted
23918 value is also a vector.
23919
23920 * lra-constraints.c (process_alt_operands): Test for the equivalence
23921 substitutions when detecting a possible reload cycle.
23922
23923 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23924
23925 PR debug/83480
23926 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23927 by default if flag_selective_schedling{,2}. Formatting fixes.
23928
23929 PR rtl-optimization/83682
23930 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23931 if it has non-VECTOR_MODE element mode.
23932 (vec_duplicate_p): Likewise.
23933
23934 PR middle-end/83694
23935 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23936 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23937
23938 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23939
23940 PR target/83604
23941 * config/i386/i386-builtin.def
23942 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23943 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23944 Require also OPTION_MASK_ISA_AVX512F in addition to
23945 OPTION_MASK_ISA_GFNI.
23946 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23947 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23948 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23949 to OPTION_MASK_ISA_GFNI.
23950 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23951 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23952 OPTION_MASK_ISA_AVX512BW.
23953 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23954 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23955 addition to OPTION_MASK_ISA_GFNI.
23956 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23957 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23958 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23959 to OPTION_MASK_ISA_GFNI.
23960 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23961 a requirement for all ISAs rather than any of them with a few
23962 exceptions.
23963 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23964 processing.
23965 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23966 bitmasks to be enabled with 3 exceptions, instead of requiring any
23967 enabled ISA with lots of exceptions.
23968 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23969 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23970 Change avx512bw in isa attribute to avx512f.
23971 * config/i386/sgxintrin.h: Add license boilerplate.
23972 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23973 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23974 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23975 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23976 defined.
23977 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23978 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23979 temporarily sse2 rather than sse if not enabled already.
23980
23981 PR target/83604
23982 * config/i386/sse.md (VI248_VLBW): Rename to ...
23983 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23984 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23985 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23986 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23987 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23988 mode iterator instead of VI248_VLBW.
23989
23990 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23991
23992 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23993 (record_modified): Skip clobbers; add debug output.
23994 (param_change_prob): Use sreal frequencies.
23995
23996 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23997
23998 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23999 punt for user-aligned variables.
24000
24001 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
24002
24003 * tree-chrec.c (chrec_contains_symbols): Return true for
24004 POLY_INT_CST.
24005
24006 2018-01-05 Sudakshina Das <sudi.das@arm.com>
24007
24008 PR target/82439
24009 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
24010 of (x|y) == x for BICS pattern.
24011
24012 2018-01-05 Jakub Jelinek <jakub@redhat.com>
24013
24014 PR tree-optimization/83605
24015 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
24016 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
24017 can throw.
24018
24019 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
24020
24021 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
24022 * config/epiphany/rtems.h: New file.
24023
24024 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24025 Uros Bizjak <ubizjak@gmail.com>
24026
24027 PR target/83554
24028 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
24029 QIreg_operand instead of register_operand predicate.
24030 * config/i386/i386.c (ix86_rop_should_change_byte_p,
24031 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
24032 comments instead of -fmitigate[-_]rop.
24033
24034 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24035
24036 PR bootstrap/81926
24037 * cgraphunit.c (symbol_table::compile): Switch to text_section
24038 before calling assembly_start debug hook.
24039 * run-rtl-passes.c (run_rtl_passes): Likewise.
24040 Include output.h.
24041
24042 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24043
24044 * tree-vrp.c (extract_range_from_binary_expr_1): Check
24045 range_int_cst_p rather than !symbolic_range_p before calling
24046 extract_range_from_multiplicative_op_1.
24047
24048 2018-01-04 Jeff Law <law@redhat.com>
24049
24050 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
24051 redundant test in assertion.
24052
24053 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24054
24055 * doc/rtl.texi: Document machine_mode wrapper classes.
24056
24057 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24058
24059 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
24060 using tree_to_uhwi.
24061
24062 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24063
24064 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
24065 the VEC_PERM_EXPR fold to fail.
24066
24067 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24068
24069 PR debug/83585
24070 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
24071 to switched_sections.
24072
24073 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24074
24075 PR target/83680
24076 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
24077 test for d.testing.
24078
24079 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
24080
24081 PR target/83387
24082 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
24083 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
24084
24085 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24086
24087 PR debug/83666
24088 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
24089 is BLKmode and bitpos not zero or mode change is needed.
24090
24091 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
24092
24093 PR target/83675
24094 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
24095 TARGET_VIS2.
24096
24097 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
24098
24099 PR target/83628
24100 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
24101 instead of MULT rtx. Update all corresponding splitters.
24102 (*saddl_se): Ditto.
24103 (*ssub<modesuffix>): Ditto.
24104 (*ssubl_se): Ditto.
24105 (*cmp_sadd_di): Update split patterns.
24106 (*cmp_sadd_si): Ditto.
24107 (*cmp_sadd_sidi): Ditto.
24108 (*cmp_ssub_di): Ditto.
24109 (*cmp_ssub_si): Ditto.
24110 (*cmp_ssub_sidi): Ditto.
24111 * config/alpha/predicates.md (const23_operand): New predicate.
24112 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
24113 Look for ASHIFT, not MULT inner operand.
24114 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
24115
24116 2018-01-04 Martin Liska <mliska@suse.cz>
24117
24118 PR gcov-profile/83669
24119 * gcov.c (output_intermediate_file): Add version to intermediate
24120 gcov file.
24121 * doc/gcov.texi: Document new field 'version' in intermediate
24122 file format. Fix location of '-k' option of gcov command.
24123
24124 2018-01-04 Martin Liska <mliska@suse.cz>
24125
24126 PR ipa/82352
24127 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
24128
24129 2018-01-04 Jakub Jelinek <jakub@redhat.com>
24130
24131 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
24132
24133 2018-01-03 Martin Sebor <msebor@redhat.com>
24134
24135 PR tree-optimization/83655
24136 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
24137 checking calls with invalid arguments.
24138
24139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24140
24141 * tree-vect-stmts.c (vect_get_store_rhs): New function.
24142 (vectorizable_mask_load_store): Delete.
24143 (vectorizable_call): Return false for masked loads and stores.
24144 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
24145 instead of gimple_assign_rhs1.
24146 (vectorizable_load): Handle IFN_MASK_LOAD.
24147 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
24148
24149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24150
24151 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
24152 split out from..,
24153 (vectorizable_mask_load_store): ...here.
24154 (vectorizable_load): ...and here.
24155
24156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24157
24158 * tree-vect-stmts.c (vect_build_all_ones_mask)
24159 (vect_build_zero_merge_argument): New functions, split out from...
24160 (vectorizable_load): ...here.
24161
24162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24163
24164 * tree-vect-stmts.c (vect_check_store_rhs): New function,
24165 split out from...
24166 (vectorizable_mask_load_store): ...here.
24167 (vectorizable_store): ...and here.
24168
24169 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24170
24171 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
24172 split out from...
24173 (vectorizable_mask_load_store): ...here.
24174
24175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24176
24177 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
24178 (vect_model_store_cost): Take a vec_load_store_type instead of a
24179 vect_def_type.
24180 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
24181 (vect_model_store_cost): Take a vec_load_store_type instead of a
24182 vect_def_type.
24183 (vectorizable_mask_load_store): Update accordingly.
24184 (vectorizable_store): Likewise.
24185 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
24186
24187 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24188
24189 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
24190 IFN_MASK_LOAD calls here rather than...
24191 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
24192
24193 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24194 Alan Hayward <alan.hayward@arm.com>
24195 David Sherwood <david.sherwood@arm.com>
24196
24197 * expmed.c (extract_bit_field_1): For vector extracts,
24198 fall back to extract_bit_field_as_subreg if vec_extract
24199 isn't available.
24200
24201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24202 Alan Hayward <alan.hayward@arm.com>
24203 David Sherwood <david.sherwood@arm.com>
24204
24205 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24206 they are variable or constant sized.
24207 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24208 slots for constant-sized data.
24209
24210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24211 Alan Hayward <alan.hayward@arm.com>
24212 David Sherwood <david.sherwood@arm.com>
24213
24214 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24215 handling COND_EXPRs with boolean comparisons, try to find a better
24216 basis for the mask type than the boolean itself.
24217
24218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24219
24220 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24221 is calculated and how it can be overridden.
24222 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24223 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24224 if defined.
24225 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24226 if nonzero.
24227
24228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24229 Alan Hayward <alan.hayward@arm.com>
24230 David Sherwood <david.sherwood@arm.com>
24231
24232 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24233 Remove the mode argument.
24234 (aarch64_simd_valid_immediate): Remove the mode and inverse
24235 arguments.
24236 * config/aarch64/iterators.md (bitsize): New iterator.
24237 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24238 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24239 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24240 aarch64_simd_valid_immediate.
24241 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24242 (aarch64_reg_or_bic_imm): Likewise.
24243 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24244 with an insn_type enum and msl with a modifier_type enum.
24245 Replace element_width with a scalar_mode. Change the shift
24246 to unsigned int. Add constructors for scalar_float_mode and
24247 scalar_int_mode elements.
24248 (aarch64_vect_float_const_representable_p): Delete.
24249 (aarch64_can_const_movi_rtx_p)
24250 (aarch64_simd_scalar_immediate_valid_for_move)
24251 (aarch64_simd_make_constant): Update call to
24252 aarch64_simd_valid_immediate.
24253 (aarch64_advsimd_valid_immediate_hs): New function.
24254 (aarch64_advsimd_valid_immediate): Likewise.
24255 (aarch64_simd_valid_immediate): Remove mode and inverse
24256 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24257 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24258 and aarch64_float_const_representable_p on the result.
24259 (aarch64_output_simd_mov_immediate): Remove mode argument.
24260 Update call to aarch64_simd_valid_immediate and use of
24261 simd_immediate_info.
24262 (aarch64_output_scalar_simd_mov_immediate): Update call
24263 accordingly.
24264
24265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24266 Alan Hayward <alan.hayward@arm.com>
24267 David Sherwood <david.sherwood@arm.com>
24268
24269 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24270 (mode_nunits): Likewise CONST_MODE_NUNITS.
24271 * machmode.def (ADJUST_NUNITS): Document.
24272 * genmodes.c (mode_data::need_nunits_adj): New field.
24273 (blank_mode): Update accordingly.
24274 (adj_nunits): New variable.
24275 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24276 parameter.
24277 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24278 listed in adj_nunits.
24279 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24280 listed in adj_nunits. Don't emit case statements for such modes.
24281 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24282 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24283 nothing if adj_nunits is nonnull.
24284 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24285 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24286 (emit_mode_fbit): Update use of print_maybe_const_decl.
24287 (emit_move_size): Likewise. Treat the array as non-const
24288 if adj_nunits.
24289 (emit_mode_adjustments): Handle adj_nunits.
24290
24291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24292
24293 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24294 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24295 (VECTOR_MODES): Use it.
24296 (make_vector_modes): Take the prefix as an argument.
24297
24298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24299 Alan Hayward <alan.hayward@arm.com>
24300 David Sherwood <david.sherwood@arm.com>
24301
24302 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24303 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24304 for MODE_VECTOR_BOOL.
24305 * machmode.def (VECTOR_BOOL_MODE): Document.
24306 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24307 (make_vector_bool_mode): New function.
24308 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24309 MODE_VECTOR_BOOL.
24310 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24311 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24312 Likewise.
24313 * stor-layout.c (int_mode_for_mode): Likewise.
24314 * tree.c (build_vector_type_for_mode): Likewise.
24315 * varasm.c (output_constant_pool_2): Likewise.
24316 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24317 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24318 for MODE_VECTOR_BOOL.
24319 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24320 of mode class checks.
24321 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24322 instead of a list of mode class checks.
24323 (expand_vector_scalar_condition): Likewise.
24324 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24325
24326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24327 Alan Hayward <alan.hayward@arm.com>
24328 David Sherwood <david.sherwood@arm.com>
24329
24330 * machmode.h (mode_size): Change from unsigned short to
24331 poly_uint16_pod.
24332 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24333 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24334 or if measurement_type is not polynomial.
24335 (fixed_size_mode::includes_p): Check for constant-sized modes.
24336 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24337 return a poly_uint16 rather than an unsigned short.
24338 (emit_mode_size): Change the type of mode_size from unsigned short
24339 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24340 (emit_mode_adjustments): Cope with polynomial vector sizes.
24341 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24342 for GET_MODE_SIZE.
24343 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24344 for GET_MODE_SIZE.
24345 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24346 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24347 * caller-save.c (setup_save_areas): Likewise.
24348 (replace_reg_with_saved_mem): Likewise.
24349 * calls.c (emit_library_call_value_1): Likewise.
24350 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24351 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24352 (gen_lowpart_for_combine): Likewise.
24353 * convert.c (convert_to_integer_1): Likewise.
24354 * cse.c (equiv_constant, cse_insn): Likewise.
24355 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24356 (cselib_subst_to_values): Likewise.
24357 * dce.c (word_dce_process_block): Likewise.
24358 * df-problems.c (df_word_lr_mark_ref): Likewise.
24359 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24360 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24361 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24362 (rtl_for_decl_location): Likewise.
24363 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24364 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24365 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24366 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24367 (expand_expr_real_1): Likewise.
24368 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24369 (pad_below): Likewise.
24370 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24371 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24372 * ira.c (get_subreg_tracking_sizes): Likewise.
24373 * ira-build.c (ira_create_allocno_objects): Likewise.
24374 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24375 (ira_sort_regnos_for_alter_reg): Likewise.
24376 * ira-costs.c (record_operand_costs): Likewise.
24377 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24378 (resolve_simple_move): Likewise.
24379 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24380 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24381 (lra_constraints): Likewise.
24382 (CONST_POOL_OK_P): Reject variable-sized modes.
24383 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24384 (add_pseudo_to_slot, lra_spill): Likewise.
24385 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24386 * optabs-query.c (get_best_extraction_insn): Likewise.
24387 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24388 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24389 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24390 * recog.c (offsettable_address_addr_space_p): Likewise.
24391 * regcprop.c (maybe_mode_change): Likewise.
24392 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24393 * regrename.c (build_def_use): Likewise.
24394 * regstat.c (dump_reg_info): Likewise.
24395 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24396 (find_reloads, find_reloads_subreg_address): Likewise.
24397 * reload1.c (eliminate_regs_1): Likewise.
24398 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24399 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24400 (simplify_binary_operation_1, simplify_subreg): Likewise.
24401 * targhooks.c (default_function_arg_padding): Likewise.
24402 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24403 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24404 (verify_gimple_assign_ternary): Likewise.
24405 * tree-inline.c (estimate_move_cost): Likewise.
24406 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24407 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24408 (get_address_cost_ainc): Likewise.
24409 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24410 (vect_supportable_dr_alignment): Likewise.
24411 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24412 (vectorizable_reduction): Likewise.
24413 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24414 (vectorizable_operation, vectorizable_load): Likewise.
24415 * tree.c (build_same_sized_truth_vector_type): Likewise.
24416 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24417 * var-tracking.c (emit_note_insn_var_location): Likewise.
24418 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24419 (ADDR_VEC_ALIGN): Likewise.
24420
24421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24422 Alan Hayward <alan.hayward@arm.com>
24423 David Sherwood <david.sherwood@arm.com>
24424
24425 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24426 unsigned short.
24427 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24428 or if measurement_type is polynomial.
24429 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24430 * combine.c (make_extraction): Likewise.
24431 * dse.c (find_shift_sequence): Likewise.
24432 * dwarf2out.c (mem_loc_descriptor): Likewise.
24433 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24434 (extract_bit_field, extract_low_bits): Likewise.
24435 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24436 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24437 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24438 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24439 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24440 * reload.c (find_reloads): Likewise.
24441 * reload1.c (alter_reg): Likewise.
24442 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24443 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24444 * tree-if-conv.c (predicate_mem_writes): Likewise.
24445 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24446 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24447 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24448 * valtrack.c (dead_debug_insert_temp): Likewise.
24449 * varasm.c (mergeable_constant_section): Likewise.
24450 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24451
24452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24453 Alan Hayward <alan.hayward@arm.com>
24454 David Sherwood <david.sherwood@arm.com>
24455
24456 * expr.c (expand_assignment): Cope with polynomial mode sizes
24457 when assigning to a CONCAT.
24458
24459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24460 Alan Hayward <alan.hayward@arm.com>
24461 David Sherwood <david.sherwood@arm.com>
24462
24463 * machmode.h (mode_precision): Change from unsigned short to
24464 poly_uint16_pod.
24465 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24466 short.
24467 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24468 or if measurement_type is not polynomial.
24469 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24470 in which the mode is already known to be a scalar_int_mode.
24471 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24472 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24473 initializer.
24474 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24475 for GET_MODE_PRECISION.
24476 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24477 for GET_MODE_PRECISION.
24478 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24479 as polynomial.
24480 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24481 (expand_field_assignment, make_extraction): Likewise.
24482 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24483 (get_last_value): Likewise.
24484 * convert.c (convert_to_integer_1): Likewise.
24485 * cse.c (cse_insn): Likewise.
24486 * expr.c (expand_expr_real_1): Likewise.
24487 * lra-constraints.c (simplify_operand_subreg): Likewise.
24488 * optabs-query.c (can_atomic_load_p): Likewise.
24489 * optabs.c (expand_atomic_load): Likewise.
24490 (expand_atomic_store): Likewise.
24491 * ree.c (combine_reaching_defs): Likewise.
24492 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24493 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24494 * tree.h (type_has_mode_precision_p): Likewise.
24495 * ubsan.c (instrument_si_overflow): Likewise.
24496
24497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24498 Alan Hayward <alan.hayward@arm.com>
24499 David Sherwood <david.sherwood@arm.com>
24500
24501 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24502 polynomial numbers of units.
24503 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24504 (valid_vector_subparts_p): New function.
24505 (build_vector_type): Remove temporary shim and take the number
24506 of units as a poly_uint64 rather than an int.
24507 (build_opaque_vector_type): Take the number of units as a
24508 poly_uint64 rather than an int.
24509 * tree.c (build_vector_from_ctor): Handle polynomial
24510 TYPE_VECTOR_SUBPARTS.
24511 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24512 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24513 (build_vector_from_val): If the number of units is variable,
24514 use build_vec_duplicate_cst for constant operands and
24515 VEC_DUPLICATE_EXPR otherwise.
24516 (make_vector_type): Remove temporary is_constant ().
24517 (build_vector_type, build_opaque_vector_type): Take the number of
24518 units as a poly_uint64 rather than an int.
24519 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24520 VECTOR_CST_NELTS.
24521 * cfgexpand.c (expand_debug_expr): Likewise.
24522 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24523 (store_constructor, expand_expr_real_1): Likewise.
24524 (const_scalar_mask_from_tree): Likewise.
24525 * fold-const-call.c (fold_const_reduction): Likewise.
24526 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24527 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24528 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24529 (fold_relational_const): Likewise.
24530 (native_interpret_vector): Likewise. Change the size from an
24531 int to an unsigned int.
24532 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24533 TYPE_VECTOR_SUBPARTS.
24534 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24535 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24536 duplicating a non-constant operand into a variable-length vector.
24537 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24538 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24539 * ipa-icf.c (sem_variable::equals): Likewise.
24540 * match.pd: Likewise.
24541 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24542 * print-tree.c (print_node): Likewise.
24543 * stor-layout.c (layout_type): Likewise.
24544 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24545 * tree-cfg.c (verify_gimple_comparison): Likewise.
24546 (verify_gimple_assign_binary): Likewise.
24547 (verify_gimple_assign_ternary): Likewise.
24548 (verify_gimple_assign_single): Likewise.
24549 * tree-pretty-print.c (dump_generic_node): Likewise.
24550 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24551 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24552 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24553 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24554 (vect_shift_permute_load_chain): Likewise.
24555 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24556 (expand_vector_condition, optimize_vector_constructor): Likewise.
24557 (lower_vec_perm, get_compute_type): Likewise.
24558 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24559 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24560 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24561 (vect_recog_mask_conversion_pattern): Likewise.
24562 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24563 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24564 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24565 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24566 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24567 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24568 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24569 (supportable_widening_operation): Likewise.
24570 (supportable_narrowing_operation): Likewise.
24571 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24572 Likewise.
24573 * varasm.c (output_constant): Likewise.
24574
24575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24576 Alan Hayward <alan.hayward@arm.com>
24577 David Sherwood <david.sherwood@arm.com>
24578
24579 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24580 so that both the length == 3 and length != 3 cases set up their
24581 own permute vectors. Add comments explaining why we know the
24582 number of elements is constant.
24583 (vect_permute_load_chain): Likewise.
24584
24585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24586 Alan Hayward <alan.hayward@arm.com>
24587 David Sherwood <david.sherwood@arm.com>
24588
24589 * machmode.h (mode_nunits): Change from unsigned char to
24590 poly_uint16_pod.
24591 (ONLY_FIXED_SIZE_MODES): New macro.
24592 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24593 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24594 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24595 New typedefs.
24596 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24597 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24598 or if measurement_type is not polynomial.
24599 * genmodes.c (ZERO_COEFFS): New macro.
24600 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24601 poly_uint16.
24602 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24603 Use ZERO_COEFFS when emitting initializers.
24604 * data-streamer.h (bp_pack_poly_value): New function.
24605 (bp_unpack_poly_value): Likewise.
24606 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24607 for GET_MODE_NUNITS.
24608 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24609 for GET_MODE_NUNITS.
24610 * tree.c (make_vector_type): Remove temporary shim and make
24611 the real function take the number of units as a poly_uint64
24612 rather than an int.
24613 (build_vector_type_for_mode): Handle polynomial nunits.
24614 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24615 * emit-rtl.c (const_vec_series_p_1): Likewise.
24616 (gen_rtx_CONST_VECTOR): Likewise.
24617 * fold-const.c (test_vec_duplicate_folding): Likewise.
24618 * genrecog.c (validate_pattern): Likewise.
24619 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24620 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24621 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24622 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24623 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24624 * rtlanal.c (subreg_get_info): Likewise.
24625 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24626 (vect_grouped_load_supported): Likewise.
24627 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24628 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24629 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24630 (simplify_const_unary_operation, simplify_binary_operation_1)
24631 (simplify_const_binary_operation, simplify_ternary_operation)
24632 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24633 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24634 instead of CONST_VECTOR_NUNITS.
24635 * varasm.c (output_constant_pool_2): Likewise.
24636 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24637 explicit-encoded elements in the XVEC for variable-length vectors.
24638
24639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24640
24641 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24642
24643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24644 Alan Hayward <alan.hayward@arm.com>
24645 David Sherwood <david.sherwood@arm.com>
24646
24647 * coretypes.h (fixed_size_mode): Declare.
24648 (fixed_size_mode_pod): New typedef.
24649 * builtins.h (target_builtins::x_apply_args_mode)
24650 (target_builtins::x_apply_result_mode): Change type to
24651 fixed_size_mode_pod.
24652 * builtins.c (apply_args_size, apply_result_size, result_vector)
24653 (expand_builtin_apply_args_1, expand_builtin_apply)
24654 (expand_builtin_return): Update accordingly.
24655
24656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24657
24658 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24659 * cselib.c (cselib_hash_rtx): Likewise.
24660 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24661 CONST_VECTOR encoding.
24662
24663 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24664 Jeff Law <law@redhat.com>
24665
24666 PR target/83641
24667 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24668 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24669 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24670 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24671
24672 PR target/83641
24673 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24674 explicitly probe *sp in a noreturn function if there were any callee
24675 register saves or frame pointer is needed.
24676
24677 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24678
24679 PR debug/83621
24680 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24681 BLKmode for ternary, binary or unary expressions.
24682
24683 PR debug/83645
24684 * var-tracking.c (delete_vta_debug_insn): New inline function.
24685 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24686 insns from get_insns () to NULL instead of each bb separately.
24687 Use delete_vta_debug_insn. No longer static.
24688 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24689 delete_vta_debug_insns callers.
24690 * rtl.h (delete_vta_debug_insns): Declare.
24691 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24692 instead of variable_tracking_main.
24693
24694 2018-01-03 Martin Sebor <msebor@redhat.com>
24695
24696 PR tree-optimization/83603
24697 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24698 arguments past the endof the argument list in functions declared
24699 without a prototype.
24700 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24701 Avoid checking when arguments are null.
24702
24703 2018-01-03 Martin Sebor <msebor@redhat.com>
24704
24705 PR c/83559
24706 * doc/extend.texi (attribute const): Fix a typo.
24707 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24708 issuing -Wsuggest-attribute for void functions.
24709
24710 2018-01-03 Martin Sebor <msebor@redhat.com>
24711
24712 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24713 offset_int::from instead of wide_int::to_shwi.
24714 (maybe_diag_overlap): Remove assertion.
24715 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24716 * gimple-ssa-sprintf.c (format_directive): Same.
24717 (parse_directive): Same.
24718 (sprintf_dom_walker::compute_format_length): Same.
24719 (try_substitute_return_value): Same.
24720
24721 2018-01-03 Jeff Law <law@redhat.com>
24722
24723 PR middle-end/83654
24724 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24725 non-constant residual for zero at runtime and avoid probing in
24726 that case. Reorganize code for trailing problem to mirror handling
24727 of the residual.
24728
24729 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24730
24731 PR tree-optimization/83501
24732 * tree-ssa-strlen.c (get_string_cst): New.
24733 (handle_char_store): Call get_string_cst.
24734
24735 2018-01-03 Martin Liska <mliska@suse.cz>
24736
24737 PR tree-optimization/83593
24738 * tree-ssa-strlen.c: Include tree-cfg.h.
24739 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24740 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24741 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24742 to false.
24743 (strlen_dom_walker::before_dom_children): Call
24744 gimple_purge_dead_eh_edges. Dump tranformation with details
24745 dump flags.
24746 (strlen_dom_walker::before_dom_children): Update call by adding
24747 new argument cleanup_eh.
24748 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24749
24750 2018-01-03 Martin Liska <mliska@suse.cz>
24751
24752 PR ipa/83549
24753 * cif-code.def (VARIADIC_THUNK): New enum value.
24754 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24755 thunks.
24756
24757 2018-01-03 Jan Beulich <jbeulich@suse.com>
24758
24759 * sse.md (mov<mode>_internal): Tighten condition for when to use
24760 vmovdqu<ssescalarsize> for TI and OI modes.
24761
24762 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24763
24764 Update copyright years.
24765
24766 2018-01-03 Martin Liska <mliska@suse.cz>
24767
24768 PR ipa/83594
24769 * ipa-visibility.c (function_and_variable_visibility): Skip
24770 functions with noipa attribure.
24771
24772 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24773
24774 * gcc.c (process_command): Update copyright notice dates.
24775 * gcov-dump.c (print_version): Ditto.
24776 * gcov.c (print_version): Ditto.
24777 * gcov-tool.c (print_version): Ditto.
24778 * gengtype.c (create_file): Ditto.
24779 * doc/cpp.texi: Bump @copying's copyright year.
24780 * doc/cppinternals.texi: Ditto.
24781 * doc/gcc.texi: Ditto.
24782 * doc/gccint.texi: Ditto.
24783 * doc/gcov.texi: Ditto.
24784 * doc/install.texi: Ditto.
24785 * doc/invoke.texi: Ditto.
24786
24787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24788
24789 * vector-builder.h (vector_builder::m_full_nelts): Change from
24790 unsigned int to poly_uint64.
24791 (vector_builder::full_nelts): Update prototype accordingly.
24792 (vector_builder::new_vector): Likewise.
24793 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24794 (vector_builder::operator ==): Likewise.
24795 (vector_builder::finalize): Likewise.
24796 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24797 Take the number of elements as a poly_uint64 rather than an
24798 unsigned int.
24799 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24800 from unsigned int to poly_uint64.
24801 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24802 (vec_perm_indices::new_vector): Likewise.
24803 (vec_perm_indices::length): Likewise.
24804 (vec_perm_indices::nelts_per_input): Likewise.
24805 (vec_perm_indices::input_nelts): Likewise.
24806 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24807 number of elements per input as a poly_uint64 rather than an
24808 unsigned int. Use the original encoding for variable-length
24809 vectors, rather than clamping each individual element.
24810 For the second and subsequent elements in each pattern,
24811 clamp the step and base before clamping their sum.
24812 (vec_perm_indices::series_p): Handle polynomial element counts.
24813 (vec_perm_indices::all_in_range_p): Likewise.
24814 (vec_perm_indices_to_tree): Likewise.
24815 (vec_perm_indices_to_rtx): Likewise.
24816 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24817 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24818 (tree_vector_builder::new_binary_operation): Handle polynomial
24819 element counts. Return false if we need to know the number
24820 of elements at compile time.
24821 * fold-const.c (fold_vec_perm): Punt if the number of elements
24822 isn't known at compile time.
24823
24824 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24825
24826 * vec-perm-indices.h (vec_perm_builder): Change element type
24827 from HOST_WIDE_INT to poly_int64.
24828 (vec_perm_indices::element_type): Update accordingly.
24829 (vec_perm_indices::clamp): Handle polynomial element_types.
24830 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24831 (vec_perm_indices::all_in_range_p): Likewise.
24832 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24833 than shwi trees.
24834 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24835 polynomial vec_perm_indices element types.
24836 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24837 * fold-const.c (fold_vec_perm): Likewise.
24838 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24839 * tree-vect-generic.c (lower_vec_perm): Likewise.
24840 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24841 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24842 element type to HOST_WIDE_INT.
24843
24844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24845 Alan Hayward <alan.hayward@arm.com>
24846 David Sherwood <david.sherwood@arm.com>
24847
24848 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24849 rather than an int. Use plus_constant.
24850 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24851 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24852
24853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24854 Alan Hayward <alan.hayward@arm.com>
24855 David Sherwood <david.sherwood@arm.com>
24856
24857 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24858 a HOST_WIDE_INT to a poly_int64.
24859
24860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24861 Alan Hayward <alan.hayward@arm.com>
24862 David Sherwood <david.sherwood@arm.com>
24863
24864 * calls.c (load_register_parameters): Cope with polynomial
24865 mode sizes. Require a constant size for BLKmode parameters
24866 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24867 forces a parameter to be padded at the lsb end in order to
24868 fill a complete number of words, require the parameter size
24869 to be ordered wrt UNITS_PER_WORD.
24870
24871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24872 Alan Hayward <alan.hayward@arm.com>
24873 David Sherwood <david.sherwood@arm.com>
24874
24875 * reload1.c (spill_stack_slot_width): Change element type
24876 from unsigned int to poly_uint64_pod.
24877 (alter_reg): Treat mode sizes as polynomial.
24878
24879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24880 Alan Hayward <alan.hayward@arm.com>
24881 David Sherwood <david.sherwood@arm.com>
24882
24883 * reload.c (complex_word_subreg_p): New function.
24884 (reload_inner_reg_of_subreg, push_reload): Use it.
24885
24886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24887 Alan Hayward <alan.hayward@arm.com>
24888 David Sherwood <david.sherwood@arm.com>
24889
24890 * lra-constraints.c (process_alt_operands): Reject matched
24891 operands whose sizes aren't ordered.
24892 (match_reload): Refer to this check here.
24893
24894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24895 Alan Hayward <alan.hayward@arm.com>
24896 David Sherwood <david.sherwood@arm.com>
24897
24898 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24899 that the mode size is in the set {1, 2, 4, 8, 16}.
24900
24901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24902 Alan Hayward <alan.hayward@arm.com>
24903 David Sherwood <david.sherwood@arm.com>
24904
24905 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24906 Use plus_constant instead of gen_rtx_PLUS.
24907
24908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24909 Alan Hayward <alan.hayward@arm.com>
24910 David Sherwood <david.sherwood@arm.com>
24911
24912 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24913 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24914 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24915 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24916 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24917 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24918 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24919 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24920 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24921 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24922 a poly_int64.
24923 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24924 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24925 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24926 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24927 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24928 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24929 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24930 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24931 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24932 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24933 function.
24934 * expr.c (emit_move_resolve_push): Treat the input and result
24935 of PUSH_ROUNDING as a poly_int64.
24936 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24937 (emit_push_insn): Likewise.
24938 * lra-eliminations.c (mark_not_eliminable): Likewise.
24939 * recog.c (push_operand): Likewise.
24940 * reload1.c (elimination_effects): Likewise.
24941 * rtlanal.c (nonzero_bits1): Likewise.
24942 * calls.c (store_one_arg): Likewise. Require the padding to be
24943 known at compile time.
24944
24945 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24946 Alan Hayward <alan.hayward@arm.com>
24947 David Sherwood <david.sherwood@arm.com>
24948
24949 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24950 Use plus_constant instead of gen_rtx_PLUS.
24951
24952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24953 Alan Hayward <alan.hayward@arm.com>
24954 David Sherwood <david.sherwood@arm.com>
24955
24956 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24957 rather than an int.
24958
24959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24960 Alan Hayward <alan.hayward@arm.com>
24961 David Sherwood <david.sherwood@arm.com>
24962
24963 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24964 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24965 via stack temporaries. Treat the mode size as polynomial too.
24966
24967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24968 Alan Hayward <alan.hayward@arm.com>
24969 David Sherwood <david.sherwood@arm.com>
24970
24971 * expr.c (expand_expr_real_2): When handling conversions involving
24972 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24973 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24974 as a poly_uint64 too.
24975
24976 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24977 Alan Hayward <alan.hayward@arm.com>
24978 David Sherwood <david.sherwood@arm.com>
24979
24980 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24981
24982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24983 Alan Hayward <alan.hayward@arm.com>
24984 David Sherwood <david.sherwood@arm.com>
24985
24986 * combine.c (can_change_dest_mode): Handle polynomial
24987 REGMODE_NATURAL_SIZE.
24988 * expmed.c (store_bit_field_1): Likewise.
24989 * expr.c (store_constructor): Likewise.
24990 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24991 and polynomial REGMODE_NATURAL_SIZE.
24992 (gen_lowpart_common): Likewise.
24993 * reginfo.c (record_subregs_of_mode): Likewise.
24994 * rtlanal.c (read_modify_subreg_p): Likewise.
24995
24996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24997 Alan Hayward <alan.hayward@arm.com>
24998 David Sherwood <david.sherwood@arm.com>
24999
25000 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
25001 numbers of elements.
25002
25003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25004 Alan Hayward <alan.hayward@arm.com>
25005 David Sherwood <david.sherwood@arm.com>
25006
25007 * match.pd: Cope with polynomial numbers of vector elements.
25008
25009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25010 Alan Hayward <alan.hayward@arm.com>
25011 David Sherwood <david.sherwood@arm.com>
25012
25013 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
25014 in a POINTER_PLUS_EXPR.
25015
25016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25017 Alan Hayward <alan.hayward@arm.com>
25018 David Sherwood <david.sherwood@arm.com>
25019
25020 * omp-simd-clone.c (simd_clone_subparts): New function.
25021 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
25022 (ipa_simd_modify_function_body): Likewise.
25023
25024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25025 Alan Hayward <alan.hayward@arm.com>
25026 David Sherwood <david.sherwood@arm.com>
25027
25028 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
25029 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
25030 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
25031 (expand_vector_condition, vector_element): Likewise.
25032 (subparts_gt): New function.
25033 (get_compute_type): Use subparts_gt.
25034 (count_type_subparts): Delete.
25035 (expand_vector_operations_1): Use subparts_gt instead of
25036 count_type_subparts.
25037
25038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25039 Alan Hayward <alan.hayward@arm.com>
25040 David Sherwood <david.sherwood@arm.com>
25041
25042 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
25043 (vect_compile_time_alias): ...this new function. Do the calculation
25044 on poly_ints rather than trees.
25045 (vect_prune_runtime_alias_test_list): Update call accordingly.
25046
25047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25048 Alan Hayward <alan.hayward@arm.com>
25049 David Sherwood <david.sherwood@arm.com>
25050
25051 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
25052 numbers of units.
25053 (vect_schedule_slp_instance): Likewise.
25054
25055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25056 Alan Hayward <alan.hayward@arm.com>
25057 David Sherwood <david.sherwood@arm.com>
25058
25059 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
25060 constant and extern definitions for variable-length vectors.
25061 (vect_get_constant_vectors): Note that the number of units
25062 is known to be constant.
25063
25064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25065 Alan Hayward <alan.hayward@arm.com>
25066 David Sherwood <david.sherwood@arm.com>
25067
25068 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
25069 of units as polynomial. Choose between WIDE and NARROW based
25070 on multiple_p.
25071
25072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25073 Alan Hayward <alan.hayward@arm.com>
25074 David Sherwood <david.sherwood@arm.com>
25075
25076 * tree-vect-stmts.c (simd_clone_subparts): New function.
25077 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
25078
25079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25080 Alan Hayward <alan.hayward@arm.com>
25081 David Sherwood <david.sherwood@arm.com>
25082
25083 * tree-vect-stmts.c (vectorizable_call): Treat the number of
25084 vectors as polynomial. Use build_index_vector for
25085 IFN_GOMP_SIMD_LANE.
25086
25087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25088 Alan Hayward <alan.hayward@arm.com>
25089 David Sherwood <david.sherwood@arm.com>
25090
25091 * tree-vect-stmts.c (get_load_store_type): Treat the number of
25092 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
25093 for variable-length vectors.
25094 (vectorizable_mask_load_store): Treat the number of units as
25095 polynomial, asserting that it is constant if the condition has
25096 already been enforced.
25097 (vectorizable_store, vectorizable_load): Likewise.
25098
25099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25100 Alan Hayward <alan.hayward@arm.com>
25101 David Sherwood <david.sherwood@arm.com>
25102
25103 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
25104 of units as polynomial. Punt if we can't tell at compile time
25105 which vector contains the final result.
25106
25107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25108 Alan Hayward <alan.hayward@arm.com>
25109 David Sherwood <david.sherwood@arm.com>
25110
25111 * tree-vect-loop.c (vectorizable_induction): Treat the number
25112 of units as polynomial. Punt on SLP inductions. Use an integer
25113 VEC_SERIES_EXPR for variable-length integer reductions. Use a
25114 cast of such a series for variable-length floating-point
25115 reductions.
25116
25117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25118 Alan Hayward <alan.hayward@arm.com>
25119 David Sherwood <david.sherwood@arm.com>
25120
25121 * tree.h (build_index_vector): Declare.
25122 * tree.c (build_index_vector): New function.
25123 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
25124 of units as polynomial, forcibly converting it to a constant if
25125 vectorizable_reduction has already enforced the condition.
25126 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
25127 to create a {1,2,3,...} vector.
25128 (vectorizable_reduction): Treat the number of units as polynomial.
25129 Choose vectype_in based on the largest scalar element size rather
25130 than the smallest number of units. Enforce the restrictions
25131 relied on above.
25132
25133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25134 Alan Hayward <alan.hayward@arm.com>
25135 David Sherwood <david.sherwood@arm.com>
25136
25137 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
25138 number of units as polynomial.
25139
25140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25141 Alan Hayward <alan.hayward@arm.com>
25142 David Sherwood <david.sherwood@arm.com>
25143
25144 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
25145 * target.def (autovectorize_vector_sizes): Return the vector sizes
25146 by pointer, using vector_sizes rather than a bitmask.
25147 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
25148 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
25149 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
25150 Likewise.
25151 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
25152 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
25153 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
25154 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
25155 * omp-general.c (omp_max_vf): Likewise.
25156 * omp-low.c (omp_clause_aligned_alignment): Likewise.
25157 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
25158 * tree-vect-loop.c (vect_analyze_loop): Likewise.
25159 * tree-vect-slp.c (vect_slp_bb): Likewise.
25160 * doc/tm.texi: Regenerate.
25161 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
25162 to a poly_uint64.
25163 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
25164 the vector size as a poly_uint64 rather than an unsigned int.
25165 (current_vector_size): Change from an unsigned int to a poly_uint64.
25166 (get_vectype_for_scalar_type): Update accordingly.
25167 * tree.h (build_truth_vector_type): Take the size and number of
25168 units as a poly_uint64 rather than an unsigned int.
25169 (build_vector_type): Add a temporary overload that takes
25170 the number of units as a poly_uint64 rather than an unsigned int.
25171 * tree.c (make_vector_type): Likewise.
25172 (build_truth_vector_type): Take the number of units as a poly_uint64
25173 rather than an unsigned int.
25174
25175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25176 Alan Hayward <alan.hayward@arm.com>
25177 David Sherwood <david.sherwood@arm.com>
25178
25179 * target.def (get_mask_mode): Take the number of units and length
25180 as poly_uint64s rather than unsigned ints.
25181 * targhooks.h (default_get_mask_mode): Update accordingly.
25182 * targhooks.c (default_get_mask_mode): Likewise.
25183 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
25184 * doc/tm.texi: Regenerate.
25185
25186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25187 Alan Hayward <alan.hayward@arm.com>
25188 David Sherwood <david.sherwood@arm.com>
25189
25190 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
25191 * omp-general.c (omp_max_vf): Likewise.
25192 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
25193 (expand_omp_simd): Handle polynomial safelen.
25194 * omp-low.c (omplow_simd_context): Add a default constructor.
25195 (omplow_simd_context::max_vf): Change from int to poly_uint64.
25196 (lower_rec_simd_input_clauses): Update accordingly.
25197 (lower_rec_input_clauses): Likewise.
25198
25199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25200 Alan Hayward <alan.hayward@arm.com>
25201 David Sherwood <david.sherwood@arm.com>
25202
25203 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25204 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25205 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25206 (vect_analyze_slp_cost): Likewise.
25207 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25208 (vect_model_load_cost): Likewise.
25209
25210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25211 Alan Hayward <alan.hayward@arm.com>
25212 David Sherwood <david.sherwood@arm.com>
25213
25214 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25215 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25216 from an unsigned int * to a poly_uint64_pod *.
25217 (calculate_unrolling_factor): New function.
25218 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25219
25220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25221 Alan Hayward <alan.hayward@arm.com>
25222 David Sherwood <david.sherwood@arm.com>
25223
25224 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25225 from an unsigned int to a poly_uint64.
25226 (_loop_vec_info::slp_unrolling_factor): Likewise.
25227 (_loop_vec_info::vectorization_factor): Change from an int
25228 to a poly_uint64.
25229 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25230 (vect_get_num_vectors): New function.
25231 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25232 (vect_get_num_copies): Use vect_get_num_vectors.
25233 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25234 to an unsigned int *.
25235 (vect_analyze_data_refs): Change min_vf from an int * to a
25236 poly_uint64 *.
25237 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25238 than an unsigned HOST_WIDE_INT.
25239 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25240 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25241 to an unsigned int *.
25242 (vect_analyze_data_ref_dependences): Likewise.
25243 (vect_compute_data_ref_alignment): Handle polynomial vf.
25244 (vect_enhance_data_refs_alignment): Likewise.
25245 (vect_prune_runtime_alias_test_list): Likewise.
25246 (vect_shift_permute_load_chain): Likewise.
25247 (vect_supportable_dr_alignment): Likewise.
25248 (dependence_distance_ge_vf): Take the vectorization factor as a
25249 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25250 (vect_analyze_data_refs): Change min_vf from an int * to a
25251 poly_uint64 *.
25252 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25253 vfm1 as a poly_uint64 rather than an int. Make the same change
25254 for the returned bound_scalar.
25255 (vect_gen_vector_loop_niters): Handle polynomial vf.
25256 (vect_do_peeling): Likewise. Update call to
25257 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25258 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25259 be constant.
25260 * tree-vect-loop.c (vect_determine_vectorization_factor)
25261 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25262 (vect_get_known_peeling_cost): Likewise.
25263 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25264 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25265 (vect_transform_loop): Likewise. Use the lowest possible VF when
25266 updating the upper bounds of the loop.
25267 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25268 rather than an int.
25269 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25270 polynomial unroll factors.
25271 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25272 (vect_make_slp_decision): Likewise.
25273 (vect_supported_load_permutation_p): Likewise, and polynomial
25274 vf too.
25275 (vect_analyze_slp_cost): Handle polynomial vf.
25276 (vect_slp_analyze_node_operations): Likewise.
25277 (vect_slp_analyze_bb_1): Likewise.
25278 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25279 than an unsigned HOST_WIDE_INT.
25280 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25281 (vectorizable_load): Handle polynomial vf.
25282 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25283 a poly_uint64.
25284 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25285
25286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25287 Alan Hayward <alan.hayward@arm.com>
25288 David Sherwood <david.sherwood@arm.com>
25289
25290 * match.pd: Handle bit operations involving three constants
25291 and try to fold one pair.
25292
25293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25294
25295 * tree-vect-loop-manip.c: Include gimple-fold.h.
25296 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25297 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25298 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25299 Add a path that uses a step of VF instead of 1, but disable it
25300 for now.
25301 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25302 and niters_no_overflow parameters. Update calls to
25303 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25304 Create a new SSA name if the latter choses to use a ste other
25305 than zero, and return it via niters_vector_mult_vf_var.
25306 * tree-vect-loop.c (vect_transform_loop): Update calls to
25307 vect_do_peeling, vect_gen_vector_loop_niters and
25308 slpeel_make_loop_iterate_ntimes.
25309 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25310 (vect_gen_vector_loop_niters): Update declarations after above changes.
25311
25312 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25313
25314 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25315 128-bit round to integer instructions.
25316 (ceil<mode>2): Likewise.
25317 (btrunc<mode>2): Likewise.
25318 (round<mode>2): Likewise.
25319
25320 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25321
25322 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25323 unaligned VSX load/store on P8/P9.
25324 (expand_block_clear): Allow the use of unaligned VSX
25325 load/store on P8/P9.
25326
25327 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25328
25329 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25330 New function.
25331 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25332 swap associated with both a load and a store.
25333
25334 2018-01-02 Andrew Waterman <andrew@sifive.com>
25335
25336 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25337 * config/riscv/riscv.md (clear_cache): Use it.
25338
25339 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25340
25341 * web.c: Remove out-of-date comment.
25342
25343 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25344
25345 * expr.c (fixup_args_size_notes): Check that any existing
25346 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25347 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25348 (emit_single_push_insn): ...here.
25349
25350 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25351
25352 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25353 (const_vector_encoded_nelts): New function.
25354 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25355 (const_vector_int_elt, const_vector_elt): Declare.
25356 * emit-rtl.c (const_vector_int_elt_1): New function.
25357 (const_vector_elt): Likewise.
25358 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25359 of CONST_VECTOR_ELT.
25360
25361 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25362
25363 * expr.c: Include rtx-vector-builder.h.
25364 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25365 directly on the tree encoding.
25366 (const_vector_from_tree): Likewise.
25367 * optabs.c: Include rtx-vector-builder.h.
25368 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25369 sequence of "u" values.
25370 * vec-perm-indices.c: Include rtx-vector-builder.h.
25371 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25372 directly on the vec_perm_indices encoding.
25373
25374 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25375
25376 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25377 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25378 * rtx-vector-builder.h: New file.
25379 * rtx-vector-builder.c: Likewise.
25380 * rtl.h (rtx_def::u2): Add a const_vector field.
25381 (CONST_VECTOR_NPATTERNS): New macro.
25382 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25383 (CONST_VECTOR_DUPLICATE_P): Likewise.
25384 (CONST_VECTOR_STEPPED_P): Likewise.
25385 (CONST_VECTOR_ENCODED_ELT): Likewise.
25386 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25387 (unwrap_const_vec_duplicate): Likewise.
25388 (const_vec_series_p): Check for a non-duplicated vector encoding.
25389 Say that the function only returns true for integer vectors.
25390 * emit-rtl.c: Include rtx-vector-builder.h.
25391 (gen_const_vec_duplicate_1): Delete.
25392 (gen_const_vector): Call gen_const_vec_duplicate instead of
25393 gen_const_vec_duplicate_1.
25394 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25395 (gen_const_vec_duplicate): Use rtx_vector_builder.
25396 (gen_const_vec_series): Likewise.
25397 (gen_rtx_CONST_VECTOR): Likewise.
25398 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25399 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25400 Build a new vector rather than modifying a CONST_VECTOR in-place.
25401 (handle_special_swappables): Update call accordingly.
25402 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25403 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25404 Build a new vector rather than modifying a CONST_VECTOR in-place.
25405 (handle_special_swappables): Update call accordingly.
25406
25407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25408
25409 * simplify-rtx.c (simplify_const_binary_operation): Use
25410 CONST_VECTOR_ELT instead of XVECEXP.
25411
25412 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25413
25414 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25415 the selector elements to be different from the data elements
25416 if the selector is a VECTOR_CST.
25417 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25418 ssizetype for the selector.
25419
25420 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25421
25422 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25423 before testing each element individually.
25424 * tree-vect-generic.c (lower_vec_perm): Likewise.
25425
25426 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25427
25428 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25429 * selftest-run-tests.c (selftest::run_tests): Call it.
25430 * vector-builder.h (vector_builder::operator ==): New function.
25431 (vector_builder::operator !=): Likewise.
25432 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25433 (vec_perm_indices::all_from_input_p): New function.
25434 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25435 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25436 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25437 instead of reading the VECTOR_CST directly. Detect whether both
25438 vector inputs are the same before constructing the vec_perm_indices,
25439 and update the number of inputs argument accordingly. Use the
25440 utility functions added above. Only construct sel2 if we need to.
25441
25442 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25443
25444 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25445 the broadcast of the low byte.
25446 (expand_mult_highpart): Use an explicit encoding for the permutes.
25447 * optabs-query.c (can_mult_highpart_p): Likewise.
25448 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25449 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25450 (vectorizable_bswap): Likewise.
25451 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25452 explicit encoding for the power-of-2 permutes.
25453 (vect_permute_store_chain): Likewise.
25454 (vect_grouped_load_supported): Likewise.
25455 (vect_permute_load_chain): Likewise.
25456
25457 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25458
25459 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25460 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25461 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25462 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25463 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25464 (vect_gen_perm_mask_any): Likewise.
25465
25466 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25467
25468 * int-vector-builder.h: New file.
25469 * vec-perm-indices.h: Include int-vector-builder.h.
25470 (vec_perm_indices): Redefine as an int_vector_builder.
25471 (auto_vec_perm_indices): Delete.
25472 (vec_perm_builder): Redefine as a stand-alone class.
25473 (vec_perm_indices::vec_perm_indices): New function.
25474 (vec_perm_indices::clamp): Likewise.
25475 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25476 (vec_perm_indices::new_vector): New function.
25477 (vec_perm_indices::new_expanded_vector): Update for new
25478 vec_perm_indices class.
25479 (vec_perm_indices::rotate_inputs): New function.
25480 (vec_perm_indices::all_in_range_p): Operate directly on the
25481 encoded form, without computing elided elements.
25482 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25483 encoding. Update for new vec_perm_indices class.
25484 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25485 the given vec_perm_builder.
25486 (expand_vec_perm_var): Update vec_perm_builder constructor.
25487 (expand_mult_highpart): Use vec_perm_builder instead of
25488 auto_vec_perm_indices.
25489 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25490 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25491 or double series encoding as appropriate.
25492 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25493 vec_perm_indices instead of auto_vec_perm_indices.
25494 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25495 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25496 (vect_permute_store_chain): Likewise.
25497 (vect_grouped_load_supported): Likewise.
25498 (vect_permute_load_chain): Likewise.
25499 (vect_shift_permute_load_chain): Likewise.
25500 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25501 (vect_transform_slp_perm_load): Likewise.
25502 (vect_schedule_slp_instance): Likewise.
25503 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25504 (vectorizable_mask_load_store): Likewise.
25505 (vectorizable_bswap): Likewise.
25506 (vectorizable_store): Likewise.
25507 (vectorizable_load): Likewise.
25508 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25509 vec_perm_indices instead of auto_vec_perm_indices. Use
25510 tree_to_vec_perm_builder to read the vector from a tree.
25511 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25512 vec_perm_builder instead of a vec_perm_indices.
25513 (have_whole_vector_shift): Use vec_perm_builder and
25514 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25515 truncation to calc_vec_perm_mask_for_shift.
25516 (vect_create_epilog_for_reduction): Likewise.
25517 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25518 from auto_vec_perm_indices to vec_perm_indices.
25519 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25520 instead of changing individual elements.
25521 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25522 the vector in d.perm.
25523 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25524 from auto_vec_perm_indices to vec_perm_indices.
25525 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25526 instead of changing individual elements.
25527 (arm_vectorize_vec_perm_const): Use new_vector to install
25528 the vector in d.perm.
25529 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25530 Update vec_perm_builder constructor.
25531 (rs6000_expand_interleave): Likewise.
25532 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25533 (rs6000_expand_interleave): Likewise.
25534
25535 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25536
25537 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25538 to qimode could truncate the indices.
25539 * optabs.c (expand_vec_perm_var): Likewise.
25540
25541 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25542
25543 * Makefile.in (OBJS): Add vec-perm-indices.o.
25544 * vec-perm-indices.h: New file.
25545 * vec-perm-indices.c: Likewise.
25546 * target.h (vec_perm_indices): Replace with a forward class
25547 declaration.
25548 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25549 * optabs.h: Include vec-perm-indices.h.
25550 (expand_vec_perm): Delete.
25551 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25552 (expand_vec_perm_const): Declare.
25553 * target.def (vec_perm_const_ok): Replace with...
25554 (vec_perm_const): ...this new hook.
25555 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25556 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25557 * doc/tm.texi: Regenerate.
25558 * optabs.def (vec_perm_const): Delete.
25559 * doc/md.texi (vec_perm_const): Likewise.
25560 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25561 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25562 expand_vec_perm for constant permutation vectors. Assert that
25563 the mode of variable permutation vectors is the integer equivalent
25564 of the mode that is being permuted.
25565 * optabs-query.h (selector_fits_mode_p): Declare.
25566 * optabs-query.c: Include vec-perm-indices.h.
25567 (selector_fits_mode_p): New function.
25568 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25569 is defined, instead of checking whether the vec_perm_const_optab
25570 exists. Use targetm.vectorize.vec_perm_const instead of
25571 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25572 fit in the vector mode before using a variable permute.
25573 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25574 vec_perm_indices instead of an rtx.
25575 (expand_vec_perm): Replace with...
25576 (expand_vec_perm_const): ...this new function. Take the selector
25577 as a vec_perm_indices rather than an rtx. Also take the mode of
25578 the selector. Update call to shift_amt_for_vec_perm_mask.
25579 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25580 Use vec_perm_indices::new_expanded_vector to expand the original
25581 selector into bytes. Check whether the indices fit in the vector
25582 mode before using a variable permute.
25583 (expand_vec_perm_var): Make global.
25584 (expand_mult_highpart): Use expand_vec_perm_const.
25585 * fold-const.c: Includes vec-perm-indices.h.
25586 * tree-ssa-forwprop.c: Likewise.
25587 * tree-vect-data-refs.c: Likewise.
25588 * tree-vect-generic.c: Likewise.
25589 * tree-vect-loop.c: Likewise.
25590 * tree-vect-slp.c: Likewise.
25591 * tree-vect-stmts.c: Likewise.
25592 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25593 Delete.
25594 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25595 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25596 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25597 (aarch64_vectorize_vec_perm_const): ...this new function.
25598 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25599 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25600 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25601 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25602 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25603 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25604 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25605 into...
25606 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25607 check for NEON modes.
25608 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25609 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25610 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25611 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25612 into...
25613 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25614 the old VEC_PERM_CONST conditions.
25615 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25616 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25617 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25618 (ia64_vectorize_vec_perm_const_ok): Merge into...
25619 (ia64_vectorize_vec_perm_const): ...this new function.
25620 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25621 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25622 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25623 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25624 * config/mips/mips.c (mips_expand_vec_perm_const)
25625 (mips_vectorize_vec_perm_const_ok): Merge into...
25626 (mips_vectorize_vec_perm_const): ...this new function.
25627 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25628 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25629 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25630 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25631 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25632 (rs6000_expand_vec_perm_const): Delete.
25633 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25634 Delete.
25635 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25636 (altivec_expand_vec_perm_const_le): Take each operand individually.
25637 Operate on constant selectors rather than rtxes.
25638 (altivec_expand_vec_perm_const): Likewise. Update call to
25639 altivec_expand_vec_perm_const_le.
25640 (rs6000_expand_vec_perm_const): Delete.
25641 (rs6000_vectorize_vec_perm_const_ok): Delete.
25642 (rs6000_vectorize_vec_perm_const): New function.
25643 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25644 an element count and rtx array.
25645 (rs6000_expand_extract_even): Update call accordingly.
25646 (rs6000_expand_interleave): Likewise.
25647 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25648 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25649 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25650 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25651 (rs6000_expand_vec_perm_const): Delete.
25652 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25653 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25654 (altivec_expand_vec_perm_const_le): Take each operand individually.
25655 Operate on constant selectors rather than rtxes.
25656 (altivec_expand_vec_perm_const): Likewise. Update call to
25657 altivec_expand_vec_perm_const_le.
25658 (rs6000_expand_vec_perm_const): Delete.
25659 (rs6000_vectorize_vec_perm_const_ok): Delete.
25660 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25661 reference to the SPE evmerge intructions.
25662 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25663 an element count and rtx array.
25664 (rs6000_expand_extract_even): Update call accordingly.
25665 (rs6000_expand_interleave): Likewise.
25666 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25667 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25668 new function.
25669 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25670
25671 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25672
25673 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25674 vector mode and that that mode matches the mode of the data
25675 being permuted.
25676 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25677 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25678 directly using expand_vec_perm_1 when forcing selectors into
25679 registers.
25680 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25681
25682 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25683
25684 * optabs-query.h (can_vec_perm_p): Delete.
25685 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25686 * optabs-query.c (can_vec_perm_p): Split into...
25687 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25688 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25689 particular selector is valid.
25690 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25691 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25692 (vect_grouped_load_supported): Likewise.
25693 (vect_shift_permute_load_chain): Likewise.
25694 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25695 (vect_transform_slp_perm_load): Likewise.
25696 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25697 (vectorizable_bswap): Likewise.
25698 (vect_gen_perm_mask_checked): Likewise.
25699 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25700 implementations of variable permutation vectors into account
25701 when deciding which selector to use.
25702 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25703 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25704 with a false third argument.
25705 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25706 to test whether the constant selector is valid and can_vec_perm_var_p
25707 to test whether a variable selector is valid.
25708
25709 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25710
25711 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25712 * optabs-query.c (can_vec_perm_p): Likewise.
25713 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25714 instead of vec_perm_indices.
25715 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25716 (vect_gen_perm_mask_checked): Likewise,
25717 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25718 (vect_gen_perm_mask_checked): Likewise,
25719
25720 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25721
25722 * optabs-query.h (qimode_for_vec_perm): Declare.
25723 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25724 (qimode_for_vec_perm): ...this new function.
25725 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25726
25727 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25728
25729 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25730 does not have a conditional at the top.
25731
25732 2018-01-02 Richard Biener <rguenther@suse.de>
25733
25734 * ipa-inline.c (big_speedup_p): Fix expression.
25735
25736 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25737
25738 PR target/81616
25739 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25740 for generic 4->6.
25741
25742 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25743
25744 PR target/81616
25745 Generic tuning.
25746 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25747 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25748 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25749 cond_taken_branch_cost 3->4.
25750
25751 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25752
25753 PR tree-optimization/83581
25754 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25755 TODO_cleanup_cfg if any changes have been made.
25756
25757 PR middle-end/83608
25758 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25759 convert_modes if target mode has the right side, but different mode
25760 class.
25761
25762 PR middle-end/83609
25763 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25764 last argument when extracting from CONCAT. If either from_real or
25765 from_imag is NULL, use expansion through memory. If result is not
25766 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25767 the parts directly to inner mode, if even that fails, use expansion
25768 through memory.
25769
25770 PR middle-end/83623
25771 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25772 check for bswap in mode rather than HImode and use that in expand_unop
25773 too.
25774 \f
25775 Copyright (C) 2018 Free Software Foundation, Inc.
25776
25777 Copying and distribution of this file, with or without modification,
25778 are permitted in any medium without royalty provided the copyright
25779 notice and this notice are preserved.