]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
Schedule by INSN_COST in case of tie
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2
3 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4 (rfs_decision): New scheduling decision.
5
6 2018-09-13 Richard Biener <rguenther@suse.de>
7
8 PR bootstrap/87134
9 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
10 (vn_nary_op_insert_pieces_predicated): Do not write useless
11 valid_dominated_by_p entry outside of the allocated storage.
12
13 2018-09-13 Omar Sandoval <osandov@osandov.com>
14 Tom de Vries <tdevries@suse.de>
15
16 PR debug/86985
17 * dwarf2out.c (is_c): New function.
18 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
19
20 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
21
22 PR target/85628
23 * config/aarch64/aarch64.md (*aarch64_bfxil):
24 Define.
25 * config/aarch64/constraints.md (Ulc): Define.
26 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
27 Define.
28 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
29 New function.
30
31 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
32
33 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
34 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
35 aarch64_layout_frame call.
36 (aarch64_expand_epilogue): Likewise.
37 (aarch64_initial_elimination_offset): Likewise.
38 (aarch64_get_separate_components): Likewise.
39 (aarch64_use_return_insn_p): Likewise.
40 (aarch64_layout_frame): Remove unneeded check.
41
42 2018-09-13 Jakub Jelinek <jakub@redhat.com>
43
44 * configure.ac: Only append
45 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
46 gcc_config_arguments if it was never reconfigured or last reconfigure
47 was with different arguments.
48 * configure: Regenerated.
49
50 2018-09-13 Jakub Jelinek <jakub@redhat.com>
51 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
52
53 PR middle-end/87290
54 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
55 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
56
57 2018-09-13 Jakub Jelinek <jakub@redhat.com>
58
59 PR tree-optimization/87287
60 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
61 X % C == 0 to X % (unsigned) C == 0 optimization to ...
62 * match.pd (X % C == 0): ... here. New optimization.
63
64 2018-09-12 Jakub Jelinek <jakub@redhat.com>
65
66 PR middle-end/82853
67 * expr.h (maybe_optimize_mod_cmp): Declare.
68 * expr.c (mod_inv): New function.
69 (maybe_optimize_mod_cmp): New function.
70 (do_store_flag): Use it.
71 * cfgexpand.c (expand_gimple_cond): Likewise.
72
73 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
74 Julian Brown <julian@codesourcery.com>
75
76 PR middle-end/86336
77 * gimplify.c (gimplify_scan_omp_clauses): Set
78 target_firstprivatize_array_bases in OpenACC parallel and kernels
79 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
80 OpenACC data regions.
81
82 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
83
84 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
85 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
86
87 2018-09-12 Richard Biener <rguenther@suse.de>
88
89 PR tree-optimization/87280
90 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
91 edge but unreachable target.
92 (do_rpo_vn): For conservatively handling a PHI only mark
93 the backedge executable but not the block reachable.
94
95 2018-09-12 Richard Biener <rguenther@suse.de>
96
97 PR tree-optimization/87266
98 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
99 visited blocks.
100
101 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
102
103 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
104 constants.
105 ("trunc<BFP:mode><DFP_ALL:mode>2")
106 ("trunc<DFP_ALL:mode><BFP:mode>2")
107 ("extend<BFP:mode><DFP_ALL:mode>2")
108 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
109 according to the target operand type.
110
111 2018-09-12 Jakub Jelinek <jakub@redhat.com>
112 Andreas Krebbel <krebbel@linux.ibm.com>
113
114 PR tree-optimization/86844
115 * gimple-ssa-store-merging.c
116 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
117 there are any overlapping stores in between them, make sure they are
118 also coalesced or we give up completely.
119
120 2018-09-12 Jakub Jelinek <jakub@redhat.com>
121
122 PR middle-end/87248
123 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
124 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
125
126 2018-09-12 Tom de Vries <tdevries@suse.de>
127
128 * common.opt (gdescribe-dies): Add option.
129 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
130 attribute for artifical and nameless decls.
131 (dwarf2out_register_external_die): Add description attribute to
132 external reference die.
133 (add_desc_attribute): New functions.
134 (gen_subprogram_die): Add description attribute to
135 DW_TAG_call_site_parameter.
136 * tree-pretty-print.c (print_generic_expr_to_str): New function.
137 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
138 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
139 -gno-describe-dies.
140 (@item -gdescribe-dies): Add.
141
142 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
143
144 * tree-vrp.c (vrp_shift_undefined_p): Remove.
145 (extract_range_from_binary_expr_1: Call
146 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
147 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
148 depend on sign.
149
150 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
151
152 * gimple-ssa-warn-alloca.c
153 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
154 field for ALLOCA_BOUND_*_LARGE.
155
156 2018-09-11 Nathan Sidwell <nathan@acm.org>
157
158 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
159
160 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
161
162 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
163 for clobbers. Remove obsolete comment.
164
165 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
166
167 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
168 mpxchk, mpxld and mpxst types.
169 (define_attr length_immediate): Remove all processing of mpx types.
170 (define_attr prefix_0f): Ditto.
171 (define_attr memory): Ditto.
172
173 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
174
175 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
176 (log<mode>2): Change operand 1 predicate to general_operand.
177 Extend operand 1 to XFmode and generate logxf3 insn.
178 (log10<mode>2): Change operand 1 predicate to general_operand.
179 Extend operand 1 to XFmode and generate log10xf3 insn.
180 (log2<mode>2): Change operand 1 predicate to general_operand.
181 Extend operand 1 to XFmode and generate log2xf3 insn.
182 (fyl2xp1_extend<mode>xf3_i387): Remove.
183 (log1p<mode>2): Change operand 1 predicate to general_operand.
184 Extend operand 1 to XFmode and generate log1pxf3 insn.
185 (fxtract_extend<mode>xf3_i387): Remove.
186 (logb<mode>2): Change operand 1 predicate to general_operand.
187 Extend operand 1 to XFmode and generate logbxf3 insn.
188 (ilogb<mode>2): Change operand 1 predicate to general_operand.
189 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
190 (significand<mode>2): Change operand 1 predicate to general_operand.
191 Extend operand 1 to XFmode and generate significandxf3 insn.
192
193 2018-09-11 Nathan Sidwell <nathan@acm.org>
194
195 * gcc.c (perror_with_name, pfatal_with_name): Delete.
196 (load_specs): Use fatal_error.
197 (DELETE_IF_ORDINARY, process_command): Use error.
198 (execute, run_attempt): Use fatal_error.
199
200 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
201
202 * diagnostic-core.h (sorry_at): New prototype.
203 * diagnostic.c (sorry_at): New function.
204
205 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
206
207 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
208 by zero as VR_UNDEFINED.
209
210 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
211
212 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
213 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
214 (<sincos>mode2): New expander.
215 (sincos_extend<mode>xf3_i387): Remove insn pattern.
216 (sincos -> sin, cos splitters): Remove splitter patterns.
217 (sincos<mode>3): Change operand 2 predicate to general_operand.
218 Extend operand 2 to XFmode and generate sincosxf3 insn.
219 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
220 Change operand 3 predicate to const1_operand.
221 (fptan_extend<mode>xf4_i387): Remove insn pattern.
222 (tanxf2): Update operands in the call to fptanxf4_i387.
223 (tan<mode>2): Change operand 1 predicate to general_operand.
224 Extend operand 1 to XFmode and generate tanxf3 insn.
225 (atan2xf3): Rename from *fpatanxf3_i387.
226 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
227 (atan2xf3): Remove expander.
228 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
229 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
230 (atan<mode>2): Change operand 1 predicate to general_operand.
231 Extend operand 1 to XFmode and generate atanxf3 insn.
232
233 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
234
235 * config/i386/i386.md (x87/SSE constant load splitter): Use
236 memory_operand instead of nonimmediate_operand for input operand
237 predicate.
238
239 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
240
241 * config/i386/i386.md (float partial SSE register stall splitter): Move
242 splitter near its instruction pattern.
243 (float_extend partial SSE register stall splitter): Ditto.
244 (float_truncate partial SSE register stall splitter): Ditto.
245
246 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
247
248 PR target/86794
249 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
250 to speculation_safe_value_not_needed.
251
252 PR target/85666
253 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
254 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
255 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
256 leaf_function_p, instead use has_hard_reg_initial_val.
257
258 2018-09-09 Nathan Sidwell <nathan@acm.org>
259
260 * gcc.h (pfatal_with_name): Don't declare here.
261 * gcc.c (pfatal_with_name): Make static.
262
263 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
264
265 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
266 earlyclobber.
267
268 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
269
270 PR rtl-optimization/85458
271 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
272 priority hook to reduce the priority of EXPR.
273
274 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
275
276 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
277 DImode for x87 on 32bit targets. Conditionally disable x87 modes
278 with X87_ENABLE_FLOAT. Remove preparation code.
279 (*float<SWI48:mode><MODEF:mode>2): Rename from
280 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
281 math using "enabled" attribute.
282 (*floatdi<MODEF:mode>2_i387): Rename from
283 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
284 enable for 32bit targets only.
285 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
286 splitter.
287 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
288 as operand 1 predicate. Rewrite as define_insn_and_split.
289 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
290
291 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
292
293 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
294 to fallthru to FLOAT case.
295
296 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
297
298 PR target/86731
299 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
300 around folding of vec_sl to handle out of range shift values.
301
302 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
303
304 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
305 Update callers to gen_fix_trunc<mode>_i387_fisttp
306 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
307 nonimmediate_operand.
308 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
309 and corresponding splitters.
310 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
311 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
312 (fix_truncdi_i387_with_temp): Remove insn pattern
313 and corresponding splitters.
314 (fix_trunc<mode>_i387): Change operand 0 predicate to
315 nonimmediate_operand.
316 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
317 and corresponding splitters.
318 (*fistdi2_1): Remove.
319 (fistdi2): Ditto.
320 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
321 (lrintxfdi2): Remove expander. Reimplement as define_insn.
322 (*fist<mode>2_1): Remove.
323 (fist<mode>2): Ditto.
324 (fist<mode>2_with_temp): Remove insn pattern and corresponding
325 splitters.
326 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
327 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
328 (fistdi2_<rounding>): Change operand 0 predicate to
329 nonimmediate_operand.
330 (fistdi2_<rounding>_with_temp): Remove insn pattern
331 and corresponding splitters.
332 (fist<mode>2_<rounding>): Change operand 0 predicate to
333 nonimmediate_operand.
334 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
335 and corresponding splitters.
336
337 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
338
339 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
340
341 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
342 the init value.
343
344 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
345
346 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
347 early gimple folding of vec_splat().
348 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
349 * gimple-fold.h: Add an extern define for tree_vec_extract().
350
351 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
352
353 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
354 wrappers around TREE_TYPE comparisons.
355
356 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
357
358 PR target/80080
359 * config/s390/predicates.md: Add nonsym_memory_operand.
360 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
361 contains a SYMBOL_REF, load it into an intermediate pseudo.
362 (s390_emit_compare_and_swap): Legitimize operand.
363 * config/s390/s390.md: Use the new nonsym_memory_operand
364 with UNSPECV_CAS patterns.
365
366 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
367
368 PR target/80080
369 * config/s390/s390-passes.def: New file.
370 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
371 declaration.
372 (make_pass_s390_early_mach): Add declaration.
373 * config/s390/s390.c (make_pass_s390_early_mach):
374 (s390_option_override): Remove dynamic registration.
375 * config/s390/t-s390: Add s390-passes.def.
376
377 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
378
379 * config/s390/s390.c (s390_decompose_constant_pool_ref):
380 Remove UNSPEC_LTREL_BASE check.
381 (annotate_constant_pool_refs): Likewise.
382 (find_constant_pool_ref): Likewise.
383 (find_ltrel_base): Removed.
384 (replace_ltrel_base): Removed.
385 (s390_mainpool_finish): Remove replace_ltrel_base call.
386 (s390_chunkify_start): Remove pending LTREL_BASE logic.
387 (s390_chunkify_finish): Remove replace_ltrel_base call.
388 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
389
390 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
391
392 PR target/86779
393 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
394 to speculation_safe_value_not_needed.
395
396 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
397 Bernd Schmidt <bernds_cb1@t-online.de>
398
399 * config/nvptx/nvptx-opts.h: New file.
400 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
401 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
402 (ASM_SPEC): Define.
403 (TARGET_SM35): New macro.
404 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
405 correct predicate.
406 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
407 values.
408 (misa=): New option.
409 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
410
411 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
412
413 * config/i386/i386.md (truncdfsf2): Remove expander.
414 (truncdfsf2_with_temp): Ditto.
415 (truncxf<mode>2): Ditto.
416 (*truncdfsf_fast_mixed): Remove insn pattern.
417 (*truncdfsf_fast_i387): Ditto.
418 (*truncdfsf_mixed): Ditto.
419 (*truncdfsf_i387): Ditto.
420 (*truncdfsf2_i387_1): Ditto.
421 (*truncxfsf2_mixed): Ditto.
422 (*truncxfdf2_mixed): Ditto.
423 (*truncxf<mode>2_i387_noop): Ditto. Update callers
424 to call gen_truncxf<mode>2 instead.
425 (*truncxf<mode>2_i387): Remove.
426 (reg->reg splitters): Remove splitter pattern.
427 (reg->mem splitters): Ditto.
428
429 (truncdfsf2): New insn pattern.
430 (truncxf<mode>2): Ditto.
431
432 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
433
434 * tree-ssa-math-opts.c (is_mult_by): New function.
435 (is_square_of): Use the above.
436 (optimize_recip_sqrt): New function.
437 (pass_cse_reciprocals::execute): Use the above.
438
439 2018-09-05 Richard Biener <rguenther@suse.de>
440
441 PR bootstrap/87134
442 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
443 to zero-init the emplaced vec.
444
445 2018-09-05 Martin Liska <mliska@suse.cz>
446
447 PR tree-optimization/87205
448 * tree-switch-conversion.c (pass_lower_switch::execute):
449 Group cases for switch statements.
450
451 2018-09-05 Richard Biener <rguenther@suse.de>
452
453 PR tree-optimization/87217
454 * tree-ssa-sccvn.c (vuse_valueize): New.
455 (vn_reference_lookup_pieces): Use it.
456 (vn_reference_lookup): Likewise.
457
458 2018-09-05 Nathan Sidwell <nathan@acm.org>
459
460 PR c++/87137
461 * stor-layout.c (place_field): Scan forwards to check last
462 bitfield when ms_bitfield_placement is in effect.
463
464 2018-09-05 Richard Biener <rguenther@suse.de>
465
466 PR bootstrap/87225
467 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
468 return.
469
470 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
471 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
472
473 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
474 * config.gcc (extra_objs): Build it.
475 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
476 Likewise.
477 * config/aarch64/aarch64-passes.def
478 (pass_tag_collision_avoidance): New pass.
479 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
480 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
481 (aarch64_classify_address): Remove static qualifier.
482 (aarch64_address_info, aarch64_address_type): Move to...
483 * config/aarch64/aarch64-protos.h: ... here.
484 (make_pass_tag_collision_avoidance): New function.
485 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
486 New tuning flag.
487
488 2018-09-05 Martin Liska <mliska@suse.cz>
489
490 * doc/gcov.texi: Update documentation of humar
491 readable mode.
492 * gcov.c (format_count): Print one decimal place, it provides
493 more fine number of situations like '1G' vs. '1.4G'.
494
495 2018-09-05 Martin Liska <mliska@suse.cz>
496
497 PR target/87164
498 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
499 * optc-gen.awk: Allow 'Var' for Deprecated options in order
500 to generate a MASK value.
501
502 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR debug/86593
505 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
506 if frame pointer isn't used.
507 (compute_frame_pointer_to_fb_displacement): Likewise.
508
509 2018-09-04 Jakub Jelinek <jakub@redhat.com>
510
511 PR target/87198
512 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
513 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
514 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
515 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
516 and OPTION_MASK_ISA_XSAVEC_UNSET.
517
518 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
519
520 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
521 XOR operations in NAND case.
522
523 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
524
525 * wide-int-range.cc (wide_int_range_convert): New.
526 * wide-int-range.h (wide_int_range_convert): New.
527 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
528 code into wide_int_range_convert.
529 (extract_range_into_wide_ints): Do not munge anti range constants
530 into the entire domain. Just return the range back.
531
532 2018-09-04 Martin Liska <mliska@suse.cz>
533
534 * genmatch.c (output_line_directive): Add new argument
535 fnargs.
536 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
537
538 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
539
540 * doc/invoke.texi (Option Summary): Add whitespace.
541
542 * doc/invoke.texi (Option Summary): Add -Waligned-new.
543
544 2018-09-04 Richard Biener <rguenther@suse.de>
545
546 PR tree-optimization/87211
547 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
548 backedge value we're supposed to treat as VARYING also number
549 the PHI to VARYING in case it got a different value-number already.
550
551 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
552
553 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
554 (extract_range_from_binary_expr_1): Do not call
555 vrp_can_optimize_bit_op.
556 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
557 static.
558 (wide_int_range_get_mask_and_bounds): New.
559 (wide_int_range_optimize_bit_op): New.
560 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
561 (wide_int_range_bit_and): Same.
562 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
563 (wide_int_range_optimize_bit_op): New.
564 (wide_int_range_get_mask_and_bounds): New.
565
566 2018-09-04 Richard Biener <rguenther@suse.de>
567
568 PR tree-optimization/87176
569 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
570 variable. When value-numbering a virtual PHI node make sure
571 to not value-number to the backedge value.
572
573 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
574
575 * doc/extend.texi (Long Long, Hex Floats): Document support for
576 long long and hex floats in more recent versions of ISO C++.
577
578 2018-09-03 Richard Biener <rguenther@suse.de>
579
580 PR tree-optimization/87177
581 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
582 cleanup.
583
584 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
585
586 * bb-reorder.c (edge_order): Convert to C-qsort-style
587 tri-state comparator.
588 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
589
590 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
591
592 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
593 tri-state comparator.
594 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
595
596 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
597
598 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
599 (mergesort): ... here as maximum count for using netsort.
600 (gcc_qsort): Set nlim to 3 if stable sort is requested.
601 (gcc_stablesort): New.
602 * system.h (gcc_stablesort): Declare.
603
604 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
605
606 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
607 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
608 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
609
610 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
611
612 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
613 lxsdx and stxsdx alternatives.
614 (*mov<mode>_hardfloat64): Ditto.
615 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
616
617 2018-09-03 Richard Biener <rguenther@suse.de>
618
619 PR tree-optimization/87200
620 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
621 simplify result.
622
623 2018-09-03 Martin Liska <mliska@suse.cz>
624
625 PR tree-optimization/87201
626 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
627 Fix parenthesis in an expression.
628
629 2018-09-03 Richard Biener <rguenther@suse.de>
630
631 PR tree-optimization/87197
632 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
633 visited. CSE the VN_INFO hashtable lookup.
634
635 PR tree-optimization/87169
636 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
637 iterating make sure there's no extra backedges from irreducible
638 regions feeding the header. Mark the destination block
639 executable.
640
641 2018-09-03 Martin Liska <mliska@suse.cz>
642
643 PR driver/83193
644 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
645 * common/common-targhooks.c (default_get_valid_option_values):
646 New function.
647 * common/common-targhooks.h (default_get_valid_option_values):
648 Likewise.
649 * common/config/i386/i386-common.c: Move processor_target_table
650 from i386.c.
651 (ix86_get_valid_option_values): New function.
652 (TARGET_GET_VALID_OPTION_VALUES): New macro.
653 * config/i386/i386.c (struct ptt): Move to i386-common.c.
654 (PTA_*): Move all defined masks into i386-common.c.
655 (ix86_function_specific_restore): Use new processor_cost_table.
656 * config/i386/i386.h (struct ptt): Moved from i386.c.
657 (struct pta): Likewise.
658 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
659 * doc/tm.texi.in: Likewise.
660 * opt-suggestions.c (option_proposer::suggest_option):
661 Pass prefix to build_option_suggestions.
662 (option_proposer::get_completions): Likewise.
663 (option_proposer::build_option_suggestions): Use the new target
664 hook.
665 * opts.c (struct option_help_tuple): New struct.
666 (print_filtered_help): Use the new target hook.
667
668 2018-09-03 Martin Liska <mliska@suse.cz>
669
670 PR middle-end/59521
671 * predict.c (set_even_probabilities): Add likely_edges
672 argument and handle cases where we have precisely one
673 likely edge.
674 (combine_predictions_for_bb): Catch also likely_edges.
675 (tree_predict_by_opcode): Handle gswitch statements.
676 * tree-cfg.h (find_case_label_for_value): New declaration.
677 (find_taken_edge_switch_expr): Likewise.
678 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
679 Find pivot in decision tree based on probabily, not by number of
680 nodes.
681
682 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
683
684 * doc/standards.texi (Standards): Update Objective-C reference.
685
686 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
687
688 * doc/install.texi (Prerequisites): Update link for MPC.
689
690 2018-09-01 Michael Matz <matz@suse.de>
691
692 PR tree-optimization/87074
693 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
694 PHIs for outer-loop uses.
695
696 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
697
698 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
699 * doc/invoke.texi (C Dialect Options): Ditto.
700
701 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
702
703 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
704
705 2018-08-31 Richard Biener <rguenther@suse.de>
706
707 PR tree-optimization/87168
708 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
709 (rpo_elim::eliminate_avail): When OP was not visited it must
710 be available.
711
712 2018-08-31 David Malcolm <dmalcolm@redhat.com>
713
714 * tree-vrp.c (copy_value_range): Convert param "from" from
715 "value_range *" to "const value_range *".
716 (range_is_null): Likewise for param "vr".
717 (range_int_cst_p): Likewise.
718 (range_int_cst_singleton_p): Likewise.
719 (symbolic_range_p): Likewise.
720 (value_ranges_intersect_p): Likewise for both params.
721 (value_range_nonnegative_p): Likewise for param "vr".
722 (value_range_constant_singleton): Likewise.
723 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
724 (extract_range_into_wide_ints): Likewise for param "vr".
725 (extract_range_from_multiplicative_op): Likewise for params "vr0"
726 and "vr1".
727 (vrp_can_optimize_bit_op): Likewise.
728 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
729 "vr1_".
730 (extract_range_from_unary_expr): Likewise.
731 (debug_value_range): Likewise for param "vr".
732 (value_range::dump): Add "const" qualifier.
733 (vrp_prop::check_array_ref): Convert local "vr" from
734 "value_range *" to "const value_range *".
735 (vrp_prop::check_mem_ref): Likewise.
736 (vrp_prop::visit_stmt): Likewise for local "old_vr".
737 (vrp_intersect_ranges_1): Likewise for param "vr_1".
738 (vrp_intersect_ranges): Likewise.
739 (simplify_stmt_for_jump_threading): Likewise for local "vr".
740 (vrp_prop::vrp_finalize): Likewise.
741 * tree-vrp.h (value_range::dump): Add "const" qualifier.
742 (vrp_intersect_ranges): Add "const" qualifier to params as above.
743 (extract_range_from_unary_expr): Likewise.
744 (value_range_constant_singleton): Likewise.
745 (symbolic_range_p): Likewise.
746 (copy_value_range): Likewise.
747 (extract_range_from_binary_expr_1): Likewise.
748 (range_int_cst_p): Likewise.
749 (vrp_set_zero_nonzero_bits): Likewise.
750 (range_int_cst_singleton_p): Likewise.
751
752 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
753
754 * config/aarch64/arm_neon.h (vabsd_s64): New.
755 (vnegd_s64): Likewise.
756
757 2018-08-31 Martin Jambor <mjambor@suse.cz>
758
759 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
760
761 2018-08-31 Martin Liska <mliska@suse.cz>
762
763 * ipa-icf.c (sem_item::add_type): Use
764 sem_item::m_type_hash_cache.
765 * ipa-icf.h: Move the cache from sem_item_optimizer
766 to sem_item.
767
768 2018-08-31 Nathan Sidwell <nathan@acm.org>
769
770 * doc/extend.texi (Backwards Compatibility): Remove implicit
771 extern C leeway of () being (...).
772
773 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
774
775 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
776
777 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
778
779 PR target/86684
780 PR target/87149
781 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
782
783 2018-08-31 Jakub Jelinek <jakub@redhat.com>
784
785 PR middle-end/87138
786 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
787 gen_int_mode. Formatting fixes.
788
789 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
790
791 * target.def (custom_function_descriptors): Improve documentation.
792 * doc/tm.texi.in (Trampolines): Expand discussion of function
793 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
794 beginning of the section.
795 * doc/tm.texi: Regenerated.
796
797 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
798
799 * cfg.h (class auto_edge_flag): Spell out the template-id of the
800 base class in the initializer list. This is a workaround for
801 building with older GCC.
802 (class auto_bb_flag): Likewise.
803
804 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
805
806 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
807 (altivec_vcmpequ<VI_char>_p): Remove star.
808 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
809 vector load modes.
810 (expand_strncmp_vec_sequence): New function.
811 (emit_final_str_compare_vec): New function.
812 (expand_strn_compare): Add support for vector strncmp.
813 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
814 length specification to bytes.
815 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
816 (vcmpnezb_p): New pattern.
817 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
818 for option -mstring-compare-inline-limit.
819
820 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
821
822 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
823 (PTA_SKYLAKE): Add PTA_AES.
824 (PTA_GOLDMONT): Likewise.
825
826 2018-08-29 Jan Hubicka <jh@suse.cz>
827
828 PR lto/86517
829 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
830 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
831
832 2018-08-29 Jan Hubicka <jh@suse.cz>
833
834 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
835 TYPE_STUB_DECL.
836 (hash_tree): Do not visit TYPE_STUB_DECL.
837 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
838 stream TYPE_STUB_DECL.
839 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
840 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
841 after free_lang_data.
842 (type_in_anonymous_namespace_p): Likewise.
843
844 2018-08-29 Jan Hubicka <jh@suse.cz>
845
846 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
847 comment that it has to be even number.
848 (class sreal): Change m_sig type to int32_t.
849 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
850 int64_t for temporary calculations.
851 (sreal_verify_basics): Drop one bit from minimum and maximum.
852
853 2018-08-30 Richard Biener <rguenther@suse.de>
854
855 PR tree-optimization/87147
856 * tree-ssa-sccvn.c (SSA_VISITED): New function.
857 (visit_phi): When the degenerate result is from the backedge and
858 we didn't visit its definition yet drop to VARYING.
859 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
860
861 2018-08-29 Jan Hubicka <jh@suse.cz>
862
863 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
864 DECL_VINDEX.
865 (hash_tree): Likewise.
866
867 2018-08-29 Jan Hubicka <jh@suse.cz>
868
869 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
870 and TYPE_NEXT_REF_TO.
871
872 2018-08-29 Jan Hubicka <jh@suse.cz>
873
874 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
875 comment that it has to be even number.
876 (class sreal): Change m_sig type to int32_t.
877 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
878 int64_t for temporary calculations.
879 (sreal_verify_basics): Drop one bit from minimum and maximum.
880
881 2018-08-30 Tamar Christina <tamar.christina@arm.com>
882
883 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
884
885 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
886
887 PR middle-end/86995
888 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
889 if to_add is negative.
890
891 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
892
893 PR middle-end/87053
894 * builtins.c (c_strlen): Improve range checks.
895
896 2018-08-29 Martin Sebor <msebor@redhat.com>
897 Jeff Law <law@redhat.com>
898
899 PR tree-optimization/86714
900 PR tree-optimization/86711
901 * builtins.c (c_strlen): Add arguments to call to string_constant.
902 * expr.c (string_constant): Add argument. Detect missing nul
903 terminator and outermost declaration it's missing in.
904 * expr.h (string_constant): Add argument.
905 * fold-const.c (read_from_constant_string): Add arguments to call to
906 string_constant.
907 (c_getstr): Likewise.
908 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
909 to string_constant.
910 * tree-ssa-strlen.c (get_stridx): Likewise.
911
912 2018-08-29 Jan Hubicka <jh@suse.cz>
913
914 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
915 Do not stream DECL_VINDEX.
916 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
917 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
918 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
919
920 2018-08-29 Richard Biener <rguenther@suse.de>
921
922 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
923 virtual operands that are not default defs to honor region
924 boundaries.
925 (rpo_vn_valueize): Remove ineffective code here.
926
927 2018-08-29 Richard Biener <rguenther@suse.de>
928
929 PR tree-optimization/87132
930 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
931 when skipping defs reachable over backedges.
932
933 2018-08-29 Richard Biener <rguenther@suse.de>
934
935 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
936 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
937 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
938 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
939 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
940 (vn_reference_lookup_3): Remove use of const_parms.
941 (free_rpo_vn): Do not free const_parms.
942 (do_rpo_vn): Do not call init_const_parms.
943 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
944 SSA_NAME_POINTS_TO_READONLY_MEMORY.
945 (call_may_clobber_ref_p_1): Likewise.
946
947 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
948
949 PR other/86726
950 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
951 (-O): Ditto.
952 (-ftree-scev-cprop): Document.
953
954 2018-08-29 Jan Hubicka <jh@suse.cz>
955
956 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
957 parameters.
958 (sreal constructor): Update.
959 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
960 sreal:operator/): Update.
961
962 2018-08-29 Martin Liska <mliska@suse.cz>
963
964 * tree-switch-conversion.c (switch_conversion::expand):
965 Strenghten assumption about gswitch statements.
966
967 2018-08-29 Richard Biener <rguenther@suse.de>
968
969 PR tree-optimization/87117
970 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
971 re-value-number released SSA VDEFs.
972
973 2018-08-29 Richard Biener <rguenther@suse.de>
974
975 PR tree-optimization/87126
976 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
977
978 2018-08-28 Jim Wilson <jimw@sifive.com>
979
980 * config/riscv/pic.md: Rewrite.
981 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
982 invalid address.
983 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
984 (SOFTF, default_load, softload, softstore): New.
985
986 2018-08-28 Jeff Law <law@redhat.com>
987
988 * fold-const.c (fold_binary_loc): Remove recently added assert.
989
990 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
991
992 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
993 to OP parmeter of generated function.
994
995 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
996
997 PR tree-optimization/87009
998 * match.pd: Add boolean optimizations.
999
1000 2018-08-28 Martin Sebor <msebor@redhat.com>
1001
1002 PR middle-end/86631
1003 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1004 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1005 (pass_walloca::gate): Use it.
1006 (alloca_call_type): Same.
1007 (pass_walloca::execute): Same.
1008 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1009
1010 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1011
1012 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1013 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1014 >= 3005 to >= 9000.
1015
1016 2018-08-28 Richard Biener <rguenther@suse.de>
1017
1018 PR tree-optimization/87124
1019 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1020 constants before looking up avail.
1021
1022 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1023
1024 PR middle-end/87099
1025 * calls.c (maybe_warn_nonstring_arg): Punt early if
1026 warn_stringop_overflow is zero. Don't call get_range_strlen
1027 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1028 Swap comparison operands to have constants on rhs. Only use
1029 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1030 increment lenrng[0].
1031
1032 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1033
1034 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1035 use of tree_to_shwi. Remove duplicated test for the size being
1036 a whole number of bytes.
1037
1038 2018-08-28 Richard Biener <rguenther@suse.de>
1039
1040 PR tree-optimization/87117
1041 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1042 Handle removed stmt without LHS (GIMPLE_NOP).
1043
1044 2018-08-28 Richard Biener <rguenther@suse.de>
1045
1046 PR tree-optimization/87117
1047 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1048 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1049
1050 2018-08-28 Richard Biener <rguenther@suse.de>
1051
1052 PR tree-optimization/87117
1053 * tree-ssa-pre.c (compute_avail): Do not make expressions
1054 with predicated values available.
1055 (get_expr_value_id): Assert we do not run into predicated value
1056 expressions.
1057
1058 2018-08-28 Richard Biener <rguenther@suse.de>
1059
1060 PR tree-optimization/87117
1061 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1062 get virtual operands.
1063 (get_expr_operands): Handle STRING_CST like other decls.
1064
1065 2018-08-28 Martin Liska <mliska@suse.cz>
1066
1067 * tree.h: Update documentation of fndecl_built_in_p
1068 functions.
1069
1070
1071 2018-08-27 Jeff Law <law@redhat.com>
1072 PR tree-optimization/87110
1073 * tree-ssa-dse.c (compute_trims): Handle non-constant
1074 TYPE_SIZE_UNIT.
1075
1076 2018-08-27 Martin Sebor <msebor@redhat.com>
1077
1078 PR tree-optimization/86914
1079 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1080
1081 2018-08-27 Martin Sebor <msebor@redhat.com>
1082
1083 PR tree-optimization/87112
1084 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1085 the type of the bound argument.
1086
1087 2018-08-27 Jeff Law <law@redhat.com>
1088
1089 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1090 type does not have a TYPE_SIZE_UNIT.
1091
1092 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1093
1094 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1095 with include of backend.h.
1096
1097 2018-08-27 Richard Biener <rguenther@suse.de>
1098
1099 PR tree-optimization/86927
1100 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1101 use const cond reduction code.
1102
1103 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1104
1105 PR tree-optimization/85758
1106 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1107
1108 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1109
1110 PR c++/87091
1111 * diagnostic-show-locus.c (class layout_range): Update for
1112 conversion of show_caret_p to a tri-state.
1113 (layout_range::layout_range): Likewise.
1114 (make_range): Likewise.
1115 (layout::maybe_add_location_range): Likewise.
1116 (layout::should_print_annotation_line_p): Don't show annotation
1117 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1118 (layout::get_state_at_point): Update for conversion of
1119 show_caret_p to a tri-state. Bail out early for
1120 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1121 underlining or source colorization.
1122 (gcc_rich_location::add_location_if_nearby): Update for conversion
1123 of show_caret_p to a tri-state.
1124 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1125 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1126 Likewise.
1127 (selftest::test_one_liner_labels): Likewise.
1128 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1129 conversion of show_caret_p to a tri-state.
1130 * pretty-print.c (text_info::set_location): Likewise.
1131 * pretty-print.h (text_info::set_location): Likewise.
1132 * substring-locations.c (format_warning_n_va): Likewise.
1133 * tree-diagnostic.c (default_tree_printer): Likewise.
1134 * tree-pretty-print.c (newline_and_indent): Likewise.
1135
1136 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1137
1138 PR c++/87091
1139 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1140 line above for line-insertion fix-it hints.
1141 (selftest::test_fixit_insert_containing_newline): Update the
1142 expected results, and add a test with line-numbering enabled.
1143
1144 2018-08-27 Martin Liska <mliska@suse.cz>
1145
1146 PR sanitizer/86962
1147 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1148 params with DECL_HAS_VALUE_EXPR_P.
1149
1150 2018-08-27 Martin Liska <mliska@suse.cz>
1151
1152 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1153 selected expansion strategy.
1154
1155 2018-08-27 Martin Liska <mliska@suse.cz>
1156
1157 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1158 * builtins.c (is_builtin_fn): Likewise.
1159 * attribs.c (diag_attr_exclusions): Use new function
1160 fndecl_built_in_p and remove check for FUNCTION_DECL if
1161 possible.
1162 (builtin_mathfn_code): Likewise.
1163 (fold_builtin_expect): Likewise.
1164 (fold_call_expr): Likewise.
1165 (fold_builtin_call_array): Likewise.
1166 (fold_call_stmt): Likewise.
1167 (set_builtin_user_assembler_name): Likewise.
1168 (is_simple_builtin): Likewise.
1169 * calls.c (gimple_alloca_call_p): Likewise.
1170 (maybe_warn_nonstring_arg): Likewise.
1171 * cfgexpand.c (expand_call_stmt): Likewise.
1172 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1173 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1174 (cgraph_node::verify_node): Likewise.
1175 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1176 (cgraph_node::create_clone): Likewise.
1177 * config/arm/arm.c (arm_insert_attributes): Likewise.
1178 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1179 * dse.c (scan_insn): Likewise.
1180 * expr.c (expand_expr_real_1): Likewise.
1181 * fold-const.c (operand_equal_p): Likewise.
1182 (fold_binary_loc): Likewise.
1183 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1184 * gimple-low.c (lower_stmt): Likewise.
1185 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1186 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1187 * gimple.c (gimple_build_call_from_tree): Likewise.
1188 (gimple_call_builtin_p): Likewise.
1189 (gimple_call_combined_fn): Likewise.
1190 * gimplify.c (gimplify_call_expr): Likewise.
1191 (gimple_boolify): Likewise.
1192 (gimplify_modify_expr): Likewise.
1193 (gimplify_addr_expr): Likewise.
1194 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1195 * ipa-cp.c (determine_versionability): Likewise.
1196 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1197 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1198 * ipa-split.c (visit_bb): Likewise.
1199 (split_function): Likewise.
1200 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1201 * lto-cgraph.c (input_node): Likewise.
1202 * lto-streamer-out.c (write_symbol): Likewise.
1203 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1204 (lower_omp_1): Likewise.
1205 * predict.c (strip_predict_hints): Likewise.
1206 * print-tree.c (print_node): Likewise.
1207 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1208 * trans-mem.c (is_tm_irrevocable): Likewise.
1209 (is_tm_load): Likewise.
1210 (is_tm_simple_load): Likewise.
1211 (is_tm_store): Likewise.
1212 (is_tm_simple_store): Likewise.
1213 (is_tm_abort): Likewise.
1214 (tm_region_init_1): Likewise.
1215 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1216 * tree-cfg.c (verify_gimple_call): Likewise.
1217 (move_stmt_r): Likewise.
1218 (stmt_can_terminate_bb_p): Likewise.
1219 * tree-eh.c (lower_eh_constructs_2): Likewise.
1220 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1221 * tree-inline.c (remap_gimple_stmt): Likewise.
1222 (copy_bb): Likewise.
1223 (estimate_num_insns): Likewise.
1224 (fold_marked_statements): Likewise.
1225 * tree-sra.c (scan_function): Likewise.
1226 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1227 (optimize_stack_restore): Likewise.
1228 (pass_fold_builtins::execute): Likewise.
1229 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1230 (mark_all_reaching_defs_necessary_1): Likewise.
1231 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1232 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1233 (pass_forwprop::execute): Likewise.
1234 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1235 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1236 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1237 * tree-ssa-strlen.c (get_string_length): Likewise.
1238 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1239 (find_func_aliases_for_call): Likewise.
1240 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1241 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1242 * tree-tailcall.c (find_tail_calls): Likewise.
1243 * tree.c (need_assembler_name_p): Likewise.
1244 (free_lang_data_in_decl): Likewise.
1245 (get_call_combined_fn): Likewise.
1246 * ubsan.c (is_ubsan_builtin_p): Likewise.
1247 * varasm.c (incorporeal_function_p): Likewise.
1248 * tree.h (DECL_BUILT_IN): Remove and replace with
1249 fndecl_built_in_p.
1250 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1251 (fndecl_built_in_p): New.
1252
1253 2018-08-27 Martin Liska <mliska@suse.cz>
1254
1255 PR tree-optimization/86847
1256 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1257 Dump also subtree probability.
1258 (switch_decision_tree::do_jump_if_equal): New function.
1259 (switch_decision_tree::emit_case_nodes): Handle special
1260 situations in balanced tree that can be emitted much simpler.
1261 Fix calculation of probabilities that happen in tree expansion.
1262 * tree-switch-conversion.h (struct cluster): Add
1263 is_single_value_p.
1264 (struct simple_cluster): Likewise.
1265 (struct case_tree_node): Add new function has_child.
1266 (do_jump_if_equal): New.
1267
1268 2018-08-27 Martin Liska <mliska@suse.cz>
1269
1270 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1271 Add new argument to bit_test_cluster constructor.
1272 (bit_test_cluster::emit): Set bits really number of values
1273 handlel by a test.
1274 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1275 probability argument.
1276 * tree-switch-conversion.h (struct bit_test_cluster):
1277 Add m_handles_entire_switch.
1278
1279 2018-08-27 Martin Liska <mliska@suse.cz>
1280
1281 PR tree-optimization/86702
1282 * tree-switch-conversion.c (jump_table_cluster::emit):
1283 Make probabilities even for values in jump table
1284 according to number of cases handled.
1285 (switch_decision_tree::compute_cases_per_edge): Pass
1286 argument to reset_out_edges_aux function.
1287 (switch_decision_tree::analyze_switch_statement): Likewise.
1288 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1289 Make it static.
1290
1291 2018-08-27 Martin Liska <mliska@suse.cz>
1292
1293 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1294 cfun argument explicitly.
1295 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1296 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1297 function gimple_switch_default_bb.
1298 (convert_switch_statements):
1299 (expand_builtins):
1300 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1301 * stmt.c (label_to_block_fn): Use label_to_block and pass
1302 cfun argument explicitly and use gimple_switch_label_bb.
1303 (expand_case): Likewise.
1304 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1305 cfun argument explicitly. Likewise.
1306 (make_edges_bb): Likewise.
1307 (make_cond_expr_edges): Likewise.
1308 (get_cases_for_edge): Likewise.
1309 (make_gimple_switch_edges): Likewise.
1310 (label_to_block_fn): Likewise.
1311 (label_to_block): Likewise.
1312 (make_goto_expr_edges): Likewise.
1313 (make_gimple_asm_edges): Likewise.
1314 (main_block_label): Likewise.
1315 (group_case_labels_stmt): Likewise.
1316 (find_taken_edge_computed_goto): Likewise.
1317 (find_taken_edge_switch_expr): Likewise.
1318 (gimple_verify_flow_info): Likewise.
1319 (gimple_redirect_edge_and_branch): Likewise.
1320 (gimple_switch_label_bb): New function.
1321 (gimple_switch_default_bb): Likewise.
1322 (gimple_switch_edge): Likewise.
1323 (gimple_switch_default_edge): Likewise.
1324 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1325 (label_to_block): ... with this.
1326 (gimple_switch_label_bb): New.
1327 (gimple_switch_default_bb): Likewise.
1328 (gimple_switch_edge): Likewise.
1329 (gimple_switch_default_edge): Likewise.
1330 * tree-cfgcleanup.c (convert_single_case_switch): Use
1331 new gimple functions and pass new argument to label_to_block.
1332 (cleanup_control_flow_bb):
1333 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1334 cfun argument explicitly.
1335 (make_eh_edges): Likewise.
1336 (redirect_eh_dispatch_edge): Likewise.
1337 (lower_resx): Likewise.
1338 (lower_eh_dispatch): Likewise.
1339 (maybe_remove_unreachable_handlers): Likewise.
1340 (unsplit_eh): Likewise.
1341 (cleanup_empty_eh): Likewise.
1342 (verify_eh_edges): Likewise.
1343 (verify_eh_dispatch_edge): Likewise.
1344 * tree-ssa-dom.c (record_edge_info): Likewise.
1345 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1346 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1347 (thread_through_normal_block): Likewise.
1348 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1349 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1350 * tree-switch-conversion.c (switch_conversion::collect): Use new
1351 gimple functions.
1352 (switch_conversion::check_final_bb): Likewise.
1353 (switch_conversion::gather_default_values): Pass new argument
1354 to label_to_block.
1355 (switch_conversion::build_constructors): Likewise.
1356 (switch_decision_tree::compute_cases_per_edge): Use new
1357 gimple_switch_edge function.
1358 (switch_decision_tree::analyze_switch_statement): Pass new argument
1359 to label_to_block.
1360 (switch_decision_tree::try_switch_expansion): Use
1361 gimple_switch_default_edge.
1362 * tree-vrp.c (find_switch_asserts): Pass new argument
1363 to label_to_block.
1364 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1365 (vr_values::simplify_switch_using_ranges): Likewise.
1366
1367 2018-08-27 Richard Biener <rguenther@suse.de>
1368
1369 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1370 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1371
1372 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1373 (struct vn_nary_op_s): Add unwind_to member. Add
1374 predicated_values flag and put result into a union together
1375 with a linked list of vn_pval.
1376 (struct vn_ssa_aux): Add name member to make maintaining
1377 a map of SSA name to vn_ssa_aux possible. Remove no longer
1378 needed info, dfsnum, low, visited, on_sccstack, use_processed
1379 and range_info_anti_range_p members.
1380 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1381 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1382 New functions.
1383 (vn_valueize): New global.
1384 (vn_context_bb): Likewise.
1385 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1386 VN_INFO_PTR_INFO): Remove.
1387 * tree-ssa-sccvn.c: ... (rewrite)
1388 (pass_fre::execute): For -O2+ initialize loops and run
1389 RPO VN in optimistic mode (iterating). For -O1 and -Og
1390 run RPO VN in non-optimistic mode.
1391 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1392 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1393 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1394 (rpo-vn-max-loop-depth): Document.
1395 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1396 when valuezing the VUSE signals we walked out of the region.
1397 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1398 (phi_translate): Set VN context block to use for availability
1399 lookup.
1400 (compute_avail): Likewise.
1401 (pre_valueize): New function.
1402 (pass_pre::execute): Adjust to the RPO VN API.
1403
1404 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1405 (propagate_constants_for_unrolling): Remove.
1406 (tree_unroll_loops_completely): Perform value-numbering
1407 on the unrolled bodies loop parent.
1408
1409 2018-08-27 Richard Biener <rguenther@suse.de>
1410
1411 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1412 for partial antic compute.
1413
1414 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1415
1416 PR rtl-optimization/87065
1417 * combine.c (simplify_if_then_else): Formatting fix.
1418 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1419 check.
1420 (known_cond): Don't return const_true_rtx for vector modes. Use
1421 CONST0_RTX instead of const0_rtx. Formatting fixes.
1422
1423 2018-08-27 Martin Liska <mliska@suse.cz>
1424
1425 PR gcov-profile/87069
1426 * gcov.c (process_file): Record files already processed
1427 and warn about a file being processed multiple times.
1428
1429 2018-08-27 Martin Liska <mliska@suse.cz>
1430
1431 PR driver/83193
1432 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1433 Set default values for x_aarch64_*_string strings.
1434 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1435 prefix. For -mabi do not print '=ABI' in help and use
1436 <option_value> format for -msve-vector-bits and -moverride
1437 options.
1438
1439 2018-08-26 Jeff Law <law@redhat.com>
1440
1441 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1442 "cfg.h"
1443
1444 2018-08-26 Marek Polacek <polacek@redhat.com>
1445
1446 PR c++/87029, Implement -Wredundant-move.
1447 * doc/invoke.texi: Document -Wredundant-move.
1448
1449 2018-08-25 Martin Sebor <msebor@redhat.com>
1450
1451 PR tree-optimization/87059
1452 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1453 to the same type as the other.
1454 * fold-const.c (fold_binary_loc): Assert expectation.
1455
1456 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1457
1458 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1459 extraneous parentheses, dead code section and formatting.
1460
1461 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1462
1463 PR c++/87091
1464 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1465 wide enough for jumps in the line-numbering to be visible.
1466 (layout::print_gap_in_line_numbering): New member function.
1467 (layout::calculate_line_spans): When using line numbering, merge
1468 line spans that are only 1 line apart.
1469 (diagnostic_show_locus): When printing line numbers, show gaps in
1470 line numbering directly, rather than printing headers.
1471 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1472 line-numbering with multiple line spans.
1473 (selftest::test_fixit_insert_containing_newline_2): Add test of
1474 line-numbering, in which the spans are close enough to be merged.
1475
1476 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1477
1478 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1479 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1480 * tree-vrp.c (range_is_nonnull): Remove.
1481 (range_includes_zero_p): Accept value_range instead of min/max.
1482 (extract_range_from_binary_expr_1): Do not early bail on
1483 POINTER_PLUS_EXPR.
1484 Use range_includes_zero_p instead of range_is_nonnull.
1485 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1486 of range_is_nonnull.
1487 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1488 special case VR_ANTI_RANGE.
1489 (vrp_finalize): Same.
1490 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1491 instead of min/max.
1492 (range_is_nonnull): Remove.
1493 * vr-values.c (vrp_stmt_computes_nonzero): Use
1494 range_includes_zero_p instead of range_is_nonnull.
1495 (extract_range_basic): Pass value_range to range_includes_zero_p
1496 instead of range_is_nonnull.
1497
1498 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1499
1500 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1501 * emit-rtl.h (rtl_data): Remove return_bnd.
1502 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1503 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1504 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1505 (POINTER_BOUNDS_MODE): Remove definition.
1506 (make_pointer_bounds_mode): Remove.
1507 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1508 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1509 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1510 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1511 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1512 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1513 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1514
1515 * config/i386/i386-modes.def (BND32, BND64): Remove.
1516 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1517 (dbx64_register_map): Ditto.
1518 (svr4_dbx_register_map): Ditto.
1519 (indirect_thunk_bnd_needed): Remove.
1520 (indirect_thunks_bnd_used): Ditto.
1521 (indirect_return_bnd_needed): Ditto.
1522 (indirect_return_via_cx_bnd): Ditto.
1523 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1524 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1525 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1526 (output_indirect_thunk_function): Remove handling of
1527 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1528 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1529 (ix86_save_reg): Remove handling of crtl->return_bnd.
1530 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1531 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1532 and UNSPEC_BNDLX_ADDR.
1533 (ix86_output_indirect_branch_via_reg): Remove handling of
1534 indirect_thunk_prefix_bnd.
1535 (ix86_output_indirect_branch_via_push): Ditto.
1536 (ix86_output_function_return): Ditto.
1537 (ix86_output_indirect_function_return): Ditto.
1538 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1539 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1540 (CALL_USED_REGISTERS): Ditto.
1541 (REG_ALLOC_ORDER): Update for removal of bound registers.
1542 (HI_REGISTER_NAMES): Ditto.
1543 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1544 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1545 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1546 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1547 (FIRST_PSEUDO_REG): Update.
1548 (BND): Remove mode iterator.
1549 * config/i386/predicates.md (bnd_mem_operator): Remove.
1550
1551 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1552
1553 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1554 vectors.
1555
1556 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1557
1558 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1559 the case in which the permute needs only a single element and
1560 repeats for every vector of the result. Extend that case to
1561 handle variable-length vectors.
1562 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1563
1564 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1565
1566 PR debug/79342
1567 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1568 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1569
1570 2018-08-24 Richard Biener <rguenther@suse.de>
1571
1572 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1573 bb_flags_allocated members.
1574 (auto_flag): New RAII class for allocating flags.
1575 (auto_edge_flag): New RAII class for allocating edge flags.
1576 (auto_bb_flag): New RAII class for allocating bb flags.
1577 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1578 flag dynamically.
1579 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1580 in favor of temporarily allocated BB flag.
1581 * hsa-brig.c: Re-order includes.
1582 * hsa-dump.c: Likewise.
1583 * hsa-regalloc.c: Likewise.
1584 * print-rtl.c: Likewise.
1585 * profile-count.c: Likewise.
1586
1587 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1588
1589 PR target/86989
1590 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1591 the TOC register.
1592
1593 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1594
1595 PR 87073/bootstrap
1596 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1597 from wide_int_range_multiplicative_op.
1598
1599 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1600
1601 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1602 "permutaion".
1603
1604 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1605
1606 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1607 to 'expanded'.
1608
1609 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1610
1611 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1612 full GENERIC expression used for replacement.
1613
1614 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1615
1616 * tree-vrp.c (abs_extent_range): Remove.
1617 (extract_range_into_wide_ints): Pass wide ints by reference.
1618 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1619 Pass wide ints by reference in all calls to
1620 extract_range_into_wide_ints.
1621 * wide-int-range.cc (wide_int_range_div): New.
1622 * wide-int-range.h (wide_int_range_div): New.
1623 (wide_int_range_includes_zero_p): New.
1624 (wide_int_range_zero_p): New.
1625
1626 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1627
1628 * config/aarch64/aarch64.md (arches): New enum.
1629 (arch): New enum attr.
1630 (arch_enabled): New attr.
1631 (enabled): Now uses arch_enabled only.
1632 (simd, sve, fp16): Removed attribute.
1633 (fp): Attr now defined in terms of 'arch'.
1634 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1635 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1636 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1637 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1638 attributes into 'arch'.
1639 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1640 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1641 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1642 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1643 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1644 'simd' attribute into 'arch'.
1645 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1646 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1647 Convert use of 'fp' attribute to 'arch'.
1648 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1649 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1650 into 'arch'.
1651 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1652 (different modes) Merge 'fp' and 'simd' into 'arch'.
1653 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1654 'simd' into 'arch'.
1655
1656 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1657
1658 PR rtl-optimization/87026
1659 * expmed.c (canonicalize_comparison): If we can no longer create
1660 pseudoregisters, don't.
1661
1662 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1663
1664 PR target/86951
1665 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1666 prototype.
1667 * config/arm/arm.c (speculation_barrier_libfunc): New static
1668 variable.
1669 (arm_init_libfuncs): Initialize it.
1670 (arm_emit_speculation_barrier): New function.
1671 * config/arm/arm.md (speculation_barrier): Call
1672 arm_emit_speculation_barrier for architectures that do not have
1673 DSB or ISB.
1674 (speculation_barrier_insn): Only match on Armv7 or later.
1675
1676 2018-08-23 Richard Biener <rguenther@suse.de>
1677
1678 PR middle-end/87024
1679 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1680 calls.
1681
1682 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1683
1684 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1685 of single-vector TBLs.
1686 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1687 one input is given.
1688
1689 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1690
1691 PR target/85910
1692 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1693 aarch64_evpc_tbl guard.
1694
1695 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1696
1697 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1698 behaviour.
1699
1700 2018-08-22 Martin Sebor <msebor@redhat.com>
1701
1702 PR middle-end/87052
1703 * tree-pretty-print.c (pretty_print_string): Add argument.
1704 (dump_generic_node): Call to pretty_print_string with string size.
1705
1706 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1707
1708 PR rtl-optimization/86771
1709 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1710 of two SETs into those two SETs, one to be placed at i2, if that SETs
1711 destination is modified between i2 and i3.
1712
1713 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1714
1715 PR tree-optimization/86725
1716 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1717 function.
1718 (vect_analyze_scalar_cycles_1): Check it.
1719
1720 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1721
1722 PR tree-optimization/86725
1723 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1724 an outer loop phi as a double reduction, make sure that the
1725 single user of the phi result is an inner loop phi.
1726
1727 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1728
1729 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1730 grouped stores with gaps to a strided group.
1731
1732 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1733
1734 * tree-vect-stmts.c (get_group_load_store_type)
1735 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1736 first statement in a group.
1737
1738 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1739
1740 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1741 the sequence used in gcc/gcc.c.
1742
1743 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1744
1745 PR other/704
1746 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1747 building it.
1748
1749 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1750
1751 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1752 Darwin10-specific unwinder-shim.
1753 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1754 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1755 New to cater for Darwin10 Rosetta.
1756
1757 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1758
1759 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1760 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1761
1762 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1763
1764 PR bootstrap/81033
1765 PR target/81733
1766 PR target/52795
1767 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1768 (dwarf2out_switch_text_section): Generate a local label for the
1769 second function sub-section and apply it as the second FDE start
1770 label.
1771 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1772 second sub-section start.
1773
1774 2018-08-22 Richard Biener <rguenther@suse.de>
1775
1776 PR tree-optimization/86988
1777 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1778
1779 2018-08-22 Richard Biener <rguenther@suse.de>
1780
1781 PR tree-optimization/86945
1782 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1783
1784 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1785
1786 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1787 a comment about how uses of r2 for .sdata2 come about.
1788
1789 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1790
1791 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1792
1793 2018-08-21 Marek Polacek <polacek@redhat.com>
1794
1795 PR c++/86981, Implement -Wpessimizing-move.
1796 * doc/invoke.texi: Document -Wpessimizing-move.
1797
1798 2018-08-21 Jan Hubicka <jh@suse.cz>
1799
1800 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1801 * tree.h (is_redundant_typedef): Remove.
1802 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1803
1804 2018-08-21 Jan Hubicka <jh@suse.cz>
1805
1806 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1807 when possible.
1808
1809 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1810
1811 * expmed.c (extract_low_bits): Reject invalid subregs early.
1812
1813 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1814
1815 PR middle-end/86121
1816 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1817 behaviour.
1818
1819 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1820
1821 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1822 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1823 * config/vxworks.c: Likewise.
1824
1825 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1826
1827 * config/vxworks.c: Set targetm.have_ctors_dtors
1828 if HAVE_INITFINI_ARRAY_SUPPORT.
1829 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1830 if HAVE_INITFINI_ARRAY_SUPPORT.
1831
1832 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1833
1834 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1835 default search path for VxWorks < 7.
1836
1837 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1838
1839 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1840 (get_format_string): Refer to c_getstr.
1841
1842 2018-08-21 Tom de Vries <tdevries@suse.de>
1843
1844 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1845 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1846 (debuginfo_early_stop): Declare.
1847 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1848 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1849 (debuginfo_early_stop): New function.
1850 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1851 and debuginfo_early_stop.
1852 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1853 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1854 (general_init): Call debuginfo_early_init.
1855 (finalize): Call debuginfo_fini.
1856 (do_compile): Call debuginfo_init.
1857 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1858 -fdump-early-debug.
1859 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1860
1861 2018-08-21 Tom de Vries <tdevries@suse.de>
1862
1863 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1864 flag_dump_noaddr and flag_dump_unnumbered.
1865
1866 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1867
1868 * wide-int-range.cc (wide_int_range_abs): New.
1869 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1870 * wide-int-range.h (wide_int_range_abs): New.
1871 (wide_int_range_min_max): New.
1872 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1873 case to call wide_int_range_abs.
1874 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1875 (extract_range_from_abs_expr): Delete.
1876
1877 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1878
1879 PR target/87033
1880 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1881 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1882 for indexed loads.
1883
1884 2018-08-20 Nathan Sidwell <nathan@acm.org>
1885 Jeff Law <law@redhat.com>
1886
1887 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1888 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1889
1890 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1891
1892 PR other/84889
1893 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1894 (decl_attributes): Likewise.
1895 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1896 instance.
1897 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1898 * diagnostic-core.h (class auto_diagnostic_group): New class.
1899 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1900 (diagnostic_report_diagnostic): Handle the first diagnostics within
1901 a group.
1902 (emit_diagnostic): Add auto_diagnostic_group instance.
1903 (inform): Likewise.
1904 (inform_n): Likewise.
1905 (warning): Likewise.
1906 (warning_at): Likewise.
1907 (warning_n): Likewise.
1908 (pedwarn): Likewise.
1909 (permerror): Likewise.
1910 (error): Likewise.
1911 (error_n): Likewise.
1912 (error_at): Likewise.
1913 (sorry): Likewise.
1914 (fatal_error): Likewise.
1915 (internal_error): Likewise.
1916 (internal_error_no_backtrace): Likewise.
1917 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1918 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1919 * diagnostic.h (struct diagnostic_context): Add fields
1920 "diagnostic_group_nesting_depth",
1921 "diagnostic_group_emission_count", "begin_group_cb",
1922 "end_group_cb".
1923 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1924 Add auto_diagnostic_group instance(s).
1925 (find_explicit_erroneous_behavior): Likewise.
1926 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1927 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1928 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1929 (gimplify_va_arg_expr): Likewise.
1930 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1931 (HSA_SORRY_AT): Likewise.
1932 * ipa-devirt.c (compare_virtual_tables): Likewise.
1933 (warn_odr): Likewise.
1934 * multiple_target.c (expand_target_clones): Likewise.
1935 * opts-common.c (cmdline_handle_error): Likewise.
1936 * reginfo.c (globalize_reg): Likewise.
1937 * substring-locations.c (format_warning_n_va): Likewise.
1938 * tree-inline.c (expand_call_inline): Likewise.
1939 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1940 * tree-ssa-loop-niter.c
1941 (do_warn_aggressive_loop_optimizations): Likewise.
1942 * tree-ssa-uninit.c (warn_uninit): Likewise.
1943 * tree.c (warn_deprecated_use): Likewise.
1944
1945 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 PR target/87014
1948 * config/i386/i386.md (eh_return): Always update EH return
1949 address in word_mode.
1950
1951 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1952
1953 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1954 TARGET_SPLIT_COMPLEX_ARG is defined.
1955
1956 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1957
1958 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1959
1960 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1961
1962 PR target/86984
1963 * expr.c (expand_assignment): Assert that bitpos is positive.
1964 (store_field): Likewise
1965 (expand_expr_real_1): Make sure that bitpos is positive.
1966 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1967 integer overflow.
1968
1969 2018-08-20 Nathan Sidwell <nathan@acm.org>
1970
1971 * Makefile.in (CPP_ID_DATA_H): Delete.
1972 (CPP_INTERNAL_H): Don't add it.
1973 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1974 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1975
1976 2018-08-20 Richard Biener <rguenther@suse.de>
1977
1978 PR tree-optimization/78655
1979 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1980 pointer + offset nonnull if either operand is nonnull work.
1981
1982 2018-08-20 Tom de Vries <tdevries@suse.de>
1983
1984 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1985 unless the referenced die describes the added property using
1986 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1987 Otherwise, add a DW_AT_location to the referenced die.
1988
1989 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1990
1991 PR target/86994
1992 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1993 register_operand when calling ix86_set_reg_reg_cost.
1994 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1995 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1996 predicate and to 1 otherwise.
1997
1998 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1999
2000 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2001 emit a diagnostic that it is not supported and reset the option.
2002 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2003 supported and consume the option. (ASM_FINAL_SPEC): New.
2004
2005 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2006
2007 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2008 a sentence.
2009
2010 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2011
2012 C-SKY port: Documentation
2013
2014 * doc/extend.texi (C-SKY Function Attributes): New section.
2015 * doc/invoke.texi (Option Summary): Add C-SKY options.
2016 (C-SKY Options): New section.
2017 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2018
2019 2018-08-17 Jojo <jijie_rong@c-sky.com>
2020 Huibin Wang <huibin_wang@c-sky.com>
2021 Sandra Loosemore <sandra@codesourcery.com>
2022 Chung-Lin Tang <cltang@codesourcery.com>
2023
2024 C-SKY port: Backend implementation
2025
2026 * config/csky/*: New.
2027 * common/config/csky/*: New.
2028
2029 2018-08-17 Jojo <jijie_rong@c-sky.com>
2030 Huibin Wang <huibin_wang@c-sky.com>
2031 Sandra Loosemore <sandra@codesourcery.com>
2032 Chung-Lin Tang <cltang@codesourcery.com>
2033 Andrew Jenner <andrew@codesourcery.com>
2034
2035 C-SKY port: Configury
2036
2037 * config.gcc (csky-*-*): New.
2038 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2039 * configure: Regenerated.
2040
2041 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2042
2043 * dump-context.h: Include "dumpfile.h".
2044 (dump_context::dump_printf_va): Convert final param from va_list
2045 to va_list *. Convert from ATTRIBUTE_PRINTF to
2046 ATTRIBUTE_GCC_DUMP_PRINTF.
2047 (dump_context::dump_printf_loc_va): Likewise.
2048 * dumpfile.c: Include "stringpool.h".
2049 (make_item_for_dump_printf_va): Delete.
2050 (make_item_for_dump_printf): Delete.
2051 (class dump_pretty_printer): New class.
2052 (dump_pretty_printer::dump_pretty_printer): New ctor.
2053 (dump_pretty_printer::emit_items): New member function.
2054 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2055 function.
2056 (dump_pretty_printer::emit_item): New member function.
2057 (dump_pretty_printer::stash_item): New member function.
2058 (dump_pretty_printer::format_decoder_cb): New member function.
2059 (dump_pretty_printer::decode_format): New member function.
2060 (dump_context::dump_printf_va): Reimplement in terms of
2061 dump_pretty_printer.
2062 (dump_context::dump_printf_loc_va): Convert final param from va_list
2063 to va_list *.
2064 (dump_context::begin_scope): Reimplement call to
2065 make_item_for_dump_printf.
2066 (dump_printf): Update for change to dump_printf_va.
2067 (dump_printf_loc): Likewise.
2068 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2069 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2070 with %T, %E, and %G.
2071 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2072 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2073 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2074 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2075 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2076 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2077 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2078 within a dump_printf_loc call to "%wu".
2079 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2080 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2081 missing space after "=".
2082 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2083 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2084 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2085 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2086 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2087 duplicate "vectorized" from message.
2088
2089 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2090
2091 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2092 polyNxK_t element's TYPE_STRING_FLAG.
2093
2094 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2095
2096 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2097 (they were unnamed before). Fix comments.
2098
2099 2018-08-17 Nathan Sidwell <nathan@acm.org>
2100
2101 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2102
2103 2018-08-17 Richard Biener <rguenther@suse.de>
2104
2105 PR tree-optimization/86841
2106 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2107
2108 2018-08-17 Martin Liska <mliska@suse.cz>
2109
2110 * common.opt: Remove Warn, Init and Report for options with
2111 Ignore/Deprecated flag. Warning is done automatically for
2112 Deprecated flags.
2113 * config/i386/i386.opt: Likewise.
2114 * config/ia64/ia64.opt: Likewise.
2115 * config/rs6000/rs6000.opt: Likewise.
2116 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2117 Remove usage of flag_check_pointer_bounds.
2118 * lto-wrapper.c (merge_and_complain): Do not handle
2119 OPT_fcheck_pointer_bounds.
2120 (append_compiler_options): Likewise.
2121 * opt-functions.awk: Do not handle Deprecated.
2122 * optc-gen.awk: Check that Var, Report and Init are not
2123 used for an option with Ignore/Deprecated flag.
2124 * opts-common.c (decode_cmdline_option): Do not report
2125 CL_ERR_DEPRECATED.
2126 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2127 options.
2128 * opts.h (struct cl_option): Remove cl_deprecated flag.
2129 (CL_ERR_DEPRECATED): Remove error enum value.
2130
2131 2018-08-17 Richard Biener <rguenther@suse.de>
2132
2133 PR middle-end/86505
2134 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2135 across a va-arg-pack using call adjust its return value accordingly.
2136
2137 2018-08-16 Martin Sebor <msebor@redhat.com>
2138
2139 PR tree-optimization/86853
2140 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2141 (struct fmtresult): Add member and initialize it in ctors.
2142 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2143 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2144 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2145 (parse_directive): Handle %C same as %c.
2146 (sprintf_dom_walker::compute_format_length): Adjust.
2147 (is_call_safe): Adjust.
2148
2149 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2150
2151 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2152 for determining how to count the elements.
2153 * builtins.h (c_strlen): Adjust prototype.
2154 * expr.c (string_constant): Add new parameter mem_size.
2155 Set *mem_size appropriately.
2156 * expr.h (string_constant): Adjust protoype.
2157 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2158 * gimple-fold.h (get_range_strlen): Adjust prototype.
2159 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2160 (format_string): Call get_string_length with eltsize.
2161
2162 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2163
2164 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2165 to emit the span, rather than setting it as the prefix.
2166
2167 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2168
2169 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2170 "margin_char" parameter, defaulting to space. Use it in place
2171 of pp_space for the initial part of the margin.
2172 (layout::print_leading_fixits): Use '+' when filling the margin
2173 of line-insertion fix-it hints.
2174
2175 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2176
2177 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2178 Delete.
2179
2180 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2181
2182 * config/rs6000/altivec.md: Don't set length attribute to the default
2183 value.
2184 * config/rs6000/darwin.md: Ditto.
2185 * config/rs6000/dfp.md: Ditto.
2186 * config/rs6000/htm.md: Ditto.
2187 * config/rs6000/rs6000.md: Ditto.
2188 * config/rs6000/sync.md: Ditto.
2189 * config/rs6000/vsx.md: Ditto.
2190
2191 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2192
2193 * config/rs6000/altivec.md: Don't set length attribute to the default
2194 value, for branch instructions.
2195 * config/rs6000/darwin.md: Ditto.
2196 * config/rs6000/rs6000.md: Ditto.
2197
2198 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2199
2200 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2201 (unnamed conditional branch define_insn): Set length to 4 or 8
2202 depending on offset.
2203 (<bd>_<mode>): Similar, for alternative 0.
2204 (<bd>tf_<mode>): Ditto.
2205
2206 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2207
2208 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2209
2210 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2211
2212 * doc/rtl.texi: Replace old RTX class names with new names.
2213
2214
2215 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2216
2217 * expmed.h (canonicalize_comparison): New declaration.
2218 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2219 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2220 * optabs.c (prepare_cmp_insn): Likewise.
2221 * rtl.h (unsigned_condition_p): New function which checks if a
2222 comparison operator is unsigned.
2223
2224 2018-08-16 Nathan Sidwell <nathan@acm.org>
2225
2226 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2227 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2228
2229 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2230
2231 PR target/84711
2232 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2233 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2234 (mov<mov>): ..this and enable unconditionally.
2235
2236 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2237
2238 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2239
2240 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2241
2242 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2243 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2244 "Common" with "Target".
2245
2246 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2247
2248 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2249 * doc/invoke.texi (mmitigate-rop): Remove.
2250 * config/i386/i386.c: Do not include "regrename.h".
2251 (ix86_rop_should_change_byte_p, reg_encoded_number)
2252 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2253 Remove.
2254 (ix86_reorg): Remove call to ix86_mitigate_rop.
2255 * config/i386/i386.md (attr "modrm_class"): Remove.
2256 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2257 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2258 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2259
2260 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2261
2262 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2263 allow folding of mergeh() and mergel() for the float and double types.
2264 (fold_mergehl_helper): Rework to handle building a permute tree
2265 for float vectors.
2266
2267 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2268
2269 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2270 for TARGET_SSE.
2271
2272 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2273
2274 * common.opt (fdiagnostics-show-labels): New option.
2275 * diagnostic-show-locus.c (class layout_range): Add field
2276 "m_label".
2277 (class layout): Add field "m_show_labels_p".
2278 (layout_range::layout_range): Add param "label" and use it to
2279 initialize m_label.
2280 (make_range): Pass in NULL for new "label" param of layout_range's
2281 ctor.
2282 (layout::layout): Initialize m_show_labels_p.
2283 (layout::maybe_add_location_range): Pass in loc_range->m_label
2284 when constructing layout_range instances.
2285 (struct line_label): New struct.
2286 (layout::print_any_labels): New member function.
2287 (layout::print_line): Call it if label-printing is enabled.
2288 (selftest::test_one_liner_labels): New test.
2289 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2290 * diagnostic.c (diagnostic_initialize): Initialize
2291 context->show_labels_p.
2292 * diagnostic.h (struct diagnostic_context): Add field
2293 "show_labels_p".
2294 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2295 -fno-diagnostics-show-labels.
2296 * dwarf2out.c (gen_producer_string): Add
2297 OPT_fdiagnostics_show_labels to the ignored options.
2298 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2299 param.
2300 (gcc_rich_location::maybe_add_expr): Likewise.
2301 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2302 label" param, defaulting to NULL.
2303 (gcc_rich_location::add_expr): Add "label" param.
2304 (gcc_rich_location::maybe_add_expr): Likewise.
2305 (class text_range_label): New class.
2306 (class range_label_for_type_mismatch): New class.
2307 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2308 of format_warning_va.
2309 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2310 * lto-wrapper.c (merge_and_complain): Add
2311 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2312 (append_compiler_options): Likewise to the dropped options.
2313 (append_diag_options): Likewise to the passed-on options.
2314 * opts.c (common_handle_option): Handle the new option.
2315 * selftest-diagnostic.c
2316 (test_diagnostic_context::test_diagnostic_context): Enable
2317 show_labels_p.
2318 * substring-locations.c: Include "gcc-rich-location.h".
2319 (format_warning_n_va): Add "fmt_label" and "param_label" params
2320 and use them as appropriate.
2321 (format_warning_va): Add "fmt_label" and "param_label" params,
2322 passing them on to format_warning_n_va.
2323 (format_warning_at_substring): Likewise.
2324 (format_warning_at_substring_n): Likewise.
2325 * substring-locations.h (format_warning_va): Add "fmt_label" and
2326 "param_label" params.
2327 (format_warning_n_va): Likewise.
2328 (format_warning_at_substring): Likewise.
2329 (format_warning_at_substring_n): Likewise.
2330 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2331
2332 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2333
2334 PR testsuite/86519
2335 * builtins.c (expand_builtin_memcmp): Do not expand the call
2336 when overflow is detected.
2337
2338 2018-08-15 Martin Sebor <msebor@redhat.com>
2339
2340 PR tree-optimization/71625
2341 * config/aarch64/aarch64-builtins.c
2342 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2343
2344 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2345
2346 * config/s390/s390.c (s390_reorg): Remove loop.
2347
2348 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2349
2350 * config/darwin.c
2351 (darwin_function_switched_text_sections): Delete.
2352 * gcc/config/darwin.h
2353 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2354
2355 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2356
2357 PR target/81685
2358 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2359 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2360 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2361
2362 2018-08-15 Martin Liska <mliska@suse.cz>
2363
2364 PR tree-optimization/86925
2365 * predict.c (expr_expected_value_1): When taking
2366 later predictor, assign also probability.
2367 Use fold_build2_initializer_loc in order to fold
2368 the expression in -frounding-math.
2369
2370 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2371
2372 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2373 patterns.
2374 (expand_vec_perm_1): Try the new method.
2375
2376 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2377
2378 PR target/86547
2379 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2380 Check whether lra_live_max_point is 0 before dividing.
2381
2382 2018-08-14 Martin Sebor <msebor@redhat.com>
2383
2384 PR tree-optimization/86650
2385 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2386 (vrp_prop::check_mem_ref): Same.
2387
2388 2018-08-13 Liu Hao <lh_mouse@126.com>
2389
2390 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2391 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2392 and clear it thereafter, as it only works for DBCS.
2393
2394 2018-08-13 Liu Hao <lh_mouse@126.com>
2395
2396 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2397 handle returned by _get_osf_handle().
2398
2399 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2400
2401 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2402 for folding vec_perm.
2403
2404 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2405
2406 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2407 Add support for gimple-folding of vec_pack() and vec_unpack()
2408 intrinsics.
2409
2410 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2411
2412 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2413 vec_xst variants to the list.
2414 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2415 vector loads and stores.
2416
2417 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2418
2419 * config.gcc (rs6000-ibm-aix4.x): Delete.
2420 (rs6000-ibm-aix5.1): Delete.
2421 (rs6000-ibm-aix5.2): Delete.
2422 (rs6000-ibm-aix5.3): Delete.
2423 * config/rs6000/aix43.h: Delete.
2424 * config/rs6000/aix51.h: Delete.
2425 * config/rs6000/aix52.h: Delete.
2426 * config/rs6000/t-aix43: Delete.
2427
2428 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2429
2430 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2431 New function.
2432 (s390_decompose_address): Factor out constant pool ref
2433 decomposition.
2434
2435 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2436
2437 * config/nds32/nds32-predicates.c
2438 (nds32_can_use_bclr_p): Change return type as bool.
2439 (nds32_can_use_bset_p): Ditto.
2440 (nds32_can_use_btgl_p): Ditto.
2441 (nds32_can_use_bitci_p): Ditto.
2442 * config/nds32/nds32-protos.h
2443 (nds32_can_use_bclr_p): Change declaration.
2444 (nds32_can_use_bset_p): Ditto.
2445 (nds32_can_use_btgl_p): Ditto.
2446 (nds32_can_use_bitci_p): Ditto.
2447
2448 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2449
2450 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2451 Support -msched-prolog-epilog option.
2452 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2453
2454 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2455
2456 * common/config/nds32/nds32-common.c
2457 (nds32_option_optimization_table): Enalbe -malways-align.
2458
2459 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2460
2461 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2462 extra_headers.
2463 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2464 OPT_misr_secure_ case.
2465 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2466 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2467 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2468 secure attribute.
2469 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2470 (nds32_isr_info): New field security_level.
2471 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2472 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2473 * config/nds32/nds32.opt (misr-secure): New option.
2474 * config/nds32/nds32_init.inc: New file.
2475 * config/nds32/nds32_isr.h: New file.
2476
2477 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2478
2479 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2480 Update comment for atomic instructions.
2481 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2482 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2483 Remove.
2484 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2485 load for __ATOMIC_SEQ_CST model.
2486 (atomic_loaddi_1): Remove float register target.
2487 (atomic_storedi): Handle CONST_INT values.
2488 (atomic_storedi_1): Remove float register source. Add special case
2489 for zero value.
2490 (memory_barrier): New expander and insn.
2491
2492 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2493
2494 PR tree-optimization/86835
2495 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2496 new_stmt after def_gsi, make sure to insert new_square_stmt after
2497 that stmt, not 2 stmts before it.
2498
2499 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2500
2501 PR target/82418
2502 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2503 instead of SWI48.
2504
2505 2018-08-10 Martin Liska <mliska@suse.cz>
2506
2507 PR target/83610
2508 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2509 function type.
2510 * builtins.c (expand_builtin_expect_with_probability):
2511 New function.
2512 (expand_builtin_expect_with_probability): New function.
2513 (build_builtin_expect_predicate): Add new argumnet probability
2514 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2515 (fold_builtin_expect):
2516 (fold_builtin_2):
2517 (fold_builtin_3):
2518 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2519 * builtins.h (fold_builtin_expect): Set new argument.
2520 * doc/extend.texi: Document __builtin_expect_with_probability.
2521 * doc/invoke.texi: Likewise.
2522 * gimple-fold.c (gimple_fold_call): Pass new argument.
2523 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2524 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2525 * predict.c (get_predictor_value): New function.
2526 (expr_expected_value): Add new argument probability. Assume
2527 that predictor and probability are always non-null.
2528 (expr_expected_value_1): Likewise. For __builtin_expect and
2529 __builtin_expect_with_probability set probability. Handle
2530 combination in binary expressions.
2531 (tree_predict_by_opcode): Simplify code by simply calling
2532 get_predictor_value.
2533 (pass_strip_predict_hints::execute): Add handling of
2534 BUILT_IN_EXPECT_WITH_PROBABILITY.
2535 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2536 new predictor.
2537 * tree.h (DECL_BUILT_IN_P): New function.
2538
2539 2018-08-10 Martin Liska <mliska@suse.cz>
2540
2541 PR tree-optimization/85799
2542 * passes.def: Add argument for pass_strip_predict_hints.
2543 * predict.c (class pass_strip_predict_hints): Add new argument
2544 early_p.
2545 (strip_predictor_early): New function.
2546 (pass_strip_predict_hints::execute): Call the function to
2547 strip predictors.
2548 (strip_predict_hints): New function.
2549 * predict.def: Fix comment.
2550
2551 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2552
2553 * Makefile.in: Clarify which tm.texi to copy over to assert the
2554 right to grant a GFDL license for all.
2555
2556 2018-08-09 Jeff Law <law@redhat.com>
2557
2558 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2559 unused variable.
2560
2561 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2562
2563 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2564 prototype.
2565
2566 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2567
2568 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2569 reductions for variable-length vectors.
2570
2571 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2572
2573 PR other/84889
2574 * common.opt (fdiagnostics-show-line-numbers): New option.
2575 * diagnostic-show-locus.c (class layout): Add fields
2576 "m_show_line_numbers_p" and "m_linenum_width";
2577 (num_digits): New function.
2578 (test_num_digits): New function.
2579 (layout::layout): Initialize new fields. Update m_x_offset
2580 logic to handle any left margin.
2581 (layout::print_source_line): Print line number when requested.
2582 (layout::start_annotation_line): New member function.
2583 (layout::print_annotation_line): Call it.
2584 (layout::print_leading_fixits): Likewise.
2585 (layout::print_trailing_fixits): Likewise. Update calls to
2586 move_to_column for new parameter.
2587 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2588 it to potentially call start_annotation_line.
2589 (layout::show_ruler): Call start_annotation_line.
2590 (selftest::test_line_numbers_multiline_range): New selftest.
2591 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2592 and selftest::test_line_numbers_multiline_range.
2593 * diagnostic.c (diagnostic_initialize): Initialize
2594 show_line_numbers_p.
2595 * diagnostic.h (struct diagnostic_context): Add field
2596 "show_line_numbers_p".
2597 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2598 -fno-diagnostics-show-line-numbers.
2599 * dwarf2out.c (gen_producer_string): Add
2600 OPT_fdiagnostics_show_line_numbers to the ignored options.
2601 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2602 one setting" options.
2603 (append_compiler_options): Likewise to the dropped options.
2604 (append_diag_options): Likewise to the passed-on options.
2605 * opts.c (common_handle_option): Handle the new option.
2606 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2607
2608 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2609
2610 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2611 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2612 third argument of type "const signed char" to descriptions of
2613 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2614 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2615 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2616 __builtin_bcdsub_ov functions.
2617
2618 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2619
2620 PR tree-optimization/86858
2621 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2622 flow_bb_inside_loop_p calls.
2623
2624 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2625
2626 PR tree-optimization/86871
2627 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2628 instead of gimple_assign_lhs.
2629
2630 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2631
2632 PR target/86887
2633 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2634 register constraint to operand 0.
2635 (add<mode>3_carryinC): Likewise.
2636 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2637
2638 2018-08-09 Martin Liska <mliska@suse.cz>
2639
2640 PR c/86895
2641 * common.opt: Remove extra line.
2642
2643 2018-08-09 Martin Liska <mliska@suse.cz>
2644
2645 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2646 at the end of a line, make first letter capital and end up
2647 a sentence with a dot.
2648 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2649 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2650 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2651 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2652 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2653 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2654 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2655 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2656 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2657 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2658 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2659 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2660 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2661 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2662 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2663 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2664 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2665 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2666
2667 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2668
2669 PR target/84332
2670 * config/s390/s390.c (s390_option_override_internal): Reduce the
2671 stack-clash-protection-probe-interval param if it would be too big
2672 for z900.
2673
2674 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2675
2676 PR target/46179
2677 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2678 * config/m68k/m68k.c (handle_move_double): Don't call
2679 m68k_final_prescan_insn.
2680 (m68k_adjust_decorated_operand): Renamed from
2681 m68k_final_prescan_insn, remove first and third operand and
2682 simplify.
2683 (print_operand): Call it.
2684 (print_operand_address): Call it.
2685
2686 2018-08-08 Nathan Sidwell <nathan@acm.org>
2687
2688 * diagnostic.c (diagnostic_report_current_module): Use
2689 linemap_included_from & linemap_included_from_linemap.
2690
2691 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2692
2693 * config/aarch64/aarch64-cores.def: Add phecda core.
2694 * config/aarch64/aarch64-tune.md: Regenerate.
2695 * doc/invoke.texi: Add phecda core.
2696
2697 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2698
2699 PR target/85295
2700 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2701 definitions.
2702 * config/s390/s390.md ("movti"): Add more alternatives for
2703 constant to GPR copies.
2704
2705 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2706
2707 * config/s390/s390.c: Fix whitespace damage throughout the file.
2708 * config/s390/s390.h: Likewise.
2709 * config/s390/tpf.h: Likewise.
2710
2711 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2712
2713 * config/s390/s390.c (s390_loadrelative_operand_p):
2714 Remove TARGET_CPU_ZARCH usages.
2715 (s390_rtx_costs): Likewise.
2716 (s390_legitimate_constant_p): Likewise.
2717 (s390_cannot_force_const_mem): Likewise.
2718 (legitimate_reload_constant_p): Likewise.
2719 (s390_preferred_reload_class): Likewise.
2720 (legitimize_pic_address): Likewise.
2721 (legitimize_tls_address): Likewise.
2722 (s390_split_branches): Removed.
2723 (s390_add_execute): Removed.
2724 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2725 (s390_mainpool_start): Likewise.
2726 (s390_mainpool_finish): Likewise.
2727 (s390_mainpool_cancel): Removed.
2728 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2729 (s390_chunkify_cancel): Likewise.
2730 (s390_return_addr_rtx): Likewise.
2731 (s390_register_info): Remove split_branches_pending_p uages.
2732 (s390_optimize_register_info): Likewise.
2733 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2734 split_branches_pending_p usages.
2735 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2736 (s390_load_got): Likewise.
2737 (s390_expand_split_stack_prologue): Likewise.
2738 (output_asm_nops): Likewise.
2739 (s390_function_profiler): Likewise.
2740 (s390_emit_call): Likewise.
2741 (s390_conditional_register_usage): Likewise.
2742 (s390_optimize_prologue): Likewise.
2743 (s390_reorg): Remove TARGET_CPU_ZARCH and
2744 split_branches_pending_p usages.
2745 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2746 usages.
2747 (s390_output_indirect_thunk_function): Likewise.
2748 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2749 (TARGET_CPU_ZARCH_P): Removed.
2750 (struct machine_function): Remove split_branches_pending_p.
2751 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2752
2753 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2754
2755 * common/config/s390/s390-common.c (processor_flags_table):
2756 Remove flags.
2757 * config.gcc: Remove with_arch/with_tune support.
2758 * config/s390/2064.md: Remove cpu attribute comparisons.
2759 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2760 Remove MTN.
2761 * config/s390/linux.h (ASM_SPEC):
2762 Remove -march support.
2763 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2764 Use a table to get an arch level.
2765 * config/s390/s390-opts.h (enum processor_type):
2766 Remove enum values.
2767 * config/s390/s390.c
2768 (processor_table): Remove entries, add arch_level values.
2769 (s390_issue_rate): Remove cases.
2770 (s390_option_override): Adjust
2771 s390_option_override_internal() call.
2772 (s390_option_override_internal): Remove deprecation warning.
2773 (s390_valid_target_attribute_tree): Adjust
2774 s390_option_override_internal() call.
2775 * config/s390/s390.h (struct s390_processor):
2776 Share with s390-c.c, add arch_level field.
2777 * config/s390/s390.md:
2778 Remove occurrences in cpu attribute.
2779 * config/s390/s390.opt: Remove -march/-mtune support.
2780 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2781 * doc/invoke.texi: Remove deprecation warning.
2782
2783 2018-08-08 Luis Machado <luis.machado@linaro.org>
2784
2785 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2786 global.
2787 (qdf24xx_tunings): Set vector cost structure to
2788 qdf24xx_vector_cost.
2789
2790 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2791 <register_sextend>: Set to 3.
2792
2793 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2794
2795 PR target/86838
2796 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2797 * config/aarch64/aarch64-simd.md
2798 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2799 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2800 (aarch64_frecpx<mode>): ...this new pattern.
2801 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2802 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2803
2804 2018-08-07 Martin Liska <mliska@suse.cz>
2805
2806 PR middle-end/83023
2807 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2808 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2809 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2810 * doc/extend.texi: Document that malloc attribute adds
2811 hit to compiler.
2812
2813 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2814
2815 PR target/86785
2816 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2817 Define to speculation_safe_value_not_needed.
2818
2819 2018-08-06 Jeff Law <law@redhat.com>
2820
2821 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2822 the vr_values instance to cprop_into_stmt.
2823 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2824 (cprop_operand): Also query EVRP to determine if OP is a constant.
2825
2826 2018-08-06 Nathan Sidwell <nathan@acm.org>
2827
2828 * diagnostic.c (diagnostic_report_current_module): Reroll
2829 included-at loop. Translate text.
2830
2831 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2832
2833 * function-tests.c (selftest::test_expansion_to_rtl): Call
2834 free_after_compilation.
2835
2836 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2837
2838 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2839
2840 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2841
2842 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2843 loops with memory block operations from getting unrolled.
2844
2845 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2846
2847 PR target/86807
2848 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2849 Define to speculation_safe_value_not_needed.
2850
2851 2018-08-06 Jeff Law <law@redhat.com>
2852
2853 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2854 assert.
2855
2856 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2857
2858 PR target/86662
2859 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2860 with all enabled __intN types.
2861
2862 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2863
2864 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2865
2866 * alias.c (record_set): Check for clobber high.
2867 * cfgexpand.c (expand_gimple_stmt): Likewise.
2868 * combine-stack-adj.c (single_set_for_csa): Likewise.
2869 * combine.c (find_single_use_1): Likewise.
2870 (set_nonzero_bits_and_sign_copies): Likewise.
2871 (get_combine_src_dest): Likewise.
2872 (is_parallel_of_n_reg_sets): Likewise.
2873 (try_combine): Likewise.
2874 (record_dead_and_set_regs_1): Likewise.
2875 (reg_dead_at_p_1): Likewise.
2876 (reg_dead_at_p): Likewise.
2877 * dce.c (deletable_insn_p): Likewise.
2878 (mark_nonreg_stores_1): Likewise.
2879 (mark_nonreg_stores_2): Likewise.
2880 * df-scan.c (df_find_hard_reg_defs): Likewise.
2881 (df_uses_record): Likewise.
2882 (df_get_call_refs): Likewise.
2883 * dwarf2out.c (mem_loc_descriptor): Likewise.
2884 * haifa-sched.c (haifa_classify_rtx): Likewise.
2885 * ira-build.c (create_insn_allocnos): Likewise.
2886 * ira-costs.c (scan_one_insn): Likewise.
2887 * ira.c (equiv_init_movable_p): Likewise.
2888 (rtx_moveable_p): Likewise.
2889 (interesting_dest_for_shprep): Likewise.
2890 * jump.c (mark_jump_label_1): Likewise.
2891 * postreload-gcse.c (record_opr_changes): Likewise.
2892 * postreload.c (reload_cse_simplify): Likewise.
2893 (struct reg_use): Add source expr.
2894 (reload_combine): Check for clobber high.
2895 (reload_combine_note_use): Likewise.
2896 (reload_cse_move2add): Likewise.
2897 (move2add_note_store): Likewise.
2898 * print-rtl.c (print_pattern): Likewise.
2899 * recog.c (decode_asm_operands): Likewise.
2900 (store_data_bypass_p): Likewise.
2901 (if_test_bypass_p): Likewise.
2902 * regcprop.c (kill_clobbered_value): Likewise.
2903 (kill_set_value): Likewise.
2904 * reginfo.c (reg_scan_mark_refs): Likewise.
2905 * reload1.c (maybe_fix_stack_asms): Likewise.
2906 (eliminate_regs_1): Likewise.
2907 (elimination_effects): Likewise.
2908 (mark_not_eliminable): Likewise.
2909 (scan_paradoxical_subregs): Likewise.
2910 (forget_old_reloads_1): Likewise.
2911 * reorg.c (find_end_label): Likewise.
2912 (try_merge_delay_insns): Likewise.
2913 (redundant_insn): Likewise.
2914 (own_thread_p): Likewise.
2915 (fill_simple_delay_slots): Likewise.
2916 (fill_slots_from_thread): Likewise.
2917 (dbr_schedule): Likewise.
2918 * resource.c (update_live_status): Likewise.
2919 (mark_referenced_resources): Likewise.
2920 (mark_set_resources): Likewise.
2921 * rtl.c (copy_rtx): Likewise.
2922 * rtlanal.c (reg_referenced_p): Likewise.
2923 (single_set_2): Likewise.
2924 (noop_move_p): Likewise.
2925 (note_stores): Likewise.
2926 * sched-deps.c (sched_analyze_reg): Likewise.
2927 (sched_analyze_insn): Likewise.
2928
2929 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2930
2931 * cse.c (invalidate_reg): New function extracted from...
2932 (invalidate): ...here.
2933 (canonicalize_insn): Check for clobber high.
2934 (invalidate_from_clobbers): invalidate clobber highs.
2935 (invalidate_from_sets_and_clobbers): Likewise.
2936 (count_reg_usage): Check for clobber high.
2937 (insn_live_p): Likewise.
2938 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2939 (cselib_invalidate_regno): Check for clobber in setter.
2940 (cselib_invalidate_rtx): Pass through setter.
2941 (cselib_invalidate_rtx_note_stores):
2942 (cselib_process_insn): Check for clobber high.
2943 * cselib.h (cselib_invalidate_rtx): Add operand.
2944
2945 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2946
2947 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2948 (mark_not_eliminable): Likewise.
2949 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2950 * lra-lives.c (process_bb_lives): Check for clobber high.
2951 * lra.c (new_insn_reg): Remember clobber highs.
2952 (collect_non_operand_hard_regs): Check for clobber high.
2953 (lra_set_insn_recog_data): Likewise.
2954 (add_regs_to_insn_regno_info): Likewise.
2955 (lra_update_insn_regno_info): Likewise.
2956
2957 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2958
2959 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2960 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2961
2962 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2963
2964 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2965 (copy_insn_1): Likewise.
2966 (gen_hard_reg_clobber_high): New gen function.
2967 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2968 * genemit.c (gen_exp): Likewise.
2969 (gen_emit_seq): Pass through info.
2970 (gen_insn): Check for CLOBBER_HIGH.
2971 (gen_expand): Pass through info.
2972 (gen_split): Likewise.
2973 (output_add_clobbers): Likewise.
2974 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2975 (remove_clobbers): Likewise.
2976 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2977
2978 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2979
2980 * doc/rtl.texi (clobber_high): Add.
2981 (parallel): Add in clobber high
2982 * rtl.c (rtl_check_failed_code3): Add function.
2983 * rtl.def (CLOBBER_HIGH): Add expression.
2984 * rtl.h (RTL_CHECKC3): Add macro.
2985 (rtl_check_failed_code3): Add declaration.
2986 (XC3EXP): Add macro.
2987
2988 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2989
2990 PR target/86386
2991 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2992 cfun->machine->max_used_stack_alignment if needed.
2993
2994 2018-08-04 Martin Sebor <msebor@redhat.com>
2995
2996 PR tree-optimization/86571
2997 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2998 NaN output to 4.
2999
3000 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3001
3002 PR target/86799
3003 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3004 Define.
3005
3006 2018-08-03 Jeff Law <law@redhat.com>
3007
3008 PR target/86795
3009 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3010 Define to speculation_safe_value_not_needed.
3011
3012 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3013
3014 * doc/gcov.texi (-x): Remove duplicate "to".
3015 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3016 (-Wif-not-aligned): Remove duplicate "is".
3017 (-flto): Remove duplicate "the".
3018 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3019 duplicate "v5.00.b".
3020 (MSP430 Options): Remove duplicate "and" from the description
3021 of "-mgprel-sec=regexp".
3022 (x86 Options): Remove duplicate copies of "vmldLog102" and
3023 vmlsLog104 from description of "-mveclibabi=type".
3024
3025 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3026
3027 * internal-fn.h (first_commutative_argument): Declare.
3028 * internal-fn.c (first_commutative_argument): New function.
3029 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3030 restrictions for pattern statements. Use first_commutative_argument
3031 to look for commutative operands in calls to internal functions.
3032
3033 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3034
3035 * Makefile.in (wide-int-range.o): New.
3036 * tree-vrp.c: Move all the wide_int_* functions to...
3037 * wide-int-range.cc: ...here.
3038 * tree-vrp.h: Move all the wide_int_* prototypes to...
3039 * wide-int-range.h: ...here.
3040
3041 2018-08-03 Tom de Vries <tdevries@suse.de>
3042
3043 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3044 UI_NONE.
3045 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3046 * except.c (output_function_exception_table): Do early exit if
3047 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3048
3049 2018-08-03 Martin Liska <mliska@suse.cz>
3050
3051 * predict.c (dump_prediction): Change to 2 digits
3052 in fraction part.
3053
3054 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3055
3056 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3057 neon_dup_q to...
3058 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3059
3060 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3061
3062 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3063 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3064 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3065 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3066 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3067
3068 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3069
3070 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3071 pp_take_prefix when saving the existing prefix.
3072 * diagnostic.c (diagnostic_append_note): Likewise.
3073 * langhooks.c (lhd_print_error_function): Likewise.
3074 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3075 param's type. Free the existing prefix.
3076 (pp_take_prefix): New function.
3077 (pretty_printer::pretty_printer): Drop the prefix parameter.
3078 Rename the length parameter to match the comment.
3079 (pretty_printer::~pretty_printer): Free the prefix.
3080 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3081 parameter.
3082 (struct pretty_printer): Drop the "const" from "prefix" field's
3083 type and clarify memory management.
3084 (pp_set_prefix): Drop the "const" from the 2nd param.
3085 (pp_take_prefix): New decl.
3086
3087 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3088
3089 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3090 for word_mode_ok here instead of passing as argument.
3091 (expand_block_compare): Change select_block_compare_mode() call.
3092 (expand_strncmp_gpr_sequence): New function.
3093 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3094
3095 2018-08-02 Jeff Law <law@redhat.com>
3096
3097 PR target/86790
3098 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3099 Define to speculation_safe_value_not_needed.
3100
3101 PR target/86784
3102 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3103 Define to speculation_safe_value_not_needed.
3104
3105 2018-08-02 Tom de Vries <tdevries@suse.de>
3106
3107 PR target/86660
3108 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3109 function. Return UI_TARGET unconditionally.
3110 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3111 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3112
3113 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3114
3115 * genemit.c (print_overload_test): Fix typo.
3116
3117 2018-08-02 Richard Biener <rguenther@suse.de>
3118
3119 PR tree-optimization/86816
3120 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3121 which checks for value availability before querying it.
3122 (gvn_uses_equal): Use it.
3123 (same_succ_hash): Likewise.
3124 (gimple_equal_p): Likewise.
3125
3126 2018-08-02 Nick Clifton <nickc@redhat.com>
3127
3128 PR target/86813
3129 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3130 Define to speculation_safe_value_not_needed.
3131
3132 PR target/86810
3133 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3134 Define to speculation_safe_value_not_needed.
3135
3136 PR target/86810
3137 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3138 Define to speculation_safe_value_not_needed.
3139
3140 PR target/86803
3141 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3142 Define to speculation_safe_value_not_needed.
3143
3144 PR target/86797
3145 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3146 Define to speculation_safe_value_not_needed.
3147
3148 PR target/86791
3149 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3150 Define to speculation_safe_value_not_needed.
3151
3152 PR target/86789
3153 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3154 Define to speculation_safe_value_not_needed.
3155
3156 PR target/86787
3157 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3158 Define to speculation_safe_value_not_needed.
3159
3160 PR target/86782
3161 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3162 speculation_safe_value_not_needed.
3163
3164 PR target/86781
3165 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3166 to speculation_safe_value_not_needed.
3167
3168 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3169
3170 * doc/md.texi: Expand the documentation of instruction names
3171 to mention port-local uses. Document '@' in pattern names.
3172 * read-md.h (overloaded_instance, overloaded_name): New structs.
3173 (mapping): Declare.
3174 (md_reader::handle_overloaded_name): New member function.
3175 (md_reader::get_overloads): Likewise.
3176 (md_reader::m_first_overload): New member variable.
3177 (md_reader::m_next_overload_ptr): Likewise.
3178 (md_reader::m_overloads_htab): Likewise.
3179 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3180 m_next_overload_ptr and m_overloads_htab.
3181 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3182 (get_mode_token, get_code_token, get_int_token): New functions.
3183 (map_attr_string): Add an optional argument that passes back
3184 the associated iterator.
3185 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3186 (md_reader::handle_overloaded_name, add_overload_instance): New
3187 functions.
3188 (apply_iterators): Handle '@' names. Report an error if '@'
3189 is used without iterators.
3190 (initialize_iterators): Initialize the new iterator_group fields.
3191 * genopinit.c (handle_overloaded_code_for)
3192 (handle_overloaded_gen): New functions.
3193 (main): Use them to print declarations of maybe_code_for_* and
3194 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3195 * genemit.c (print_overload_arguments, print_overload_test)
3196 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3197 (main): Use it to print definitions of maybe_code_for_* and
3198 maybe_gen_* functions.
3199 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3200 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3201 instead of explicit mode checks.
3202 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3203 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3204 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3205 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3206 (aarch64_expand_compare_and_swap): Likewise
3207 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3208 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3209 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3210 (aarch64_constant_pool_reload_icode): Delete.
3211 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3212 instead of aarch64_constant_pool_reload_icode. Use
3213 code_for_aarch64_reload_mov instead of explicit mode checks.
3214 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3215 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3216 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3217 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3218 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3219 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3220 (aarch64_atomic_load_op_code): Delete.
3221 (aarch64_emit_atomic_load_op): Likewise.
3222 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3223 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3224 instead of aarch64_emit_atomic_load_op.
3225 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3226 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3227 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3228 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3229 character before the pattern name.
3230 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3231 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3232 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3233 (aarch64_frecps<mode>): Likewise.
3234 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3235 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3236 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3237 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3238 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3239
3240 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3241
3242 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3243 Allow HFmode constants if TARGET_FP_F16INST.
3244
3245 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3246
3247 PR target/86014
3248 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3249 No longer check last store for clobber of address register.
3250
3251 2018-08-02 Martin Liska <mliska@suse.cz>
3252
3253 PR gcov-profile/86817
3254 * gcov.c (process_all_functions): New function.
3255 (main): Call it.
3256 (process_file): Move functions processing to
3257 process_all_functions.
3258
3259 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3260
3261 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3262 "const" to the "gimple *" and "rtx_insn *" parameters.
3263 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3264 Likewise.
3265 (dump_location_t::dump_location_t): Likewise.
3266
3267 2018-08-01 Martin Sebor <msebor@redhat.com>
3268
3269 PR tree-optimization/86650
3270 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3271 rather than a "gcall *". Directly pass the data of interest
3272 to percent_K_format, rather than building a temporary CALL_EXPR
3273 to hold it.
3274 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3275 (gimple_fold_builtin_strncat): Adjust.
3276 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3277 gcall* argument with gimple*.
3278 * gimple-ssa-warn-restrict.c (check_call): Same.
3279 (wrestrict_dom_walker::before_dom_children): Same.
3280 (builtin_access::builtin_access): Same.
3281 (check_bounds_or_overlap): Same
3282 (maybe_diag_overlap): Same.
3283 (maybe_diag_offset_bounds): Same.
3284 * tree-diagnostic.c (default_tree_printer): Move usage of
3285 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3286 to this callsite.
3287 * tree-pretty-print.c (percent_K_format): Add argument.
3288 * tree-pretty-print.h: Add argument.
3289 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3290 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3291 (maybe_diag_stxncpy_trunc): Same.
3292 (handle_builtin_stxncpy): Same.
3293 (handle_builtin_strcat): Same.
3294
3295 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3296
3297 * match.pd: Optimise pointer range checks.
3298
3299 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3300
3301 PR tree-optimization/86758
3302 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3303 to remove pattern statements.
3304
3305 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3306
3307 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3308 result of dfs_enumerate_from when constructing stmt_vec_infos,
3309 instead of additionally calling get_loop_body.
3310
3311 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3312
3313 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3314 parameter.
3315 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3316 When creating an iv, assert that the step is not known to be zero.
3317 (vect_setup_realignment): Update call accordingly.
3318 * tree-vect-stmts.c (vectorizable_store): Likewise.
3319 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3320
3321 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3322
3323 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3324 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3325 (vectorizable_reduction): Likewise.
3326 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3327 (vect_detect_hybrid_slp_stmts): Likewise.
3328 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3329
3330 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3331
3332 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3333 (wide_int_set_zero_nonzero_bits): ...this.
3334 (zero_nonzero_bits_from_vr): Rename to...
3335 (vrp_set_zero_nonzero_bits): ...this.
3336 (extract_range_from_multiplicative_op_1): Abstract wide int
3337 code...
3338 (wide_int_range_multiplicative_op): ...here.
3339 (extract_range_from_binary_expr_1): Extract wide int binary
3340 operations into their own functions.
3341 (wide_int_range_lshift): New.
3342 (wide_int_range_can_optimize_bit_op): New.
3343 (wide_int_range_shift_undefined_p): New.
3344 (wide_int_range_bit_xor): New.
3345 (wide_int_range_bit_ior): New.
3346 (wide_int_range_bit_and): New.
3347 (wide_int_range_trunc_mod): New.
3348 (extract_range_into_wide_ints): New.
3349 (vrp_shift_undefined_p): New.
3350 (extract_range_from_multiplicative_op): New.
3351 (vrp_can_optimize_bit_op): New.
3352 * tree-vrp.h (value_range::dump): New.
3353 (wide_int_range_multiplicative_op): New.
3354 (wide_int_range_lshift):New.
3355 (wide_int_range_shift_undefined_p): New.
3356 (wide_int_range_bit_xor): New.
3357 (wide_int_range_bit_ior): New.
3358 (wide_int_range_bit_and): New.
3359 (wide_int_range_trunc_mod): New.
3360 (zero_nonzero_bits_from_bounds): Rename to...
3361 (wide_int_set_zero_nonzero_bits): ...this.
3362 (zero_nonzero_bits_from_vr): Rename to...
3363 (vrp_set_zero_nonzero_bits): ...this.
3364 (range_easy_mask_min_max): Rename to...
3365 (wide_int_range_can_optimize_bit_op): this.
3366 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3367 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3368
3369 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3370
3371 * tree-vectorizer.h (vect_orig_stmt): New function.
3372 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3373 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3374 (vect_create_epilog_for_reduction): Likewise.
3375 (vectorizable_live_operation): Likewise.
3376 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3377 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3378 * tree-vect-stmts.c (vectorizable_call): Likewise.
3379 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3380
3381 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3382
3383 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3384 argument.
3385 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3386 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3387 (vect_transform_loop): Likewise.
3388 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3389
3390 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3391
3392 * tree-vectorizer.h (vect_schedule_slp): Return void.
3393 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3394 (vect_schedule_slp): Likewise.
3395
3396 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3397
3398 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3399 argument.
3400 (vect_transform_loop): Update calls accordingly. Schedule SLP
3401 instances before the main loop, if any exist.
3402
3403 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3404
3405 PR tree-optimization/86749
3406 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3407 If the lhs is used in a COND_EXPR, check that it is being used
3408 as the "then" or "else" value.
3409
3410 2018-08-01 Tom de Vries <tdevries@suse.de>
3411
3412 PR target/86800
3413 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3414 speculation_safe_value_not_needed.
3415
3416 2018-08-01 Richard Biener <rguenther@suse.de>
3417
3418 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3419 as base and offset.
3420
3421 2018-08-01 Martin Liska <mliska@suse.cz>
3422
3423 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3424 format how successful transformation is dumped.
3425 (gimple_mod_pow2_value_transform): Likewise.
3426 (gimple_mod_subtract_transform): Likewise.
3427 (gimple_stringops_transform): Likewise.
3428
3429 2018-08-01 Martin Liska <mliska@suse.cz>
3430
3431 PR value-prof/35543
3432 * value-prof.c (interesting_stringop_to_profile_p):
3433 Simplify the code and add BUILT_IN_MEMMOVE.
3434 (gimple_stringops_transform): Likewise.
3435
3436 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3437
3438 * config/aarch64/aarch64-simd.md
3439 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3440 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3441 use GPI iterator instead of SI mode.
3442
3443 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3444
3445 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3446 rs6000_speculation_barrier.
3447 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3448 new barrier pattern name.
3449
3450 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3451
3452 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3453 (speculation_barrier): New insn.
3454
3455 2018-08-01 Richard Biener <rguenther@suse.de>
3456
3457 PR bootstrap/86724
3458 * graphite.h: Include isl/id.h and isl/space.h to allow build
3459 with ISL 0.20.
3460
3461 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3462
3463 PR target/86651
3464 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3465 mode for COFF targets.
3466 * defaults.h (TARGET_COFF): Define.
3467 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3468 TARGET_COFF): Define.
3469 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3470 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3471 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3472
3473 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3474
3475 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3476 * gimple-streamer-out.c (output_bb): Save it.
3477 * lto-streamer-in.c (input_struct_function_base): Restore
3478 instance discriminator if available. Create map on demand.
3479 * lto-streamer-out.c (output_struct_function_base): Save it if
3480 available.
3481 * final.c (decl_to_instance_map): Document LTO strategy.
3482
3483 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3484 Olivier Hainque <hainque@adacore.com>
3485
3486 * debug.h (decl_to_instance_map_t): New type.
3487 (decl_to_instance_map): Declare.
3488 (maybe_create_decl_to_instance_map): New inline function.
3489 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3490 to track basic block discriminators.
3491 (final_start_function_1): Initialize them.
3492 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3493 bb_discriminator.
3494 (decl_to_instance_map): New variable.
3495 (map_decl_to_instance, maybe_set_discriminator): New functions.
3496 (notice_source_line): Set discriminator.
3497
3498 2018-07-31 Ian Lance Taylor <iant@golang.org>
3499
3500 * targhooks.c (default_have_speculation_safe_value): Add
3501 ATTRIBUTE_UNUSED.
3502
3503 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3504
3505 * dump-context.h: Include "pretty-print.h".
3506 (dump_context::refresh_dumps_are_enabled): New decl.
3507 (dump_context::emit_item): New decl.
3508 (class dump_context): Add fields "m_test_pp" and
3509 "m_test_pp_flags".
3510 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3511 (temp_dump_context::get_dumped_text): New decl.
3512 (class temp_dump_context): Add field "m_pp".
3513 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3514 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3515 m_test_pp.
3516 (set_dump_file): Update for above change.
3517 (set_alt_dump_file): Likewise.
3518 (dump_loc): New overload, taking a pretty_printer *.
3519 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3520 to any test pretty-printer.
3521 (make_item_for_dump_gimple_stmt): New function, adapted from
3522 optinfo::add_gimple_stmt.
3523 (dump_context::dump_gimple_stmt): Call it, and use the result,
3524 eliminating the direct usage of dump_file and alt_dump_file in
3525 favor of indirectly using them via emit_item.
3526 (make_item_for_dump_gimple_expr): New function, adapted from
3527 optinfo::add_gimple_expr.
3528 (dump_context::dump_gimple_expr): Call it, and use the result,
3529 eliminating the direct usage of dump_file and alt_dump_file in
3530 favor of indirectly using them via emit_item.
3531 (make_item_for_dump_generic_expr): New function, adapted from
3532 optinfo::add_tree.
3533 (dump_context::dump_generic_expr): Call it, and use the result,
3534 eliminating the direct usage of dump_file and alt_dump_file in
3535 favor of indirectly using them via emit_item.
3536 (make_item_for_dump_printf_va): New function, adapted from
3537 optinfo::add_printf_va.
3538 (make_item_for_dump_printf): New function.
3539 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3540 and use the result, eliminating the direct usage of dump_file and
3541 alt_dump_file in favor of indirectly using them via emit_item.
3542 (make_item_for_dump_dec): New function.
3543 (dump_context::dump_dec): Call it, and use the result,
3544 eliminating the direct usage of dump_file and alt_dump_file in
3545 favor of indirectly using them via emit_item.
3546 (make_item_for_dump_symtab_node): New function, adapted from
3547 optinfo::add_symtab_node.
3548 (dump_context::dump_symtab_node): Call it, and use the result,
3549 eliminating the direct usage of dump_file and alt_dump_file in
3550 favor of indirectly using them via emit_item.
3551 (dump_context::begin_scope): Reimplement, avoiding direct usage
3552 of dump_file and alt_dump_file in favor of indirectly using them
3553 via emit_item.
3554 (dump_context::emit_item): New member function.
3555 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3556 Set up test pretty-printer on the underlying context. Call
3557 refresh_dumps_are_enabled.
3558 (temp_dump_context::~temp_dump_context): Call
3559 refresh_dumps_are_enabled.
3560 (temp_dump_context::get_dumped_text): New member function.
3561 (selftest::verify_dumped_text): New function.
3562 (ASSERT_DUMPED_TEXT_EQ): New macro.
3563 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3564 and then without optinfo enabled. Add uses of
3565 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3566 * dumpfile.h: Update comment for the dump_* API.
3567 * optinfo-emit-json.cc
3568 (selftest::test_building_json_from_dump_calls): Update for new
3569 param for temp_dump_context ctor.
3570 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3571 and "m_owned" field.
3572 (optinfo_item::~optinfo_item): Likewise.
3573 (optinfo::add_item): New member function.
3574 (optinfo::emit): Update comment.
3575 (optinfo::add_string): Delete.
3576 (optinfo::add_printf): Delete.
3577 (optinfo::add_printf_va): Delete.
3578 (optinfo::add_gimple_stmt): Delete.
3579 (optinfo::add_gimple_expr): Delete.
3580 (optinfo::add_tree): Delete.
3581 (optinfo::add_symtab_node): Delete.
3582 (optinfo::add_dec): Delete.
3583 * optinfo.h (class dump_context): New forward decl.
3584 (optinfo::add_item): New decl.
3585 (optinfo::add_string): Delete.
3586 (optinfo::add_printf): Delete.
3587 (optinfo::add_printf_va): Delete.
3588 (optinfo::add_gimple_stmt): Delete.
3589 (optinfo::add_gimple_expr): Delete.
3590 (optinfo::add_tree): Delete.
3591 (optinfo::add_symtab_node): Delete.
3592 (optinfo::add_dec): Delete.
3593 (optinfo::add_poly_int): Delete.
3594 (optinfo_item::optinfo_item): Remove "owned" param.
3595 (class optinfo_item): Remove field "m_owned".
3596
3597 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3598
3599 PR middle-end/86705
3600 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3601 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3602 requested variable alignment.
3603 (expand_one_ssa_partition): Likewise.
3604 (expand_one_var): Likewise.
3605
3606 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3607
3608 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3609 to speculation_safe_value_not_needed.
3610
3611 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3612
3613 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3614 * targhooks.c (speculation_safe_value_not_needed): New function.
3615 * target.def (have_speculation_safe_value): Update documentation.
3616 * doc/tm.texi: Regenerated.
3617
3618 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3619
3620 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3621 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3622 expand.
3623 (despeculate_copy<ALLI:mode>_insn): New insn.
3624 (despeculate_copyti_insn): New insn.
3625 (despeculate_simple<ALLI:mode>): New insn
3626 (despeculate_simpleti): New insn.
3627 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3628 function.
3629 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3630 aarch64_speculation_safe_value.
3631 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3632
3633 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3634
3635 * config/aarch64/aarch64-speculation.cc: New file.
3636 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3637 before pass_reorder_blocks.
3638 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3639 prototype.
3640 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3641 X14 and X15 when tracking speculation.
3642 * config/aarch64/aarch64.md (register name constants): Add
3643 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3644 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3645 (speculation_barrier): New insn attribute.
3646 (cmp<mode>): Allow SP in comparisons.
3647 (speculation_tracker): New insn.
3648 (speculation_barrier): Add speculation_barrier attribute.
3649 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3650 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3651 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3652
3653 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3654
3655 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3656 aarch64_track_speculation is true.
3657 (tb<optab><mode>1): Likewise.
3658 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3659 generate CB[N]Z when tracking speculation.
3660 (aarch64_split_compare_and_swap): Likewise.
3661 (aarch64_split_atomic_op): Likewise.
3662
3663 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3664
3665 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3666
3667 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3668
3669 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3670 (speculation_barrier): New insn.
3671
3672 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3673
3674 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3675 * config/arm/arm.md (speculation_barrier): New expand.
3676 (speculation_barrier_insn): New pattern.
3677
3678 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3679
3680 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3681 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3682 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3683 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3684 list.
3685 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3686 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3687 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3688 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3689 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3690 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3691 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3692 * builtins.c (expand_speculation_safe_value): New function.
3693 (expand_builtin): Call it.
3694 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3695 * doc/extend.texi: Document __builtin_speculation_safe_value.
3696 * doc/md.texi: Document "speculation_barrier" pattern.
3697 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3698 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3699 * doc/tm.texi: Regenerated.
3700 * target.def (have_speculation_safe_value, speculation_safe_value): New
3701 hooks.
3702 * targhooks.c (default_have_speculation_safe_value): New function.
3703 (default_speculation_safe_value): New function.
3704 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3705 (default_speculation_safe_value): Add prototype.
3706
3707 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3708
3709 * dump-context.h (dump_context::dump_loc): New decl.
3710 * dumpfile.c (dump_context::dump_loc): New member function.
3711 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3712 and dump_gimple_stmt.
3713 (dump_context::dump_gimple_expr_loc): Likewise, using
3714 dump_gimple_expr.
3715 (dump_context::dump_generic_expr_loc): Likewise, using
3716 dump_generic_expr.
3717 (dump_context::dump_printf_loc_va): Likewise, using
3718 dump_printf_va.
3719 (dump_context::begin_scope): Explicitly using the global function
3720 "dump_loc", rather than the member function.
3721
3722 2018-07-31 Martin Sebor <msebor@redhat.com>
3723
3724 PR tree-optimization/86741
3725 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3726
3727 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3728
3729 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3730 depend on whether prefetch instructions will be emitted or not.
3731 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3732 will be emitted or not.
3733 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3734 (TARGET_SETMEM_PFD): New macros.
3735
3736 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3737
3738 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3739 (NULL_STMT_VEC_INFO): Delete.
3740 (stmt_vec_info::operator*): Likewise.
3741 (stmt_vec_info::operator gimple *): Likewise.
3742 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3743 of NULL_STMT_VEC_INFO.
3744 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3745 (vect_reassociating_reduction_p): Likewise.
3746 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3747 (vectorizable_store): Likewise.
3748 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3749 (vec_info::free_stmt_vec_infos): Likewise.
3750
3751 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3752
3753 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3754 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3755
3756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3757
3758 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3759 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3760 (vec_info::free_stmt_vec_info): New private member functions.
3761 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3762 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3763 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3764 set_stmt_vec_info_vec and free_stmt_vec_infos.
3765 * tree-vect-loop.c (_loop_vec_info): Remove call to
3766 set_stmt_vec_info_vec.
3767 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3768 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3769 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3770 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3771 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3772 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3773 with the clearing in the xcalloc.
3774 (stmt_vec_info_vec): Delete.
3775 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3776 (vectorize_loops): Likewise.
3777 (vec_info::~vec_info): Remove argument from call to
3778 free_stmt_vec_infos.
3779 (vec_info::add_stmt): Remove vinfo argument from call to
3780 new_stmt_vec_info.
3781
3782 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3783
3784 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3785 rather than a gimple stmt.
3786 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3787 information for pattern statements when passed the original
3788 statement; instead wait to be passed the pattern statement itself.
3789 Don't call set_vinfo_for_stmt here.
3790 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3791 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3792 stmt_vec_infos here.
3793 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3794 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3795 stmt_vec_infos entry.
3796
3797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3798
3799 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3800 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3801 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3802 * tree-vect-stmts.c (vectorizable_call): Likewise.
3803 (vectorizable_simd_clone_call): Likewise.
3804
3805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3806
3807 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3808 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3809 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3810 * tree-vect-loop.c (vect_transform_loop): Likewise.
3811 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3812 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3813
3814 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3815
3816 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3817 (vect_dr_stmt): Delete.
3818 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3819 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3820 of DR_VECT_AUX.
3821 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3822 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3823 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3824 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3825 (vect_analyze_data_refs): Likewise.
3826 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3827 argument.
3828 (vect_find_same_alignment_drs): Likewise.
3829 (vect_slp_analyze_node_dependences): Update calls accordingly.
3830 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3831 instead of DR_VECT_AUX.
3832 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3833 of a vector data references. Use vec_info::lookup_dr instead of
3834 DR_VECT_AUX.
3835 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3836 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3837 instead of DR_VECT_AUX.
3838
3839 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3840
3841 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3842 dr_vec_info.
3843 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3844 accordingly.
3845 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3846 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3847 (vect_gen_prolog_loop_niters): Likewise.
3848
3849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3850
3851 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3852 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3853 (vect_known_alignment_in_bytes, vect_dr_behavior)
3854 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3855 instead of data_references. Update calls to other routines for
3856 which the same change has been made.
3857 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3858 dr_vec_infos instead of stmt_vec_infos.
3859 (vect_analyze_data_ref_dependence): Update call accordingly.
3860 (vect_slp_analyze_data_ref_dependence)
3861 (vect_record_base_alignments): Use DR_VECT_AUX.
3862 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3863 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3864 (vector_alignment_reachable_p, vect_get_data_access_cost)
3865 (vect_peeling_supportable, vect_analyze_group_access_1)
3866 (vect_analyze_group_access, vect_analyze_data_ref_access)
3867 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3868 (vect_compile_time_alias, vect_small_gap_p)
3869 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3870 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3871 instead of data_references. Update calls to other routines for
3872 which the same change has been made.
3873 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3874 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3875 (vect_slp_analyze_and_verify_node_alignment)
3876 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3877 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3878 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3879 above changes.
3880 (_vect_peel_info::dr): Replace with...
3881 (_vect_peel_info::dr_info): ...this new field.
3882 (vect_peeling_hash_get_most_frequent)
3883 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3884 (vect_peeling_hash_get_lowest_cost):
3885 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3886 routines for which the same change has been made.
3887 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3888 data_reference.
3889 * tree-vect-loop-manip.c (get_misalign_in_elems)
3890 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3891 above changes.
3892 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3893 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3894 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3895 (get_group_load_store_type, get_negative_load_store_type)
3896 (vect_get_data_ptr_increment, vectorizable_store)
3897 (vectorizable_load): Likewise.
3898 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3899 Update calls to other routines for which the same change has been made.
3900
3901 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3902
3903 * tree-vectorizer.h (vec_info::move_dr): New member function.
3904 (dataref_aux): Rename to...
3905 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3906 (_stmt_vec_info::dr_aux): Update accordingly.
3907 (_stmt_vec_info::data_ref_info): Delete.
3908 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3909 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3910 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3911 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3912 of data_ref.
3913 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3914 (STMT_VINFO_DR_INFO): New macro.
3915 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3916 (set_dr_misalignment): Update after rename of dataref_aux.
3917 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3918 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3919 initialization of STMT_VINFO_DATA_REF.
3920 * tree-vectorizer.c (vec_info::move_dr): New function.
3921 * tree-vect-patterns.c (vect_recog_bool_pattern)
3922 (vect_recog_mask_conversion_pattern)
3923 (vect_recog_gather_scatter_pattern): Use it.
3924 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3925 the "dr" and "stmt" fields of dr_vec_info instead of
3926 STMT_VINFO_DATA_REF.
3927
3928 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3929
3930 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3931 (is_pattern_stmt_p): Use it.
3932 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3933 on pattern statements.
3934
3935 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3936
3937 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3938 original stmt as a stmt_vec_info rather than a gimple stmt.
3939 (vect_pattern_recog_1): Take the statement directly as a
3940 stmt_vec_info, rather than via a gimple_stmt_iterator.
3941 Update call to vect_mark_pattern_stmts.
3942 (vect_pattern_recog): Update calls accordingly.
3943
3944 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3945
3946 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3947 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3948 a vect_def_type for the first argument.
3949 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3950 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3951 operand if it isn't defined by a vectorized statement.
3952 (vect_build_gather_load_calls): Remove the mask_dt argument and
3953 update calls to vect_get_vec_def_for_stmt_copy.
3954 (vectorizable_bswap): Likewise the dt argument.
3955 (vectorizable_call): Update calls to vectorizable_bswap and
3956 vect_get_vec_def_for_stmt_copy.
3957 (vectorizable_simd_clone_call, vectorizable_assignment)
3958 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3959 (vectorizable_comparison): Update calls to
3960 vect_get_vec_def_for_stmt_copy.
3961 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3962 vect_is_simple_use.
3963 (vect_get_loop_based_defs): Remove dt argument and update call
3964 to vect_get_vec_def_for_stmt_copy.
3965 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3966 and vect_get_vec_def_for_stmt_copy.
3967 (vectorizable_load): Update calls to vect_build_gather_load_calls
3968 and vect_get_vec_def_for_stmt_copy.
3969 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3970 (vectorizable_reduction, vectorizable_live_operation): Update calls
3971 to vect_get_vec_def_for_stmt_copy.
3972
3973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3974
3975 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3976 and gimple stmt arguments with a stmt_vec_info.
3977 (vect_record_base_alignments): Update calls accordingly.
3978 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3979 and gimple stmt arguments with a stmt_vec_info.
3980 (vect_build_slp_tree_1): Remove vinfo argument and update call
3981 to vect_record_max_nunits.
3982 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3983 and vect_record_max_nunits.
3984
3985 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3986
3987 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3988 file and take a stmt_vec_info instead of a gimple stmt.
3989 (supportable_widening_operation, vect_finish_replace_stmt)
3990 (vect_finish_stmt_generation, vect_get_store_rhs)
3991 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3992 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3993 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3994 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3995 (vect_create_data_ref_ptr, bump_vector_ptr)
3996 (vect_permute_store_chain, vect_setup_realignment)
3997 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3998 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3999 (vectorizable_reduction, vectorizable_induction)
4000 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4001 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4002 than gimple stmts as arguments.
4003 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4004 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4005 (can_group_stmts_p, vect_check_gather_scatter)
4006 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4007 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4008 (vect_permute_load_chain, vect_shift_permute_load_chain)
4009 (vect_transform_grouped_load)
4010 (vect_record_grouped_load_vectors): Likewise.
4011 * tree-vect-loop.c (vect_fixup_reduc_chain)
4012 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4013 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4014 (vectorizable_reduction, vectorizable_induction)
4015 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4016 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4017 (vect_get_load_store_mask): Likewise.
4018 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4019 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4020 * tree-vect-stmts.c (vect_mark_relevant)
4021 (is_simple_and_all_uses_invariant)
4022 (exist_non_indexing_operands_for_use_p, process_use)
4023 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4024 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4025 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4026 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4027 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4028 (get_negative_load_store_type, get_load_store_type)
4029 (vect_check_load_store_mask, vect_check_store_rhs)
4030 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4031 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4032 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4033 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4034 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4035 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4036 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4037 (supportable_widening_operation): Likewise.
4038
4039 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4040
4041 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4042 a stmt_vec_info instead of a gcall.
4043 (vect_check_gather_scatter): Update call accordingly.
4044 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4045 of a gphi.
4046 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4047 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4048 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4049 instead of a gimple stmt.
4050 (vect_transform_loop): Update calls accordingly.
4051 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4052 stmt_vec_infos instead of gimple stmts.
4053 (vect_analyze_slp_instance): Update use accordingly.
4054 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4055 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4056 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4057 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4058 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4059 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4060 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4061 down to subroutines.
4062
4063 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4064
4065 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4066 of the worklist from a vector of gimple stmts to a vector of
4067 stmt_vec_infos.
4068 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4069 (vect_mark_stmts_to_be_vectorized): Likewise
4070
4071 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4072
4073 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4074 statement before passing it to vect_analyze_stmt.
4075 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4076 the chain of phi vector definitions. Track the exit phi via its
4077 stmt_vec_info.
4078 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4079 STMT_VINFO_REDUC_DEF.
4080 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4081 stmt_vec_infos to handle the statement chains.
4082 (vect_get_slp_defs): Record the first statement in the node
4083 using a stmt_vec_info.
4084 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4085 statements here and pass their stmt_vec_info down to subroutines.
4086 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4087 down to vect_finish_stmt_generation.
4088 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4089 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4090 stmt_vec_infos to subroutines.
4091 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4092 chains.
4093
4094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4095
4096 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4097 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4098 (vect_permute_store_chain, vect_setup_realignment)
4099 (vect_permute_load_chain, vect_shift_permute_load_chain)
4100 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4101 stmts internally, and when passing values to other vectorizer routines.
4102 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4103 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4104 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4105 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4106 (vectorizable_reduction, vectorizable_induction)
4107 (vectorizable_live_operation, vect_transform_loop_stmt)
4108 (vect_transform_loop): Likewise.
4109 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4110 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4111 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4112 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4113 (vect_slp_analyze_node_operations_1): Likewise.
4114 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4115 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4116 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4117 (vect_finish_stmt_generation_1, get_group_load_store_type)
4118 (get_load_store_type, vect_build_gather_load_calls)
4119 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4120 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4121 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4122 (vectorizable_store, vectorizable_load, vectorizable_condition)
4123 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4124 (supportable_widening_operation): Likewise.
4125 (vect_get_vector_types_for_stmt): Likewise.
4126 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4127
4128 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4129
4130 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4131 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4132 (vect_permute_store_chain, vect_permute_load_chain)
4133 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4134 repeated stmt_vec_info lookups.
4135 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4136 (vect_update_ivs_after_vectorizer): Likewise.
4137 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4138 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4139 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4140 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4141 (vect_bb_slp_scalar_cost): Likewise.
4142 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4143
4144 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4145
4146 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4147 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4148 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4149 to get gassigns and gcalls, rather than operating on generc gimple
4150 stmts.
4151 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4152 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4153 (vectorizable_load, vect_analyze_stmt): Likewise.
4154 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4155
4156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4157
4158 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4159 return stmt_vec_infos rather than gimple stmts. Do not accept
4160 null arguments.
4161 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4162 of a gimple stmt.
4163 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4164 Update use of get_later_stmt.
4165 (vect_get_constant_vectors): Update call accordingly.
4166 (vect_schedule_slp_instance): Likewise
4167 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4168 (vect_slp_analyze_instance_dependence): Likewise.
4169 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4170
4171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4172
4173 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4174 (stmt_info_for_cost::stmt_info): ...this new field.
4175 (add_stmt_costs): Update accordingly.
4176 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4177 (vect_get_known_peeling_cost): Likewise.
4178 (vect_estimate_min_profitable_iters): Likewise.
4179 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4180
4181 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4182
4183 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4184 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4185 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4186 accordingly.
4187 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4188
4189 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4190
4191 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4192 a gimple stmt to a stmt_vec_info.
4193 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4194
4195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4196
4197 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4198 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4199 (_loop_vec_info::reduction_chains): Likewise.
4200 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4201 accordingly.
4202 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4203
4204 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4205
4206 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4207 a gimple stmt to a stmt_vec_info.
4208 (_stmt_vec_info::next_element): Likewise.
4209 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4210 (vect_slp_analyze_and_verify_node_alignment)
4211 (vect_analyze_group_access_1, vect_analyze_group_access)
4212 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4213 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4214 (vect_supportable_dr_alignment): Update accordingly.
4215 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4216 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4217 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4218 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4219 * tree-vect-slp.c (vect_build_slp_tree_1)
4220 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4221 (vect_split_slp_store_group, vect_analyze_slp_instance)
4222 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4223 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4224 (get_group_load_store_type, get_load_store_type)
4225 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4226 (vect_transform_stmt, vect_remove_stores): Likewise.
4227
4228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4229
4230 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4231 than a gimple stmt.
4232 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4233 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4234 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4235 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4236 (vector_alignment_reachable_p, vect_get_data_access_cost)
4237 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4238 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4239 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4240 (vect_analyze_group_access_1, vect_analyze_group_access)
4241 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4242 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4243 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4244 result of vect_dr_stmt and use the stmt_vec_info instead of
4245 the associated gimple stmt.
4246 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4247 (vect_gen_prolog_loop_niters): Likewise.
4248 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4249
4250 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4251
4252 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4253 to a vec<stmt_vec_info>.
4254 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4255 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4256 vec<stmt_vec_info>.
4257 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4258 to a vec<stmt_vec_info>.
4259 (bst_traits::value_type, bst_traits::value_type): Likewise.
4260 (bst_traits::hash): Update accordingly.
4261 (vect_get_and_check_slp_defs): Change the stmts parameter from
4262 a vec<gimple *> to a vec<stmt_vec_info>.
4263 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4264 (vect_build_slp_tree): Likewise.
4265 (vect_build_slp_tree_2): Likewise. Update uses of
4266 SLP_TREE_SCALAR_STMTS.
4267 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4268 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4269 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4270 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4271 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4272 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4273 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4274 (vect_get_constant_vectors, vect_get_slp_defs)
4275 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4276 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4277 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4278 instead of gimple stmts.
4279 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4280 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4281 (vect_slp_analyze_instance_dependence): Update uses of
4282 SLP_TREE_SCALAR_STMTS.
4283 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4284 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4285 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4286 (get_initial_defs_for_reduction): Likewise.
4287 (vect_create_epilog_for_reduction): Likewise.
4288 (vectorize_fold_left_reduction): Likewise.
4289 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4290 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4291 (can_vectorize_live_stmts): Likewise.
4292
4293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4294
4295 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4296 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4297 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4298 than gimple stmts.
4299 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4300 of a gimple stmt.
4301 (gather_scalar_reductions): Update after above interface changes.
4302 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4303 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4304 than gimple stmts.
4305 (vect_force_simple_reduction): Likewise.
4306 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4307 LOOP_VINFO_REDUCTIONS.
4308 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4309
4310 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4311
4312 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4313 a gimple stmt to a stmt_vec_info.
4314 * tree-vect-loop.c (vect_active_double_reduction_p)
4315 (vect_force_simple_reduction, vectorizable_reduction): Update
4316 accordingly.
4317
4318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4319
4320 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4321 vec<gimple *> to a vec<stmt_vec_info>.
4322 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4323 the reduction_phis argument from a vec<gimple *> to a
4324 vec<stmt_vec_info>.
4325 (vectorizable_reduction): Likewise the phis local variable that
4326 is passed to vect_create_epilog_for_reduction. Update for new type
4327 of SLP_TREE_VEC_STMTS.
4328 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4329 (vectorizable_live_operation): Likewise.
4330 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4331 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4332
4333 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4334
4335 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4336 a gimple stmt to a stmt_vec_info.
4337 (vectorizable_condition, vectorizable_live_operation)
4338 (vectorizable_reduction, vectorizable_induction): Pass back the
4339 vectorized statement as a stmt_vec_info.
4340 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4341 use of STMT_VINFO_VEC_STMT.
4342 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4343 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4344 as stmt_vec_infos rather than gimple stmts.
4345 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4346 to a stmt_vec_info.
4347 (vectorizable_live_operation): Likewise.
4348 (vectorizable_reduction, vectorizable_induction): Likewise,
4349 updating use of STMT_VINFO_VEC_STMT.
4350 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4351 of STMT_VINFO_VEC_STMT.
4352 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4353 (vectorizable_simd_clone_call, vectorizable_conversion)
4354 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4355 (vectorizable_store, vectorizable_load, vectorizable_condition)
4356 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4357 from a gimple stmt to a stmt_vec_info.
4358 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4359 pointer to a stmt_vec_info to the vectorizable_* routines.
4360
4361 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4362
4363 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4364 a gimple stmt to a stmt_vec_info.
4365 (is_pattern_stmt_p): Update accordingly.
4366 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4367 (vect_record_grouped_load_vectors): Likewise.
4368 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4369 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4370 (vect_model_reduction_cost): Likewise.
4371 (vect_create_epilog_for_reduction): Likewise.
4372 (vectorizable_reduction, vectorizable_induction): Likewise.
4373 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4374 Return the stmt_vec_info for the pattern statement.
4375 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4376 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4377 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4378 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4379 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4380 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4381 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4382 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4383
4384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4385
4386 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4387 (vect_finish_stmt_generation): Likewise.
4388 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4389 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4390 (vect_build_gather_load_calls): Use the return value of the above
4391 functions instead of a separate call to vinfo_for_stmt. Use narrow
4392 scopes for the input gimple stmt and wider scopes for the associated
4393 stmt_vec_info. Use vec_info::lookup_def when setting these
4394 stmt_vec_infos from an SSA_NAME definition.
4395 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4396 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4397 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4398 (vectorizable_store, vectorizable_load, vectorizable_condition)
4399 (vectorizable_comparison): Likewise.
4400 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4401 (vectorizable_reduction): Likewise.
4402
4403 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4404
4405 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4406 stmt_vec_info * parameter before the optional gimple **.
4407 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4408 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4409 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4410 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4411 (vectorizable_live_operation): Likewise.
4412 * tree-vect-patterns.c (type_conversion_p): Likewise.
4413 (vect_look_through_possible_promotion): Likewise.
4414 (vect_recog_rotate_pattern): Likewise.
4415 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4416
4417 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4418
4419 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4420 a typedef to a wrapper class.
4421 (NULL_STMT_VEC_INFO): New macro.
4422 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4423 (stmt_vec_info::operator*): New function.
4424 (stmt_vec_info::operator gimple *): Likewise.
4425 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4426 (add_stmt_costs): Likewise.
4427 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4428 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4429 (vect_get_known_peeling_cost): Likewise.
4430 (vect_estimate_min_profitable_iters): Likewise.
4431 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4432 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4433 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4434 (vectorizable_store, free_stmt_vec_infos): Likewise.
4435 (new_stmt_vec_info): Change return type of xcalloc to
4436 _stmt_vec_info *.
4437
4438 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4439
4440 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4441 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4442 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4443 a single_imm_use-based sequence.
4444 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4445
4446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4447
4448 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4449 * tree-vectorizer.c (vec_info::lookup_def): New function.
4450 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4451 (vect_widened_op_tree): Likewise.
4452 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4453 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4454 (vectorizable_reduction): Likewise.
4455 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4456 of a gimple *.
4457 (vect_is_slp_reduction): Update calls accordingly. Use
4458 vec_info::lookup_def.
4459 (vect_is_simple_reduction): Likewise
4460 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4461
4462 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4463
4464 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4465 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4466 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4467 of vinfo_for_stmt.
4468 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4469 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4470 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4471 (vect_is_slp_reduction, vectorizable_induction)
4472 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4473 * tree-vect-patterns.c (vect_init_pattern_stmt):
4474 (vect_determine_min_output_precision_1, vect_determine_precisions)
4475 (vect_pattern_recog): Likewise.
4476 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4477 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4478 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4479 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4480 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4481 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4482 info field from a loop to a loop_vec_info.
4483
4484 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4485
4486 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4487 (vec_info::add_stmt): Declare.
4488 * tree-vectorizer.c (vec_info::add_stmt): New function.
4489 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4490 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4491 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4492 (vectorizable_induction): Likewise.
4493 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4494 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4495 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4496 (vectorizable_load): Likewise.
4497 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4498 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4499 (vect_recog_gather_scatter_pattern): Likewise.
4500 (append_pattern_def_seq): Likewise. Remove a check that is
4501 performed by add_stmt itself.
4502
4503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4504
4505 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4506 which make_ssa_name was called with new_stmt before new_stmt
4507 had been created.
4508
4509 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4510
4511 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4512 split out from...
4513 (vect_is_slp_reduction): ...here...
4514 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4515 that are already known to be false.
4516
4517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4518
4519 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4520 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4521 STMT_VINFO_NUM_SLP_USES when it's true.
4522 (vect_free_slp_instance): Add a final_p parameter and pass it to
4523 vect_free_slp_tree.
4524 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4525 (vect_analyze_slp_instance): Likewise.
4526 (vect_slp_analyze_operations): Likewise.
4527 (vect_slp_analyze_bb_1): Likewise.
4528 * tree-vectorizer.c (vec_info): Likewise.
4529 * tree-vect-loop.c (vect_transform_loop): Likewise.
4530
4531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4532
4533 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4534 function is not called for second and subsequent members of
4535 a reduction group.
4536
4537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4538
4539 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4540 cases for nested loops from here to ...
4541 (vect_create_epilog_for_reduction): ...here. Only call
4542 vect_is_simple_use for inner-loop reductions.
4543
4544 2018-07-31 Martin Liska <mliska@suse.cz>
4545
4546 PR gcov-profile/85338
4547 PR gcov-profile/85350
4548 PR gcov-profile/85372
4549 * profile.c (struct location_triplet): New.
4550 (struct location_triplet_hash): Likewise.
4551 (output_location): Do not output a BB that
4552 is already recorded for a line.
4553 (branch_prob): Use streamed_locations.
4554
4555 2018-07-31 Martin Liska <mliska@suse.cz>
4556
4557 PR gcov-profile/85370
4558 * coverage.c (coverage_begin_function): Do not mark target
4559 clones as artificial functions.
4560
4561 2018-07-31 Martin Liska <mliska@suse.cz>
4562
4563 PR gcov-profile/83813
4564 PR gcov-profile/84758
4565 PR gcov-profile/85217
4566 PR gcov-profile/85332
4567 * profile.c (branch_prob): Do not record GOTO expressions
4568 for GIMPLE statements which locations are already streamed.
4569
4570 2018-07-31 Olivier Hainque <hainque@adacore.com>
4571
4572 * gcc.c (handle_spec_function): Accept a soft_matched_part
4573 argument, as do_spec_1. Pass it down to ...
4574 (eval_spec_function): Accept a soft_matched_part argument,
4575 and pass it down to ...
4576 (do_spec_2): Accept a soft_matched_part argument, and pass
4577 it down to do_spec_1.
4578 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4579 (handle_braces): Update call to handle_spec_function.
4580 (driver::set_up_specs): Update calls to do_spec_2.
4581 (compare_debug_dump_opt_spec_function): Likewise.
4582 (compare_debug_self_opt_spec_function): Likewise.
4583
4584 2018-07-31 Olivier Hainque <hainque@adacore.com>
4585
4586 * common.opt (nolibc): New option.
4587 * doc/invoke.texi (Link Options): Document it.
4588 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4589 * config/alpha/linux.h: Likewise.
4590 * config/arc/elf.h: Likewise.
4591 * config/arm/uclinux-elf.h: Likewise.
4592 * config/arm/unknown-elf.h: Likewise.
4593 * config/avr/avrlibc.h: Likewise.
4594 * config/bfin/bfin.h: Likewise.
4595 * config/bfin/linux.h: Likewise.
4596 * config/bfin/uclinux.h: Likewise.
4597 * config/darwin.h: Likewise.
4598 * config/darwin10.h: Likewise.
4599 * config/darwin12.h: Likewise.
4600 * config/gnu-user.h: Likewise.
4601 * config/lm32/uclinux-elf.h: Likewise.
4602 * config/pa/pa-hpux11.h: Likewise.
4603 * config/pa/pa64-hpux.h: Likewise.
4604 * config/sparc/sparc.h: Likewise.
4605
4606 2018-07-31 Olivier Hainque <hainque@adacore.com>
4607
4608 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4609 undefined variables.
4610
4611 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4612
4613 PR target/86640
4614 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4615 instead of GEN_INT.
4616
4617 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4618
4619 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4620 terminated string literal.
4621
4622 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4623
4624 PR rtl-optimization/85160
4625 * combine.c (is_just_move): New function.
4626 (try_combine): Allow combining two instructions into two if neither of
4627 the original instructions was a move.
4628
4629 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4630
4631 PR target/86673
4632 * doc/extend.texi (Global Register Variables): Discourage use of type
4633 qualifiers.
4634 (Local Register Variables): Likewise.
4635
4636 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4637
4638 PR tree-optimization/86506
4639 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4640
4641 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4642
4643 PR target/86547
4644 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4645 hard_regno, make sure no insn between `from` and `to` clobbers it.
4646
4647 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4648 Tom de Vries <tdevries@suse.de>
4649
4650 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4651 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4652 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4653 PTX_DEFAULT_RUNTIME_DIM.
4654 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4655
4656 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4657
4658 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4659 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4660 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4661
4662 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4663
4664 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4665 used.
4666 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4667 predicate to reflect toc fusion has been deleted.
4668 (toc_fusion_mem_raw): Delete, no longer used.
4669 (toc_fusion_mem_wrapped): Likewise.
4670 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4671 fusion mask bit.
4672 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4673 Delete, no longer used.
4674 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4675 meant to be used for toc fusion.
4676 (rs6000_debug_print_mode): Delete toc fusion debugging.
4677 (rs6000_debug_reg_global): Likewise.
4678 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4679 fusion and secondary reload support that were never used.
4680 (rs6000_option_override_internal): Delete TOC fusion, that was only
4681 partially defined, and it did not work unless you also used the
4682 -mcmodel= switch.
4683 (rs6000_legitimate_address_p): Delete TOC fusion support.
4684 (rs6000_opt_masks): Likewise.
4685 (fusion_wrap_memory_address): Delete function, no longer used.
4686 (fusion_split_address); Delete TOC fusion support.
4687 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4688 longer used with toc fusion being deleted.
4689 (TARGET_TOC_FUSION_FP): Likewise.
4690 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4691 UNSPEC.
4692 (toc fusion spliter): Delete TOC fusion support.
4693 (toc_fusionload_<mode>): Likewise.
4694 (toc_fusionload_di): Likewise.
4695 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4696 longer needs to be named. Rename predicate to delete TOC fusion.
4697 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4698 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4699 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4700 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4701 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4702
4703 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4704
4705 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4706 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4707 __int128 in built-in function prototypes.
4708 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4709 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4710
4711 2018-07-27 Martin Sebor <msebor@redhat.com>
4712
4713 PR tree-optimization/86696
4714 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4715 types, including enums.
4716 (handle_char_store): Be prepared for the above function to fail.
4717
4718 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4719
4720 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4721 when optimization level is lower than 2 or optimize for size.
4722
4723 2018-07-26 Martin Sebor <msebor@redhat.com>
4724
4725 PR tree-optimization/86043
4726 PR tree-optimization/86042
4727 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4728 (get_string_cst_length): Rename...
4729 (get_min_string_length): ...to this. Add argument.
4730 (handle_char_store): Extend to handle multi-character stores by
4731 MEM_REF.
4732 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4733 * tree.h (initializer_zerop): Add argument.
4734
4735 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4736
4737 PR middle-end/86660
4738 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4739 declare target to variables if they have always,{to,from,tofrom} map
4740 kinds.
4741
4742 2018-07-26 Martin Liska <mliska@suse.cz>
4743
4744 PR lto/86548
4745 * lto-wrapper.c: Add linker_output as prefix
4746 for ltrans_output_file.
4747
4748 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4749
4750 PR rtl-optimization/85805
4751 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4752 value for hard registers if that was written in the same mode.
4753
4754 2018-07-26 Martin Liska <mliska@suse.cz>
4755
4756 PR gcov-profile/86536
4757 * gcov.c (format_gcov): Use printf format %.*f directly
4758 and do not handle special values.
4759
4760 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4761
4762 * common/config/arc/arc-common.c (arc_option_optimization_table):
4763 Update default optimizations for size.
4764
4765 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4766
4767 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4768 * config/arc/constraints.md (CfZ): New constraint.
4769 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4770 (subsf3_fpu): Likewise.
4771 (cmpsf_fpu): Likewise.
4772 (cmpsf_fpu_uneq): Likewise.
4773
4774 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4775
4776 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4777 accesses as well.
4778 (arc_is_uncached_mem_p): uncached applies to both the variable and
4779 the pointer.
4780
4781 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4782
4783 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4784 register names.
4785
4786 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4787
4788 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4789 field "m_scopes" from vec to auto_vec.
4790
4791 2018-07-25 Martin Liska <mliska@suse.cz>
4792
4793 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4794 return type.
4795
4796 2018-07-25 Richard Biener <rguenther@suse.de>
4797
4798 PR debug/86654
4799 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4800 special wrt context_die late.
4801 (gen_subprogram_die): Re-use DIEs in local scope.
4802
4803 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4804
4805 PR tree-optimization/86644
4806 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4807
4808 2018-07-25 Martin Liska <mliska@suse.cz>
4809
4810 PR middle-end/86645
4811 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4812 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4813
4814 2018-07-25 Martin Liska <mliska@suse.cz>
4815
4816 PR sanitizer/79635
4817 * params.def: Explain ASan abbreviation and provide
4818 a documentation link.
4819
4820 2018-07-24 Martin Sebor <msebor@redhat.com>
4821
4822 PR tree-optimization/86622
4823 PR tree-optimization/86532
4824 * builtins.h (string_length): Declare.
4825 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4826 (check_access): Be prepared for non-constant length ranges.
4827 (string_length): Make extern.
4828 * expr.c (string_constant): Only handle the minor non-constant
4829 array index. Use string_constant to compute the length of
4830 a generic string constant.
4831
4832 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4833
4834 PR tree-optimization/86618
4835 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4836 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4837
4838 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4839
4840 PR tree-optimization/86636
4841 * json.cc (json::object::set): Fix comment. Add assertions.
4842 (json::array::append): Move here from json.h. Add comment and an
4843 assertion.
4844 (json::string::string): Likewise.
4845 * json.h (json::array::append): Move to json.cc.
4846 (json::string::string): Likewise.
4847 * optinfo-emit-json.cc
4848 (optrecord_json_writer::impl_location_to_json): Assert that we
4849 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4850 wrapper around it. Expand the location once, rather than three
4851 times.
4852 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4853 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4854 wrappers.
4855 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4856 places. Fix some overlong lines.
4857
4858 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4859
4860 * config/aarch64/aarch64-simd.md
4861 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4862 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4863 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4864 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4865 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4866 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4867 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4868 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4869 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4870
4871 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4872
4873 PR middle-end/86627
4874 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4875 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4876 and abs_d == d, do the power of two handling if profitable.
4877
4878 2018-07-24 Richard Biener <rguenther@suse.de>
4879
4880 * match.pd: Add BIT_FIELD_REF canonicalizations.
4881
4882 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4883
4884 PR c/86617
4885 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4886
4887 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4888
4889 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4890 terminated STRING_CST object.
4891
4892 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4893
4894 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4895
4896 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4897
4898 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4899 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4900 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4901 the elements into a register.
4902 (rs6000_split_v4si_init_di_reg): Delete.
4903 (rs6000_split_v4si_init): Delete.
4904 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4905 (vsx_init_v4si): Rewrite as a define_expand.
4906
4907 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4908
4909 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4910 zero_extend argument from memory): New.
4911
4912 2018-07-22 Martin Sebor <msebor@redhat.com>
4913
4914 PR bootstrap/86621
4915 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4916 diagnosing calls with unknown arguments unless -Walloca-larger-than
4917 is restricted to less than PTRDIFF_MAX bytes.
4918
4919 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4920
4921 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4922
4923 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4924
4925 * pretty-print.c (text_info::set_location): Remove redundant
4926 "line_table" parameter from call to rich_location::set_range.
4927
4928 2018-07-20 Martin Sebor <msebor@redhat.com>
4929
4930 PR middle-end/82063
4931 * builtins.c (expand_builtin_alloca): Adjust.
4932 * calls.c (alloc_max_size): Simplify.
4933 * cgraphunit.c (cgraph_node::expand): Adjust.
4934 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4935 variables.
4936 (frame_larger_than_size): Same.
4937 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4938 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4939 Initialize.
4940 * doc/invoke.texi (GCC Command Options): Document option arguments.
4941 Explain byte-size arguments and suffixes.
4942 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4943 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4944 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4945 * doc/options.texi (UInteger): Expand.
4946 (Host_Wide_Int, ByteSize): Document new properties.
4947 * final.c (final_start_function_1): Include sizes in an error message.
4948 * function.c (frame_offset_overflow): Same.
4949 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4950 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4951 Diagnose unbounded alloca calls only for limits of less than
4952 PTRDIFF_MAX.
4953 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4954 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4955 for alloca(0).
4956 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4957 only for limits of less than PTRDIFF_MAX.
4958 * langhooks-def.h (lhd_handle_option): Change function argument
4959 to HOST_WIDE_INT.
4960 * langhooks.c (lhd_handle_option): Same.
4961 * langhooks.h (handle_option): Same.
4962 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4963 ByteSize flags.
4964 (var_type, var_type_struct): Same.
4965 (var_set): Handle ByteSize flag.
4966 * optc-gen.awk: Add comments to output to ease debugging. Make
4967 use of HOST_WIDE_INT where appropriate.
4968 * opts-gen-save.awk: Use %lx to format unsigned long.
4969 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4970 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4971 arguments. Parse bytes-size suffixes.
4972 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4973 (enum_value_to_arg): Same.
4974 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4975 (handle_option): Adjust.
4976 (generate_option): Change function argument to HOST_WIDE_INT.
4977 (cmdline_handle_error): Adjust.
4978 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4979 (set_option): Change function argument to HOST_WIDE_INT.
4980 (option_enabled): Handle cl_host_wide_int.
4981 (get_option_state): Handle CLVC_SIZE.
4982 (control_warning_option): Same.
4983 * opts.c (common_handle_option): Change function argument to
4984 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4985 OPT_Wvla_larger_than_.
4986 * opts.h (enum cl_var_type): Add an enumerator.
4987 * stor-layout.c (layout_decl): Print a more meaningful warning.
4988 * toplev.c (output_stack_usage): Adjust.
4989
4990 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4991
4992 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4993 call to inline_expand_builtin_string_cmp.
4994 (expand_builtin_strcmp): Likewise.
4995 (expand_builtin_strncmp): Likewise.
4996 (inline_string_cmp): Delete the last parameter, change char_type_node
4997 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4998 two operands.
4999 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5000 the inlining expansion on target where the type of the call has same or
5001 narrower precision than unsigned char.
5002
5003 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5004
5005 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5006 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5007 * common.opt (fsave-optimization-record): New option.
5008 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5009 * doc/invoke.texi (-fsave-optimization-record): New option.
5010 * dumpfile.c: Include "optinfo-emit-json.h".
5011 (struct kv_pair): Move to coretypes.h.
5012 (optgroup_options): Make non-static.
5013 (dump_context::end_scope): Call
5014 optimization_records_maybe_pop_dump_scope.
5015 * dumpfile.h (optgroup_options): New decl.
5016 * json.cc: New file.
5017 * json.h: New file.
5018 * optinfo-emit-json.cc: New file.
5019 * optinfo-emit-json.h: New file.
5020 * optinfo.cc: Include "optinfo-emit-json.h".
5021 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5022 (optinfo_enabled_p): Check optimization_records_enabled_p.
5023 (optinfo_wants_inlining_info_p): Likewise.
5024 * optinfo.h: Update comment.
5025 * profile-count.c (profile_quality_as_string): New function.
5026 * profile-count.h (profile_quality_as_string): New decl.
5027 (profile_count::quality): New accessor.
5028 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5029 and optinfo_emit_json_cc_tests.
5030 * selftest.h (selftest::json_cc_tests): New decl.
5031 (selftest::optinfo_emit_json_cc_tests): New decl.
5032 * toplev.c: Include "optinfo-emit-json.h".
5033 (compile_file): Call optimization_records_finish.
5034 (do_compile): Call optimization_records_start.
5035 * tree-ssa-live.c: Include optinfo.h.
5036 (remove_unused_scope_block_p): Retain inlining information if
5037 optinfo_wants_inlining_info_p returns true.
5038
5039 2018-07-20 Richard Biener <rguenther@suse.de>
5040
5041 PR debug/86585
5042 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5043 to cover -flto-partition=none.
5044
5045 2018-07-20 Martin Liska <mliska@suse.cz>
5046
5047 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5048 (get_decl_source_range): Remove unused function.
5049
5050 2018-07-20 Richard Biener <rguenther@suse.de>
5051
5052 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5053 (struct vn_phi_s): Likewise.
5054 (struct vn_reference_s): Likewise.
5055 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5056 for searching the slot of an entry known to be in the hash itself.
5057 (vn_phi_hasher::equal): Likewise.
5058 (vn_reference_hasher::equal): Likewise.
5059 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5060 globals.
5061 (optimistic_info, current_info): Remove, keeping only valid_info.
5062 (vn_reference_lookup_1): Remove fallback lookup.
5063 (vn_reference_lookup_2): Likewise.
5064 (vn_nary_op_lookup_1): Likewise.
5065 (vn_phi_lookup): Likewise.
5066 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5067 hash element.
5068 (vn_reference_insert): Adjust, chain the inserted hash element
5069 at last_inserted_ref.
5070 (vn_reference_insert_pieces): Likewise.
5071 (visit_reference_op_call): Likewise.
5072 (vn_nary_op_insert_into): Chain the inserted hash element at
5073 last_inserted_nary.
5074 (vn_nary_op_insert_pieces): Adjust.
5075 (vn_nary_op_insert): Likewise.
5076 (vn_nary_op_insert_stmt): Likewise.
5077 (vn_phi_insert): Adjust, chain the inserted hash element at
5078 last_inserted_phi.
5079 (process_scc): Remove clearing and copying the optimistic
5080 table. Instead remove elements inserted during an optimistic
5081 iteration from the single table we maintain.
5082 (init_scc_vn): Adjust.
5083 (free_scc_vn): Likewise.
5084 (sccvn_dom_walker::record_cond): Likewise.
5085 (sccvn_dom_walker::after_dom_children): Likewise.
5086
5087 2018-07-19 Martin Sebor <msebor@redhat.com>
5088
5089 PR tree-optimization/84047
5090 PR tree-optimization/83776
5091 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5092 (check_array_bounds): Call it.
5093
5094 2018-07-19 Martin Sebor <msebor@redhat.com>
5095
5096 * align.h (align_flags): Use member initialization.
5097
5098 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5099
5100 * Makefile.in (OBJS): Add optinfo.o.
5101 * coretypes.h (class symtab_node): New forward decl.
5102 (struct cgraph_node): New forward decl.
5103 (class varpool_node): New forward decl.
5104 * dump-context.h: New file.
5105 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5106 "tree-pass.h".
5107 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5108 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5109 (set_alt_dump_file): Likewise.
5110 (dump_context::~dump_context): New dtor.
5111 (dump_gimple_stmt): Move implementation to...
5112 (dump_context::dump_gimple_stmt): ...this new member function.
5113 Add the stmt to any pending optinfo, creating one if need be.
5114 (dump_gimple_stmt_loc): Move implementation to...
5115 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5116 Start a new optinfo and add the stmt to it.
5117 (dump_gimple_expr): Move implementation to...
5118 (dump_context::dump_gimple_expr): ...this new member function.
5119 Add the stmt to any pending optinfo, creating one if need be.
5120 (dump_gimple_expr_loc): Move implementation to...
5121 (dump_context::dump_gimple_expr_loc): ...this new member function.
5122 Start a new optinfo and add the stmt to it.
5123 (dump_generic_expr): Move implementation to...
5124 (dump_context::dump_generic_expr): ...this new member function.
5125 Add the tree to any pending optinfo, creating one if need be.
5126 (dump_generic_expr_loc): Move implementation to...
5127 (dump_context::dump_generic_expr_loc): ...this new member
5128 function. Add the tree to any pending optinfo, creating one if
5129 need be.
5130 (dump_printf): Move implementation to...
5131 (dump_context::dump_printf_va): ...this new member function. Add
5132 the text to any pending optinfo, creating one if need be.
5133 (dump_printf_loc): Move implementation to...
5134 (dump_context::dump_printf_loc_va): ...this new member function.
5135 Start a new optinfo and add the stmt to it.
5136 (dump_dec): Move implementation to...
5137 (dump_context::dump_dec): ...this new member function. Add the
5138 value to any pending optinfo, creating one if need be.
5139 (dump_context::dump_symtab_node): New member function.
5140 (dump_context::get_scope_depth): New member function.
5141 (dump_context::begin_scope): New member function.
5142 (dump_context::end_scope): New member function.
5143 (dump_context::ensure_pending_optinfo): New member function.
5144 (dump_context::begin_next_optinfo): New member function.
5145 (dump_context::end_any_optinfo): New member function.
5146 (dump_context::s_current): New global.
5147 (dump_context::s_default): New global.
5148 (dump_scope_depth): Delete global.
5149 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5150 (dump_symtab_node): New function.
5151 (get_dump_scope_depth): Reimplement in terms of dump_context.
5152 (dump_begin_scope): Likewise.
5153 (dump_end_scope): Likewise.
5154 (selftest::temp_dump_context::temp_dump_context): New ctor.
5155 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5156 (selftest::verify_item): New function.
5157 (ASSERT_IS_TEXT): New macro.
5158 (ASSERT_IS_TREE): New macro.
5159 (ASSERT_IS_GIMPLE): New macro.
5160 (selftest::test_capture_of_dump_calls): New test.
5161 (selftest::dumpfile_c_tests): Call it.
5162 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5163 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5164 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5165 descriptive comment.
5166 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5167 (dump_node, dump_bb): Move these unrelated decls.
5168 (class dump_manager): Add leading comment.
5169 * optinfo.cc: New file.
5170 * optinfo.h: New file.
5171
5172 2018-07-19 Michael Collison <michael.collison@arm.com>
5173 Richard Henderson <rth@redhat.com>
5174
5175 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5176 (subti): Handle op1 zero.
5177 (subvti4, usub4ti4): New.
5178 (*sub<GPI>3_compare1_imm): New.
5179 (sub<GPI>3_carryinCV): New.
5180 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5181 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5182
5183 2018-07-19 Michael Collison <michael.collison@arm.com>
5184 Richard Henderson <rth@redhat.com>
5185
5186 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5187 (addti3): Create simpler code if low part is already known to be 0.
5188 (addvti4, uaddvti4): New.
5189 (*add<GPI>3_compareC_cconly_imm): New.
5190 (*add<GPI>3_compareC_cconly): New.
5191 (*add<GPI>3_compareC_imm): New.
5192 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5193 handle constants within this pattern..
5194 (*add<GPI>3_compareV_cconly_imm): New.
5195 (*add<GPI>3_compareV_cconly): New.
5196 (*add<GPI>3_compareV_imm): New.
5197 (add<GPI>3_compareV): New.
5198 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5199 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5200 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5201 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5202 with 'comparison' operator.
5203 (*add<GPI>3_compareV_cconly_imm): Ditto.
5204 (*add<GPI>3_compareV_cconly): Ditto.
5205 (*add<GPI>3_compareV_imm): Ditto.
5206 (add<GPI>3_compareV): Ditto.
5207 (add<mode>3_carryinC): Ditto.
5208 (*add<mode>3_carryinC_zero): Ditto.
5209 (*add<mode>3_carryinC): Ditto.
5210 (add<mode>3_carryinV): Ditto.
5211 (*add<mode>3_carryinV_zero): Ditto.
5212 (*add<mode>3_carryinV): Ditto.
5213
5214 2018-07-19 Michael Collison <michael.collison@arm.com>
5215 Richard Henderson <rth@redhat.com>
5216
5217 * config/aarch64/aarch64-modes.def (CC_V): New.
5218 * config/aarch64/aarch64-protos.h
5219 (aarch64_addti_scratch_regs): Declare
5220 (aarch64_subvti_scratch_regs): Declare.
5221 (aarch64_expand_subvti): Declare.
5222 (aarch64_gen_unlikely_cbranch): Declare
5223 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5224 for signed overflow using CC_Vmode.
5225 (aarch64_get_condition_code_1): Handle CC_Vmode.
5226 (aarch64_gen_unlikely_cbranch): New function.
5227 (aarch64_addti_scratch_regs): New function.
5228 (aarch64_subvti_scratch_regs): New function.
5229 (aarch64_expand_subvti): New function.
5230
5231 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5232
5233 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5234 extension.
5235 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5236 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5237 extension.
5238
5239 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5240
5241 PR target/83009
5242 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5243 address check not strict.
5244
5245 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5246
5247 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5248 Umq with Umn.
5249 (store_pair_lanes<mode>): Likewise.
5250 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5251 enum value 'ADDR_QUERY_LDP_STP_N'.
5252 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5253 (aarch64_print_address_internal): Add declaration.
5254 (aarch64_print_ldpstp_address): Remove.
5255 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5256 (aarch64_print_operand): Change printing of 'y'.
5257 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5258 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5259 'true' rather than '1'.
5260 * config/aarch64/constraints.md (Uml): Likewise.
5261 (Uml): Rename to Umn.
5262 (Umq): Remove.
5263
5264 2018-07-19 Richard Biener <rguenther@suse.de>
5265
5266 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5267 a trailing array.
5268 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5269 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5270 (vn_reference_hasher): Likewise.
5271 (struct vn_tables_s): Remove obstack and alloc-pool members.
5272 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5273 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5274 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5275 (vn_reference_insert_pieces): Likewise.
5276 (alloc_vn_nary_op_noinit): Adjust.
5277 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5278 (vn_phi_eq): Adjust.
5279 (shared_lookup_phiargs): Remove.
5280 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5281 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5282 (visit_reference_op_call): Likewise.
5283 (copy_nary, copy_phi, copy_reference): Remove.
5284 (process_scc): Rewind the obstack when iterating. Do not
5285 copy the elements to valid_info but just move them from one
5286 hashtable to the other.
5287 (allocate_vn_table): Adjust.
5288 (free_vn_table): Likewise.
5289 (init_scc_vn): Likewise.
5290 (free_scc_vn): Likewise.
5291
5292 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5293
5294 PR target/86560
5295 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5296 indirect_return as function type attribute.
5297 (ix86_attribute_table): Change indirect_return to function
5298 type attribute.
5299 * doc/extend.texi: Update indirect_return attribute.
5300
5301 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5302
5303 * wide-int.h (widest2_int): New.
5304 * gimple-fold.c (arith_overflowed_p): Use it.
5305 * tree.h (widest2_int_cst): New.
5306 * tree-vrp.c (wide_int_binop_overflow): Rename from
5307 vrp_int_const_binop.
5308 Rewrite to work on trees.
5309 (extract_range_from_multiplicative_op_1): Abstract code to...
5310 (wide_int_range_min_max): ...here.
5311 (wide_int_range_cross_product): ...and here.
5312 (extract_range_from_binary_expr_1): Abstract overflow code to...
5313 (wide_int_range_mult_wrapping): ...here.
5314 * tree-vrp.h (wide_int_range_cross_product): New.
5315 (wide_int_range_mult_wrapping): New.
5316
5317 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5318 Julia Koval <julia.koval@intel.com>
5319
5320 * config/i386/x86-tune-costs.h (skylake_memcpy,
5321 skylake_memset): Replace rep_prefix with unrolling for size 512.
5322
5323 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5324
5325 PR middle-end/86544
5326 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5327 comparision with EQ_EXPR in last stmt.
5328
5329 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5330
5331 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5332 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5333 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5334 previously known as "PowerPC AltiVec Built-in Functions". Move
5335 some material to new subsubsections "PowerPC AltiVec Built-in
5336 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5337 ISA 2.07".
5338 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5339 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5340 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5341 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5342
5343 2018-07-18 Richard Biener <rguenther@suse.de>
5344
5345 PR tree-optimization/86557
5346 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5347 EXACT_DIV_EXPR.
5348
5349 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5350
5351 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5352
5353 2018-07-17 Jeff Law <law@redhat.com>
5354
5355 * config/arm/arm.c (get_label_padding): Update for recent
5356 changes to label_to_alignment.
5357
5358 PR tree-optimization/86010
5359 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5360
5361 * config/mips/mips.c (vr4130_align_insns): Update for recent
5362 changes to label_to_alignment.
5363
5364 * config/frv/frv.c (frv_label_align): Update for recent changes
5365 to label_to_alignment.
5366
5367 * config/nios2/nios2.c (nios2_label_align): Update for recent
5368 changes which dropped ALIGN_LABELS_LOG.
5369
5370 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5371
5372 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5373 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5374
5375 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5376
5377 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5378 deprecated align_labels_log.
5379
5380 2018-07-17 Richard Biener <rguenther@suse.de>
5381
5382 PR lto/86456
5383 * dwarf2out.c (init_sections_and_labels): Always generate
5384 a debug_line_str_section for early LTO debug.
5385 (dwarf2out_finish): Reset debug_line_str_hash output early.
5386 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5387 with fat LTO part.
5388 (dwarf2out_early_finish): Output debug_line_str.
5389
5390 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5391
5392 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5393 index register on z196 or later.
5394
5395 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5396
5397 * config/s390/s390.c (s390_default_align): Set default function
5398 alignment to 16.
5399 (s390_override_options_after_change): Call s390_default align.
5400 (s390_option_override_internal): Call s390_default_align.
5401 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5402
5403 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5404
5405 PR middle-end/86542
5406 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5407 to _looptemp_ clauses, other than the first two.
5408
5409 2018-07-17 Martin Liska <mliska@suse.cz>
5410
5411 * opts.c: Do not enable OPT_falign_* for -Os.
5412
5413 2018-07-17 Martin Liska <mliska@suse.cz>
5414
5415 * align.h (MAX_CODE_ALIGN): New.
5416 (MAX_CODE_ALIGN_VALUE): New.
5417 * common/config/i386/i386-common.c (ix86_handle_option):
5418 (MAX_CODE_ALIGN): Moved to align.h.
5419 * final.c (MAX_CODE_ALIGN): Likewise.
5420 * opts.c (parse_and_check_align_values):
5421 (MAX_CODE_ALIGN): Likewise.
5422 (MAX_CODE_ALIGN_VALUE): Likewise.
5423
5424 2018-07-17 Martin Liska <mliska@suse.cz>
5425
5426 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5427 in order to fulfil coding style.
5428 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5429 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5430 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5431 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5432 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5433 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5434 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5435 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5436 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5437
5438 2018-07-17 Martin Liska <mliska@suse.cz>
5439
5440 * align.h: New file.
5441 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5442 directly.
5443 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5444 align_flags of label_to_alignment.
5445 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5446 align_flags class.
5447 * config/m68k/m68k.c: Do not use removed align_labels_value and
5448 align_loops_value.
5449 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5450 (LOOP_ALIGN): Likewise.
5451 (LABEL_ALIGN): Likewise.
5452 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5453 Remove not used macro.
5454 (rs6000_loop_align): Change return type to align_flags.
5455 (rs6000_loop_align_max_skip): Remove.
5456 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5457 Change return type to align_flags.
5458 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5459 Remove not used macro.
5460 (rs6000_loop_align): Change return type to align_flags.
5461 (rs6000_loop_align_max_skip): Remove.
5462 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5463 * config/rx/rx-protos.h (rx_align_for_label): Make it
5464 static function.
5465 * config/rx/rx.c (rx_align_for_label): Change return type
5466 to align_flags.
5467 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5468 macro definitions.
5469 into align_flags class.
5470 (LABEL_ALIGN): Likewise.
5471 (LOOP_ALIGN): Likewise.
5472 * config/s390/s390.c (s390_label_align): Use align_flags
5473 class member.
5474 (s390_asm_output_function_label): Likewise.
5475 * config/sh/sh.c (sh_override_options_after_change):
5476 Use align_flags class directly without macros.
5477 (find_barrier): Likewise.
5478 (barrier_align): Likewise.
5479 (sh_loop_align): Likewise.
5480 * config/spu/spu.c (spu_option_override):
5481 Use align_flags_tuple::get_value instead of removed macros.
5482 (spu_sched_init): Likewise.
5483 * config/spu/spu.h (GTY): Likewise.
5484 * config/visium/visium.c (visium_option_override):
5485 Set "8" as default secondary alignment.
5486 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5487 in order to guarantee secondary alignment of 8.
5488 * coretypes.h: Include align.h header file.
5489 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5490 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5491 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5492 * doc/tm.texi.in: Likewise.
5493 * final.c (struct label_alignment): Remove not used structure.
5494 (LABEL_ALIGN): Change type to align_flags.
5495 (LOOP_ALIGN): Likewise.
5496 (JUMP_ALIGN): Likewise.
5497 (default_loop_align_max_skip): Remove.
5498 (default_label_align_max_skip): Likewise.
5499 (default_jump_align_max_skip): Likewise.
5500 (default_label_align_after_barrier_max_skip):
5501 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5502 (LABEL_TO_MAX_SKIP): Remove.
5503 (label_to_alignment): Return align_flags type instead of integer.
5504 (label_to_max_skip): Remove.
5505 (align_fuzz): Use align_flags type.
5506 (compute_alignments): Use align_flags type and use align_flags::max
5507 to combine multiple alignments.
5508 (grow_label_align): Grow vec instead of C array.
5509 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5510 (shorten_branches): Use align_flags type and use align_flags::max
5511 to combine multiple alignments.
5512 (final_scan_insn_1): Remove usage of secondary alignment that comes
5513 from label alignment, but instead use proper secondary alignment
5514 which is computed in grow_label_align.
5515 * flags.h (struct align_flags_tuple): Move to align.h.
5516 (struct align_flags): Likewise.
5517 (state_align_loops): Rename to align_loops.
5518 (state_align_jumps): Rename to align_jumps.
5519 (state_align_labels): Rename to align_labels.
5520 (state_align_functions): Rename to align_functions.
5521 (align_loops_log): Remove.
5522 (align_jumps_log): Remove.
5523 (align_labels_log): Remove.
5524 (align_functions_log): Remove.
5525 (align_loops_max_skip): Remove.
5526 (align_jumps_max_skip): Remove.
5527 (align_labels_max_skip): Remove.
5528 (align_functions_max_skip): Remove.
5529 (align_loops_value): Remove.
5530 (align_jumps_value): Remove.
5531 (align_labels_value): Remove.
5532 (align_functions_value): Remove.
5533 * output.h (label_to_alignment): Change return type to align_flags.
5534 (label_to_max_skip): Remove.
5535 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5536 jump_align_max_skip macros.
5537 * targhooks.h (default_loop_align_max_skip): Remove.
5538 (default_label_align_max_skip): Likewise.
5539 (default_jump_align_max_skip): Likewise.
5540 (default_label_align_after_barrier_max_skip): Remove.
5541 * toplev.c (read_log_maxskip): Use ::normalize function.
5542 (parse_N_M): Remove not used argument and also call ::normalize.
5543 (parse_alignment_opts): Do not pass unused arguments.
5544 * varasm.c (assemble_start_function): Use directly align_functions
5545 instead of removed macros.
5546 * system.h: Do not poison removed macros.
5547
5548 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5549
5550 PR middle-end/86539
5551 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5552 and cond temporaries don't have reference type if iterator has
5553 pointer type. For init use &for_pre_body instead of pre_p if
5554 for_pre_body is non-empty.
5555
5556 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5557
5558 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5559 double-double modes to SFmode directly directly.
5560 (trunc<mode>sf2_fprs): Delete.
5561
5562 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5563
5564 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5565 for conversions between IFmode and the decimal floating point modes.
5566 (init_float128_ieee): Use the correct names for conversions between
5567 KFmode and the decimal floating point modes.
5568
5569 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5570
5571 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5572 for the conversions between TDmode and IFmode.
5573 (init_float128_ieee): Use more correct names for the conversions
5574 between TDmode and KFmode.
5575
5576 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5577
5578 PR tree-optimization/86526
5579 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5580 (inline_expand_builtin_string_cmp): Likewise.
5581 (inline_string_cmp): Likewise. Use c_readstr instead of
5582 builtin_memcpy_read_str. Add unit_mode temporary.
5583
5584 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5585
5586 PR middle-end/86528
5587 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5588 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5589
5590 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5591
5592 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5593 Alphabetize prototypes of built-in functions, separating out
5594 built-in functions that are listed in this section but should be
5595 described elsewhere.
5596
5597 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5598
5599 PR target/86511
5600 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5601 conditional move when trapping comparison was split to a
5602 non-trapping one (and vice versa).
5603
5604 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5605
5606 * config/s390/s390.c (s390_function_profiler): Generate nops
5607 instead of profiler call sequences.
5608 * config/s390/s390.opt: Add the new option.
5609
5610 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5611
5612 * config/s390/s390.c (s390_function_profiler): Generate
5613 __mcount_loc section.
5614 * config/s390/s390.opt: Add the new option.
5615
5616 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5617
5618 * common.opt: Add the new warning.
5619 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5620 %r0,__fentry__" when -mfentry is specified.
5621 (s390_option_override_internal): Disallow -mfentry for 31-bit
5622 CPUs.
5623 * config/s390/s390.opt: Add the new option.
5624
5625 2018-07-16 Richard Biener <rguenther@suse.de>
5626
5627 PR lto/86523
5628 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5629 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5630
5631 2018-07-16 Martin Liska <mliska@suse.cz>
5632
5633 PR ipa/86529
5634 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5635 to ::get_create.
5636
5637 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5638
5639 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5640
5641 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5642
5643 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5644 for ARCHS4x.
5645 * config/arc/arc-cpus.def (hs4x): New cpu.
5646 (hs4xd): Likewise.
5647 * config/arc/arc-tables.opt: Regenerate.
5648 * config/arc/arc.c (arc_sched_issue_rate): New function.
5649 (TARGET_SCHED_ISSUE_RATE): Define.
5650 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5651 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5652 fpu_cvt.
5653 (attr tune): Add ARCHS4x tune values.
5654 (attr tune_dspmpy): Define.
5655 (*tst): Correct instruction type.
5656 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5657 * config/arc/arcHS4x.md: New file.
5658 * config/arc/fpu.md: Update instruction type attributes.
5659 * config/arc/t-multilib: Regenerate.
5660
5661 2018-07-16 Tom de Vries <tdevries@suse.de>
5662
5663 PR debug/86455
5664 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5665
5666 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5667
5668 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5669 early clobber.
5670
5671 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5672
5673 PR tree-optimization/86514
5674 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5675 conversion to a boolean type from a type with greater precision.
5676
5677 2018-07-16 Tom de Vries <tdevries@suse.de>
5678
5679 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5680 dump_flags request TDF_SLIM.
5681
5682 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5683
5684 * fold-const.c (int_const_binop_1): Abstract...
5685 (wide_int_binop): ...wide int code here.
5686 (poly_int_binop): ...poly int code here.
5687 Abstract the rest of int_const_binop_1 into int_const_binop.
5688 * fold-const.h (wide_int_binop): New.
5689 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5690 Remove useless PLUS/MINUS_EXPR case.
5691 (zero_nonzero_bits_from_vr): Move wide int code...
5692 (zero_nonzero_bits_from_bounds): ...here.
5693 (extract_range_from_binary_expr_1): Move mask optimization code...
5694 (range_easy_mask_min_max): ...here.
5695 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5696 (range_easy_mask_min_max): New.
5697
5698 2018-07-15 Jeff Law <law@redhat.com>
5699
5700 PR target/85993
5701 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5702 block.
5703
5704 2018-07-14 Jim Wilson <jimw@sifive.com>
5705
5706 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5707
5708 2018-07-14 Paul Koning <ni1d@arrl.net>
5709
5710 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5711
5712 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5713
5714 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5715 copying section.
5716
5717 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5718 Steve Munroe <munroesj52@gmail.com>
5719
5720 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5721 (_mm_andnot_si128): Likewise.
5722 (_mm_or_si128): Likewise.
5723 (_mm_xor_si128): Likewise.
5724
5725 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5726
5727 PR middle-end/78809
5728 * builtins.c (expand_builtin_memcmp): Inline the calls first
5729 when result_eq is false.
5730 (expand_builtin_strcmp): Inline the calls first.
5731 (expand_builtin_strncmp): Likewise.
5732 (inline_string_cmp): New routine. Expand a string compare
5733 call by using a sequence of char comparison.
5734 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5735 a call to str(n)cmp/memcmp.
5736 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5737 New option.
5738 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5739
5740 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5741
5742 * config/arm/driver-arm.c: Include arm-native.h.
5743 (host_detect_local_cpu): Use auto-generated data tables.
5744 (vendors, arm_cpu_table): Delete. Move part information to ...
5745 * config/arm/arm-cpus.in: ... here.
5746 * config/arm/parsecpu.awk (gen_native): New function.
5747 (vendor, part): New CPU fields.
5748 (END): Add support for building the native CPU detection tables.
5749 * config/arm/t-arm (arm-native.h): Add build rule.
5750 (driver-arm.o): Add dependency on arm-native.h.
5751
5752 2018-07-13 Richard Biener <rguenther@suse.de>
5753
5754 PR middle-end/85974
5755 * match.pd (addr1 - addr2): Allow either of the operand to
5756 have a conversion.
5757
5758 2018-07-13 Tom de Vries <tdevries@suse.de>
5759
5760 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5761 in remap_ssa_name.
5762
5763 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5764
5765 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5766 arrays instead of numbered variables.
5767
5768 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5769
5770 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5771 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5772
5773 2018-07-13 Richard Biener <rguenther@suse.de>
5774
5775 PR debug/86452
5776 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5777 instead of get_context_die.
5778
5779 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5780 Richard Biener <rguenther@suse.de>
5781
5782 PR middle-end/86489
5783 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5784 that the loop latch destination where phi is defined.
5785
5786 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5787
5788 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5789 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5790 (riscv_set_current_function): Extract getting interrupt type to new
5791 function.
5792 (riscv_get_interrupt_type): New function.
5793 (riscv_merge_decl_attributes): New function, checking interrupt type is
5794 same.
5795 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5796
5797 2018-07-12 Paul Koning <ni1d@arrl.net>
5798
5799 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5800 directive.
5801
5802 2018-07-12 Paul Koning <ni1d@arrl.net>
5803
5804 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5805 zero reference, add doloop_end instead.
5806 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5807 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5808 detail for doloop_end.
5809
5810 2018-07-12 Martin Sebor <msebor@redhat.com>
5811
5812 PR c/86453
5813 * attribs.c (decl_attributes): Reject conflicting attributes before
5814 calling attribute handlers.
5815
5816 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5817
5818 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5819 parameter.
5820 (gcc::dump_manager::get_dump_file_name): likewise.
5821 (dump_begin): Likewise.
5822 * dumpfile.h (dump_begin): Update prototype.
5823 (gcc::dump_manager::get_dump_file_name,
5824 gcc::dump_manager::get_dump_file_name): Update prototype.
5825
5826 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5827
5828 * internal-fn.h (vectorizable_internal_fn_p): New function.
5829 * tree-vect-slp.c (compatible_calls_p): Likewise.
5830 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5831 to internal functions.
5832 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5833
5834 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5835
5836 * fold-const.h (inverse_conditions_p): Declare.
5837 * fold-const.c (inverse_conditions_p): New function.
5838 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5839 that test the inverse condition of a conditional internal function.
5840 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5841 * internal-fn.c (internal_fn_mask_index): Handle conditional
5842 internal functions.
5843 (vectorized_internal_fn_supported_p): New function.
5844 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5845 (any_pred_load_store): Replace with...
5846 (need_to_predicate): ...this new variable.
5847 (redundant_ssa_names): New variable.
5848 (ifcvt_can_use_mask_load_store): Move initial checks to...
5849 (ifcvt_can_predicate): ...this new function. Handle tree codes
5850 for which a conditional internal function exists.
5851 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5852 instead of ifcvt_can_use_mask_load_store. Update after variable
5853 name change.
5854 (predicate_load_or_store): New function, split out from
5855 predicate_mem_writes.
5856 (check_redundant_cond_expr): New function.
5857 (value_available_p): Likewise.
5858 (predicate_rhs_code): Likewise.
5859 (predicate_mem_writes): Rename to...
5860 (predicate_statements): ...this. Use predicate_load_or_store
5861 and predicate_rhs_code.
5862 (combine_blocks, tree_if_conversion): Update after above name changes.
5863 (ifcvt_local_dce): Handle redundant_ssa_names.
5864 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5865 general conditional functions.
5866 * tree-vect-stmts.c (vectorizable_call): Likewise.
5867
5868 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5869 Alan Hayward <alan.hayward@arm.com>
5870 David Sherwood <david.sherwood@arm.com>
5871
5872 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5873 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5874 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5875 plus and minus and convert them into IFN_COND_FMA-based sequences.
5876 (convert_mult_to_fma): Handle conditional plus and minus.
5877
5878 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5879
5880 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5881 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5882 (cond_fnms_optab): New optabs.
5883 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5884 internal functions.
5885 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5886 * internal-fn.h (get_conditional_internal_fn): Declare.
5887 (get_unconditional_internal_fn): Likewise.
5888 * internal-fn.c (cond_ternary_direct): New macro.
5889 (expand_cond_ternary_optab_fn): Likewise.
5890 (direct_cond_ternary_optab_supported_p): Likewise.
5891 (FOR_EACH_COND_FN_PAIR): Likewise.
5892 (get_conditional_internal_fn): New function.
5893 (get_unconditional_internal_fn): Likewise.
5894 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5895 (gimple_match_op::gimple_match_op): Add a new overload for 5
5896 operands.
5897 (gimple_match_op::set_op): Likewise.
5898 (gimple_resimplify5): Declare.
5899 * genmatch.c (decision_tree::gen): Generate simplifications for
5900 5 operands.
5901 * gimple-match-head.c (gimple_simplify): Define an overload for
5902 5 operands. Handle calls with 5 arguments in the top-level overload.
5903 (convert_conditional_op): Handle conversions from unconditional
5904 internal functions to conditional ones.
5905 (gimple_resimplify5): New function.
5906 (build_call_internal): Pass a fifth operand.
5907 (maybe_push_res_to_seq): Likewise.
5908 (try_conditional_simplification): Try converting conditional
5909 internal functions to unconditional internal functions.
5910 Handle 3-operand unconditional forms.
5911 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5912 Define ternary equivalents of the current rules for binary conditional
5913 internal functions.
5914 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5915 ternary operations.
5916 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5917 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5918 (optab): Handle them.
5919 (SVE_COND_FP_TERNARY): New int iterator.
5920 (sve_fmla_op, sve_fmad_op): New int attributes.
5921 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5922 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5923 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5924
5925 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5926
5927 * target.def (preferred_else_value): New target hook.
5928 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5929 * doc/tm.texi: Regenerate.
5930 * targhooks.h (default_preferred_else_value): Declare.
5931 * targhooks.c (default_preferred_else_value): New function.
5932 * internal-fn.h (conditional_internal_fn_code): Declare.
5933 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5934 (get_conditional_internal_fn): Use it.
5935 (conditional_internal_fn_code): New function.
5936 * gimple-match.h (gimple_match_cond): New struct.
5937 (gimple_match_op): Add a cond member function.
5938 (gimple_match_op::gimple_match_op): Update all forms to take a
5939 gimple_match_cond.
5940 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5941 for the suboperation, but don't specify a particular else_value.
5942 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5943 (visit_nary_op, visit_reference_op_load): Pass
5944 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5945 * gimple-match-head.c: Include tree-eh.h
5946 (convert_conditional_op): New function.
5947 (maybe_resimplify_conditional_op): Likewise.
5948 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5949 (gimple_resimplify2): Likewise.
5950 (gimple_resimplify3): Likewise.
5951 (gimple_resimplify4): Likewise.
5952 (maybe_push_res_to_seq): Return null for conditional operations.
5953 (try_conditional_simplification): New function.
5954 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5955 constructor.
5956 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5957 IFN_COND_* call.
5958 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5959 function.
5960 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5961
5962 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5963
5964 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5965 DECL_FCONTEXT
5966 (hash_tree): Do not hash DECL_FCONTEXT
5967 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5968 Do not stream DECL_FCONTEXT.
5969 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5970 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5971
5972 2018-07-12 Richard Biener <rguenther@suse.de>
5973
5974 PR debug/86462
5975 * dwarf2out.c (gen_block_die): Only output blocks when they have
5976 at least one !DECL_IGNORED_P variable.
5977
5978 2018-07-12 Richard Biener <rguenther@suse.de>
5979
5980 PR target/84829
5981 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5982 Remove -mieee-fp handling.
5983
5984 2018-07-12 Richard Biener <rguenther@suse.de>
5985
5986 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5987 left-over from last patch.
5988
5989 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5990
5991 PR tree-optimization/86492
5992 * gimple-ssa-store-merging.c
5993 (imm_store_chain_info::coalesce_immediate_stores): Call
5994 check_no_overlap even for the merge_overlapping case. Formatting fix.
5995
5996 2018-07-12 Richard Biener <rguenther@suse.de>
5997
5998 PR middle-end/86479
5999 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6000 move possibly trapping operations into the conditional.
6001
6002 2018-07-12 Richard Biener <rguenther@suse.de>
6003
6004 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6005 (vn_lookup_simplify_result): Remove recursion limit applied
6006 here.
6007 (vn_nary_build_or_lookup_1): Adjust.
6008 (try_to_simplify): Likewise.
6009 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6010 here.
6011 (gimple_resimplify2): Likewise.
6012 (gimple_resimplify3): Likewise.
6013 (gimple_resimplify4): Likewise.
6014
6015 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6016
6017 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6018 Use __mmask64 type instead of __mmask8 for __M argument.
6019 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6020 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6021 __U argument.
6022 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6023 __mmask16 for __M argument.
6024 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6025 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6026 to __mmask16 instead of __mmask8.
6027 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6028 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6029 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6030 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6031 instead of __mmask16 for __U argument.
6032 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6033 __mmask16 instead of __mmask8 for __U argument.
6034 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6035 __U argument.
6036 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6037 __mmask16.
6038 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6039 argument.
6040 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6041 __U argument.
6042 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6043 __mmask16.
6044 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6045 of __mmask16.
6046 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6047 __U argument.
6048 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6049 __U argument.
6050 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6051 __U argument.
6052 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6053 __U argument.
6054 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6055 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6056 return type as well as __M argument type and all casts from __mmask8
6057 to __mmask32.
6058 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6059 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6060 return type as well as __M argument type and all casts from __mmask8
6061 to __mmask16.
6062 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6063 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6064 return type as well as __M argument type and all casts from __mmask8
6065 to __mmask32.
6066 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6067 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6068 return type as well as __M argument type and all casts from __mmask8
6069 to __mmask16.
6070 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6071 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6072 __mmask16.
6073
6074 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6075
6076 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6077 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6078 for __U argument.
6079
6080 2018-07-11 Paul Koning <ni1d@arrl.net>
6081
6082 * doc/md.texi (define_subst): Document how multiple occurrences of
6083 the same argument in the replacement pattern are handled.
6084
6085 2018-07-11 Paul Koning <ni1d@arrl.net>
6086
6087 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6088 alphabetical order.
6089 (Common Type Attributes): Add "mode" attribute.
6090
6091 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6092
6093 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6094 stream DECL_ORIGINAL_TYPE.
6095 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6096 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6097 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6098 Do not walk original type.
6099 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6100 external decls.
6101 (write_ts_decl_non_common_tree_pointers): Do not stream
6102 DECL_ORIGINAL_TYPE
6103 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6104 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6105
6106 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6107
6108 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6109 thread twice from the same starting edge.
6110
6111 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6112
6113 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6114 * gimple.c (gimple_call_nonnull_result_p): ...here...
6115 (gimple_call_nonnull_arg): ...and here.
6116 * gimple.h (gimple_call_nonnull_result_p): New.
6117 (gimple_call_nonnull_arg): New.
6118
6119 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6120
6121 * config/arm/arm-cpus.in: Move information from fpu field of each
6122 cpu definition to the isa field.
6123 * config/arm/parsecpu.awk (fpu): Delete match rule.
6124 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6125
6126 2018-07-11 Richard Biener <rguenther@suse.de>
6127
6128 PR debug/86457
6129 * dwarf2out.c (init_sections_and_labels): Use
6130 output_asm_line_debug_info consistently.
6131 (dwarf2out_early_finish): Likewise.
6132 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6133 type units.
6134
6135 2018-07-11 Richard Biener <rguenther@suse.de>
6136
6137 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6138 Rework father_bb setting in a way to avoid propagating constants
6139 multiple times on a loop body.
6140
6141 2018-07-10 Mark Wielaard <mark@klomp.org>
6142
6143 PR debug/86459
6144 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6145
6146 2018-07-10 Richard Biener <rguenther@suse.de>
6147
6148 * hash-map.h (hash_map::iterator::operator*): Return
6149 references to key and value.
6150
6151 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6152
6153 PR c++/86443
6154 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6155 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6156 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6157 (gimplify_omp_for): For composite loops, move outer
6158 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6159 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6160 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6161 TREE_LIST for both the original class iterator and the "last" helper
6162 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6163 loop, remember has_decl_expr from outer composite loops for the
6164 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6165
6166 2018-07-09 Martin Sebor <msebor@redhat.com>
6167
6168 PR middle-end/77357
6169 PR middle-end/86428
6170 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6171 accessing implicitly initialized array elements.
6172 * expr.c (string_constant): Handle string initializers of
6173 character arrays within aggregates.
6174 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6175 Store element offset. As a special case, handle zero size.
6176 (fold_nonarray_ctor_reference): Same.
6177 (fold_ctor_reference): Add argument. Store subobject offset.
6178 * gimple-fold.h (fold_ctor_reference): Add argument.
6179
6180 2018-07-09 Paul Koning <ni1d@arrl.net>
6181
6182 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6183 (pdp11_insn_cost): New function.
6184 (pdp11_md_asm_adjust): New function.
6185 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6186 (pdp11_rtx_costs): Update to match machine better.
6187 (output_addr_const_pdp11): Correct format mismatch warnings.
6188 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6189 * config/pdp11/pdp11.md: General change to add base_cost and/or
6190 length attributes for use by new pdp11_insn_cost function.
6191 (MIN_BRANCH): Correct definition.
6192 (MIN_SOB): Ditto.
6193 (doloop_end): Use standard pattern name for looping pattern.
6194 (doloop_end_nocc): New.
6195 (movsf): Add another constraint alternative.
6196 (zero_extendqihi2): Add constraint alternatives for not in place
6197 extend.
6198 (zero_extendhisi2): Remove.
6199 (shift patterns): Add CC handling variants.
6200 (bswaphi2): New.
6201 (bswapsi2): New.
6202 (rothi3): New.
6203 (define_peephole2): New peephole to recognize mov that sets CC for
6204 subsequent test.
6205
6206 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6207
6208 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6209 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6210 wi::add.
6211
6212 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6213
6214 PR c/86420
6215 * real.c (real_nextafter): Return true if result is denormal.
6216
6217 2018-07-09 Martin Liska <mliska@suse.cz>
6218
6219 * common.opt: Add back wrongly removed attribute.
6220
6221 2018-07-09 Richard Biener <rguenther@suse.de>
6222
6223 PR debug/86413
6224 * dwarf2out.c (gen_block_die): For an early generated DIE
6225 always output high/low PC attributes.
6226
6227 2018-07-09 Tom de Vries <tdevries@suse.de>
6228
6229 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6230 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6231 onto VAR_DECL with abstract origin.
6232
6233 2018-07-07 Jim Wilson <jimw@sifive.com>
6234
6235 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6236
6237 2018-07-07 Tom de Vries <tdevries@suse.de>
6238
6239 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6240
6241 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6242
6243 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6244 overflow_type.
6245 (combine_bound): Use wide-int overflow calculation instead of
6246 rolling our own.
6247 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6248 overflow_type.
6249 * fold-const.c (int_const_binop_2): Same.
6250 (extract_muldiv_1): Same.
6251 (fold_div_compare): Same.
6252 (fold_abs_const): Same.
6253 * match.pd: Same.
6254 * poly-int.h (add): Same.
6255 (sub): Same.
6256 (neg): Same.
6257 (mul): Same.
6258 * predict.c (predict_iv_comparison): Same.
6259 * profile-count.c (slow_safe_scale_64bit): Same.
6260 * simplify-rtx.c (simplify_const_binary_operation): Same.
6261 * tree-chrec.c (tree_fold_binomial): Same.
6262 * tree-data-ref.c (split_constant_offset_1): Same.
6263 * tree-if-conv.c (idx_within_array_bound): Same.
6264 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6265 * tree-ssa-phiopt.c (minmax_replacement): Same.
6266 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6267 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6268 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6269 * wide-int.cc (wi::add_large): Same.
6270 (wi::mul_internal): Same.
6271 (wi::sub_large): Same.
6272 (wi::divmod_internal): Same.
6273 * wide-int.h: Change overflow type to overflow_type for neg, add,
6274 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6275 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6276 mul_internal, divmod_internal.
6277 (overflow_type): New enum.
6278 (accumulate_overflow): New.
6279
6280 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6281
6282 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6283 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6284
6285 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6286
6287 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6288 argument is checked for zero before entering loop, avoid checking again.
6289
6290 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6291
6292 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6293 * gimplify.h (generic_expr_could_trap_p): Likwise.
6294 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6295
6296 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6297
6298 PR tree-optimization/86401
6299 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6300 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6301 (fold_bit_and_mask): ... here. New helper function for match.pd.
6302 * fold-const.h (fold_bit_and_mask): Declare.
6303 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6304
6305 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6306
6307 PR target/86324
6308 * target.def (translate_mode_attribute): New hook.
6309 * targhooks.h (default_translate_mode_attribute): Declare.
6310 * targhooks.c (default_translate_mode_attribute): New function.
6311 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6312 * doc/tm.texi: Regenerate.
6313 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6314 (rs6000_translate_mode_attribute): New function.
6315
6316 2018-07-06 Paul Koning <ni1d@arrl.net>
6317
6318 * doc/md.texi (define_split): Document DONE and FAIL.
6319 (define_peephole2): Ditto.
6320
6321 2018-07-05 Jeff Law <law@redhat.com>
6322
6323 PR tree-optimization/86010
6324 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6325 both the head and tail of mem* and str* calls.
6326
6327 2018-07-05 Jim Wilson <jimw@sifive.com>
6328
6329 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6330
6331 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6332
6333 * config/aarch64/aarch64-simd.md: correct flags text for
6334 MIN_EXPR replacement.
6335
6336 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6337
6338 * configure: Regenerated.
6339
6340 2018-07-05 Carl Love <cel@us.ibm.com>
6341
6342 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6343 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6344 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6345 VSX_BUILTIN_DOUBLEL_V4SF.
6346
6347 2018-07-05 Martin Sebor <msebor@redhat.com>
6348
6349 PR c++/86400
6350 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6351 than its domain to compute its the upper bound of a char array.
6352
6353 2018-07-05 Nathan Sidwell <nathan@acm.org>
6354
6355 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6356 * doc/cpp.texi: Update comment.
6357 * doc/tm.texi: Rebuilt.
6358 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6359 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6360 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6361 headers affected by extern "C".
6362 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6363 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6364 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6365 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6366 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6367 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6368 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6369 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6370 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6371 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6372 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6373 config/sparc/sp64-elf.h, config/spu/spu.h,
6374 config/stormy16/stormy16.h, config/v850/v850.h,
6375 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6376 define NO_IMPLICIT_EXTERN_C.
6377 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6378
6379 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6380
6381 PR target/84711
6382 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6383 instead of GET_MODE_SIZE when comparing Units.
6384
6385 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6386
6387 PR target/84711
6388 * rtlanal.c (set_noop_p): Constrain on mode change,
6389 include hard-reg-set.h
6390
6391 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6392
6393 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6394
6395 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6396
6397 Revert
6398 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6399
6400 PR sanitizer/84250
6401 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6402 libasan.
6403 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6404
6405 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6406
6407 PR sanitizer/84250
6408 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6409 libasan.
6410 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6411
6412 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6413
6414 PR middle-end/86380
6415 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6416
6417 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6418
6419 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6420 neg_*_op* variables.
6421
6422 2018-07-04 Martin Liska <mliska@suse.cz>
6423
6424 * tree-switch-conversion.c: Define
6425 max_ratio_for_speed and max_ratio_for_size constants.
6426
6427 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6428 Martin Liska <mliska@suse.cz>
6429
6430 PR middle-end/66240
6431 PR target/45996
6432 PR c/84100
6433 * common.opt: Rename align options with 'str_' prefix.
6434 * common/config/i386/i386-common.c (set_malign_value): New
6435 function.
6436 (ix86_handle_option): Use it to set -falign-* options/
6437 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6438 type from int to string.
6439 * config/aarch64/aarch64.c: Update default values from int
6440 to string.
6441 * config/alpha/alpha.c (alpha_override_options_after_change):
6442 Likewise.
6443 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6444 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6445 max skip conditionally.
6446 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6447 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6448 max skip conditionally.
6449 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6450 max skip conditionally.
6451 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6452 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6453 max skip conditionally.
6454 * config/i386/i386.c (struct ptt): Change type from int to
6455 string.
6456 (ix86_default_align): Set default values.
6457 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6458 max skip conditionally.
6459 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6460 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6461 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6462 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6463 max skip conditionally.
6464 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6465 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6466 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6467 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6468 max skip conditionally.
6469 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6470 * config/ia64/ia64.c (ia64_option_override): Set default values
6471 for alignment options.
6472 * config/m68k/m68k.c: Handle new str_align_* options.
6473 * config/mips/mips.c (mips_set_compression_mode): Change
6474 type of constants.
6475 (mips_option_override): Set default values for options.
6476 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6477 Likewise.
6478 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6479 Likewise.
6480 * config/rx/rx.c (rx_option_override): Likewise.
6481 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6482 (LABEL_ALIGN): Use align_labels_log.
6483 (LOOP_ALIGN): Use align_loops_align.
6484 * config/s390/s390.c (s390_asm_output_function_label): Use new
6485 macros.
6486 * config/sh/sh.c (sh_override_options_after_change):
6487 Change type of constants.
6488 * config/spu/spu.c (spu_sched_init): Likewise.
6489 * config/sparc/sparc.c (sparc_option_override): Set default
6490 values for options.
6491 * config/visium/visium.c (visium_option_override): Likewise.
6492 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6493 emit p2align format with last argument if it's not needed.
6494 * doc/invoke.texi: Document extended format of -falign-*.
6495 * final.c: Use align_labels alignment.
6496 * flags.h (struct target_flag_state): Change type to use
6497 align_flags.
6498 (struct align_flags_tuple): New.
6499 (struct align_flags): Likewise.
6500 (align_loops_log): Redefine macro to use new types.
6501 (align_loops_max_skip): Redefine macro to use new types.
6502 (align_jumps_log): Redefine macro to use new types.
6503 (align_jumps_max_skip): Redefine macro to use new types.
6504 (align_labels_log): Redefine macro to use new types.
6505 (align_labels_max_skip): Redefine macro to use new types.
6506 (align_functions_log): Redefine macro to use new types.
6507 (align_loops): Redefine macro to use new types.
6508 (align_jumps): Redefine macro to use new types.
6509 (align_labels): Redefine macro to use new types.
6510 (align_functions): Redefine macro to use new types.
6511 (align_functions_max_skip): Redefine macro to use new types.
6512 (align_loops_value): New macro.
6513 (align_jumps_value): New macro.
6514 (align_labels_value): New macro.
6515 (align_functions_value): New macro.
6516 * function.c (invoke_set_current_function_hook): Propagate
6517 alignment values from flags to global variables default in
6518 topleev.h.
6519 * ipa-icf.c (sem_function::equals_wpa): Use
6520 cl_optimization_option_eq instead of memcmp.
6521 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6522 of string types.
6523 (cl_optimization_stream_in): Likewise.
6524 * optc-save-gen.awk: Support strings in cl_optimization.
6525 * opth-gen.awk: Likewise.
6526 * opts.c (finish_options): Remove error checking of invalid
6527 value ranges.
6528 (MAX_CODE_ALIGN): Remove.
6529 (MAX_CODE_ALIGN_VALUE): Likewise.
6530 (parse_and_check_align_values): New function.
6531 (check_alignment_argument): Likewise.
6532 (common_handle_option): Use check_alignment_argument.
6533 * opts.h (parse_and_check_align_values): Declare.
6534 * toplev.c (init_alignments): Remove.
6535 (read_log_maxskip): New.
6536 (parse_N_M): Likewise.
6537 (parse_alignment_opts): Likewise.
6538 (backend_init_target): Remove usage of init_alignments.
6539 * toplev.h (parse_alignment_opts): Declare.
6540 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6541 argument.
6542 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6543 * tree.c (cl_option_hasher::equal): New.
6544 * varasm.c: Use new global macros.
6545
6546 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6547
6548 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6549 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6550 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6551 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6552 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6553 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6554 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6555 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6556 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6557 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6558 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6559 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6560 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6561
6562 2018-07-04 Martin Liska <mliska@suse.cz>
6563 Jonathan Wakely <jwakely@redhat.com>
6564
6565 * coverage.c: Use correct type.
6566 * doc/invoke.texi: Language correction.
6567
6568 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6569
6570 PR target/85620
6571 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6572 ENDBRANCH for non-tail call which may return via indirect branch.
6573 * doc/extend.texi: Document indirect_return attribute.
6574
6575 2018-07-03 Martin Sebor <msebor@redhat.com>
6576
6577 PR tree-optimization/86274
6578 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6579 precondition.
6580 (format_floating): Correct handling of infinities and NaNs.
6581
6582 2018-07-03 Martin Sebor <msebor@redhat.com>
6583
6584 * print-tree.c (print_real_cst): New function.
6585 (print_node_brief): Call it.
6586 (print_node): Ditto.
6587
6588 2018-07-03 Jeff Law <law@redhat.com>
6589
6590 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6591 into a single pattern.
6592
6593 * config/h8300/h8300.md (ors code_iterator): New.
6594 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6595 a single pattern and single splitter.
6596 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6597 (iorqi3_1, xorqi3_1): Likewise.
6598 (iorqi3, xorqi3 expanders): Similarly.
6599
6600 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6601 (movmd_internal) into a single pattern using the P mode iterator.
6602 (movmd splitters): Similarly.
6603 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6604 (movsd splitters): Similarly.
6605
6606 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6607 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6608 right table based on the size of the operand.
6609 * config/h8300/h8300.md (length_table): Corresponding changes. All
6610 references to "addb", "addw" and "addl" changed to "add".
6611 (btst patterns): Merge two variants into a single pattern.
6612 (tstqi, tsthi): Likewise.
6613 (addhi3_incdec, addsi3_incdec): Likewise.
6614 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6615 (mulhi3, mulsi3): Likewise.
6616 (udivhi3, udivsi3): Likewise.
6617 (divhi3, divsi3): Likewise.
6618 (andorqi3, andorhi3, andorsi3): Likewise.
6619
6620 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6621
6622 PR target/85694
6623 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6624 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6625
6626 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6627
6628 PR tree-optimization/85694
6629 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6630 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6631 UNSPEC_URHADD.
6632 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6633 (<u>avg<mode>3_ceil): New patterns.
6634
6635 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6636
6637 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6638 scan-tree-dump directive.
6639 * gcc.dg/vect/slp-perm-2.c: Likewise.
6640 * gcc.dg/vect/slp-perm-3.c: Likewise.
6641 * gcc.dg/vect/slp-perm-5.c: Likewise.
6642 * gcc.dg/vect/slp-perm-6.c: Likewise.
6643 * gcc.dg/vect/slp-perm-7.c: Likewise.
6644 * gcc.dg/vect/slp-perm-8.c: Likewise.
6645
6646 2018-07-03 Marek Polacek <polacek@redhat.com>
6647
6648 PR middle-end/86202
6649 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6650
6651 2018-07-03 Richard Biener <rguenther@suse.de>
6652
6653 PR ipa/86389
6654 * tree-ssa-structalias.c (find_func_clobbers): Properly
6655 handle indirect calls.
6656
6657 2018-07-03 Jeff Law <law@redhat.com>
6658
6659 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6660 (shifts): New code iterator.
6661 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6662 expander. Fix HImode handling on H8/SX.
6663 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6664 (subqi3, subhi3, subsi3 expanders): Likewise.
6665 (andqi3, andhi3, andsi3 expanders): Likewise.
6666 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6667 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6668 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6669 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6670 (zero_extendqihi2, zero_extendqisi2): Likewise.
6671 (extendqihi2, extendqisi2): Likewise.
6672 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6673 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6674 (rotlqi3_1, rotlhi3_1): Likewise.
6675 (logicalhi3_sn, logicalsi3_sn): Likewise.
6676 (logicalhi3, logicalsi3): Likewise.
6677
6678 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6679
6680 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6681 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6682 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6683 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6684 type to append_pattern_def_seq instead of creating a stmt_vec_info
6685 directly.
6686 (build_mask_conversion): Likewise. Remove vinfo argument.
6687 (vect_add_conversion_to_patterm): Likewise, renaming to...
6688 (vect_add_conversion_to_pattern): ...this.
6689 (vect_recog_mask_conversion_pattern): Update call to
6690 build_mask_conversion. Pass the vector type to
6691 append_pattern_def_seq here too.
6692 (vect_recog_gather_scatter_pattern): Update call to
6693 vect_add_conversion_to_pattern.
6694
6695 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6696
6697 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6698 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6699 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6700 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6701 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6702 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6703 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6704 append_pattern_def_seq instead of new_pattern_def_seq.
6705 (vect_recog_divmod_pattern): Do both of the above.
6706 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6707 is null.
6708
6709 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6710
6711 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6712 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6713 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6714 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6715 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6716 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6717 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6718 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6719 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6720 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6721 parameter with a single stmt_vec_info.
6722 (vect_recog_func_ptr): Likewise.
6723 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6724 (vect_try_gather_scatter_pattern): ...this.
6725 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6726 the stmt_vec_info of the statement to be matched. Don't clear
6727 STMT_VINFO_RELATED_STMT.
6728 (vect_pattern_recog): Update call accordingly.
6729
6730 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6731
6732 PR tree-optimization/85694
6733 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6734 (uavgM3_ceil): Document new optabs.
6735 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6736 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6737 functions.
6738 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6739 (savg_ceil_optab): New optabs.
6740 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6741 (vect_vect_recog_func_ptrs): Add it.
6742 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6743 constant directly from the associated lhs.
6744
6745 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6746
6747 * tree-vect-patterns.c (vect_split_statement): New function.
6748 (vect_convert_input): Use it to try to split an existing cast.
6749
6750 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6751
6752 * poly-int.h (print_hex): New function.
6753 * dumpfile.h (dump_dec, dump_hex): Declare.
6754 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6755 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6756 min_input_precision, operation_precision and operation_sign.
6757 * tree-vect-patterns.c (vect_get_range_info): New function.
6758 (vect_same_loop_or_bb_p, vect_single_imm_use)
6759 (vect_operation_fits_smaller_type): Delete.
6760 (vect_look_through_possible_promotion): Add an optional
6761 single_use_p parameter.
6762 (vect_recog_over_widening_pattern): Rewrite to use new
6763 stmt_vec_info infomration. Handle one operation at a time.
6764 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6765 (vect_truncatable_operation_p, vect_set_operation_type)
6766 (vect_set_min_input_precision): New functions.
6767 (vect_determine_min_output_precision_1): Likewise.
6768 (vect_determine_min_output_precision): Likewise.
6769 (vect_determine_precisions_from_range): Likewise.
6770 (vect_determine_precisions_from_users): Likewise.
6771 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6772 (vect_vect_recog_func_ptrs): Put over_widening first.
6773 Add cast_forwprop.
6774 (vect_pattern_recog): Call vect_determine_precisions.
6775
6776 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6777
6778 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6779 statements that have been replaced by further pattern statements.
6780 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6781
6782 2018-07-03 Richard Biener <rguenther@suse.de>
6783
6784 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6785 always set *dt. Dump vectype in vectype overload.
6786 * dumpfile.h (dump_gimple_expr): New function.
6787 (dump_gimple_expr_loc): Likewise.
6788 * dumpfile.c (dump_gimple_expr): New function.
6789 (dump_gimple_expr_loc): Likewise.
6790
6791 2018-07-02 Jeff Law <law@redhat.com>
6792
6793 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6794 the H8/300, H8/300H and H8/S variants into a single pattern.
6795 (movhi_h8300, movqi_h8300hs): Similarly.
6796 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6797 (QHI mode iterator): New.
6798
6799 * config/h8300/h8300.md: Remove trailing whitespace.
6800
6801 2018-07-02 Jim Wilson <jimw@sifive.com>
6802
6803 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6804 instead of emit_insn for interrupt returns.
6805 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6806 (riscv_sret, riscv_uret): Likewise.
6807
6808 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6809
6810 * pretty-print.c (selftest::test_pp_format): Move save and restore
6811 of quotes to class auto_fix_quotes, and add an instance.
6812 * selftest.c: Include "intl.h".
6813 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6814 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6815 * selftest.h (selftest::auto_fix_quotes): New class.
6816
6817 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6818
6819 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6820 (aarch64_sve_prepare_conditional_op): Remove.
6821 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6822 Allow aarch64_simd_reg_or_zero as select operand; remove
6823 the aarch64_sve_prepare_conditional_op call.
6824 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6825 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6826 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6827 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6828 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6829 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6830 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6831 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6832 and a splitters to match all of the *_any patterns.
6833 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6834
6835 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6836 (SVE_COND_FP_BINARY_REV): Remove.
6837 (sve_int_op_rev, sve_fp_op_rev): New.
6838 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6839 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6840 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6841 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6842 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6843 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6844 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6845 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6846 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6847
6848 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6849 Remove match_dup 1 from the inner unspec.
6850 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6851
6852 * config/aarch64/aarch64.md (movprfx): New attr.
6853 (length): Default movprfx to 8.
6854 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6855 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6856 (*<su>mul<SVE_I>3_highpart): Likewise.
6857 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6858 (*v<ASHIFT><SVE_I>3): Likewise.
6859 (*<su><MAXMIN><SVE_I>3): Likewise.
6860 (*<su><MAXMIN><SVE_F>3): Likewise.
6861 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6862 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6863 (*div<SVE_F>4): Likewise.
6864
6865 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6866
6867 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6868 in dump string.
6869
6870 2018-07-02 Richard Biener <rguenther@suse.de>
6871
6872 PR tree-optimization/86363
6873 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6874 memset argument refers to a non-variable address.
6875
6876 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6877
6878 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6879 {PLUS,MINUS}_EXPR code to...
6880 (adjust_symbolic_bound): ...here,
6881 (combine_bound): ...here,
6882 (set_value_range_with_overflow): ...and here.
6883
6884 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6885
6886 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6887 code...
6888 (extract_range_from_abs_expr): ...here.
6889
6890 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6891
6892 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6893 -fno-omit-frame-pointer when not optimizing.
6894
6895 2018-07-02 Martin Liska <mliska@suse.cz>
6896
6897 PR ipa/86279
6898 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6899 (propagate_nothrow): Likewise.
6900
6901 2018-07-02 Martin Liska <mliska@suse.cz>
6902
6903 PR ipa/86323
6904 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6905
6906 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6907
6908 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6909 function in r262149, changing "loc" param from source_location to
6910 const dump_location_t &.
6911 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6912 declaration, as above.
6913
6914 2018-07-01 Paul Koning <ni1d@arrl.net>
6915
6916 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6917 -munit-asm, -mgnu-asm, -mdec-asm.
6918 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6919 (pdp11_output_labelref): New.
6920 (pdp11_output_def): New.
6921 (pdp11_output_addr_vec_elt): New.
6922 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6923 %# and %@ format codes.
6924 (pdp11_option_override): New.
6925 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6926 (pdp11_output_ident): New.
6927 (pdp11_asm_named_section): New.
6928 (pdp11_asm_init_sections): New.
6929 (pdp11_file_start): New.
6930 (pdp11_file_end): New.
6931 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6932 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6933 %o, like %c but octal.
6934 (pdp11_option_override): New.
6935 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6936 -mdec-asm.
6937 (DATA_SECTION_ASM_OP): Ditto.
6938 (READONLY_DATA_SECTION_ASM_OP): New.
6939 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6940 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6941 (ASM_OUTPUT_LABELREF): Ditto.
6942 (ASM_OUTPUT_DEF): Ditto.
6943 (ASM_OUTPUT_EXTERNAL): New.
6944 (ASM_OUTPUT_SOURCE_FILENAME): New.
6945 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6946 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6947 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6948 %# and %@ format codes.
6949 * config/pdp11/pdp11.opt (mgnu-asm): New.
6950 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6951 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6952 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6953
6954 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6955
6956 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6957 dereferencing path[] beyond its length.
6958 (debug_path): New.
6959 (debug_all_paths): New.
6960 (rewire_first_differing_edge): New.
6961 (adjust_paths_after_duplication): New.
6962 (duplicate_thread_path): Call adjust_paths_after_duplication.
6963 Add new argument.
6964 (thread_through_all_blocks): Add new argument to
6965 duplicate_thread_path.
6966
6967 2018-06-30 Jim Wilson <jimw@sifive.com>
6968
6969 * config/riscv/predicates.md (p2m1_shift_operand): New.
6970 (high_mask_shift_operand): New.
6971 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6972 pattern using p2m1_shift_operand.
6973 (lshsi3_zero_extend_3+2): New combiner pattern using
6974 high_mask_shift_operand.
6975
6976 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6977
6978 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6979 split out from...
6980 (vect_recog_rotate_pattern): ...here.
6981 (vect_convert_input): Try to insert casts of invariants in the
6982 preheader.
6983 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6984 preheader to be empty.
6985
6986 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6987
6988 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6989 vector type. If given, install it in the new statement's
6990 STMT_VINFO_VECTYPE.
6991 (vect_element_precision): New function.
6992 (vect_unpromoted_value): New struct.
6993 (vect_unpromoted_value::vect_unpromoted_value): New function.
6994 (vect_unpromoted_value::set_op): Likewise.
6995 (vect_look_through_possible_promotion): Likewise.
6996 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6997 (vect_widened_op_tree, vect_convert_input): Likewise.
6998 (vect_convert_inputs, vect_convert_output): Likewise.
6999 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7000 to handle the optional cast of the multiplication result and
7001 vect_widened_op_tree to detect the widened multiplication itself.
7002 Do not require the input and output of promotion casts to have
7003 the same sign, but base the signedness of the operation on the
7004 input rather than the result. If the pattern includes two
7005 promotions, check that those promotions have the same sign.
7006 Do not restrict the MULT_EXPR handling to a double-width result;
7007 handle quadruple-width results and wider. Use vect_convert_inputs
7008 to convert the inputs to the common type.
7009 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7010 to handle the optional cast of the ABS result. Also allow a sign
7011 change or a sign extension between the ABS and MINUS.
7012 Use vect_widened_op_tree to detect the widened subtraction and use
7013 vect_convert_inputs to convert the inputs to the common type.
7014 (vect_handle_widen_op_by_const): Delete.
7015 (vect_recog_widen_op_pattern): New function.
7016 (vect_recog_widen_mult_pattern): Use it.
7017 (vect_recog_widen_shift_pattern): Likewise.
7018 (vect_recog_widen_sum_pattern): Use
7019 vect_look_through_possible_promotion to handle the promoted
7020 PLUS_EXPR operand.
7021
7022 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7023
7024 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7025 the containing gimple_seq *.
7026 * gimple-iterator.h (gsi_for_stmt): Declare it.
7027 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7028 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7029 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7030 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7031 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7032 checks.
7033 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7034 split out from...
7035 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7036 statement being replaced is part of an existing pattern
7037 definition sequence, inserting the new pattern statements before
7038 the original one.
7039 (vect_pattern_recog_1): Don't return a bool. If the statement
7040 is already part of a pattern, instead apply pattern matching
7041 to the pattern definition statements. Don't clear the
7042 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7043 (vect_pattern_recog): Don't break after the first match;
7044 continue processing the pattern definition statements instead.
7045 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7046
7047 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7048
7049 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7050 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7051 (vect_recog_widen_sum_pattern): Use it.
7052
7053 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7054
7055 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7056 phi is not a pattern statement and has not been replaced by
7057 a pattern statement.
7058 * tree-vect-patterns.c (type_conversion_p): Don't check
7059 STMT_VINFO_IN_PATTERN_P.
7060 (vect_recog_vector_vector_shift_pattern): Likewise.
7061 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7062 the pattern statement rather than the original statement; check
7063 directly for a WIDEN_MULT_EXPR here.
7064 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7065 vect_is_simple_use to return the pattern statement rather
7066 than the original statement; use is_pattern_stmt_p to check
7067 for such a pattern statement.
7068 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7069 to return the pattern statement rather than the original statement;
7070 don't do the same transformation here.
7071 (vect_is_simple_use): If the defining statement has been replaced
7072 by a pattern statement, return the pattern statement instead.
7073 Remove the corresponding (local) transformation from the vectype
7074 overload.
7075
7076 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7077
7078 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7079 end and default to null.
7080 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7081 (vectorizable_reduction): Update calls accordingly, dropping the
7082 gimple ** argument if the passed-back statement isn't needed.
7083 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7084 (vect_recog_rotate_pattern): Likewise.
7085 (vect_recog_mask_conversion_pattern): Likewise.
7086 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7087 (vect_mask_constant_operand_p): Likewise.
7088 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7089 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7090 (get_group_load_store_type, get_load_store_type): Likewise.
7091 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7092 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7093 (vectorizable_conversion, vectorizable_assignment): Likewise.
7094 (vectorizable_shift, vectorizable_operation): Likewise.
7095 (vectorizable_store, vect_is_simple_cond): Likewise.
7096 (vectorizable_condition, vectorizable_comparison): Likewise.
7097 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7098 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7099 and move it to the end. Cope with null def_stmt_outs.
7100
7101 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7102
7103 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7104
7105 2018-06-29 Jeff Law <law@redhat.com>
7106
7107 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7108 displacements for TARGET_V850E2V3 and newer.
7109 (TARGET_LRA_P): Remove. Defaults to LRA now.
7110 * config/v850/v850.md (sign23byte_load): Remove.
7111 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7112 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7113
7114 2018-06-29 Martin Liska <mliska@suse.cz>
7115
7116 PR lto/85759
7117 * coverage.c (coverage_init): Mangle full path name.
7118 * doc/invoke.texi: Document the change.
7119 * gcov-io.c (mangle_path): New.
7120 * gcov-io.h (mangle_path): Likewise.
7121 * gcov.c (mangle_name): Use mangle_path for path mangling.
7122
7123 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7124
7125 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7126 if starting source register is not even.
7127
7128 2018-06-29 Martin Liska <mliska@suse.cz>
7129
7130 PR tree-optimization/86263
7131 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7132 Make edge redirection.
7133
7134 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7135
7136 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7137 (dump_scope_depth): New variable.
7138 (get_dump_scope_depth): New function.
7139 (dump_begin_scope): New function.
7140 (dump_end_scope): New function.
7141 * dumpfile.h (get_dump_scope_depth): New declaration.
7142 (dump_begin_scope): New declaration.
7143 (dump_end_scope): New declaration.
7144 (class auto_dump_scope): New class.
7145 (AUTO_DUMP_SCOPE): New macro.
7146 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7147 AUTO_DUMP_SCOPE.
7148
7149 2018-06-29 Richard Biener <rguenther@suse.de>
7150
7151 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7152 compute_all_dependences succeeds.
7153 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7154 exceed --param loop-max-datarefs-for-datadeps.
7155
7156 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7157
7158 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7159
7160 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7161
7162 PR target/86348
7163 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7164 alternative 0 in preferred_for_speed attribute.
7165
7166 2018-06-28 Paul Koning <ni1d@arrl.net>
7167
7168 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7169 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7170 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7171 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7172 for shift insn patterns.
7173
7174 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7175
7176 * cgraph.c (cgraph_node::get_body): Replace assignments to
7177 "dump_file" with calls to set_dump_file.
7178 * dumpfile.c (alt_dump_file): Make static, and group with...
7179 (alt_flags): ...this definition.
7180 (dumps_are_enabled): New variable.
7181 (refresh_dumps_are_enabled): New function.
7182 (set_dump_file): New function.
7183 (set_alt_dump_file): New function.
7184 (gcc::dump_manager::dump_start): Replace assignments to
7185 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7186 set_alt_dump_file.
7187 (gcc::dump_manager::dump_finish): Likewise.
7188 * dumpfile.h (alt_dump_file): Delete decl.
7189 (dumps_are_enabled): New variable decl.
7190 (set_dump_file): New function decl.
7191 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7192 global.
7193 * tree-nested.c (lower_nested_functions): Replace assignments to
7194 "dump_file" with calls to set_dump_file.
7195
7196 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7197
7198 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7199 goto_locus of each outgoing edge of each basic block.
7200
7201 2018-06-28 Richard Biener <rguenther@suse.de>
7202
7203 * dwarf2out.c (decl_scope_table): Remove.
7204 (push_decl_scope): Likewise.
7205 (pop_decl_scope): Likewise.
7206 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7207 (gen_struct_or_union_type_die): Likewise.
7208 (gen_tagged_type_die): Likewise.
7209 (dwarf2out_init): Do not initialize decl_scope_table.
7210 (dwarf2out_c_finalize): Do not free it.
7211
7212 2018-06-28 Richard Biener <rguenther@suse.de>
7213
7214 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7215 deciding whether to not re-use a DIE.
7216
7217 2018-06-28 Richard Biener <rguenther@suse.de>
7218
7219 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7220 DW_AT_abstract_origin attribute.
7221
7222 2018-06-28 Martin Liska <mliska@suse.cz>
7223
7224 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7225 Use newly introduced constants.
7226 * tree-switch-conversion.h (struct jump_table_cluster):
7227 Define max_ratio_for_size and max_ratio_for_speed.
7228
7229 2018-06-28 Martin Liska <mliska@suse.cz>
7230
7231 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7232 Add new checking assert to catch invalid state.
7233 (jump_table_cluster::can_be_handled): Handle single case
7234 clusters.
7235 (jump_table_cluster::is_beneficial): Bail out for such case.
7236 (bit_test_cluster::find_bit_tests):
7237 Add new checking assert to catch invalid state.
7238 (bit_test_cluster::can_be_handled): Handle single case
7239 clusters.
7240 (bit_test_cluster::is_beneficial): Bail out for such case.
7241 (switch_decision_tree::analyze_switch_statement):
7242 Fix comment.
7243
7244 2018-06-28 Martin Liska <mliska@suse.cz>
7245
7246 * common.opt: Introduce -completion option.
7247 * gcc.c (driver_handle_option): Handle it.
7248 (driver::main): Print completions if completion
7249 is set.
7250 * opt-suggestions.c (option_proposer::get_completions):
7251 New function.
7252 (option_proposer::suggest_completion): Likewise.
7253 (option_proposer::find_param_completions): Likewise.
7254 (verify_autocompletions): Likewise.
7255 (test_completion_valid_options): Likewise.
7256 (test_completion_valid_params): Likewise.
7257 (in_completion_p): Likewise.
7258 (empty_completion_p): Likewise.
7259 (test_completion_partial_match): Likewise.
7260 (test_completion_garbage): Likewise.
7261 (opt_proposer_c_tests): Likewise.
7262 * opt-suggestions.h: Declare new functions.
7263 * opts.c (common_handle_option): Handle OPT__completion_.
7264 * selftest-run-tests.c (selftest::run_tests): Add
7265 opt_proposer_c_tests.
7266 * selftest.c (assert_str_startswith): New.
7267 * selftest.h (assert_str_startswith): Likewise.
7268 (opt_proposer_c_tests): New.
7269 (ASSERT_STR_STARTSWITH): Likewise.
7270
7271 2018-06-28 Martin Liska <mliska@suse.cz>
7272
7273 * Makefile.in: Add opt-suggestions.o.
7274 * gcc-main.c: Include opt-suggestions.h.
7275 * gcc.c (driver::driver): Likewise.
7276 (driver::~driver): Remove m_option_suggestions.
7277 (driver::build_option_suggestions): Moved to option_proposer.
7278 (driver::suggest_option): Likewise.
7279 (driver::handle_unrecognized_options): Use option_proposer.
7280 * gcc.h (class driver): Add new memver m_option_proposer.
7281 * opt-suggestions.c: New file.
7282 * opt-suggestions.h: New file.
7283
7284 2018-06-28 Martin Liska <mliska@suse.cz>
7285
7286 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7287 (auto_string_vec::~auto_string_vec): Likewise.
7288
7289 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7290
7291 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7292 prevent_decl_creation_for_types fields up and add reset_location field.
7293 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7294 statement if id->reset_location is true.
7295 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7296 id->reset_location is true.
7297 (copy_phis_for_bb): Force input_location on the arguments if
7298 id->reset_location is true.
7299 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7300 is set on the function to be inlined.
7301
7302 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7303
7304 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7305
7306 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7307
7308 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7309 registers for Pmode.
7310 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7311 hard registers for the clobbered pseudo.
7312
7313 2018-06-27 Paul Koning <ni1d@arrl.net>
7314
7315 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7316 mutually exclusive options.
7317 * config/pdp11/constraints.md (h): New constraint.
7318 (O): Update definition to match shift code generation.
7319 (D): New constraint.
7320 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7321 (CCFP): Remove.
7322 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7323 function.
7324 (output_jump): Change arguments.
7325 (pdp11_fixed_cc_regs): New function.
7326 (pdp11_cc_mode): Ditto.
7327 (pdp11_expand_shift): Ditto.
7328 (pdp11_assemble_shift): Ditto.
7329 (pdp11_small_shift): Ditto.
7330 (pdp11_branch_cost): Remove.
7331 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7332 from output.
7333 (pdp11_register_move_cost): Update for CC registers.
7334 (pdp11_rtx_costs): Add case for LSHIFTRT.
7335 (pdp11_output_jump): Add CCNZ mode conditional branches.
7336 (notice_update_cc_on_set): Remove.
7337 (pdp11_cc_mode): New function.
7338 (simple_memory_operand): Correct pre/post decrement case.
7339 (no_side_effect_operand): New function.
7340 (pdp11_regno_reg_class): Add CC_REGS class.
7341 (pdp11_fixed_cc_regs): New function.
7342 (pdp11_small_shift): New function.
7343 (pdp11_expand_shift): New function to expand shift insns.
7344 (pdp11_assemble_shift): New function to output shifts.
7345 (pdp11_branch_cost): Remove.
7346 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7347 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7348 (WCHAR_TYPE): Ditto.
7349 (PTRDIFF_TYPE): Ditto.
7350 (ADJUST_INSN_LENGTH): New macro.
7351 (FIXED_REGISTERS): Add CC registers.
7352 (CALL_USED_REGISTERS): Ditto.
7353 (reg_class): Ditto.
7354 (REG_CLASS_NAMES): Ditto.
7355 (REG_CLASS_CONTENTS): Ditto.
7356 (SELECT_CC_MODE): Use new function.
7357 (TARGET_FLAGS_REGNUM): New macro.
7358 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7359 (cc0_reg_rtx): Remove.
7360 (CC_STATUS_MDEP): Remove.
7361 (CC_STATUS_MDEFP_INIT): Remove.
7362 (CC_IN_FPU): Remove.
7363 (NOTICE_UPDATE_CC): Remove.
7364 (REGISTER_NAMES): Add CC registers.
7365 (BRANCH_COST): Change to constant 1.
7366 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7367 handling.
7368 * config/pdp11/pdp11.opt (mbcopy): Remove.
7369 (mbcopy-builtin): Remove.
7370 (mbranch-cheap): Remove.
7371 (mbranch-expensive): Remove.
7372 * config/pdp11/predicates.md (expand_shift_operand): Update to
7373 match shift code generation.
7374 (ccnz_operator): New predicate.
7375 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7376 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7377 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7378 exclusive options.
7379 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7380 description of O constraint.
7381
7382 2018-06-27 Jeff Law <law@redhat.com>
7383 Austin Law <austinklaw@gmail.com>
7384
7385 * config/v850/v850.md (addsi3_set_flags): New pattern.
7386 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7387 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7388 (zero_extendhisi2_v850_set_flags): Likewise.
7389 (zero_extendqisi2_v850_set_flags): Likewise.
7390 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7391 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7392 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7393
7394 * config/v850/v850-protos.h (notice_update_cc): Remove.
7395 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7396 (v850_print_operand): Handle 'D' and "d".
7397 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7398 Add handling of arithmetic/logical operations compared against zero.
7399 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7400 Do not look at v850_compare_op, instead get mode from last argument.
7401 (v850_gen_compare): Remove
7402 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7403 after reload for prologue insns.
7404 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7405 patterns.
7406 (construct_save_jarl): Likewise.
7407 (TARGET_FLAGS_REGNUM): Define.
7408 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7409 (NOTICE_UPDATE_CC): Remove.
7410 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7411 than cc0. Conditionalize on reload_completed.
7412 (cmpsi_insn, setfcc_insn): Likewise.
7413 (tst1 splitter): Turn into define_and_split which sets the flags
7414 after reload.
7415 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7416 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7417 (cstoresf4, cstoredf4): Clobber the flags.
7418 (cmpsi, cmpsf, cmpdf): Remove expanders.
7419 (setf_insn): Remove pattern.
7420 (addsi3): Turn into define_and_split which clobbers the flags after
7421 reload and a suitable pattern (addsi3_clobber_flags) for use after
7422 reload.
7423 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7424 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7425 (ashrsi3, ashrsi3_v850e2): Likewise.
7426 (bins): Clobber the flags.
7427 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7428 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7429 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7430 (call_value_internal_short, call_value_internal_long): Likewise.
7431 (callt_save_interrupt, callt_return_interrupt): Likewise.
7432 (save_interrupt, return_interrupt): Likewise.
7433 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7434 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7435 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7436 (All FP comparisons): Only allow after reload has completed.
7437 (trfsr): Likewise.
7438 (divh, divhu): Tweak output template.
7439 (branch_z_normal, branch_z_invert): Remove
7440 (branch_nz_normal, branch_nz_invert): Likewise.
7441 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7442
7443 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7444 * config/v850/v850.c (notice_update_cc): Remove.
7445 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7446 (CC_NO_CARRY): Likewise.
7447 (NOTICE_UPDATE_CC): Define to nothing.
7448 * config/v850/v850.md: Remove block comment on cc0 handling
7449 Remove "cc" attribute from all patterns. Remove cc_status handling
7450 from all patterns. Minor formatting fixes.
7451
7452 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7453
7454 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7455 (cortex-a76.cortex-a55): Likewise.
7456 * config/aarch64/aarch64-tune.md: Regenerate.
7457 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7458 cortex-a76.cortex-a55.
7459
7460 2018-06-27 Jeff Law <law@redhat.com>
7461
7462 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7463 (MULTILIB_DIRNAMES): Similarly.
7464
7465 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7466
7467 * gimple.h (gimple_return_retbnd): Delete.
7468 (gimple_return_set_retbnd): Likewise.
7469 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7470 gimple_return_set_retbnd.
7471 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7472 gimple_return_retbnd and adjust.
7473 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7474 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7475 Explicitly return NULL in a couple more cases. Move assertion
7476 on debug statements and remove unreachable code.
7477 (reset_debug_binding): Do not test id->retbnd.
7478 (expand_call_inline): Do not set it.
7479
7480 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7481
7482 * configure.ac: Add --disable-gcov option.
7483 * configure: Regenerate.
7484 * Makefile.in: Honour @enable_gcov@.
7485 * doc/install.texi: Document --disable-gcov.
7486
7487 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7488
7489 * config/arm/arm-cpus.in (cortex-a76): New entry.
7490 (cortex-a76.cortex-a55): Likewise.
7491 * config/arm/arm-tables.opt: Regenerate.
7492 * config/arm/arm-tune.md: Likewise.
7493 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7494 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7495 cortex-a76.cortex-a55.
7496
7497 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7498
7499 PR target/85769
7500 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7501
7502 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7503
7504 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7505 comment.
7506 (EPILOGUE_USES): Likewise.
7507
7508 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7509
7510 * tree-inline.c (remap_location): New function extracted from...
7511 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7512 (copy_phis_for_bb): ...here. Call remap_location.
7513 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7514
7515 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7516
7517 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7518 unaligned vsx for 16B memset.
7519
7520 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7521
7522 PR target/86285
7523 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7524 ieee128_float_type_node to long_double_type_node unless
7525 TARGET_LONG_DOUBLE_128 is set.
7526
7527 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7528
7529 * cfgloop.c (get_loop_location): Convert return type from
7530 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7531 by implicit construction from rtx_insn *, and using
7532 dump_user_location_t::from_function_decl for the fallback case.
7533 * cfgloop.h (get_loop_location): Convert return type from
7534 location_t to dump_user_location_t.
7535 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7536 dump_printf_loc to pass in a dump_location_t rather than a
7537 location_t, via the gimple stmt.
7538 * coverage.c (get_coverage_counts): Update calls to
7539 dump_printf_loc to pass in dump_location_t rather than a
7540 location_t.
7541 * doc/optinfo.texi (Dump types): Convert example of
7542 dump_printf_loc from taking "locus" to taking "insn". Update
7543 description of the "_loc" calls to cover dump_location_t.
7544 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7545 "selftest.h".
7546 (dump_user_location_t::dump_user_location_t): New constructors,
7547 from gimple *stmt and rtx_insn *.
7548 (dump_user_location_t::from_function_decl): New function.
7549 (dump_loc): Make static.
7550 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7551 const dump_location_t &.
7552 (dump_generic_expr_loc): Delete.
7553 (dump_printf_loc): Convert param "loc" from location_t to
7554 const dump_location_t &.
7555 (selftest::test_impl_location): New function.
7556 (selftest::dumpfile_c_tests): New function.
7557 * dumpfile.h: Include "profile-count.h".
7558 (class dump_user_location_t): New class.
7559 (struct dump_impl_location_t): New struct.
7560 (class dump_location_t): New class.
7561 (dump_printf_loc): Convert 2nd param from source_location to
7562 const dump_location_t &.
7563 (dump_generic_expr_loc): Delete.
7564 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7565 const dump_location_t &.
7566 * gimple-fold.c (fold_gimple_assign): Update call to
7567 dump_printf_loc to pass in a dump_location_t rather than a
7568 location_t, via the gimple stmt.
7569 (gimple_fold_call): Likewise.
7570 * gimple-loop-interchange.cc
7571 (loop_cand::analyze_iloop_reduction_var): Update for change to
7572 check_reduction_path.
7573 (tree_loop_interchange::interchange): Update for change to
7574 find_loop_location.
7575 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7576 change in return-type of find_loop_location.
7577 (graphite_regenerate_ast_isl): Likewise.
7578 * graphite-optimize-isl.c (optimize_isl): Likewise.
7579 * graphite.c (graphite_transform_loops): Likewise.
7580 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7581 pass in a dump_location_t rather than a location_t, via the
7582 gimple stmt.
7583 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7584 * ipa.c (walk_polymorphic_call_targets): Likewise.
7585 * loop-unroll.c (report_unroll): Convert "locus" param from
7586 location_t to dump_location_t.
7587 (decide_unrolling): Update for change to get_loop_location's
7588 return type.
7589 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7590 location_t to dump_user_location_t.
7591 (grid_find_single_omp_among_assignments_1): Updates calls to
7592 dump_printf_loc to pass in a dump_location_t rather than a
7593 location_t, via the gimple stmt.
7594 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7595 location_t to dump_location_t. Updates calls to dump_printf_loc
7596 to pass in a dump_location_t rather than a location_t, via the
7597 gimple stmt.
7598 (grid_inner_loop_gridifiable_p): Likewise.
7599 (grid_dist_follows_simple_pattern): Likewise.
7600 (grid_gfor_follows_tiling_pattern): Likewise.
7601 (grid_target_follows_gridifiable_pattern): Likewise.
7602 (grid_attempt_target_gridification): Convert initialization
7603 of local "grid" from memset to zero-initialization; FIXME: does
7604 this require C++11? Update call to dump_printf_loc to pass in a
7605 optinfo_location rather than a location_t, via the gimple stmt.
7606 * profile.c (read_profile_edge_counts): Updates call to
7607 dump_printf_loc to pass in a dump_location_t rather than a
7608 location_t
7609 (compute_branch_probabilities): Likewise.
7610 * selftest-run-tests.c (selftest::run_tests): Call
7611 dumpfile_c_tests.
7612 * selftest.h (dumpfile_c_tests): New decl.
7613 * tree-loop-distribution.c (pass_loop_distribution::execute):
7614 Update for change in return type of find_loop_location.
7615 * tree-parloops.c (parallelize_loops): Likewise.
7616 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7617 "locus" from location_t to dump_user_location_t.
7618 (canonicalize_loop_induction_variables): Likewise.
7619 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7620 for change in return type of find_loop_location.
7621 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7622 to dump_printf_loc to pass in a dump_location_t rather than a
7623 location_t, via the stmt.
7624 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7625 Likewise.
7626 * tree-vect-loop-manip.c (find_loop_location): Convert return
7627 type from source_location to dump_user_location_t.
7628 (vect_do_peeling): Update for above change.
7629 (vect_loop_versioning): Update for change in type of
7630 vect_location.
7631 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7632 from location_t to dump_user_location_t.
7633 (vect_estimate_min_profitable_iters): Update for change in type
7634 of vect_location.
7635 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7636 location_t to dump_location_t.
7637 (vect_slp_bb): Update for change in type of vect_location.
7638 * tree-vectorizer.c (vect_location): Convert from source_location
7639 to dump_user_location_t.
7640 (try_vectorize_loop_1): Update for change in vect_location's type.
7641 (vectorize_loops): Likewise.
7642 (increase_alignment): Likewise.
7643 * tree-vectorizer.h (vect_location): Convert from source_location
7644 to dump_user_location_t.
7645 (find_loop_location): Convert return type from source_location to
7646 dump_user_location_t.
7647 (check_reduction_path): Convert 1st param from location_t to
7648 dump_user_location_t.
7649 * value-prof.c (check_counter): Update call to dump_printf_loc to
7650 pass in a dump_user_location_t rather than a location_t; update
7651 call to error_at for change in type of "locus".
7652 (check_ic_target): Update call to dump_printf_loc to
7653 pass in a dump_user_location_t rather than a location_t, via the
7654 call_stmt.
7655
7656 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7657
7658 * config/s390/s390.h (enum processor_flags): Do not use
7659 default tune parameter when -march was specified.
7660
7661 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7662
7663 PR target/86314
7664 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7665 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7666 operands.
7667
7668 2018-06-26 Richard Biener <rguenther@suse.de>
7669
7670 PR tree-optimization/86287
7671 PR bootstrap/86316
7672 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7673 (vect_analyze_loop): Initialize n_stmts.
7674
7675 2018-06-26 Richard Biener <rguenther@suse.de>
7676
7677 PR middle-end/86271
7678 * fold-const.c (fold_convertible_p): Pointer extension
7679 isn't valid.
7680
7681 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7682
7683 PR debug/86064
7684 * dwarf2out.c (loc_list_has_views): Adjust comments.
7685 (dw_loc_list): Split single cross-partition range with
7686 nonzero locview.
7687
7688 2018-06-25 Jeff Law <law@redhat.com>
7689
7690 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7691 on -mbig-switch by default.
7692
7693 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7694 test.
7695 (const_float_0_operand): Remove unused predicate.
7696 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7697 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7698 (recipsf2): New expander. Original pattern now called
7699 (recipsf2_insn).
7700 (recipdf2, recipdf2_insn): Similarly.
7701 (rsqrtsf2, rsqrtsf2_insn): Similarly
7702 (rsqrtdf2, rsqrtdf2_insn): Similarly
7703
7704 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7705
7706 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7707 Simplify logic for FreeBSD (twice).
7708
7709 2018-06-25 Martin Sebor <msebor@redhat.com>
7710
7711 PR tree-optimization/86204
7712 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7713 a strnlen result if it's less than the length of the string.
7714
7715 2018-06-25 Martin Sebor <msebor@redhat.com>
7716
7717 PR tree-optimization/85700
7718 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7719 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7720 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7721
7722 2018-06-25 Martin Sebor <msebor@redhat.com>
7723
7724 * doc/extend.texi (Zero-length arrays): Update and clarify.
7725
7726 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7727
7728 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7729 added IEEE/IBM long double multilib support on PowerPC little
7730 endian Linux systems.
7731 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7732 (MULTILIB_DEFAULTS): Likewise.
7733 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7734 Likewise.
7735 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7736 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7737 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7738
7739 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7740
7741 PR middle-end/86311
7742 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7743 (REORDER_45): Likewise.
7744
7745 2018-06-25 Jeff Law <law@redhat.com>
7746
7747 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7748 dividend to 32 bits. Adjust length.
7749 (udivmodhi4): Cleanup output template. Fix length.
7750
7751 2018-06-25 Carl Love <cel@us.ibm.com>
7752
7753 * config/rs6000/vsx.md: Change word selector to prefered location.
7754
7755 2018-06-25 Richard Biener <rguenther@suse.de>
7756
7757 PR tree-optimization/86304
7758 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7759 epilogue-if-converted loops as well.
7760
7761 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7762
7763 * lto-section-out.c (lto_begin_section): Do not print section
7764 name for noaddr and unnumbered dumps.
7765
7766 2018-06-25 Richard Biener <rguenther@suse.de>
7767
7768 * tree-vectorizer.h (struct vec_info_shared): New structure
7769 with parts split out from struct vec_info and loop_nest from
7770 struct _loop_vec_info.
7771 (struct vec_info): Adjust accordingly.
7772 (struct _loop_vec_info): Likewise.
7773 (LOOP_VINFO_LOOP_NEST): Adjust.
7774 (LOOP_VINFO_DATAREFS): Likewise.
7775 (LOOP_VINFO_DDRS): Likewise.
7776 (struct _bb_vec_info): Likewise.
7777 (BB_VINFO_DATAREFS): Likewise.
7778 (BB_VINFO_DDRS): Likewise.
7779 (struct _stmt_vec_info): Add dr_aux member.
7780 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7781 (DR_MISALIGNMENT_UNINITIALIZED): New.
7782 (set_dr_misalignment): Adjust.
7783 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7784 (vect_analyze_loop): Adjust prototype.
7785 (vect_analyze_loop_form): Likewise.
7786 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7787 Compute dependences lazily.
7788 (vect_record_base_alignments): Use shared datarefs/ddrs.
7789 (vect_verify_datarefs_alignment): Likewise.
7790 (vect_analyze_data_refs_alignment): Likewise.
7791 (vect_analyze_data_ref_accesses): Likewise.
7792 (vect_analyze_data_refs): Likewise.
7793 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7794 constructor parameter for shared part.
7795 (vect_analyze_loop_form): Pass in shared part and adjust.
7796 (vect_analyze_loop_2): Pass in storage for the number of
7797 stmts. Move loop nest finding to the caller. Compute
7798 datarefs lazily.
7799 (vect_analyze_loop): Pass in shared part.
7800 (vect_transform_loop): Verify shared datarefs are unchanged.
7801 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7802 constructor parameter for shared part.
7803 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7804 (vect_slp_bb): Verify shared datarefs are unchanged before
7805 transform.
7806 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7807 change.
7808 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7809 DR_MISALIGNMENT_UNINITIALIZED.
7810 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7811 parameter for shared part.
7812 (vec_info::~vec_info): Adjust.
7813 (vec_info_shared::vec_info_shared): New.
7814 (vec_info_shared::~vec_info_shared): Likewise.
7815 (vec_info_shared::save_datarefs): Likewise.
7816 (vec_info_shared::check_datarefs): Likewise.
7817 (try_vectorize_loop_1): Construct shared part live for analyses
7818 of a single loop for multiple vector sizes.
7819 * tree-parloops.c (gather_scalar_reductions): Adjust.
7820
7821 2018-06-25 Richard Biener <rguenther@suse.de>
7822
7823 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7824 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7825 (vect_analyze_data_refs): Remove similar code from here and
7826 simplify accordingly.
7827
7828 2018-06-25 Richard Biener <rguenther@suse.de>
7829
7830 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7831 for reverse storage order accesses rather than asserting
7832 they cannot happen here.
7833
7834 2018-06-25 Tom de Vries <tdevries@suse.de>
7835
7836 PR debug/86257
7837 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7838 Use data16 instead of .byte for insn prefix.
7839
7840 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7841
7842 PR C++/86082
7843 * parser.c (make_char_string_pack): Pass this literal chars
7844 through cpp_interpret_string.
7845 (cp_parser_userdef_numeric_literal): Check the result of
7846 make_char_string_pack.
7847
7848 2018-06-24 Maya Rashish <coypu@sdf.org>
7849
7850 * ginclude/stddef.h: Simplify conditions around avoiding
7851 re-definition of __size_t.
7852
7853 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7854
7855 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7856 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7857
7858 2018-06-22 Maya Rashish <coypu@sdf.org>
7859
7860 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7861 made to OpenBSD and NetBSD through the years.
7862
7863 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7864
7865 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7866 behavior of vec_pack (vector double, vector double) to match
7867 behavior of vec_float2 (vector double, vector double).
7868
7869 2018-06-22 Olivier Hainque <hainque@adacore.com>
7870
7871 * gimplify.c (gimplify_function_tree): Prevent creation
7872 of a trampoline for the address of the current function
7873 passed to entry/exit instrumentation hooks.
7874
7875 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7876
7877 PR target/86222
7878 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7879 correctly.
7880
7881 2018-06-22 Martin Liska <mliska@suse.cz>
7882
7883 PR tree-optimization/86263
7884 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7885 Bail out if is_enabled is false.
7886 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7887 New declaration.
7888 (jump_table_cluster::is_enabled): New function.
7889
7890 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7891
7892 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7893 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7894 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7895 (lto_input_ts_binfo_tree_pointers): Likewise.
7896 * tree-streamer-out.c (streamer_write_tree_bitfields,
7897 write_ts_binfo_tree_pointers): Likewise.
7898 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7899
7900 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7901
7902 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7903
7904 2018-06-22 Martin Liska <mliska@suse.cz>
7905
7906 * symbol-summary.h (get): Make it pure and inline move
7907 functionality from ::get function.
7908 (get): Remove and inline into ::get and ::get_create.
7909 (get_create): Move code from ::get function.
7910
7911 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7912
7913 PR target/85994
7914 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7915 -x assembler-with-cpp.
7916
7917 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7918
7919 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7920 _FILE_OFFSET_BITS=64 for C++.
7921
7922 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7923
7924 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7925 conversion insn that shows up when pr85657-3.c is compiled using
7926 IEEE 128-bit long double.
7927 (neg<mode>2_internal): Use the correct mode to check whether the
7928 mode is IBM extended.
7929 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7930 multiply and divide external functions from being created more
7931 than once.
7932
7933 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7934
7935 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7936 functions.
7937 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7938 the edge can be forwarded.
7939 (cfg_layout_merge_blocks): Likewise.
7940
7941 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7942
7943 * except.c (finish_eh_generation): Commit edge insertions only after
7944 the EH edges have been redirected from post-landing to landing pads.
7945
7946 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7947
7948 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7949 create_tmp_var_for to create the FRAME decl.
7950 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7951
7952 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7953
7954 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7955 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7956 debug statement when resetting its value.
7957 (expand_call_inline): Copy the locus of the call onto the assignment
7958 of the return value, if any. Use local variable in more cases.
7959
7960 2018-06-21 Martin Liska <mliska@suse.cz>
7961
7962 * ipa-pure-const.c (propagate_nothrow): Use
7963 funct_state_summaries->get.
7964 (dump_malloc_lattice): Likewise.
7965 (propagate_malloc): Likewise.
7966
7967 2018-06-21 Richard Biener <rguenther@suse.de>
7968
7969 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7970 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7971 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7972 comment.
7973 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7974 BLOCK_ABSTRACT_ORIGIN unconditionally.
7975
7976 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7977
7978 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7979 deleting it.
7980 * ipa-reference.c (ipa_reference_c_finalize): Delete
7981 ipa_ref_opt_sum_summaries and set it to NULL.
7982
7983 2018-06-21 Tom de Vries <tdevries@suse.de>
7984
7985 PR tree-optimization/85859
7986 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7987 test with comment from bb_no_side_effects_p.
7988
7989 2018-06-21 Richard Biener <rguenther@suse.de>
7990
7991 PR tree-optimization/86232
7992 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7993 max for constant niter.
7994
7995 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7996
7997 * config/aarch64/aarch64-simd.md
7998 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7999
8000 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8001
8002 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8003 Make opernads of the unspec commutative.
8004
8005 2018-06-21 Richard Biener <rguenther@suse.de>
8006
8007 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8008 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8009 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8010 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8011 NULL DR_STEP.
8012 (vect_record_base_alignments): Do not record base alignment
8013 for gathers or scatters.
8014 (vect_compute_data_ref_alignment): Drop return value that is always
8015 true. Bail out early for gathers or scatters.
8016 (vect_enhance_data_refs_alignment): Bail out early for gathers
8017 or scatters.
8018 (vect_find_same_alignment_drs): Likewise.
8019 (vect_analyze_data_refs_alignment): Remove dead code.
8020 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8021 (vect_analyze_data_refs): For possible gathers or scatters do
8022 not create an alternate DR, just check their possible validity
8023 and mark them. Adjust DECL_NONALIASED handling to not rely
8024 on DR_BASE_ADDRESS.
8025 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8026 update inits of gathers or scatters.
8027 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8028 Also copy gather/scatter flag to pattern vinfo.
8029
8030 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8031
8032 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8033 behavior of vec_packsu (vector unsigned long long, vector unsigned
8034 long long) to match behavior of vec_packs with same signature.
8035
8036 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8037 Thomas Schwinge <thomas@codesourcery.com>
8038 Cesar Philippidis <cesar@codesourcery.com>
8039
8040 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8041 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8042 (gimplify_adjust_omp_clauses): Likewise.
8043 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8044 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8045 (gimplify_omp_target_update): Update handling of acc update and
8046 enter/exit data.
8047 * omp-low.c (install_var_field): Remove unused parameter
8048 base_pointers_restrict.
8049 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8050 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8051 FINALIZE}
8052 (omp_target_base_pointers_restrict_p): Delete.
8053 (scan_omp_target): Update call to scan_sharing_clauses.
8054 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8055 FINALIZE}.
8056 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8057 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8058 (convert_local_omp_clauses): Likewise.
8059 * tree-pretty-print.c (dump_omp_clause): Likewise.
8060 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8061 FINALIZE}.
8062 (omp_clause_code_name): Likewise.
8063
8064 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8065
8066 PR debug/86194
8067 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8068 be narrowed.
8069
8070 PR tree-optimization/86231
8071 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8072 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8073
8074 2018-06-20 Tom de Vries <tdevries@suse.de>
8075
8076 PR tree-optimization/86097
8077 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8078 iv type if signedness of iv type is not the same as that of *nit.
8079
8080 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8081
8082 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8083 EDGE_EH edges, verify they are all EDGE_EH.
8084
8085 2018-06-20 Maya Rashish <coypu@sdf.org>
8086
8087 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8088
8089 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8090
8091 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8092 * config/aarch64/aarch64.c (xgene1_tunings): Add
8093 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8094 (aarch64_mode_valid_for_sched_fusion_p):
8095 Allow 16-byte modes.
8096 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8097 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8098 128-bit modes.
8099 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8100 New pattern.
8101 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8102 * config/aarch64/iterators.md (VQ2): New mode iterator.
8103
8104 2018-06-20 Martin Liska <mliska@suse.cz>
8105
8106 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8107 Change default ratio from 10 to 8.
8108
8109 2018-06-20 Martin Liska <mliska@suse.cz>
8110
8111 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8112 New.
8113 (bit_test_cluster::find_bit_tests): Likewise.
8114 (switch_decision_tree::analyze_switch_statement): Find clusters.
8115 * tree-switch-conversion.h (struct jump_table_cluster): Document
8116 hierarchy.
8117
8118 2018-06-20 Martin Liska <mliska@suse.cz>
8119
8120 * tree-switch-conversion.c (switch_conversion::collect):
8121 Record m_uniq property.
8122 (switch_conversion::expand): Bail out for special conditions.
8123 (group_cluster::~group_cluster): New.
8124 (group_cluster::group_cluster): Likewise.
8125 (group_cluster::dump): Likewise.
8126 (jump_table_cluster::emit): New.
8127 (switch_decision_tree::fix_phi_operands_for_edges): New.
8128 (struct case_node): Remove struct.
8129 (jump_table_cluster::can_be_handled): New.
8130 (case_values_threshold): Moved to header.
8131 (reset_out_edges_aux): Likewise.
8132 (jump_table_cluster::is_beneficial): New.
8133 (bit_test_cluster::can_be_handled): Likewise.
8134 (add_case_node): Remove.
8135 (bit_test_cluster::is_beneficial): New.
8136 (case_bit_test::cmp): New.
8137 (bit_test_cluster::emit): New.
8138 (expand_switch_as_decision_tree_p): Remove.
8139 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8140 (fix_phi_operands_for_edge): Likewise.
8141 (switch_decision_tree::analyze_switch_statement): New.
8142 (compute_cases_per_edge): Move ...
8143 (switch_decision_tree::compute_cases_per_edge): ... here.
8144 (try_switch_expansion): Likewise.
8145 (switch_decision_tree::try_switch_expansion): Likewise.
8146 (record_phi_operand_mapping): Likewise.
8147 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8148 (emit_case_decision_tree): Likewise.
8149 (switch_decision_tree::emit): Likewise.
8150 (balance_case_nodes): Likewise.
8151 (switch_decision_tree::balance_case_nodes): Likewise.
8152 (dump_case_nodes): Likewise.
8153 (switch_decision_tree::dump_case_nodes): Likewise.
8154 (emit_jump): Likewise.
8155 (switch_decision_tree::emit_jump): Likewise.
8156 (emit_cmp_and_jump_insns): Likewise.
8157 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8158 (emit_case_nodes): Likewise.
8159 (switch_decision_tree::emit_case_nodes): Likewise.
8160 (conditional_probability): Remove.
8161 * tree-switch-conversion.h (enum cluster_type): New.
8162 (PRINT_CASE): New.
8163 (struct cluster): Likewise.
8164 (cluster::cluster): Likewise.
8165 (struct simple_cluster): Likewise.
8166 (simple_cluster::simple_cluster): Likewise.
8167 (struct group_cluster): Likewise.
8168 (struct jump_table_cluster): Likewise.
8169 (struct bit_test_cluster): Likewise.
8170 (struct min_cluster_item): Likewise.
8171 (struct case_tree_node): Likewise.
8172 (case_tree_node::case_tree_node): Likewise.
8173 (jump_table_cluster::case_values_threshold): Likewise.
8174 (struct case_bit_test): Likewise.
8175 (struct switch_decision_tree): Likewise.
8176 (struct switch_conversion): Likewise.
8177 (switch_decision_tree::reset_out_edges_aux): Likewise.
8178
8179 2018-06-20 Martin Liska <mliska@suse.cz>
8180
8181 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8182 (hoist_edge_and_branch_if_true): Likewise.
8183 (expand_switch_using_bit_tests_p): Likewise.
8184 (struct case_bit_test): Likewise.
8185 (case_bit_test_cmp): Likewise.
8186 (emit_case_bit_tests): Likewise.
8187 (switch_conversion::switch_conversion): New class.
8188 (struct switch_conv_info): Remove old struct.
8189 (collect_switch_conv_info): More to ...
8190 (switch_conversion::collect): ... this.
8191 (check_range): Likewise.
8192 (switch_conversion::check_range): Likewise.
8193 (check_all_empty_except_final): Likewise.
8194 (switch_conversion::check_all_empty_except_final): Likewise.
8195 (check_final_bb): Likewise.
8196 (switch_conversion::check_final_bb): Likewise.
8197 (create_temp_arrays): Likewise.
8198 (switch_conversion::create_temp_arrays): Likewise.
8199 (free_temp_arrays): Likewise.
8200 (gather_default_values): Likewise.
8201 (switch_conversion::gather_default_values): Likewise.
8202 (build_constructors): Likewise.
8203 (switch_conversion::build_constructors): Likewise.
8204 (constructor_contains_same_values_p): Likewise.
8205 (switch_conversion::contains_same_values_p): Likewise.
8206 (array_value_type): Likewise.
8207 (switch_conversion::array_value_type): Likewise.
8208 (build_one_array): Likewise.
8209 (switch_conversion::build_one_array): Likewise.
8210 (build_arrays): Likewise.
8211 (switch_conversion::build_arrays): Likewise.
8212 (gen_def_assigns): Likewise.
8213 (switch_conversion::gen_def_assigns): Likewise.
8214 (prune_bbs): Likewise.
8215 (switch_conversion::prune_bbs): Likewise.
8216 (fix_phi_nodes): Likewise.
8217 (switch_conversion::fix_phi_nodes): Likewise.
8218 (gen_inbound_check): Likewise.
8219 (switch_conversion::gen_inbound_check): Likewise.
8220 (process_switch): Use the newly created class.
8221 (switch_conversion::expand): New.
8222 (switch_conversion::~switch_conversion): New.
8223 * tree-switch-conversion.h: New file.
8224
8225 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8226
8227 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8228 tree-vect-patterns.c.
8229 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8230 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8231 (vect_recog_sad_pattern): Likewise.
8232 (vect_recog_widen_sum_pattern): Likewise.
8233 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8234 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8235 (vect_recog_rotate_pattern): Likewise.
8236 (vect_recog_mult_pattern): Likewise.
8237 (vect_recog_vector_vector_shift_pattern): Likewise.
8238 (vect_recog_divmod_pattern): Likewise.
8239 (vect_recog_mixed_size_cond_pattern): Likewise.
8240 (vect_recog_bool_pattern): Likewise.
8241 (vect_recog_mask_conversion_pattern): Likewise.
8242 (vect_try_gather_scatter_pattern): Likewise.
8243 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8244 (vect_recog_over_widening_pattern): Likewise.
8245 (vect_recog_gather_scatter_pattern): Likewise.
8246 (vect_recog_func_ptr): Move from tree-vectorizer.h
8247 (vect_vect_recog_func_ptrs): Move further down the file.
8248 (vect_recog_func): Likewise. Remove the third argument.
8249 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8250 (vect_pattern_recog_1): Expect the pattern function to do any
8251 necessary target tests. Also expect it to provide a vector type.
8252 Remove the type_in handling.
8253
8254 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8255
8256 * tree-vect-patterns.c (vect_pattern_detected): New function.
8257 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8258 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8259 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8260 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8261 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8262 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8263 (vect_recog_mask_conversion_pattern)
8264 (vect_try_gather_scatter_pattern): Likewise.
8265
8266 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8267
8268 * tree-vect-patterns.c (vect_get_internal_def): New function.
8269 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8270 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8271 (search_type_for_mask_1): Use it.
8272
8273 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8274
8275 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8276 redundant WIDEN_SUM_EXPR handling.
8277 (vect_recog_sad_pattern): Likewise.
8278
8279 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8280
8281 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8282 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8283 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8284 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8285 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8286
8287 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8288
8289 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8290 use the stmt_vec_info of the original bb statement for the
8291 new zero assignment, even if the call is part of a pattern.
8292
8293 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8294
8295 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8296 that the sequence is attached to the original statement rather
8297 than the pattern statement.
8298 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8299 PATTERN_DEF_SEQ from the original statement rather than
8300 the main pattern statement.
8301 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8302 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8303 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8304
8305 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8306
8307 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8308 definition statements before the early exit for statements that aren't
8309 live or relevant.
8310 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8311 split out from...
8312 (vect_transform_loop): ...here. Process pattern definition
8313 statements without first checking whether the main pattern
8314 statement is live or relevant.
8315
8316 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8317
8318 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8319 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8320
8321 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8322
8323 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8324 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8325 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8326 (expand_block_compare): Change select_block_compare_mode call.
8327 (expand_strncmp_align_check): Use new functions, fix comment.
8328 (emit_final_str_compare_gpr): New function.
8329 (expand_strn_compare): Refactor and clean up code.
8330 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8331
8332 2018-06-19 Tony Reix <tony.reix@atos.com>
8333 Damien Bergamini <damien.bergamini@atos.com>
8334 David Edelsohn <dje.gcc@gmail.com>
8335
8336 * collect2.c (static_obj): New variable.
8337 (static_libs): New variable.
8338 (is_in_list): Uncomment declaration.
8339 (main): Track AIX libraries linked statically.
8340 (is_in_list): Uncomment definition.
8341 (scan_prog_file): Don't add AIX shared libraries initializer
8342 to constructor list if linking statically.
8343
8344 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8345
8346 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8347 constant.
8348 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8349
8350 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8351
8352 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8353 blocks.
8354
8355 2018-06-19 Martin Liska <mliska@suse.cz>
8356
8357 * config/i386/i386.c (ix86_can_inline_p): Do not use
8358 ipa_fn_summaries::get_create.
8359 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8360 get.
8361 (devirtualization_time_bonus): Likewise.
8362 (ipcp_propagate_stage): Likewise.
8363 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8364 (edge_set_predicate): Likewise.
8365 (evaluate_conditions_for_known_args): Likewise.
8366 (evaluate_properties_for_edge): Likewise.
8367 (ipa_call_summary::reset): Tranform to ...
8368 (ipa_call_summary::~ipa_call_summary): ... this.
8369 (ipa_fn_summary::reset): Transform to ...
8370 (ipa_fn_summary::~ipa_fn_summary): ... this.
8371 (ipa_fn_summary_t::remove): Rename to ...
8372 (ipa_fn_summary_t::remove_callees): ... this.
8373 (ipa_fn_summary_t::duplicate): Use placement new
8374 instead of memory copy.
8375 (ipa_call_summary_t::duplicate): Likewise.
8376 (ipa_call_summary_t::remove): Remove.
8377 (dump_ipa_call_summary): Change get_create to get.
8378 (ipa_dump_fn_summary): Dump only when summary exists.
8379 (analyze_function_body): Use symbol_summary::get instead
8380 of get_create.
8381 (compute_fn_summary): Likewise.
8382 (estimate_edge_devirt_benefit): Likewise.
8383 (estimate_edge_size_and_time): Likewise.
8384 (inline_update_callee_summaries): Likewise.
8385 (remap_edge_change_prob): Likewise.
8386 (remap_edge_summaries): Likewise.
8387 (ipa_merge_fn_summary_after_inlining): Likewise.
8388 (write_ipa_call_summary): Likewise.
8389 (ipa_fn_summary_write): Likewise.
8390 (ipa_free_fn_summary): Likewise.
8391 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8392 (struct ipa_call_summary): Likewise.
8393 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8394 of get_create.
8395 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8396 (estimate_size_after_inlining): Likewise.
8397 (estimate_growth): Likewise.
8398 (growth_likely_positive): Likewise.
8399 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8400 (inline_call): Likewise.
8401 * ipa-inline.c (caller_growth_limits): Likewise.
8402 (can_inline_edge_p): Likewise.
8403 (can_inline_edge_by_limits_p): Likewise.
8404 (compute_uninlined_call_time): Likewise.
8405 (compute_inlined_call_time): Likewise.
8406 (want_inline_small_function_p): Likewise.
8407 (edge_badness): Likewise.
8408 (update_caller_keys): Likewise.
8409 (update_callee_keys): Likewise.
8410 (inline_small_functions): Likewise.
8411 (inline_to_all_callers_1): Likewise.
8412 (dump_overall_stats): Likewise.
8413 (early_inline_small_functions): Likewise.
8414 (early_inliner): Likewise.
8415 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8416 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8417 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8418 * ipa-split.c (execute_split_functions): Likewise.
8419 * symbol-summary.h: Likewise.
8420 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8421
8422 2018-06-19 Richard Biener <rguenther@suse.de>
8423
8424 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8425 (vectorize_loops): ... here. Fix dbgcnt handling.
8426 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8427
8428 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8429
8430 PR target/86197
8431 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8432 ieee128 argument takes up only one (vector) register, not two (floating
8433 point) registers.
8434
8435 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8436
8437 * gimplify.c (gimplify_init_constructor): Really never clear for an
8438 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8439
8440 2018-06-19 Richard Biener <rguenther@suse.de>
8441
8442 PR tree-optimization/86179
8443 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8444 after failed recognition.
8445
8446 2018-06-18 Martin Sebor <msebor@redhat.com>
8447
8448 PR middle-end/85602
8449 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8450 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8451 Handle integer subtraction.
8452 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8453 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8454
8455 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8456
8457 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8458 param from rtx to rtx_insn *.
8459 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8460 param.
8461 (frv_ifcvt_modify_insn): Likwise.
8462 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8463 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8464 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8465 as_a <rtx_insn *> cast to local "unprotected_region" once
8466 it's been established that it's not NULL or pc_rtx.
8467 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8468 param "sethi" from rtx to rtx_insn *.
8469 (nds32_group_float_insns): Likewise for param "insn".
8470 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8471 param.
8472 (vax_output_int_subtract): Likewise.
8473 * config/vax/vax.c (vax_output_int_add): Likewise for param
8474 "insn".
8475 (vax_output_int_subtract): Likewise.
8476 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8477 (emit_pattern_after): Likewise for param "after".
8478 (emit_insn_after): Likewise.
8479 (emit_jump_insn_after): Likewise.
8480 (emit_call_insn_after): Likewise.
8481 (emit_debug_insn_after): Likewise.
8482 (emit_pattern_before): Likewise for param "before".
8483 (emit_insn_before): Likewise.
8484 (emit_jump_insn_before): Likewise.
8485 * final.c (get_insn_template): Likewise for param "insn", removing
8486 a cast.
8487 * output.h (get_insn_template): Likewise for 2nd param.
8488 * rtl.h (emit_insn_before): Likewise.
8489 (emit_jump_insn_before): Likewise.
8490 (emit_debug_insn_before_noloc): Likewise.
8491 (emit_insn_after): Likewise.
8492 (emit_jump_insn_after): Likewise.
8493 (emit_call_insn_after): Likewise.
8494 (emit_debug_insn_after): Likewise.
8495 (set_insn_deleted): Likewise for param.
8496
8497 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8498
8499 PR target/85358
8500 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8501 floating point modes, so that IFmode is numerically greater than
8502 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8503 to declare the ordering. This prevents IFmode from being
8504 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8505 machine. Include rs6000-modes.h to share the fractional values
8506 between genmodes* and the rest of the compiler.
8507 (IFmode): Likewise.
8508 (KFmode): Likewise.
8509 (TFmode): Likewise.
8510 * config/rs6000/rs6000-modes.h: New file.
8511 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8512 meaning of rs6000_long_double_size so that 126..128 selects an
8513 appropriate 128-bit floating point type.
8514 (rs6000_option_override_internal): Likewise.
8515 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8516 (TARGET_LONG_DOUBLE_128): Change the meaning of
8517 rs6000_long_double_size so that 126..128 selects an appropriate
8518 128-bit floating point type.
8519 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8520 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8521 source and destination to match the standard usage.
8522 (truncifkf2): Likewise.
8523 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8524 ISA 2.07 to use an explicit clobber, instead of passing in a
8525 temporary.
8526 (copysign<mode>3_soft): Likewise.
8527
8528 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8529
8530 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8531 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8532 (vect_slp_analyze_instance_dependence): Likewise.
8533 (vect_enhance_data_refs_alignment): Likewise.
8534 (vect_analyze_data_refs_alignment): Likewise.
8535 (vect_slp_analyze_and_verify_instance_alignment
8536 (vect_analyze_data_ref_accesses): Likewise.
8537 (vect_prune_runtime_alias_test_list): Likewise.
8538 (vect_analyze_data_refs): Likewise.
8539 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8540 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8541 (vect_analyze_scalar_cycles_1): Likewise.
8542 (vect_get_loop_niters): Likewise.
8543 (vect_analyze_loop_form_1): Likewise.
8544 (vect_update_vf_for_slp): Likewise.
8545 (vect_analyze_loop_operations): Likewise.
8546 (vect_analyze_loop): Likewise.
8547 (vectorizable_induction): Likewise.
8548 (vect_transform_loop): Likewise.
8549 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8550 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8551 (vect_make_slp_decision): Likewise.
8552 (vect_detect_hybrid_slp): Likewise.
8553 (vect_slp_analyze_operations): Likewise.
8554 (vect_slp_bb): Likewise.
8555 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8556 (vectorizable_bswap): Likewise.
8557 (vectorizable_call): Likewise.
8558 (vectorizable_simd_clone_call): Likewise.
8559 (vectorizable_conversion): Likewise.
8560 (vectorizable_assignment): Likewise.
8561 (vectorizable_shift): Likewise.
8562 (vectorizable_operation): Likewise.
8563 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8564
8565 2018-06-18 Martin Sebor <msebor@redhat.com>
8566
8567 PR tree-optimization/81384
8568 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8569 * builtins.c (expand_builtin_strnlen): New function.
8570 (expand_builtin): Call it.
8571 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8572 * builtins.def (BUILT_IN_STRNLEN): New.
8573 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8574 Warn for bounds in excess of maximum object size.
8575 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8576 single-value ranges. Handle strnlen.
8577 (handle_builtin_strlen): Handle strnlen.
8578 (strlen_check_and_optimize_stmt): Same.
8579 * doc/extend.texi (Other Builtins): Document strnlen.
8580
8581 2018-06-18 Maya Rashish <coypu@sdf.org>
8582
8583 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8584 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8585 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8586
8587 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8588 here to ...
8589 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8590
8591 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8592
8593 * tree.c (escaped_string::escape): Replace cast to char * by
8594 const_cast<char *> (unescaped).
8595
8596 2018-06-18 Nick Clifton <nickc@redhat.com>
8597
8598 PR 84195
8599 * tree.c (escaped_string): New class. Converts an unescaped
8600 string into its escaped equivalent.
8601 (warn_deprecated_use): Use the new class to convert the
8602 deprecation message, if present.
8603 (test_escaped_strings): New self test.
8604 (test_c_tests): Add test_escaped_strings.
8605 * doc/extend.texi (deprecated): Add a note that the
8606 deprecation message is affected by the -fmessage-length
8607 option, and that control characters will be escaped.
8608 (#pragma GCC error): Document this pragma.
8609 (#pragma GCC warning): Likewise.
8610 * doc/invoke.texi (-fmessage-length): Document this option's
8611 effect on the #warning and #error preprocessor directives and
8612 the deprecated attribute.
8613
8614 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8615
8616 * tree.c (decl_value_expr_lookup): Revert latest change.
8617 (decl_value_expr_insert): Likewise.
8618
8619 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8620
8621 * gimplify.c (nonlocal_vlas): Delete.
8622 (nonlocal_vla_vars): Likewise.
8623 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8624 referenced VLAs.
8625 (gimplify_body): Do not create and destroy nonlocal_vlas.
8626 * tree-nested.c: Include diagnostic.h.
8627 (use_pointer_in_frame): Tweak.
8628 (lookup_field_for_decl): Add assertion and declare the transformation.
8629 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8630 internal error when the reference is in a wrong context. Do not
8631 create a debug decl by default.
8632 (note_nonlocal_block_vlas): Delete.
8633 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8634 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8635 create a debug decl by default.
8636 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8637 call is in a wrong context.
8638 (fixup_vla_decls): New function.
8639 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8640 debug variables were created.
8641 * tree.c (decl_value_expr_lookup): Add checking assertion.
8642 (decl_value_expr_insert): Likewise.
8643
8644 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8645
8646 PR middle-end/82479
8647 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8648 * tree-scalar-evolution.c (interpret_expr): Likewise.
8649 (expression_expensive_p): Likewise.
8650 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8651 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8652 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8653 (ssa_defined_by_minus_one_stmt_p): New.
8654
8655 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8656
8657 PR middle-end/64946
8658 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8659 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8660 * dojump.c (do_jump): Likewise.
8661 * expr.c (expand_expr_real_2): Check operand type's sign.
8662 * fold-const.c (const_unop): Handle ABSU_EXPR.
8663 (fold_abs_const): Likewise.
8664 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8665 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8666 (strip_sign_op_1): Likesise.
8667 * match.pd: Add new pattern to generate ABSU_EXPR.
8668 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8669 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8670 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8671 * tree-inline.c (estimate_operator_cost): Likewise.
8672 * tree-pretty-print.c (dump_generic_node): Likewise.
8673 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8674 * tree.def (ABSU_EXPR): New.
8675
8676 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8677
8678 PR middle-end/86095
8679 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8680 documented as preserved for backward compatibility only.
8681 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8682
8683 PR rtl-optimization/86108
8684 * bb-reorder.c (create_forwarder_block): Renamed to ...
8685 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8686 jump from new landing pad to the second part.
8687 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8688 Adjust callers.
8689
8690 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8691
8692 PR middle-end/85878
8693 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8694 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8695 Only call store_expr for halves if the mode is the same.
8696
8697 PR middle-end/86123
8698 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8699 Fix up comment formatting.
8700
8701 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8702
8703 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8704 (typed_splay_tree::closure,
8705 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8706 (typed_splay_tree::typed_splay_tree,
8707 typed_splay_tree::operator =): Declared private.
8708 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8709 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8710 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8711 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8712 typed_splay_tree::splay_tree_splay,
8713 typed_splay_tree::splay_tree_foreach_helper,
8714 typed_splay_tree::splay_tree_insert,
8715 typed_splay_tree::splay_tree_remove,
8716 typed_splay_tree::splay_tree_lookup,
8717 typed_splay_tree::splay_tree_predecessor,
8718 typed_splay_tree::splay_tree_successor,
8719 typed_splay_tree::splay_tree_min,
8720 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8721 (typed_splay_tree::root, typed_splay_tree::comp,
8722 typed_splay_tree::delete_key,
8723 typed_splay_tree::delete_value): New data members.
8724 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8725 typed_splay_tree::remove.
8726
8727 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8728
8729 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8730 -mginv and -mno-ginv to the assembler.
8731 * config/mips/mips.opt (-mcrc): New option.
8732 (-mginv): Likewise.
8733 * doc/invoke.text (-mcrc): Document.
8734 (-mginv): Likewise.
8735
8736 2018-06-15 Nick Clifton <nickc@redhat.com>
8737
8738 PR 84195
8739 * tree.c (escaped_string): New class. Converts an unescaped
8740 string into its escaped equivalent.
8741 (warn_deprecated_use): Use the new class to convert the
8742 deprecation message, if present.
8743 (test_escaped_strings): New self test.
8744 (test_c_tests): Add test_escaped_strings.
8745 * doc/extend.texi (deprecated): Add a note that the
8746 deprecation message is affected by the -fmessage-length
8747 option, and that control characters will be escaped.
8748 (#pragma GCC error): Document this pragma.
8749 (#pragma GCC warning): Likewise.
8750 * doc/invoke.texi (-fmessage-length): Document this option's
8751 effect on the #warning and #error preprocessor directives and
8752 the deprecated attribute.
8753
8754 2018-06-15 Richard Biener <rguenther@suse.de>
8755
8756 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8757 here, also noting vector size used.
8758 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8759 size used in MSG_OPTIMIZED_LOCATIONS dump.
8760 (pass_slp_vectorize::execute): Adjust.
8761
8762 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8763
8764 PR target/85968
8765 * config/arc/arc.c (arc_return_address_register): Fix
8766 if-condition.
8767
8768 2018-06-15 Richard Biener <rguenther@suse.de>
8769
8770 PR middle-end/86159
8771 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8772 leave useless conversion stripping to force_gimple_operand_gsi.
8773 (gimplify_build2): Likewise.
8774 (gimplify_build1): Likewise.
8775
8776 2018-06-15 Richard Biener <rguenther@suse.de>
8777
8778 PR middle-end/86076
8779 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8780 before adjusting their block.
8781
8782 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8783
8784 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8785 multilibs for *-*-rtems*.
8786 * config/riscv/t-rtems: New file.
8787
8788 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8789
8790 PR middle-end/86122
8791 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8792 unsigned_type_for returns NULL.
8793
8794 PR target/85945
8795 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8796 subregs of multi-word pseudos unless the float mode has word size.
8797
8798 2018-06-14 Richard Biener <rguenther@suse.de>
8799
8800 PR middle-end/86139
8801 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8802 duplicate and harmful type_hash_canon.
8803 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8804
8805 2018-06-14 Richard Biener <rguenther@suse.de>
8806
8807 PR ipa/86124
8808 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8809 NULL cgraph_node.
8810
8811 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8812
8813 * config/rtems.h (STDINT_LONG32): Define.
8814
8815 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8816 Prachi Godbole <prachi.godbole@imgtec.com>
8817
8818 * config/mips/mips-cpus.def: Define P6600.
8819 * config/mips/mips-tables.opt: Regenerate.
8820 * config/mips/mips.c (mips_ucbranch_type): New enum.
8821 (mips_rtx_cost_data): Add support for P6600.
8822 (mips_issue_rate): Likewise.
8823 (mips_multipass_dfa_lookahead): Likewise.
8824 (mips_avoid_hazard): Likewise.
8825 (mips_reorg_process_insns): Likewise.
8826 (mips_classify_branch_p6600): New function.
8827 * config/mips/mips.h (TUNE_P6600): New define.
8828 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8829 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8830 * config/mips/mips.md: Include p6600.md.
8831 (processor): Add p6600.
8832 * config/mips/p6600.md: New file.
8833 * doc/invoke.texi: Add p6600 to supported architectures.
8834
8835 2018-06-13 Martin Sebor <msebor@redhat.com>
8836
8837 PR tree-optimization/86114
8838 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8839 of integer types.
8840 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8841
8842 2018-06-13 Richard Biener <rguenther@suse.de>
8843
8844 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8845 Properly set vector type of the intermediate stmt.
8846 * tree-vect-stmts.c (vectorizable_operation): The destination
8847 var always has vectype_out type.
8848
8849 2018-06-13 Jeff Law <law@redhat.com>
8850
8851 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8852 integer 0 for argument to print_rtl_with_bb.
8853 (rl78_reorg): Likewise.
8854
8855 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8856
8857 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8858 from rtx to rtx_insn *.
8859 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8860 "label".
8861 (add_sched_insns_for_speculation): Likewise for local "target",
8862 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8863 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8864 from rtx_insn ** to rtx_code_label **.
8865 (reorg_emit_nops): Likewise.
8866 (c6x_reorg): Likewise for local "call_labels".
8867 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8868 rtx to rtx_insn *.
8869 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8870 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8871 the loops over LABEL_REFS.
8872 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8873 braf_label.
8874 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8875 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8876 (split_branches): Strengthen local "olabel" from rtx to
8877 rtx_insn *, adding a safe_as_a cast.
8878 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8879 to "rtx_insn *".
8880 (add_insn_after): Likewise for first two params.
8881 (add_insn_before): Likewise.
8882 (remove_insn): Likewise for param.
8883 (emit_pattern_before_noloc): Likewise for second and third params.
8884 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8885 (emit_call_insn_before_noloc): Likewise.
8886 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8887 to "rtx_insn *".
8888 (emit_barrier_before): Likewise.
8889 (emit_label_before): Strengthen "label" param from "rtx" to
8890 "rtx_code_label *". Strengthen "before" param from "rtx" to
8891 "rtx_insn *".
8892 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8893 "rtx_insn *".
8894 (emit_pattern_after_noloc): Likewise.
8895 (emit_insn_after_noloc): Likewise.
8896 (emit_jump_insn_after_noloc): Likewise.
8897 (emit_call_insn_after_noloc): Likewise.
8898 (emit_debug_insn_after_noloc): Likewise.
8899 (emit_barrier_after): Likewise.
8900 (emit_label_after): Likewise for both params.
8901 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8902 "loc" param from "int" to "location_t".
8903 (emit_insn_after_setloc): Likewise.
8904 (emit_jump_insn_after_setloc): Likewise.
8905 (emit_call_insn_after_setloc): Likewise.
8906 (emit_debug_insn_after_setloc): Likewise.
8907 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8908 "loc" param from "int" to "location_t".
8909 (emit_pattern_before): Convert NULL_RTX to NULL.
8910 (emit_insn_before_setloc): Convert "loc" param from "int" to
8911 "location_t".
8912 (emit_jump_insn_before_setloc): Likewise.
8913 (emit_call_insn_before_setloc): Likewise.
8914 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8915 rtx_insn *. Convert "loc" param from "int" to "location_t".
8916 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8917 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8918 Convert 3rd param from "int" to "location_t".
8919 (emit_barrier_before, emit_barrier_after, next_real_insn):
8920 Strengthen param from rtx to rtx_insn *.
8921 (emit_label_before): Strengthen 1st param from "rtx" to
8922 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8923 "rtx_insn *".
8924 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8925 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8926 Strengthen 2nd param from "rtx" to "rtx_insn *".
8927 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8928 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8929 Likewise. Convert 3rd param from "int" to "location_t".
8930 (emit_label_after): Strengthen 1st param from "rtx" to
8931 "rtx_code_label *".
8932 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8933 "rtx_insn *".
8934 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8935 from "rtx" to "rtx_insn *".
8936
8937 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8938
8939 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8940 bodies streamed in with -Q.
8941 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8942 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8943 * gimple-streamer-out.c: Include gimple-pretty-print.h
8944 (output_bb): Dump stmts streamed.
8945 * lto-section-out.c: Include print-tree.h
8946 (lto_begin_section): Dump sections created.
8947 (lto_output_decl_index): Dump decl encoded.
8948 * lto-streamer-out.c: Include print-tree.h
8949 (create_output_block): Dump output block created.
8950 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8951 (output_function): Dump function output.
8952 (output_constructor): Dump constructor streamed.
8953 (write_global_stream): Output indexes encoded.
8954 (produce_asm_for_decls): Dump streams encoded.
8955 * lto-streamer.c (streamer_dump_file): New global var.
8956 * lto-streamer.h (streamer_dump_file): Declare.
8957 * passes.c (ipa_write_summaries): Initialize streamer dump.
8958 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8959 in.
8960
8961 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8962
8963 PR target/86048
8964 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8965 offsets for register save directives. Emit a second batch of save
8966 directives, if need be, when the function accesses prior frames.
8967
8968 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8969
8970 * config/arc/fpu.md (fmasf4): Force operand to register.
8971 (fnmasf4): Likewise.
8972
8973 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8974
8975 * config/arc/arc-protos.h (arc_pad_return): Remove.
8976 * config/arc/arc.c (machine_function): Remove force_short_suffix
8977 and size_reason.
8978 (arc_print_operand): Adjust printing of '&'.
8979 (arc_verify_short): Remove conditional printing of short suffix.
8980 (arc_final_prescan_insn): Remove reference to size_reason.
8981 (pad_return): New function.
8982 (arc_reorg): Call pad_return.
8983 (arc_pad_return): Remove.
8984 (arc_init_machine_status): Remove reference to force_short_suffix.
8985 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8986 (attr length): When attribute iscompact is true force to 2
8987 regardless; in the case of maybe check if we want to force the
8988 instruction to have 4 bytes length.
8989 (nopv): Change it to generate 4 byte long nop as well.
8990 (blockage): New pattern.
8991 (simple_return): Remove call to arc_pad_return.
8992 (p_return_i): Likewise.
8993
8994 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8995
8996 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8997
8998 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8999
9000 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9001 ARC cores.
9002
9003 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9004
9005 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9006 for ARC700 and ARCv2.
9007
9008 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9009
9010 PR target/86076
9011 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9012 operands[2] instead of operands[1].
9013
9014
9015 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9016
9017 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9018 case, check whether the outer register overlaps an unallocatable
9019 register, not just whether it fits the required class.
9020
9021 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9022
9023 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9024 are poly_ints.
9025 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9026 (memrefs_conflict_p): Likewise.
9027 (init_alias_analysis): Likewise.
9028 * cfgexpand.c (expand_debug_expr): Likewise.
9029 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9030 * cse.c (fold_rtx): Likewise.
9031 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9032 * expr.c (emit_block_move_hints): Likewise.
9033 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9034 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9035 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9036 (emit_group_store): Likewise.
9037 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9038 to read the PRE/POST_MODIFY increment.
9039 * calls.c (store_one_arg): Use strip_offset.
9040 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9041 poly_int_rtx_p.
9042 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9043 by a VEC_SELECT.
9044 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9045 (simplify_binary_operation_1): Extend CONST_INT handling to
9046 poly_int_rtx_p.
9047 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9048 than a HOST_WIDE_INT.
9049 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9050 poly_int64.
9051 (adjust_mems, add_stores): Update accodingly.
9052 (vt_canonicalize_addr): Track polynomial offsets.
9053 (emit_note_insn_var_location): Likewise.
9054 (vt_add_function_parameter): Likewise.
9055 (vt_initialize): Likewise.
9056
9057 2018-06-12 Jeff Law <law@redhat.com>
9058
9059 * config.gcc (alpha*-*-freebsd*): Remove.
9060 * config/alpha/freebsd.h: Remove.
9061
9062 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9063
9064 PR other/69968
9065 * spellcheck-tree.c (levenshtein_distance): Rename to...
9066 (get_edit_distance): ...this, and update for underlying renaming.
9067 * spellcheck-tree.h (levenshtein_distance): Rename to...
9068 (get_edit_distance): ...this.
9069 * spellcheck.c (levenshtein_distance): Rename to...
9070 (get_edit_distance): ...this. Convert from Levenshtein distance
9071 to Damerau-Levenshtein distance by supporting transpositions of
9072 adjacent characters. Rename "v1" to "v_next" and "v0" to
9073 "v_one_ago".
9074 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9075 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9076 update for underlying renaming.
9077 (selftest::levenshtein_distance_unit_test): Rename to...
9078 (selftest::test_get_edit_distance_unit): ...this, and update for
9079 underlying renaming.
9080 (selftest::test_find_closest_string): Add example from PR 69968
9081 where transposition helps
9082 (selftest::test_metric_conditions): Update for renaming.
9083 (selftest::test_metric_conditions): Likewise.
9084 (selftest::spellcheck_c_tests): Likewise.
9085 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9086 (get_edit_distance): ...this.
9087 (best_match::consider): Update for renaming.
9088
9089 2018-06-12 Martin Sebor <msebor@redhat.com>
9090
9091 PR tree-optimization/85259
9092 * builtins.c (compute_objsize): Handle constant offsets.
9093 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9094 true iff a warning has been issued.
9095 * gimple.h (gimple_nonartificial_location): New function.
9096 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9097 gimple_nonartificial_location and handle -Wno-system-headers.
9098 (handle_builtin_stxncpy): Same.
9099
9100 2018-06-12 Martin Sebor <msebor@redhat.com>
9101
9102 PR c/85931
9103 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9104
9105 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9106
9107 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9108 BUILTIN_VEC_XST entries for pointer to double and long long.
9109
9110 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9111
9112 PR target/85990
9113 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9114 Update comments.
9115 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9116 Likewise.
9117
9118 2018-06-12 Martin Liska <mliska@suse.cz>
9119
9120 * doc/options.texi: Document IntegerRange.
9121
9122 2018-06-12 Martin Liska <mliska@suse.cz>
9123
9124 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9125 * opt-functions.awk: Handle Deprecated flag.
9126 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9127 and report error.
9128 (read_cmdline_option): Report warning for a deprecated option.
9129 * opts.h (struct cl_option): Add new field cl_deprecated.
9130 (CL_ERR_DEPRECATED): New.
9131
9132 2018-06-12 Martin Liska <mliska@suse.cz>
9133
9134 * doc/options.texi: Document Deprecated option flag.
9135
9136 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9137
9138 * config/arc/arc-arch.h (arc_extras): New enum.
9139 (arc_cpu_t):Add field extra.
9140 (arc_cpu_types): Consider the extras.
9141 * config/arc/arc-cpus.def: Add extras info.
9142 * config/arc/arc-opts.h (processor_type): Consider extra field.
9143 * config/arc/arc.c (arc_override_options): Handle extra field.
9144
9145 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9146
9147 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9148 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9149 field.
9150 * config/arc/arc.c (arc_init): Update pic warning.
9151 (irq_range): Update irq range parsing warnings.
9152 (arc_override_options): Update various warning messages.
9153 (arc_handle_aux_attribute): Likewise.
9154
9155 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9156
9157 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9158
9159 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9160
9161 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9162 compiler messages directives.
9163
9164 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9165
9166 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9167 * config/mips/mips-tables.opt: Regenerate.
9168 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9169 mips64r6.
9170 * doc/invoke.texi: Document -march=i6500.
9171
9172 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9173
9174 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9175 (i6400_gpmul): Add cpu_unit.
9176 (i6400_gpdiv): Likewise.
9177 (i6400_msa_add_d): Update reservations.
9178 (i6400_msa_int_add) Likewise.
9179 (i6400_msa_short_logic3) Likewise.
9180 (i6400_msa_short_logic2) Likewise.
9181 (i6400_msa_short_logic) Likewise.
9182 (i6400_msa_move) Likewise.
9183 (i6400_msa_cmp) Likewise.
9184 (i6400_msa_short_float2) Likewise.
9185 (i6400_msa_div_d) Likewise.
9186 (i6400_msa_long_logic1) Likewise.
9187 (i6400_msa_long_logic2) Likewise.
9188 (i6400_msa_mult) Likewise.
9189 (i6400_msa_long_float2) Likewise.
9190 (i6400_msa_long_float4) Likewise.
9191 (i6400_msa_long_float5) Likewise.
9192 (i6400_msa_long_float8) Likewise.
9193 (i6400_fpu_fadd): Include frint type.
9194 (i6400_fpu_store): New define_insn_reservation.
9195 (i6400_fpu_load): Likewise.
9196 (i6400_fpu_move): Likewise.
9197 (i6400_fpu_fcmp): Likewise.
9198 (i6400_fpu_fmadd): Likewise.
9199 (i6400_int_mult): Include imul3nc type and update reservation.
9200 (i6400_int_div): Include idiv3 type and update reservation.
9201 (i6400_int_load): Update to check type not move_type.
9202 (i6400_int_store): Likewise.
9203 (i6400_int_prefetch): Set zero latency.
9204
9205 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9206
9207 * gcc.c: Document new %@{...} sequence.
9208 (LINK_COMMAND_SPEC): Use it for the -L switches.
9209 (cpp_unique_options): Use it for the -I switches.
9210 (at_file_argbuf): New global variable.
9211 (in_at_file): Likewise.
9212 (alloc_args): Create at_file_argbuf.
9213 (clear_args): Truncate at_file_argbuf.
9214 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9215 (open_at_file): New function.
9216 (close_at_file): Likewise.
9217 (create_at_file): Delete.
9218 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9219 <'o'>: Likewise.
9220 <'@'>: New case.
9221 (validate_switches_from_spec): Deal with %@{...} sequence.
9222 (validate_switches): Likewise.
9223 (driver::finalize): Call clear_args.
9224
9225 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9226
9227 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9228
9229 2018-06-11 Martin Sebor <msebor@redhat.com>
9230
9231 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9232 (Wno-class-memaccess): Add @opindex.
9233 (Wno-templates, Wno-multiple-inheritance): Same.
9234 (Wno-virtual-inheritance, Wno-namespaces): Same.
9235 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9236 (Wno-format-overflow, Wno-format-truncation): Same.
9237 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9238 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9239 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9240 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9241 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9242 (Wno-misspelled-isr): Same.
9243
9244 2018-06-11 Martin Sebor <msebor@redhat.com>
9245
9246 * PR tree-optimization/86083
9247 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9248
9249 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9250
9251 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9252
9253 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9254
9255 PR target/85755
9256 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9257 on the correct operand.
9258 (*movdi_internal64): Ditto.
9259
9260 2018-06-11 Martin Liska <mliska@suse.cz>
9261
9262 PR tree-optimization/86089
9263 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9264
9265 2018-06-11 Julia Koval <julia.koval@intel.com>
9266
9267 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9268 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9269 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9270
9271 2018-06-11 Olivier Hainque <hainque@adacore.com>
9272
9273 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9274 for Ada with strict dwarf2.
9275
9276 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9277
9278 PR target/85755
9279 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9280 addresses.
9281
9282 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9283
9284 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9285
9286 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9287
9288 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9289 TARGET_ELF.
9290
9291 2018-06-08 Martin Liska <mliska@suse.cz>
9292
9293 * tree-cfg.h (debug_function): Fix argument type to match
9294 implementation.
9295
9296 2018-06-08 Martin Liska <mliska@suse.cz>
9297
9298 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9299 Remove usage of MPX-related (and removed) fields.
9300 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9301
9302 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9303
9304 * cfg.c (debug): Use TDF_NONE rather than 0.
9305 * cfghooks.c (debug): Likewise.
9306 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9307 (struct dump_option_value_info): Convert to...
9308 (struct kv_pair): ...this template type.
9309 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9310 rather than 0.
9311 (optinfo_verbosity_options): Likewise.
9312 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9313 OPTGROUP_NONE.
9314 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9315 than int for "optgroup_flags" param.
9316 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9317 "dump_kind" param.
9318 (dump_dec): Likewise.
9319 (dump_finish): Use TDF_NONE rather than 0.
9320 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9321 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9322 than 0. Update for change to option_ptr.
9323 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9324 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9325 0. Update for changes to optinfo_verbosity_options and
9326 optgroup_options.
9327 (opt_info_switch_p): Convert optgroup_flags from int to
9328 optgroup_flags_t.
9329 (dump_basic_block): Use dump_flags_t rather than int
9330 for "dump_kind" param.
9331 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9332 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9333 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9334 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9335 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9336 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9337 TDF_NONE): Convert from macros to...
9338 (enum dump_flag): ...this new enum.
9339 (dump_flags_t): Update to use enum.
9340 (operator|, operator&, operator~, operator|=, operator&=):
9341 Implement for dump_flags_t.
9342 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9343 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9344 Convert from macros to...
9345 (enum optgroup_flag): ...this new enum.
9346 (optgroup_flags_t): New typedef.
9347 (operator|, operator|=): Implement for optgroup_flags_t.
9348 (struct dump_file_info): Convert field "alt_flags" to
9349 dump_flags_t. Convert field "optgroup_flags" to
9350 optgroup_flags_t.
9351 (dump_basic_block): Use dump_flags_t rather than int for param.
9352 (dump_generic_expr_loc): Likewise.
9353 (dump_dec): Likewise.
9354 (dump_register): Convert param "optgroup_flags" to
9355 optgroup_flags_t.
9356 (opt_info_enable_passes): Likewise.
9357 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9358 than 0.
9359 * gimple-pretty-print.c (debug): Likewise.
9360 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9361 (merged_store_group::apply_stores): Likewise.
9362 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9363 * gimple.c (verify_gimple_pp): Likewise.
9364 * graphite-poly.c (print_pbb_body): Likewise.
9365 * passes.c (pass_manager::register_one_dump_file): Convert
9366 local "optgroup_flags" to optgroup_flags_t.
9367 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9368 (debug): Likewise.
9369 (debug_body): Likewise.
9370 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9371 to optgroup_flags_t.
9372 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9373 than 0.
9374 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9375 (convert_mult_to_fma): Likewise.
9376 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9377 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9378 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9379 "dump_kind" to dump_flags_t.
9380
9381 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9382
9383 * config/rs6000/rs6000.c (min, max): Delete.
9384
9385 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9386
9387 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9388 -mabi=spe and -mabi=no-spe.
9389
9390 2018-06-08 Martin Liska <mliska@suse.cz>
9391
9392 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9393 where we expect an existing summary.
9394
9395 2018-06-08 Martin Liska <mliska@suse.cz>
9396
9397 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9398 * ipa-inline.h (estimate_edge_growth): Likewise.
9399
9400 2018-06-08 Martin Liska <mliska@suse.cz>
9401
9402 * cgraph.c (function_version_hasher::hash): Use
9403 cgraph_node::get_uid ().
9404 (function_version_hasher::equal):
9405 * cgraph.h (cgraph_node::get_uid): New method.
9406 * ipa-inline.c (update_caller_keys): Use
9407 cgraph_node::get_uid ().
9408 (update_callee_keys): Likewise.
9409 * ipa-utils.c (searchc): Likewise.
9410 (ipa_reduced_postorder): Likewise.
9411 * lto-cgraph.c (input_node): Likewise.
9412 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9413 * symbol-summary.h (symtab_insertion): Likewise.
9414 (symtab_removal): Likewise.
9415 (symtab_duplication): Likewise.
9416 * tree-pretty-print.c (dump_function_header): Likewise.
9417 * tree-sra.c (convert_callers_for_node): Likewise.
9418
9419 2018-06-08 Martin Liska <mliska@suse.cz>
9420
9421 * cgraph.c (symbol_table::create_edge): Always assign a new
9422 unique number.
9423 (symbol_table::free_edge): Do not recycle numbers.
9424 * cgraph.h (cgraph_edge::get): New method.
9425 * symbol-summary.h (symtab_removal): Use it.
9426 (symtab_duplication): Likewise.
9427 (call_summary::hashable_uid): Remove.
9428
9429 2018-06-08 Martin Liska <mliska@suse.cz>
9430
9431 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9432 (initialize_growth_caches): Remove.
9433 (free_growth_caches): Likewise.
9434 (do_estimate_edge_time): Use edge_growth_cache.
9435 (do_estimate_edge_size): Likewise.
9436 (do_estimate_edge_hints): Likewise.
9437 * ipa-inline.c (reset_edge_caches): Likewise.
9438 (recursive_inlining): Likewise.
9439 (inline_small_functions): Likewise.
9440 * ipa-inline.h (initialize_growth_caches): Remove.
9441 (estimate_edge_size): Likewise.
9442 (estimate_edge_time): Likewise.
9443 (estimate_edge_hints): Likewise.
9444 (reset_edge_growth_cache): Likewise.
9445 * symbol-summary.h (call_summary::remove): New method.
9446
9447 2018-06-08 Martin Liska <mliska@suse.cz>
9448
9449 * ipa-cp.c (class edge_clone_summary): New summary.
9450 (grow_edge_clone_vectors): Remove.
9451 (ipcp_edge_duplication_hook): Remove.
9452 (class edge_clone_summary_t): New call_summary class.
9453 (ipcp_edge_removal_hook): Remove.
9454 (edge_clone_summary_t::duplicate): New function.
9455 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9456 (create_specialized_node): Likewise.
9457 (ipcp_driver): Initialize edge_clone_summaries and do not
9458 register hooks.
9459
9460 2018-06-08 Martin Liska <mliska@suse.cz>
9461
9462 * symbol-summary.h (get): New function.
9463 (call_summary::m_initialize_when_cloning): New class member.
9464
9465 2018-06-08 Martin Liska <mliska@suse.cz>
9466
9467 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9468 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9469 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9470 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9471 (remove_cgraph_node_from_order): Use the removed_nodes set.
9472 (do_per_function_toporder): Likwise.
9473 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9474 instead of summary_uid.
9475 (symtab_removal): Likewise.
9476 (symtab_duplication): Likewise.
9477
9478 2018-06-08 Martin Liska <mliska@suse.cz>
9479
9480 * ipa-cp.c (ipcp_store_bits_results): Use
9481 ipcp_transformation_sum.
9482 (ipcp_store_vr_results): Likewise.
9483 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9484 to ...
9485 (ipcp_transformation_initialize): ... this.
9486 (ipa_set_node_agg_value_chain):
9487 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9488 (write_ipcp_transformation_info): Likewise.
9489 (read_ipcp_transformation_info): Likewise.
9490 (ipcp_update_bits): Likewise.
9491 (ipcp_update_vr): Likewise.
9492 (ipcp_transform_function): Likewise.
9493 * ipa-prop.h: Rename ipcp_transformation_summary to
9494 ipcp_transformation.
9495 (class ipcp_transformation_t): New function summary.
9496 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9497 (ipa_get_agg_replacements_for_node): Likewise.
9498
9499 2018-06-08 Martin Liska <mliska@suse.cz>
9500
9501 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9502 of struct.
9503 (class funct_state_summary_t): New function_summary class.
9504 (has_function_state): Remove.
9505 (get_function_state): Likewise.
9506 (set_function_state): Likewise.
9507 (add_new_function): Likewise.
9508 (funct_state_summary_t::insert): New function.
9509 (duplicate_node_data): Remove.
9510 (remove_node_data): Remove.
9511 (funct_state_summary_t::duplicate): New function.
9512 (register_hooks): Create new funct_state_summaries.
9513 (pure_const_generate_summary): Use it.
9514 (pure_const_write_summary): Likewise.
9515 (pure_const_read_summary): Likewise.
9516 (propagate_pure_const): Likewise.
9517 (propagate_nothrow): Likewise.
9518 (dump_malloc_lattice): Likewise.
9519 (propagate_malloc): Likewise.
9520 (execute): Do not register hooks, just remove summary
9521 instead.
9522 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9523 constructor.
9524
9525 2018-06-08 Martin Liska <mliska@suse.cz>
9526
9527 * ipa-reference.c (remove_node_data): Remove.
9528 (duplicate_node_data): Likewise.
9529 (class ipa_ref_var_info_summary_t): New class.
9530 (class ipa_ref_opt_summary_t): Likewise.
9531 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9532 (get_reference_optimization_summary): Use
9533 ipa_ref_opt_sum_summaries.
9534 (set_reference_vars_info): Remove.
9535 (set_reference_optimization_summary): Likewise.
9536 (ipa_init): Create summaries.
9537 (init_function_info): Use function summary.
9538 (ipa_ref_opt_summary_t::duplicate): New function.
9539 (ipa_ref_opt_summary_t::remove): New function.
9540 (get_read_write_all_from_node): Fix GNU coding style.
9541 (propagate): Use function summary.
9542 (write_node_summary_p): Fix GNU coding style.
9543 (stream_out_bitmap): Likewise.
9544 (ipa_reference_read_optimization_summary): Use function summary.
9545 (ipa_reference_c_finalize): Do not release hooks.
9546
9547 2018-06-08 Martin Liska <mliska@suse.cz>
9548
9549 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9550 (analyze_function_body): Extract multiple calls of get_create.
9551 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9552 * ipa-inline.c (recursive_inlining): Use ::get method.
9553 * ipa-inline.h (estimate_edge_growth): Likewise.
9554
9555 2018-06-08 Martin Liska <mliska@suse.cz>
9556
9557 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9558 HSA_INVALID.
9559 (hsa_function_summary::hsa_function_summary): Use the new enum
9560 value.
9561 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9562 * hsa-gen.c (hsa_get_host_function): Likewise.
9563 (get_brig_function_name): Likewise.
9564 * ipa-hsa.c (process_hsa_functions): Likewise.
9565 (ipa_hsa_write_summary): Likewise.
9566 * symbol-summary.h (symtab_duplication): Use ::get function/
9567 (get): New function.
9568
9569 2018-06-08 Martin Liska <mliska@suse.cz>
9570
9571 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9572 of get.
9573 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9574 (hsa_register_kernel): Likewise.
9575 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9576 * hsa-gen.c (hsa_get_host_function): Likewise.
9577 (get_brig_function_name): Likewise.
9578 (generate_hsa): Likewise.
9579 (pass_gen_hsail::execute): Likewise.
9580 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9581 (devirtualization_time_bonus): Likewise.
9582 (ipcp_propagate_stage): Likewise.
9583 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9584 (edge_set_predicate): Likewise.
9585 (evaluate_conditions_for_known_args): Likewise.
9586 (evaluate_properties_for_edge): Likewise.
9587 (ipa_fn_summary::reset): Likewise.
9588 (ipa_fn_summary_t::duplicate): Likewise.
9589 (dump_ipa_call_summary): Likewise.
9590 (ipa_dump_fn_summary): Likewise.
9591 (analyze_function_body): Likewise.
9592 (compute_fn_summary): Likewise.
9593 (estimate_edge_devirt_benefit): Likewise.
9594 (estimate_edge_size_and_time): Likewise.
9595 (estimate_calls_size_and_time): Likewise.
9596 (estimate_node_size_and_time): Likewise.
9597 (inline_update_callee_summaries): Likewise.
9598 (remap_edge_change_prob): Likewise.
9599 (remap_edge_summaries): Likewise.
9600 (ipa_merge_fn_summary_after_inlining): Likewise.
9601 (ipa_update_overall_fn_summary): Likewise.
9602 (read_ipa_call_summary): Likewise.
9603 (inline_read_section): Likewise.
9604 (write_ipa_call_summary): Likewise.
9605 (ipa_fn_summary_write): Likewise.
9606 (ipa_free_fn_summary): Likewise.
9607 * ipa-hsa.c (process_hsa_functions): Likewise.
9608 (ipa_hsa_write_summary): Likewise.
9609 (ipa_hsa_read_section): Likewise.
9610 * ipa-icf.c (sem_function::merge): Likewise.
9611 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9612 (do_estimate_edge_time): Likewise.
9613 (estimate_size_after_inlining): Likewise.
9614 (estimate_growth): Likewise.
9615 (growth_likely_positive): Likewise.
9616 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9617 (inline_call): Likewise.
9618 * ipa-inline.c (caller_growth_limits): Likewise.
9619 (can_inline_edge_p): Likewise.
9620 (can_inline_edge_by_limits_p): Likewise.
9621 (compute_uninlined_call_time): Likewise.
9622 (compute_inlined_call_time): Likewise.
9623 (want_inline_small_function_p): Likewise.
9624 (edge_badness): Likewise.
9625 (update_caller_keys): Likewise.
9626 (update_callee_keys): Likewise.
9627 (recursive_inlining): Likewise.
9628 (inline_small_functions): Likewise.
9629 (inline_to_all_callers_1): Likewise.
9630 (dump_overall_stats): Likewise.
9631 (early_inline_small_functions): Likewise.
9632 (early_inliner): Likewise.
9633 * ipa-inline.h (estimate_edge_growth): Likewise.
9634 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9635 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9636 * ipa-prop.h (IPA_NODE_REF): Likewise.
9637 (IPA_EDGE_REF): Likewise.
9638 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9639 (propagate_malloc): Likewise.
9640 * ipa-split.c (execute_split_functions): Likewise.
9641 * symbol-summary.h: Rename get to get_create.
9642 (get): Likewise.
9643 (get_create): Likewise.
9644 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9645
9646 2018-06-08 Martin Liska <mliska@suse.cz>
9647
9648 * symbol-summary.h (release): Move definition out of class
9649 declaration.
9650 (symtab_removal): Likewise.
9651 (symtab_duplication): Likewise.
9652
9653 2018-06-08 Martin Liska <mliska@suse.cz>
9654
9655 * symbol-summary.h (function_summary): Move constructor
9656 implementation out of class declaration.
9657 (release): Likewise.
9658 (symtab_insertion): Likewise.
9659 (symtab_removal): Likewise.
9660 (symtab_duplication): Likewise.
9661 (get): Likewise.
9662
9663 2018-06-08 Martin Liska <mliska@suse.cz>
9664
9665 * Makefile.in: Remove support for MPX (macros, related functions,
9666 fields in cgraph_node, ...).
9667 * builtin-types.def (BT_BND): Likewise.
9668 (BT_FN_BND_CONST_PTR): Likewise.
9669 (BT_FN_CONST_PTR_BND): Likewise.
9670 (BT_FN_VOID_PTR_BND): Likewise.
9671 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9672 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9673 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9674 (expand_builtin_mempcpy_with_bounds): Likewise.
9675 (expand_builtin_memset_with_bounds): Likewise.
9676 (expand_builtin_memset_args): Likewise.
9677 (std_expand_builtin_va_start): Likewise.
9678 (expand_builtin): Likewise.
9679 (expand_builtin_with_bounds): Likewise.
9680 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9681 (DEF_LIB_BUILTIN_CHKP): Likewise.
9682 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9683 (DEF_CHKP_BUILTIN): Likewise.
9684 (BUILT_IN_MEMCPY): Likewise.
9685 (BUILT_IN_MEMMOVE): Likewise.
9686 (BUILT_IN_MEMPCPY): Likewise.
9687 (BUILT_IN_MEMSET): Likewise.
9688 (BUILT_IN_STPCPY): Likewise.
9689 (BUILT_IN_STRCAT): Likewise.
9690 (BUILT_IN_STRCHR): Likewise.
9691 (BUILT_IN_STRCPY): Likewise.
9692 (BUILT_IN_STRLEN): Likewise.
9693 (BUILT_IN_MEMCPY_CHK): Likewise.
9694 (BUILT_IN_MEMMOVE_CHK): Likewise.
9695 (BUILT_IN_MEMPCPY_CHK): Likewise.
9696 (BUILT_IN_MEMSET_CHK): Likewise.
9697 (BUILT_IN_STPCPY_CHK): Likewise.
9698 (BUILT_IN_STRCAT_CHK): Likewise.
9699 (BUILT_IN_STRCPY_CHK): Likewise.
9700 * calls.c (store_bounds): Likewise.
9701 (emit_call_1): Likewise.
9702 (special_function_p): Likewise.
9703 (maybe_warn_nonstring_arg): Likewise.
9704 (initialize_argument_information): Likewise.
9705 (finalize_must_preallocate): Likewise.
9706 (compute_argument_addresses): Likewise.
9707 (expand_call): Likewise.
9708 * cfgexpand.c (expand_call_stmt): Likewise.
9709 (expand_return): Likewise.
9710 (expand_gimple_stmt_1): Likewise.
9711 (pass_expand::execute): Likewise.
9712 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9713 (cgraph_node::remove): Likewise.
9714 (cgraph_node::dump): Likewise.
9715 (cgraph_node::verify_node): Likewise.
9716 * cgraph.h (chkp_function_instrumented_p): Likewise.
9717 (symtab_node::get_alias_target): Likewise.
9718 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9719 (cgraph_local_p): Likewise.
9720 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9721 (cgraph_edge::rebuild_references): Likewise.
9722 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9723 (walk_polymorphic_call_targets): Likewise.
9724 (cgraph_node::expand_thunk): Likewise.
9725 (symbol_table::output_weakrefs): Likewise.
9726 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9727 (ix86_handle_option): Likewise.
9728 * config/i386/constraints.md: Likewise.
9729 * config/i386/i386-builtin-types.def (BND): Likewise.
9730 (VOID): Likewise.
9731 (PVOID): Likewise.
9732 (ULONG): Likewise.
9733 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9734 (BDESC_FIRST): Likewise.
9735 (BDESC): Likewise.
9736 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9737 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9738 * config/i386/i386.c (enum reg_class): Likewise.
9739 (ix86_target_string): Likewise.
9740 (ix86_option_override_internal): Likewise.
9741 (ix86_conditional_register_usage): Likewise.
9742 (ix86_valid_target_attribute_inner_p): Likewise.
9743 (ix86_set_indirect_branch_type): Likewise.
9744 (ix86_set_current_function): Likewise.
9745 (ix86_function_arg_regno_p): Likewise.
9746 (init_cumulative_args): Likewise.
9747 (ix86_function_arg_advance): Likewise.
9748 (ix86_function_arg): Likewise.
9749 (ix86_pass_by_reference): Likewise.
9750 (ix86_function_value_regno_p): Likewise.
9751 (ix86_function_value_1): Likewise.
9752 (ix86_function_value_bounds): Likewise.
9753 (ix86_return_in_memory): Likewise.
9754 (ix86_setup_incoming_vararg_bounds): Likewise.
9755 (ix86_va_start): Likewise.
9756 (indirect_thunk_need_prefix): Likewise.
9757 (print_reg): Likewise.
9758 (ix86_print_operand): Likewise.
9759 (ix86_expand_call): Likewise.
9760 (ix86_output_function_return): Likewise.
9761 (reg_encoded_number): Likewise.
9762 (BDESC_VERIFYS): Likewise.
9763 (ix86_init_mpx_builtins): Likewise.
9764 (ix86_init_builtins): Likewise.
9765 (ix86_emit_cmove): Likewise.
9766 (ix86_emit_move_max): Likewise.
9767 (ix86_expand_builtin): Likewise.
9768 (ix86_builtin_mpx_function): Likewise.
9769 (ix86_get_arg_address_for_bt): Likewise.
9770 (ix86_load_bounds): Likewise.
9771 (ix86_store_bounds): Likewise.
9772 (ix86_load_returned_bounds): Likewise.
9773 (ix86_store_returned_bounds): Likewise.
9774 (ix86_class_likely_spilled_p): Likewise.
9775 (ix86_hard_regno_mode_ok): Likewise.
9776 (x86_order_regs_for_local_alloc): Likewise.
9777 (ix86_mitigate_rop): Likewise.
9778 (ix86_bnd_prefixed_insn_p): Likewise.
9779 (ix86_mpx_bound_mode): Likewise.
9780 (ix86_make_bounds_constant): Likewise.
9781 (ix86_initialize_bounds): Likewise.
9782 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9783 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9784 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9785 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9786 (TARGET_CHKP_BOUND_MODE): Likewise.
9787 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9788 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9789 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9790 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9791 * config/i386/i386.h (TARGET_MPX): Likewise.
9792 (TARGET_MPX_P): Likewise.
9793 (VALID_BND_REG_MODE): Likewise.
9794 (FIRST_BND_REG): Likewise.
9795 (LAST_BND_REG): Likewise.
9796 (enum reg_class): Likewise.
9797 (BND_REG_P): Likewise.
9798 (BND_REGNO_P): Likewise.
9799 (BNDmode): Likewise.
9800 (ADJUST_INSN_LENGTH): Likewise.
9801 * config/i386/i386.md: Likewise.
9802 * config/i386/i386.opt: Likewise.
9803 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9804 (defined): Likewise.
9805 (LINK_MPX): Likewise.
9806 (MPX_SPEC): Likewise.
9807 (LIBMPX_SPEC): Likewise.
9808 (LIBMPXWRAPPERS_SPEC): Likewise.
9809 (CHKP_SPEC): Likewise.
9810 * config/i386/predicates.md: Likewise.
9811 * dbxout.c (dbxout_type): Likewise.
9812 * doc/extend.texi: Likewise.
9813 * doc/invoke.texi: Likewise.
9814 * doc/md.texi: Likewise.
9815 * doc/tm.texi: Likewise.
9816 * doc/tm.texi.in: Likewise.
9817 * dwarf2out.c (is_base_type): Likewise.
9818 (gen_formal_types_die): Likewise.
9819 (gen_subprogram_die): Likewise.
9820 (gen_type_die_with_usage): Likewise.
9821 (gen_decl_die): Likewise.
9822 (dwarf2out_late_global_decl): Likewise.
9823 * expr.c (expand_assignment): Likewise.
9824 (emit_storent_insn): Likewise.
9825 (store_expr_with_bounds): Likewise.
9826 (store_expr): Likewise.
9827 (expand_expr_real_1): Likewise.
9828 * expr.h (store_expr_with_bounds): Likewise.
9829 * function.c (use_register_for_decl): Likewise.
9830 (struct bounds_parm_data): Likewise.
9831 (assign_parms_augmented_arg_list): Likewise.
9832 (assign_parm_find_entry_rtl): Likewise.
9833 (assign_parm_is_stack_parm): Likewise.
9834 (assign_parm_load_bounds): Likewise.
9835 (assign_bounds): Likewise.
9836 (assign_parms): Likewise.
9837 (expand_function_start): Likewise.
9838 * gcc.c (CHKP_SPEC): Likewise.
9839 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9840 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9841 (wrestrict_dom_walker::check_call): Likewise.
9842 * gimple.c (gimple_build_call_from_tree): Likewise.
9843 * gimple.h (enum gf_mask): Likewise.
9844 (gimple_call_with_bounds_p): Likewise.
9845 (gimple_call_set_with_bounds): Likewise.
9846 * gimplify.c (gimplify_init_constructor): Likewise.
9847 * ipa-cp.c (initialize_node_lattices): Likewise.
9848 (propagate_constants_across_call): Likewise.
9849 (find_more_scalar_values_for_callers_subset): Likewise.
9850 * ipa-hsa.c (process_hsa_functions): Likewise.
9851 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9852 * ipa-icf.c (sem_function::merge): Likewise.
9853 * ipa-inline.c (early_inliner): Likewise.
9854 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9855 (warn_function_cold): Likewise.
9856 (propagate_pure_const): Likewise.
9857 * ipa-ref.h (enum GTY): Likewise.
9858 * ipa-split.c (find_retbnd): Likewise.
9859 (consider_split): Likewise.
9860 (split_function): Likewise.
9861 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9862 * ipa.c (walk_polymorphic_call_targets): Likewise.
9863 (symbol_table::remove_unreachable_nodes): Likewise.
9864 (process_references): Likewise.
9865 (cgraph_build_static_cdtor_1): Likewise.
9866 * lto-cgraph.c (lto_output_node): Likewise.
9867 (output_refs): Likewise.
9868 (compute_ltrans_boundary): Likewise.
9869 (input_overwrite_node): Likewise.
9870 (input_node): Likewise.
9871 (input_cgraph_1): Likewise.
9872 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9873 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9874 (class pass_chkp_instrumentation_passes): Likewise.
9875 (make_pass_chkp_instrumentation_passes): Likewise.
9876 * passes.def: Likewise.
9877 * rtl.h (struct GTY): Likewise.
9878 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9879 * stor-layout.c (layout_type): Likewise.
9880 * symtab.c: Likewise.
9881 * target.def: Likewise.
9882 * targhooks.c (default_chkp_bound_type): Likewise.
9883 (default_chkp_bound_mode): Likewise.
9884 (default_builtin_chkp_function): Likewise.
9885 (default_chkp_function_value_bounds): Likewise.
9886 (default_chkp_make_bounds_constant): Likewise.
9887 (default_chkp_initialize_bounds): Likewise.
9888 * targhooks.h (default_chkp_bound_type): Likewise.
9889 (default_chkp_bound_mode): Likewise.
9890 (default_builtin_chkp_function): Likewise.
9891 (default_chkp_function_value_bounds): Likewise.
9892 (default_chkp_make_bounds_constant): Likewise.
9893 (default_chkp_initialize_bounds): Likewise.
9894 * toplev.c (compile_file): Likewise.
9895 (process_options): Likewise.
9896 * tree-core.h (DEF_BUILTIN): Likewise.
9897 (DEF_BUILTIN_CHKP): Likewise.
9898 * tree-inline.c (declare_return_variable): Likewise.
9899 (remap_gimple_stmt): Likewise.
9900 (copy_bb): Likewise.
9901 (initialize_inlined_parameters): Likewise.
9902 (expand_call_inline): Likewise.
9903 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9904 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9905 (make_pass_ipa_chkp_produce_thunks): Likewise.
9906 (make_pass_chkp): Likewise.
9907 (make_pass_chkp_opt): Likewise.
9908 (make_pass_chkp_instrumentation_passes): Likewise.
9909 * tree-pretty-print.c (dump_generic_node): Likewise.
9910 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9911 * tree-ssa-dce.c (propagate_necessity): Likewise.
9912 (eliminate_unnecessary_stmts): Likewise.
9913 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9914 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9915 * tree-ssa-sccvn.h: Likewise.
9916 * tree-ssa-strlen.c (get_string_length): Likewise.
9917 (valid_builtin_call): Likewise.
9918 (adjust_last_stmt): Likewise.
9919 (handle_builtin_strchr): Likewise.
9920 (handle_builtin_strcpy): Likewise.
9921 (handle_builtin_stxncpy): Likewise.
9922 (handle_builtin_memcpy): Likewise.
9923 (handle_builtin_strcat): Likewise.
9924 (strlen_check_and_optimize_stmt): Likewise.
9925 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9926 * tree-streamer-in.c: Likewise.
9927 * tree-streamer.c (record_common_node): Likewise.
9928 * tree.c (tree_code_size): Likewise.
9929 (wide_int_to_tree_1): Likewise.
9930 (type_contains_placeholder_1): Likewise.
9931 (build_common_tree_nodes): Likewise.
9932 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9933 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9934 (POINTER_BOUNDS_P): Likewise.
9935 (BOUNDED_TYPE_P): Likewise.
9936 (BOUNDED_P): Likewise.
9937 (CALL_WITH_BOUNDS_P): Likewise.
9938 (pointer_bounds_type_node): Likewise.
9939 * value-prof.c (gimple_ic): Likewise.
9940 * var-tracking.c (vt_add_function_parameters): Likewise.
9941 * varasm.c (make_decl_rtl): Likewise.
9942 (assemble_start_function): Likewise.
9943 (output_constant): Likewise.
9944 (maybe_assemble_visibility): Likewise.
9945 * varpool.c (ctor_for_folding): Likewise.
9946 * chkp-builtins.def: Remove.
9947 * ipa-chkp.c: Remove.
9948 * ipa-chkp.h: Remove.
9949 * rtl-chkp.c: Remove.
9950 * rtl-chkp.h: Remove.
9951 * tree-chkp-opt.c: Remove.
9952 * tree-chkp.c: Remove.
9953 * tree-chkp.h: Remove.
9954
9955 2018-06-07 Carl Love <cel@us.ibm.com>
9956
9957 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9958 vextract_fp_from_shortl): Add BE support.
9959
9960 2018-06-07 Paul Koning <ni1d@arrl.net>
9961
9962 * compare-elim.c (try_merge_compare): Don't merge compare if
9963 address contains a side effect.
9964 (try_eliminate_compare): Likewise.
9965
9966 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9967
9968 * config.gcc: Support "tremont".
9969 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9970 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9971 PROCESSOR_TREMONT.
9972 * config/i386/i386.c (m_TREMONT): Define.
9973 (processor_target_table): Add "tremont".
9974 (PTA_TREMONT): Define.
9975 (ix86_lea_outperforms): Add TARGET_TREMONT.
9976 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9977 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9978 and M_INTEL_GOLDMONT_PLUS.
9979 (fold_builtin_cpu): Add "tremont".
9980 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9981 (ix86_option_override_internal): Add "tremont".
9982 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9983 (processor_type): Add PROCESSOR_TREMONT.
9984 * config/i386/x86-tune.def: Add m_TREMONT.
9985 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9986
9987 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9988
9989 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9990 symbol defined for msp430i* devices to be lower case.
9991
9992 2018-06-07 Richard Biener <rguenther@suse.de>
9993
9994 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9995 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9996 Properly wrap signed arithmetic if overflow wraps.
9997
9998 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9999
10000 PR tree-optimization/69615
10001 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10002 of a cast from a same precision integral SSA_NAME in a bb dominated
10003 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10004 cast to utype if rhs2 has already a compatible type.
10005
10006 2018-06-07 Richard Biener <rguenther@suse.de>
10007
10008 PR tree-optimization/85935
10009 * graphite-scop-detection.c (find_params_in_bb): Analyze
10010 condition operands with respect to the correct loop. Assert
10011 the analysis doesn't fail.
10012
10013 2018-06-04 Carl Love <cel@us.ibm.com>
10014
10015 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10016 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10017 as it is slightly cheaper.
10018 (first_match_or_eos_index_<mode>):
10019 Calculate index using natural element order.
10020 (first_match_index_<mode>):
10021 Calculate index using natural element order.
10022 (first_match_or_eos_index_<mode>):
10023 Calculate index using natural order.
10024 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10025 for BE and LE modes.
10026 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10027 P9V_BUILTIN_VCLZLSBB_V16QI.
10028 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10029 specific.
10030
10031 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10032
10033 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10034 indentation and line wrap for many prototypes. Add missing
10035 @smallexample directives around block of prototypes for vec_xl and
10036 vec_xst.
10037
10038 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10039
10040 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10041 track if we pass or return IEEE 128-bit floating point.
10042 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10043 C++ mangling that is compatible with GCC 8.1.
10044 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10045 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10046 floating point types.
10047 (rs6000_function_arg_advance_1): Likewise.
10048 (rs6000_mangle_type): Optionally generate mangled names that match
10049 what GCC 8.1 generated for IEEE 128-bit floating point types.
10050 (rs6000_globalize_decl_name): If we have an external function that
10051 passes or returns IEEE 128-bit types, generate a weak reference
10052 from the mangled name used in GCC 8.1 to the current mangled
10053 name.
10054 (rs6000_init_builtins): Make __ibm128 use the long double type if
10055 long double is IBM extended double. Make __float128 use the long
10056 double type if long double is IEEE 128-bit.
10057
10058 PR target/85657
10059 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10060 macro for __ibm128 built-in functions.
10061 (PACK_IF): Add __ibm128 pack/unpack functions.
10062 (UNPACK_IF): Likewise.
10063 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10064 enable long double built-in functions if long double is IEEE
10065 128-bit floating point.
10066 (rs6000_invalid_builtin): Update long double built-in function
10067 error message.
10068 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10069 functions, adjust the built-in function to use the long double
10070 built-in function if __ibm128 and long double are the same type.
10071 * doc/extend.texi (PowerPC builtins): Update documention for
10072 __builtin_{,un}pack_longdouble. Add documentation for
10073 __builtin_{,un}pack_ibm128.
10074
10075 2018-06-06 Jim Wilson <jimw@sifive.com>
10076
10077 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10078 (struct machine_function): New field interrupt_mode.
10079 (riscv_handle_type_attribute): New function. Add forward declaration.
10080 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10081 (riscv_expand_epilogue): Check interrupt_mode field.
10082 (riscv_set_current_function): Check interrupt attribute args and
10083 set interrupt_mode field.
10084 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10085 (riscv_sret, riscv_uret): New.
10086 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10087 new arguments to interrupt attribute.
10088
10089 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10090
10091 PR target/63177
10092 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10093 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10094
10095 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10096
10097 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10098 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10099 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10100 several redundant entries.
10101
10102 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10103
10104 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10105 type from "rtx" to "rtx_insn *".
10106 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10107 for local "call_insn", removing cast.
10108 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10109
10110 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10111
10112 PR tree-optimization/86066
10113 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10114 for BIT_INSERT_EXPR stores.
10115
10116 2018-06-06 Richard Biener <rguenther@suse.de>
10117
10118 PR tree-optimization/86062
10119 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10120 component refs ontop
10121 of to be offsetted base.
10122
10123 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10124
10125 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10126 to be static and remove check on interrupt attribute name.
10127
10128 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10129
10130 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10131 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10132
10133 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10134
10135 PR target/79924
10136 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10137 second argument.
10138 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10139 Remove second argument, change how error is called.
10140 (aarch64_layout_arg): Remove second argument from
10141 aarch64_err_no_fpadvsimd call.
10142 (aarch64_init_cumulative_args): Ditto.
10143 (aarch64_gimplify_va_arg_expr): Ditto.
10144 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10145
10146 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10147
10148 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10149 (*simple_return_indirect_internal<mode>): Rename from
10150 simple_return_indirect_internal. Use W mode iterator.
10151 (rstorssp): New expander.
10152 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10153 (clrssbsy): New expander.
10154 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10155
10156 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10157
10158 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10159 __typeof__.
10160 (cmse_check_pointed_object): Likewise.
10161
10162 2018-06-05 Martin Liska <mliska@suse.cz>
10163
10164 PR gcov-profile/47618
10165 * doc/invoke.texi: Document how -fprofile-dir format
10166 is extended.
10167
10168 2018-06-05 Richard Biener <rguenther@suse.de>
10169
10170 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10171 removal pretend DOM info isn't available so we do not update
10172 it and only remove edges, not dominated blocks. Actually free
10173 DOM info in case we removed something. Remove unreachable blocks.
10174 (mfb_keep_latches): Work with either DOM info or marked backedges.
10175 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10176 first. Mark backedges if DOM info isn't available.
10177 (Re-)compute DOM info after cleanup_control_flow_pre.
10178
10179 2018-06-05 Richard Biener <rguenther@suse.de>
10180
10181 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10182 (locus_discrim_hasher::hash): Adjust.
10183 (locus_discrim_hasher::equal): Likewise.
10184 (next_discriminator_for_locus): Work on line directly.
10185 (same_line_p): Pass in expanded locus1 as well.
10186 (assign_discriminators): Avoid redundant location expansions.
10187
10188 2018-06-05 Richard Biener <rguenther@suse.de>
10189
10190 PR tree-optimization/86046
10191 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10192 if required after clearing TREE_ADDRESSABLE.
10193
10194 2018-06-05 Richard Biener <rguenther@suse.de>
10195
10196 PR tree-optimization/86047
10197 * tree-ssa-loop.c (for_each_index): Glob handling of all
10198 decls and constants and really handle all of them.
10199
10200 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10201
10202 PR target/81497
10203 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10204 qualifier_void_pointer and qualifier_const_void_pointer.
10205 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10206 (arm_init_builtins): Handle the above.
10207 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10208 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10209 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10210 void intrinsics.
10211
10212 2018-06-05 Martin Liska <mliska@suse.cz>
10213
10214 * auto-profile.c (read_autofdo_file): Do not use
10215 gcov_ctr_summary struct.
10216 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10217 * coverage.c (struct counts_entry): Likewise.
10218 (read_counts_file): Read just single summary entry.
10219 (get_coverage_counts): Use gcov_summary struct.
10220 * coverage.h (get_coverage_counts): Likewise.
10221 * gcov-dump.c (dump_working_sets): Likewise.
10222 (tag_summary): Dump just single summary.
10223 * gcov-io.c (gcov_write_summary): Write just histogram
10224 summary.
10225 (gcov_read_summary): Read just single summary.
10226 (compute_working_sets): Use gcov_summary struct.
10227 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10228 of GCOV_COUNTERS_SUMMABLE.
10229 (GCOV_COUNTERS_SUMMABLE): Remove.
10230 (GCOV_FIRST_VALUE_COUNTER): Replace with
10231 GCOV_COUNTER_V_INTERVAL.
10232 (struct gcov_ctr_summary): Remove.
10233 (struct gcov_summary): Directly use fields of former
10234 gcov_ctr_summary.
10235 (compute_working_sets): Use gcov_summary struct.
10236 * gcov.c (read_count_file): Do not use ctrs fields.
10237 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10238 struct.
10239 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10240 struct.
10241 * profile.c: Likewise.
10242 * profile.h: Likewise.
10243
10244 2018-06-05 Martin Liska <mliska@suse.cz>
10245
10246 PR gcov-profile/84846
10247 * gcov.c (output_lines): Print working directory only
10248 in intermediate format.
10249
10250 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10251
10252 * config/s390/s390-builtin-types.def: Add void function type.
10253 * config/s390/s390-builtins.def: Use the function type for the
10254 tbeginc builtin.
10255
10256 2018-06-04 Jim Wilson <jimw@sifive.com>
10257
10258 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10259 to int.
10260 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10261 and maybe_eh_return. Change regno to unsigned int. Use new args to
10262 handle EH_RETURN_DATA_REGNO registers properly.
10263 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10264 (riscv_expand_epilogue): Update comment. Change argument name and
10265 type. Update code to use new name and type. Pass new args to
10266 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10267 EXCEPTION_RETURN.
10268 * config/riscv/riscv.md (NORMAL_RETURN): New.
10269 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10270 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10271 (eh_return): Call gen_eh_return_internal and emit barrier.
10272 (eh_return_internal): Call riscv_expand_epilogue.
10273
10274 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10275
10276 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10277 bit_insertion field and declare can_be_merged_into method.
10278 (merged_store_group::can_be_merged_into): New method.
10279 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10280 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10281 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10282
10283 2018-06-04 Richard Biener <rguenther@suse.de>
10284
10285 PR tree-optimization/85955
10286 * builtins.c (fold_builtin_sincos): Convert pointers to
10287 destination to appropriate type before dereferencing.
10288
10289 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10290
10291 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10292
10293 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10294
10295 * expr.c (expand_expr_real_1): Force the operand into memory if
10296 its TYPE_MODE is BLKmode and if there is no integer mode for
10297 the number of bits being extracted.
10298
10299 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10300
10301 PR target/85832
10302 PR target/86036
10303 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10304 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10305
10306 2018-06-04 Richard Biener <rguenther@suse.de>
10307
10308 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10309 (cleanup_tree_cfg_noloop): ... single caller. Do
10310 start_recording_case_labels later.
10311
10312 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10313
10314 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10315 to _IMMINTRIN_H_INCLUDED.
10316 * config/i386/pconfigintrin.h: Ditto.
10317 * config/i386/waitpkgintrin.h: Ditto.
10318 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10319 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10320 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10321 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10322 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10323 waitpkgintrin.h and cldemoteintrin.h.
10324
10325 2018-06-04 Richard Biener <rguenther@suse.de>
10326
10327 PR tree-optimization/86038
10328 * tracer.c (find_best_successor): Check probability for
10329 being initialized, bail out if not.
10330
10331 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10332
10333 PR target/86003
10334 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10335 of bits to ignore when comparing architectures.
10336
10337 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10338
10339 PR tree-optimization/69615
10340 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10341 maximum or minimum of the type, try to merge it also as if
10342 range1 is + [-, x - 1] or + [x + 1, -].
10343
10344 PR c++/86025
10345 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10346
10347 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10348
10349 PR tree-optimization/86034
10350 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10351 the unsigned bitfield type in a bit insertion sequence if it does not
10352 have a larger precision than the bitfield size.
10353 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10354
10355 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10356
10357 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10358
10359 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10360
10361 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10362 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10363 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10364 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10365
10366 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10367
10368 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10369 Disable -fdelete-null-pointer-checks for ELF toolchain.
10370
10371 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10372 Kito Cheng <kito.cheng@gmail.com>
10373
10374 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10375 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10376 (nds32*-*-*): Add glibc and uclibc conditions.
10377 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10378 (TARGET_EXCEPT_UNWIND_INFO): Define.
10379 * config/nds32/elf.h: New file.
10380 * config/nds32/linux.h: New file.
10381 * config/nds32/nds32-elf.opt: New file.
10382 * config/nds32/nds32-linux.opt: New file.
10383 * config/nds32/nds32-fp-as-gp.c
10384 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10385 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10386 TARGET_LINUX_ABI.
10387 (nds32_asm_file_end): Ditto.
10388 (nds32_print_operand): Ditto.
10389 (nds32_insert_attributes): Ditto.
10390 (nds32_init_libfuncs): New function.
10391 (TARGET_HAVE_TLS): Define.
10392 (TARGET_INIT_LIBFUNCS): Define.
10393 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10394 spec content.
10395 (TARGET_ELF): Apply different mcmodel setting.
10396 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10397 been migrated into elf.h and linux.h files.
10398 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10399 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10400 (mcmodel): The content has been migrated into nds32-elf.opt and
10401 nds32-linux.opt files.
10402 * config/nds32/t-elf: New file.
10403 * config/nds32/t-linux: New file.
10404
10405 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10406 Shiva Chen <shiva0217@gmail.com>
10407
10408 * config/nds32/constants.md (unspec_volatile_element): Add
10409 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10410 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10411 optimization.
10412 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10413 (make_pass_nds32_fp_as_gp): Declare.
10414 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10415 optmization pass.
10416 (nds32_asm_function_end_prologue): Remove unused asm output.
10417 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10418 (nds32_asm_file_start): Output necessary fp_as_gp information.
10419 (nds32_option_override): Adjust register usage.
10420 (nds32_expand_prologue): Consider fp_as_gp situation.
10421 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10422 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10423 (epilogue): Ditto.
10424 (return): Ditto.
10425 (simple_return): Ditto.
10426 (omit_fp_begin): Output special directive for fp_as_gp.
10427 (omit_fp_end): Output special directive for fp_as_gp.
10428 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10429 mforbid-fp-as-gp): New options.
10430
10431 2018-06-01 Mark Wielaard <mark@klomp.org>
10432
10433 * dwarf2out.c (dwarf2out_finish): Remove generation of
10434 DW_AT_loclists_base.
10435
10436 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10437
10438 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10439 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10440 (struct merged_store_group): Add bit_insertion field.
10441 (dump_char_array): Use standard hexadecimal format.
10442 (merged_store_group::merged_store_group): Set bit_insertion to false.
10443 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10444 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10445 also print the mask in the dump file.
10446 (pass_store_merging::gate): Minor tweak.
10447 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10448 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10449 stores with INTEGER_CST stores.
10450 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10451 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10452 and use it throughout. Generate bit insertion sequences if need be.
10453 (pass_store_merging::process_store): Remove redundant condition.
10454 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10455
10456 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10457
10458 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10459 the 128-bit floating point types. Fix function comment.
10460
10461 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10462
10463 * config/aarch64/aarch64-simd.md
10464 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10465 mnemonics.
10466 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10467 mnemonics.
10468
10469 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10470
10471 PR tree-optimization/85989
10472 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10473 variable.
10474 (backprop::intersect_uses): Check it when deciding whether this
10475 is a backedge reference.
10476 (backprop::process_block): Add each phi to m_visited_phis
10477 after visiting it, then clear it at the end.
10478
10479 2018-06-01 Richard Biener <rguenther@suse.de>
10480
10481 * tree-vectorizer.h (vect_dr_stmt): New function.
10482 (vect_get_load_cost): Adjust.
10483 (vect_get_store_cost): Likewise.
10484 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10485 Use vect_dr_stmt instead of DR_SMTT.
10486 (vect_record_base_alignments): Likewise.
10487 (vect_calculate_target_alignment): Likewise.
10488 (vect_compute_data_ref_alignment): Likewise and make static.
10489 (vect_update_misalignment_for_peel): Likewise.
10490 (vect_verify_datarefs_alignment): Likewise.
10491 (vector_alignment_reachable_p): Likewise.
10492 (vect_get_data_access_cost): Likewise. Pass down
10493 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10494 (vect_get_peeling_costs_all_drs): Likewise.
10495 (vect_peeling_hash_get_lowest_cost): Likewise.
10496 (vect_enhance_data_refs_alignment): Likewise.
10497 (vect_find_same_alignment_drs): Likewise.
10498 (vect_analyze_data_refs_alignment): Likewise.
10499 (vect_analyze_group_access_1): Likewise.
10500 (vect_analyze_group_access): Likewise.
10501 (vect_analyze_data_ref_access): Likewise.
10502 (vect_analyze_data_ref_accesses): Likewise.
10503 (vect_vfa_segment_size): Likewise.
10504 (vect_small_gap_p): Likewise.
10505 (vectorizable_with_step_bound_p): Likewise.
10506 (vect_prune_runtime_alias_test_list): Likewise.
10507 (vect_analyze_data_refs): Likewise.
10508 (vect_supportable_dr_alignment): Likewise.
10509 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10510 (vect_gen_prolog_loop_niters): Likewise.
10511 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10512 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10513 modify DR_STMT.
10514 (vect_recog_mask_conversion_pattern): Likewise.
10515 (vect_try_gather_scatter_pattern): Likewise.
10516 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10517 to vect_get_store_cost.
10518 (vect_get_store_cost): Get stmt_info instead of DR.
10519 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10520 (vect_get_load_cost): Get stmt_info instead of DR.
10521
10522 2018-06-01 Richard Biener <rguenther@suse.de>
10523
10524 PR middle-end/86017
10525 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10526 vars wrapped in MEM_REFs.
10527
10528 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10529
10530 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10531 Fix subreg tests so that we only return a choice between
10532 GENERAL_REGS and FP_REGS if the original classes included both.
10533
10534 2018-06-01 Richard Biener <rguenther@suse.de>
10535
10536 PR ipa/85960
10537 * tree-ssa-structalias.c (get_function_part_constraint):
10538 Handle NULL fi->decl.
10539 (find_func_aliases_for_call): Properly handle indirect
10540 fi from direct call.
10541 (find_func_clobbers): Likewise.
10542 (ipa_pta_execute): Likewise.
10543 (create_variable_info_for): For functions that are ifunc_resolver
10544 resolve to a varinfo that contains the result of the resolver call.
10545 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10546 aliases.
10547
10548 2018-05-31 Michael Collison <michael.collison@arm.com>
10549
10550 * config/aarch64/aarch64.md:
10551 (*fix_to_zero_extenddfdi2): New pattern.
10552 * gcc.target/aarch64/fix_extend1.c: New testcase.
10553
10554 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10555
10556 PR middle-end/78809
10557 PR middle-end/83026
10558 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10559 and BUILT_IN_STRNCMP_EQ.
10560 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10561 BUILT_IN_STRNCMP_EQ.
10562 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10563 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10564 (gimple_fold_builtin): Likewise.
10565 * tree-ssa-strlen.c (compute_string_length): New function.
10566 (determine_min_obsize): New function.
10567 (handle_builtin_string_cmp): New function to handle calls to
10568 string compare functions.
10569 (strlen_optimize_stmt): Add handling to builtin string compare
10570 calls.
10571 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10572 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10573 * tree.c (build_common_builtin_nodes): Add new defines of
10574 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10575
10576 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10577
10578 PR target/85984
10579 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10580 functions with naked attribute.
10581
10582 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10583
10584 * config/i386/sse.md (avx_vec_concat<mode>):
10585 Substitute concat_tg_mode mode attribute with xtg_mode.
10586 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10587 (concat_tg_mode): Remove mode attribute.
10588
10589 2018-05-31 Martin Sebor <msebor@redhat.com>
10590
10591 PR c/82063
10592 * calls.c (alloc_max_size): Correct a logic error/typo.
10593 Treat excessive arguments as infinite. Warn for invalid arguments.
10594 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10595
10596 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10597
10598 PR target/85829
10599 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10600 and movx for Haswell.
10601
10602 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10603 Cesar Philippidis <cesar@codesourcery.com>
10604
10605 PR middle-end/85879
10606 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10607 when emitting error on private/firstprivate reductions.
10608 * omp-low.c (lower_omp_target): Avoid reference-type processing
10609 on pointers for firstprivate clause.
10610
10611 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10612
10613 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10614 (st1x2): Likewise.
10615 (st1x3): Likewise.
10616 * config/aarch64/aarch64-simd.md
10617 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10618 (aarch64_ld1_x3_<mode>): Likewise
10619 (aarch64_st1x2<VALLDIF:mode>): Likewise
10620 (aarch64_st1_x2_<mode>): Likewise
10621 (aarch64_st1x3<VALLDIF:mode>): Likewise
10622 (aarch64_st1_x3_<mode>): Likewise
10623 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10624 (vld1_s8_x3): Likewise.
10625 (vld1_u16_x3): Likewise.
10626 (vld1_s16_x3): Likewise.
10627 (vld1_u32_x3): Likewise.
10628 (vld1_s32_x3): Likewise.
10629 (vld1_u64_x3): Likewise.
10630 (vld1_s64_x3): Likewise.
10631 (vld1_f16_x3): Likewise.
10632 (vld1_f32_x3): Likewise.
10633 (vld1_f64_x3): Likewise.
10634 (vld1_p8_x3): Likewise.
10635 (vld1_p16_x3): Likewise.
10636 (vld1_p64_x3): Likewise.
10637 (vld1q_u8_x3): Likewise.
10638 (vld1q_s8_x3): Likewise.
10639 (vld1q_u16_x3): Likewise.
10640 (vld1q_s16_x3): Likewise.
10641 (vld1q_u32_x3): Likewise.
10642 (vld1q_s32_x3): Likewise.
10643 (vld1q_u64_x3): Likewise.
10644 (vld1q_s64_x3): Likewise.
10645 (vld1q_f16_x3): Likewise.
10646 (vld1q_f32_x3): Likewise.
10647 (vld1q_f64_x3): Likewise.
10648 (vld1q_p8_x3): Likewise.
10649 (vld1q_p16_x3): Likewise.
10650 (vld1q_p64_x3): Likewise.
10651 (vst1_s64_x2): Likewise.
10652 (vst1_u64_x2): Likewise.
10653 (vst1_f64_x2): Likewise.
10654 (vst1_s8_x2): Likewise.
10655 (vst1_p8_x2): Likewise.
10656 (vst1_s16_x2): Likewise.
10657 (vst1_p16_x2): Likewise.
10658 (vst1_s32_x2): Likewise.
10659 (vst1_u8_x2): Likewise.
10660 (vst1_u16_x2): Likewise.
10661 (vst1_u32_x2): Likewise.
10662 (vst1_f16_x2): Likewise.
10663 (vst1_f32_x2): Likewise.
10664 (vst1_p64_x2): Likewise.
10665 (vst1q_s8_x2): Likewise.
10666 (vst1q_p8_x2): Likewise.
10667 (vst1q_s16_x2): Likewise.
10668 (vst1q_p16_x2): Likewise.
10669 (vst1q_s32_x2): Likewise.
10670 (vst1q_s64_x2): Likewise.
10671 (vst1q_u8_x2): Likewise.
10672 (vst1q_u16_x2): Likewise.
10673 (vst1q_u32_x2): Likewise.
10674 (vst1q_u64_x2): Likewise.
10675 (vst1q_f16_x2): Likewise.
10676 (vst1q_f32_x2): Likewise.
10677 (vst1q_f64_x2): Likewise.
10678 (vst1q_p64_x2): Likewise.
10679 (vst1_s64_x3): Likewise.
10680 (vst1_u64_x3): Likewise.
10681 (vst1_f64_x3): Likewise.
10682 (vst1_s8_x3): Likewise.
10683 (vst1_p8_x3): Likewise.
10684 (vst1_s16_x3): Likewise.
10685 (vst1_p16_x3): Likewise.
10686 (vst1_s32_x3): Likewise.
10687 (vst1_u8_x3): Likewise.
10688 (vst1_u16_x3): Likewise.
10689 (vst1_u32_x3): Likewise.
10690 (vst1_f16_x3): Likewise.
10691 (vst1_f32_x3): Likewise.
10692 (vst1_p64_x3): Likewise.
10693 (vst1q_s8_x3): Likewise.
10694 (vst1q_p8_x3): Likewise.
10695 (vst1q_s16_x3): Likewise.
10696 (vst1q_p16_x3): Likewise.
10697 (vst1q_s32_x3): Likewise.
10698 (vst1q_s64_x3): Likewise.
10699 (vst1q_u8_x3): Likewise.
10700 (vst1q_u16_x3): Likewise.
10701 (vst1q_u32_x3): Likewise.
10702 (vst1q_u64_x3): Likewise.
10703 (vst1q_f16_x3): Likewise.
10704 (vst1q_f32_x3): Likewise.
10705 (vst1q_f64_x3): Likewise.
10706 (vst1q_p64_x3): Likewise.
10707
10708 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10709
10710 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10711 user_label_prefix to name.
10712
10713 * tree-core.h: Update comment about the format of NAME string
10714 passed to handler in attribute_spec.
10715
10716 * config/msp430/msp430.md: Remove erroneous subreg expression from
10717 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10718 zero_extend{q,h}isi2.
10719
10720 2018-05-30 Borislav Petkov <bp@suse.de>
10721
10722 * doc/extend.texi: Document some architecture specific
10723 constraints and sort entries.
10724
10725 2018-05-30 Martin Sebor <msebor@redhat.com>
10726
10727 PR middle-end/85369
10728 * builtins.c (expand_builtin_stpcpy_1): New function.
10729 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10730 only if the former succeeds.
10731
10732 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10733
10734 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10735 in saphira.
10736
10737 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10738
10739 * doc/invoke.texi (-flinker-output): Document
10740
10741 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10742
10743 * passes.c (ipa_write_summaries): Only modify statements if body
10744 is in memory.
10745 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10746 incrementally linking.
10747 (ipa_passes): Likewise.
10748 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10749 pass down resolution info.
10750 * common.opt (flag_incremental_link): Update info.
10751 * gcc.c (plugin specs): Turn flinker-output=* to
10752 -plugin-opt=-linker-output-known
10753 * toplev.c (compile_file): Also cut compilation when doing incremental
10754 link.
10755 * flag-types. (enum lto_partition_model): Add
10756 LTO_LINKER_OUTPUT_NOLTOREL.
10757 (invoke.texi): Add -flinker-output docs.
10758 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10759 link same way as WPA; do not stream in dead initializers.
10760
10761 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10762 darf2out_register_external_decl): Support incremental link.
10763
10764 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10765
10766 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10767
10768 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10769
10770 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10771 it down to simple_object_copy_lto_debug_sections.
10772 (run_gcc): Determine incremental LTO link time and configure
10773 lto1 into non-wpa mode, disable renaming of debug sections.
10774
10775 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10776
10777 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10778 descriptions of various incorrectly documented functions.
10779
10780 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10781
10782 Revert:
10783 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10784 address check not strict.
10785
10786 2018-05-30 Richard Biener <rguenther@suse.de>
10787
10788 PR tree-optimization/85964
10789 * tracer.c (better_p): Drop initialized count check, we only
10790 call the function with initialized counts now.
10791 (find_best_successor): Do find a best edge if one
10792 has uninitialized count.
10793 (find_best_predecessor): Likewise. Do BB frequency check only
10794 if count is initialized.
10795
10796 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10797
10798 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10799 (aarch64_ldrstr_offset_compare): New.
10800 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10801 load/store orderings.
10802 (aarch64_gen_adjusted_ldpstp): Likewise.
10803
10804 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10805
10806 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10807 Check for subset of GENERAL_REGS and FP_REGS.
10808 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10809 r=w alternative.
10810
10811 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10812
10813 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10814 and wi::to_poly_offset. Add the current offset and then check
10815 whether the sum fits, rather than using an unchecked addition of
10816 a checked term. Check for a shwi rather than a uhwi.
10817 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10818 (store_constructor): Use poly_int_tree_p.
10819 (expand_expr_real_1): Likewise.
10820 * function.c (assign_temp): Likewise.
10821 * fold-const.c (const_binop): Use poly_int_tree_p and
10822 wi::to_poly_offset.
10823 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10824 division.
10825 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10826 to_poly_offset for MEM offsets.
10827 * ipa-icf.c (sem_variable::equals): Likewise.
10828 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10829 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10830 wi::to_poly_offset for BIT_FIELD_REF offsets.
10831 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10832 wi::to_poly_offset.
10833 * var-tracking.c (emit_note_insn_var_location): Use
10834 tree_to_poly_uint64.
10835
10836 2018-05-29 Jim Wilson <jimw@sifive.com>
10837
10838 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10839
10840 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10841
10842 PR target/85950
10843 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10844 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10845 sequence.
10846 (sse4_1_round<mode>2): Use nonimmediate_operand
10847 for operand 1 predicate.
10848
10849 2018-05-29 Martin Sebor <msebor@redhat.com>
10850 Richard Biener <rguenther@suse.de>
10851
10852 PR testsuite/85888
10853 * calls.c (get_size_range): Call determine_value_range instead
10854 of get_value_range..
10855 * tree-vrp.h (determine_value_range): Declared new function.
10856 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10857
10858 2018-05-29 Richard Biener <rguenther@suse.de>
10859
10860 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10861 sure to use non-pattern stmts for get_earlier_stmt arguments.
10862 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10863 called on pattern stmts.
10864 (get_later_stmt): Likewise.
10865
10866 2018-05-29 Martin Liska <mliska@suse.cz>
10867
10868 PR gcov-profile/85759
10869 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10870 env variables.
10871
10872 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10873
10874 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10875 VEC_UNPACK_*_EXPR.
10876 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10877 VEC_PACK_*_EXPR.
10878
10879 PR target/85918
10880 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10881 VEC_PACK_FLOAT_EXPR): New tree codes.
10882 * tree-pretty-print.c (op_code_prio): Handle
10883 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10884 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10885 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10886 * tree-inline.c (estimate_operator_cost): Likewise.
10887 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10888 * fold-const.c (const_binop): Likewise.
10889 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10890 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10891 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10892 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10893 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10894 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10895 * expr.c (expand_expr_real_2): Likewise.
10896 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10897 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10898 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10899 optabs.
10900 * optabs.c (expand_widen_pattern_expr): For
10901 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10902 sign from result type rather than operand's type.
10903 (expand_binop_directly): For vec_packu_float_optab and
10904 vec_packs_float_optab allow result type to be different from operand's
10905 type.
10906 * optabs-tree.c (optab_for_tree_code): Handle
10907 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10908 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10909 * tree-vect-generic.c (expand_vector_operations_1): Handle
10910 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10911 VEC_PACK_FLOAT_EXPR.
10912 * tree-vect-stmts.c (supportable_widening_operation): Handle
10913 FIX_TRUNC_EXPR.
10914 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10915 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10916 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10917 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10918 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10919 mode attributes.
10920 (vec_pack<floatprefix>_float_<mode>): New expander.
10921 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10922 attributes.
10923 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10924 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10925 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10926 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10927 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10928 Document.
10929 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10930 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10931 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10932 VEC_PACK_FLOAT_EXPR): Document.
10933
10934 2018-05-29 Richard Biener <rguenther@suse.de>
10935
10936 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10937 member.
10938 (stmt_vec_info_vec): Make pointer.
10939 (init_stmt_vec_info_vec): Remove.
10940 (free_stmt_vec_info_vec): Likewise.
10941 (set_stmt_vec_info_vec): New function.
10942 (free_stmt_vec_infos): Likewise.
10943 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10944 (set_vinfo_for_stmt): Likewise.
10945 (get_earlier_stmt): Likewise.
10946 (get_later_stmt): Likewise.
10947 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10948 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10949 (vec_info::~vec_info): Free stmt_vec_infos.
10950 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10951 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10952 (pass_slp_vectorize::execute): Likewise.
10953 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10954 (free_stmt_vec_info_vec): Likewise.
10955 (set_stmt_vec_info_vec): New function.
10956 (free_stmt_vec_infos): Likewise.
10957 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10958 the global stmt_vec_info_vec.
10959 * tree-parloops.c (gather_scalar_reductions): Use
10960 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10961 vector.
10962
10963 2018-05-29 Richard Biener <rguenther@suse.de>
10964
10965 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10966
10967 2018-05-29 Martin Liska <mliska@suse.cz>
10968 David Malcolm <dmalcolm@redhat.com>
10969
10970 * vec.c (test_reverse): New.
10971 (vec_c_tests): Add new test.
10972 * vec.h (vl_ptr>::reverse): New function.
10973
10974 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10975
10976 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10977
10978 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10979 and later.
10980
10981 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10982
10983 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10984
10985 2018-05-28 Richard Biener <rguenther@suse.de>
10986
10987 PR tree-optimization/85933
10988 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10989 look at stmts marked as vectorizable.
10990
10991 2018-05-28 Richard Biener <rguenther@suse.de>
10992
10993 PR tree-optimization/85934
10994 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10995 vector boolean check before scalar optimization.
10996
10997 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10998
10999 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11000 for armv5te.
11001
11002 2018-05-28 Mark Wielaard <mark@klomp.org>
11003
11004 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11005 if it is an expression containing a minus sign.
11006
11007 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11008
11009 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11010
11011 2018-05-27 Paul Koning <ni1d@arrl.net>
11012
11013 * config/pdp11/pdp11.md (truncsihi2): Remove.
11014
11015 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11016 Chung-Ju Wu <jasonwucj@gmail.com>
11017
11018 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11019 implementation.
11020 (unaligned_store_dw): Ditto.
11021 * config/nds32/nds32-memory-manipulation.c
11022 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11023 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11024 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11025 (emit_setmem_word_loop): Rename to ...
11026 (emit_setmem_doubleword_loop): ... this.
11027 (nds32_gen_dup_4_byte_to_word_value): New function.
11028 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11029 (nds32_expand_setmem_loop): Refine implementation.
11030 (nds32_expand_setmem_loop_v3m): Ditto.
11031 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11032 pattern.
11033
11034 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11035
11036 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11037
11038 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11039
11040 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11041 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11042 machine->attr_no_prologue_p.
11043 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11044 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11045 (nds32_expand_epilogue): Consider attr_naked_p.
11046 (nds32_expand_epilogue_v3pop): Likewise.
11047 (nds32_can_use_return_insn): Likewise.
11048 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11049 attr_no_prologue_p fields.
11050 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11051
11052 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11053
11054 PR target/85918
11055 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11056 attributes.
11057 * config/i386/sse.md
11058 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11059 Rename to ...
11060 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11061 ... this.
11062 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11063 Rename to ...
11064 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11065 ... this.
11066 (*<floatsuffix>floatv2div2sf2): Rename to ...
11067 (*float<floatunssuffix>v2div2sf2): ... this.
11068 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11069 (float<floatunssuffix>v2div2sf2_mask): ... this.
11070 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11071 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11072 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11073 to ...
11074 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11075 ... this.
11076 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11077 Rename to ...
11078 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11079 ... this.
11080 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11081 Rename to ...
11082 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11083 ... this.
11084 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11085 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11086 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11087 gen_ufix_truncv8dfv8si2.
11088 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11089 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11090 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11091 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11092 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11093 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11094 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11095 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11096
11097 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11098
11099 PR target/85900
11100 PR target/85345
11101 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11102
11103 2018-05-25 Jim Wilson <jimw@sifive.com>
11104
11105 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11106 * config/riscv/riscv.c (struct machine_function): Add
11107 interrupt_handler_p and attribute_checked_p fields.
11108 (riscv_attribute_table): Add interrupt.
11109 (riscv_interrupt_type_p): New.
11110 (riscv_save_reg_p): Save extra regs for interrupt handler.
11111 (riscv_use_save_libcall): Return false for interrupt handler.
11112 (riscv_first_stack_step): Add forward declaration.
11113 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11114 for interrupt handler with large frame. Use it for saved reg list.
11115 (riscv_expand_prologue): Move flag_stack_usage_info support to
11116 eliminate duplication.
11117 (riscv_expand_epilogue): Generate mret for interrupt handler.
11118 (riscv_epilogue_uses): New.
11119 (riscv_can_use_return_insn): Return false for interrupt handler.
11120 (riscv_function_ok_for_sibcall): Likewise.
11121 (riscv_set_current_function): Add interrupt handler support.
11122 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11123 * config/riscv/riscv.md (UNSPECV_MRET): New.
11124 (GP_REGNUM): New.
11125 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11126 (riscv_mret): New.
11127 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11128
11129 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11130
11131 PR tree-optimization/85712
11132 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11133 this candidate has already been replaced in-situ by a copy.
11134
11135 2018-05-25 Jason Merrill <jason@redhat.com>
11136
11137 PR c++/80485 - inline function non-zero address.
11138 * symtab.c (nonzero_address): Check DECL_COMDAT.
11139
11140 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11141
11142 PR target/83628
11143 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11144 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11145 extension of SImode operation. Use const123_operand predicate.
11146 (*saddsi_1): Remove.
11147 (*saddl_se_1): Ditto.
11148 (*ssubsi_1): Ditto.
11149 (*ssubl_se_1): Ditto.
11150 * config/alpha/predicates.md (const123_operand): New predicate.
11151 * config/alpha/constraints.md (P): Use IN_RANGE.
11152
11153 2018-05-25 Richard Biener <rguenther@suse.de>
11154
11155 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11156 defaulted to true.
11157 (ref_maybe_used_by_stmt_p): Likewise.
11158 (stmt_may_clobber_ref_p): Likewise.
11159 (stmt_may_clobber_ref_p_1): Likewise.
11160 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11161 and pass it along.
11162 (ref_maybe_used_by_stmt_p): Likewise.
11163 (stmt_may_clobber_ref_p): Likewise.
11164 (stmt_may_clobber_ref_p_1): Likewise.
11165 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11166 the alias oracle to disambiguate DRs with stmts DR analysis
11167 couldn't handle.
11168 (vect_analyze_data_refs): Do not give up on not analyzable
11169 DRs for BB vectorization. Remove code truncating the dataref
11170 vector.
11171
11172 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11173
11174 PR target/85832
11175 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11176 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11177 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11178
11179 2018-05-25 Richard Biener <rguenther@suse.de>
11180
11181 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11182 function, combining stmt data ref gathering and fatal analysis
11183 parts.
11184 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11185 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11186 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11187 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11188 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11189
11190 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11191
11192 PR tree-optimization/85720
11193 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11194 SCC if all partitions are builtins.
11195 (version_loop_by_alias_check): New parameter. Generate cancelable
11196 runtime alias check if all partitions are builtins.
11197 (distribute_loop): Update call to above function.
11198
11199 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11200
11201 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11202 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11203 (parm_default_def_partition_arg): Ditto.
11204 (set_parm_default_def_partition): Ditto.
11205 (get_parm_default_def_partitions): Ditto and make it static.
11206 (get_undefined_value_partitions): Ditto and make it static.
11207 (remove_ssa_form): Refactor call to init_var_map here.
11208 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11209 computation for loop region.
11210 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11211 (register_default_def): Delete.
11212 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11213 (parm_default_def_partition_arg): Ditto.
11214 (set_parm_default_def_partition): Ditto.
11215 (get_parm_default_def_partitions): Ditto and make it static.
11216 (get_undefined_value_partitions): Ditto and make it static.
11217 (coalesce_with_default, coalesce_with_default): Update comment.
11218 (create_coalesce_list_for_region): New func factored out from
11219 create_outofssa_var_map.
11220 (populate_coalesce_list_for_outofssa): New func factored out from
11221 create_outofssa_var_map and coalesce_ssa_name.
11222 (create_outofssa_var_map): Delete.
11223 (coalesce_ssa_name): Refactor to support live range computation.
11224 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11225 (get_parm_default_def_partitions): Delete.
11226 (get_undefined_value_partitions): Ditto.
11227 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11228 computation for loop region.
11229 (new_tree_live_info, loe_visit_block): Ditto.
11230 (live_worklist, set_var_live_on_entry): Ditto.
11231 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11232 * tree-ssa-live.h (struct _var_map): New fields.
11233 (init_var_map): Change decl.
11234 (region_contains_p): New.
11235
11236 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11237
11238 * tree-ssa-live.h (live_merge_and_clear): Delete.
11239
11240 2018-05-25 Richard Biener <rguenther@suse.de>
11241
11242 PR c++/85912
11243 * tree-dump.c (dequeue_and_dump): Remove access to removed
11244 operand 2 of a SWITCH_EXPR.
11245
11246 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11247
11248 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11249 multiplication and division.
11250 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11251 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11252 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11253 (cond_udiv_optab, cond_umod_optab): New optabs.
11254 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11255 (IFN_COND_RDIV): New internal functions.
11256 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11257 TRUNC_MOD_EXPR and RDIV_EXPR.
11258 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11259 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11260 New unspecs.
11261 (SVE_INT_BINARY): Include mult.
11262 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11263 (optab, sve_int_op): Handle mult.
11264 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11265 UNSPEC_COND_DIV.
11266 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11267 for SVE_INT_BINARY_SD.
11268
11269 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11270
11271 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11272 (optab, sve_int_op): Handle div and udiv.
11273 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11274 for SVE_INT_BINARY_SD.
11275 (*<optab><mode>3): New insn for the same.
11276
11277 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11278
11279 * tree-vect-patterns.c: Include predict.h.
11280 (vect_recog_divmod_pattern): Restrict check for division support
11281 to when optimizing for size.
11282
11283 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11284
11285 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11286 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11287 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11288 (gimple_match_op::set_op): Likewise.
11289 (gimple_resimplify4): Declare.
11290 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11291 (expr::gen_transform): Likewise.
11292 (decision_tree::gen): Generate a simplification routine for 4 operands.
11293 * gimple-match-head.c (gimple_simplify): Add an overload for
11294 4 operands. In the top-level function, handle up to 4 call
11295 arguments and call gimple_resimplify4.
11296 (gimple_resimplify4): New function.
11297 (build_call_internal): Pass a fourth operand.
11298 (maybe_push_to_seq): Likewise.
11299 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11300 Fold VEC_COND_EXPRs of an operation and a default value into
11301 an IFN_COND_* function if possible.
11302 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11303 New unspecs.
11304 (SVE_COND_FP_BINARY): Include them.
11305 (optab, sve_fp_op): Handle them.
11306 (SVE_INT_BINARY_REV): New code iterator.
11307 (SVE_COND_FP_BINARY_REV): New int iterator.
11308 (commutative): New int attribute.
11309 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11310 Declare.
11311 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11312 function.
11313 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11314 (*cond_<optab><mode>): New patterns for reversed operands.
11315
11316 2018-05-25 Richard Biener <rguenther@suse.de>
11317
11318 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11319 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11320 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11321 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11322 * tree-vect-data-refs.c (everywhere): Adjust users.
11323 * tree-vect-loop.c (everywhere): Likewise.
11324 * tree-vect-slp.c (everywhere): Likewise.
11325 * tree-vect-stmts.c (everywhere): Likewise.
11326 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11327
11328 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11329
11330 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11331 Rename to...
11332 (gcc_cv_as_section_exclude): ... this.
11333 Try Solaris as #exclude syntax.
11334 * configure: Regenerate.
11335 * config.in: Regenerate.
11336 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11337 SECTION_EXCLUDE.
11338 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11339 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11340
11341 * varasm.c (default_elf_asm_named_section): Don't check if
11342 HAVE_GAS_SECTION_EXCLUDE is defined.
11343
11344 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11345
11346 * doc/md.texi: Update the documentation of the cond_* optabs
11347 to mention the new final operand. Fix GET_MODE_NUNITS call.
11348 Describe the scalar case too.
11349 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11350 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11351 instead of 2.
11352 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11353 (get_conditional_internal_fn): Update comment.
11354 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11355 accumulator value as a final argument to conditional functions.
11356 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11357 a define_expand and add an "else" operand. Assert for now that
11358 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11359 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11360 (*cond_<optab><mode>): New patterns.
11361 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11362 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11363 (UNSPEC_COND_EOR): Delete.
11364 (optab): Remove associated mappings.
11365 (SVE_INT_BINARY): New code iterator.
11366 (sve_int_op): Remove int attribute and add "minus" to the code
11367 attribute.
11368 (SVE_COND_INT_OP): Delete.
11369 (SVE_COND_FP_OP): Rename to...
11370 (SVE_COND_FP_BINARY): ...this.
11371
11372 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11373
11374 * optabs.c (can_reuse_operands_p): New function.
11375 (maybe_legitimize_operands): Try to reuse the results for
11376 earlier operands.
11377
11378 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11379
11380 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11381 Add {q} suffix to insn mnemonic.
11382
11383 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11384
11385 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11386 (msp430_warn_func_return): New.
11387
11388 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11389
11390 * fold-const.c (tree_nonzero_bits): New function.
11391 * fold-const.h (tree_nonzero_bits): Likewise.
11392 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11393 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11394
11395 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11396
11397 PR target/85900
11398 PR target/85345
11399 * varasm.c (assemble_alias): Check ifunc_resolver only on
11400 FUNCTION_DECL.
11401
11402 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11403
11404 PR target/85903
11405 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11406 when memory input operand is handled.
11407
11408 2018-05-24 Luis Machado <luis.machado@linaro.org>
11409
11410 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11411 global.
11412 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11413
11414 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11415
11416 * match.pd: Delay FMA folds until after vectorization.
11417
11418 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11419
11420 PR target/83009
11421 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11422 address check not strict.
11423
11424 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11425
11426 * gimple-match.h (gimple_match_op): New class.
11427 (mprts_hook): Replace parameters with a gimple_match_op *.
11428 (maybe_build_generic_op): Likewise.
11429 (gimple_simplified_result_is_gimple_val): Replace parameters with
11430 a const gimple_match_op *.
11431 (gimple_simplify): Replace code_helper * and tree * parameters with
11432 a gimple_match_op * parameter.
11433 (gimple_resimplify1): Replace code_helper *, tree and tree *
11434 parameters with a gimple_match_op * parameter.
11435 (gimple_resimplify2): Likewise.
11436 (gimple_resimplify3): Likewise.
11437 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11438 parameters with a gimple_match_op * parameter.
11439 * gimple-match-head.c (gimple_simplify): Change prototypes of
11440 auto-generated functions to take a gimple_match_op * instead of
11441 separate code_helper * and tree * parameters. Make the same
11442 change in the top-level overload and update calls to the
11443 gimple_resimplify routines. Update calls to the auto-generated
11444 functions and to maybe_push_res_to_seq in the publicly-facing
11445 operation-specific gimple_simplify overloads.
11446 (gimple_match_op::MAX_NUM_OPS): Define.
11447 (gimple_resimplify1): Replace rcode and ops with a single res_op
11448 parameter. Update call to gimple_simplify.
11449 (gimple_resimplify2): Likewise.
11450 (gimple_resimplify3): Likewise.
11451 (mprts_hook): Replace parameters with a gimple_match_op *.
11452 (maybe_build_generic_op): Likewise.
11453 (build_call_internal): Replace type, nargs and ops with
11454 a gimple_match_op *.
11455 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11456 with a single gimple_match_op *. Update calls to mprts_hook,
11457 build_call_internal and gimple_simplified_result_is_gimple_val.
11458 Factor out code that is common to the tree_code and combined_fn cases.
11459 * genmatch.c (expr::gen_transform): Replace tem_code and
11460 tem_ops with a gimple_match_op called tem_op. Update calls
11461 to the gimple_resimplify functions and maybe_push_res_to_seq.
11462 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11463 res_ops. Update call to the gimple_resimplify functions.
11464 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11465 (decision_tree::gen): Make the functions take a gimple_match_op *
11466 called res_op instead of separate res_code and res_ops parameters.
11467 Update call accordingly.
11468 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11469 and ops with a single res_op parameter. Update calls to
11470 maybe_build_generic_op and maybe_push_res_to_seq.
11471 (fold_stmt_1): Update calls to gimple_simplify and
11472 replace_stmt_with_simplification.
11473 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11474 and gimple_simplified_result_is_gimple_val.
11475 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11476 gimple_simplify.
11477 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11478 with a gimple_match_op *.
11479 (vn_nary_build_or_lookup): Likewise. Update call to
11480 vn_nary_build_or_lookup_1.
11481 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11482 gimple_match_op *. Update calls to the gimple_resimplify routines
11483 and to gimple_simplified_result_is_gimple_val.
11484 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11485 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11486 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11487 (visit_nary_op): Likewise.
11488 (visit_reference_op_load): Likewise.
11489
11490 2018-05-23 Luis Machado <luis.machado@linaro.org>
11491
11492 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11493 modifier for printing the step amount.
11494
11495 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11496
11497 PR target/78849
11498 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11499 types.
11500
11501 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11502
11503 * doc/sourcebuild.texi (Endianness): New subsubsection.
11504
11505 2018-05-23 Luis Machado <luis.machado@linaro.org>
11506
11507 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11508 <prefetch_dynamic_strides>: New const bool field.
11509 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11510 prefetch_dynamic_strides.
11511 (exynosm1_prefetch_tune): Likewise.
11512 (thunderxt88_prefetch_tune): Likewise.
11513 (thunderx_prefetch_tune): Likewise.
11514 (thunderx2t99_prefetch_tune): Likewise.
11515 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11516 false.
11517 (aarch64_override_options_internal): Update to set
11518 PARAM_PREFETCH_DYNAMIC_STRIDES.
11519 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11520 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11521 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11522 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11523 prefetch-dynamic-strides setting.
11524
11525 2018-05-23 Luis Machado <luis.machado@linaro.org>
11526
11527 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11528 <minimum_stride>: New const int field.
11529 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11530 minimum_stride field defaulting to -1.
11531 (exynosm1_prefetch_tune): Likewise.
11532 (thunderxt88_prefetch_tune): Likewise.
11533 (thunderx_prefetch_tune): Likewise.
11534 (thunderx2t99_prefetch_tune): Likewise.
11535 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11536 <default_opt_level>: Set to 3.
11537 (aarch64_override_options_internal): Update to set
11538 PARAM_PREFETCH_MINIMUM_STRIDE.
11539 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11540 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11541 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11542 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11543 stride is constant and is below the minimum stride threshold.
11544
11545 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11546
11547 * config/arm/arm-cpus.in (mode26): Delete.
11548 (armv4): Delete mode26 reference.
11549 * config/arm/arm.c (arm_configure_build_target): Delete use of
11550 isa_bit_mode26.
11551
11552 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11553
11554 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11555 New insn pattern.
11556 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11557 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11558 for non-SSE modes.
11559 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11560 (floatunsdidf2): Ditto.
11561
11562 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11563
11564 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11565 (fixuns_trunc<mode>si2_avx512f): Ditto.
11566 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11567 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11568 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11569
11570 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11571
11572 PR rtl-optimization/79985
11573 * df-scan.c (df_insn_refs_collect): Remove special case for
11574 global registers and asm statements.
11575
11576 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11577
11578 * extend.texi (Global Register Variables): Rewrite the bullet list.
11579 Note that the register is available for allocation. Note that access
11580 via inline asm must use constraints. Add note about async-signal
11581 handlers. Remove paragraph about automagic register selection.
11582
11583 2018-05-23 Richard Biener <rguenther@suse.de>
11584
11585 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11586 of fixed offset from memset VN.
11587
11588 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11589
11590 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11591 first_interp field.
11592 (alloc_cand_and_find_basis): Initialize first_interp field.
11593 (slsr_process_mul): Modify first_interp field.
11594 (slsr_process_add): Likewise.
11595 (slsr_process_cast): Modify first_interp field for each new
11596 interpretation.
11597 (slsr_process_copy): Likewise.
11598 (dump_candidate): Dump first_interp field.
11599 (replace_mult_candidate): Process all interpretations, not just
11600 subsequent ones.
11601 (replace_rhs_if_not_dup): Likewise.
11602 (replace_one_candidate): Likewise.
11603
11604 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11605
11606 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11607 Add new boolean.
11608 (aarch64_needs_frame_chain): New function.
11609 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11610
11611 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11612
11613 PR target/84882
11614 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11615 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11616 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11617 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11618 as true for strict-align.
11619 (aarch64_can_inline_p): Perform checks even when callee has no
11620 attributes to check for strict alignment.
11621 * doc/extend.texi (AArch64 Function Attributes): Document
11622 no-strict-align.
11623 * doc/invoke.texi: (AArch64 Options): Likewise.
11624
11625 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11626
11627 PR tree-optimization/85853
11628 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11629 the handling of the root of the node to...
11630 (vect_slp_analyze_node_operations_1): ...this new function,
11631 and run the whole thing with the child nodes' def types
11632 set according to their SLP node's def type.
11633
11634 2018-05-23 Richard Biener <rguenther@suse.de>
11635
11636 PR middle-end/85874
11637 * tree-data-ref.c (create_runtime_alias_checks): Defer
11638 and ignore overflow warnings.
11639
11640 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11641
11642 PR tree-optimization/85822
11643 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11644 constants.
11645
11646 2018-05-23 Richard Biener <rguenther@suse.de>
11647
11648 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11649 memset constants via native_interpret_expr.
11650
11651 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11652
11653 PR target/85345
11654 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11655 attribute.
11656 (cgraph_node::create_alias): Likewise.
11657 (cgraph_node::get_availability): Check ifunc_resolver instead
11658 of looking up ifunc attribute.
11659 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11660 * varasm.c (do_assemble_alias): Likewise.
11661 (assemble_alias): Likewise.
11662 (default_binds_local_p_3): Likewise.
11663 * cgraph.h (cgraph_node): Add ifunc_resolver.
11664 (cgraph_node::only_called_directly_or_aliased_p): Return false
11665 for IFUNC resolver.
11666 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11667 attribute.
11668 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11669 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11670 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11671 instead of looking up ifunc attribute.
11672
11673 2018-05-22 Luis Machado <luis.machado@linaro.org>
11674
11675 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11676
11677 2018-05-22 Martin Sebor <msebor@redhat.com>
11678
11679 PR middle-end/85359
11680 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11681 only when expasion succeeds.
11682 (expand_builtin_strcmp): Same.
11683 (expand_builtin_strncmp): Same.
11684
11685 2018-05-22 Martin Sebor <msebor@redhat.com>
11686
11687 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11688
11689 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11690 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11691
11692 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11693 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11694 code.
11695 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11696 Add check for legitimate_address.
11697 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11698 (aarch64_swap_ldrstr_operands): New.
11699 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11700 Define prototype.
11701
11702 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11703 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11704
11705 * config/aarch64/aarch64.md: New patterns to generate stp
11706 and ldp.
11707 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11708 single words and double words.
11709 (load_pair_sw, load_pair_dw): Likewise.
11710 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11711 Delete.
11712 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11713 Delete.
11714 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11715 for different mode ldpstp and add peephole for merged zero stores.
11716 Likewise for loads.
11717 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11718 Add size check.
11719 (aarch64_gen_store_pair): Rename calls to match new patterns.
11720 (aarch64_gen_load_pair): Rename calls to match new patterns.
11721 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11722 (load_pair<DREG:mode><DREG2:mode>): ... This.
11723 (store_pair<mode>): Rename to...
11724 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11725 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11726 New mode iterators.
11727 (V_INT_EQUIV): Handle SImode.
11728 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11729 New predicate.
11730
11731 2018-05-22 Martin Sebor <msebor@redhat.com>
11732
11733 PR c/85623
11734 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11735 or ajust the presumed bound on an operation to avoid unnecessary
11736 warnings.
11737
11738 2018-05-22 Martin Sebor <msebor@redhat.com>
11739
11740 PR tree-optimization/85826
11741 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11742 assuming that a DECL necesarily has a constant size.
11743
11744 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11745
11746 PR middle-end/85862
11747 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11748
11749 2018-05-22 Richard Biener <rguenther@suse.de>
11750
11751 PR tree-optimization/85834
11752 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11753 non-constant and non-zero memset arguments.
11754
11755 2018-05-22 Martin Liska <mliska@suse.cz>
11756
11757 PR ipa/85607
11758 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11759
11760 2018-05-22 Richard Biener <rguenther@suse.de>
11761
11762 PR tree-optimization/85863
11763 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11764 comparisons when vectype is specified.
11765 (vectorizable_condition): Do not specify vectype for
11766 vect_is_simple_cond when SLP vectorizing.
11767
11768 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11769
11770 PR target/85657
11771 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11772 define __ibm128 as long double.
11773 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11774 as a distinct type when IEEE 128-bit support is enabled.
11775 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11776 128-bit types to use the correct functions.
11777 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11778 convert between 128-bit floating point types that have different
11779 modes but the same representation, instead of using gen_lowpart to
11780 makean alias.
11781 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11782 KFmode.
11783 (IFKF_reg): New attributes to give the register constraints for
11784 IFmode and KFmode.
11785 (extend<mode>tf2_internal): New insns to mark an explicit
11786 conversion between 128-bit floating point types that have a
11787 different mode but share the same representation.
11788
11789 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11790
11791 PR tree-optimization/85814
11792 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11793 a null return from get_strinfo when unsharing the next
11794 strinfo in the chain.
11795
11796 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11797
11798 PR gcc/84923
11799 * varasm.c (weak_finish): Clean up weak_decls.
11800
11801 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11802
11803 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11804 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11805 UNSPEC_UADALP values.
11806 * config/aarch64/iterators.md (ABAL): New int iterator.
11807 (ABDL2): Likewise.
11808 (ADALP): Likewise.
11809 (sur): Add mappings for the above.
11810 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11811 New define_insn.
11812 (aarch64_<sur>abal<mode>_4): Likewise.
11813 (aarch64_<sur>adalp<mode>_3): Likewise.
11814 (<sur>sadv16qi): New define_expand.
11815
11816 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11817
11818 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11819 (*movdf_internal): Ditto.
11820 (*rcpsf2_sse): Ditto.
11821 (*rsqrtsf2_sse): Ditto.
11822 (*sqrt<mode>2_sse): Ditto.
11823
11824 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11825
11826 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11827 eor3q<mode>4.
11828 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11829 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11830 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11831 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11832 vbcaxq_s64): New.
11833 * config/aarch64/arm_neon.h: Likewise.
11834 * config/aarch64/iterators.md (VQ_I): New.
11835
11836 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11837
11838 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11839 arc*-*-linux*.
11840 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11841 MULTILIB_DIRNAMES
11842
11843 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11844
11845 * config/nds32/constraints.md (S): New constraint.
11846 * config/nds32/nds32.md (call_internal): Use constraint S.
11847 (call_value_internal): Likewise.
11848 (sibcall_internal): Likewise.
11849 (sibcall_value_internal): Likewise.
11850
11851 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11852 Chung-Ju Wu <jasonwucj@gmail.com>
11853
11854 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11855 into consideration.
11856
11857 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11858 Chung-Ju Wu <jasonwucj@gmail.com>
11859
11860 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11861 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11862 (nds32_rtx_costs_impl): Simplify.
11863 (nds32_address_cost_impl): Simplify.
11864 (nds32_init_rtx_costs): New function.
11865 (nds32_rtx_costs_speed_prefer): Likewise.
11866 (nds32_rtx_costs_size_prefer): Likewise.
11867 (nds32_address_cost_speed_prefer): Likewise.
11868 (nds32_address_cost_speed_fwprop): Likewise.
11869 (nds32_address_cost_size_prefer): Likewise.
11870 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11871 * config/nds32/nds32.c (nds32_option_override): Use
11872 nds32_init_rtx_costs function.
11873
11874 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11875
11876 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11877 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11878 (TARGET_PIPELINE_N8): Likewise.
11879 (TARGET_PIPELINE_N10): Likewise.
11880 (TARGET_PIPELINE_N13): Likewise.
11881 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11882
11883 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11884
11885 * config/nds32/nds32-fpu.md: Update copyright year.
11886
11887 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11888
11889 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11890
11891 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11892
11893 * config/nds32/nds32.c
11894 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11895 * config/nds32/nds32.opt (minline-asm-r15): New option.
11896
11897 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11898
11899 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11900 MASK_HW_ABS.
11901 * config/nds32/nds32.md (abssi2): New pattern.
11902
11903 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11904
11905 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11906 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11907 Merge insn pattern from sse_cvtsi2ss<round_name> and
11908 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11909 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11910 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11911 using SWI48 mode iterator.
11912 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11913 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11914 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11915 pattern from sse_cvttss2si<round_saeonly_name>
11916 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11917 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11918 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11919 using SWI48 mode iterator.
11920 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11921 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11922 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11923 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11924 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11925 using SWI48 mode iterator.
11926 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11927 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11928 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11929 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11930 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11931 SWI48 mode iterator.
11932 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11933 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11934 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11935 pattern from sse_cvttsd2si<round_saeonly_name>
11936 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11937
11938 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11939
11940 * config/nds32/nds32-md-auxiliary.c
11941 (nds32_valid_smw_lwm_base_p): Refine.
11942 (nds32_output_smw_single_word): Refine.
11943 (nds32_output_smw_double_word): New.
11944 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11945
11946 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11947
11948 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11949 (nds32_output_stack_pop): Refine.
11950 (nds32_expand_unaligned_load): Refine.
11951 (nds32_expand_unaligned_store): Refine.
11952
11953 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11954 Chung-Ju Wu <jasonwucj@gmail.com>
11955
11956 * config/nds32/constants.md: Add TP_REGNUM constant.
11957 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11958 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11959 UNSPEC_ADD32.
11960 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11961 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11962 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11963 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11964 and PIC code generation.
11965 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11966 code generation.
11967 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11968 optimization.
11969 * config/nds32/nds32.md: Support TLS and PIC.
11970 * config/nds32/nds32.c: Support TLS and PIC.
11971 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11972 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11973 predicate.
11974
11975 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11976
11977 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11978 mode with E_ prefix.
11979
11980 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11981 Chung-Ju Wu <jasonwucj@gmail.com>
11982
11983 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11984 * config/nds32/nds32-md-auxiliary.c
11985 (symbolic_reference_mentioned_p): New.
11986 (nds32_legitimize_ict_address): New.
11987 (nds32_expand_ict_move): New.
11988 (nds32_indirect_call_referenced_p): New.
11989 (nds32_symbol_binds_local_p): Delete.
11990 (nds32_long_call_p): Modify.
11991 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11992 * config/nds32/nds32-protos.h
11993 (symbolic_reference_mentioned_p): Declare.
11994 (nds32_legitimize_ict_address): Declare.
11995 (nds32_expand_ict_move): Declare.
11996 (nds32_indirect_call_referenced_p): Declare.
11997 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11998 (nds32_relax_group): Use nds32_ict_const_p as condition.
11999 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12000 (nds32_asm_file_start): Output ict_model directive in asm code.
12001 (nds32_legitimate_address_p): Consider indirect call.
12002 (nds32_print_operand): Consider indirect call.
12003 (nds32_print_operand_address): Consider indirect call.
12004 (nds32_insert_attributes): Handle "indirect_call" attribute.
12005 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12006 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12007 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12008 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12009 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12010 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12011 (TARGET_ICT_MODEL_SMALL): Define.
12012 (TARGET_ICT_MODEL_LARGE): Define.
12013 * config/nds32/nds32.md (movsi): Consider ict model.
12014 (call, call_value): Consider ict model.
12015 (sibcall, sibcall_value): Consider ict model.
12016 * config/nds32/nds32.opt (mict-model): New option.
12017 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12018 model.
12019
12020 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12021 Monk Chiang <sh.chiang04@gmail.com>
12022 Jim Wilson <jimw@sifive.com>
12023
12024 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12025 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12026 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12027 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12028 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12029 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12030 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12031 compute save_libcall_adjustment properly.
12032 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12033 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12034 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12035 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12036 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12037 (ABI_SPEC): Handle mabi=ilp32e.
12038 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12039 (RVE): Add RVE mask.
12040 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12041 <-march>: Add rv32e as an example.
12042
12043 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12044
12045 PR c++/82899
12046 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12047 (intra_create_variable_infos): Handle C++ constructors.
12048
12049 2018-05-18 Martin Liska <mliska@suse.cz>
12050
12051 * passes.def: Remove a redundant pass.
12052
12053 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12054
12055 PR bootstrap/85838
12056 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12057
12058 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12059
12060 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12061 (ARMv4): Update.
12062 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12063 (ARMv6m): Update.
12064 (armv2, armv2a, armv3, armv3m): Delete architectures.
12065 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12066 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12067 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12068 Delete cpus.
12069 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12070 (*mulsidi3adddi): Likewise.
12071 (mulsidi3): Likewise.
12072 (*mulsidi3_nov6): Likewise.
12073 (umulsidi3): Likewise.
12074 (umulsidi3_nov6): Likewise.
12075 (umaddsidi4): Likewise.
12076 (*umulsidi3adddi): Likewise.
12077 (smulsi3_highpart): Likewise.
12078 (*smulsi3_highpart_nov6): Likewise.
12079 (umulsi3_highpart): Likewise.
12080 (*umulsi3_highpart_nov6): Likewise.
12081 * config/arm/arm.h (arm_arch3m): Delete.
12082 * config/arm/arm.c (arm_arch3m): Delete.
12083 (arm_option_override_internal): Update armv3-related comment.
12084 (arm_configure_build_target): Delete use of isa_bit_mode32.
12085 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12086 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12087 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12088 (mulsa3): Likewise.
12089 (mulusa3): Likewise.
12090 * config/arm/arm-protos.h (arm_arch3m): Delete.
12091 * config/arm/arm-tables.opt: Regenerate.
12092 * config/arm/arm-tune.md: Likewise.
12093 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12094 deleted architectures.
12095
12096 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12097
12098 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12099 (armv5t, armv5te): New features.
12100 (ARMv5, ARMv5e): Delete fgroups.
12101 (ARMv5t, ARMv5te): Adjust for above changes.
12102 (ARMv6m): Likewise.
12103 (armv5, armv5e): Delete arches.
12104 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12105 arm_arch5.
12106 (*call_reg_arm): Likewise.
12107 (*call_value_reg_armv5): Likewise.
12108 (*call_value_reg_arm): Likewise.
12109 (*call_symbol): Likewise.
12110 (*call_value_symbol): Likewise.
12111 (*sibcall_insn): Likewise.
12112 (*sibcall_value_insn): Likewise.
12113 (clzsi2): Likewise.
12114 (prefetch): Likewise.
12115 (define_split and define_peephole2 dependent on arm_arch5):
12116 Likewise.
12117 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12118 arm_arch5e.
12119 (TARGET_ARM_QBIT): Likewise.
12120 (TARGET_DSP_MULTIPLY): Likewise.
12121 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12122 (arm_arch5, arm_arch5e): Delete.
12123 (arm_arch5t, arm_arch5te): Declare.
12124 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12125 (arm_arch5t): Declare.
12126 (arm_option_reconfigure_globals): Update for the above.
12127 (arm_options_perform_arch_sanity_checks): Update comment, replace
12128 use of arm_arch5 with arm_arch5t.
12129 (use_return_insn): Likewise.
12130 (arm_emit_call_insn): Likewise.
12131 (output_return_instruction): Likewise.
12132 (arm_final_prescan_insn): Likewise.
12133 (arm_coproc_builtin_available): Likewise.
12134 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12135 arm_arch5e with arm_arch5t and arm_arch5te.
12136 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12137 (arm_arch5t, arm_arch5te): Declare.
12138 * config/arm/arm-tables.opt: Regenerate.
12139 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12140 * config/arm/t-multilib: Likewise.
12141 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12142 instead of arm_arch5.
12143 (*call_reg_thumb1): Likewise.
12144 (*call_value_reg_thumb1_v5): Likewise.
12145 (*call_value_reg_thumb1): Likewise.
12146 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12147 unreachable path.
12148 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12149
12150 2018-05-18 Martin Liska <mliska@suse.cz>
12151
12152 PR gcov-profile/84846
12153 * doc/gcov.texi: Document -t option of gcov tool.
12154
12155 2018-05-18 Martin Liska <mliska@suse.cz>
12156
12157 PR gcov-profile/84846
12158 * gcov.c (print_usage): Add new -t option.
12159 (process_args): Handle the option.
12160 (generate_results): Use stdout as output when requested by
12161 the option.
12162
12163 2018-05-18 Martin Liska <mliska@suse.cz>
12164
12165 PR gcov-profile/84846
12166 * coverage.c (coverage_init): Write PWD to .gcno file.
12167 * doc/gcov.texi: Document how working directory is printed.
12168 * gcov-dump.c (dump_gcov_file): Print PWD.
12169 * gcov.c (output_intermediate_file): Likewise.
12170 (read_graph_file): Read PWD string.
12171 (output_lines): Print PWD.
12172
12173 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12174
12175 PR middle-end/85817
12176 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12177 for retval and return false if all args to phi are zero.
12178
12179 2018-05-18 Richard Biener <rguenther@suse.de>
12180
12181 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12182 method.
12183 (evrp_dom_walker::before_dom_children): Call it.
12184
12185 2018-05-18 Richard Biener <rguenther@suse.de>
12186
12187 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12188 results when processing array refs with variable index.
12189
12190 2018-05-18 Toon Moene <toon@moene.org>
12191
12192 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12193 directly after that of -floop-interchange. Indicate that both
12194 options are enabled by default when specifying -O3.
12195
12196 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12197
12198 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12199 iterator. Delete separate integer-mode vec_set<mode> expander.
12200 (aarch64_simd_vec_setv2di): Delete.
12201 (vec_setv2di): Delete.
12202 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12203 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12204 the "w, r" alternative.
12205
12206 2018-05-18 Martin Liska <mliska@suse.cz>
12207
12208 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12209 * tree-pass.h (make_pass_lower_switch_O0): New function.
12210 * tree-switch-conversion.c (node_has_low_bound): Remove.
12211 (node_has_high_bound): Likewise.
12212 (node_is_bounded): Likewise.
12213 (class pass_lower_switch): Make it a template type and create
12214 two instances.
12215 (pass_lower_switch::execute): Add template argument.
12216 (make_pass_lower_switch): New function.
12217 (make_pass_lower_switch_O0): New function.
12218 (do_jump_if_equal): Remove.
12219 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12220 all the hard work to tree optimization passes.
12221
12222 2018-05-18 Martin Liska <mliska@suse.cz>
12223
12224 * dbgcnt.c (limit_low): Renamed from limit.
12225 (limit_high): New variable.
12226 (dbg_cnt_is_enabled): Check for upper limit.
12227 (dbg_cnt): Adjust dumping.
12228 (dbg_cnt_set_limit_by_index): Add new argument for high
12229 value.
12230 (dbg_cnt_set_limit_by_name): Likewise.
12231 (dbg_cnt_process_single_pair): Parse new format.
12232 (dbg_cnt_process_opt): Use strtok.
12233 (dbg_cnt_list_all_counters): Remove 'value' and add
12234 'limit_high'.
12235 * doc/invoke.texi: Document changes.
12236
12237 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12238
12239 * doc/sourcebuild.texi (scalar_all_fma): Document.
12240 * tree.def (FMA_EXPR): Delete.
12241 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12242 * internal-fn.c (ternary_direct): New macro.
12243 (expand_ternary_optab_fn): Likewise.
12244 (direct_ternary_optab_supported_p): Likewise.
12245 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12246 * builtins.c (fold_builtin_fma): Delete.
12247 (fold_builtin_3): Don't call it.
12248 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12249 * expr.c (expand_expr_real_2): Likewise.
12250 * fold-const.c (operand_equal_p): Likewise.
12251 (fold_ternary_loc): Likewise.
12252 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12253 * gimple.c (DEFTREECODE): Likewise.
12254 * gimplify.c (gimplify_expr): Likewise.
12255 * optabs-tree.c (optab_for_tree_code): Likewise.
12256 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12257 * tree-eh.c (operation_could_trap_p): Likewise.
12258 (stmt_could_throw_1_p): Likewise.
12259 * tree-inline.c (estimate_operator_cost): Likewise.
12260 * tree-pretty-print.c (dump_generic_node): Likewise.
12261 (op_code_prio): Likewise.
12262 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12263 * tree-ssa-operands.c (get_expr_operands): Likewise.
12264 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12265 * fold-const-call.h (fold_fma): Delete.
12266 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12267 CFN_FNMA and CFN_FNMS.
12268 (fold_fma): Delete.
12269 * genmatch.c (combined_fn): New enum.
12270 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12271 (commutative_op): New function.
12272 (commutate): Use it. Handle more than 2 operands.
12273 (dt_operand::gen_gimple_expr): Use commutative_op.
12274 (parser::parse_expr): Allow :c to be used with non-binary
12275 operators if the commutative operand is known.
12276 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12277 CFN_FMS, CFN_FNMA and CFN_FNMS.
12278 (backprop::process_assign_use): Remove FMA_EXPR handling.
12279 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12280 (gen_hsa_fma): New function.
12281 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12282 IFN_FNMA and IFN_FNMS.
12283 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12284 * gimple-fold.h (follow_all_ssa_edges): Declare.
12285 * gimple-fold.c (follow_all_ssa_edges): New function.
12286 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12287 gimple_build interface and use follow_all_ssa_edges to fold the result.
12288 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12289 instead of checking for optabs directly.
12290 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12291 rather than FMA_EXPRs.
12292 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12293 call to IFN_FMA instead of an FMA_EXPR.
12294
12295 2018-05-17 Jim Wilson <jimw@sifive.com>
12296
12297 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12298 sign extended promoted subreg, and the range does not have the sign bit
12299 set, then do a sign extend.
12300
12301 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12302 test, check for sign extended subreg and/or constant operands, and
12303 do a sign extend in that case.
12304
12305 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12306
12307 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12308 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12309 Add untyped.
12310 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12311 Change logics_shift_reg to logics_shift_imm.
12312 (thunderx2t99_fp_loadpair_basic): Delete.
12313 (thunderx2t99_fp_storepair_basic): Delete.
12314 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12315 (thunderx2t99_asimd_polynomial): Delete.
12316 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12317 and neon_fp_mul_d_scalar_q.
12318 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12319 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12320 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12321 (thunderx2t99_asimd_lut): Add missing tbl types.
12322 (thunderx2t99_asimd_ext): Delete.
12323 (thunderx2t99_asimd_load1_1_mult): Delete.
12324 (thunderx2t99_asimd_load1_2_mult): Delete.
12325 (thunderx2t99_asimd_load1_ldp): New.
12326 (thunderx2t99_asimd_load1): New.
12327 (thunderx2t99_asimd_load2): Add missing *load2* types.
12328 (thunderx2t99_asimd_load3): New.
12329 (thunderx2t99_asimd_load4): New.
12330 (thunderx2t99_asimd_store1_1_mult): Delete.
12331 (thunderx2t99_asimd_store1_2_mult): Delete.
12332 (thunderx2t99_asimd_store2_mult): Delete.
12333 (thunderx2t99_asimd_store2_onelane): Delete.
12334 (thunderx2t99_asimd_store_stp): New.
12335 (thunderx2t99_asimd_store1): New.
12336 (thunderx2t99_asimd_store2): New.
12337 (thunderx2t99_asimd_store3): New.
12338 (thunderx2t99_asimd_store4): New.
12339
12340 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12341
12342 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12343 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12344
12345 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12346 Segher Boessenkool <segher@kernel.crashing.org>
12347
12348 PR target/85698
12349 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12350 operand.
12351
12352 2018-05-17 Richard Biener <rguenther@suse.de>
12353
12354 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12355 for pruning loop and prune defs feeding only already visited PHIs.
12356
12357 2018-05-17 Richard Biener <rguenther@suse.de>
12358
12359 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12360
12361 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12362 Richard Biener <rguenther@suse.de>
12363
12364 PR tree-optimization/85793
12365 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12366 for VMAT_ELEMENTWISE.
12367
12368 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12369
12370 * internal-fn.h (lookup_internal_fn): Declare
12371 * internal-fn.c (lookup_internal_fn): New function.
12372 * gimple.c (gimple_build_call_from_tree): Handle calls to
12373 internal functions.
12374 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12375 internal function names.
12376 * tree-pretty-print.c (dump_generic_node): Likewise.
12377 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12378
12379 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12380
12381 * gimple-fold.h (gimple_build): Make the function forms take
12382 combined_fn rather than built_in_function.
12383 (gimple_simplify): Likewise.
12384 * gimple-match-head.c (gimple_simplify): Likewise.
12385 * gimple-fold.c (gimple_build): Likewise.
12386 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12387 rather than gimple_build_call_internal.
12388 (get_initial_defs_for_reduction): Likewise.
12389 (vect_create_epilog_for_reduction): Likewise.
12390 (vectorizable_live_operation): Likewise.
12391
12392 2018-05-17 Martin Liska <mliska@suse.cz>
12393
12394 * gimple-ssa-sprintf.c (format_directive): Do not use
12395 space in between 'G_' and '('.
12396
12397 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12398
12399 PR target/85323
12400 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12401 even if the mask is not all ones.
12402
12403 PR target/85323
12404 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12405 vector.
12406 (ix86_gimple_fold_builtin): Likewise.
12407
12408 PR target/85323
12409 * config/i386/i386.c: Include tree-vector-builder.h.
12410 (ix86_vector_shift_count): New function.
12411 (ix86_fold_builtin): Fold shift builtins by scalar count.
12412 (ix86_gimple_fold_builtin): Likewise.
12413
12414 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12415 _mm512_setzero): New intrinsics.
12416
12417 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12418 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12419
12420 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12421 code generation for cases where splatting a value is not useful.
12422 * simplify-rtx.c (simplify_ternary_operation): Simplify
12423 vec_merge across a vec_duplicate and a paradoxical subreg forming
12424 a vector mode to a vec_concat.
12425
12426 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12427
12428 * config.gcc: Support "goldmont-plus".
12429 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12430 "goldmont-plus".
12431 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12432 PROCESSOR_GOLDMONT_PLUS.
12433 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12434 (processor_target_table): Add "goldmont-plus".
12435 (PTA_GOLDMONT_PLUS): Define.
12436 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12437 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12438 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12439 (fold_builtin_cpu): Add "goldmont-plus".
12440 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12441 (ix86_option_override_internal): Add "goldmont-plus".
12442 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12443 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12444 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12445 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12446
12447 2018-05-17 Richard Biener <rguenther@suse.de>
12448
12449 PR tree-optimization/85757
12450 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12451 remove defs that only feed that PHI from further processing.
12452
12453 2018-05-16 Jim Wilson <jimw@sifive.com>
12454
12455 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12456 asterisk to name.
12457 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12458
12459 2018-05-16 Mark Wielaard <mark@klomp.org>
12460
12461 * dwarf2out.c (count_index_strings): New function.
12462 (output_indirect_strings): Call count_index_strings and generate
12463 header for dwarf_version >= 5.
12464
12465 2018-05-16 Mark Wielaard <mark@klomp.org>
12466
12467 * dwarf2out.c (dwarf_FORM): New function.
12468 (set_indirect_string): Use dwarf_FORM.
12469 (reset_indirect_string): Likewise.
12470 (size_of_die): Likewise.
12471 (value_format): Likewise.
12472 (output_die): Likewise.
12473 (add_skeleton_AT_string): Likewise.
12474 (output_macinfo_op): Likewise.
12475 (index_string): Likewise.
12476 (output_index_string_offset): Likewise.
12477 (output_index_string): Likewise.
12478 (count_index_strings): Likewise.
12479
12480 2018-05-16 Carl Love <cel@us.ibm.com>
12481
12482 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12483 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12484
12485 2018-05-16 Martin Jambor <mjambor@suse.cz>
12486
12487 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12488 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12489
12490 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12491
12492 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12493 (fnma<mode>4): Likewise.
12494 (fms<mode>4): Likewise.
12495 (fnms<mode>4): Likewise.
12496 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12497 (aarch64_fnma<mode>4): Likewise.
12498 (aarch64_fms<mode>4): Likewise.
12499 (aarch64_fnms<mode>4): Likewise.
12500 (aarch64_fnmadd<mode>4): Likewise.
12501
12502 2018-05-16 Jason Merrill <jason@redhat.com>
12503
12504 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12505
12506 2018-05-16 Richard Biener <rguenther@suse.de>
12507
12508 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12509 (dump_stmt_cost): Declare.
12510 (add_stmt_cost): Dump cost we add.
12511 (add_stmt_costs): New function.
12512 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12513 No longer exported.
12514 (vect_analyze_stmt): Adjust prototype.
12515 (vectorizable_condition): Likewise.
12516 (vectorizable_live_operation): Likewise.
12517 (vectorizable_reduction): Likewise.
12518 (vectorizable_induction): Likewise.
12519 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12520 cost vector to pass to vectorizable_ and record afterwards.
12521 (vect_model_reduction_cost): Take cost vector argument and adjust.
12522 (vect_model_induction_cost): Likewise.
12523 (vectorizable_reduction): Likewise.
12524 (vectorizable_induction): Likewise.
12525 (vectorizable_live_operation): Likewise.
12526 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12527 SLP_TREE_NUMBER_OF_VEC_STMTS.
12528 (vect_analyze_slp_cost_1): Remove.
12529 (vect_analyze_slp_cost): Likewise.
12530 (vect_slp_analyze_node_operations): Take visited args and
12531 a target cost vector. Avoid processing already visited stmt sets.
12532 (vect_slp_analyze_operations): Use a local cost vector to gather
12533 costs and register those of non-discarded instances.
12534 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12535 (vect_schedule_slp_instance): Remove copying of
12536 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12537 zero.
12538 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12539 adding cost. Record cost entry location.
12540 (vect_prologue_cost_for_slp_op): Function to compute cost of
12541 a constant or invariant generated for SLP vect in the prologue,
12542 split out from vect_analyze_slp_cost_1.
12543 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12544 (vect_model_promotion_demotion_cost): Likewise.
12545 (vect_model_store_cost): Likewise, make static.
12546 (vect_model_load_cost): Likewise.
12547 (vectorizable_bswap): Add cost vector arg and adjust.
12548 (vectorizable_call): Likewise.
12549 (vectorizable_simd_clone_call): Likewise.
12550 (vectorizable_conversion): Likewise.
12551 (vectorizable_assignment): Likewise.
12552 (vectorizable_shift): Likewise.
12553 (vectorizable_operation): Likewise.
12554 (vectorizable_store): Likewise.
12555 (vectorizable_load): Likewise.
12556 (vectorizable_condition): Likewise.
12557 (vectorizable_comparison): Likewise.
12558 (can_vectorize_live_stmts): Likewise.
12559 (vect_analyze_stmt): Likewise.
12560 (vect_transform_stmt): Adjust calls to vectorizable_*.
12561 * tree-vectorizer.c: Include gimple-pretty-print.h.
12562 (dump_stmt_cost): New function.
12563
12564 2018-05-16 Richard Biener <rguenther@suse.de>
12565
12566 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12567 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12568 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12569 (check_name): New callback.
12570 (dse_classify_store): Track cycles via a visited bitmap of PHI
12571 defs and simplify handling of in-loop and across loop dead stores
12572 and properly fail for loop-variant refs. Handle byte-tracking with
12573 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12574 limiting the walk.
12575
12576 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12577
12578 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12579 (vect_get_mask_type_for_stmt): Likewise.
12580 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12581 split out from...
12582 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12583 to determine the statement's vector type and the vector type that
12584 should be used for calculating nunits. Deal with cases in which
12585 the type has to be deferred.
12586 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12587 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12588 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12589 (vect_determine_vf_for_stmt): New functions, split out from...
12590 (vect_determine_vectorization_factor): ...here.
12591 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12592 (vect_get_mask_type_for_stmt): New functions, split out from
12593 vect_determine_vectorization_factor.
12594
12595 2018-05-16 Richard Biener <rguenther@suse.de>
12596
12597 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12598 verify the [VEC_]COND_EXPR embedded comparison.
12599
12600 2018-05-15 Martin Sebor <msebor@redhat.com>
12601
12602 PR tree-optimization/85753
12603 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12604 RECORD_TYPE in addition to ARRAY_TYPE.
12605
12606 2018-05-15 Martin Sebor <msebor@redhat.com>
12607
12608 PR middle-end/85643
12609 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12610
12611 2018-05-15 Richard Biener <rguenther@suse.de>
12612
12613 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12614 add by_clobber_p one. Change algorithm to collect all defs
12615 representing uses we need to walk and try reducing them to
12616 a single one before failing.
12617 (dse_dom_walker::dse_optimize_stmt): Adjust.
12618
12619 2018-05-13 Mark Wielaard <mark@klomp.org>
12620
12621 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12622 (size_of_loc_descr): Likewise.
12623 (output_loc_operands): Likewise.
12624 (output_loc_operands_raw): Likewise.
12625 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12626 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12627 (hash_loc_operands): Likewise.
12628 (compare_loc_operands): Likewise.
12629
12630 2018-05-14 Mark Wielaard <mark@klomp.org>
12631
12632 * dwarf2out.c (count_index_addrs): New function.
12633 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12634
12635 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12636
12637 PR tree-optimization/83648
12638 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12639 return value as malloc candidate.
12640
12641 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12642
12643 PR ipa/85734
12644 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12645 param as true in call to suggest_attribute.
12646
12647 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12648
12649 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12650 -mreadonly-in-sdata.
12651
12652 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12653
12654 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12655 New pattern.
12656 (aarch64_crypto_aesd_fused): Likewise.
12657
12658 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12659
12660 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12661 (movsi_aarch64): Likewise.
12662 (load_pairsi): Likewise.
12663 (load_pairdi): Likewise.
12664 (store_pairsi): Likewise.
12665 (store_pairdi): Likewise.
12666 (load_pairsf): Likewise.
12667 (load_pairdf): Likewise.
12668 (store_pairsf): Likewise.
12669 (store_pairdf): Likewise.
12670 (zero_extend): Likewise.
12671 (trunc): Swap alternatives.
12672 (fcvt_target): Add '?' to prefer w over r.
12673
12674 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12675
12676 PR target/85756
12677 * config/i386/i386.md: Disallow non-commutative arithmetics in
12678 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12679 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12680 in the peephole2 before it.
12681
12682 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12683
12684 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12685 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12686 (ix86_handle_option): Handle -mcldemote.
12687 * config.gcc: New header.
12688 * config/i386/cldemoteintrin.h: New file.
12689 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12690 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12691 -mcldemote.
12692 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12693 OPTION_MASK_ISA_CLDEMOTE.
12694 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12695 (ix86_valid_target_attribute_inner_p): Ditto.
12696 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12697 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12698 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12699 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12700 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12701 (cldemote): New.
12702 * config/i386/i386.opt: Add -mcldemote.
12703 * config/i386/x86intrin.h: New header.
12704 * doc/invoke.texi: Add -mcldemote.
12705
12706 2018-05-14 Richard Biener <rguenther@suse.de>
12707
12708 * doc/match-and-simplify.texi: Adjust :s documentation.
12709
12710 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12711
12712 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12713 intended memcpy size.
12714 (REORDER_45): Likewise.
12715
12716 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12717
12718 * sort.cc: New file.
12719 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12720 * vec.c (qsort_chk): Use gcc_qsort.
12721 * Makefile.in (OBJS-libcommon): Add sort.o.
12722 (build/sort.o): New target. Use it...
12723 (BUILD_RTL): ... here, and...
12724 (build/gencfn-macros): ... here, and...
12725 (build/genmatch): ... here.
12726
12727 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12728 Chung-Ju Wu <jasonwucj@gmail.com>
12729
12730 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12731 * config/nds32/nds32-graywolf.md: New file.
12732 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12733 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12734 pipeline.
12735 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12736 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12737 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12738 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12739 * config/nds32/pipelines.md: Include n15 settings.
12740
12741 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12742 Chung-Ju Wu <jasonwucj@gmail.com>
12743
12744 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12745 * config/nds32/nds32-n13.md: New file.
12746 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12747 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12748 pipeline.
12749 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12750 * config/nds32/nds32.md (pipeline_model): Add n13.
12751 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12752 * config/nds32/pipelines.md: Include n13 settings.
12753
12754 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12755 Chung-Ju Wu <jasonwucj@gmail.com>
12756
12757 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12758 * config/nds32/nds32-n10.md: New file.
12759 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12760 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12761 pipeline.
12762 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12763 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12764 * config/nds32/nds32.md (pipeline_model): Add n10.
12765 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12766 * config/nds32/pipelines.md: Include n10 settings.
12767
12768 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12769 Kito Cheng <kito.cheng@gmail.com>
12770 Chung-Ju Wu <jasonwucj@gmail.com>
12771
12772 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12773 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12774 Add enum values for DSP extension instructions.
12775 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12776 New constraints.
12777 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12778 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12779 New code iterators.
12780 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12781 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12782 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12783 * config/nds32/nds32-intrinsic.md: Likewise.
12784 * config/nds32/nds32_intrinsic.h: Likewise.
12785 * config/nds32/nds32-md-auxiliary.c: Likewise.
12786 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12787 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12788 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12789 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12790 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12791 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12792 TYPE_DMAC in switch statement.
12793 * config/nds32/nds32.c: New checking and implementation for DSP
12794 extension instructions.
12795 * config/nds32/nds32.h: Likewise.
12796 * config/nds32/nds32.md: Likewise.
12797 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12798 * config/nds32/predicates.md: Implement new predicates for DSP
12799 extension.
12800
12801 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12802
12803 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12804 Reformat alternatives and attributes so it is easier to identify
12805 which constraints/attributes go with which instruction.
12806 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12807 (mov<mode>_softfloat32, FMOVE64): Likewise.
12808 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12809 (mov<mode>_softfloat64, FMOVE64): Likewise.
12810
12811 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12812
12813 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12814 subsection.
12815 (Basic PowerPC Built-in Functions): The new name of the
12816 subsection previously known as "PowerPC Built-in Functions".
12817 (Basic PowerPC Built-in Functions Available on all Configurations):
12818 New subsubsection.
12819 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12820 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12821 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12822 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12823
12824 2018-05-11 Martin Jambor <mjambor@suse.cz>
12825
12826 PR ipa/85655
12827 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12828 single const.
12829
12830 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12831
12832 PR target/85733
12833 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12834
12835 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12836
12837 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12838 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12839 (ix86_handle_option): Handle -mwaitpkg.
12840 * config.gcc: New header.
12841 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12842 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12843 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12844 function type.
12845 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12846 OPTION_MASK_ISA_WAITPKG.
12847 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12848 (ix86_option_override_internal): Add PTA_WAITPKG.
12849 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12850 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12851 IX86_BUILTIN_TPAUSE.
12852 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12853 __builtin_ia32_umwait and __builtin_ia32_tpause.
12854 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12855 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12856 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12857 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12858 UNSPECV_TPAUSE): New.
12859 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12860 * config/i386/i386.opt: Add -mwaitpkg.
12861 * config/i386/waitpkgintrin.h: New file.
12862 * config/i386/x86intrin.h: New header.
12863 * doc/invoke.texi: Add -mwaitpkg.
12864
12865 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12866
12867 PR target/85606
12868 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12869 equivalent.
12870 (cortex-m0): Use armv6s-m isa.
12871 (cortex-m0plus): Likewise.
12872 (cortex-m1): Likewise.
12873 (cortex-m0.small-multiply): Likewise.
12874 (cortex-m0plus.small-multiply): Likewise.
12875 (cortex-m1.small-multiply): Likewise.
12876
12877 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12878 Jakub Jelinek <jakub@redhat.com>
12879
12880 PR tree-optimization/85692
12881 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12882 source permute as well.
12883
12884 2018-05-11 Martin Liska <mliska@suse.cz>
12885
12886 PR sanitizer/85556
12887 * doc/extend.texi: Document LLVM style format for no_sanitize
12888 attribute.
12889
12890 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12891
12892 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12893 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12894 (mode_supports_vsx_dform_quad): Likewise.
12895 (mode_supports_vmx_dform): Move these functions to be next to the
12896 other mode_supports functions.
12897 (mode_supports_dq_form): Likewise.
12898 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12899 mode_supports_dq_form.
12900 (reg_offset_addressing_ok_p): Likewise.
12901 (offsettable_ok_by_alignment): Likewise.
12902 (rs6000_legitimate_offset_address_p): Likewise.
12903 (legitimate_lo_sum_address_p): Likewise.
12904 (rs6000_legitimize_address): Likewise.
12905 (rs6000_legitimize_reload_address): Likewise.
12906 (rs6000_secondary_reload_inner): Likewise.
12907 (rs6000_preferred_reload_class): Likewise.
12908 (rs6000_output_move_128bit): Likewise.
12909
12910 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12911
12912 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12913 Generate SImode target register for null target.
12914 <case IX86_BUILTIN_XGETBV>: Ditto.
12915 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12916 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12917
12918 2018-05-10 Carl Love <cel@us.ibm.com>
12919
12920 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12921 dcbtt and dcbtstt if operands[2] is 0.
12922
12923 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12924
12925 PR target/85693
12926 * config/i386/sse.md (usadv64qi): New expander.
12927
12928 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12929
12930 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12931 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12932 -maltivec=be support.
12933 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12934 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12935 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12936 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12937 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12938 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12939 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12940 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12941 altivec_vsumsws): Adjust.
12942 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12943 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12944 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12945 support.
12946 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12947 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12948 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12949 (altivec_lve<VI_char>x): Delete expand.
12950 (*altivec_lve<VI_char>x_internal): Rename to...
12951 (altivec_lve<VI_char>x): ... this.
12952 (altivec_lvxl_<mode>): Delete expand.
12953 (*altivec_lvxl_<mode>_internal): Rename to ...
12954 (altivec_lvxl_<mode>): ... this.
12955 (altivec_stvxl_<mode>): Delete expand.
12956 (*altivec_stvxl_<mode>_internal): Rename to ...
12957 (altivec_stvxl_<mode>): ... this.
12958 (altivec_stve<VI_char>x): Delete expand.
12959 (*altivec_stve<VI_char>x_internal): Rename to ...
12960 (altivec_stve<VI_char>x): ... this.
12961 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12962 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12963 reduc_plus_scal_<mode>): Adjust.
12964 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12965 comment.
12966 (rs6000_cpu_cpp_builtins): Adjust.
12967 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12968 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12969 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12970 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12971 -maltivec=be support.
12972 (rs6000_split_vec_extract_var): Adjust.
12973 (rs6000_split_v4si_init): Adjust.
12974 (swap_selector_for_mode): Delete.
12975 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12976 altivec_expand_stvex_be): Delete.
12977 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12978 -maltivec=be support.
12979 (rs6000_gimple_fold_builtin): Ditto.
12980 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12981 Adjust.
12982 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12983 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12984 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12985 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12986 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12987 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12988 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12989 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12990 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12991 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12992 anonymous split): Adjust.
12993 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12994 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12995
12996 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12997
12998 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12999 when --with-gxx-include-dir is also specified.
13000 * configure: Regenerate.
13001
13002 2018-05-09 Jim Wilson <jimw@sifive.com>
13003
13004 PR target/84797
13005 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13006 * config/riscv/t-withmultilib: New.
13007 * config/riscv/withmultilib.h: New.
13008 * doc/install.texi: Document RISC-V --with-multilib-list support.
13009
13010 2018-05-09 Richard Biener <rguenther@suse.de>
13011
13012 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13013 vector.
13014 (vect_bb_vectorization_profitable_p): Adjust. Compute
13015 actual scalar cost using the cost vector and the add_stmt_cost
13016 machinery.
13017
13018 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13019
13020 PR rtl-optimization/85645
13021 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13022 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13023
13024 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13025
13026 PR rtl-optimization/85645
13027 * shrink-wrap.c (spread_components): Return a boolean saying if
13028 anything was changed.
13029 (try_shrink_wrapping_separate): Iterate spread_components until
13030 nothing changes anymore.
13031
13032 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13033
13034 PR rtl-optimization/85645
13035 * regrename.c (build_def_use): Also kill the chains that include the
13036 destination of a REG_CFA_REGISTER note.
13037
13038 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13039
13040 PR rtl-optimization/85645
13041 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13042 insn that has a REG_CFA_REGISTER note.
13043
13044 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13045
13046 * cfgexpand.c (expand_clobber): New function.
13047 (expand_gimple_stmt_1): Use it.
13048 * tree-vect-stmts.c (vect_clobber_variable): New function,
13049 split out from...
13050 (vectorizable_simd_clone_call): ...here.
13051 (vectorizable_store): Emit a clobber either side of an
13052 IFN_STORE_LANES sequence.
13053 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13054
13055 2018-05-09 Tom de Vries <tom@codesourcery.com>
13056
13057 PR target/85626
13058 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13059 (define_insn "trap_if_false"): Add exit after trap.
13060
13061 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13062
13063 PR rtl-optimization/85638
13064 * bb-reorder.c: Include common/common-target.h.
13065 (create_forwarder_block): New function extracted from...
13066 (fix_up_crossing_landing_pad): ...here. Rename into...
13067 (dw2_fix_up_crossing_landing_pad): ...this.
13068 (sjlj_fix_up_crossing_landing_pad): New function.
13069 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13070 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13071 from both partitions and exit the loop after one iteration.
13072
13073 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13074
13075 Revert:
13076 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13077 subsection.
13078 (Basic PowerPC Built-in Functions): The new name of the
13079 subsection previously known as "PowerPC Built-in Functions".
13080 (Basic PowerPC Built-in Functions Available on all Configurations):
13081 New subsubsection.
13082 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13083 subsubsection.
13084 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13085 subsubsection.
13086 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13087 subsubsection.
13088 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13089 subsubsection.
13090
13091 2018-05-08 Jim Wilson <jimw@sifive.com>
13092
13093 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13094 (LD_EMUL_SUFFIX): New.
13095 (LINK_SPEC): Use it.
13096
13097 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13098
13099 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13100 subsection.
13101 (Basic PowerPC Built-in Functions): The new name of the
13102 subsection previously known as "PowerPC Built-in Functions".
13103 (Basic PowerPC Built-in Functions Available on all Configurations):
13104 New subsubsection.
13105 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13106 subsubsection.
13107 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13108 subsubsection.
13109 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13110 subsubsection.
13111 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13112 subsubsection.
13113
13114 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13115
13116 PR target/85683
13117 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13118 after cmpelim optimization.
13119
13120 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13121
13122 * config.gcc: Support "goldmont".
13123 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13124 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13125 PROCESSOR_GOLDMONT.
13126 * config/i386/i386.c (m_GOLDMONT): Define.
13127 (processor_target_table): Add "goldmont".
13128 (PTA_GOLDMONT): Define.
13129 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13130 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13131 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13132 (fold_builtin_cpu): Add "goldmont".
13133 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13134 (ix86_option_override_internal): Add "goldmont".
13135 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13136 (processor_type): Add PROCESSOR_GOLDMONT.
13137 * config/i386/i386.md: Add CPU "glm".
13138 * config/i386/glm.md: New file.
13139 * config/i386/x86-tune.def: Add m_GOLDMONT.
13140 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13141
13142 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13143
13144 PR target/85572
13145 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13146 E_V4DImode.
13147 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13148 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13149 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13150
13151 PR target/85317
13152 * config/i386/i386.c (ix86_fold_builtin): Handle
13153 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13154
13155 PR target/85480
13156 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13157 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13158
13159 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13160
13161 PR target/85658
13162 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13163 (check_arch): Likewise.
13164 (check_fpu): Return the result rather than printing it.
13165 (end arch): Fix operator precedence.
13166 (end cpu): Likewise.
13167 (END): Print the result from check_fpu.
13168
13169 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13170 Alan Hayward <alan.hayward@arm.com>
13171 David Sherwood <david.sherwood@arm.com>
13172
13173 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13174 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13175 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13176 (*fcmuo<mode>_and): New patterns.
13177
13178 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13179
13180 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13181 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13182 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13183 (cmp_op, sve_imm_con): New code attributes.
13184 (SVE_COND_INT_CMP, imm_con): Delete.
13185 (cmp_op): Remove above unspecs from int attribute.
13186 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13187 to...
13188 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13189 comparison-specific unspecs.
13190 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13191 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13192 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13193 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13194 (*vec_fcm<cmp_op><mode>): Rename to...
13195 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13196 (*vec_fcmuo<mode>): Rename to...
13197 (*fcmuo<mode>): ...this and adjust likewise.
13198 (*pred_fcm<cmp_op><mode>): New pattern.
13199 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13200 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13201 functions.
13202 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13203 and UNORDERED.
13204 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13205 (aarch64_emit_sve_predicated_cond): New function.
13206 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13207 (aarch64_emit_unspec_cond_or): Replace with...
13208 (aarch64_emit_sve_or_conds): ...this new function. Use
13209 aarch64_emit_sve_ptrue_op for the individual comparisons and
13210 aarch64_emit_binop to OR them together.
13211 (aarch64_emit_inverted_unspec_cond): Replace with...
13212 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13213 aarch64_emit_sve_ptrue_op for the comparison and
13214 aarch64_emit_unop to invert the result.
13215 (aarch64_expand_sve_vec_cmp_float): Update after the above
13216 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13217
13218 2018-05-07 Nathan Sidwell <nathan@acm.org>
13219
13220 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13221 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13222 (Backwards Compatibility): Likewise.
13223
13224 2018-05-07 Luis Machado <luis.machado@linaro.org>
13225
13226 PR bootstrap/85681
13227 Revert:
13228 2018-05-07 Luis Machado <luis.machado@linaro.org>
13229
13230 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13231 <prefetch_dynamic_strides>: New const bool field.
13232 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13233 prefetch_dynamic_strides.
13234 (exynosm1_prefetch_tune): Likewise.
13235 (thunderxt88_prefetch_tune): Likewise.
13236 (thunderx_prefetch_tune): Likewise.
13237 (thunderx2t99_prefetch_tune): Likewise.
13238 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13239 to false.
13240 (aarch64_override_options_internal): Update to set
13241 PARAM_PREFETCH_DYNAMIC_STRIDES.
13242 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13243 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13244 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13245 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13246 prefetch-dynamic-strides setting.
13247
13248 2018-05-07 Luis Machado <luis.machado@linaro.org>
13249
13250 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13251 <minimum_stride>: New const int field.
13252 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13253 minimum_stride field.
13254 (exynosm1_prefetch_tune): Likewise.
13255 (thunderxt88_prefetch_tune): Likewise.
13256 (thunderx_prefetch_tune): Likewise.
13257 (thunderx2t99_prefetch_tune): Likewise.
13258 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13259 (aarch64_override_options_internal): Update to set
13260 PARAM_PREFETCH_MINIMUM_STRIDE.
13261 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13262 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13263 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13264 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13265 stride is constant and is below the minimum stride threshold.
13266
13267 2018-05-07 Luis Machado <luis.machado@linaro.org>
13268
13269 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13270 to 512.
13271
13272 2018-05-07 Luis Machado <luis.machado@linaro.org>
13273
13274 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13275 <prefetch_dynamic_strides>: New const bool field.
13276 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13277 prefetch_dynamic_strides.
13278 (exynosm1_prefetch_tune): Likewise.
13279 (thunderxt88_prefetch_tune): Likewise.
13280 (thunderx_prefetch_tune): Likewise.
13281 (thunderx2t99_prefetch_tune): Likewise.
13282 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13283 to false.
13284 (aarch64_override_options_internal): Update to set
13285 PARAM_PREFETCH_DYNAMIC_STRIDES.
13286 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13287 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13288 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13289 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13290 prefetch-dynamic-strides setting.
13291
13292 2018-05-07 Luis Machado <luis.machado@linaro.org>
13293
13294 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13295 <minimum_stride>: New const int field.
13296 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13297 minimum_stride field.
13298 (exynosm1_prefetch_tune): Likewise.
13299 (thunderxt88_prefetch_tune): Likewise.
13300 (thunderx_prefetch_tune): Likewise.
13301 (thunderx2t99_prefetch_tune): Likewise.
13302 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13303 (aarch64_override_options_internal): Update to set
13304 PARAM_PREFETCH_MINIMUM_STRIDE.
13305 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13306 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13307 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13308 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13309 stride is constant and is below the minimum stride threshold.
13310
13311 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13312
13313 PR c++/85659
13314 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13315 the type is addressable. Don't force op into register if it has
13316 BLKmode.
13317
13318 2018-05-05 Roland McGrath <mcgrathr@google.com>
13319
13320 PR other/77609
13321 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13322 any section for which we don't know a specific type it should have,
13323 regardless of name. Previously this was done only for the exact
13324 names ".init_array", ".fini_array", and ".preinit_array".
13325 (default_elf_asm_named_section): Add comment about
13326 relationship with default_section_type_flags and SECTION_NOTYPE.
13327 (get_section): Don't consider it a type conflict if one side has
13328 SECTION_NOTYPE and the other doesn't, as long as neither has the
13329 SECTION_BSS et al used in the default_section_type_flags logic.
13330
13331 2018-05-05 Tom de Vries <tom@codesourcery.com>
13332
13333 PR target/85653
13334 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13335 (workaround_barsyncs): New function.
13336 (nvptx_reorg): Use workaround_barsyncs.
13337 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13338 (define_expand "nvptx_membar_cta"): New define_expand.
13339 (define_insn "*nvptx_membar_cta"): New insn.
13340
13341 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13342
13343 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13344 To improve optimization opportunities.
13345 * builtin-types.def: The new needed builtin types for the above.
13346
13347 2018-05-04 Richard Biener <rguenther@suse.de>
13348
13349 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13350 * gimple-ssa-store-merging.c
13351 (imm_store_chain_info::output_merged_store): Remove redundant create,
13352 release split_store vector contents on failure.
13353 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13354 scalar stmt vector on cache hit.
13355
13356 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13357
13358 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13359 Xilinx FP support.
13360 * config.gcc (powerpc-xilinx-eabi*): Remove.
13361 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13362 support.
13363 (fusion_addis_mem_combo_load): Ditto.
13364 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13365 FP support.
13366 (rs6000_cpu_cpp_builtins): Ditto.
13367 * config/rs6000/rs6000-linux.c
13368 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13369 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13370 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13371 support.
13372 (rs6000_setup_reg_addr_masks): Ditto.
13373 (rs6000_init_hard_regno_mode_ok): Ditto.
13374 (rs6000_option_override_internal): Ditto.
13375 (legitimate_lo_sum_address_p): Ditto.
13376 (rs6000_legitimize_address): Ditto.
13377 (rs6000_legitimize_reload_address): Ditto.
13378 (rs6000_legitimate_address_p): Ditto.
13379 (abi_v4_pass_in_fpr): Ditto.
13380 (setup_incoming_varargs): Ditto.
13381 (rs6000_gimplify_va_arg): Ditto.
13382 (rs6000_split_multireg_move): Ditto.
13383 (rs6000_savres_strategy): Ditto.
13384 (rs6000_emit_prologue_components): Ditto.
13385 (rs6000_emit_epilogue_components): Ditto.
13386 (rs6000_emit_prologue): Ditto.
13387 (rs6000_emit_epilogue): Ditto.
13388 (rs6000_elf_file_end): Ditto.
13389 (rs6000_function_value): Ditto.
13390 (rs6000_libcall_value): Ditto.
13391 * config/rs6000/rs6000.h: Ditto.
13392 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13393 (TARGET_MINMAX): ... this. New.
13394 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13395 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13396 (*movsi_internal1_single): Delete.
13397 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13398 mfpu=, mxilinx-fpu): Delete.
13399 * config/rs6000/singlefp.h: Delete.
13400 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13401 * config/rs6000/t-rs6000: Ditto.
13402 * config/rs6000/t-xilinx: Delete.
13403 * config/rs6000/titan.md: Adjust for fp_type removal.
13404 * config/rs6000/vsx.md: Remove Xilinx FP support.
13405 (VStype_simple): Delete.
13406 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13407 * config/rs6000/xfpu.h: Delete.
13408 * config/rs6000/xfpu.md: Delete.
13409 * config/rs6000/xilinx.h: Delete.
13410 * config/rs6000/xilinx.opt: Delete.
13411 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13412 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13413
13414 2018-05-04 Tom de Vries <tom@codesourcery.com>
13415
13416 PR libgomp/85639
13417 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13418 if ignore == 0.
13419
13420 2018-05-04 Richard Biener <rguenther@suse.de>
13421
13422 PR middle-end/85627
13423 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13424 (expand_complex_div_wide): Likewise.
13425 (expand_complex_operations_1): Likewise.
13426 (expand_complex_libcall): Preserve EH info of the original stmt.
13427 (tree_lower_complex): Handle removed blocks.
13428 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13429 on complex multiplication and division libcall builtins.
13430
13431 2018-05-04 Richard Biener <rguenther@suse.de>
13432
13433 PR middle-end/85574
13434 * fold-const.c (negate_expr_p): Restrict negation of operand
13435 zero of a division to when we know that can happen without
13436 overflow.
13437 (fold_negate_expr_1): Likewise.
13438
13439 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13440
13441 PR libstdc++/85466
13442 * real.h (real_nextafter): Declare.
13443 * real.c (real_nextafter): New function.
13444 * fold-const-call.c (fold_const_nextafter): New function.
13445 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13446 CASE_CFN_NEXTTOWARD.
13447 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13448 even when arg1_mode is different from arg0_mode.
13449
13450 2018-05-03 Nathan Sidwell <nathan@acm.org>
13451
13452 * doc/extend.texi (Deprecated Features): Remove
13453 -ffriend-injection.
13454 (Backwards Compatibility): Likewise.
13455 * doc/invoke.texi (C++ Language Options): Likewise.
13456 (C++ Dialect Options): Likewise.
13457
13458 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13459
13460 PR target/85530
13461 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13462 _mm512_mask_mullox_epi64): New intrinsics.
13463
13464 2018-05-03 Tom de Vries <tom@codesourcery.com>
13465
13466 PR testsuite/85106
13467 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13468 dump files): Add offload-tree.
13469
13470 2018-05-03 Richard Biener <rguenther@suse.de>
13471
13472 PR tree-optimization/85615
13473 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13474 to loops not nested in BBs loop father to avoid creating multi-entry
13475 loops.
13476
13477 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13478
13479 PR tree-optimization/70291
13480 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13481 arguments. Change return type to tree. Emit libcall as a new
13482 statement rather than replacing existing one when inplace_p is true.
13483 (expand_complex_multiplication_components): New function.
13484 (expand_complex_multiplication): Expand floating-point complex
13485 multiplication using the above.
13486 (expand_complex_division): Rename inner_type parameter to type.
13487 Update expand_complex_libcall call-site.
13488 (expand_complex_operations_1): Update expand_complex_multiplication
13489 and expand_complex_division call-sites.
13490
13491 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13492
13493 PR target/85582
13494 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13495 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13496 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13497 the highest significant bit of the shift count mask is clear. In
13498 check whether and[sq]i3 is needed verify that all significant bits
13499 of the shift count other than the highest are set.
13500
13501 2018-05-02 Tom de Vries <tom@codesourcery.com>
13502
13503 PR libgomp/82428
13504 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13505 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13506 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13507 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13508 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13509 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13510 __builtin_goacc_parlevel_size.
13511
13512 2018-05-02 Richard Biener <rguenther@suse.de>
13513
13514 PR tree-optimization/85597
13515 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13516 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13517 directly.
13518
13519 2018-05-02 Tom de Vries <tom@codesourcery.com>
13520
13521 PR testsuite/85106
13522 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13523 dump files): Add ltrans-tree.
13524
13525 2018-05-02 Tom de Vries <tom@codesourcery.com>
13526
13527 PR testsuite/85106
13528 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13529 dump files): Add wpa-ipa.
13530
13531 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13532
13533 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13534 powerpc*-*-linux*paired* target.
13535 * config/rs6000/750cl.h: Delete.
13536 * config/rs6000/paired.h: Delete.
13537 * config/rs6000/paired.md: Delete.
13538 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13539 float support.
13540 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13541 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13542 comment. Remove paired float support.
13543 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13544 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13545 VECTOR_PAIRED.
13546 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13547 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13548 declarations.
13549 * config/rs6000/rs6000.c: Remove paired float support.
13550 (paired_expand_vector_init, paired_expand_vector_move,
13551 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13552 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13553 paired_expand_builtin, paired_expand_predicate_builtin,
13554 paired_init_builtins): Delete.
13555 * config/rs6000/rs6000.h: Remove paired float support.
13556 * config/rs6000/rs6000.md: Remove paired float support.
13557 (move_from_CR_ov_bit): Delete.
13558 * config/rs6000/rs6000.opt (mpaired): Delete.
13559 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13560 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13561
13562 2018-05-02 Richard Biener <rguenther@suse.de>
13563
13564 PR middle-end/85567
13565 * gimplify.c (gimplify_save_expr): When in SSA form allow
13566 SAVE_EXPRs to compute to SSA vars.
13567
13568 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13569
13570 PR target/85582
13571 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13572 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13573 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13574 clobber operands[2], instead use a new pseudo. Formatting fixes.
13575
13576 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13577
13578 PR tree-optimization/85586
13579 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13580 exit early for statements in the same group if the accesses are
13581 not strided.
13582
13583 2018-05-02 Tom de Vries <tom@codesourcery.com>
13584
13585 PR lto/85451
13586 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13587 error message.
13588
13589 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13590
13591 PR tree-optimization/85143
13592 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13593
13594 2018-05-01 Tom de Vries <tom@codesourcery.com>
13595
13596 PR lto/85451
13597 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13598 not found" error message.
13599
13600 2018-05-01 Tom de Vries <tom@codesourcery.com>
13601
13602 PR other/83786
13603 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13604 * vec.c (test_ordered_remove_if): New function.
13605 (vec_c_tests): Call test_ordered_remove_if.
13606 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13607 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13608 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13609 VEC_ORDERED_REMOVE_IF.
13610
13611 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13612
13613 PR tree-optimization/82665
13614 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13615 pointer subtraction where arguments come from a memchr call.
13616
13617 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13618
13619 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13620 --push-state --as-needed and --pop-state instead of --as-needed and
13621 --no-as-needed if ld supports it.
13622 * configure: Regenerated.
13623
13624 PR web/85578
13625 * doc/install.texi2html: Replace _002d with - and _002a with * in
13626 generated html files using sed.
13627
13628 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13629
13630 PR c++/85523
13631 * gcc-rich-location.c (blank_line_before_p): New function.
13632 (use_new_line): New function.
13633 (gcc_rich_location::add_fixit_insert_formatted): New function.
13634 * gcc-rich-location.h
13635 (gcc_rich_location::add_fixit_insert_formatted): New function.
13636
13637 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13638
13639 * selftest.c (assert_streq): Rename "expected" and "actual" to
13640 "val1" and "val2". Extend NULL-handling to cover both inputs
13641 symmetrically, while still requiring both to be non-NULL for a pass.
13642 * selftest.h (assert_streq): Rename "expected" and "actual" to
13643 "val1" and "val2".
13644 (ASSERT_EQ): Likewise.
13645 (ASSERT_EQ_AT): Likewise.
13646 (ASSERT_KNOWN_EQ): Likewise.
13647 (ASSERT_KNOWN_EQ_AT): Likewise.
13648 (ASSERT_NE): Likewise.
13649 (ASSERT_MAYBE_NE): Likewise.
13650 (ASSERT_MAYBE_NE_AT): Likewise.
13651 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13652 the assertion to pass.
13653 (ASSERT_STREQ_AT): Likewise.
13654
13655 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13656
13657 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13658 interaction with -pie.
13659
13660 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13661
13662 * selftest.h: Fix alphabetization of per-source-file selftest
13663 declarations.
13664
13665 2018-04-30 Jason Merrill <jason@redhat.com>
13666
13667 PR c++/61982 - dead stores to destroyed objects.
13668 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13669 of clobber.
13670
13671 2018-04-30 Jason Merrill <jason@redhat.com>
13672
13673 * tree.c (build_clobber): New.
13674 * tree.h: Declare it.
13675 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13676
13677 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13678
13679 * diagnostic-show-locus.c (layout::layout): Update for
13680 location_get_source_line returning a char_span.
13681 (struct char_span): Move to input.h.
13682 (struct correction): Update for fields in char_span becoming
13683 private.
13684 (struct source_line): Update for location_get_source_line
13685 returning a char_span.
13686 (layout::print_line): Likewise.
13687 * edit-context.c (edited_file::print_content): Likewise.
13688 (edited_file::print_diff_hunk): Likewise.
13689 (edited_file::print_run_of_changed_lines): Likewise.
13690 (edited_file::get_num_lines): Likewise.
13691 (edited_line::edited_line): Likewise.
13692 * final.c (asm_show_source): Likewise.
13693 * input.c (location_get_source_line): Convert return type
13694 from const char * to char_span, losing the final "line_len"
13695 param.
13696 (dump_location_info): Update for the above.
13697 (get_substring_ranges_for_loc): Likewise. Use a char_span
13698 when handling the literal within the line.
13699 (test_reading_source_line): Update for location_get_source_line
13700 returning a char_span.
13701 * input.h (class char_span): Move here from
13702 diagnostic-show-locus.c, converting from a struct to a class.
13703 Make data members private.
13704 (char_span::operator bool): New.
13705 (char_span::length): New.
13706 (char_span::get_buffer): New.
13707 (char_span::operator[]): New.
13708 (char_span::subspan): Make const.
13709 (char_span::xstrdup): New.
13710 (location_get_source_line): Convert return type from const char *
13711 to char_span, losing the final "line_size" param.
13712
13713 2018-04-30 Jan Hubicka <jh@suse.cz>
13714
13715 * lto-wrapper.c (ltrans_priorities): New static var.
13716 (cmp_priority): New.
13717 (run_gcc): Read priorities and if doing parallel build order
13718 the Makefile by them.
13719
13720 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13721
13722 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13723
13724 2018-04-30 Richard Biener <rguenther@suse.de>
13725
13726 * tree-cfg.c (verify_address): Remove base argument, add
13727 flag whether to check TREE_ADDRESSABLE and do that.
13728 (verify_expr): Remove.
13729 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13730 (verify_gimple_assign_single): Likewise.
13731 (verify_gimple_switch): Likewise.
13732 (verify_expr_location_1): Dereference tp once. Add (disabled)
13733 piece from verify_expr.
13734 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13735
13736 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13737
13738 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13739
13740 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13741
13742 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13743 (small_data_pattern): Likewise.
13744 (arc_rewrite_small_data): Likewise.
13745 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13746 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13747 (get_symbol_alignment): New function.
13748 (legitimate_small_data_address_p): Likewise.
13749 (legitimate_scaled_address): Update, call
13750 legitimate_small_data_address_p.
13751 (output_sdata): New static variable.
13752 (arc_print_operand): Update how we handle small data operands.
13753 (arc_print_operand_address): Likewise.
13754 (arc_legitimate_address_p): Update, use
13755 legitimate_small_data_address_p.
13756 (arc_rewrite_small_data_p): Remove.
13757 (arc_rewrite_small_data_1): Likewise.
13758 (arc_rewrite_small_data): Likewise.
13759 (small_data_pattern): Likewise.
13760 (compact_sda_memory_operand): Update to use
13761 legitimate_small_data_address_p and get_symbol_alignment.
13762 (prepare_move_operands): Don't rewite sdata pattern.
13763 (prepare_extend_operands): Remove.
13764 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13765 pattern.
13766 (zero_extendqisi2): Likewise.
13767 (zero_extendhisi2): Likewise.
13768 (extendqihi2): Likewise.
13769 (extendqisi2): Likewise.
13770 (extendhisi2): Likewise.
13771 (addsi3): Likewise.
13772 (subsi3): Likewise.
13773 (andsi3): Likewise.
13774 * config/arc/constraints.md (Usd): Change it to memory constraint.
13775
13776 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13777
13778 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13779 as source of std instructions.
13780 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13781 allow 6-bit constants as source for store instructions.
13782 (movdi_insn): Update instruction pattern to allow 6-bit constants
13783 as source for store instructions.
13784
13785 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13786
13787 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13788
13789 2018-04-30 Nathan Sidwell <nathan@acm.org>
13790 Sandra Loosemore <sandra@codesourcery.com>
13791
13792 * dumpfile.c (dump_open): Allow '-' for stdout.
13793 * doc/invoke.texi (Developer Options): Document dump filename
13794 determination early. Document stdin/stdout selection.
13795
13796 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13797
13798 Microblaze Target: PIC data text relative
13799
13800 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13801 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13802 Add declaration.
13803 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13804 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13805 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13806 New addressing mode for data-text relative position indepenedent code.
13807 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13808 'ADDRESS_SYMBOLIC_TXT_REL'.
13809 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13810 (microblaze_legitimate_pic_operand): Exclude function calls from
13811 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13812 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13813 addresses cases.
13814 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13815 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13816 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13817 for 'address + offset'.
13818 (microblaze_expand_prologue): Add new function prologue call for
13819 'r20' assignation.
13820 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13821 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13822 table in case of TARGET_PIC_DATA_TEXT_REL.
13823 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13824 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13825 Add new macros 'UNSPEC_TEXT',
13826 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13827 + exclude function calls from 'UNSPEC_PLT' in case of data text
13828 relative mode.
13829 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13830 new target hook for generating address diff vector tables in case of
13831 flag_pic.
13832 * doc/tm.texi : Regenerate.
13833 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13834 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13835 of addr diff vector generation.
13836 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13837 target hook definition.
13838 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13839 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13840 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13841 option for data text relative.
13842
13843 2018-04-30 Richard Biener <rguenther@suse.de>
13844
13845 * tree-chrec.h (evolution_function_is_constant_p): Remove
13846 redundant check.
13847 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13848
13849 2018-04-30 Richard Biener <rguenther@suse.de>
13850
13851 PR bootstrap/85571
13852 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13853
13854 2018-04-30 Richard Biener <rguenther@suse.de>
13855
13856 PR tree-optimization/28364
13857 PR tree-optimization/85275
13858 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13859 copying first exit test.
13860
13861 2018-04-28 Mark Wielaard <mark@klomp.org>
13862
13863 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13864 dwarf_version >= 5.
13865 (dwarf_AT): Handle DW_AT_addr_base.
13866 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13867
13868 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13869
13870 PR target/84431
13871 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13872 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13873 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13874 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13875
13876 2018-04-28 Richard Biener <rguenther@suse.de>
13877
13878 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13879 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13880 to reflect use. Only add interesting stmts.
13881
13882 2018-04-27 Martin Jambor <mjambor@suse.cz>
13883
13884 PR ipa/85549
13885 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13886 the jump function allows for passing through aggregate values.
13887
13888 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13889
13890 * input.h (in_system_header_at): Convert from macro to inline
13891 function.
13892 (from_macro_expansion_at): Likewise.
13893 (from_macro_definition_at): Likewise.
13894
13895 2018-04-27 Jeff Law <law@redhat.com>
13896
13897 * config.gcc: Mark tile* targets as deprecated/obsolete.
13898
13899 2018-04-27 Richard Biener <rguenther@suse.de>
13900
13901 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13902 fix for ILP32.
13903
13904 2018-04-27 Richard Biener <rguenther@suse.de>
13905
13906 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13907
13908 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13909
13910 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13911 with Yd constraint. Set "preferred_for_speed" attribute from
13912 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13913 with Yd constraint.
13914 (*movdi_internal): Ditto.
13915 (movti_interunit splitters): Remove
13916 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13917 (movdi_interunit splitters): Ditto.
13918 * config/i386/constraints.md (Ye): Remove.
13919 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13920
13921 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13922
13923 PR target/85512
13924 * config/aarch64/constraints.md (Usg): Limit to 31.
13925 (Usj): Limit to 63.
13926
13927 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13928
13929 PR tree-optimization/85529
13930 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13931 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13932 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13933 zero extension or masking of the MSB bit.
13934 (optimize_range_tests): Add FIRST_BB argument, pass it through
13935 to optimize_range_tests_var_bound.
13936 (maybe_optimize_range_tests, reassociate_bb): Adjust
13937 optimize_range_tests callers.
13938
13939 2018-04-26 Richard Biener <rguenther@suse.de>
13940 Jakub Jelinek <jakub@redhat.com>
13941
13942 * cgraph.h (symbol_table): Just declare debug method here.
13943 * symtab.c (symbol_table::debug): Define.
13944
13945 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13946
13947 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13948
13949 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13950
13951 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13952 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13953 (*movdi_internal): Substitute Yi and Yj constraint with x
13954 and Ym and Yn constraint with y constraint. Update "isa"
13955 attribute and set "preferred_for_speed" attribute from
13956 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13957 (*movsi_internal): Ditto.
13958 (*movdf_internal): Ditto.
13959 (*movsf_internal): Ditto.
13960 (*zero_extendsidi2): Ditto.
13961 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13962 (sse2_loadld): Ditto.
13963 (*vec_extract<ssevecmodelower>_0): Ditto.
13964 (*vec_extractv4si_0_zext_sse4): Ditto.
13965 (vec_concatv2di): Ditto.
13966 (*vec_dup<mode>): Ditto.
13967 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13968 * config/i386/constraints.md (Yi): Remove.
13969 (Yj): Remove.
13970 (Ym): Remove.
13971 (Yn): Remove.
13972
13973 2018-04-26 Nathan Sidwell <nathan@acm.org>
13974
13975 * dumpfile.c (dump_open): New.
13976 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13977 (dump_finish): Detect stdio/stderr by value not name.
13978
13979 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13980
13981 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13982
13983 2018-04-26 Tom de Vries <tom@codesourcery.com>
13984
13985 PR target/84952
13986 * config/nvptx/nvptx.c (verify_neutering_jumps)
13987 (verify_neutering_labels): New function
13988 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13989
13990 2018-04-26 Tom de Vries <tom@codesourcery.com>
13991
13992 PR target/84025
13993 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13994 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13995 need neutering.
13996
13997 2018-04-26 Richard Biener <rguenther@suse.de>
13998 Tom de Vries <tom@codesourcery.com>
13999
14000 PR lto/85422
14001 * lto-streamer-out.c (output_function): Fixup loops if required to match
14002 discovery done in the reader.
14003
14004 2018-04-26 Richard Biener <rguenther@suse.de>
14005
14006 PR tree-optimization/85116
14007 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14008 have a loop exit from the single latch predecessor. Remove
14009 case of header with just condition.
14010 (ch_base::copy_headers): Exclude infinite loops from any
14011 processing.
14012 (pass_ch::execute): Record exits.
14013
14014 2018-04-26 Richard Biener <rguenther@suse.de>
14015
14016 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14017 prologue cost vector and pass it to vect_get_load_cost.
14018 (vect_get_peeling_costs_all_drs): Likewise.
14019 (vect_peeling_hash_get_lowest_cost): Likewise.
14020 (vect_enhance_data_refs_alignment): Likewise.
14021
14022 2018-04-26 Richard Biener <rguenther@suse.de>
14023
14024 PR middle-end/85450
14025 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14026 checking of integer<->pointer conversions.
14027 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14028 sign-/zero-extending pointer types.
14029 (expand_omp_for_static_chunk): Likewise.
14030
14031 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14032 Jean Lee <xiaoyur347@gmail.com>
14033
14034 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14035 (TARGET_ASAN_SHADOW_OFFSET): Define.
14036 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14037 true for -fsanitize=address.
14038
14039 2018-04-25 Mark Wielaard <mark@klomp.org>
14040
14041 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14042 shorter ones.
14043
14044 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14045
14046 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14047 than "alu", remove explicit "memory" and "imm_disp" attributes.
14048 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14049
14050 PR middle-end/85414
14051 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14052 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14053 gen_lowpart_no_emit.
14054
14055 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14056
14057 PR target/85473
14058 * config/i386/i386.c (ix86_expand_builtin): Change memory
14059 operand to XI, extend p0 to Pmode.
14060 * config/i386/i386.md: Change unspec volatile and operand
14061 1 mode to XI, change operand 0 mode to P.
14062
14063 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14064
14065 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14066 GET_MODE_MASK before any checking.
14067 (nds32_can_use_bset_p): Likewise.
14068 (nds32_can_use_btgl_p): Likewise.
14069
14070 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14071
14072 * config/nds32/nds32-doubleword.md: New define_split pattern for
14073 illegal register number.
14074
14075 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14076
14077 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14078
14079 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14080
14081 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14082
14083 2018-04-25 Richard Biener <rguenther@suse.de>
14084
14085 * lto-streamer.h (LTO_major_version): Bump to 8.
14086
14087 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14088
14089 * BASE-VER: Set to 9.0.0.
14090
14091 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14092
14093 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14094 in __abskf2 and __powikf2.
14095
14096 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14097
14098 PR target/85512
14099 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14100 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14101 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14102 Use the above on operand 2. Reindent.
14103 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14104
14105 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14106
14107 PR target/85485
14108 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14109 handle OPT_mcet.
14110 * config/i386/i386.opt (mcet): Removed.
14111 * doc/install.texi: Remove -mcet documentation.
14112 * doc/invoke.texi: Likewise.
14113
14114 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14115
14116 PR target/85485
14117 * doc/install.texi: Remove -mcet from bootstrap-cet.
14118
14119 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14120
14121 PR target/85511
14122 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14123 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14124 if TARGET_64BIT.
14125
14126 PR target/85503
14127 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14128 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14129 containing a CONST_VECTOR.
14130
14131 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14132
14133 * doc/install.texi: Update newlib dependency for nvptx.
14134
14135 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14136
14137 PR target/85508
14138 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14139 instead of INTVAL when shifting x left.
14140
14141 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14142
14143 PR tree-optimization/85478
14144 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14145 vect_grouped_store_supported for single element vectors.
14146
14147 2018-04-24 Richard Biener <rguenther@suse.de>
14148
14149 PR target/85491
14150 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14151 load cost increase to the case of non-constant step.
14152
14153 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14154
14155 PR target/84828
14156 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14157 destination if any_malformed_asm.
14158
14159 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14160
14161 PR middle-end/85496
14162 * expr.c (store_field): In the bitfield case, if the value comes from
14163 a function call and is returned in registers by means of a PARALLEL,
14164 do not change the mode of the temporary unless BLKmode and VOIDmode.
14165
14166 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14167
14168 PR rtl-optimization/85423
14169 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14170 dependencies to debug insns when the previous insn is non-debug.
14171
14172 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14173
14174 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14175 enums into a single definition.
14176 (fls): Fix predicates and printing.
14177 (seti): Likewise.
14178
14179 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14180
14181 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14182 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14183 and short u6 immediate.
14184 (check_if_valid_sleep_operand): Remove.
14185 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14186
14187 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14188
14189 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14190 flag_always_save_lp condition.
14191 * config/nds32/nds32.opt (malways-save-lp): New option.
14192
14193 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14194
14195 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14196 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14197 * config/nds32/nds32.h
14198 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14199 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14200
14201 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14202
14203 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14204 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14205
14206 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14207 Chung-Ju Wu <jasonwucj@gmail.com>
14208
14209 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14210 Declare.
14211 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14212 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14213
14214 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14215
14216 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14217
14218 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14219
14220 * config/nds32/nds32-protos.h (nds32_data_alignment,
14221 nds32_local_alignment): Declare.
14222 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14223 nds32_local_alignment): New functions.
14224 (TARGET_CONSTANT_ALIGNMENT): Define.
14225 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14226
14227 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14228
14229 * config/nds32/nds32.c
14230 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14231 (TARGET_MODES_TIEABLE_P): Likewise.
14232
14233 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14234
14235 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14236 level Ofast and Og.
14237
14238 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14239 Chung-Ju Wu <jasonwucj@gmail.com>
14240
14241 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14242 for unaligned access.
14243 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14244 unaligned access.
14245 * config/nds32/nds32-intrinsic.md: Likewise.
14246 * config/nds32/nds32_intrinsic.h: Likewise.
14247 * config/nds32/nds32.h (nds32_builtins): Likewise.
14248 * config/nds32/nds32.opt (munaligned-access): New option.
14249 * config/nds32/nds32.c (nds32_asm_file_start): Display
14250 flag_unaligned_access status.
14251
14252 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14253
14254 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14255 -mno-relax is present.
14256 * config/riscv/linux.h (LINK_SPEC): Ditto.
14257
14258 2018-04-20 Martin Sebor <msebor@redhat.com>
14259
14260 PR c/85365
14261 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14262 for null pointers.
14263 (gimple_fold_builtin_stxcpy_chk): Same.
14264 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14265
14266 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14267
14268 PR target/85456
14269 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14270 __powikf2 when long double is IEEE 128-bit.
14271
14272 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14273
14274 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14275 step to make sure stack always aligned.
14276
14277 2018-04-20 Carl Love <cel@us.ibm.com>
14278
14279 PR target/83402
14280 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14281 size check for arg0.
14282
14283 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14284 Tom de Vries <tom@codesourcery.com>
14285
14286 PR target/85445
14287 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14288 Emit insns for calls too.
14289 (nvptx_find_par): Always look for worker-level predecessor insn.
14290 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14291 calls.
14292 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14293 (nvptx_process_pars): Propagate frames for calls.
14294
14295 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14296
14297 PR target/85469
14298 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14299 Removed.
14300 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14301 (ix86_handle_option): Don't handle OPT_mibt.
14302 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14303 __SHSTK__.
14304 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14305 has_ibt and ibt.
14306 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14307 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14308 (ix86_target_macros): Define __CET__ with flag_cf_protection
14309 for -fcf-protection.
14310 * config/i386/i386.c (isa2_opts): Remove -mibt.
14311 * config/i386/i386.h (TARGET_IBT): Removed.
14312 (TARGET_IBT_P): Likewise.
14313 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14314 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14315 * config/i386/i386.opt (mcet): Update help message.
14316 (mshstk): Likewise.
14317 (mibt): Removed.
14318 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14319 -mcet as an alias for -mshstk.
14320
14321 2018-04-20 Richard Biener <rguenther@suse.de>
14322
14323 PR middle-end/85475
14324 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14325 complexity by forcing a single use of the multiply operand.
14326
14327 2018-04-20 Martin Jambor <mjambor@suse.cz>
14328
14329 ipa/85449
14330 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14331 recursion dependency to only apply to non-clones.
14332
14333 2018-04-20 Martin Jambor <mjambor@suse.cz>
14334
14335 ipa/85447
14336 * ipa-cp.c (create_specialized_node): Check that clones of
14337 self-recursive edges exist during IPA-CP.
14338
14339 2018-04-19 Toon Moene <toon@moene.org>
14340
14341 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14342 by -O3.
14343
14344 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14345
14346 PR tree-optimization/85467
14347 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14348 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14349 VECTOR_CST element to type.
14350
14351 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14352
14353 PR target/85397
14354 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14355 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14356 (builtin_longjmp): Likewise.
14357 (save_stack_nonlocal): New pattern.
14358 (restore_stack_nonlocal): Likewise.
14359
14360 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14361
14362 PR target/85404
14363 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14364 Replace ASM_OUTPUT_LABEL with fprintf.
14365
14366 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14367
14368 PR target/85417
14369 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14370 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14371 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14372 define __IBT__ and __SHSTK__ for -fcf-protection.
14373 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14374 TARGET_IBT.
14375 (ix86_trampoline_init): Likewise.
14376 (x86_output_mi_thunk): Likewise.
14377 (ix86_notrack_prefixed_insn_p): Likewise.
14378 (ix86_option_override_internal): Don't disallow -fcf-protection.
14379 * config/i386/i386.md (rdssp<mode>): Also enable for
14380 -fcf-protection.
14381 (incssp<mode>): Likewise.
14382 (nop_endbr): Likewise.
14383 * config/i386/i386.opt (mcet): Change help message to built-in
14384 functions only.
14385 (mibt): Likewise.
14386 (mshstk): Likewise.
14387 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14388 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14389 enable CET built-in functions.
14390
14391 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14392
14393 * common/config/i386/i386-common.c
14394 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14395 OPTION_MASK_ISA_MOVDIRI_UNSET,
14396 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14397 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14398 * config.gcc (movdirintrin.h): New header.
14399 * config/i386/cpuid.h (bit_MOVDIRI,
14400 bit_MOVDIR64B): New bits.
14401 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14402 and -mmvodir64b.
14403 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14404 (VOID, PVOID, PCVOID)): New function types.
14405 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14406 __builtin_ia32_directstoreu_u64,
14407 __builtin_ia32_movdir64b): New builtins.
14408 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14409 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14410 and -mmovdiri.
14411 (ix86_valid_target_attribute_inner_p): Ditto.
14412 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14413 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14414 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14415 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14416 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14417 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14418 (movdiri<mode>, movdir64b_<mode>): New.
14419 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14420 * config/i386/immintrin.h: Include movdirintrin.h.
14421 * config/i386/movdirintrin.h: New file.
14422 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14423
14424 2018-04-19 Richard Biener <rguenther@suse.de>
14425
14426 PR middle-end/85455
14427 * cfg.c (clear_bb_flags): When loop state says we have
14428 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14429
14430 2018-04-19 Richard Biener <rguenther@suse.de>
14431
14432 PR tree-optimization/84737
14433 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14434 copying restrict info.
14435 (vect_setup_realignment): Use it.
14436 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14437 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14438 the first DR to all generated stores.
14439 (vectorizable_load): Likewise for loads.
14440
14441 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14442
14443 PR tree-optimization/85446
14444 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14445 the integral and pointer types to have the same precision.
14446
14447 * doc/install.texi: Document --disable-cet being the default and
14448 --enable-cet=auto.
14449
14450 2018-04-18 Martin Liska <mliska@suse.cz>
14451
14452 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14453 style.
14454
14455 2018-04-18 Martin Liska <mliska@suse.cz>
14456
14457 Revert
14458 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14459
14460 PR ipa/83983
14461 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14462 arguments if they are comparable.
14463
14464 2018-04-18 Martin Liska <mliska@suse.cz>
14465
14466 Revert
14467 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14468
14469 PR lto/84805
14470 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14471 incomplete types.
14472
14473 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14474
14475 PR target/85388
14476 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14477 ENDBR after calling __morestack.
14478
14479 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14480
14481 PR jit/85384
14482 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14483 by using gcc_base_ver to generate a gcc_driver_version, and use
14484 it when generating GCC_DRIVER_NAME.
14485 * configure: Regenerate.
14486
14487 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14488
14489 PR target/81084
14490 * config.gcc: Obsolete powerpc*-*-*spe*.
14491
14492 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14493
14494 PR debug/84637
14495 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14496 (stabstr_D): Change type of unum from unsigned int to
14497 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14498 type.
14499
14500 2018-04-17 Jim Wilson <jimw@sifive.com>
14501
14502 PR 84856
14503 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14504 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14505 Set arg_pointer_offset after using pretend_args_size.
14506
14507 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14508
14509 PR rtl-optimization/85431
14510 * dse.c (record_store): Ignore zero width stores.
14511
14512 PR sanitizer/85230
14513 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14514 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14515 __builtin_stack_restore rather than after it.
14516 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14517 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14518 argument instead of virtual_dynamic_stack_rtx.
14519
14520 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14521
14522 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14523 New prototype.
14524 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14525 Add note to error message to explain internal mapping of overloaded
14526 built-in function name to non-overloaded built-in function name.
14527 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14528 function.
14529
14530 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14531
14532 PR target/85424
14533 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14534 where the inputs overlap with the output.
14535
14536 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14537
14538 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14539 (=v, v) alternative and explicit "memory" attribute.
14540 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14541 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14542 attributes.
14543 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14544 "sselog1" type instead of "sselog".
14545 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14546 "sselog". Remove explicit "memory" attribute.
14547 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14548 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14549 attributes.
14550 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14551 "sselog1" type instead of "sselog". Remove explicit "memory"
14552 attribute.
14553 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14554 use "sselog1" type instead of "sselog". Remove explicit "memory"
14555 attribute.
14556 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14557 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14558 attributes.
14559 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14560 "sselog1" type instead of "sselog". Remove explicit "memory"
14561 attribute.
14562 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14563 use "sselog1" type instead of "sselog". Remove explicit "memory"
14564 attribute.
14565
14566 PR target/85430
14567 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14568
14569 PR middle-end/85414
14570 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14571 on a SUBREG.
14572
14573 2018-04-17 Martin Jambor <mjambor@suse.cz>
14574
14575 PR ipa/85421
14576 * ipa-cp.c (create_specialized_node): Call
14577 expand_all_artificial_thunks if necessary.
14578
14579 2018-04-17 Martin Liska <mliska@suse.cz>
14580
14581 PR lto/85405
14582 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14583 in message, remote space in between '_G' and '('.
14584
14585 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14586
14587 PR target/85281
14588 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14589 avx512f_vmcmp<mode>3<round_saeonly_name>,
14590 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14591 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14592 avx512f_rndscale<mode><round_saeonly_name>,
14593 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14594 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14595 Use %<iptr>2 instead of %2 for -masm=intel.
14596 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14597 avx512f_vcvttss2usi<round_saeonly_name>,
14598 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14599 -masm=intel.
14600 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14601 avx512f_vcvttsd2usi<round_saeonly_name>,
14602 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14603 Use %q1 instead of %1 for -masm=intel.
14604 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14605 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14606 of %3 for -masm=intel.
14607 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14608 -masm=intel.
14609 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14610 -masm=intel.
14611 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14612 -masm=intel.
14613 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14614 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14615 %g1.
14616 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14617 -masm=intel.
14618 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14619 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14620 %g1 and one with %0 and %1.
14621 (avx512er_vmrcp28<mode><round_saeonly_name>,
14622 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14623 %1 for -masm=intel.
14624 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14625 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14626 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14627 of %0 and %{%4%} for -masm=intel.
14628 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14629 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14630 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14631 order of %0 and %{%5%}%{z%} for -masm=intel.
14632
14633 2018-04-17 Jan Hubicka <jh@suse.cz>
14634
14635 PR lto/85405
14636 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14637
14638 2018-04-17 Martin Liska <mliska@suse.cz>
14639
14640 PR ipa/85329
14641 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14642 for target_clone error message. Make default implementation
14643 clone to be a local declaration.
14644 (separate_attrs): Add new argument and check for an empty
14645 string.
14646 (expand_target_clones): Handle it.
14647 (ipa_target_clone): Make redirection just for target_clones
14648 functions.
14649
14650 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14651 Tom de Vries <tom@codesourcery.com>
14652
14653 PR middle-end/84955
14654 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14655 tiled basic blocks without omp continue statements.
14656
14657 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14658
14659 PR target/83660
14660 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14661 vec_extract expression as having side effects to make sure it gets
14662 a cleanup point.
14663
14664 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14665
14666 PR target/85403
14667 * config/i386/i386.c (get_builtin_code_for_version): Check
14668 error_mark_node.
14669
14670 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14671
14672 PR target/84331
14673 * config.gcc: Support "skylake".
14674 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14675 PROCESSOR_SKYLAKE.
14676 * config/i386/i386.c (m_SKYLAKE): Define.
14677 (processor_target_table): Add "skylake".
14678 (ix86_option_override_internal): Add "skylake".
14679 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14680 PROCESSOR_CANNONLAKE.
14681 (get_builtin_code_for_version): Fix priority for
14682 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14683 PROCESSOR_SKYLAKE-AVX512.
14684 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14685 (processor_type): Add PROCESSOR_SKYLAKE.
14686
14687 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14688 Jason Merrill <jason@redhat.com>
14689
14690 PR c++/85112
14691 * convert.c (convert_to_integer_1): Use direct recursion for
14692 enumeral types and types with a precision less than the number
14693 of bits in their mode.
14694
14695 2018-04-16 Julia Koval <julia.koval@intel.com>
14696
14697 PR target/84413
14698 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14699 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14700
14701 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14702
14703 PR target/85293
14704 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14705 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14706 and -mno-direct-move.
14707
14708 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14709
14710 PR target/83402
14711 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14712 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14713 Ensure negative shifts result in {0}.
14714
14715 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14716
14717 PR rtl-optimization/79916
14718 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14719 regs (if any) to define how to gnerate SD moves when LRA is in
14720 progress.
14721
14722 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14723
14724 PR rtl-optimization/85393
14725 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14726 * except.c (expand_dw2_landing_pad_for_region): Make static.
14727 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14728 a label and unconditional jump to old_bb, rather than
14729 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14730 basic block.
14731
14732 PR rtl-optimization/85376
14733 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14734 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14735 instead of a specific value.
14736
14737 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14738 Bin Cheng <bin.cheng@arm.com>
14739
14740 PR tree-optimization/82965
14741 PR tree-optimization/83991
14742 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14743 by_profile_only parameter.
14744 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14745 information if the loop was predicted to iterate too many times.
14746 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14747
14748 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14749
14750 PR lto/71991
14751 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14752 always inline.
14753
14754 2018-04-13 Martin Liska <mliska@suse.cz>
14755 Jakub Jelinek <jakub@redhat.com>
14756
14757 PR middle-end/81657
14758 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14759 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14760 * builtins.c (expand_builtin_memory_copy_args): Use
14761 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14762 handle dest_addr == pc_rtx.
14763
14764 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14765
14766 PR target/85291
14767 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14768 asked to not generate direct moves.
14769 (fix_trunc<mode>si2_stfiwx): Similar.
14770 (fix_trunc<mode>si2_internal): Similar.
14771
14772 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14773
14774 PR debug/83157
14775 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14776 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14777 lookup if dest in some wider mode is known to be const0_rtx and
14778 if so, record permanent equivalence for it to be ZERO_EXTEND of
14779 the narrower mode destination.
14780
14781 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14782
14783 * lto-streamer-out.c (output_function): Revert 259346.
14784 * omp-expand.c (expand_oacc_for): Likewise.
14785
14786 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14787
14788 PR rtl-optimization/85354
14789 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14790 * sel-sched.c (sel_global_init): ... here.
14791
14792 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14793
14794 PR target/85238
14795 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14796 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14797 mode for PE-COFF targets.
14798 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14799 (i386_pe_asm_lto_end): Likewise.
14800 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14801 (TARGET_ASM_LTO_END): Likewise.
14802 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14803 (i386_pe_asm_lto_start): New function.
14804 (i386_pe_asm_lto_end): Likewise.
14805
14806 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14807 Richard Biener <rguenther@suse.de>
14808
14809 PR middle-end/84955
14810 * lto-streamer-out.c (output_function): Fix CFG loop state before
14811 streaming out.
14812 * omp-expand.c (expand_oacc_for): Handle calls to internal
14813 functions like regular functions.
14814
14815 2018-04-12 Richard Biener <rguenther@suse.de>
14816
14817 PR lto/85371
14818 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14819 for the early LTO debug to properly generate references to it
14820 during DIE emission. Do not re-use that for the skeleton for
14821 split-dwarf.
14822 (dwarf2out_early_finish): Likewise.
14823
14824 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14825
14826 PR target/85328
14827 * config/i386/sse.md
14828 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14829 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14830 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14831 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14832 and output is a reg, avoid creating invalid lowpart subreg, but
14833 instead split into a 512-bit move. Don't split if not AVX512VL,
14834 input is xmm16+ reg and output is a mem.
14835 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14836 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14837 xmm16+ reg and output is a mem.
14838
14839 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14840
14841 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14842 also for flag_dwarf2_cfi_asm.
14843
14844 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14845
14846 PR rtl-optimization/85342
14847 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14848 a bool scalar var inside of the loop instead. Don't try to update
14849 recog_data.operand after failed apply_change_group.
14850
14851 2018-04-12 Tom de Vries <tom@codesourcery.com>
14852
14853 PR target/85296
14854 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14855 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14856 array with flexible array member as array without given dimension.
14857 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14858 argument for undefined param to true.
14859
14860 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14861
14862 PR target/85321
14863 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14864 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14865 from PowerPC section.
14866 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14867 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14868 help text that is too long.
14869 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14870 help text that is too long.
14871 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14872 help text that is too long.
14873
14874 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14875
14876 * config/alpha/alpha.md (stack_probe_internal): Rename
14877 from "probe_stack". Update all callers.
14878
14879 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14880
14881 PR rtl-optimization/84566
14882 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14883 sched_macro_fuse_insns.
14884
14885 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14886
14887 PR target/84301
14888 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14889 (compute_block_dependences): ... from here.
14890
14891 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14892
14893 PR tree-optimization/85331
14894 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14895 from int to HOST_WIDE_INT.
14896
14897 2018-04-11 Martin Jambor <mjambor@suse.cz>
14898
14899 PR ipa/84149
14900 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14901 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14902 not the same as the source val.
14903 (cgraph_edge_brings_value_p): New parameter.
14904 (gather_edges_for_value): Pass destination value to
14905 cgraph_edge_brings_value_p.
14906 (perhaps_add_new_callers): Likewise.
14907 (get_info_about_necessary_edges): Likewise and exclude values brought
14908 only by self-recursive edges.
14909 (create_specialized_node): Redirect only clones of self-calling edges.
14910 (+self_recursive_pass_through_p): New function.
14911 (find_more_scalar_values_for_callers_subset): Use it.
14912 (find_aggregate_values_for_callers_subset): Likewise.
14913 (known_aggs_to_agg_replacement_list): Removed.
14914 (decide_whether_version_node): Re-calculate known constants for all
14915 remaining context clones.
14916
14917 2018-04-11 Richard Biener <rguenther@suse.de>
14918
14919 PR lto/85339
14920 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14921 from early DWARF output.
14922 (dwarf2out_early_finish): Output line info unconditionally into
14923 early DWARF and add reference to it.
14924
14925 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14926
14927 PR target/85281
14928 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14929 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14930 other than V2DFmode using iptr mode attribute.
14931 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14932
14933 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14934
14935 PR rtl-optimization/84659
14936 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14937
14938 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14939
14940 PR debug/85302
14941 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14942 SIZEP is NULL.
14943 (output_loc_list): Pass address of a dummy size variable even in the
14944 locview handling loop.
14945 (index_location_lists): Add comment on why skip_loc_list_entry can't
14946 call size_of_locs.
14947
14948 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14949
14950 PR target/85261
14951 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14952 into register.
14953
14954 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14955
14956 PR target/85321
14957 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14958 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14959 and -mstring-compare-inline-limit.
14960
14961 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14962
14963 PR target/85287
14964 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14965 for stack clash protection in a register whenever we need it to be in
14966 a register.
14967
14968 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14969
14970 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14971 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14972
14973 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14974
14975 PR target/85321
14976 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14977 the help text.
14978 (mlong-double-): Ditto.
14979 * config/rs6000/sysv4.opt (msdata=): Ditto.
14980 (mtls-size=): Ditto.
14981
14982 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14983
14984 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14985 erroneous entries for
14986 "vector int vec_ldl (int, long int *)", and
14987 "vector unsigned int vec_ldl (int, unsigned long int *)".
14988 Add comments and entries for
14989 "vector bool char vec_ldl (int, bool char *)",
14990 "vector bool short vec_ldl (int, bool short *)",
14991 "vector bool int vec_ldl (int, bool int *)",
14992 "vector bool long long vec_ldl (int, bool long long *)",
14993 "vector pixel vec_ldl (int, pixel *)",
14994 "vector long long vec_ldl (int, long long *)",
14995 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14996 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14997 type tree bool_long_long_type_node and correct definition of
14998 bool_V2DI_type_node to make reference to this new type tree.
14999 (rs6000_mangle_type): Replace erroneous reference to
15000 bool_long_type_node with bool_long_long_type_node.
15001 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15002 comments to emphasize sign distinctions for char and int types and
15003 replace RS6000_BTI_bool_long constant with
15004 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15005 use of RS6000_BTI_pixel.
15006 (bool_long_type_node): Remove this macro definition.
15007 (bool_long_long_type_node): New macro definition
15008
15009 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15010
15011 PR rtl-optimization/85300
15012 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15013 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15014 simplify_unary_operation fails.
15015
15016 2018-04-10 Martin Liska <mliska@suse.cz>
15017
15018 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15019 cgraph_edge and ipa_ref.
15020
15021 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15022
15023 PR target/85177
15024 PR target/85255
15025 * config/i386/sse.md
15026 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15027 computation of the VEC_MERGE selector from mask.
15028 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15029 Fix decoding of the VEC_MERGE selector into mask.
15030
15031 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15032
15033 PR tree-optimization/85286
15034 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15035
15036 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15037
15038 * final.c (final_1): Set insn_last_address as well as
15039 insn_current_address.
15040
15041 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15042
15043 PR target/85173
15044 * explow.c (emit_stack_probe): Call validize_mem on memory location
15045 before passing it to gen_probe_stack. Create address operand and
15046 legitimize it for the probe_stack_address case.
15047
15048 2018-04-09 Jan Hubicka <jh@suse.cz>
15049
15050 PR lto/85078
15051 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15052 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15053 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15054 walk basetypes.
15055 (free_lang_data): Rebuild type inheritance graph.
15056
15057 2018-04-09 Martin Sebor <msebor@redhat.com>
15058
15059 * invoke.texi (-finline-small-functions): Mention other optimization
15060 options.
15061 (-findirect-inlining, -fpartial-inlining): Same.
15062 (-finline-functions-called-once): Same.
15063 (-freorder-blocks-and-partition): Same.
15064
15065 2018-04-09 Jan Hubicka <jh@suse.cz>
15066
15067 PR rtl/84058
15068 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15069 jumps; choose last target that matches the criteria (i.e.
15070 no partition changes for non-crossing jumps).
15071 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15072 support for redirecting crossing jumps to non-crossing.
15073
15074 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15075
15076 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15077 also for naked functions.
15078
15079 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15080
15081 * config/arc/arc.md (add_shift): New pattern.
15082 (add_shift2): Likewise.
15083 (sub_shift): Likewise.
15084 (sub_shift_cmp0_noout): Likewise.
15085 (compare_si_ashiftsi): Likewise.
15086 (xbfu_cmp0_noout): New combine pattern.
15087 (xbfu_cmp0"): Likewise.
15088 (movsi_set_cc_insn): Place the predicable variant first.
15089 (commutative_binary_cmp0_noout): Remove clobber.
15090 (commutative_binary_cmp0): New pattern.
15091 (noncommutative_binary_cmp0): Likewise.
15092 (noncommutative_binary_cmp0_noout): Likewise.
15093 (noncommutative_binary_comparison_result_used): Removed.
15094 (rsub_cmp0): New pattern.
15095 (rsub_cmp0_noout): Likewise.
15096 (extzvsi): Changed, keep only meaningful variants.
15097 (SQH, SEZ): New iterators.
15098 (SQH_postfix): New mode attribute.
15099 (SEZ_prefix): New code attribute.
15100 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15101 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15102 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15103 of numerical value.
15104 (noncommutative_operator): Check the availability of barrel
15105 shifter option.
15106
15107 2018-04-09 Richard Biener <rguenther@suse.de>
15108
15109 PR tree-optimization/85284
15110 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15111 Only use the niter constraining form of simple_iv when the exit
15112 is always executed.
15113
15114 2018-04-09 Tom de Vries <tom@codesourcery.com>
15115
15116 PR target/84041
15117 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15118 (define_expand "*memory_barrier"): New define_expand.
15119 (define_insn "memory_barrier"): New insn.
15120
15121 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15122
15123 PR rtl-optimization/80463
15124 PR rtl-optimization/83972
15125 PR rtl-optimization/83480
15126
15127 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15128 correct producer for the insn.
15129 (tidy_control_flow): Fixup seqnos in case of debug insns.
15130
15131 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15132
15133 PR rtl-optimization/83913
15134
15135 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15136 different sched-times when merging exprs.
15137
15138 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15139
15140 PR rtl-optimization/83962
15141
15142 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15143 tidy_fallthru_edge and tidy_control_flow.
15144
15145 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15146
15147 PR rtl-optimization/83530
15148
15149 * sel-sched.c (force_next_insn): New global variable.
15150 (remove_insn_for_debug): When force_next_insn is true, also leave only
15151 next insn in the ready list.
15152 (sel_sched_region): When the region wasn't scheduled, make another pass
15153 over it with force_next_insn set to 1.
15154
15155 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15156
15157 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15158 into tm_file.
15159 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15160 for interrupt control.
15161 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15162 functions for interrupt control.
15163 * config/nds32/nds32-intrinsic.md: Likewise.
15164 * config/nds32/nds32_intrinsic.h: Likewise.
15165 * config/nds32/nds32.h (nds32_builtins): Likewise.
15166
15167 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15168
15169 * config/nds32/nds32.c (nds32_init_machine_status,
15170 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15171 strict_aligned_p field.
15172 (nds32_expand_to_rtl_hook): New function.
15173 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15174 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15175
15176 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15177 Chung-Ju Wu <jasonwucj@gmail.com>
15178
15179 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15180 * config/nds32/nds32-n7.md: New file.
15181 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15182 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15183 pipeline.
15184 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15185 * config/nds32/nds32.md (pipeline_model): Add n7.
15186 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15187 * config/nds32/pipelines.md: Include n7 settings.
15188
15189 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15190 Chung-Ju Wu <jasonwucj@gmail.com>
15191
15192 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15193 * config/nds32/nds32-e8.md: New file.
15194 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15195 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15196 pipeline.
15197 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15198 * config/nds32/nds32.md (pipeline_model): Add e8.
15199 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15200 * config/nds32/pipelines.md: Include e8 settings.
15201
15202 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15203 Chung-Ju Wu <jasonwucj@gmail.com>
15204
15205 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15206 * config/nds32/nds32-n8.md: New file.
15207 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15208 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15209 pipeline.
15210 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15211 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15212 * config/nds32/nds32.md (pipeline_model): Add n8.
15213 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15214 * config/nds32/pipelines.md: Include n8 settings.
15215
15216 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15217 Chung-Ju Wu <jasonwucj@gmail.com>
15218
15219 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15220 * config/nds32/nds32-n9-2r1w.md: New file.
15221 * config/nds32/nds32-n9-3r2w.md: New file.
15222 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15223 nds32_register_ports): New or modify for cpu n9.
15224 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15225 pipeline.
15226 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15227 * config/nds32/nds32-utils.c: New file.
15228 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15229 TARGET_MUL_SLOW): Define.
15230 * config/nds32/nds32.md (pipeline_model): New attribute.
15231 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15232 New options that support cpu n9.
15233 * config/nds32/pipelines.md: Include n9 settings.
15234 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15235
15236 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15237
15238 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15239 information if necessary.
15240 (output_cond_branch_compare_zero): Likewise.
15241 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15242 (nds32_target_alignment): Refine for alignment.
15243 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15244 (FUNCTION_BOUNDARY): Modify.
15245 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15246 align case.
15247 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15248
15249 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15250
15251 * config/nds32/constants.md (unspec_volatile_element): Add values for
15252 TLB operation and data prefetch.
15253 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15254 functions for TLB operation and data prefetch.
15255 * config/nds32/nds32-intrinsic.md: Likewise.
15256 * config/nds32/nds32_intrinsic.h: Likewise.
15257 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15258 (nds32_print_operand): Likewise.
15259 * config/nds32/nds32.h (nds32_builtins): Likewise.
15260
15261 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15262 Andrew Pinski <pinsika@gcc.gnu.org>
15263
15264 PR middle-end/82976
15265 * match.pd: Use constant_boolean_node of correct type instead of
15266 boolean_true_node or boolean_false_node for simplifying
15267 pointer comparisons to zero.
15268
15269 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15270
15271 PR tree-optimization/80021
15272 * tree.c (verify_type_variant): Make error call in verify_variant_match
15273 translatable and remove final full stop.
15274
15275 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15276
15277 * config/nds32/constants.md (unspec_volatile_element): Add
15278 UNSPEC_VOLATILE_EH_RETURN.
15279 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15280 nds32_output_stack_pop): Support dwarf exception handling process.
15281 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15282 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15283 exception handling process.
15284 (nds32_compute_stack_frame): Likewise.
15285 (nds32_return_addr_rtx): Likewise.
15286 (nds32_initial_elimination_offset): Likewise.
15287 (nds32_expand_prologue): Likewise.
15288 (nds32_expand_epilogue): Likewise.
15289 (nds32_dynamic_chain_address): New function.
15290 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15291 exception handling.
15292 (DYNAMIC_CHAIN_ADDRESS): Define.
15293 (EH_RETURN_DATA_REGNO): Define.
15294 (EH_RETURN_STACKADJ_RTX): Define.
15295 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15296 patterns for dwarf exception handling.
15297
15298 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15299
15300 * config/nds32/nds32.h: Clean up obsolete macros.
15301
15302 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15303
15304 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15305 Add enum values for particular instructions.
15306 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15307 particular intrinsic functions.
15308 * config/nds32/nds32-intrinsic.md: Likewise.
15309 * config/nds32/nds32_intrinsic.h: Likewise.
15310 * config/nds32/nds32.h (nds32_builtins): Likewise.
15311 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15312 (btst, ave): New patterns for particular instructions.
15313
15314 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15315
15316 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15317 Add enum values for atomic load/store and memory sync.
15318 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15319 and memory sync.
15320 * config/nds32/nds32-intrinsic.md: Likewise.
15321 * config/nds32/nds32_intrinsic.h: Likewise.
15322 * config/nds32/nds32.h (nds32_builtins): Likewise.
15323
15324 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15325
15326 PR tree-optimization/85257
15327 * fold-const.c (native_encode_vector): If not all elts could fit
15328 and off is -1, return 0 rather than offset.
15329 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15330 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15331 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15332 adjust buffer in native_interpret_expr call.
15333
15334 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15335
15336 * config/nds32/constants.md (unspec_volatile_element): Add cache
15337 control enum values.
15338 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15339 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15340 * config/nds32/nds32.c (nds32_cctl_names): New.
15341 (nds32_print_operand): Handle cache control register names.
15342 * config/nds32/nds32.h (nds32_builtins): New enum values.
15343 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15344 macros.
15345 * config/nds32/nds32.md (type): Add mmu.
15346 * config/nds32/pipelines.md (simple_insn): Add mmu.
15347
15348 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15349
15350 * config/nds32/nds32.md (type): Remove call.
15351 * config/nds32/pipelines.md (simple_insn): Likewise.
15352
15353 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15354
15355 * config/nds32/constants.md (unspec_volatile_element): Add
15356 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15357 UNSPEC_VOLATILE_FMFCFG.
15358 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15359 description for fmfcfg and fmfcsr.
15360 (bdesc_1arg): Add fmtcsr.
15361 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15362 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15363 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15364 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15365 unspec_fmfcfg): New patterns.
15366 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15367 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15368 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15369 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15370 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15371 __nds32__fmfcfg): Define.
15372
15373 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15374
15375 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15376 intrinsic register names.
15377 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15378 intrinsic register enum values and macros.
15379
15380 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15381
15382 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15383 for load/store addressing form.
15384 (nds32_print_operand_address): Likewise.
15385
15386 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15387
15388 PR target/85196
15389 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15390 based on LABEL_REF. Remove useless assertion.
15391 (pic_address_needs_scratch): Fix formatting.
15392 (sparc_legitimize_pic_address): Minor tweaks.
15393 (sparc_delegitimize_address): Adjust assertion accordingly.
15394 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15395 into symbolic_operand.
15396 (movsi_high_pic_label_ref): Likewise.
15397 (movsi_lo_sum_pic_label_ref): Likewise.
15398 (movdi_pic_label_ref): Likewise.
15399 (movdi_high_pic_label_ref): Likewise.
15400 (movdi_lo_sum_pic_label_ref): Likewise.
15401
15402 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15403
15404 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15405 custom LIB_SPEC setup.
15406
15407 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15408 Kito Cheng <kito.cheng@gmail.com>
15409
15410 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15411 * config/riscv/freebsd.h: New.
15412
15413 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15414
15415 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15416 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15417 file.
15418
15419 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15420 Kito Cheng <kito.cheng@gmail.com>
15421
15422 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15423 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15424 * config/nds32/nds32-protos.h (nds32_output_call,
15425 nds32_output_return): Declare.
15426 * config/nds32/nds32.md: Refine all the call and return patterns.
15427
15428 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15429
15430 PR debug/85252
15431 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15432 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15433
15434 PR rtl-optimization/84872
15435 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15436 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15437 EDGE_CROSSING edge.
15438
15439 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15440
15441 * expr.c (copy_blkmode_to_reg): Revert 254862.
15442 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15443
15444 2018-04-06 Richard Biener <rguenther@suse.de>
15445
15446 PR middle-end/85244
15447 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15448 after seeing a component reference with an adjacent field. Treat
15449 refs to arrays at struct end of external decls similar to
15450 refs to unconstrained commons.
15451
15452 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15453
15454 PR sanitizer/85213
15455 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15456 look through SAVE_EXPRs with non-side-effects argument. Adjust
15457 recursive calls.
15458 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15459 save_p here.
15460
15461 2018-04-06 Richard Biener <rguenther@suse.de>
15462
15463 PR middle-end/85180
15464 * alias.c (find_base_term): New wrapper around find_base_term
15465 unwinding CSELIB_VAL_PTR changes.
15466 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15467 recursion.
15468
15469 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15470
15471 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15472 instructions.
15473 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15474 constant definitions.
15475 ("nop"): lr 0,0 -> nopr r0
15476 ("nop_lr0", "nop_lr1"): New insn definitions.
15477
15478 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15479
15480 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15481 NDS32_V3PUSH_AVAILABLE_P macro.
15482
15483 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15484 Chung-Ju Wu <jasonwucj@gmail.com>
15485
15486 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15487 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15488 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15489 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15490 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15491 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15492 * config/nds32/constraints.md: New constraints and checking for hard
15493 float configuration.
15494 * config/nds32/iterators.md: New mode iterator and attribute for hard
15495 float configuration.
15496 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15497 patterns.
15498 * config/nds32/nds32-fpu.md: New file.
15499 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15500 deal with hard float code generation.
15501 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15502 ARCH_V3S.
15503 (abi_type, float_reg_number): New enum type.
15504 * config/nds32/nds32-predicates.c: New predicates for hard float.
15505 * config/nds32/nds32-protos.h: Declare functions for hard float.
15506 * config/nds32/nds32.c: Implementation for hard float configuration.
15507 * config/nds32/nds32.h: Definitions for hard float configuration.
15508 * config/nds32/nds32.md: Include hard float machine description and
15509 modify patterns for hard float configuration.
15510 * config/nds32/nds32.opt: New options for hard float configuration.
15511 * config/nds32/predicates.md: New predicates for hard float
15512 configuration.
15513
15514 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15515
15516 * common/config/nds32/nds32-common.c
15517 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15518
15519 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15520
15521 PR middle-end/85195
15522 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15523 CONSTRUCTOR_ELT (ctor, ...)->value.
15524
15525 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15526
15527 PR target/85193
15528 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15529
15530 2018-04-05 Tom de Vries <tom@codesourcery.com>
15531
15532 PR target/85204
15533 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15534 cond jump.
15535
15536 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15537 Kito Cheng <kito.cheng@gmail.com>
15538
15539 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15540 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15541 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15542 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15543
15544 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15545 Kito Cheng <kito.cheng@gmail.com>
15546
15547 * config/nds32/constraints.md (Ufe): New memory constraint.
15548 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15549 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15550 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15551 operands.
15552 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15553 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15554
15555 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15556
15557 * config/nds32/nds32.md: Use optimize_size in the condition for
15558 alu-shift instructions.
15559
15560 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15561
15562 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15563
15564 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15565
15566 * config/nds32/nds32.md (negsi2): Refine pattern.
15567
15568 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15569 Chung-Ju Wu <jasonwucj@gmail.com>
15570
15571 * config/nds32/iterators.md (shift_rotate): New code iterator.
15572 (shift): New code attribute.
15573 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15574 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15575 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15576 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15577 bit-wise operations.
15578 (andsi3, *andsi3): Ditto.
15579 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15580 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15581 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15582 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15583 nds32_ior_operand, nds32_xor_operand): New predicates.
15584
15585 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15586
15587 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15588 (addsi3, subsi3): ... this.
15589
15590 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15591
15592 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15593
15594 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15595
15596 * config/nds32/nds32.md: Adjust indention.
15597
15598 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15599
15600 * config/nds32/nds32.md (feature): New attribute.
15601
15602 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15603
15604 * config/nds32/nds32.md (subtype): New attribute.
15605
15606 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15607
15608 PR target/85203
15609 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15610 expansion to perform a bitwise AND of the argument followed by a
15611 boolean negation of the result.
15612
15613 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15614
15615 PR rtl-optimization/84878
15616 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15617 the basic block. Assert the use reference is not artificial and that
15618 it has an associated insn.
15619
15620 2018-04-04 Michael Matz <matz@suse.de>
15621
15622 * builtins.c (compute_objsize): Pass correct operand
15623 to array_at_struct_end_p.
15624
15625 2018-04-04 Richard Biener <rguenther@suse.de>
15626
15627 PR lto/85176
15628 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15629 from contexts for DINFO_LEVEL_TERSE and below.
15630
15631 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15632
15633 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15634 resiter_operand condition.
15635 * config/nds32/nds32.md (*move<mode>): Ditto.
15636
15637 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15638 Monk Chiang <sh.chiang04@gmail.com>
15639
15640 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15641
15642 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15643
15644 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15645
15646 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15647 Kito Cheng <kito.cheng@gmail.com>
15648
15649 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15650 nds32_cond_code_str, output_cond_branch,
15651 output_cond_branch_compare_zero, nds32_expand_cbranch,
15652 nds32_expand_cstore, nds32_expand_movcc,
15653 nds32_output_cbranchsi4_equality_zero,
15654 nds32_output_cbranchsi4_equality_reg,
15655 nds32_output_cbranchsi4_equality_reg_or_const_int,
15656 nds32_output_cbranchsi4_greater_less_zero: New functions.
15657 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15658 nds32_expand_cstore, nds32_expand_movcc,
15659 nds32_output_cbranchsi4_equality_zero,
15660 nds32_output_cbranchsi4_equality_reg,
15661 nds32_output_cbranchsi4_equality_reg_or_const_int,
15662 nds32_output_cbranchsi4_greater_less_zero): Declare.
15663 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15664 nds32_rimm11s_operand): New predicates.
15665 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15666 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15667 patterns.
15668
15669 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15670
15671 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15672 * config/nds32/nds32.md: Ditto.
15673 * config/nds32/pipelines.md: Ditto.
15674
15675 2018-04-04 Richard Biener <rguenther@suse.de>
15676
15677 PR tree-optimization/85168
15678 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15679 propagating abnormals.
15680
15681 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15682
15683 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15684
15685 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15686 Kito Cheng <kito.cheng@gmail.com>
15687
15688 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15689 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15690 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15691 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15692 * config/nds32/nds32.md (sibcall_internal): New.
15693 (sibcall_register): Remove.
15694 (sibcall_immediate): Remove.
15695 (sibcall_value_internal): New.
15696 (sibcall_value_register): Remove.
15697 (sibcall_value_immediate): Remove.
15698 * config/nds32/predicates.md (nds32_general_register_operand): New.
15699 (nds32_call_address_operand): New.
15700
15701 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15702
15703 PR rtl-optimization/85167
15704 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15705 bb_defs if *split_p, instead preinitialize it to NULL.
15706
15707 PR tree-optimization/85156
15708 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15709 evaluating the argument multiple times.
15710
15711 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15712
15713 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15714 than vector.
15715 (_mm_cvtpd_ps): Likewise.
15716 (_mm_cvttpd_epi32): Likewise.
15717 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15718 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15719 vector, pixel, and bool following altivec.h include.
15720
15721 2018-04-03 Martin Sebor <msebor@redhat.com>
15722
15723 * doc/extend.texi (Common Function Attributes): Clarify.
15724 (const attribute): Likewise.
15725 (pure attribute): Likewise.
15726
15727 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15728
15729 PR target/85169
15730 * config/i386/i386.c (ix86_expand_vector_set): Use
15731 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15732
15733 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15734
15735 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15736 instructions when changing rounding bits to preserve precision bits
15737 in the x87 control word.
15738
15739 2018-04-03 Martin Liska <mliska@suse.cz>
15740
15741 PR tree-optimization/82491
15742 * rtl.h (strip_offset_and_add): Replace += suboffset with
15743 poly_uint64 () + suboffset.
15744
15745 2018-03-29 Martin Liska <mliska@suse.cz>
15746 Martin Jambor <mjambor@suse.cz>
15747
15748 PR ipa/84947
15749 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15750 param_type is not an integral or pointer type.
15751
15752 2018-04-03 Richard Biener <rguenther@suse.de>
15753
15754 * sese.h (recompute_all_dominators): Remove.
15755
15756 2018-04-02 Martin Sebor <msebor@redhat.com>
15757
15758 * doc/invoke.texi (-Wrestrict): Fix typos.
15759
15760 2018-04-02 Jim Wilson <jimw@sifive.com>
15761
15762 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15763 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15764 (<optab>di3, <optab>si3_extend): Likewise.
15765 (<optab>si3_mask, <optab>si3_mask_1): New.
15766 (<optab>di3_mask, <optab>di3_mask_1): New.
15767 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15768 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15769 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15770
15771 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15772
15773 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15774 example.
15775
15776 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15777
15778 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15779 (nds32_canonicalize_comparison): New function.
15780
15781 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15782 Kito Cheng <kito.cheng@gmail.com>
15783 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15784
15785 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15786 * config/nds32/constants.md (unspec_volatile_element): Add
15787 UNSPEC_VOLATILE_RELAX_GROUP.
15788 * config/nds32/nds32-relax-opt.c: New file.
15789 * config/nds32/nds32-predicates.c
15790 (nds32_symbol_load_store_p): New function.
15791 * config/nds32/nds32-protos.h
15792 (nds32_symbol_load_store_p): Declare function.
15793 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15794 * config/nds32/nds32.c
15795 (nds32_register_pass): New function to register pass.
15796 (nds32_register_passes): New function to register passes.
15797 * config/nds32/nds32.md (relax_group): New pattern.
15798 * config/nds32/nds32.opt (mrelax-hint): New option.
15799 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15800
15801 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15802
15803 * config/nds32/t-nds32: Modify files dependency.
15804
15805 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15806
15807 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15808 (PROFILE_HOOK): Define its implementation.
15809
15810 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15811
15812 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15813 type and 32-bit size.
15814
15815 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15816
15817 PR middle-end/85090
15818 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15819 (V_128_256): New mode iterator.
15820 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15821 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15822 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15823 of V.
15824 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15825 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15826
15827 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15828
15829 PR target/83315
15830 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15831 NaN inputs correctly.
15832
15833 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15834
15835 PR target/80546
15836 * config/rs6000/vsx.md (??r): New mode attribute.
15837 (*vsx_mov<mode>_64bit): Use it.
15838 (*vsx_mov<mode>_32bit): Likewise.
15839
15840 2018-03-30 Martin Sebor <msebor@redhat.com>
15841
15842 PR tree-optimization/84818
15843 * builtins.c (check_access): Use warning_n.
15844
15845 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15846
15847 PR target/83822
15848 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15849 condition.
15850 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15851 condition.
15852
15853 2018-03-30 Julia Koval <julia.koval@intel.com>
15854
15855 PR target/84413
15856 * x86-tune.def (movx, partial_reg_dependency): Enable for
15857 m_SKYLAKE_AVX512.
15858
15859 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15860
15861 PR inline-asm/84985
15862 * lra-constraints.c (process_alt_operands): Move setting
15863 this_alternative_matches below.
15864
15865 2018-03-29 Martin Liska <mliska@suse.cz>
15866
15867 PR lto/84995.
15868 * doc/invoke.texi: Document how LTO works with debug info.
15869 Describe auto-load support of binutils. Mention 'x86-64'
15870 as valid option value of -march option.
15871
15872 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15873
15874 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15875
15876 PR c/85094
15877 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15878 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15879 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15880 checking.
15881
15882 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15883
15884 PR target/84912
15885 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15886 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15887 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15888 for RS6000_BTM_POWERPC64.
15889 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15890 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15891 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15892 definition.
15893 (DIVDE): Use it.
15894 (DIVDEU): Likewise.
15895
15896 2018-03-28 Carl Love <cel@us.ibm.com>
15897
15898 Revert
15899 2017-09-27 Carl Love <cel@us.ibm.com>
15900
15901 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15902 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15903 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15904 fctiw instruction.
15905
15906 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15907
15908 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15909 instead of __vector bool.
15910 (_mm_max_pu8): Likewise.
15911 (_mm_min_pi16): Likewise.
15912
15913 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15914
15915 PR target/84912
15916 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15917 (DIVWEUO): Likewise.
15918 (DIVDEO): Likewise.
15919 (DIVDEUO): Likewise.
15920 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15921 DIVWEUO and DIVDEUO.
15922 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15923 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15924 (div_extend): Likewise.
15925 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15926 builtin function.
15927 (__builtin_divweuo): Likewise.
15928 (__builtin_divdeo): Likewise.
15929 (__builtin_divdeuo): Likewise.
15930
15931 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15932
15933 PR target/85095
15934 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15935 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15936
15937 PR tree-optimization/82004
15938 * gimple-match-head.c (optimize_pow_to_exp): New function.
15939 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15940 Don't fold to exp if optimize_pow_to_exp is false.
15941
15942 2018-03-28 Martin Liska <mliska@suse.cz>
15943
15944 PR other/84819
15945 * calls.c (initialize_argument_information): Fix trailing space.
15946 * common.opt: Fix typo and provide better explanation for
15947 -fsanitize-coverage option.
15948 * config/i386/i386.opt: Fix typo.
15949
15950 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15951 Martin Liska <mliska@suse.cz>
15952
15953 PR sanitizer/85081
15954 * gimplify.c (asan_poison_variable): Don't do the check for
15955 gimplify_omp_ctxp here.
15956 (gimplify_decl_expr): Do it here.
15957 (gimplify_target_expr): Likewise.
15958
15959 2018-03-28 Martin Liska <mliska@suse.cz>
15960
15961 PR target/84988
15962 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15963 chkp_type_bounds_count if MPX is not enabled.
15964
15965 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15966
15967 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15968
15969 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15970
15971 PR target/84914
15972 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15973 function to create the function decl for complex long double
15974 multiply and divide for -mabi=ieeelongdouble.
15975 (init_float128_ieee): Call it.
15976
15977 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15978
15979 PR target/85044
15980 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15981 -fcf-protection=branch -mibt.
15982 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15983
15984 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15985
15986 PR target/81863
15987 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15988 arm_word_relocations.
15989
15990 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15991
15992 PR target/85056
15993 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15994 extern array declarations.
15995
15996 2018-03-27 Richard Biener <rguenther@suse.de>
15997
15998 PR middle-end/84067
15999 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16000 explicit single_use checks.
16001
16002 2018-03-27 Richard Biener <rguenther@suse.de>
16003
16004 PR tree-optimization/85082
16005 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16006 Valueize the VUSE.
16007
16008 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16009
16010 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16011 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16012 Turn on fasynchronous-unwind-tables and funwind-tables.
16013
16014 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16015
16016 PR target/85073
16017 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16018 (*bmi_blsr_<mode>_ccz): Ditto.
16019
16020 2018-03-26 Tom de Vries <tom@codesourcery.com>
16021
16022 PR tree-optimization/85063
16023 * omp-general.c (offloading_function_p): New function. Factor out
16024 of ...
16025 * omp-offload.c (pass_omp_target_link::gate): ... here.
16026 * omp-general.h (offloading_function_p): Declare.
16027 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16028 with attribute omp declare target for offloading functions.
16029
16030 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16031
16032 PR tree-optimization/84005
16033 * tree-data-ref.h (get_base_for_alignment): Declare.
16034 * tree-data-ref.c (get_base_for_alignment_1): New function.
16035 (get_base_for_alignment): Likewise.
16036 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16037 get_base_for_alignment to find a suitable base object, instead
16038 of always using drb->base_address.
16039
16040 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16041
16042 PR inline-asm/85022
16043 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16044 known size by default.
16045
16046 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16047
16048 PR inline-asm/85030
16049 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16050 and non BLKmode operands.
16051
16052 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16053
16054 PR target/85026
16055 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16056 Clean up attributes.
16057
16058 2018-03-23 Richard Biener <rguenther@suse.de>
16059
16060 PR debug/85020
16061 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16062 we are going to emit early debug for LTO.
16063
16064 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16065
16066 PR inline-asm/85034
16067 * function.c (match_asm_constraints_1): Don't optimize if input
16068 doesn't satisfy general_operand predicate for output's mode.
16069
16070 PR inline-asm/85022
16071 * alias.c (write_dependence_p): Don't require for x_canonicalized
16072 non-VOIDmode if x has VOIDmode.
16073
16074 PR sanitizer/85029
16075 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16076 just don't try to optimize it rather than assert it never happens.
16077
16078 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16079
16080 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16081 macro expansions for definition of ST_INTERNAL_<mode> and
16082 LD_INTERNAL_<mode> builtins.
16083 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16084 Remove prototype.
16085 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16086 function.
16087 (altivec_expand_st_builtin): Likewise.
16088 (altivec_expand_builtin): Remove calls to deleted functions.
16089 (rs6000_address_for_altivec): Delete this function.
16090 * config/rs6000/vector.md: Remove expands for
16091 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16092
16093 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16094
16095 PR target/84826
16096 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16097 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16098 re-computing once computed.
16099 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16100 (arm_init_machine_status): Initialize
16101 machine->static_chain_stack_bytes.
16102
16103 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16104
16105 PR target/84760
16106 * doc/extend.texi: Add four new prototypes for vec_ld.
16107 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16108 definitions for more logical presentation.
16109 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16110 entries for V1TI variants of __builtin_altivec_ld builtin.
16111 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16112 handling of V1TI variant of LVX icode pattern.
16113 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16114 (rs6000_gimple_fold_builtin): Likewise.
16115 (altivec_init_builtins): Add code to define
16116 __builtin_altivec_lvx_v1ti function.
16117
16118 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16119
16120 PR inline-asm/84941
16121 * function.c (match_asm_constraints_1): Don't do the optimization
16122 if input isn't a REG, SUBREG, MEM or constant.
16123
16124 2018-03-22 Tom de Vries <tom@codesourcery.com>
16125
16126 PR tree-optimization/84956
16127 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16128 bb_has_abnormal_pred.
16129
16130 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16131
16132 PR sanitizer/85018
16133 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16134 DECL_INITIAL (decl) to decl at the end.
16135 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16136 adjust the comment.
16137
16138 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16139
16140 * doc/extend.texi (__builtin_tgmath): Document when complex
16141 integer types are treated as _Complex _Float64.
16142
16143 2018-03-21 Tom de Vries <tom@codesourcery.com>
16144
16145 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16146
16147 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16148
16149 PR tree-optimization/84960
16150 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16151 if it is ENTRY block, move them into single succ of ENTRY in that case.
16152
16153 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16154
16155 PR tree-optimization/84811
16156 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16157 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16158 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16159 (known_subrange_p): Update accordingly. Cast each value involved
16160 in the size comparison, rather than casting the result of the
16161 subtraction.
16162
16163 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16164
16165 PR tree-optimization/84982
16166 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16167 by flipping the least significant bit rather than all bits from
16168 bitpos to bitpos + bitsize - 1.
16169
16170 2018-03-21 Nathan Sidwell <nathan@acm.org>
16171
16172 * doc/extend.texi (Deprecated Features): Remove mention of
16173 long-deleted deprecations.
16174
16175 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16176
16177 PR jit/84288
16178 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16179 * configure: Regenerate.
16180
16181 2018-03-21 Tom de Vries <tom@codesourcery.com>
16182
16183 PR tree-optimization/83126
16184 * tree-parloops.c (num_phis): New function.
16185 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16186
16187 2018-03-21 Nathan Sidwell <nathan@acm.org>
16188
16189 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16190 mention anon-struct/union members and trailing attributes.
16191
16192 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16193
16194 PR tree-optimization/84969
16195 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16196 builtin memset partitions if they set different rhs values.
16197
16198 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16199
16200 PR rtl-optimization/84989
16201 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16202 VEC_DUPLICATE with scalar result mode.
16203
16204 2018-03-21 Martin Liska <mliska@suse.cz>
16205
16206 PR ipa/84963
16207 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16208 not intended return statement.
16209
16210 2018-03-21 Martin Liska <mliska@suse.cz>
16211
16212 PR target/84988
16213 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16214 (chkp_find_bound_slots_1): Limit number of iterations.
16215
16216 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16217
16218 PR target/84838
16219 * Minor grammar fixes for x86 options.
16220
16221 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16222
16223 PR debug/84875
16224 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16225 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16226
16227 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16228
16229 PR target/83789
16230 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16231 (altivec_lvx_<mode>_1op): Likewise.
16232 (altivec_stvx_<mode>_2op): Likewise.
16233 (altivec_stvx_<mode>_1op): Likewise.
16234 (altivec_lvx_<VM2:mode>): New define_expand.
16235 (altivec_stvx_<VM2:mode>): Likewise.
16236 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16237 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16238 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16239 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16240 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16241 (rs6000_gen_lvx): Likewise.
16242 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16243 (altivec_expand_stv_builtin): Likewise.
16244 (altivec_expand_builtin): Likewise.
16245 * config/rs6000/vector.md: Likewise.
16246
16247 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16248
16249 PR target/82518
16250 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16251 BYTES_BIG_ENDIAN.
16252
16253 2018-03-20 Richard Biener <rguenther@suse.de>
16254
16255 PR target/84986
16256 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16257 sign-conversions as zero, fall back to standard scalar_stmt
16258 cost for the rest.
16259
16260 2018-03-20 Martin Liska <mliska@suse.cz>
16261
16262 PR ipa/84825
16263 * predict.c (rebuild_frequencies): Handle case when we have
16264 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16265
16266 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16267
16268 PR target/84990
16269 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16270 flag_section_anchors.
16271 * varasm.c (use_blocks_for_decl_p): Remove hack for
16272 dw2_force_const_mem.
16273
16274 PR target/84845
16275 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16276 to ...
16277 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16278 be created, use lowpart_subreg of operands[0] rather than operands[0]
16279 itself.
16280 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16281 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16282 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16283 and n constraint instead of aarch64_shift_imm_di and Usd.
16284 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16285 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16286
16287 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16288
16289 PR target/82989
16290 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16291 to favor GPR over NEON registers.
16292 (<shift>di3_neon): Likewise.
16293
16294 2018-03-20 Tom de Vries <tom@codesourcery.com>
16295
16296 PR target/84952
16297 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16298 (nvptx_process_pars): Emit bar.sync asap and alap.
16299
16300 2018-03-20 Tom de Vries <tom@codesourcery.com>
16301
16302 PR target/84954
16303 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16304 seen_label if seen_label is already set.
16305
16306 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16307
16308 PR target/84945
16309 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16310 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16311 Use 1U instead of 1. Formatting fixes.
16312
16313 PR c/84953
16314 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16315 instead of TREE_TYPE (s1) for the return value.
16316
16317 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16318
16319 PR tree-optimization/84946
16320 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16321 bitsize + bitsize in poly_uint64 rather than poly_int64.
16322
16323 PR sanitizer/78651
16324 * dwarf2asm.c: Include fold-const.c.
16325 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16326 of decl rather than decl itself.
16327
16328 PR rtl-optimization/84643
16329 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16330
16331 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16332
16333 PR sanitizer/78651
16334 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16335 calling assemble_variable.
16336
16337 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16338
16339 PR target/81647
16340 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16341 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16342
16343 2018-03-19 Jim Wilson <jimw@sifive.com>
16344
16345 PR bootstrap/84856
16346 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16347 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16348 (riscv_first_stack_step): Likewise.
16349 (riscv_option_override): Use STACK_BOUNDARY instead of
16350 MIN_STACK_BOUNDARY.
16351 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16352 MIN_STACK_BOUNDARY.
16353 (BIGGEST_ALIGNMENT): Set to 128.
16354 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16355 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16356 STACK_BOUNDARY.
16357
16358 2018-03-19 Richard Biener <rguenther@suse.de>
16359
16360 PR tree-optimization/84933
16361 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16362 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16363
16364 2018-03-19 Richard Biener <rguenther@suse.de>
16365
16366 PR tree-optimization/84859
16367 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16368 (cond_if_else_store_replacement): Perform sinking operation on
16369 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16370 Generalize what a BB with a single eligible store is.
16371
16372 2018-03-19 Richard Biener <rguenther@suse.de>
16373
16374 PR tree-optimization/84929
16375 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16376 chrec_is_positive against non-chrec arg.
16377
16378 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16379
16380 PR target/84711
16381 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16382
16383 2018-03-18 Martin Liska <mliska@suse.cz>
16384
16385 PR rtl-optimization/84635
16386 * regrename.c (build_def_use): Use matches_mode only when
16387 matches >= 0.
16388
16389 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16390
16391 PR tree-optimization/84913
16392 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16393 vectorize chains of COND_EXPRs.
16394
16395 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16396
16397 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16398
16399 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16400
16401 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16402
16403 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16404
16405 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16406
16407 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16408 Kito Cheng <kito.cheng@gmail.com>
16409
16410 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16411 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16412 (nds32_adjust_reg_alloc_order): New function.
16413 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16414
16415 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16416
16417 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16418 nds32_print_operand, nds32_print_operand_address): Use
16419 HOST_WIDE_INT_PRINT_DEC instead.
16420
16421 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16422
16423 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16424
16425 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16426
16427 PR target/84902
16428 * config/i386/i386.c (initial_ix86_tune_features,
16429 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16430 unsigned long long.
16431 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16432 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16433 rather than 1u << ix86_tune. Formatting fix.
16434 (ix86_option_override_internal): Change ix86_arch_mask from
16435 unsigned int to unsigned HOST_WIDE_INT, initialize to
16436 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16437 (ix86_function_specific_restore): Likewise.
16438
16439 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16440
16441 PR target/84899
16442 * postreload.c (reload_combine_recognize_pattern): Perform
16443 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16444 truncate_int_for_mode the result for the destination's mode.
16445
16446 PR c/84909
16447 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16448 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16449 Likewise.
16450 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16451 Likewise.
16452
16453 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16454
16455 PR target/84876
16456 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16457 regno_allocno_class_array and sorted_pseudos.
16458 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16459 insns where regno is used.
16460
16461 2018-03-16 Martin Liska <mliska@suse.cz>
16462
16463 PR ipa/84833
16464 * multiple_target.c (create_dispatcher_calls): Redirect
16465 reference in the symbol table.
16466
16467 2018-03-16 Martin Liska <mliska@suse.cz>
16468
16469 PR ipa/84722
16470 * multiple_target.c (create_dispatcher_calls): Redirect also
16471 an alias.
16472
16473 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16474
16475 PR c++/79937
16476 PR c++/82410
16477 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16478 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16479 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16480
16481 2018-03-16 Julia Koval <julia.koval@intel.com>
16482
16483 * doc/invoke.texi (Skylake Server): Add CLWB.
16484 Cannonlake): Remove CLWB.
16485
16486 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16487
16488 PR tree-optimization/84841
16489 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16490 1 << 3.
16491 (FLOAT_ONE_CONST_TYPE): Define.
16492 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16493 (sort_by_operand_rank): Put entries with higher constant_type last
16494 rather than first to match comments.
16495
16496 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16497
16498 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16499 split predicate.
16500
16501 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16502
16503 PR c++/79085
16504 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16505 check and use address of target always.
16506
16507 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16508
16509 PR target/84574
16510 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16511 (indirect_thunk_bnd_needed): Likewise.
16512 (indirect_thunks_used): Likewise.
16513 (indirect_thunks_bnd_used): Likewise.
16514 (indirect_return_needed): New.
16515 (indirect_return_bnd_needed): Likewise.
16516 (output_indirect_thunk_function): Add a bool argument for
16517 function return.
16518 (output_indirect_thunk_function): Don't generate alias for
16519 function return thunk.
16520 (ix86_code_end): Call output_indirect_thunk_function to generate
16521 function return thunks.
16522 (ix86_output_function_return): Set indirect_return_bnd_needed
16523 and indirect_return_needed instead of indirect_thunk_bnd_needed
16524 and indirect_thunk_needed.
16525
16526 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16527
16528 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16529 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16530 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16531
16532 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16533 Paul Hua <paul.hua.gm@gmail.com>
16534
16535 PR c/84852
16536 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16537
16538 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16539
16540 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16541 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16542 resp. SFmode cases.
16543
16544 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16545
16546 PR target/84711
16547 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16548 instead of GET_MODE_SIZE when comparing Units.
16549
16550 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16551
16552 PR target/68256
16553 * varasm.c (hash_section): Return an unchangeble hash value
16554 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16555 Return !aarch64_can_use_per_function_literal_pools_p ().
16556
16557 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16558
16559 PR target/84860
16560 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16561 rather than address of cmode as last argument to prepare_cmp_insn.
16562
16563 2018-03-15 Julia Koval <julia.koval@intel.com>
16564
16565 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16566 F_AVX512VNNI, F_AVX512BITALG): New.
16567
16568 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16569
16570 PR target/83451
16571 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16572 insn for floating-point loads and stores.
16573
16574 2018-03-14 Carl Love <cel@us.ibm.com>
16575
16576 * config/rs6000/rs6000-c.c: Add macro definitions for
16577 ALTIVEC_BUILTIN_VEC_PERMXOR.
16578 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16579 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16580 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16581 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16582 UNSPEC_VPERMXOR.
16583 * config/doc/extend.texi: Add prototypes for vec_permxor.
16584
16585 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16586
16587 PR c/84852
16588 * diagnostic-show-locus.c (class layout_point): Convert m_line
16589 from int to linenum_type.
16590 (line_span::comparator): Use linenum "compare" function when
16591 comparing line numbers.
16592 (test_line_span): New function.
16593 (layout_range::contains_point): Convert param "row" from int to
16594 linenum_type.
16595 (layout_range::intersects_line_p): Likewise.
16596 (layout::will_show_line_p): Likewise.
16597 (layout::print_source_line): Likewise.
16598 (layout::should_print_annotation_line_p): Likewise.
16599 (layout::print_annotation_line): Likewise.
16600 (layout::print_leading_fixits): Likewise.
16601 (layout::annotation_line_showed_range_p): Likewise.
16602 (struct line_corrections): Likewise for field m_row.
16603 (line_corrections::line_corrections): Likewise for param "row".
16604 (layout::print_trailing_fixits): Likewise.
16605 (layout::get_state_at_point): Likewise.
16606 (layout::get_x_bound_for_row): Likewise.
16607 (layout::print_line): Likewise.
16608 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16609 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16610 * input.c (selftest::test_linenum_comparisons): New function.
16611 (selftest::input_c_tests): Call it.
16612 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16613 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16614 * selftest.h (ASSERT_GT): New macro.
16615 (ASSERT_GT_AT): New macro.
16616 (ASSERT_LT): New macro.
16617 (ASSERT_LT_AT): New macro.
16618
16619 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16620
16621 PR rtl-optimization/84780
16622 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16623
16624 2018-03-14 Martin Liska <mliska@suse.cz>
16625
16626 * tree.c (record_node_allocation_statistics): Use
16627 get_stats_node_kind.
16628 (get_stats_node_kind): New function extracted from
16629 record_node_allocation_statistics.
16630 (free_node): Use get_stats_node_kind.
16631
16632 2018-03-14 Richard Biener <rguenther@suse.de>
16633
16634 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16635 that the value-set of ANTIC_IN doesn't grow.
16636
16637 Revert
16638 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16639 member.
16640 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16641 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16642
16643 2018-03-14 Julia Koval <julia.koval@intel.com>
16644
16645 * config.gcc (icelake-client, icelake-server): New.
16646 (icelake): Remove.
16647 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16648 (initial_ix86_arch_features): Ditto.
16649 (PTA_SKYLAKE): Add SGX.
16650 (PTA_ICELAKE): Remove.
16651 (PTA_ICELAKE_CLIENT): New.
16652 (PTA_ICELAKE_SERVER): New.
16653 (ix86_option_override_internal): Split up icelake on icelake client and
16654 icelake server.
16655 (get_builtin_code_for_version): Ditto.
16656 (fold_builtin_cpu): Ditto.
16657 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16658 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16659 * config/i386/i386.h (processor_type): Ditto.
16660 * doc/invoke.texi: Ditto.
16661
16662 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16663
16664 PR sanitizer/83392
16665 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16666 INTEGER_CST offset, add it together with bitpos / 8 and
16667 sign extend based on POINTER_SIZE.
16668
16669 PR target/84844
16670 Revert
16671 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16672
16673 PR target/78090
16674 * config/i386/constraints.md (Yc): New register constraint.
16675 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16676 Use Yc constraint for alternative 2 of operand 0. Remove
16677 preferred_for_speed attribute.
16678
16679 2018-03-14 Richard Biener <rguenther@suse.de>
16680
16681 PR tree-optimization/84830
16682 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16683 with the old one to avoid oscillations.
16684
16685 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16686
16687 PR target/83712
16688 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16689 pseudos.
16690 (assign_by_spills): Return a flag of reload assignment failure.
16691 Do not process the reload assignment failures. Do not spill other
16692 reload pseudos if they has the same reg class. Update n if
16693 necessary.
16694 (lra_assign): Add a return arg. Set up from the result of
16695 assign_by_spills call.
16696 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16697 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16698 usage_insns if it is not NULL.
16699 (spill_hard_reg_in_range): New function.
16700 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16701 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16702 function prototypes.
16703 (lra_assign): Change prototype.
16704 * lra.c (lra): Add code to deal with fails by splitting hard reg
16705 live ranges.
16706
16707 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16708
16709 * config/riscv/riscv.opt (mrelax): New option.
16710 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16711 "norelax" when riscv_mrelax is disabled.
16712 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16713
16714 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16715
16716 PR target/84743
16717 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16718 reassociation for int modes.
16719
16720 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16721
16722 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16723 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16724 for big-endian.
16725 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16726 * config/aarch64/aarch64-sve.md
16727 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16728 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16729 (*extend<mode><Vwide>2): Rename to...
16730 (aarch64_sve_extend<mode><Vwide>2): ...this.
16731 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16732 renaming the old pattern to...
16733 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16734 unsigned packs.
16735 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16736 define_expand, renaming the old pattern to...
16737 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16738 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16739 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16740 account when deciding which SVE instruction the optab should use.
16741 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16742
16743 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16744
16745 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16746 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16747 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16748 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16749 (tlsdesc_small_<mode>): Turn a define_expand and use
16750 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16751 (tlsdesc_small_advsimd_<mode>): ...this.
16752 (tlsdesc_small_sve_<mode>): New pattern.
16753
16754 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16755
16756 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16757 (UNSPEC_UMUL_HIGHPART): New constants.
16758 (MUL_HIGHPART): New int iteraor.
16759 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16760 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16761 define_expand.
16762 (*<su>mul<mode>3_highpart): New define_insn.
16763
16764 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16765
16766 PR lto/84805
16767 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16768 incomplete types.
16769
16770 2018-03-13 Martin Liska <mliska@suse.cz>
16771
16772 PR ipa/84658.
16773 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16774 vector.
16775 (sem_item_optimizer::~sem_item_optimizer): Release it.
16776 (sem_item_optimizer::merge_classes): Register variable aliases.
16777 (sem_item_optimizer::fixup_pt_set): New function.
16778 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16779 * ipa-icf.h: Declare new variables and functions.
16780
16781 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16782
16783 PR middle-end/84834
16784 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16785 integer_pow2p@2 and test integer_pow2p in condition.
16786 (A < 0 ? C : 0): Similarly for @1.
16787
16788 PR middle-end/84831
16789 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16790 characters starting at p contain '\0' character, don't look beyond
16791 that.
16792
16793 PR target/84827
16794 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16795 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16796
16797 PR target/84828
16798 * reg-stack.c (change_stack): Change update_end var from int to
16799 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16800 also call set_block_for_insn on the newly added insns and rescan.
16801
16802 PR target/84786
16803 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16804 on the last operand.
16805
16806 PR c++/84704
16807 * tree.c (stabilize_reference_1): Return save_expr (e) for
16808 STATEMENT_LIST even if it doesn't have side-effects.
16809
16810 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16811
16812 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16813
16814 2018-03-12 Renlin Li <renlin.li@arm.com>
16815
16816 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16817 aarch64_output_scalar_simd_mov_immediate.
16818
16819 2018-03-12 Martin Sebor <msebor@redhat.com>
16820
16821 PR tree-optimization/83456
16822 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16823 for perfectly overlapping calls to memcpy.
16824 (gimple_fold_builtin_memory_chk): Same.
16825 (gimple_fold_builtin_strcpy): Handle no-warning.
16826 (gimple_fold_builtin_stxcpy_chk): Same.
16827 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16828
16829 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16830
16831 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16832 parameter. Use it for SFmode.
16833 (rs6000_function_arg_advance_1): Adjust.
16834 (rs6000_function_arg): Adjust.
16835 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16836
16837 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16838
16839 PR rtl-optimization/84169
16840 PR rtl-optimization/84780
16841 * combine.c (can_combine_p): Check for a 2-insn combination whether
16842 the destination register is used between the two insns, too.
16843
16844 2018-03-12 Richard Biener <rguenther@suse.de>
16845
16846 PR tree-optimization/84803
16847 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16848 for refs DR analysis didn't process.
16849
16850 2018-03-12 Richard Biener <rguenther@suse.de>
16851
16852 PR tree-optimization/84777
16853 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16854 force-vectorize loops ignore whether we are optimizing for size.
16855
16856 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16857
16858 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16859 (TARGET_MD_ASM_ADJUST): Define.
16860
16861 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16862 Kito Cheng <kito.cheng@gmail.com>
16863 Chung-Ju Wu <jasonwucj@gmail.com>
16864
16865 * config/nds32/nds32.c (nds32_compute_stack_frame,
16866 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16867 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16868 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16869 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16870 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16871 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16872 * config/nds32/nds32.md (prologue, epilogue): Use macro
16873 NDS32_V3PUSH_AVAILABLE_P to do checking.
16874
16875 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16876
16877 PR debug/58150
16878 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16879 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16880 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16881 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16882 addition of most attributes on !orig_type_die or the attribute not
16883 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16884
16885 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16886 Chung-Ju Wu <jasonwucj@gmail.com>
16887
16888 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16889 __NDS32_VH__ macro.
16890 * config/nds32/nds32.opt (mvh): New option.
16891
16892 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16893 Chung-Ju Wu <jasonwucj@gmail.com>
16894
16895 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16896 function.
16897 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16898 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16899 definition.
16900
16901 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16902 Chung-Ju Wu <jasonwucj@gmail.com>
16903
16904 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16905 function.
16906 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16907 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16908
16909 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16910 Kito Cheng <kito.cheng@gmail.com>
16911 Chung-Ju Wu <jasonwucj@gmail.com>
16912
16913 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16914 UNSPEC_FFMISM and UNSPEC_FLMISM.
16915 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16916 for ffb, ffmism and flmism.
16917 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16918 (unspec_ffmism): Ditto.
16919 (unspec_flmism): Ditto.
16920 (nds32_expand_builtin_impl): Check if string extension is available.
16921 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16922 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16923
16924 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16925
16926 Reverting patch:
16927 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16928
16929 PR target/83712
16930 * lra-assigns.c (assign_by_spills): Return a flag of reload
16931 assignment failure. Do not process the reload assignment
16932 failures. Do not spill other reload pseudos if they has the same
16933 reg class.
16934 (lra_assign): Add a return arg. Set up from the result of
16935 assign_by_spills call.
16936 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16937 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16938 usage_insns if it is not NULL.
16939 (spill_hard_reg_in_range): New function.
16940 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16941 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16942 function prototypes.
16943 (lra_assign): Change prototype.
16944 * lra.c (lra): Add code to deal with fails by splitting hard reg
16945 live ranges.
16946
16947 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16948
16949 PR target/84807
16950 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16951
16952 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16953
16954 PR debug/84620
16955 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16956 (dw_val_node): Add val_symbolic_view.
16957 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16958 (symview_upper_bound): New.
16959 (new_line_info_table): Initialize symviews_since_reset.
16960 (dwarf2out_source_line): Count symviews_since_reset and set
16961 symview_upper_bound.
16962 (dw_val_equal_p): Handle symview.
16963 (add_AT_symview): New.
16964 (print_dw_val): Handle symview.
16965 (attr_checksum, attr_checksum_ordered): Likewise.
16966 (same_dw_val_p, size_of_die): Likewise.
16967 (value_format, output_die): Likewise.
16968 (add_high_low_attributes): Use add_AT_symview for entry_view.
16969 (dwarf2out_finish): Reset symview_upper_bound, clear
16970 zero_view_p.
16971
16972 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16973
16974 PR target/83969
16975 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16976 Add strict argument and use it.
16977 (rs6000_split_multireg_move): Update for new strict argument.
16978 (mem_operand_gpr): Disallow all non-offsettable addresses.
16979 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16980
16981 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16982
16983 PR target/84772
16984 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16985 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16986 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16987
16988 PR c++/84767
16989 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16990 decl, use remap_type if we want to use the type.
16991
16992 2018-03-09 Martin Sebor <msebor@redhat.com>
16993
16994 PR tree-optimization/84526
16995 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16996 Remove dead code.
16997 (builtin_access::generic_overlap): Be prepared to handle non-array
16998 base objects.
16999
17000 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17001
17002 PR rtl-optimization/84682
17003 * lra-constraints.c (process_address_1): Check is_address flag
17004 for address constraints.
17005 (process_alt_operands): Likewise.
17006 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17007 preprocess_constraints.
17008 * recog.h (preprocess_constraints): Add oploc parameter.
17009 Adjust callers.
17010 * recog.c (preprocess_constraints): Test address_operand for
17011 CT_ADDRESS constraints.
17012
17013 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17014
17015 PR target/83712
17016 * lra-assigns.c (assign_by_spills): Return a flag of reload
17017 assignment failure. Do not process the reload assignment
17018 failures. Do not spill other reload pseudos if they has the same
17019 reg class.
17020 (lra_assign): Add a return arg. Set up from the result of
17021 assign_by_spills call.
17022 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17023 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17024 usage_insns if it is not NULL.
17025 (spill_hard_reg_in_range): New function.
17026 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17027 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17028 function prototypes.
17029 (lra_assign): Change prototype.
17030 * lra.c (lra): Add code to deal with fails by splitting hard reg
17031 live ranges.
17032
17033 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17034
17035 PR target/83193
17036 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17037 Accept complain bool parameter. Only emit errors if it is true.
17038 (arm_parse_cpu_option_name): Likewise.
17039 (arm_target_thumb_only): Adjust callers of the above.
17040 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17041 prototype to take a default true bool parameter.
17042 (arm_parse_arch_option_name): Likewise.
17043
17044 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17045 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17046
17047 PR jit/64089
17048 PR jit/84288
17049 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17050 * configure: Regenerate.
17051 * configure.ac ("linker --version-script option"): New.
17052 ("linker soname option"): New.
17053
17054 2018-03-09 Richard Biener <rguenther@suse.de>
17055
17056 PR tree-optimization/84775
17057 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17058 immediate uses of predicate stmts and mark them modified.
17059
17060 Revert
17061 PR tree-optimization/84178
17062 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17063 to caller.
17064 (version_loop_for_if_conversion): Delay update_ssa call.
17065 (tree_if_conversion): Delay update_ssa until after predicate
17066 insertion.
17067
17068 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17069
17070 PR target/84763
17071 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17072 when the function accesses prior frames.
17073
17074 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17075
17076 PR debug/84456
17077 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17078 gen_llsym, otherwise call maybe_gen_llsym.
17079
17080 PR inline-asm/84742
17081 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17082 has ',' character inside of it.
17083
17084 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17085
17086 PR target/84748
17087 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17088 as clobbering CC_REGNUM.
17089
17090 2018-03-08 Richard Biener <rguenther@suse.de>
17091
17092 PR middle-end/84552
17093 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17094 (follow_copies_to_constant): Do not follow SSA names registered
17095 for update.
17096
17097 2018-03-08 Richard Biener <rguenther@suse.de>
17098
17099 PR tree-optimization/84178
17100 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17101 to caller.
17102 (version_loop_for_if_conversion): Delay update_ssa call.
17103 (tree_if_conversion): Delay update_ssa until after predicate
17104 insertion.
17105
17106 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17107
17108 PR tree-optimization/84178
17109 * tree-if-conv.c (release_bb_predicate): Remove the
17110 the assertion that the stmts have NULL use_ops.
17111 Discard the statements, asserting that they haven't
17112 yet been added to a BB.
17113
17114 2018-03-08 Richard Biener <rguenther@suse.de>
17115
17116 PR tree-optimization/84746
17117 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17118 (phi_translate): Pass in destination ANTIC_OUT set.
17119 (phi_translate_1): Likewise. For a simplified result lookup
17120 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17121 (phi_translate_set): Adjust.
17122 (do_pre_regular_insertion): Likewise.
17123 (do_pre_partial_partial_insertion): Likewise.
17124
17125 2018-03-08 Martin Liska <mliska@suse.cz>
17126
17127 PR gcov-profile/84735
17128 * doc/gcov.texi: Document usage of profile files.
17129 * gcov-io.h: Document changes in the format.
17130
17131 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17132
17133 PR debug/84404
17134 PR debug/84408
17135 * dwarf2out.c (struct dw_line_info_table): Update comments for
17136 view == -1.
17137 (FORCE_RESET_NEXT_VIEW): New.
17138 (FORCE_RESETTING_VIEW_P): New.
17139 (RESETTING_VIEW_P): Check for -1 too.
17140 (ZERO_VIEW_P): Likewise.
17141 (new_line_info_table): Force-reset next view.
17142 (dwarf2out_begin_function): Likewise.
17143 (dwarf2out_source_line): Simplify zero_view_p initialization.
17144 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17145 view directly. Omit view when omitting .loc at line 0.
17146
17147 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17148
17149 PR tree-optimization/84740
17150 * tree-switch-conversion.c (process_switch): Call build_constructors
17151 only if info.phi_count is non-zero.
17152
17153 PR tree-optimization/84739
17154 * tree-tailcall.c (find_tail_calls): Check call arguments against
17155 DECL_ARGUMENTS (current_function_decl) rather than
17156 DECL_ARGUMENTS (func) when checking for tail recursion.
17157
17158 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17159
17160 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17161 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17162 Volker Reichelt's entry and add entries for people that perform
17163 GCC fuzzy testing and report numerous bugs.
17164
17165 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17166
17167 PR target/82411
17168 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17169 readonly data in sdata, if that is disabled.
17170 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17171 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17172 -mreadonly-in-sdata option.
17173
17174 2018-03-07 Martin Sebor <msebor@redhat.com>
17175
17176 PR tree-optimization/84468
17177 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17178 basic block when looking for nul assignment.
17179
17180 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17181
17182 PR target/84277
17183 * except.h (output_function_exception_table): Adjust prototype.
17184 * except.c (output_function_exception_table): Remove FNNAME parameter
17185 and add SECTION parameter. Ouput one part of the table at a time.
17186 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17187 the first part of the exception table and emit unwind directives.
17188 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17189 (i386_pe_seh_cold_init): Likewise.
17190 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17191 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17192 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17193 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17194 * config/i386/winnt.c: Include except.h.
17195 (struct seh_frame_state): Add reg_offset, after_prologue and
17196 in_cold_section fields.
17197 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17198 (i386_pe_seh_cold_init): New function.
17199 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17200 to seh->in_cold_section.
17201 (seh_emit_push): Record the offset of the push.
17202 (seh_emit_save): Record the offet of the save.
17203 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17204 Test seh->after_prologue to disregard the epilogue.
17205 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17206 (i386_pe_end_cold_function): New function.
17207
17208 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17209
17210 PR fortran/84565
17211 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17212 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17213
17214 PR c++/84704
17215 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17216 on tmp_var.
17217 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17218 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17219
17220 PR middle-end/84723
17221 * multiple_target.c: Include tree-inline.h and intl.h.
17222 (expand_target_clones): Diagnose and fail if node->definition and
17223 !tree_versionable_function_p (node->decl).
17224
17225 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17226
17227 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17228 sprint_ul.
17229 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17230 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17231 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17232
17233 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17234
17235 PR target/84710
17236 * combine.c (try_combine): Use reg_or_subregno instead of handling
17237 just paradoxical SUBREGs and REGs.
17238
17239 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17240
17241 * config/arc/arc.c (arc_finalize_pic): Remove function.
17242 (arc_must_save_register): We use single base PIC register, remove
17243 checks to save/restore the PIC register.
17244 (arc_expand_prologue): Likewise.
17245 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17246 Remove.
17247 (arc_verify_short): Likewise.
17248 (arc_attr_type): Likewise.
17249 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17250 (walk_stores): Likewise.
17251 (arc_address_cost): Make it static.
17252 (arc_verify_short): Likewise.
17253 (branch_dest): Likewise.
17254 (arc_attr_type): Likewise.
17255 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17256 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17257 (arc_final_prescan_insn): Remove inserting the nops due to
17258 hardware hazards. It is done in reorg step.
17259 (insn_length_variant_t): Remove.
17260 (insn_length_parameters_t): Likewise.
17261 (arc_insn_length_parameters): Likewise.
17262 (arc_get_insn_variants): Likewise.
17263 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17264
17265 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17266
17267 PR inline-asm/84683
17268 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17269 assertion failure.
17270
17271 PR tree-optimization/84687
17272 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17273 on new_node->decl.
17274 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17275
17276 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17277
17278 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17279 Rename to ppc_speculation_barrier.
17280 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17281 __builtin_ppc_speculation_barrier.
17282
17283 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17284
17285 PR target/84700
17286 * combine.c (combine_simplify_rtx): Don't try to simplify if
17287 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17288 are equal to x.
17289
17290 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17291
17292 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17293 to 32 bytes when compiling for POWER9.
17294
17295 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17296
17297 PR target/84564
17298 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17299 regparm >= 3 with no arg reg available also for calls with
17300 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17301
17302 PR target/84524
17303 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17304 orig,vex.
17305 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17306
17307 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17308
17309 PR target/84264
17310 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17311
17312 2018-03-05 Richard Biener <rguenther@suse.de>
17313
17314 PR tree-optimization/84486
17315 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17316 When inserting a __builtin_assume_aligned call set the LHS
17317 SSA name alignment info accordingly.
17318
17319 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17320
17321 PR tree-optimization/84114
17322 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17323 Avoid reassociation of FLOAT_MODE addition.
17324
17325 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17326
17327 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17328 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17329 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17330 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17331 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17332 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17333 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17334 and -mwbnoinvd.
17335 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17336 __builtin_ia32_wbinvd): New builtins.
17337 (SPECIAL_ARGS2): New.
17338 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17339 (SPECIAL_ARGS2): New.
17340 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17341 (ix86_valid_target_attribute_inner_p): Ditto.
17342 (ix86_init_mmx_sse_builtins): Add special_args2.
17343 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17344 TARGET_WBNOINVD_P): New.
17345 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17346 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17347 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17348 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17349 * config/i386/pconfigintrin.h: New file.
17350 * config/i386/wbnoinvdintrin.h: Ditto.
17351 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17352 wbnoinvdintrin.h.
17353 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17354
17355 2018-03-05 Richard Biener <rguenther@suse.de>
17356
17357 PR tree-optimization/84670
17358 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17359 member.
17360 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17361 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17362 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17363 doesn't grow if all successors (recursively) were visited at least
17364 once.
17365
17366 2018-03-05 Richard Biener <rguenther@suse.de>
17367
17368 PR tree-optimization/84650
17369 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17370 if executed in the loop pipeline.
17371
17372 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17373
17374 * doc/configfiles.texi (Configuration Files): Move info about
17375 conditionalizing $target-protos.h to...
17376 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17377 differs from $target-protos.h.
17378
17379 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17380 Chung-Ju Wu <jasonwucj@gmail.com>
17381
17382 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17383 * config/nds32/nds32-multiple.md (setmemsi): Define.
17384 * config/nds32/nds32-memory-manipulation.c
17385 (nds32_gen_dup_4_byte_to_word_value): New.
17386 (emit_setmem_word_loop): New.
17387 (emit_setmem_byte_loop): New.
17388 (nds32_expand_setmem_loop): New.
17389 (nds32_expand_setmem_loop_v3m): New.
17390 (nds32_expand_setmem_unroll): New.
17391 (nds32_expand_setmem): New.
17392
17393 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17394 Chung-Ju Wu <jasonwucj@gmail.com>
17395
17396 * config/nds32/nds32-memory-manipulation.c
17397 (nds32_emit_load_store): New.
17398 (nds32_emit_post_inc_load_store): New.
17399 (nds32_emit_mem_move): New.
17400 (nds32_emit_mem_move_block): New.
17401 (nds32_expand_movmemsi_loop_unknown_size): New.
17402 (nds32_expand_movmemsi_loop_known_size): New.
17403 (nds32_expand_movmemsi_loop): New.
17404 (nds32_expand_movmemsi_unroll): New.
17405 (nds32_expand_movmemqi): Rename ...
17406 (nds32_expand_movmemsi): ... to this.
17407 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17408 (movmemsi): ... to this.
17409 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17410 (nds32_expand_movmemsi): ... to this.
17411
17412 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17413 Monk Chiang <sh.chiang04@gmail.com>
17414 Chung-Ju Wu <jasonwucj@gmail.com>
17415
17416 * config/nds32/nds32-protos.h
17417 (nds32_expand_load_multiple): New arguments.
17418 (nds32_expand_store_multiple): Ditto.
17419 (nds32_valid_multiple_load_store): Rename ...
17420 (nds32_valid_multiple_load_store_p): ... to this.
17421 * config/nds32/nds32-memory-manipulation.c
17422 (nds32_expand_load_multiple): Refine implementation.
17423 (nds32_expand_store_multiple): Ditto.
17424 * config/nds32/nds32-multiple.md
17425 (load_multiple): Update nds32_expand_load_multiple interface.
17426 (store_multiple): Update nds32_expand_store_multiple interface.
17427 * config/nds32/nds32-predicates.c
17428 (nds32_valid_multiple_load_store): Rename ...
17429 (nds32_valid_multiple_load_store_p): ... to this and refine
17430 implementation.
17431 * config/nds32/predicates.md
17432 (nds32_load_multiple_and_update_address_operation): New predicate.
17433 (nds32_store_multiple_and_update_address_operation): New predicate.
17434
17435 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17436 Chung-Ju Wu <jasonwucj@gmail.com>
17437
17438 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17439 (combo): New attribute.
17440 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17441
17442 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17443
17444 * config/nds32/nds32.opt: Change -mcmodel= default value.
17445
17446 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17447 Monk Chiang <sh.chiang04@gmail.com>
17448 Chung-Ju Wu <jasonwucj@gmail.com>
17449
17450 * config/nds32/constants.md (unspec_element): New enum.
17451 * config/nds32/constraints.md (Umw): New constraint.
17452 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17453 * config/nds32/nds32-intrinsic.md: Likewise.
17454 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17455 (nds32_valid_smw_lwm_base_p): New.
17456 (nds32_output_smw_single_word): New.
17457 (nds32_output_lmw_single_word): New.
17458 (nds32_expand_unaligned_load): New.
17459 (nds32_expand_unaligned_store): New.
17460 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17461 (nds32_output_smw_single_word): Declare.
17462 (nds32_output_lmw_single_word): Declare.
17463 (nds32_expand_unaligned_load): Declare.
17464 (nds32_expand_unaligned_store): Declare.
17465 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17466 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17467 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17468 NDS32_BUILTIN_UASTORE_DW.
17469 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17470 predicate.
17471
17472 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17473 Kito Cheng <kito.cheng@gmail.com>
17474 Chung-Ju Wu <jasonwucj@gmail.com>
17475
17476 * config/nds32/nds32-intrinsic.c
17477 (nds32_expand_builtin_null_ftype_reg): Delete.
17478 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17479 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17480 (nds32_read_argument): New.
17481 (nds32_legitimize_target): Ditto.
17482 (nds32_legitimize_argument): Ditto.
17483 (nds32_check_constant_argument): Ditto.
17484 (nds32_expand_unop_builtin): Ditto.
17485 (nds32_expand_unopimm_builtin): Ditto.
17486 (nds32_expand_binop_builtin): Ditto.
17487 (nds32_builtin_decl_impl): Ditto.
17488 (builtin_description): Ditto.
17489 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17490 (nds32_init_builtins_impl): Ditto.
17491 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17492 (nds32_builtin_decl): New.
17493 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17494 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17495
17496 2018-03-02 Jeff Law <law@redhat.com>
17497
17498 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17499 (redundant_insn, fill_simple_delay_slots): Likewise.
17500 (fill_slots_from_thread): Likewise.
17501 * resource.c (mark_referenced_resources): Likewise.
17502 (mark_set_resources, find_dead_or_set_registers): Likewise.
17503
17504 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17505
17506 * substring-locations.h (format_warning_va): Formatting fix for
17507 ATTRIBUTE_GCC_DIAG.
17508 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17509 argument.
17510 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17511 * substring-locations.c: Include intl.h.
17512 (format_warning_va): Turned into small wrapper around
17513 format_warning_n_va, renamed to ...
17514 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17515 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17516 use ngettext.
17517 (format_warning_at_substring_n): New function.
17518 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17519 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17520 format_warning_at_substring with just a shorter name instead of
17521 const function pointer.
17522 (fmtwarn_n): New function.
17523 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17524 appropriate, get rid of all the fmtstr temporaries, move conditionals
17525 with G_() wrapped string literals directly into fmtwarn arguments,
17526 cast dir.len to (int), formatting fixes.
17527
17528 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17529
17530 * doc/invoke.texi: Remove "Cilk Plus" references.
17531
17532 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17533 Richard Biener <rguenther@suse.de>
17534
17535 PR ipa/84628
17536 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17537 for error or warning attributes if CALL_FROM_THUNK_P is set.
17538 Formatting fixes.
17539
17540 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17541
17542 PR target/56540
17543 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17544 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17545
17546 PR target/56540
17547 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17548 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17549
17550 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17551 instead of -1U in last predictors element's probability member.
17552
17553 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17554
17555 PR ipa/83983
17556 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17557 arguments if they are comparable.
17558
17559 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17560
17561 PR tree-optimization/84634
17562 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17563 masks and masked_loop_p with a single loop_masks, making sure it's
17564 null for bb vectorization.
17565
17566 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17567
17568 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17569 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17570 loop->force_vectorize to check whether there is no alias.
17571
17572 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17573
17574 PR target/84614
17575 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17576 prototypes.
17577 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17578 comments.
17579 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17580 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17581 instead of a loop around prev_real_insn.
17582 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17583 prev_real_insn.
17584
17585 PR inline-asm/84625
17586 * config/i386/i386.c (ix86_print_operand): Use conditional
17587 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17588 zero vector.
17589
17590 2018-03-02 Richard Biener <rguenther@suse.de>
17591
17592 PR tree-optimization/84427
17593 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17594 (bitmap_set_subtract_values): Rewrite to handle multiple
17595 exprs per value.
17596 (clean): Likewise.
17597 (prune_clobbered_mems): Likewise.
17598 (phi_translate): Take edge instead of pred/phiblock.
17599 (phi_translate_1): Likewise.
17600 (phi_translate_set): Likewise. Insert all translated
17601 exprs for a value into the set, keeping possibly multiple
17602 expressions per value.
17603 (compute_antic_aux): Adjust for phi_translate changes.
17604 When intersecting union the expressions and prune those
17605 not in the final value set, keeping possibly multiple
17606 expressions per value. Do not use value-insertion
17607 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17608 all expressions. Add verification that the value-sets
17609 only shrink during iteration.
17610 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17611 (do_pre_regular_insertion): Likewise.
17612 (do_pre_partial_partial_insertion): Likewise.
17613
17614 2018-03-02 Richard Biener <rguenther@suse.de>
17615
17616 PR target/82005
17617 * config/darwin.c (saved_debug_info_level): New static global.
17618 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17619 (darwin_asm_lto_end): Restore debug info generation settings.
17620
17621 2018-03-01 Martin Liska <mliska@suse.cz>
17622
17623 PR sanitizer/82484
17624 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17625 volatile arguments.
17626
17627 2018-03-01 Richard Biener <rguenther@suse.de>
17628
17629 PR debug/84645
17630 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17631 type annotation with LTO when debug was disabled at compile-time.
17632
17633 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17634
17635 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17636 XINT with INTVAL.
17637 (mips_final_postscan_insn): Likewise.
17638
17639 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17640
17641 PR rtl-optimization/84528
17642 * alias.c (init_alias_target): Add commentary.
17643 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17644 a unique base value if the frame pointer is not eliminated
17645 to the stack pointer.
17646
17647 2018-03-01 Tom de Vries <tom@codesourcery.com>
17648
17649 PR rtl-optimization/83327
17650 * lra-int.h (hard_regs_spilled_into): Declare.
17651 * lra.c (hard_regs_spilled_into): Define.
17652 (init_reg_info): Init hard_regs_spilled_into.
17653 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17654 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17655 (process_bb_lives): Handle hard_regs_spilled_into.
17656 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17657 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17658
17659 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17660
17661 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17662 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17663 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17664 * config/rs6000/aix72.h: New file.
17665
17666 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17667
17668 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17669 instead of warning_at with conditional singular and plural messages
17670 where possible.
17671
17672 PR target/52991
17673 * stor-layout.c (update_alignment_for_field): For
17674 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17675 && !DECL_PACKED (field), do the alignment update, just use
17676 only desired_align instead of MAX (type_align, desired_align)
17677 as the alignment.
17678 (place_field): Don't do known_align < desired_align handling
17679 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17680 is non-NULL, instead do it after rli->prev_field handling and
17681 only if not within a bitfield word. For DECL_PACKED (field)
17682 use type_align of BITS_PER_UNIT.
17683
17684 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17685
17686 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17687 superfluous parentheses and trailing spaces.
17688
17689 2018-02-28 Richard Biener <rguenther@suse.de>
17690
17691 PR tree-optimization/84584
17692 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17693 SCoPs with fake exit edge.
17694
17695 2018-02-28 Martin Liska <mliska@suse.cz>
17696
17697 PR testsuite/84597
17698 * timevar.c (timer::print): Fix format to properly print 100%
17699 values.
17700
17701 2018-02-28 Richard Biener <rguenther@suse.de>
17702
17703 PR middle-end/84607
17704 * genmatch.c (capture_info::walk_match): Do not mark
17705 captured expressions without operands as expr_p given
17706 they act more like predicates and should be subject to
17707 "lost tail" side-effect preserving.
17708
17709 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17710
17711 PR rtl-optimization/81611
17712 * auto-inc-dec.c (attempt_change): Move dead note from
17713 mem_insn if it's the next use of regno
17714 (find_address): Take address use of reg holding
17715 non-incremented value. Add parm to limit search to the named
17716 reg only.
17717 (merge_in_block): Attempt to use a mem insn that is the next
17718 use of the original regno.
17719
17720 2018-02-27 Martin Sebor <msebor@redhat.com>
17721
17722 PR c++/83871
17723 * doc/invoke.texi (-Wmissing-attributes): New option.
17724 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17725
17726 2018-02-27 Martin Sebor <msebor@redhat.com>
17727
17728 PR translation/84207
17729 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17730 n argument to unsigned HOST_WIDE_INT.
17731 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17732 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17733 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17734 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17735
17736 2018-02-27 Richard Biener <rguenther@suse.de>
17737
17738 PR tree-optimization/84512
17739 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17740 Do not use the estimate returned from record_stmt_cost for
17741 the scalar iteration cost but sum properly using add_stmt_cost.
17742
17743 2018-02-27 Richard Biener <rguenther@suse.de>
17744
17745 PR tree-optimization/84466
17746 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17747 Adjust last change to less strictly validate use operands.
17748
17749 2018-02-27 Martin Liska <mliska@suse.cz>
17750
17751 PR gcov-profile/84548
17752 * gcov.c (process_file): Allow partial overlap and consider it
17753 also as group functions.
17754 (output_lines): Properly calculate range of lines for a group.
17755
17756 2018-02-27 Martin Liska <mliska@suse.cz>
17757
17758 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17759 'ggc' suffixes. Change first column width.
17760 (timer::print): Fix formatting of the column.
17761
17762 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17763
17764 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17765 preserve inline entry blocks for the sake of debug inline
17766 entry point markers alone.
17767 (remove_unused_locals): Suggest in comments a better place to
17768 force the preservation of inline entry blocks that are
17769 otherwise unused, but do not preserve them.
17770
17771 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17772
17773 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17774
17775 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17776
17777 PR target/84039
17778 * config/i386/constraints.md (Bs): Replace
17779 ix86_indirect_branch_register with
17780 TARGET_INDIRECT_BRANCH_REGISTER.
17781 (Bw): Likewise.
17782 * config/i386/i386.md (indirect_jump): Likewise.
17783 (tablejump): Likewise.
17784 (*sibcall_memory): Likewise.
17785 (*sibcall_value_memory): Likewise.
17786 Peepholes of indirect call and jump via memory: Likewise.
17787 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17788 (*sibcall_value_GOT_32): Likewise.
17789 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17790 (GOT_memory_operand): Likewise.
17791 (call_insn_operand): Likewise.
17792 (sibcall_insn_operand): Likewise.
17793 (GOT32_symbol_operand): Likewise.
17794 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17795
17796 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17797
17798 PR rtl-optimization/83496
17799 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17800 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17801 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17802 redundant insn, if any.
17803 (relax_delay_slots): Likewise.
17804 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17805
17806 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17807
17808 PR tree-optimization/83965
17809 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17810 that grouped statements are part of a reduction chain. Return
17811 true if the statement is not marked as a reduction itself but
17812 is part of a group.
17813 (vect_recog_dot_prod_pattern): Don't check whether the statement
17814 is part of a group here.
17815 (vect_recog_sad_pattern): Likewise.
17816 (vect_recog_widen_sum_pattern): Likewise.
17817
17818 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17819
17820 PR debug/84545
17821 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17822
17823 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17824
17825 PR target/84530
17826 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17827 the bool argument.
17828 (ix86_output_indirect_function_return): New prototype.
17829 (ix86_split_simple_return_pop_internal): Likewise.
17830 * config/i386/i386.c (indirect_return_via_cx): New.
17831 (indirect_return_via_cx_bnd): Likewise.
17832 (indirect_thunk_name): Handle return va CX_REG.
17833 (output_indirect_thunk_function): Create alias for
17834 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17835 (ix86_output_indirect_jmp): Remove the bool argument.
17836 (ix86_output_indirect_function_return): New function.
17837 (ix86_split_simple_return_pop_internal): Likewise.
17838 * config/i386/i386.md (*indirect_jump): Don't pass false
17839 to ix86_output_indirect_jmp.
17840 (*tablejump_1): Likewise.
17841 (simple_return_pop_internal): Change it to define_insn_and_split.
17842 Call ix86_split_simple_return_pop_internal to split it for
17843 -mfunction-return=.
17844 (simple_return_indirect_internal): Call
17845 ix86_output_indirect_function_return instead of
17846 ix86_output_indirect_jmp.
17847
17848 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17849
17850 PR bootstrap/84405
17851 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17852 memset and value initialization afterwards.
17853
17854 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17855
17856 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17857
17858 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17859
17860 PR target/84521
17861 * common/config/aarch64/aarch64-common.c
17862 (aarch_option_optimization_table[]): Switch
17863 off fomit-frame-pointer
17864
17865 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17866 Chung-Ju Wu <jasonwucj@gmail.com>
17867
17868 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17869 volatile memory.
17870 (store_multiple): Ditto.
17871
17872 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17873
17874 * config.gcc: Add --with-cpu support for nds32 target.
17875 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17876 * config/nds32/nds32.opt: Add -mcpu= option.
17877
17878 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17879
17880 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17881 isel=yes): Warn for these deprecated options.
17882
17883 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17884
17885 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17886 ISA_2_5_MASKS_EMBEDDED.
17887
17888 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17889
17890 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17891 p->max as pointers rather than using iterative_hash_expr.
17892
17893 2018-02-23 Carl Love <cel@us.ibm.com>
17894
17895 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17896 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17897 BU_P8V_OVERLOAD_2.
17898 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17899 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17900 P8V_BUILTIN_VEC_VUNSIGNED2.
17901
17902 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17903
17904 PR target/81572
17905 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17906 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17907 LRA_UNKNOWN_ALT.
17908 * lra-constraints.c (curr_insn_transform): Set up
17909 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17910 LRA_UNKNOWN_ALT.
17911 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17912 * lra-eliminations.c (spill_pseudos): Ditto.
17913 (process_insn_for_elimination): Ditto.
17914 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17915 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17916 LRA_NON_CLOBBERED_ALT.
17917
17918 2018-02-22 Martin Sebor <msebor@redhat.com>
17919
17920 PR tree-optimization/84480
17921 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17922 to maybe_diag_stxncpy_trunc. Call it.
17923 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17924 from gimple_fold_builtin_strcpy. Print inlining stack.
17925 (handle_builtin_stxncpy): Print inlining stack.
17926 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17927
17928 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17929
17930 PR target/84176
17931 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17932 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17933 and -fcheck-pointer-bounds are used together.
17934 (indirect_thunk_prefix): New enum.
17935 (indirect_thunk_need_prefix): New function.
17936 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17937 "_nt" instead of "_bnd" for NOTRACK prefix.
17938 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17939 (output_indirect_thunk_function): Likewise.
17940 (): Likewise.
17941 (ix86_code_end): Update output_indirect_thunk_function calls.
17942 (ix86_output_indirect_branch_via_reg): Replace
17943 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17944 (ix86_output_indirect_branch_via_push): Likewise.
17945 (ix86_output_function_return): Likewise.
17946 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17947 incompatible with -fcf-protection=branch and
17948 -fcheck-pointer-bounds.
17949
17950 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17951
17952 PR target/83335
17953 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17954 Change gcc_assert call to output_operand_lossage.
17955
17956 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17957
17958 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17959
17960 2018-02-22 DJ Delorie <dj@redhat.com>
17961 Sebastian Perta <sebastian.perta@renesas.com>
17962 Oleg Endo <olegendo@gcc.gnu.org>
17963
17964 * config/rx/rx.c (rx_rtx_costs): New function.
17965 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17966
17967 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17968
17969 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17970
17971 2018-02-22 Martin Liska <mliska@suse.cz>
17972
17973 PR driver/83193
17974 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17975 Add "native" as a possible value.
17976
17977 2018-02-22 Martin Liska <mliska@suse.cz>
17978
17979 PR driver/83193
17980 * config/i386/i386.c (ix86_option_override_internal):
17981 Add "native" as a possible value for -march and -mtune.
17982
17983 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17984
17985 PR target/84502
17986 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17987 to all type variants.
17988
17989 PR tree-optimization/84503
17990 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17991 width as info->bitpos + info->bitsize - start.
17992 (merged_store_group::merge_overlapping): Simplify width computation.
17993 (check_no_overlap): New function.
17994 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17995 start + width and last_order of the group, fail if check_no_overlap
17996 fails.
17997 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17998 to group if check_no_overlap fails.
17999
18000 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18001
18002 * config/rs6000/altivec.md: Delete contraint arguments to
18003 define_expand, define_split, and define_peephole2, and in
18004 define_insn_and_split if always unused.
18005 * config/rs6000/darwin.md: Ditto.
18006 * config/rs6000/dfp.md: Ditto.
18007 * config/rs6000/rs6000.md: Ditto.
18008 * config/rs6000/sync.md: Ditto.
18009 * config/rs6000/vector.md: Ditto.
18010 * config/rs6000/vsx.md: Ditto.
18011
18012 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18013
18014 * config/rs6000/altivec.md: Write output control strings as braced
18015 blocks instead of double-quoted strings.
18016 * config/rs6000/darwin.md: Ditto.
18017 * config/rs6000/rs6000.md: Ditto.
18018 * config/rs6000/vector.md: Ditto.
18019 * config/rs6000/vsx.md: Ditto.
18020
18021 2018-02-21 Jason Merrill <jason@redhat.com>
18022
18023 PR c++/84314 - ICE with templates and fastcall attribute.
18024 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18025
18026 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18027
18028 * ipa-cp.c (determine_versionability): Fix comment typos.
18029
18030 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18031
18032 PR c/84229
18033 * ipa-cp.c (determine_versionability): Do not version functions caling
18034 va_arg_pack.
18035
18036 2018-02-21 Martin Liska <mliska@suse.cz>
18037
18038 PR driver/83193
18039 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18040 Add "native" as a possible value.
18041 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18042 the macro when native cpu detection is available.
18043
18044 2018-02-21 Martin Liska <mliska@suse.cz>
18045
18046 PR driver/83193
18047 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18048 Add "native" as a possible value.
18049 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18050 when native cpu detection is available.
18051
18052 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18053 Martin Sebor <msebor@redhat.com>
18054
18055 PR tree-optimization/84478
18056 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18057 false.
18058 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18059 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18060 support which is conservatively correct, for 2 only stay conservative
18061 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18062 argument to the 2 argument get_range_strlen, adjust 6 arg
18063 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18064 false.
18065 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18066 (gimple_fold_builtin_strlen): Pass true as last argument to
18067 get_range_strlen.
18068
18069 2018-02-20 Martin Sebor <msebor@redhat.com>
18070
18071 PR middle-end/84095
18072 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18073 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18074 (builtin_memref::builtin_memref): Factor out parts into
18075 set_base_and_offset and call it.
18076
18077 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18078
18079 PR middle-end/84406
18080 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18081 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18082 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18083 search at the associated MODE_INT.
18084
18085 2018-02-20 Jeff Law <law@redhat.com>
18086
18087 PR middle-end/82123
18088 PR tree-optimization/81592
18089 PR middle-end/79257
18090 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18091 for range data rather than using global data.
18092 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18093 range data rather than using global data.
18094 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18095 pass it to children as needed.
18096 (struct directive::fmtresult): Similarly.
18097 (struct directive::set_width): Similarly.
18098 (struct directive::set_precision): Similarly.
18099 (format_integer, format_directive, parse_directive): Similarly.
18100 (format_none): Accept unnamed vr_values parameter.
18101 (format_percent, format_floating, format_character): Similarly.
18102 (format_string, format_plain): Similarly.
18103 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18104 the EVRP range analyzer for range data rather than using global data.
18105 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18106 gimple-ssa-evrp-analyze.h
18107 (class sprintf_dom_walker): Add after_dom_children member function.
18108 Add evrp_range_analyzer member.
18109 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18110 range analyzer as needed.
18111 (sprintf_dom_walker::after_dom_children): New member function.
18112 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18113 if not optimizing.
18114 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18115 (evrp_range_analyzer::pop_to_marker): Likewise.
18116
18117 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18118
18119 PR tree-optimization/84419
18120 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18121 with the required type if its current type is compatible but
18122 different.
18123
18124 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18125
18126 PR middle-end/82004
18127 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18128 after vectorization.
18129
18130 2018-02-20 Martin Liska <mliska@suse.cz>
18131
18132 PR driver/83193
18133 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18134 possible values if we don't have a hint.
18135
18136 2018-02-20 Martin Liska <mliska@suse.cz>
18137
18138 PR c/84310
18139 PR target/79747
18140 * final.c (shorten_branches): Build align_tab array with one
18141 more element.
18142 * opts.c (finish_options): Add alignment option limit check.
18143 (MAX_CODE_ALIGN): Likewise.
18144 (MAX_CODE_ALIGN_VALUE): Likewise.
18145 * doc/invoke.texi: Document maximum allowed option value for
18146 all -falign-* options.
18147
18148 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18149
18150 PR target/84146
18151 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18152 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18153 * var-tracking.c (emit_note_insn_var_location): Remove all references
18154 to NOTE_INSN_CALL_ARG_LOCATION.
18155 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18156 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18157 Use copy_rtx_if_shared.
18158 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18159 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18160 (dwarf2out_var_location): Remove handling of
18161 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18162 on call_insn.
18163 * final.c (final_scan_insn): Remove all references to
18164 NOTE_INSN_CALL_ARG_LOCATION.
18165 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18166 before dumping final insns.
18167 * except.c (emit_note_eh_region_end): Remove all references to
18168 NOTE_INSN_CALL_ARG_LOCATION.
18169 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18170 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18171 * config/arc/arc.c (hwloop_optimize): Likewise.
18172 * config/arm/arm.c (create_fix_barrier): Likewise.
18173 * config/s390/s390.c (s390_chunkify_start): Likewise.
18174 * config/sh/sh.c (find_barrier): Likewise.
18175 * config/i386/i386.c (rest_of_insert_endbranch,
18176 ix86_seh_fixup_eh_fallthru): Likewise.
18177 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18178 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18179 * config/frv/frv.c (frv_function_prologue): Likewise.
18180 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18181 reg note.
18182 (note_outside_basic_block_p): Remove all references to
18183 NOTE_INSN_CALL_ARG_LOCATION.
18184 * gengtype.c (adjust_field_rtx_def): Likewise.
18185 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18186 Likewise.
18187 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18188 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18189
18190 PR c++/84444
18191 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18192 is ADDR_EXPR.
18193
18194 PR tree-optimization/84452
18195 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18196 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18197 is NULL.
18198
18199 2018-02-19 Martin Liska <mliska@suse.cz>
18200
18201 PR sanitizer/82183
18202 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18203
18204 2018-02-19 Martin Liska <mliska@suse.cz>
18205 Richard Sandiford <richard.sandiford@linaro.org>
18206
18207 PR tree-optimization/82491
18208 * gimple-fold.c (get_base_constructor): Make earlier bail out
18209 to prevent ubsan.
18210
18211 2018-02-19 Carl Love <cel@us.ibm.com>
18212
18213 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18214 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18215 BU_P8V_OVERLOAD_1.
18216 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18217 P8V_BUILTIN_VEC_NEG.
18218
18219 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18220
18221 * config/rl78/rl78.md (movdf): New define expand.
18222
18223 2018-02-19 Martin Liska <mliska@suse.cz>
18224
18225 PR other/80589
18226 * doc/invoke.texi: Fix typo.
18227 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18228
18229 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18230
18231 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18232 handle rs6000_single_float and rs6000_double_float specially for
18233 e500 family CPUs.
18234
18235 2018-02-16 Jeff Law <law@redhat.com>
18236
18237 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18238 (pop_regs): Use it.
18239
18240 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18241
18242 PR ipa/84425
18243 * ipa-inline.c (inline_small_functions): Fix a typo.
18244
18245 2018-02-16 Nathan Sidwell <nathan@acm.org>
18246
18247 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18248
18249 2018-02-16 Carl Love <cel@us.ibm.com>
18250
18251 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18252 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18253 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18254 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18255 expansion to P8V_BUILTIN_VEC_FLOAT2.
18256
18257 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18258
18259 PR rtl-optimization/70023
18260 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18261 src_regno into account.
18262
18263 2018-02-16 Carl Love <cel@us.ibm.com>
18264
18265 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18266 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18267 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18268 * config/rs6000/rs6000.c: Remove case statements for
18269 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18270 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18271 and P9V_BUILTIN_VEC_VINSERT4B.
18272 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18273 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18274 * config/rs6000/vsx.md:
18275 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18276 vec_insert4b.
18277
18278 2018-02-16 Carl Love <cel@us.ibm.com>
18279
18280 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18281 vec_insert4b.
18282 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18283 definitions.
18284 * config/rs6000/rs6000-c.c: Add the definitions for
18285 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18286 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18287 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18288 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18289 definition for insert4b and define insn *insert3b_internal.
18290 * doc/extend.texi: Add documentation for vec_extract4b.
18291
18292 2018-02-16 Nathan Sidwell <nathan@acm.org>
18293
18294 * doc/extend.texi (Backwards Compatibility): Mention friend
18295 injection. Note for-scope is deprecated.
18296 * doc/invoke.texi (-ffriend-injection): Deprecate.
18297
18298 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18299
18300 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18301 that moved to I2, also allow destinations that are a paradoxical
18302 subreg (instead of a normal reg).
18303
18304 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18305
18306 PR target/83831
18307 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18308 to QImode.
18309
18310 2018-02-16 Richard Biener <rguenther@suse.de>
18311
18312 PR tree-optimization/84037
18313 PR tree-optimization/84016
18314 PR target/82862
18315 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18316 Adjust vec_construct for the fact we need additional higher latency
18317 128bit inserts for AVX256 and AVX512 vector builds.
18318 (ix86_add_stmt_cost): Scale vector construction cost for
18319 elementwise loads.
18320
18321 2018-02-16 Richard Biener <rguenther@suse.de>
18322
18323 PR tree-optimization/84417
18324 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18325 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18326 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18327
18328 2018-02-16 Martin Liska <mliska@suse.cz>
18329
18330 PR sanitizer/84307
18331 * internal-fn.def (ASAN_CHECK): Set proper flags.
18332 (ASAN_MARK): Likewise.
18333
18334 2018-02-16 Julia Koval <julia.koval@intel.com>
18335
18336 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18337 from PTA_CANNONLAKE.
18338
18339 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18340
18341 PR target/84272
18342 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18343 Use ++iter rather than iter++ for std::list iterators.
18344 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18345 defer deleting them until all nodes in the forest are processed. Do
18346 free even leaf nodes. Change to_process into auto_vec.
18347
18348 PR bootstrap/84405
18349 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18350 * vec.h (vec_default_construct): Use memset instead of placement new
18351 if BROKEN_VALUE_INITIALIZATION is defined.
18352 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18353 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18354 is defined.
18355
18356 PR rtl-optimization/83723
18357 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18358 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18359 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18360 recursive calls.
18361 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18362 callers.
18363 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18364
18365 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18366
18367 PR rtl-optimization/81443
18368 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18369 from inner REGs to paradoxical SUBREGs.
18370
18371 2018-02-16 Richard Biener <rguenther@suse.de>
18372
18373 PR tree-optimization/84399
18374 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18375 For operands we can analyze at their definition make sure we can
18376 analyze them at each use as well.
18377
18378 2018-02-16 Richard Biener <rguenther@suse.de>
18379
18380 PR tree-optimization/84190
18381 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18382 volatile accesses if the decl isn't volatile.
18383
18384 2018-02-15 Jason Merrill <jason@redhat.com>
18385
18386 PR c++/84314 - ICE with templates and fastcall attribute.
18387 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18388 TYPE_CANONICAL on an existing type.
18389
18390 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18391
18392 PR tree-optimization/84383
18393 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18394 dstoff nor call operand_equal_p if dstbase is NULL.
18395
18396 PR tree-optimization/84334
18397 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18398 also a CONSTANT_CLASS_P, punt.
18399
18400 2018-02-14 Jim Wilson <jimw@sifive.com>
18401
18402 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18403 first SMALL_OPERAND check. New local min_second_step. Move assert
18404 to where locals are set. Add TARGET_RVC support.
18405 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18406
18407 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18408
18409 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18410
18411 2018-02-14 Martin Sebor <msebor@redhat.com>
18412
18413 PR tree-optimization/83698
18414 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18415 arrays constrain the offset range to their bounds.
18416 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18417 (builtin_access::overlap): Avoid setting the size of overlap if it's
18418 already been set.
18419 (maybe_diag_overlap): Also consider arrays when deciding what values
18420 of offsets to include in diagnostics.
18421
18422 2018-02-14 Martin Sebor <msebor@redhat.com>
18423
18424 PR c/84108
18425 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18426 that correspond to the kind of a declaration.
18427
18428 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18429
18430 PR target/83984
18431 * config/pa/pa.md: Load address of PIC label using the linkage table
18432 if the label is nonlocal.
18433
18434 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18435
18436 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18437 warning message if user requests -maltivec=be.
18438 * doc/invoke.texi: Document deprecation of -maltivec=be.
18439
18440 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18441
18442 PR target/84220
18443 * config/rs6000/rs6000-c.c: Update definitions for
18444 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18445 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18446
18447 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18448
18449 PR target/84239
18450 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18451 add _get_ssp intrinsics. Remove argument from
18452 __builtin_ia32_rdssp[d|q].
18453 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18454 * config/i386/i386-builtin.def: Remove argument from
18455 __builtin_ia32_rdssp[d|q].
18456 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18457 ix86_expand_special_args_builtin for _rdssp[d|q].
18458 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18459 Clear register before usage.
18460 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18461 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18462
18463 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18464
18465 PR tree-optimization/84357
18466 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18467 operand 1 of an ARRAY_REF too.
18468
18469 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18470
18471 PR target/83831
18472 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18473 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18474 declarations.
18475 (set_of_reg): New struct.
18476 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18477 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18478 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18479 functions.
18480 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18481 Split into bitclr, bitset, bitinvert patterns if appropriate.
18482 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18483 use rx_fuse_in_memory_bitop.
18484 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18485 to named insn, correct maximum insn length.
18486
18487 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18488
18489 PR target/79242
18490 * machmode.def: Define a complex mode for PARTIAL_INT.
18491 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18492 MODE_PARTIAL_INT.
18493 * doc/rtl.texi: Document CSPImode.
18494 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18495 handling.
18496 (msp430_hard_regno_nregs_with_padding): Likewise.
18497
18498 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18499
18500 PR target/84279
18501 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18502
18503 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18504
18505 PR rtl-optimization/84169
18506 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18507 we generated a parallel as new i3 and we split that to new i2 and i3
18508 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18509 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18510 those to i2, not i1. Partially rewrite this scan code.
18511
18512 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18513
18514 PR c/82210
18515 * stor-layout.c (place_field): For variable length fields, adjust
18516 offset_align afterwards not just based on the field's alignment,
18517 but also on the size.
18518
18519 PR middle-end/84309
18520 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18521 of exps and logs in the use_exp2 case.
18522
18523 2018-02-13 Jeff Law <law@redhat.com>
18524
18525 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18526 entry for "vector".
18527
18528 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18529 ARGS as unused.
18530
18531 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18532
18533 PR debug/84342
18534 PR debug/84319
18535 * common.opt (gas-loc-support, gas-locview-support): New.
18536 (ginline-points, ginternal-reset-location-views): New.
18537 * doc/invoke.texi: Document them. Use @itemx where intended.
18538 (gvariable-location-views): Adjust.
18539 * target.def (reset_location_view): New.
18540 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18541 (TARGET_RESET_LOCATION_VIEW): New.
18542 * doc/tm.texi: Rebuilt.
18543 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18544 (dwarf2out_default_as_locview_support): New.
18545 (output_asm_line_debug_info): Use option variables.
18546 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18547 (output_loc_list): Likewise.
18548 (add_high_low_attributes): Check option variables.
18549 Don't output entry view attribute in strict mode.
18550 (gen_inlined_subroutine_die): Check option variables.
18551 (dwarf2out_inline_entry): Likewise.
18552 (init_sections_and_labels): Likewise.
18553 (dwarf2out_early_finish): Likewise.
18554 (maybe_reset_location_view): New, from...
18555 (dwarf2out_var_location): ... here. Call it.
18556 * debug.h (dwarf2out_default_as_loc_support): Declare.
18557 (dwarf2out_default_as_locview_support): Declare.
18558 * hooks.c (hook_int_rtx_insn_0): New.
18559 * hooks.h (hook_int_rtx_insn_0): Declare.
18560 * toplev.c (process_options): Take -gas-loc-support and
18561 -gas-locview-support from dwarf2out. Enable
18562 -gvariable-location-views by default only with locview
18563 assembler support. Enable -ginternal-reset-location-views by
18564 default only if the target defines the corresponding hook.
18565 Enable -ginline-points by default if location views are
18566 enabled; force it disabled if statement frontiers are
18567 disabled.
18568 * tree-inline.c (expand_call_inline): Check option variables.
18569 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18570
18571 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18572
18573 PR tree-optimization/84321
18574 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18575 handling. Also check whether the anti-range contains any values
18576 that satisfy the mask; switch to a VR_RANGE if not.
18577
18578 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18579
18580 PR sanitizer/84340
18581 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18582
18583 2018-02-13 Martin Jambor <mjambor@suse.cz>
18584
18585 PR c++/83990
18586 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18587 of call statements, also set location of a load to a temporary.
18588
18589 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18590
18591 * config/rl78/rl78.c (add_vector_labels): New function.
18592 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18593 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18594 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18595 which checks that no arguments are passed.
18596 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18597 * doc/extend.texi: Documentation for the new attribute.
18598
18599 2018-02-13 Andreas Schwab <schwab@suse.de>
18600
18601 * config/riscv/linux.h (CPP_SPEC): Define.
18602
18603 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18604
18605 PR target/84335
18606 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18607 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18608 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18609 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18610 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18611 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18612 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18613 temporarily for AES and PCLMUL builtins.
18614
18615 PR tree-optimization/84339
18616 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18617 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18618 Formatting fixes.
18619
18620 PR middle-end/84309
18621 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18622 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18623 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18624 inline function.
18625 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18626 inline function.
18627 * omp-simd-clone.h: New file.
18628 * omp-simd-clone.c: Include omp-simd-clone.h.
18629 (expand_simd_clones): No longer static.
18630 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18631 cgraph.h and omp-simd-clone.h.
18632 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18633 (vect_recog_widen_shift_pattern): Formatting fix.
18634 (vect_pattern_recog_1): Don't check optab for calls.
18635
18636 PR target/84336
18637 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18638 operands[2] into a REG before using gen_lowpart on it.
18639
18640 2018-02-12 Jeff Law <law@redhat.com>
18641
18642 PR target/83760
18643 * config/sh/sh.c (find_barrier): Consider a sibling call
18644 a barrier as well.
18645
18646 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18647 successfully back substituting a reg.
18648
18649 2018-02-12 Richard Biener <rguenther@suse.de>
18650
18651 PR tree-optimization/84037
18652 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18653 parameter, move visited init to caller.
18654 (vect_slp_analyze_operations): Separate cost from validity
18655 check, initialize visited once for all instances.
18656 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18657 for all instances.
18658 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18659 out an assert.
18660 (vect_model_promotion_demotion_cost): Likewise.
18661 (vectorizable_bswap): Guard cost modeling with !slp_node
18662 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18663 SLP stmts.
18664 (vectorizable_call): Likewise.
18665 (vectorizable_conversion): Likewise.
18666 (vectorizable_assignment): Likewise.
18667 (vectorizable_shift): Likewise.
18668 (vectorizable_operation): Likewise.
18669 (vectorizable_store): Likewise.
18670 (vectorizable_load): Likewise.
18671 (vectorizable_condition): Likewise.
18672 (vectorizable_comparison): Likewise.
18673
18674 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18675
18676 PR sanitizer/84307
18677 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18678 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18679 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18680
18681 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18682
18683 PR middle-end/83665
18684 * params.def (inline-min-speedup): Increase from 8 to 15.
18685 (max-inline-insns-auto): Decrease from 40 to 30.
18686 * ipa-split.c (consider_split): Add some buffer for function to
18687 be considered inlining candidate.
18688 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18689 default values.
18690
18691 2018-02-12 Richard Biener <rguenther@suse.de>
18692
18693 PR tree-optimization/84037
18694 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18695 matched stmts if we cannot swap the non-matched ones.
18696
18697 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18698
18699 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18700 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18701 _mm_maskz_scalef_round_ss): New intrinsics.
18702 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18703 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18704 __builtin_ia32_scalefss_round): Remove.
18705 (__builtin_ia32_scalefsd_mask_round,
18706 __builtin_ia32_scalefss_mask_round): New intrinsics.
18707 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18708 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18709 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18710 "<round_constraint>")): Changed to ...
18711 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18712 "<round_scalar_constraint>")): ... this.
18713 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18714 %0, %1, %2<round_op3>}"): Changed to ...
18715 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18716 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18717 %2<round_scalar_mask_op3>}"): ... this.
18718 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18719
18720 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18721
18722 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18723 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18724 (_mm_maskz_sqrt_round_ss): New intrinsics.
18725 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18726 (__builtin_ia32_sqrtsd_mask_round)
18727 (__builtin_ia32_sqrtss_mask_round): New builtins.
18728 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18729 (__builtin_ia32_sqrtss_round): Remove.
18730 (__builtin_ia32_sqrtsd_mask_round)
18731 (__builtin_ia32_sqrtss_mask_round): New builtins.
18732 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18733 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18734 ((match_operand:VF_128 1 "vector_operand"
18735 "xBm,<round_constraint>")): Changed to ...
18736 ((match_operand:VF_128 1 "vector_operand"
18737 "xBm,<round_scalar_constraint>")): ... this.
18738 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18739 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18740 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18741 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18742 %<iptr>1<round_scalar_mask_op3>}): ... this.
18743 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18744 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18745
18746 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18747
18748 PR target/84266
18749 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18750 Cast vec_cmpeq result to correct type.
18751 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18752 Cast vec_cmpgt result to correct type.
18753
18754 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18755
18756 * final.c (final_scan_insn_1): Renamed from...
18757 (final_scan_insn): ... this. New wrapper, to recover
18758 seen from the outermost call in recursive ones.
18759 * config/sparc/sparc.c (output_return): Drop seen from call.
18760 (output_sibcall): Likewise.
18761 * config/visium/visium.c (output_branch): Likewise.
18762
18763 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18764
18765 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18766 function label.
18767
18768 2018-02-10 Alan Modra <amodra@gmail.com>
18769
18770 PR target/84300
18771 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18772 Specify LR as an input.
18773
18774 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18775
18776 PR sanitizer/83987
18777 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18778 remove_member_access_dummy_vars): New functions.
18779 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18780 lower_omp_1, execute_lower_omp): Use them.
18781
18782 PR rtl-optimization/84308
18783 * shrink-wrap.c (spread_components): Release todo vector.
18784
18785 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18786
18787 PR rtl-optimization/57193
18788 * ira-color.c (struct allocno_color_data): Add member
18789 conflict_allocno_hard_prefs.
18790 (update_conflict_allocno_hard_prefs): New.
18791 (bucket_allocno_compare_func): Add a preference based on
18792 conflict_allocno_hard_prefs.
18793 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18794 (color_allocnos): Remove a dead code. Initiate
18795 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18796
18797 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18798
18799 PR target/84226
18800 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18801 constraint from =wa to wa. Avoid a subreg on the output operand,
18802 instead use a pseudo and subreg it in a move.
18803 (p9_xxbrd_<mode>): Changed to ...
18804 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18805 (p9_xxbrd_v2df): New expander.
18806 (p9_xxbrw_<mode>): Changed to ...
18807 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18808 (p9_xxbrw_v4sf): New expander.
18809
18810 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18811
18812 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18813
18814 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18815
18816 PR target/83926
18817 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18818 multiply in 32-bit mode.
18819 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18820 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18821 mode.
18822
18823 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18824
18825 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18826 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18827 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18828 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18829
18830 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18831
18832 PR lto/84213
18833 * dwarf2out.c (is_trivial_indirect_ref): New function.
18834 (dwarf2out_late_global_decl): Do not generate a location
18835 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18836 and that are not defined in the current unit.
18837
18838 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18839
18840 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18841 instead of a libcall for UNORDERED.
18842
18843 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18844
18845 PR target/82641
18846 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18847 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18848
18849 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18850
18851 PR target/PR84295
18852 * config/s390/s390.c (s390_set_current_function): Invoke
18853 s390_indirect_branch_settings also if fndecl didn't change.
18854
18855 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18856
18857 * config/rs6000/rs6000.md (blockage): Set length to zero.
18858
18859 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18860
18861 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18862
18863 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18864
18865 PR sanitizer/84285
18866 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18867 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18868 -static-lib*san.
18869
18870 PR debug/84252
18871 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18872 PARALLEL incoming that failed vt_get_decl_and_offset check.
18873
18874 PR middle-end/84237
18875 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18876 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18877 TREE_READONLY bit.
18878 (get_variable_section): For decls in named .bss* sections pass true as
18879 second argument to bss_initializer_p.
18880
18881 2018-02-09 Marek Polacek <polacek@redhat.com>
18882 Jakub Jelinek <jakub@redhat.com>
18883
18884 PR c++/83659
18885 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18886 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18887 Sync some changes from cxx_fold_indirect_ref.
18888
18889 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18890
18891 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18892 markers.
18893 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18894 (BLOCK_INLINE_ENTRY_LABEL): New.
18895 (dwarf2out_var_location): Disregard inline entry markers.
18896 (inline_entry_data): New struct.
18897 (inline_entry_data_hasher): New hashtable type.
18898 (inline_entry_data_hasher::hash): New.
18899 (inline_entry_data_hasher::equal): New.
18900 (inline_entry_data_table): New variable.
18901 (add_high_low_attributes): Add DW_AT_entry_pc and
18902 DW_AT_GNU_entry_view attributes if a pending entry is found
18903 in inline_entry_data_table. Add old entry_pc attribute only
18904 if debug nonbinding markers are disabled.
18905 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18906 markers are enabled.
18907 (block_within_block_p, dwarf2out_inline_entry): New.
18908 (dwarf2out_finish): Check that no entries remained in
18909 inline_entry_data_table.
18910 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18911 (final_scan_insn, notice_source_line): Likewise.
18912 (rest_of_clean_state): Skip inline entry markers.
18913 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18914 markers.
18915 * gimple.c (gimple_build_debug_inline_entry): New.
18916 * gimple.h (enum gimple_debug_subcode): Add
18917 GIMPLE_DEBUG_INLINE_ENTRY.
18918 (gimple_build_debug_inline_entry): Declare.
18919 (gimple_debug_inline_entry_p): New.
18920 (gimple_debug_nonbind_marker_p): Adjust.
18921 * insn-notes.def (INLINE_ENTRY): New.
18922 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18923 inline entry marker notes.
18924 (print_insn): Likewise.
18925 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18926 (INSN_DEBUG_MARKER_KIND): Likewise.
18927 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18928 * tree-inline.c (expand_call_inline): Build and insert
18929 debug_inline_entry stmt.
18930 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18931 inline entry blocks early, if nonbind markers are enabled.
18932 (dump_scope_block): Dump fragment info.
18933 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18934 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18935 (gimple_build_debug_inline_entry): New.
18936 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18937 Enable/disable inline entry points too.
18938 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18939 (DEBUG_INSN): Describe inline entry markers.
18940
18941 * common.opt (gvariable-location-views): New.
18942 (gvariable-location-views=incompat5): New.
18943 * config.in: Rebuilt.
18944 * configure: Rebuilt.
18945 * configure.ac: Test assembler for view support.
18946 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18947 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18948 * dwarf2out.c (var_loc_view): New typedef.
18949 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18950 (dwarf2out_locviews_in_attribute): New.
18951 (dwarf2out_locviews_in_loclist): New.
18952 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18953 (enum dw_line_info_opcode): Add LI_adv_address.
18954 (struct dw_line_info_table): Add view.
18955 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18956 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18957 (zero_view_p): New variable.
18958 (ZERO_VIEW_P): New macro.
18959 (output_asm_line_debug_info): New.
18960 (struct var_loc_node): Add view.
18961 (add_AT_view_list, AT_loc_list): New.
18962 (add_var_loc_to_decl): Add view param. Test it against last.
18963 (new_loc_list): Add view params. Record them.
18964 (AT_loc_list_ptr): Handle loc and view lists.
18965 (view_list_to_loc_list_val_node): New.
18966 (print_dw_val): Handle dw_val_class_view_list.
18967 (size_of_die): Likewise.
18968 (value_format): Likewise.
18969 (loc_list_has_views): New.
18970 (gen_llsym): Set vl_symbol too.
18971 (maybe_gen_llsym, skip_loc_list_entry): New.
18972 (dwarf2out_maybe_output_loclist_view_pair): New.
18973 (output_loc_list): Output view list or entries too.
18974 (output_view_list_offset): New.
18975 (output_die): Handle dw_val_class_view_list.
18976 (output_dwarf_version): New.
18977 (output_compilation_unit_header): Use it.
18978 (output_skeleton_debug_sections): Likewise.
18979 (output_rnglists, output_line_info): Likewise.
18980 (output_pubnames, output_aranges): Update version comments.
18981 (output_one_line_info_table): Output view numbers in asm comments.
18982 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18983 Call maybe_gen_llsym.
18984 (loc_list_from_tree_1): Adjust.
18985 (add_AT_location_description): Create view list attribute if
18986 needed, check it's absent otherwise.
18987 (convert_cfa_to_fb_loc_list): Adjust.
18988 (maybe_emit_file): Call output_asm_line_debug_info for test.
18989 (dwarf2out_var_location): Reset views as needed. Precompute
18990 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18991 attribute. Set view.
18992 (new_line_info_table): Reset next view.
18993 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18994 (dwarf2out_source_line): Likewise. Output view resets and labels to
18995 the assembler, or select appropriate line info opcodes.
18996 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18997 (optimize_string_length): Catch it. Adjust.
18998 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18999 dw_val_class_view_list, and remove it if no longer needed.
19000 (hash_loc_list): Hash view numbers.
19001 (loc_list_hasher::equal): Compare them.
19002 (optimize_location_lists): Check whether a view list symbol is
19003 needed, and whether the locview attribute is present, and
19004 whether they match. Remove the locview attribute if no longer
19005 needed.
19006 (index_location_lists): Call skip_loc_list_entry for test.
19007 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19008 Use output_dwarf_version.
19009 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19010 (struct dw_val_node): Add val_view_list.
19011 * final.c (SEEN_NEXT_VIEW): New.
19012 (set_next_view_needed): New.
19013 (clear_next_view_needed): New.
19014 (maybe_output_next_view): New.
19015 (final_start_function): Rename to...
19016 (final_start_function_1): ... this. Take pointer to FIRST,
19017 add SEEN parameter. Emit param bindings in the initial view.
19018 (final_start_function): Reintroduce SEEN-less interface.
19019 (final): Rename to...
19020 (final_1): ... this. Take SEEN parameter. Output final pending
19021 next view at the end.
19022 (final): Reintroduce seen-less interface.
19023 (final_scan_insn): Output pending next view before switching
19024 sections or ending a block. Mark the next view as needed when
19025 outputting variable locations. Notify debug backend of section
19026 changes, and of location view changes.
19027 (rest_of_handle_final): Adjust.
19028 * toplev.c (process_options): Autodetect value for debug variable
19029 location views option. Warn on incompat5 without -gdwarf-5.
19030 * doc/invoke.texi (gvariable-location-views): New.
19031 (gvariable-location-views=incompat5): New.
19032 (gno-variable-location-views): New.
19033
19034 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19035
19036 PR tree-optimization/84136
19037 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19038 that the result of find_edge is non-NULL.
19039
19040 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19041
19042 PR target/83008
19043 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19044 storing integer register in SImode. Fix cost of 256 and 512
19045 byte aligned SSE register store.
19046
19047 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19048
19049 * config/i386/i386.c (ix86_multiplication_cost): Fix
19050 multiplication cost for TARGET_AVX512DQ.
19051
19052 2018-02-08 Marek Polacek <polacek@redhat.com>
19053
19054 PR tree-optimization/84238
19055 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19056 get_range_strlen.
19057
19058 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19059
19060 PR tree-optimization/84265
19061 * tree-vect-stmts.c (vectorizable_store): Don't treat
19062 VMAT_CONTIGUOUS accesses as grouped.
19063 (vectorizable_load): Likewise.
19064
19065 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19066
19067 PR tree-optimization/81635
19068 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19069 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19070 (test_round_for_mask): New functions.
19071 (wide_int_cc_tests): Call test_round_for_mask.
19072 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19073 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19074 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19075 range returned by get_range_info.
19076
19077 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19078
19079 PR ipa/81360
19080 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19081 * symtab.c: Include builtins.h
19082 (symtab_node::output_to_lto_symbol_table_p): Move here
19083 from lto-streamer-out.c:output_symbol_p.
19084 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19085 (output_symbol_p): Move all logic to symtab.c
19086 (produce_symtab): Update.
19087
19088 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19089
19090 * config/s390/s390-opts.h (enum indirect_branch): Define.
19091 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19092 (s390_indirect_branch_via_thunk)
19093 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19094 (enum s390_indirect_branch_type): Define.
19095 * config/s390/s390.c (struct s390_frame_layout, struct
19096 machine_function): Remove.
19097 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19098 (indirect_branch_table_label_no, indirect_branch_table_name):
19099 Define variables.
19100 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19101 (enum s390_indirect_branch_option): Define.
19102 (s390_return_addr_from_memory): New function.
19103 (s390_handle_string_attribute): New function.
19104 (s390_attribute_table): Add new attribute handler.
19105 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19106 (s390_indirect_branch_via_thunk): New function.
19107 (s390_indirect_branch_via_inline_thunk): New function.
19108 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19109 sibling call optimization for non z10 compiles.
19110 (s390_emit_call): Force indirect branch target to be a single
19111 register. Add r1 clobber for non-z10 compiles.
19112 (s390_emit_epilogue): Emit return jump via return_use expander.
19113 (s390_reorg): Handle JUMP_INSNs as execute targets.
19114 (s390_option_override_internal): Perform validity checks for the
19115 new command line options.
19116 (s390_indirect_branch_attrvalue): New function.
19117 (s390_indirect_branch_settings): New function.
19118 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19119 (s390_output_indirect_thunk_function): New function.
19120 (s390_code_end): Implement target hook.
19121 (s390_case_values_threshold): Implement target hook.
19122 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19123 macros.
19124 * config/s390/s390.h (struct s390_frame_layout)
19125 (struct machine_function): Move here from s390.c.
19126 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19127 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19128 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19129 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19130 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19131 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19132 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19133 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19134 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19135 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19136 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19137 (mnemonic attribute): Add values which aren't recognized
19138 automatically.
19139 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19140 pattern for branch conversion. Fix mnemonic attribute.
19141 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19142 indirect branch via thunk if requested.
19143 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19144 ("*indirect_jump"): Disable for branch conversion using out of
19145 line thunks.
19146 ("indirect_jump_via_thunk<mode>_z10")
19147 ("indirect_jump_via_thunk<mode>")
19148 ("indirect_jump_via_inlinethunk<mode>_z10")
19149 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19150 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19151 ("casesi_jump_via_inlinethunk<mode>_z10")
19152 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19153 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19154 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19155 ("*indirect2_jump"): Disable for branch conversion.
19156 ("casesi_jump"): Turn into expander and expand patterns for branch
19157 conversion.
19158 ("return_use"): New expander.
19159 ("*return"): Emit return via thunk and rename it to ...
19160 ("*return<mode>"): ... this one.
19161 * config/s390/s390.opt: Add new options and and enum for the
19162 option values.
19163
19164 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19165
19166 * lra-constraints.c (match_reload): Unconditionally use
19167 gen_lowpart_SUBREG, rather than selecting between that
19168 and equivalent gen_rtx_SUBREG code.
19169
19170 2018-02-08 Richard Biener <rguenther@suse.de>
19171
19172 PR tree-optimization/84233
19173 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19174 changed flag instead of boguously re-using phi_inserted.
19175
19176 2018-02-08 Martin Jambor <mjambor@suse.cz>
19177
19178 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19179 static local variables.
19180
19181 2018-02-08 Richard Biener <rguenther@suse.de>
19182
19183 PR tree-optimization/84278
19184 * tree-vect-stmts.c (vectorizable_store): When looking for
19185 smaller vector types to perform grouped strided loads/stores
19186 make sure the mode is supported by the target.
19187 (vectorizable_load): Likewise.
19188
19189 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19190
19191 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19192 Increase LDP/STP opportunities by adding adjacent callee-saves.
19193
19194 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19195
19196 PR rtl-optimization/84068
19197 PR rtl-optimization/83459
19198 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19199
19200 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19201
19202 PR tree-optimization/84224
19203 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19204 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19205 non-zero arguments.
19206
19207 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19208
19209 PR target/84113
19210 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19211 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19212 count, remove one USE.
19213
19214 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19215
19216 * doc/install.texi (Configuration): Document the
19217 --with-long-double-format={ibm,ieee} PowerPC configuration
19218 options.
19219
19220 PR target/84154
19221 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19222 Convert from define_expand to be define_insn_and_split. Rework
19223 float/double/_Float128 conversions to QI/HI/SImode to work with
19224 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19225 conversions to QI/HImode types did a store and then a load to
19226 truncate the value. For conversions to VSX registers, don't split
19227 the insn, instead emit the code directly. Use the code iterator
19228 any_fix to combine signed and unsigned conversions.
19229 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19230 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19231 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19232 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19233 (fix_<mode>di2_hw): Likewise.
19234 (fixuns_<mode>di2_hw): Likewise.
19235 (fix_<mode>si2_hw): Likewise.
19236 (fixuns_<mode>si2_hw): Likewise.
19237 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19238 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19239 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19240 fix<uns>_trunc<SFDF:mode>si2_p8.
19241 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19242 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19243 (fix<uns>_<mode>_mem): Likewise.
19244 (fctiw<u>z_<mode>_mem): Likewise.
19245 (fix<uns>_<mode>_mem): Likewise.
19246 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19247 the register allocator from doing a direct move to the GPRs to do
19248 a store, and instead use the ISA 3.0 store byte/half-word from
19249 vector register instruction. For IEEE 128-bit floating point,
19250 also optimize stores of 32-bit ints.
19251 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19252
19253 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19254
19255 * genextract.c (push_pathstr_operand): New function to support
19256 [a-zA-Z].
19257 (walk_rtx): Call push_pathstr_operand.
19258 (print_path): Support [a-zA-Z].
19259
19260 2018-02-07 Richard Biener <rguenther@suse.de>
19261
19262 PR tree-optimization/84037
19263 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19264 (cse_and_gimplify_to_preheader): Declare.
19265 (vect_get_place_in_interleaving_chain): Likewise.
19266 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19267 ivexpr_map.
19268 (_loop_vec_info::~_loop_vec_info): Delete it.
19269 (cse_and_gimplify_to_preheader): New function.
19270 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19271 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19272 (vectorizable_load): Likewise. For grouped stores always base
19273 the IV on the first element.
19274 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19275 condition before gimplifying.
19276
19277 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19278
19279 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19280 *DIV_EXPR and *MOD_EXPR.
19281
19282 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19283
19284 PR target/84248
19285 * config/i386/i386.c (ix86_option_override_internal): Mask out
19286 the CF_SET bit when checking -fcf-protection.
19287
19288 2018-02-07 Tom de Vries <tom@codesourcery.com>
19289
19290 PR libgomp/84217
19291 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19292 enough.
19293
19294 2018-02-07 Richard Biener <rguenther@suse.de>
19295
19296 PR tree-optimization/84204
19297 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19298 this place.
19299
19300 PR tree-optimization/84205
19301 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19302 special-case isl_ast_op_zdiv_r.
19303
19304 PR tree-optimization/84223
19305 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19306 Only add conditions from within the region.
19307 (gather_bbs::after_dom_children): Adjust.
19308
19309 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19310
19311 PR target/84209
19312 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19313 * config/avr/avr.md: Only post-reload split REG-REG moves if
19314 either register is GENERAL_REG_P.
19315
19316 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19317
19318 PR tree-optimization/84235
19319 * tree-ssa-scopedtables.c
19320 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19321 if the subtraction is performed in floating point type where NaNs are
19322 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19323 build 1. Formatting fix.
19324
19325 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19326
19327 PR target/84146
19328 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19329 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19330 and skip it regardless of bb boundaries. Use CALL_P macro,
19331 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19332 unnecessarily, formatting fix.
19333
19334 2018-02-06 Michael Collison <michael.collison@arm.com>
19335
19336 * config/arm/thumb2.md:
19337 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19338 (*thumb_mov_notscc): Ditto.
19339
19340 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19341
19342 PR target/84154
19343 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19344 unsigned_fix, not "s".
19345
19346 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19347
19348 * configure.ac (gcc_fn_eh_frame_ro): New function.
19349 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19350 correct .eh_frame permissions.
19351 * configure: Regenerate.
19352
19353 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19354
19355 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19356 irrelevant options.
19357
19358 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19359
19360 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19361 Display warning message for -mno-speculate-indirect-jumps.
19362
19363 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19364
19365 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19366 Undocumented.
19367 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19368
19369 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19370
19371 PR tree-optimization/84225
19372 * tree-eh.c (find_trapping_overflow): Only call
19373 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19374
19375 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19376
19377 PR target/84145
19378 * config/i386/i386.c: Reimplement the check of possible options
19379 -mibt/-mshstk conbination. Change error messages.
19380 * doc/invoke.texi: Fix a typo: remove extra '='.
19381
19382 2018-02-06 Marek Polacek <polacek@redhat.com>
19383
19384 PR tree-optimization/84228
19385 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19386
19387 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19388
19389 PR target/82641
19390 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19391 emitted arch directives.
19392 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19393 __ARM_FEATURE_COPROC before changing architectures.
19394
19395 2018-02-06 Richard Biener <rguenther@suse.de>
19396
19397 * config/i386/i386.c (print_reg): Fix typo.
19398 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19399
19400 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19401
19402 * configure: Regenerate.
19403
19404 2018-02-05 Martin Sebor <msebor@redhat.com>
19405
19406 PR tree-optimization/83369
19407 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19408 inlining context.
19409
19410 2018-02-05 Martin Liska <mliska@suse.cz>
19411
19412 * doc/invoke.texi: Cherry-pick upstream r323995.
19413
19414 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19415
19416 * ira.c (ira_init_register_move_cost): Adjust comment.
19417
19418 2018-02-05 Martin Liska <mliska@suse.cz>
19419
19420 PR gcov-profile/84137
19421 * doc/gcov.texi: Fix typo in documentation.
19422
19423 2018-02-05 Martin Liska <mliska@suse.cz>
19424
19425 PR gcov-profile/83879
19426 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19427 using dlopen functionality.
19428
19429 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19430
19431 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19432 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19433 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19434 _mm_maskz_range_round_ss): New intrinsics.
19435 (__builtin_ia32_rangesd128_round)
19436 (__builtin_ia32_rangess128_round): Remove.
19437 (__builtin_ia32_rangesd128_mask_round,
19438 __builtin_ia32_rangess128_mask_round): New builtins.
19439 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19440 __builtin_ia32_rangess128_round): Remove.
19441 (__builtin_ia32_rangesd128_mask_round,
19442 __builtin_ia32_rangess128_mask_round): New builtins.
19443 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19444 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19445 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19446 "<round_saeonly_constraint>")): Changed to ...
19447 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19448 "<round_saeonly_scalar_constraint>")): ... this.
19449 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19450 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19451 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19452 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19453 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19454
19455 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19456
19457 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19458 options.
19459 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19460 Remove all values except native, 8540 and 8548.
19461
19462 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19463
19464 * config/i386/i386.c (ix86_output_function_return): Pass
19465 INVALID_REGNUM, instead of -1, as invalid register number to
19466 indirect_thunk_name and output_indirect_thunk.
19467
19468 2018-02-02 Julia Koval <julia.koval@intel.com>
19469
19470 * config.gcc: Add -march=icelake.
19471 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19472 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19473 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19474 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19475 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19476 (processor_target_table): Add icelake.
19477 (ix86_option_override_internal): Handle new PTAs.
19478 (get_builtin_code_for_version): Handle icelake.
19479 (M_INTEL_COREI7_ICELAKE): New.
19480 (fold_builtin_cpu): Handle icelake.
19481 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19482 * doc/invoke.texi: Add -march=icelake.
19483
19484 2018-02-02 Julia Koval <julia.koval@intel.com>
19485
19486 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19487 to wide_int_bitmask.
19488 * wide-int-bitmask.h: New.
19489
19490 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19491
19492 PR target/84066
19493 * config/i386/i386.md: Replace Pmode with word_mode in
19494 builtin_setjmp_setup and builtin_longjmp to support x32.
19495
19496 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19497
19498 PR target/56010
19499 PR target/83743
19500 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19501 #include "opts.h".
19502 (rs6000_supported_cpu_names): New static variable.
19503 (linux_cpu_translation_table): Likewise.
19504 (elf_platform) <cpu>: Define new static variable and use it.
19505 Translate kernel AT_PLATFORM name to canonical name if needed.
19506 Error if platform name is unknown.
19507
19508 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19509
19510 PR target/84089
19511 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19512
19513 2018-02-01 Jeff Law <law@redhat.com>
19514
19515 PR target/84128
19516 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19517 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19518 the scratch if RELEASE_VIA_POP is false.
19519 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19520 If we have to save a temporary register, decrement SIZE appropriately.
19521 Pass new arguments to release_scratch_register_on_entry.
19522 (ix86_adjust_stack_and_probe): Likewise.
19523 (ix86_emit_probe_stack_range): Pass new arguments to
19524 release_scratch_register_on_entry.
19525
19526 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19527
19528 PR rtl-optimization/84157
19529 * combine.c (change_zero_ext): Use REG_P predicate in
19530 front of HARD_REGISTER_P predicate.
19531
19532 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19533
19534 * config/avr/avr.c (avr_option_override): Move disabling of
19535 -fdelete-null-pointer-checks to...
19536 * common/config/avr/avr-common.c (avr_option_optimization_table):
19537 ...here.
19538
19539 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19540
19541 PR tree-optimization/81635
19542 * tree-data-ref.c (split_constant_offset_1): For types that
19543 wrap on overflow, try to use range info to prove that wrapping
19544 cannot occur.
19545
19546 2018-02-01 Renlin Li <renlin.li@arm.com>
19547
19548 PR target/83370
19549 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19550 TAILCALL_ADDR_REGS.
19551 (aarch64_register_move_cost): Likewise.
19552 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19553 TAILCALL_ADDR_REGS.
19554 (REG_CLASS_NAMES): Likewise.
19555 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19556 TAILCALL_ADDR_REGS. Remove IP registers.
19557 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19558
19559 2018-02-01 Richard Biener <rguenther@suse.de>
19560
19561 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19562 for specifying RPO order and allow NULL for that.
19563 * domwalk.c (dom_walker::dom_walker): Likewise.
19564 (dom_walker::walk): Handle NULL RPO order.
19565 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19566 in RPO order.
19567 (rewrite_update_dom_walker): Likewise.
19568 (mark_def_dom_walker): Likewise.
19569
19570 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19571
19572 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19573 (aarch64_maybe_expand_sve_subreg_move): Declare.
19574 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19575 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19576 predicate.
19577 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19578 that are semantically a reverse operation.
19579 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19580 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19581 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19582 functions.
19583 (aarch64_can_change_mode_class): For big-endian, forbid changes
19584 between two SVE modes if they have different element sizes.
19585
19586 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19587
19588 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19589 the TImode handling for big-endian targets.
19590
19591 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19592
19593 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19594 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19595 not just bytes.
19596 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19597 Remove BSWAP handing for big-endian targets and use the form of
19598 LD1RQ appropariate for the mode.
19599
19600 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19601
19602 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19603 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19604 duplicated element.
19605
19606 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19607
19608 PR tearget/83845
19609 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19610 check for operands that need to go through aarch64_sve_reload_be.
19611
19612 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19613
19614 PR tree-optimization/81661
19615 PR tree-optimization/84117
19616 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19617 * tree-eh.c: Include gimplify.h.
19618 (find_trapping_overflow, replace_trapping_overflow,
19619 rewrite_to_non_trapping_overflow): New functions.
19620 * tree-vect-loop.c: Include tree-eh.h.
19621 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19622 * tree-data-ref.c: Include tree-eh.h.
19623 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19624
19625 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19626
19627 PR rtl-optimization/84123
19628 * combine.c (change_zero_ext): Check if hard register satisfies
19629 can_change_dest_mode before calling gen_lowpart_SUBREG.
19630
19631 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19632
19633 PR target/82444
19634 * ira.c (ira_init_register_move_cost): Remove assert.
19635
19636 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19637
19638 PR rtl-optimization/84071
19639 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19640 * doc/tm.texi: Regenerate.
19641
19642 2018-01-31 Richard Biener <rguenther@suse.de>
19643
19644 PR tree-optimization/84132
19645 * tree-data-ref.c (analyze_miv_subscript): Properly
19646 check whether evolution_function_is_affine_multivariate_p
19647 before calling gcd_of_steps_may_divide_p.
19648
19649 2018-01-31 Julia Koval <julia.koval@intel.com>
19650
19651 PR target/83618
19652 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19653 * config/i386/i386.md (rdpid_rex64) New.
19654 (rdpid): Make 32bit only.
19655
19656 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19657
19658 PR lto/84105
19659 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19660 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19661
19662 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19663
19664 Revert
19665 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19666
19667 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19668
19669 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19670
19671 PR rtl-optimization/84071
19672 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19673 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19674
19675 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19676
19677 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19678 (arc_attribute_table): Add 'aux' attribute.
19679 (arc_in_small_data_p): Consider aux like variables.
19680 (arc_is_aux_reg_p): New function.
19681 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19682 (arc_get_aux_arg): New function.
19683 (prepare_move_operands): Handle aux-register access.
19684 (arc_handle_aux_attribute): New function.
19685 * doc/extend.texi (ARC Variable attributes): Add subsection.
19686
19687 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19688
19689 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19690 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19691 (arc_attribute_table): Add 'uncached' attribute.
19692 (arc_print_operand): Print '.di' flag for uncached memory
19693 accesses.
19694 (arc_in_small_data_p): Do not consider for small data the uncached
19695 types.
19696 (arc_is_uncached_mem_p): New function.
19697 * config/arc/predicates.md (compact_store_memory_operand): Check
19698 for uncached memory accesses.
19699 (nonvol_nonimm_operand): Likewise.
19700 * doc/extend.texi (ARC Type Attribute): New subsection.
19701
19702 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19703
19704 PR c/84100
19705 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19706 falign-loops=): Add Optimization flag.
19707
19708 2018-01-30 Jeff Law <law@redhat.com>
19709
19710 PR target/84064
19711 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19712 INT_REGISTERS_SAVED. Check it prior to calling
19713 get_scratch_register_on_entry.
19714 (ix86_adjust_stack_and_probe): Similarly.
19715 (ix86_emit_probe_stack_range): Similarly.
19716 (ix86_expand_prologue): Corresponding changes.
19717
19718 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19719
19720 PR target/40411
19721 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19722 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19723
19724 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19725
19726 PR target/84112
19727 * lra-constraints.c (curr_insn_transform): Process AND in the
19728 address.
19729
19730 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19731
19732 PR rtl-optimization/83986
19733 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19734 dependence against last_pending_memory_flush in addition to
19735 pending_jump_insns.
19736
19737 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19738
19739 PR tree-optimization/81611
19740 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19741 copies.
19742
19743 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19744
19745 PR target/83758
19746 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19747 a reg rtx.
19748
19749 2018-01-30 Richard Biener <rguenther@suse.de>
19750 Jakub Jelinek <jakub@redhat.com>
19751
19752 PR tree-optimization/84111
19753 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19754 inner loops added during recursion, as they don't have up-to-date
19755 SSA form.
19756
19757 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19758
19759 PR ipa/81360
19760 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19761 (can_inline_edge_by_limits_p): ... here.
19762 (can_early_inline_edge_p, check_callers,
19763 update_caller_keys, update_callee_keys, recursive_inlining,
19764 add_new_edges_to_heap, speculation_useful_p,
19765 inline_small_functions,
19766 inline_small_functions, flatten_function,
19767 inline_to_all_callers_1): Update.
19768
19769 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19770
19771 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19772 zeros correctly.
19773
19774 2018-01-30 Richard Biener <rguenther@suse.de>
19775
19776 PR tree-optimization/83008
19777 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19778 invariant and constant vector uses in stmts when they need
19779 more than one stmt.
19780
19781 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19782
19783 PR bootstrap/84017
19784 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19785 * configure: Regenerate.
19786
19787 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19788
19789 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19790 pattern.
19791 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19792 Use gen_rtx_REG rather than gen_lowpart.
19793
19794 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19795
19796 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19797 rather than 0 when creating partial subregs.
19798
19799 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19800
19801 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19802 of usage.
19803
19804 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19805
19806 PR target/81550
19807 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19808 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19809 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19810 flags. This restores the settings used before the 2017-07-24.
19811 Turning off pre increment/decrement/modify allows IVOPTS to
19812 optimize DF/SF loops where the index is an int.
19813
19814 2018-01-29 Richard Biener <rguenther@suse.de>
19815 Kelvin Nilsen <kelvin@gcc.gnu.org>
19816
19817 PR bootstrap/80867
19818 * tree-vect-stmts.c (vectorizable_call): Don't call
19819 targetm.vectorize_builtin_md_vectorized_function if callee is
19820 NULL.
19821
19822 2018-01-22 Carl Love <cel@us.ibm.com>
19823
19824 * doc/extend.tex: Fix typo in second arg in
19825 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19826
19827 2018-01-29 Richard Biener <rguenther@suse.de>
19828
19829 PR tree-optimization/84086
19830 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19831 (flush_ssaname_freelist): When SSA names were released reset
19832 the SCEV hash table.
19833
19834 2018-01-29 Richard Biener <rguenther@suse.de>
19835
19836 PR tree-optimization/84057
19837 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19838 removed paths when removing edges.
19839
19840 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19841
19842 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19843 -mfunction-return=@var{choice}.
19844
19845 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19846
19847 PR diagnostic/84034
19848 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19849 Handle CR like TAB.
19850 (layout::print_source_line): Likewise.
19851 (test_get_line_width_without_trailing_whitespace): Add test cases.
19852
19853 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19854
19855 PR middle-end/84040
19856 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19857 debug insns.
19858
19859 2018-01-26 Jim Wilson <jimw@sifive.com>
19860
19861 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19862
19863 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19864 specified.
19865
19866 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19867
19868 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19869 and CMP + SUB-immediate -> SUBS.
19870
19871 2018-01-26 Martin Sebor <msebor@redhat.com>
19872
19873 PR tree-optimization/83896
19874 * tree-ssa-strlen.c (get_string_len): Rename...
19875 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19876 Avoid assuming length is constant.
19877 (handle_char_store): Use HOST_WIDE_INT for string length.
19878
19879 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19880
19881 PR target/81763
19882 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19883 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19884
19885 2018-01-26 Richard Biener <rguenther@suse.de>
19886
19887 PR rtl-optimization/84003
19888 * dse.c (record_store): Only record redundant stores when
19889 the earlier store aliases at least all accesses the later one does.
19890
19891 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19892
19893 PR rtl-optimization/83985
19894 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19895 REG_CFA_RESTORE insns.
19896 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19897 REG_CFA_RESTORE insns here.
19898
19899 PR c/83989
19900 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19901 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19902
19903 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19904
19905 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19906 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19907 (arc_init): Likewise.
19908 (arc_override_options): Likewise.
19909 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19910 value.
19911 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19912 support.
19913 * config/arc/arc.h (TARGET_DBNZ): Define.
19914 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19915 properly set the tune attribute.
19916 (dbnz): Use TARGET_DBNZ guard.
19917 * config/arc/arc.opt (mtune): Add core3 option.
19918
19919 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19920
19921 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19922 recognize new pic like addresses.
19923 (arc_delegitimize_address): Clean up.
19924
19925 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19926
19927 * config/arc/arc-arches.def: Option mrf16 valid for all
19928 architectures.
19929 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19930 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19931 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19932 * config/arc/arc-tables.opt: Regenerate.
19933 * config/arc/arc.c (arc_conditional_register_usage): Handle
19934 reduced register file case.
19935 (arc_file_start): Set must have build attributes.
19936 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19937 mrf16 option value.
19938 * config/arc/arc.opt (mrf16): Add new option.
19939 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19940 * config/arc/genmultilib.awk: Handle new mrf16 option.
19941 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19942 * config/arc/t-multilib: Regenerate.
19943 * doc/invoke.texi (ARC Options): Document mrf16 option.
19944
19945 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19946
19947 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19948 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19949 (arc_attribute_table): Add 'secure_call' attribute.
19950 (arc_print_operand): Print secure call operand.
19951 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19952 secure.
19953 (arc_is_secure_call_p): New function. * config/arc/arc.md
19954 (call_i): Add support for sjli instruction.
19955 (call_value_i): Likewise.
19956 * config/arc/constraints.md (Csc): New constraint.
19957
19958 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19959 John Eric Martin <John.Martin@emmicro-us.com>
19960
19961 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19962 * config/arc/arc.c (_arc_jli_section): New struct.
19963 (arc_jli_section): New type.
19964 (rc_jli_sections): New static variable.
19965 (arc_handle_jli_attribute): New function.
19966 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19967 (arc_file_end): New function.
19968 (TARGET_ASM_FILE_END): Define.
19969 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19970 (arc_add_jli_section): New function.
19971 (jli_call_scan): Likewise.
19972 (arc_reorg): Call jli_call_scan.
19973 (arc_output_addsi): Remove 'S' from printing asm operand.
19974 (arc_is_jli_call_p): New function.
19975 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19976 operand.
19977 (movhi_insn): Likewise.
19978 (movsi_insn): Likewise.
19979 (movsi_set_cc_insn): Likewise.
19980 (loadqi_update): Likewise.
19981 (load_zeroextendqisi_update): Likewise.
19982 (load_signextendqisi_update): Likewise.
19983 (loadhi_update): Likewise.
19984 (load_zeroextendhisi_update): Likewise.
19985 (load_signextendhisi_update): Likewise.
19986 (loadsi_update): Likewise.
19987 (loadsf_update): Likewise.
19988 (movsicc_insn): Likewise.
19989 (bset_insn): Likewise.
19990 (bxor_insn): Likewise.
19991 (bclr_insn): Likewise.
19992 (bmsk_insn): Likewise.
19993 (bicsi3_insn): Likewise.
19994 (cmpsi_cc_c_insn): Likewise.
19995 (movsi_ne): Likewise.
19996 (movsi_cond_exec): Likewise.
19997 (clrsbsi2): Likewise.
19998 (norm_f): Likewise.
19999 (normw): Likewise.
20000 (swap): Likewise.
20001 (divaw): Likewise.
20002 (flag): Likewise.
20003 (sr): Likewise.
20004 (kflag): Likewise.
20005 (ffs): Likewise.
20006 (ffs_f): Likewise.
20007 (fls): Likewise.
20008 (call_i): Remove 'S' asm letter, add jli instruction.
20009 (call_value_i): Likewise.
20010 * config/arc/arc.op (mjli-always): New option.
20011 * config/arc/constraints.md (Cji): New constraint.
20012 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20013 operand.
20014 (subsf3_fpx): Likewise.
20015 (mulsf3_fpx): Likewise.
20016 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20017 asm operand.
20018 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20019 function attrbutes.
20020 * doc/invoke.texi (ARC): Document mjli-always option.
20021
20022 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20023
20024 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20025 avoid addition with 0 and use incw and decw where possible.
20026
20027 2018-01-26 Richard Biener <rguenther@suse.de>
20028
20029 PR tree-optimization/81082
20030 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20031 association if it requires casting to unsigned.
20032 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20033 from fold_plusminus_mult_expr to catch important cases late when
20034 range info is available.
20035
20036 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20037
20038 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20039 * configure.ac (hidden_linkonce): New test.
20040 * configure: Regenerate.
20041 * config.in: Regenerate.
20042
20043 2018-01-26 Julia Koval <julia.koval@intel.com>
20044
20045 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20046 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20047 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20048 _mm_mask_bitshuffle_epi64_mask): Fix type.
20049 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20050 USI_FTYPE_V4DI_V4DI_USI): Remove.
20051 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20052 __builtin_ia32_vpshufbitqmb256_mask,
20053 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20054 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20055 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20056
20057 2018-01-26 Alan Modra <amodra@gmail.com>
20058
20059 PR target/84033
20060 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20061 UNSPEC_VBPERMQ. Sort other unspecs.
20062
20063 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20064
20065 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20066
20067 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20068
20069 PR middle-end/83055
20070 * predict.c (drop_profile): Do not push/pop cfun; update also
20071 node->count.
20072 (handle_missing_profiles): Fix logic looking for zero profiles.
20073
20074 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20075
20076 PR middle-end/83977
20077 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20078 on functions with #pragma omp declare simd or functions with simd
20079 attribute.
20080 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20081 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20082 Remove trailing \n from warning_at calls.
20083
20084 2018-01-25 Tom de Vries <tom@codesourcery.com>
20085
20086 PR target/84028
20087 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20088 for neutered workers.
20089
20090 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20091
20092 PR target/68467
20093 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20094 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20095
20096 2018-01-24 Jeff Law <law@redhat.com>
20097
20098 PR target/83994
20099 * i386.c (get_probe_interval): Move to earlier point.
20100 (ix86_compute_frame_layout): If -fstack-clash-protection and
20101 the frame is larger than the probe interval, then use pushes
20102 to save registers rather than reg->mem moves.
20103 (ix86_expand_prologue): Remove conditional for int_registers_saved
20104 assertion.
20105
20106 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20107
20108 PR target/84014
20109 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20110 min/max for never referenced object.
20111
20112 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20113
20114 PR middle-end/83977
20115 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20116 here.
20117 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20118 attributes from DECL_ATTRIBUTES (decl) without affecting
20119 DECL_ATTRIBUTES (current_function_decl).
20120 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20121 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20122
20123 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20124
20125 PR tree-optimization/83979
20126 * fold-const.c (fold_comparison): Use constant_boolean_node
20127 instead of boolean_{true,false}_node.
20128
20129 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20130
20131 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20132 with zero counts.
20133
20134 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20135
20136 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20137 Simplify the clause that sets the length attribute.
20138 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20139 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20140 clause that sets the length attribute.
20141 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20142
20143 2018-01-24 Tom de Vries <tom@codesourcery.com>
20144
20145 PR target/83589
20146 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20147 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20148 Add strict parameter.
20149 (prevent_branch_around_nothing): Insert dummy insn between branch to
20150 label and label with no ptx insn inbetween.
20151 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20152
20153 2018-01-24 Tom de Vries <tom@codesourcery.com>
20154
20155 PR target/81352
20156 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20157 for neutered threads in warp.
20158 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20159
20160 2018-01-24 Richard Biener <rguenther@suse.de>
20161
20162 PR tree-optimization/83176
20163 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20164 operands.
20165
20166 2018-01-24 Richard Biener <rguenther@suse.de>
20167
20168 PR tree-optimization/82819
20169 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20170 code generating pluses that are no-ops in the target precision.
20171
20172 2018-01-24 Richard Biener <rguenther@suse.de>
20173
20174 PR middle-end/84000
20175 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20176
20177 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20178
20179 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20180 to merge probabilities.
20181 * predict.c (probably_never_executed): Also mark as cold functions
20182 with global 0 profile and guessed local profile.
20183 * profile-count.c (profile_probability::combine_with_count): New
20184 member function.
20185 * profile-count.h (profile_probability::operator*,
20186 profile_probability::operator*=, profile_probability::operator/,
20187 profile_probability::operator/=): Reduce precision to adjusted
20188 and set value to guessed on contradictory divisions.
20189 (profile_probability::combine_with_freq): Remove.
20190 (profile_probability::combine_wiht_count): Declare.
20191 (profile_count::force_nonzero):: Set to adjusted.
20192 (profile_count::probability_in):: Set quality to adjusted.
20193 * tree-ssa-tail-merge.c (replace_block_by): Use
20194 combine_with_count.
20195
20196 2018-01-23 Andrew Waterman <andrew@sifive.com>
20197 Jim Wilson <jimw@sifive.com>
20198
20199 * config/riscv/riscv.c (riscv_stack_boundary): New.
20200 (riscv_option_override): Set riscv_stack_boundary. Handle
20201 riscv_preferred_stack_boundary_arg.
20202 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20203 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20204 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20205 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20206 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20207 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20208
20209 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20210
20211 PR target/83905
20212 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20213 of struct ix86_frame.
20214 (ix86_expand_epilogue): Likewise. Add a local variable for
20215 the reg_save_offset field in struct ix86_frame.
20216
20217 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20218
20219 PR tree-optimization/82604
20220 * tree-loop-distribution.c (enum partition_kind): New enum item
20221 PKIND_PARTIAL_MEMSET.
20222 (partition_builtin_p): Support above new enum item.
20223 (generate_code_for_partition): Ditto.
20224 (compute_access_range): Differentiate cases that equality can be
20225 proven at all loops, the innermost loops or no loops.
20226 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20227 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20228 (finalize_partitions, distribute_loop): Don't fuse partition of
20229 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20230 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20231 parloop is enabled.
20232
20233 2018-01-23 Martin Liska <mliska@suse.cz>
20234
20235 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20236 order to ignore the predictor.
20237 (PRED_POLYMORPHIC_CALL): Likewise.
20238 (PRED_RECURSIVE_CALL): Likewise.
20239
20240 2018-01-23 Martin Liska <mliska@suse.cz>
20241
20242 * tree-profile.c (tree_profiling): Print function header to
20243 aware reader which function we are working on.
20244 * value-prof.c (gimple_find_values_to_profile): Do not print
20245 not interesting value histograms.
20246
20247 2018-01-23 Martin Liska <mliska@suse.cz>
20248
20249 * profile-count.h (enum profile_quality): Add
20250 profile_uninitialized as the first value. Do not number values
20251 as they are zero based.
20252 (profile_count::verify): Update sanity check.
20253 (profile_probability::verify): Likewise.
20254
20255 2018-01-23 Nathan Sidwell <nathan@acm.org>
20256
20257 * doc/invoke.texi (ffor-scope): Deprecate.
20258
20259 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20260
20261 PR tree-optimization/83510
20262 * domwalk.c (set_all_edges_as_executable): New function.
20263 (dom_walker::dom_walker): Convert bool param
20264 "skip_unreachable_blocks" to enum reachability. Move setup of
20265 edge flags to set_all_edges_as_executable and only do it when
20266 reachability is REACHABLE_BLOCKS.
20267 * domwalk.h (enum dom_walker::reachability): New enum.
20268 (dom_walker::dom_walker): Convert bool param
20269 "skip_unreachable_blocks" to enum reachability.
20270 (set_all_edges_as_executable): New decl.
20271 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20272 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20273 "reachability".
20274 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20275 but converting true to REACHABLE_BLOCKS.
20276 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20277 * tree-vrp.c
20278 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20279 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20280 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20281 REACHABLE_BLOCKS.
20282 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20283 if check_all_array_refs will be called.
20284
20285 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20286
20287 * tree.c (selftest::test_location_wrappers): Add more test
20288 coverage.
20289
20290 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20291
20292 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20293 (selftest::test_bit_in_range): Likewise.
20294
20295 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20296
20297 PR testsuite/83888
20298 * doc/sourcebuild.texi (vect_float): Say that the selector
20299 only describes the situation when -funsafe-math-optimizations is on.
20300 (vect_float_strict): Document.
20301
20302 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20303
20304 PR tree-optimization/83965
20305 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20306 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20307 instead of checking only for a reduction.
20308 (vect_recog_widen_sum_pattern): Likewise.
20309
20310 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20311
20312 * predict.c (probably_never_executed): Only use precise profile info.
20313 (compute_function_frequency): Skip after inlining hack since we now
20314 have quality checking.
20315
20316 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20317
20318 * profile-count.h (profile_probability::very_unlikely,
20319 profile_probability::unlikely, profile_probability::even): Set
20320 precision to guessed.
20321
20322 2018-01-23 Richard Biener <rguenther@suse.de>
20323
20324 PR tree-optimization/83963
20325 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20326 Properly terminate dominator walk when crossing the exit edge not
20327 when visiting its source block.
20328
20329 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20330
20331 PR c++/83918
20332 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20333 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20334
20335 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20336
20337 PR tree-optimization/83957
20338 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20339 semicolon after for body surrounded by braces.
20340
20341 PR tree-optimization/83081
20342 * profile-count.h (profile_probability::split): New method.
20343 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20344 Use profile_probability::split.
20345 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20346 when splitting a single conditional jump into 2.
20347
20348 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20349
20350 PR tree-optimization/69452
20351 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20352 decl.
20353
20354 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20355
20356 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20357 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20358 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20359
20360 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20361
20362 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20363 declaration.
20364 * config/rl78/rl78.md (movdi): New define_expand.
20365 * config/rl78/rl78.c (rl78_split_movdi): New function.
20366
20367 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20368
20369 PR target/83862
20370 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20371 no longer used.
20372 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20373 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20374 128-bit to produce an UNSPEC move to get the double word with the
20375 signbit and then a shift directly to do signbit.
20376 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20377 implementation with a new version that just does either a direct
20378 move or a regular move. Move memory interface to separate insns.
20379 Move insns so they are next to the expander.
20380 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20381 with signbit move. Split big and little endian case.
20382 (signbit<mode>2_dm_mem_le): Likewise.
20383 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20384 (signbit<mode>2_dm2): Likewise.
20385
20386 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20387
20388 * config/rl78/rl78.md (anddi3): New define_expand.
20389
20390 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20391
20392 * config/rl78/rl78.md (umindi3): New define_expand.
20393
20394 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20395
20396 * config/rl78/rl78.md (smindi3): New define_expand.
20397
20398 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20399
20400 * config/rl78/rl78.md (smaxdi3): New define_expand.
20401
20402 2018-01-22 Carl Love <cel@us.ibm.com>
20403
20404 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20405 LVX_V1TI): Add macro expansion.
20406 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20407 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20408 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20409 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20410 Change check to determine if the instruction is a byte reversing
20411 entry. Fix typo in comment.
20412 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20413 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20414 Add def_builtin calls for new builtins.
20415 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20416 Add define_insn expansion.
20417
20418 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20419
20420 * config/rl78/rl78.md (umaxdi3): New define_expand.
20421
20422 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20423
20424 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20425 for non-QImode registers.
20426
20427 2018-01-22 Richard Biener <rguenther@suse.de>
20428
20429 PR tree-optimization/83963
20430 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20431 including the loop exit block.
20432 (scop_detection::merge_sese): Likewise.
20433 (scop_detection::add_scop): Do it here instead.
20434
20435 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20436
20437 * doc/sourcebuild.texi (arm_softfloat): Document.
20438
20439 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20440
20441 PR gcc/77734
20442 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20443 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20444 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20445
20446 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20447 David Edelsohn <dje.gcc@gmail.com>
20448
20449 PR target/83946
20450 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20451 Change "crset eq" to "crset 2".
20452 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20453 (*call_indirect_aix<mode>_nospec): Likewise.
20454 (*call_value_indirect_aix<mode>_nospec): Likewise.
20455 (*call_indirect_elfv2<mode>_nospec): Likewise.
20456 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20457 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20458 change assembly output from . to $.
20459 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20460 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20461 (*tablejump<mode>_internal1_nospec): Likewise.
20462
20463 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20464
20465 PR target/80870
20466 * config/sh/sh_optimize_sett_clrt.cc:
20467 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20468
20469 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20470
20471 PR tree-optimization/83940
20472 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20473 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20474 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20475 use it to pass back the definition type.
20476 (vect_check_store_rhs): Likewise rhs_dt_out.
20477 (vect_build_gather_load_calls): Add a mask_dt argument and use
20478 it instead of a call to vect_is_simple_use.
20479 (vectorizable_store): Update calls to vect_check_load_store_mask
20480 and vect_check_store_rhs. Use the dt returned by the latter instead
20481 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20482 instead of calls to vect_is_simple_use. Pass the scalar rather
20483 than the vector operand to vect_is_simple_use when handling
20484 second and subsequent copies of an rhs value.
20485 (vectorizable_load): Update calls to vect_check_load_store_mask
20486 and vect_build_gather_load_calls. Use the cached mask_dt and
20487 gs_info.offset_dt instead of calls to vect_is_simple_use.
20488
20489 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20490
20491 PR middle-end/83945
20492 * tree-emutls.c: Include gimplify.h.
20493 (lower_emutls_2): New function.
20494 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20495 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20496 it before further processing.
20497
20498 PR target/83930
20499 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20500 UINTVAL (trueop1) instead of INTVAL (op1).
20501
20502 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20503
20504 PR debug/81570
20505 PR debug/83728
20506 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20507 INCOMING_FRAME_SP_OFFSET if not defined.
20508 (scan_trace): Add ENTRY argument. If true and
20509 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20510 emit a note to adjust the CFA offset.
20511 (create_cfi_notes): Adjust scan_trace callers.
20512 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20513 INCOMING_FRAME_SP_OFFSET in the CIE.
20514 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20515 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20516 Likewise.
20517 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20518 * doc/tm.texi: Regenerated.
20519
20520 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20521
20522 PR rtl-optimization/83147
20523 * lra-constraints.c (remove_inheritance_pseudos): Use
20524 lra_substitute_pseudo_within_insn.
20525
20526 2018-01-19 Tom de Vries <tom@codesourcery.com>
20527 Cesar Philippidis <cesar@codesourcery.com>
20528
20529 PR target/83920
20530 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20531
20532 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20533
20534 PR target/83790
20535 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20536 spaces for function labels.
20537
20538 2018-01-19 Martin Liska <mliska@suse.cz>
20539
20540 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20541 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20542 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20543 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20544 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20545 (PRED_CONST_RETURN): Change from 69 to 65.
20546 (PRED_NULL_RETURN): Change from 91 to 71.
20547 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20548 (PRED_LOOP_GUARD): Change from 66 to 73.
20549
20550 2018-01-19 Martin Liska <mliska@suse.cz>
20551
20552 * predict.c (predict_insn_def): Add new assert.
20553 (struct branch_predictor): Change type to signed integer.
20554 (test_prediction_value_range): Amend test to cover
20555 PROB_UNINITIALIZED.
20556 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20557 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20558 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20559 (PRED_LOOP_IV_COMPARE): Likewise.
20560 * predict.h (PROB_UNINITIALIZED): Define new constant.
20561
20562 2018-01-19 Martin Liska <mliska@suse.cz>
20563
20564 * predict.c (dump_prediction): Add new format for
20565 analyze_brprob.py script which is enabled with -details
20566 suboption.
20567 * profile-count.h (precise_p): New function.
20568
20569 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20570
20571 PR tree-optimization/83922
20572 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20573 there are no statements that need masking.
20574 (vect_active_double_reduction_p): New function.
20575 (vect_analyze_loop_operations): Use it when handling phis that
20576 are not in the loop header.
20577
20578 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20579
20580 PR tree-optimization/83914
20581 * tree-vect-loop.c (vectorizable_induction): Don't convert
20582 init_expr or apply the peeling adjustment for inductions
20583 that are nested within the vectorized loop.
20584
20585 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20586
20587 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20588 instead of NEG.
20589
20590 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20591
20592 PR sanitizer/81715
20593 PR testsuite/83882
20594 * function.h (gimplify_parameters): Add gimple_seq * argument.
20595 * function.c: Include gimple.h and options.h.
20596 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20597 for the added local temporaries if needed.
20598 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20599 if there are any parameter cleanups, wrap whole body into a
20600 try/finally with the cleanups.
20601
20602 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20603
20604 PR target/82964
20605 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20606 Use GET_MODE_CLASS for scalar floating point.
20607
20608 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20609
20610 PR ipa/82256
20611 patch by PaX Team
20612 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20613 Fix call of call_cgraph_insertion_hooks.
20614
20615 2018-01-18 Martin Sebor <msebor@redhat.com>
20616
20617 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20618
20619 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20620
20621 PR ipa/83619
20622 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20623 frequencies.
20624
20625 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20626
20627 PR other/70268
20628 * common.opt: (-ffile-prefix-map): New option.
20629 * opts.c (common_handle_option): Defer it.
20630 * opts-global.c (handle_common_deferred_options): Handle it.
20631 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20632 * file-prefix-map.h: New file.
20633 (remap_debug_filename, add_debug_prefix_map): ...here.
20634 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20635 * final.c (debug_prefix_map, add_debug_prefix_map
20636 remap_debug_filename): Move to...
20637 * file-prefix-map.c: New file.
20638 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20639 generalize, get rid of alloca(), use strrchr() instead of strchr().
20640 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20641 Implement in terms of add_prefix_map().
20642 (remap_macro_filename, remap_debug_filename): Implement in term of
20643 remap_filename().
20644 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20645 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20646 * dbxout.c: Include file-prefix-map.h.
20647 * varasm.c: Likewise.
20648 * vmsdbgout.c: Likewise.
20649 * xcoffout.c: Likewise.
20650 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20651 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20652 * doc/invoke.texi (-ffile-prefix-map): Document.
20653 (-fdebug-prefix-map): Update description.
20654
20655 2018-01-18 Martin Liska <mliska@suse.cz>
20656
20657 * config/i386/i386.c (indirect_thunk_name): Document that also
20658 lfence is emitted.
20659 (output_indirect_thunk): Document why both instructions
20660 (pause and lfence) are generated.
20661
20662 2018-01-18 Richard Biener <rguenther@suse.de>
20663
20664 PR tree-optimization/83887
20665 * graphite-scop-detection.c
20666 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20667 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20668 (scop_detection::merge_sese): Re-implement with a flood-fill
20669 algorithm that properly finds a SESE region if it exists.
20670
20671 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20672
20673 PR c/61240
20674 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20675 pointer_diff optimizations use view_convert instead of convert.
20676
20677 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20678
20679 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20680 Generate different code for -mno-speculate-indirect-jumps.
20681 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20682 (*call_indirect_aix<mode>): Disable for
20683 -mno-speculate-indirect-jumps.
20684 (*call_indirect_aix<mode>_nospec): New define_insn.
20685 (*call_value_indirect_aix<mode>): Disable for
20686 -mno-speculate-indirect-jumps.
20687 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20688 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20689 -mno-speculate-indirect-jumps.
20690 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20691
20692 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20693
20694 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20695 long double type, set the flags for noting the default long double
20696 type, even if we don't pass or return a long double type.
20697
20698 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20699
20700 PR ipa/83051
20701 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20702 failure.
20703
20704 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20705
20706 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20707 support for merge[hl].
20708 (fold_mergehl_helper): New helper function.
20709 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20710 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20711 (altivec_vmrglw_direct): Add xxmrglw insn.
20712
20713 2018-01-17 Andrew Waterman <andrew@sifive.com>
20714
20715 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20716 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20717
20718 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20719
20720 PR lto/83121
20721 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20722 call the lto_location_cache before reading the
20723 DECL_SOURCE_LOCATION of the types.
20724
20725 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20726 Richard Sandiford <richard.sandiford@linaro.org>
20727
20728 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20729 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20730 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20731 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20732 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20733 Add declaration.
20734 * config/aarch64/constraints.md (aarch64_movti_operand):
20735 Limit immediates.
20736 * config/aarch64/predicates.md (Uti): Add new constraint.
20737
20738 2018-01-17 Carl Love <cel@us.ibm.com>
20739
20740 * config/rs6000/vsx.md (define_expand xl_len_r,
20741 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20742 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20743 lxvll.
20744 (define_expand, define_insn): Move the shift left from the
20745 define_insn to the define_expand for lxvl and stxvl instructions.
20746 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20747 and XL_LEN_R definitions to PURE.
20748
20749 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20750
20751 * config/i386/i386.c (indirect_thunk_name): Declare regno
20752 as unsigned int. Compare regno with INVALID_REGNUM.
20753 (output_indirect_thunk): Ditto.
20754 (output_indirect_thunk_function): Ditto.
20755 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20756 in the call to output_indirect_thunk_function.
20757
20758 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20759
20760 PR middle-end/83884
20761 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20762 rather than the size of inner_type to determine the stack slot size
20763 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20764
20765 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20766
20767 PR target/83546
20768 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20769 to PTA_SILVERMONT.
20770
20771 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20772
20773 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20774 endian Linux systems to optionally enable multilibs for selecting
20775 the long double type if the user configured an explicit type.
20776 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20777 have no long double multilibs if not defined.
20778 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20779 warn if the user used -mabi={ieee,ibm}longdouble and we built
20780 multilibs for long double.
20781 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20782 appropriate multilib option.
20783 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20784 multilib options.
20785 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20786 for building long double multilibs.
20787 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20788
20789 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20790
20791 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20792 copies.
20793
20794 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20795 64 bits.
20796 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20797 128 bits.
20798
20799 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20800 variables.
20801
20802 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20803 return value.
20804
20805 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20806
20807 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20808 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20809
20810 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20811
20812 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20813 different rtl trees depending on TARGET_64BIT.
20814 (rs6000_gen_lvx): Likewise.
20815
20816 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20817
20818 * config/visium/visium.md (nop): Tweak comment.
20819 (hazard_nop): Likewise.
20820
20821 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20822
20823 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20824 -mspeculate-indirect-jumps.
20825 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20826 for -mno-speculate-indirect-jumps.
20827 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20828 (*call_value_indirect_elfv2<mode>): Disable for
20829 -mno-speculate-indirect-jumps.
20830 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20831 (indirect_jump): Emit different RTL for
20832 -mno-speculate-indirect-jumps.
20833 (*indirect_jump<mode>): Disable for
20834 -mno-speculate-indirect-jumps.
20835 (*indirect_jump<mode>_nospec): New define_insn.
20836 (tablejump): Emit different RTL for
20837 -mno-speculate-indirect-jumps.
20838 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20839 (tablejumpsi_nospec): New define_expand.
20840 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20841 (tablejumpdi_nospec): New define_expand.
20842 (*tablejump<mode>_internal1): Disable for
20843 -mno-speculate-indirect-jumps.
20844 (*tablejump<mode>_internal1_nospec): New define_insn.
20845 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20846 option.
20847
20848 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20849
20850 * caller-save.c (insert_save): Drop unnecessary parameter. All
20851 callers updated.
20852
20853 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20854 Richard Biener <rguenth@suse.de>
20855
20856 PR libgomp/83590
20857 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20858 return early, inline manually is_gimple_sizepos. Make sure if we
20859 call gimplify_expr we don't end up with a gimple constant.
20860 * tree.c (variably_modified_type_p): Don't return true for
20861 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20862 * gimplify.h (is_gimple_sizepos): Remove.
20863
20864 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20865
20866 PR tree-optimization/83857
20867 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20868 vectorizable_live_operation for pure SLP statements.
20869 (vectorizable_live_operation): Handle PHIs.
20870
20871 2018-01-16 Richard Biener <rguenther@suse.de>
20872
20873 PR tree-optimization/83867
20874 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20875 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20876
20877 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20878
20879 PR c/83844
20880 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20881 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20882 If off is not INTEGER_CST, issue a may not be aligned warning
20883 rather than isn't aligned. Use isn%'t rather than isn't.
20884 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20885 into MULT_EXPR.
20886 <case MULT_EXPR>: Improve the case when bottom and one of the
20887 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20888 operand, in that case check if the other operand is multiple of
20889 bottom divided by the INTEGER_CST operand.
20890
20891 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20892
20893 PR target/83858
20894 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20895 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20896 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20897 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20898 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20899 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20900 (pa_function_arg_size): New function.
20901
20902 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20903
20904 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20905 in a separate statement.
20906
20907 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20908
20909 PR tree-optimization/83847
20910 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20911 group gathers and scatters.
20912
20913 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20914
20915 PR rtl-optimization/86620
20916 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20917
20918 PR rtl-optimization/83213
20919 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20920 to last if both are JUMP_INSNs.
20921
20922 PR tree-optimization/83843
20923 * gimple-ssa-store-merging.c
20924 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20925 store_immediate_info for bswap/nop orig_stores.
20926
20927 2018-01-15 Andrew Waterman <andrew@sifive.com>
20928
20929 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20930 !TARGET_MUL.
20931 <UDIV>: Increase cost if !TARGET_DIV.
20932
20933 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20934
20935 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20936 (define_attr "cr_logical_3op"): New.
20937 (cceq_ior_compare): Adjust.
20938 (cceq_ior_compare_complement): Adjust.
20939 (*cceq_rev_compare): Adjust.
20940 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20941 (is_cracked_insn): Adjust.
20942 (insn_must_be_first_in_group): Adjust.
20943 * config/rs6000/40x.md: Adjust.
20944 * config/rs6000/440.md: Adjust.
20945 * config/rs6000/476.md: Adjust.
20946 * config/rs6000/601.md: Adjust.
20947 * config/rs6000/603.md: Adjust.
20948 * config/rs6000/6xx.md: Adjust.
20949 * config/rs6000/7450.md: Adjust.
20950 * config/rs6000/7xx.md: Adjust.
20951 * config/rs6000/8540.md: Adjust.
20952 * config/rs6000/cell.md: Adjust.
20953 * config/rs6000/e300c2c3.md: Adjust.
20954 * config/rs6000/e500mc.md: Adjust.
20955 * config/rs6000/e500mc64.md: Adjust.
20956 * config/rs6000/e5500.md: Adjust.
20957 * config/rs6000/e6500.md: Adjust.
20958 * config/rs6000/mpc.md: Adjust.
20959 * config/rs6000/power4.md: Adjust.
20960 * config/rs6000/power5.md: Adjust.
20961 * config/rs6000/power6.md: Adjust.
20962 * config/rs6000/power7.md: Adjust.
20963 * config/rs6000/power8.md: Adjust.
20964 * config/rs6000/power9.md: Adjust.
20965 * config/rs6000/rs64.md: Adjust.
20966 * config/rs6000/titan.md: Adjust.
20967
20968 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20969
20970 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20971 ix86_indirect_branch_register logic.
20972
20973 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20974
20975 * config/i386/constraints.md (Bs): Update
20976 ix86_indirect_branch_register check. Don't check
20977 ix86_indirect_branch_register with GOT_memory_operand.
20978 (Bw): Likewise.
20979 * config/i386/predicates.md (GOT_memory_operand): Don't check
20980 ix86_indirect_branch_register here.
20981 (GOT32_symbol_operand): Likewise.
20982
20983 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20984
20985 * config/i386/predicates.md (constant_call_address_operand):
20986 Rewrite ix86_indirect_branch_register logic.
20987 (sibcall_insn_operand): Likewise.
20988
20989 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20990
20991 * config/i386/constraints.md (Bs): Replace
20992 ix86_indirect_branch_thunk_register with
20993 ix86_indirect_branch_register.
20994 (Bw): Likewise.
20995 * config/i386/i386.md (indirect_jump): Likewise.
20996 (tablejump): Likewise.
20997 (*sibcall_memory): Likewise.
20998 (*sibcall_value_memory): Likewise.
20999 Peepholes of indirect call and jump via memory: Likewise.
21000 * config/i386/i386.opt: Likewise.
21001 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21002 (GOT_memory_operand): Likewise.
21003 (call_insn_operand): Likewise.
21004 (sibcall_insn_operand): Likewise.
21005 (GOT32_symbol_operand): Likewise.
21006
21007 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21008
21009 PR middle-end/83837
21010 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21011 type rather than type addr's type points to.
21012 (expand_omp_atomic_mutex): Likewise.
21013 (expand_omp_atomic): Likewise.
21014
21015 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21016
21017 PR target/83839
21018 * config/i386/i386.c (output_indirect_thunk_function): Use
21019 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21020 for __x86_return_thunk.
21021
21022 2018-01-15 Richard Biener <rguenther@suse.de>
21023
21024 PR middle-end/83850
21025 * expmed.c (extract_bit_field_1): Fix typo.
21026
21027 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21028
21029 PR target/83687
21030 * config/arm/iterators.md (VF): New mode iterator.
21031 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21032 Remove integer-related logic from pattern.
21033 (neon_vabd<mode>_3): Likewise.
21034
21035 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21036
21037 PR middle-end/82694
21038 * common.opt (fstrict-overflow): No longer an alias.
21039 (fwrapv-pointer): New option.
21040 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21041 also for pointer types based on flag_wrapv_pointer.
21042 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21043 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21044 opts->x_flag_wrapv got set.
21045 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21046 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21047 POINTER_TYPE_OVERFLOW_UNDEFINED.
21048 * match.pd: Likewise in address comparison pattern.
21049 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21050
21051 2018-01-15 Richard Biener <rguenther@suse.de>
21052
21053 PR lto/83804
21054 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21055 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21056 Reset type names to their identifier if their TYPE_DECL doesn't
21057 have linkage (and thus is used for ODR and devirt).
21058 (save_debug_info_for_decl): Remove.
21059 (save_debug_info_for_type): Likewise.
21060 (add_tree_to_fld_list): Adjust.
21061 * tree-pretty-print.c (dump_generic_node): Make dumping of
21062 type names more robust.
21063
21064 2018-01-15 Richard Biener <rguenther@suse.de>
21065
21066 * BASE-VER: Bump to 8.0.1.
21067
21068 2018-01-14 Martin Sebor <msebor@redhat.com>
21069
21070 PR other/83508
21071 * builtins.c (check_access): Avoid warning when the no-warning bit
21072 is set.
21073
21074 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21075
21076 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21077 * ira-color (allocno_hard_regs_compare): Likewise.
21078
21079 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21080
21081 PR target/83013
21082 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21083 Use .pushsection/.popsection.
21084
21085 2018-01-14 Martin Sebor <msebor@redhat.com>
21086
21087 PR c++/81327
21088 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21089
21090 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21091
21092 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21093 entry from extra_headers.
21094 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21095 extra_headers, make the list bitwise identical to the i?86-*-* one.
21096
21097 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21098
21099 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21100 -mcmodel=large with -mindirect-branch=thunk,
21101 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21102 -mfunction-return=thunk-extern.
21103 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21104 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21105 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21106
21107 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21108
21109 * config/i386/i386.c (print_reg): Print the name of the full
21110 integer register without '%'.
21111 (ix86_print_operand): Handle 'V'.
21112 * doc/extend.texi: Document 'V' modifier.
21113
21114 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21115
21116 * config/i386/constraints.md (Bs): Disallow memory operand for
21117 -mindirect-branch-register.
21118 (Bw): Likewise.
21119 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21120 (GOT_memory_operand): Likewise.
21121 (call_insn_operand): Likewise.
21122 (sibcall_insn_operand): Likewise.
21123 (GOT32_symbol_operand): Likewise.
21124 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21125 for -mindirect-branch-register.
21126 (tablejump): Likewise.
21127 (*sibcall_memory): Likewise.
21128 (*sibcall_value_memory): Likewise.
21129 Disallow peepholes of indirect call and jump via memory for
21130 -mindirect-branch-register.
21131 (*call_pop): Replace m with Bw.
21132 (*call_value_pop): Likewise.
21133 (*sibcall_pop_memory): Replace m with Bs.
21134 * config/i386/i386.opt (mindirect-branch-register): New option.
21135 * doc/invoke.texi: Document -mindirect-branch-register option.
21136
21137 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21138
21139 * config/i386/i386-protos.h (ix86_output_function_return): New.
21140 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21141 set function_return_type.
21142 (indirect_thunk_name): Add ret_p to indicate thunk for function
21143 return.
21144 (output_indirect_thunk_function): Pass false to
21145 indirect_thunk_name.
21146 (ix86_output_indirect_branch_via_reg): Likewise.
21147 (ix86_output_indirect_branch_via_push): Likewise.
21148 (output_indirect_thunk_function): Create alias for function
21149 return thunk if regno < 0.
21150 (ix86_output_function_return): New function.
21151 (ix86_handle_fndecl_attribute): Handle function_return.
21152 (ix86_attribute_table): Add function_return.
21153 * config/i386/i386.h (machine_function): Add
21154 function_return_type.
21155 * config/i386/i386.md (simple_return_internal): Use
21156 ix86_output_function_return.
21157 (simple_return_internal_long): Likewise.
21158 * config/i386/i386.opt (mfunction-return=): New option.
21159 (indirect_branch): Mention -mfunction-return=.
21160 * doc/extend.texi: Document function_return function attribute.
21161 * doc/invoke.texi: Document -mfunction-return= option.
21162
21163 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21164
21165 * config/i386/i386-opts.h (indirect_branch): New.
21166 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21167 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21168 with local indirect jump when converting indirect call and jump.
21169 (ix86_set_indirect_branch_type): New.
21170 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21171 (indirectlabelno): New.
21172 (indirect_thunk_needed): Likewise.
21173 (indirect_thunk_bnd_needed): Likewise.
21174 (indirect_thunks_used): Likewise.
21175 (indirect_thunks_bnd_used): Likewise.
21176 (INDIRECT_LABEL): Likewise.
21177 (indirect_thunk_name): Likewise.
21178 (output_indirect_thunk): Likewise.
21179 (output_indirect_thunk_function): Likewise.
21180 (ix86_output_indirect_branch_via_reg): Likewise.
21181 (ix86_output_indirect_branch_via_push): Likewise.
21182 (ix86_output_indirect_branch): Likewise.
21183 (ix86_output_indirect_jmp): Likewise.
21184 (ix86_code_end): Call output_indirect_thunk_function if needed.
21185 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21186 needed.
21187 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21188 (ix86_attribute_table): Add indirect_branch.
21189 * config/i386/i386.h (machine_function): Add indirect_branch_type
21190 and has_local_indirect_jump.
21191 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21192 to true.
21193 (tablejump): Likewise.
21194 (*indirect_jump): Use ix86_output_indirect_jmp.
21195 (*tablejump_1): Likewise.
21196 (simple_return_indirect_internal): Likewise.
21197 * config/i386/i386.opt (mindirect-branch=): New option.
21198 (indirect_branch): New.
21199 (keep): Likewise.
21200 (thunk): Likewise.
21201 (thunk-inline): Likewise.
21202 (thunk-extern): Likewise.
21203 * doc/extend.texi: Document indirect_branch function attribute.
21204 * doc/invoke.texi: Document -mindirect-branch= option.
21205
21206 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21207
21208 PR ipa/83051
21209 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21210
21211 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21212
21213 * ipa-inline.c (want_inline_small_function_p): Return false if
21214 inlining has already failed with CIF_FINAL_ERROR.
21215 (update_caller_keys): Call want_inline_small_function_p before
21216 can_inline_edge_p.
21217 (update_callee_keys): Likewise.
21218
21219 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21220
21221 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21222 New function.
21223 (rs6000_quadword_masked_address_p): Likewise.
21224 (quad_aligned_load_p): Likewise.
21225 (quad_aligned_store_p): Likewise.
21226 (const_load_sequence_p): Add comment to describe the outer-most loop.
21227 (mimic_memory_attributes_and_flags): New function.
21228 (rs6000_gen_stvx): Likewise.
21229 (replace_swapped_aligned_store): Likewise.
21230 (rs6000_gen_lvx): Likewise.
21231 (replace_swapped_aligned_load): Likewise.
21232 (replace_swapped_load_constant): Capitalize argument name in
21233 comment describing this function.
21234 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21235 and stores that access quad-word aligned addresses and replace
21236 with stvx or lvx instructions when appropriate.
21237 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21238 New function prototype.
21239 (rs6000_quadword_masked_address_p): Likewise.
21240 (rs6000_gen_lvx): Likewise.
21241 (rs6000_gen_stvx): Likewise.
21242 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21243 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21244 when memory address is aligned.
21245 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21246 this split to select lvx instruction when memory address is aligned.
21247 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21248 instruction when memory address is aligned.
21249 (*vsx_le_perm_load_v16qi): Likewise.
21250 (four unnamed splitters): Modify to select the stvx instruction
21251 when memory is aligned.
21252
21253 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21254
21255 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21256 which appears in the queue multiple times.
21257
21258 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21259 Alan Hayward <alan.hayward@arm.com>
21260 David Sherwood <david.sherwood@arm.com>
21261
21262 * tree-vectorizer.h (vec_lower_bound): New structure.
21263 (_loop_vec_info): Add check_nonzero and lower_bounds.
21264 (LOOP_VINFO_CHECK_NONZERO): New macro.
21265 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21266 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21267 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21268 fields. Make seg_len the distance travelled, not including the
21269 access size.
21270 (dr_direction_indicator): Declare.
21271 (dr_zero_step_indicator): Likewise.
21272 (dr_known_forward_stride_p): Likewise.
21273 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21274 tree-ssanames.h.
21275 (runtime_alias_check_p): Allow runtime alias checks with
21276 variable strides.
21277 (operator ==): Compare access_size and align.
21278 (prune_runtime_alias_test_list): Rework for new distinction between
21279 the access_size and seg_len.
21280 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21281 segment lengths.
21282 (get_segment_min_max): New function.
21283 (create_intersect_range_checks): Use it.
21284 (dr_step_indicator): New function.
21285 (dr_direction_indicator): Likewise.
21286 (dr_zero_step_indicator): Likewise.
21287 (dr_known_forward_stride_p): Likewise.
21288 * tree-loop-distribution.c (data_ref_segment_size): Return
21289 DR_STEP * (niters - 1).
21290 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21291 constructor.
21292 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21293 (vect_preserves_scalar_order_p): New function, split out from...
21294 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21295 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21296 (vect_vfa_access_size): New function.
21297 (vect_vfa_align): Likewise.
21298 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21299 (dump_lower_bound): New function.
21300 (vect_check_lower_bound): Likewise.
21301 (vect_small_gap_p): Likewise.
21302 (vectorizable_with_step_bound_p): Likewise.
21303 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21304 depencies if the vectorization factor is 1. Convert the checks
21305 for nonzero steps into checks on the bounds of DR_STEP. Try using
21306 a bunds check for variable steps if the minimum required step is
21307 relatively small. Update calls to the dr_with_seg_len
21308 constructor and to vect_compile_time_alias.
21309 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21310 function.
21311 (vect_loop_versioning): Call it.
21312 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21313 when retrying.
21314 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21315
21316 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21317 Alan Hayward <alan.hayward@arm.com>
21318 David Sherwood <david.sherwood@arm.com>
21319
21320 * doc/sourcebuild.texi (vect_scatter_store): Document.
21321 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21322 optabs.
21323 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21324 Document.
21325 * genopinit.c (main): Add supports_vec_scatter_store and
21326 supports_vec_scatter_store_cached to target_optabs.
21327 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21328 IFN_MASK_SCATTER_STORE.
21329 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21330 functions.
21331 * internal-fn.h (internal_store_fn_p): Declare.
21332 (internal_fn_stored_value_index): Likewise.
21333 * internal-fn.c (scatter_store_direct): New macro.
21334 (expand_scatter_store_optab_fn): New function.
21335 (direct_scatter_store_optab_supported_p): New macro.
21336 (internal_store_fn_p): New function.
21337 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21338 IFN_MASK_SCATTER_STORE.
21339 (internal_fn_mask_index): Likewise.
21340 (internal_fn_stored_value_index): New function.
21341 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21342 for scatter stores.
21343 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21344 * optabs-query.c (supports_vec_scatter_store_p): New function.
21345 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21346 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21347 true for scatter stores.
21348 (vect_gather_scatter_fn_p): Handle scatter stores too.
21349 (vect_check_gather_scatter): Consider using scatter stores if
21350 supports_vec_scatter_store_p.
21351 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21352 scatter stores too.
21353 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21354 internal_fn_stored_value_index.
21355 (check_load_store_masking): Handle scatter stores too.
21356 (vect_get_store_rhs): Make public.
21357 (vectorizable_call): Use internal_store_fn_p.
21358 (vectorizable_store): Handle scatter store internal functions.
21359 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21360 when deciding whether the end of the group has been reached.
21361 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21362 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21363 (mask_scatter_store<mode>): New insns.
21364
21365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21366 Alan Hayward <alan.hayward@arm.com>
21367 David Sherwood <david.sherwood@arm.com>
21368
21369 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21370 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21371 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21372 function.
21373 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21374 Use vect_truncate_gather_scatter_offset if we can't treat the
21375 operation as a normal gather load or scatter store.
21376 (get_group_load_store_type): Take the gather_scatter_info
21377 as argument. Try using a gather load or scatter store for
21378 single-element groups.
21379 (get_load_store_type): Update calls to get_group_load_store_type
21380 and vect_use_strided_gather_scatters_p.
21381
21382 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21383 Alan Hayward <alan.hayward@arm.com>
21384 David Sherwood <david.sherwood@arm.com>
21385
21386 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21387 optional tree argument.
21388 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21389 null target hooks.
21390 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21391 but continue to use the current value as a fallback.
21392 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21393 to compare the updates.
21394 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21395 (get_load_store_type): Use it when handling a strided access.
21396 (vect_get_strided_load_store_ops): New function.
21397 (vect_get_data_ptr_increment): Likewise.
21398 (vectorizable_load): Handle strided gather loads. Always pass
21399 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21400
21401 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21402 Alan Hayward <alan.hayward@arm.com>
21403 David Sherwood <david.sherwood@arm.com>
21404
21405 * doc/md.texi (gather_load@var{m}): Document.
21406 (mask_gather_load@var{m}): Likewise.
21407 * genopinit.c (main): Add supports_vec_gather_load and
21408 supports_vec_gather_load_cached to target_optabs.
21409 * optabs-tree.c (init_tree_optimization_optabs): Use
21410 ggc_cleared_alloc to allocate target_optabs.
21411 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21412 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21413 functions.
21414 * internal-fn.h (internal_load_fn_p): Declare.
21415 (internal_gather_scatter_fn_p): Likewise.
21416 (internal_fn_mask_index): Likewise.
21417 (internal_gather_scatter_fn_supported_p): Likewise.
21418 * internal-fn.c (gather_load_direct): New macro.
21419 (expand_gather_load_optab_fn): New function.
21420 (direct_gather_load_optab_supported_p): New macro.
21421 (direct_internal_fn_optab): New function.
21422 (internal_load_fn_p): Likewise.
21423 (internal_gather_scatter_fn_p): Likewise.
21424 (internal_fn_mask_index): Likewise.
21425 (internal_gather_scatter_fn_supported_p): Likewise.
21426 * optabs-query.c (supports_at_least_one_mode_p): New function.
21427 (supports_vec_gather_load_p): Likewise.
21428 * optabs-query.h (supports_vec_gather_load_p): Declare.
21429 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21430 and memory_type field.
21431 (NUM_PATTERNS): Bump to 15.
21432 * tree-vect-data-refs.c: Include internal-fn.h.
21433 (vect_gather_scatter_fn_p): New function.
21434 (vect_describe_gather_scatter_call): Likewise.
21435 (vect_check_gather_scatter): Try using internal functions for
21436 gather loads. Recognize existing calls to a gather load function.
21437 (vect_analyze_data_refs): Consider using gather loads if
21438 supports_vec_gather_load_p.
21439 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21440 (vect_get_gather_scatter_offset_type): Likewise.
21441 (vect_convert_mask_for_vectype): Likewise.
21442 (vect_add_conversion_to_patterm): Likewise.
21443 (vect_try_gather_scatter_pattern): Likewise.
21444 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21445 (vect_vect_recog_func_ptrs): Add it.
21446 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21447 internal_fn_mask_index and internal_gather_scatter_fn_p.
21448 (check_load_store_masking): Take the gather_scatter_info as an
21449 argument and handle gather loads.
21450 (vect_get_gather_scatter_ops): New function.
21451 (vectorizable_call): Check internal_load_fn_p.
21452 (vectorizable_load): Likewise. Handle gather load internal
21453 functions.
21454 (vectorizable_store): Update call to check_load_store_masking.
21455 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21456 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21457 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21458 (aarch64_gather_scale_operand_d): New predicates.
21459 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21460 (mask_gather_load<mode>): New insns.
21461
21462 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21463 Alan Hayward <alan.hayward@arm.com>
21464 David Sherwood <david.sherwood@arm.com>
21465
21466 * optabs.def (fold_left_plus_optab): New optab.
21467 * doc/md.texi (fold_left_plus_@var{m}): Document.
21468 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21469 * internal-fn.c (fold_left_direct): Define.
21470 (expand_fold_left_optab_fn): Likewise.
21471 (direct_fold_left_optab_supported_p): Likewise.
21472 * fold-const-call.c (fold_const_fold_left): New function.
21473 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21474 * tree-parloops.c (valid_reduction_p): New function.
21475 (gather_scalar_reductions): Use it.
21476 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21477 (vect_finish_replace_stmt): Declare.
21478 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21479 (needs_fold_left_reduction_p): New function, split out from...
21480 (vect_is_simple_reduction): ...here. Accept reductions that
21481 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21482 (vect_force_simple_reduction): Also store the reduction type in
21483 the assignment's STMT_VINFO_REDUC_TYPE.
21484 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21485 (merge_with_identity): New function.
21486 (vect_expand_fold_left): Likewise.
21487 (vectorize_fold_left_reduction): Likewise.
21488 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21489 scalar phi in place for it. Check for target support and reject
21490 cases that would reassociate the operation. Defer the transform
21491 phase to vectorize_fold_left_reduction.
21492 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21493 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21494 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21495
21496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21497
21498 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21499 call to ifc_temp_var.
21500
21501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21502 Alan Hayward <alan.hayward@arm.com>
21503 David Sherwood <david.sherwood@arm.com>
21504
21505 * target.def (legitimize_address_displacement): Take the original
21506 offset as a poly_int.
21507 * targhooks.h (default_legitimize_address_displacement): Update
21508 accordingly.
21509 * targhooks.c (default_legitimize_address_displacement): Likewise.
21510 * doc/tm.texi: Regenerate.
21511 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21512 as an argument, moving assert of ad->disp == ad->disp_term to...
21513 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21514 Try calling targetm.legitimize_address_displacement before expanding
21515 the address rather than afterwards, and adjust for the new interface.
21516 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21517 Match the new hook interface. Handle SVE addresses.
21518 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21519 new hook interface.
21520
21521 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21522
21523 * Makefile.in (OBJS): Add early-remat.o.
21524 * target.def (select_early_remat_modes): New hook.
21525 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21526 * doc/tm.texi: Regenerate.
21527 * targhooks.h (default_select_early_remat_modes): Declare.
21528 * targhooks.c (default_select_early_remat_modes): New function.
21529 * timevar.def (TV_EARLY_REMAT): New timevar.
21530 * passes.def (pass_early_remat): New pass.
21531 * tree-pass.h (make_pass_early_remat): Declare.
21532 * early-remat.c: New file.
21533 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21534 function.
21535 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21536
21537 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21538 Alan Hayward <alan.hayward@arm.com>
21539 David Sherwood <david.sherwood@arm.com>
21540
21541 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21542 vfm1 with a bound_epilog parameter.
21543 (vect_do_peeling): Update calls accordingly, and move the prologue
21544 call earlier in the function. Treat the base bound_epilog as 0 for
21545 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21546 this base when peeling for gaps.
21547 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21548 with fully-masked loops.
21549 (vect_estimate_min_profitable_iters): Handle the single peeled
21550 iteration in that case.
21551
21552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21553 Alan Hayward <alan.hayward@arm.com>
21554 David Sherwood <david.sherwood@arm.com>
21555
21556 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21557 single-element interleaving even if the size is not a power of 2.
21558 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21559 accesses for single-element interleaving if the group size is
21560 not a power of 2.
21561
21562 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21563 Alan Hayward <alan.hayward@arm.com>
21564 David Sherwood <david.sherwood@arm.com>
21565
21566 * doc/md.texi (fold_extract_last_@var{m}): Document.
21567 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21568 * optabs.def (fold_extract_last_optab): New optab.
21569 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21570 * internal-fn.c (fold_extract_direct): New macro.
21571 (expand_fold_extract_optab_fn): Likewise.
21572 (direct_fold_extract_optab_supported_p): Likewise.
21573 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21574 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21575 EXTRACT_LAST_REDUCTION.
21576 (get_initial_def_for_reduction): Do not create an initial vector
21577 for EXTRACT_LAST_REDUCTION reductions.
21578 (vectorizable_reduction): Leave the scalar phi in place for
21579 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21580 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21581 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21582 transform phase to vectorizable_condition.
21583 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21584 split out from...
21585 (vect_finish_stmt_generation): ...here.
21586 (vect_finish_replace_stmt): New function.
21587 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21588 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21589 pattern.
21590 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21591
21592 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21593 Alan Hayward <alan.hayward@arm.com>
21594 David Sherwood <david.sherwood@arm.com>
21595
21596 * doc/md.texi (extract_last_@var{m}): Document.
21597 * optabs.def (extract_last_optab): New optab.
21598 * internal-fn.def (EXTRACT_LAST): New internal function.
21599 * internal-fn.c (cond_unary_direct): New macro.
21600 (expand_cond_unary_optab_fn): Likewise.
21601 (direct_cond_unary_optab_supported_p): Likewise.
21602 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21603 loops using EXTRACT_LAST.
21604 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21605 (extract_last_<mode>): ...this optab.
21606 (vec_extract<mode><Vel>): Update accordingly.
21607
21608 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21609 Alan Hayward <alan.hayward@arm.com>
21610 David Sherwood <david.sherwood@arm.com>
21611
21612 * target.def (empty_mask_is_expensive): New hook.
21613 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21614 * doc/tm.texi: Regenerate.
21615 * targhooks.h (default_empty_mask_is_expensive): Declare.
21616 * targhooks.c (default_empty_mask_is_expensive): New function.
21617 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21618 if the target says that empty masks are expensive.
21619 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21620 New function.
21621 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21622
21623 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21624 Alan Hayward <alan.hayward@arm.com>
21625 David Sherwood <david.sherwood@arm.com>
21626
21627 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21628 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21629 (vect_use_loop_mask_for_alignment_p): New function.
21630 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21631 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21632 niters_skip argument. Make sure that the first niters_skip elements
21633 of the first iteration are inactive.
21634 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21635 Update call to vect_set_loop_masks_directly.
21636 (get_misalign_in_elems): New function, split out from...
21637 (vect_gen_prolog_loop_niters): ...here.
21638 (vect_update_init_of_dr): Take a code argument that specifies whether
21639 the adjustment should be added or subtracted.
21640 (vect_update_init_of_drs): Likewise.
21641 (vect_prepare_for_masked_peels): New function.
21642 (vect_do_peeling): Skip prologue peeling if we're using a mask
21643 instead. Update call to vect_update_inits_of_drs.
21644 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21645 mask_skip_niters.
21646 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21647 alignment. Do not include the number of peeled iterations in
21648 the minimum threshold in that case.
21649 (vectorizable_induction): Adjust the start value down by
21650 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21651 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21652 Take the number of skipped iterations into account when calculating
21653 the loop bounds.
21654 * tree-vect-stmts.c (vect_gen_while_not): New function.
21655
21656 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21657 Alan Hayward <alan.hayward@arm.com>
21658 David Sherwood <david.sherwood@arm.com>
21659
21660 * doc/sourcebuild.texi (vect_fully_masked): Document.
21661 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21662 default value to 0.
21663 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21664 split out from...
21665 (vect_analyze_loop_2): ...here. Don't check the vectorization
21666 factor against the number of loop iterations if the loop is
21667 fully-masked.
21668
21669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21670 Alan Hayward <alan.hayward@arm.com>
21671 David Sherwood <david.sherwood@arm.com>
21672
21673 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21674 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21675 (dump_groups): Update accordingly.
21676 (iv_use::mem_type): New member variable.
21677 (address_p): New function.
21678 (record_use): Add a mem_type argument and initialize the new
21679 mem_type field.
21680 (record_group_use): Add a mem_type argument. Use address_p.
21681 Remove obsolete null checks of base_object. Update call to record_use.
21682 (find_interesting_uses_op): Update call to record_group_use.
21683 (find_interesting_uses_cond): Likewise.
21684 (find_interesting_uses_address): Likewise.
21685 (get_mem_type_for_internal_fn): New function.
21686 (find_address_like_use): Likewise.
21687 (find_interesting_uses_stmt): Try find_address_like_use before
21688 calling find_interesting_uses_op.
21689 (addr_offset_valid_p): Use the iv mem_type field as the type
21690 of the addressed memory.
21691 (add_autoinc_candidates): Likewise.
21692 (get_address_cost): Likewise.
21693 (split_small_address_groups_p): Use address_p.
21694 (split_address_groups): Likewise.
21695 (add_iv_candidate_for_use): Likewise.
21696 (autoinc_possible_for_pair): Likewise.
21697 (rewrite_groups): Likewise.
21698 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21699 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21700 (get_alias_ptr_type_for_ptr_address): New function.
21701 (rewrite_use_address): Rewrite address uses in calls that were
21702 identified by find_address_like_use.
21703
21704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21705 Alan Hayward <alan.hayward@arm.com>
21706 David Sherwood <david.sherwood@arm.com>
21707
21708 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21709 TARGET_MEM_REFs.
21710 * gimple-expr.h (is_gimple_addressable: Likewise.
21711 * gimple-expr.c (is_gimple_address): Likewise.
21712 * internal-fn.c (expand_call_mem_ref): New function.
21713 (expand_mask_load_optab_fn): Use it.
21714 (expand_mask_store_optab_fn): Likewise.
21715
21716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21717 Alan Hayward <alan.hayward@arm.com>
21718 David Sherwood <david.sherwood@arm.com>
21719
21720 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21721 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21722 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21723 (cond_umax@var{mode}): Document.
21724 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21725 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21726 (cond_umin_optab, cond_umax_optab): New optabs.
21727 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21728 (COND_IOR, COND_XOR): New internal functions.
21729 * internal-fn.h (get_conditional_internal_fn): Declare.
21730 * internal-fn.c (cond_binary_direct): New macro.
21731 (expand_cond_binary_optab_fn): Likewise.
21732 (direct_cond_binary_optab_supported_p): Likewise.
21733 (get_conditional_internal_fn): New function.
21734 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21735 Cope with reduction statements that are vectorized as calls rather
21736 than assignments.
21737 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21738 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21739 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21740 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21741 (UNSPEC_COND_EOR): New unspecs.
21742 (optab): Add mappings for them.
21743 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21744 (sve_int_op, sve_fp_op): New int attributes.
21745
21746 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21747 Alan Hayward <alan.hayward@arm.com>
21748 David Sherwood <david.sherwood@arm.com>
21749
21750 * optabs.def (while_ult_optab): New optab.
21751 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21752 * internal-fn.def (WHILE_ULT): New internal function.
21753 * internal-fn.h (direct_internal_fn_supported_p): New override
21754 that takes two types as argument.
21755 * internal-fn.c (while_direct): New macro.
21756 (expand_while_optab_fn): New function.
21757 (convert_optab_supported_p): Likewise.
21758 (direct_while_optab_supported_p): New macro.
21759 * wide-int.h (wi::udiv_ceil): New function.
21760 * tree-vectorizer.h (rgroup_masks): New structure.
21761 (vec_loop_masks): New typedef.
21762 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21763 and fully_masked_p.
21764 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21765 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21766 (vect_max_vf): New function.
21767 (slpeel_make_loop_iterate_ntimes): Delete.
21768 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21769 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21770 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21771 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21772 internal-fn.h, stor-layout.h and optabs-query.h.
21773 (vect_set_loop_mask): New function.
21774 (add_preheader_seq): Likewise.
21775 (add_header_seq): Likewise.
21776 (interleave_supported_p): Likewise.
21777 (vect_maybe_permute_loop_masks): Likewise.
21778 (vect_set_loop_masks_directly): Likewise.
21779 (vect_set_loop_condition_masked): Likewise.
21780 (vect_set_loop_condition_unmasked): New function, split out from
21781 slpeel_make_loop_iterate_ntimes.
21782 (slpeel_make_loop_iterate_ntimes): Rename to..
21783 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21784 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21785 (vect_do_peeling): Update call accordingly.
21786 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21787 loops.
21788 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21789 mask_compare_type, can_fully_mask_p and fully_masked_p.
21790 (release_vec_loop_masks): New function.
21791 (_loop_vec_info): Use it to free the loop masks.
21792 (can_produce_all_loop_masks_p): New function.
21793 (vect_get_max_nscalars_per_iter): Likewise.
21794 (vect_verify_full_masking): Likewise.
21795 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21796 retries, and free the mask rgroups before retrying. Check loop-wide
21797 reasons for disallowing fully-masked loops. Make the final decision
21798 about whether use a fully-masked loop or not.
21799 (vect_estimate_min_profitable_iters): Do not assume that peeling
21800 for the number of iterations will be needed for fully-masked loops.
21801 (vectorizable_reduction): Disable fully-masked loops.
21802 (vectorizable_live_operation): Likewise.
21803 (vect_halve_mask_nunits): New function.
21804 (vect_double_mask_nunits): Likewise.
21805 (vect_record_loop_mask): Likewise.
21806 (vect_get_loop_mask): Likewise.
21807 (vect_transform_loop): Handle the case in which the final loop
21808 iteration might handle a partial vector. Call vect_set_loop_condition
21809 instead of slpeel_make_loop_iterate_ntimes.
21810 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21811 (check_load_store_masking): New function.
21812 (prepare_load_store_mask): Likewise.
21813 (vectorizable_store): Handle fully-masked loops.
21814 (vectorizable_load): Likewise.
21815 (supportable_widening_operation): Use vect_halve_mask_nunits for
21816 booleans.
21817 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21818 (vect_gen_while): New function.
21819 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21820 (aarch64_uqdec<mode>): New insn.
21821
21822 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21823 Alan Hayward <alan.hayward@arm.com>
21824 David Sherwood <david.sherwood@arm.com>
21825
21826 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21827 (reduc_xor_scal_optab): New optabs.
21828 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21829 (reduc_xor_scal_@var{m}): Document.
21830 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21831 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21832 internal functions.
21833 * fold-const-call.c (fold_const_call): Handle them.
21834 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21835 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21836 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21837 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21838 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21839 (UNSPEC_XORV): New unspecs.
21840 (optab): Add entries for them.
21841 (BITWISEV): New int iterator.
21842 (bit_reduc_op): New int attributes.
21843
21844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21845 Alan Hayward <alan.hayward@arm.com>
21846 David Sherwood <david.sherwood@arm.com>
21847
21848 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21849 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21850 * optabs.def (vec_shl_insert_optab): New optab.
21851 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21852 (duplicate_and_interleave): Likewise.
21853 * tree-vect-loop.c: Include internal-fn.h.
21854 (neutral_op_for_slp_reduction): New function, split out from
21855 get_initial_defs_for_reduction.
21856 (get_initial_def_for_reduction): Handle option 2 for variable-length
21857 vectors by loading the neutral value into a vector and then shifting
21858 the initial value into element 0.
21859 (get_initial_defs_for_reduction): Replace the code argument with
21860 the neutral value calculated by neutral_op_for_slp_reduction.
21861 Use gimple_build_vector for constant-length vectors.
21862 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21863 but the first group_size elements have a neutral value.
21864 Use duplicate_and_interleave otherwise.
21865 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21866 Update call to get_initial_defs_for_reduction. Handle SLP
21867 reductions for variable-length vectors by creating one vector
21868 result for each scalar result, with the elements associated
21869 with other scalar results stubbed out with the neutral value.
21870 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21871 Require IFN_VEC_SHL_INSERT for double reductions on
21872 variable-length vectors, or SLP reductions that have
21873 a neutral value. Require can_duplicate_and_interleave_p
21874 support for variable-length unchained SLP reductions if there
21875 is no neutral value, such as for MIN/MAX reductions. Also require
21876 the number of vector elements to be a multiple of the number of
21877 SLP statements when doing variable-length unchained SLP reductions.
21878 Update call to vect_create_epilog_for_reduction.
21879 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21880 and remove initial values.
21881 (duplicate_and_interleave): Make public.
21882 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21883 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21884
21885 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21886 Alan Hayward <alan.hayward@arm.com>
21887 David Sherwood <david.sherwood@arm.com>
21888
21889 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21890 (can_duplicate_and_interleave_p): New function.
21891 (vect_get_and_check_slp_defs): Take the vector of statements
21892 rather than just the current one. Remove excess parentheses.
21893 Restriction rejectinon of vect_constant_def and vect_external_def
21894 for variable-length vectors to boolean types, or types for which
21895 can_duplicate_and_interleave_p is false.
21896 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21897 (duplicate_and_interleave): New function.
21898 (vect_get_constant_vectors): Use gimple_build_vector for
21899 constant-length vectors and suitable variable-length constant
21900 vectors. Use duplicate_and_interleave for other variable-length
21901 vectors. Don't defer the update when inserting new statements.
21902
21903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21904 Alan Hayward <alan.hayward@arm.com>
21905 David Sherwood <david.sherwood@arm.com>
21906
21907 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21908 min_profitable_iters doesn't go negative.
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 (vec_mask_load_lanes@var{m}@var{n}): Document.
21915 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21916 * optabs.def (vec_mask_load_lanes_optab): New optab.
21917 (vec_mask_store_lanes_optab): Likewise.
21918 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21919 (MASK_STORE_LANES): Likewise.
21920 * internal-fn.c (mask_load_lanes_direct): New macro.
21921 (mask_store_lanes_direct): Likewise.
21922 (expand_mask_load_optab_fn): Handle masked operations.
21923 (expand_mask_load_lanes_optab_fn): New macro.
21924 (expand_mask_store_optab_fn): Handle masked operations.
21925 (expand_mask_store_lanes_optab_fn): New macro.
21926 (direct_mask_load_lanes_optab_supported_p): Likewise.
21927 (direct_mask_store_lanes_optab_supported_p): Likewise.
21928 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21929 parameter.
21930 (vect_load_lanes_supported): Likewise.
21931 * tree-vect-data-refs.c (strip_conversion): New function.
21932 (can_group_stmts_p): Likewise.
21933 (vect_analyze_data_ref_accesses): Use it instead of checking
21934 for a pair of assignments.
21935 (vect_store_lanes_supported): Take a masked_p parameter.
21936 (vect_load_lanes_supported): Likewise.
21937 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21938 vect_store_lanes_supported and vect_load_lanes_supported.
21939 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21940 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21941 parameter. Don't allow gaps for masked accesses.
21942 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21943 and vect_load_lanes_supported.
21944 (get_load_store_type): Take a masked_p parameter and update
21945 call to get_group_load_store_type.
21946 (vectorizable_store): Update call to get_load_store_type.
21947 Handle IFN_MASK_STORE_LANES.
21948 (vectorizable_load): Update call to get_load_store_type.
21949 Handle IFN_MASK_LOAD_LANES.
21950
21951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21952 Alan Hayward <alan.hayward@arm.com>
21953 David Sherwood <david.sherwood@arm.com>
21954
21955 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21956 modes for SVE.
21957 * config/aarch64/aarch64-protos.h
21958 (aarch64_sve_struct_memory_operand_p): Declare.
21959 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21960 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21961 (VPRED, vpred): Handle SVE structure modes.
21962 * config/aarch64/constraints.md (Utx): New constraint.
21963 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21964 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21965 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21966 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21967 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21968 structure modes. Split into pieces after RA.
21969 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21970 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21971 New patterns.
21972 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21973 SVE structure modes.
21974 (aarch64_classify_address): Likewise.
21975 (sizetochar): Move earlier in file.
21976 (aarch64_print_operand): Handle SVE register lists.
21977 (aarch64_array_mode): New function.
21978 (aarch64_sve_struct_memory_operand_p): Likewise.
21979 (TARGET_ARRAY_MODE): Redefine.
21980
21981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21982 Alan Hayward <alan.hayward@arm.com>
21983 David Sherwood <david.sherwood@arm.com>
21984
21985 * target.def (array_mode): New target hook.
21986 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21987 * doc/tm.texi: Regenerate.
21988 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21989 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21990 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21991 targetm.array_mode.
21992 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21993 type sizes.
21994
21995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21996 Alan Hayward <alan.hayward@arm.com>
21997 David Sherwood <david.sherwood@arm.com>
21998
21999 * fold-const.c (fold_binary_loc): Check the argument types
22000 rather than the result type when testing for a vector operation.
22001
22002 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22003
22004 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22005 * doc/tm.texi: Regenerate.
22006
22007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22008 Alan Hayward <alan.hayward@arm.com>
22009 David Sherwood <david.sherwood@arm.com>
22010
22011 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22012 (sve): Document new AArch64 extension.
22013 * doc/md.texi (w): Extend the description of the AArch64
22014 constraint to include SVE vectors.
22015 (Upl, Upa): Document new AArch64 predicate constraints.
22016 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22017 enum.
22018 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22019 (msve-vector-bits=): New option.
22020 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22021 SVE when these are disabled.
22022 (sve): New extension.
22023 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22024 modes. Adjust their number of units based on aarch64_sve_vg.
22025 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22026 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22027 aarch64_addr_query_type.
22028 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22029 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22030 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22031 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22032 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22033 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22034 (aarch64_simd_imm_zero_p): Delete.
22035 (aarch64_check_zero_based_sve_index_immediate): Declare.
22036 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22037 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22038 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22039 (aarch64_sve_float_mul_immediate_p): Likewise.
22040 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22041 rather than an rtx.
22042 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22043 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22044 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22045 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22046 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22047 (aarch64_regmode_natural_size): Likewise.
22048 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22049 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22050 left one place.
22051 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22052 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22053 for VG and the SVE predicate registers.
22054 (V_ALIASES): Add a "z"-prefixed alias.
22055 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22056 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22057 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22058 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22059 (REG_CLASS_NAMES): Add entries for them.
22060 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22061 and the predicate registers.
22062 (aarch64_sve_vg): Declare.
22063 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22064 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22065 (REGMODE_NATURAL_SIZE): Define.
22066 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22067 SVE macros.
22068 * config/aarch64/aarch64.c: Include cfgrtl.h.
22069 (simd_immediate_info): Add a constructor for series vectors,
22070 and an associated step field.
22071 (aarch64_sve_vg): New variable.
22072 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22073 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22074 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22075 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22076 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22077 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22078 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22079 (aarch64_get_mask_mode): New functions.
22080 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22081 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22082 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22083 predicate modes and predicate registers. Explicitly restrict
22084 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22085 to store a vector mode if it is recognized by
22086 aarch64_classify_vector_mode.
22087 (aarch64_regmode_natural_size): New function.
22088 (aarch64_hard_regno_caller_save_mode): Return the original mode
22089 for predicates.
22090 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22091 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22092 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22093 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22094 functions.
22095 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22096 does not overlap dest if the function is frame-related. Handle
22097 SVE constants.
22098 (aarch64_split_add_offset): New function.
22099 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22100 them aarch64_add_offset.
22101 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22102 and update call to aarch64_sub_sp.
22103 (aarch64_add_cfa_expression): New function.
22104 (aarch64_expand_prologue): Pass extra temporary registers to the
22105 functions above. Handle the case in which we need to emit new
22106 DW_CFA_expressions for registers that were originally saved
22107 relative to the stack pointer, but now have to be expressed
22108 relative to the frame pointer.
22109 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22110 functions above.
22111 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22112 IP0 and IP1 values for SVE frames.
22113 (aarch64_expand_vec_series): New function.
22114 (aarch64_expand_sve_widened_duplicate): Likewise.
22115 (aarch64_expand_sve_const_vector): Likewise.
22116 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22117 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22118 into the register, rather than emitting a SET directly.
22119 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22120 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22121 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22122 (offset_9bit_signed_scaled_p): New functions.
22123 (aarch64_replicate_bitmask_imm): New function.
22124 (aarch64_bitmask_imm): Use it.
22125 (aarch64_cannot_force_const_mem): Reject expressions involving
22126 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22127 (aarch64_classify_index): Handle SVE indices, by requiring
22128 a plain register index with a scale that matches the element size.
22129 (aarch64_classify_address): Handle SVE addresses. Assert that
22130 the mode of the address is VOIDmode or an integer mode.
22131 Update call to aarch64_classify_symbol.
22132 (aarch64_classify_symbolic_expression): Update call to
22133 aarch64_classify_symbol.
22134 (aarch64_const_vec_all_in_range_p): New function.
22135 (aarch64_print_vector_float_operand): Likewise.
22136 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22137 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22138 and the FP immediates 1.0 and 0.5.
22139 (aarch64_print_address_internal): Handle SVE addresses.
22140 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22141 (aarch64_regno_regclass): Handle predicate registers.
22142 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22143 data modes.
22144 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22145 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22146 (aarch64_convert_sve_vector_bits): New function.
22147 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22148 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22149 rather than an rtx.
22150 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22151 Handle SVE vector and predicate modes. Accept VL-based constants
22152 that need only one temporary register, and VL offsets that require
22153 no temporary registers.
22154 (aarch64_conditional_register_usage): Mark the predicate registers
22155 as fixed if SVE isn't available.
22156 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22157 Return true for SVE vector and predicate modes.
22158 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22159 rather than an unsigned int. Handle SVE modes.
22160 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22161 SVE modes.
22162 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22163 if SVE is enabled.
22164 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22165 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22166 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22167 (aarch64_sve_float_mul_immediate_p): New functions.
22168 (aarch64_sve_valid_immediate): New function.
22169 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22170 Explicitly reject structure modes. Check for INDEX constants.
22171 Handle PTRUE and PFALSE constants.
22172 (aarch64_check_zero_based_sve_index_immediate): New function.
22173 (aarch64_simd_imm_zero_p): Delete.
22174 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22175 vector modes. Accept constants in the range of CNT[BHWD].
22176 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22177 ask for an Advanced SIMD mode.
22178 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22179 (aarch64_simd_vector_alignment): Handle SVE predicates.
22180 (aarch64_vectorize_preferred_vector_alignment): New function.
22181 (aarch64_simd_vector_alignment_reachable): Use it instead of
22182 the vector size.
22183 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22184 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22185 functions.
22186 (MAX_VECT_LEN): Delete.
22187 (expand_vec_perm_d): Add a vec_flags field.
22188 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22189 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22190 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22191 for SVE modes.
22192 (aarch64_evpc_rev): Rename to...
22193 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22194 (aarch64_evpc_rev_global): New function.
22195 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22196 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22197 MAX_VECT_LEN.
22198 (aarch64_evpc_sve_tbl): New function.
22199 (aarch64_expand_vec_perm_const_1): Update after rename of
22200 aarch64_evpc_rev. Handle SVE permutes too, trying
22201 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22202 than aarch64_evpc_tbl.
22203 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22204 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22205 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22206 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22207 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22208 (aarch64_expand_sve_vcond): New functions.
22209 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22210 of aarch64_vector_mode_p.
22211 (aarch64_dwarf_poly_indeterminate_value): New function.
22212 (aarch64_compute_pressure_classes): Likewise.
22213 (aarch64_can_change_mode_class): Likewise.
22214 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22215 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22216 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22217 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22218 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22219 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22220 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22221 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22222 constraints.
22223 (Dn, Dl, Dr): Accept const as well as const_vector.
22224 (Dz): Likewise. Compare against CONST0_RTX.
22225 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22226 of "vector" where appropriate.
22227 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22228 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22229 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22230 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22231 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22232 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22233 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22234 (v_int_equiv): Extend to SVE modes.
22235 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22236 mode attributes.
22237 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22238 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22239 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22240 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22241 (SVE_COND_FP_CMP): New int iterators.
22242 (perm_hilo): Handle the new unpack unspecs.
22243 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22244 attributes.
22245 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22246 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22247 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22248 (aarch64_equality_operator, aarch64_constant_vector_operand)
22249 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22250 (aarch64_sve_nonimmediate_operand): Likewise.
22251 (aarch64_sve_general_operand): Likewise.
22252 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22253 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22254 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22255 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22256 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22257 (aarch64_sve_float_arith_immediate): Likewise.
22258 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22259 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22260 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22261 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22262 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22263 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22264 (aarch64_sve_float_arith_operand): Likewise.
22265 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22266 (aarch64_sve_float_mul_operand): Likewise.
22267 (aarch64_sve_vec_perm_operand): Likewise.
22268 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22269 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22270 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22271 as well as const_vector.
22272 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22273 in file. Use CONST0_RTX and CONSTM1_RTX.
22274 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22275 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22276 Use aarch64_simd_imm_zero.
22277 * config/aarch64/aarch64-sve.md: New file.
22278 * config/aarch64/aarch64.md: Include it.
22279 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22280 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22281 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22282 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22283 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22284 (sve): New attribute.
22285 (enabled): Disable instructions with the sve attribute unless
22286 TARGET_SVE.
22287 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22288 aarch64_expand_mov_immediate.
22289 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22290 CNT[BHSD] immediates.
22291 (movti): Split CONST_POLY_INT moves into two halves.
22292 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22293 Split additions that need a temporary here if the destination
22294 is the stack pointer.
22295 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22296 (*add<mode>3_poly_1): New instruction.
22297 (set_clobber_cc): New expander.
22298
22299 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22300
22301 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22302 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22303 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22304 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22305 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22306 Change innermode from fixed_mode_size to machine_mode.
22307 (simplify_subreg): Update call accordingly. Handle a constant-sized
22308 subreg of a variable-length CONST_VECTOR.
22309
22310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22311 Alan Hayward <alan.hayward@arm.com>
22312 David Sherwood <david.sherwood@arm.com>
22313
22314 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22315 (add_offset_to_base): New function, split out from...
22316 (create_mem_ref): ...here. When handling a scale other than 1,
22317 check first whether the address is valid without the offset.
22318 Add it into the base if so, leaving the index and scale as-is.
22319
22320 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22321
22322 PR c++/83778
22323 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22324 fold_for_warn before checking if arg2 is INTEGER_CST.
22325
22326 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22327
22328 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22329 (store_multiple_operation): Delete.
22330 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22331 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22332 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22333 guarded by TARGET_STRING.
22334 (rs6000_output_load_multiple): Delete.
22335 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22336 OPTION_MASK_STRING / TARGET_STRING handling.
22337 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22338 (const rs6000_opt_masks) <"string">: Change mask to 0.
22339 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22340 (MASK_STRING): Delete.
22341 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22342 parts. Simplify.
22343 (load_multiple): Delete.
22344 (*ldmsi8): Delete.
22345 (*ldmsi7): Delete.
22346 (*ldmsi6): Delete.
22347 (*ldmsi5): Delete.
22348 (*ldmsi4): Delete.
22349 (*ldmsi3): Delete.
22350 (store_multiple): Delete.
22351 (*stmsi8): Delete.
22352 (*stmsi7): Delete.
22353 (*stmsi6): Delete.
22354 (*stmsi5): Delete.
22355 (*stmsi4): Delete.
22356 (*stmsi3): Delete.
22357 (movmemsi_8reg): Delete.
22358 (corresponding unnamed define_insn): Delete.
22359 (movmemsi_6reg): Delete.
22360 (corresponding unnamed define_insn): Delete.
22361 (movmemsi_4reg): Delete.
22362 (corresponding unnamed define_insn): Delete.
22363 (movmemsi_2reg): Delete.
22364 (corresponding unnamed define_insn): Delete.
22365 (movmemsi_1reg): Delete.
22366 (corresponding unnamed define_insn): Delete.
22367 * config/rs6000/rs6000.opt (mno-string): New.
22368 (mstring): Replace by deprecation warning stub.
22369 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22370
22371 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22372
22373 * regrename.c (regrename_do_replace): If replacing the same
22374 reg multiple times, try to reuse last created gen_raw_REG.
22375
22376 PR debug/81155
22377 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22378 main to workaround a bug in GDB.
22379
22380 2018-01-12 Tom de Vries <tom@codesourcery.com>
22381
22382 PR target/83737
22383 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22384
22385 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22386
22387 PR rtl-optimization/80481
22388 * ira-color.c (get_cap_member): New function.
22389 (allocnos_conflict_by_live_ranges_p): Use it.
22390 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22391 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22392
22393 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22394
22395 PR target/83628
22396 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22397 (*saddl_se_1): Ditto.
22398 (*ssubsi_1): Ditto.
22399 (*ssubl_se_1): Ditto.
22400
22401 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22402
22403 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22404 rather than wi::to_widest for DR_INITs.
22405 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22406 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22407 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22408 INTEGER_CSTs.
22409 (vect_analyze_group_access_1): Note that here.
22410
22411 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22412
22413 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22414 polynomial type sizes.
22415
22416 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22417
22418 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22419 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22420 (gimple_add_tmp_var): Likewise.
22421
22422 2018-01-12 Martin Liska <mliska@suse.cz>
22423
22424 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22425 (gimple_alloc_sizes): Likewise.
22426 (dump_gimple_statistics): Use PRIu64 in printf format.
22427 * gimple.h: Change uint64_t to int.
22428
22429 2018-01-12 Martin Liska <mliska@suse.cz>
22430
22431 * tree-core.h: Use uint64_t instead of int.
22432 * tree.c (tree_node_counts): Likewise.
22433 (tree_node_sizes): Likewise.
22434 (dump_tree_statistics): Use PRIu64 in printf format.
22435
22436 2018-01-12 Martin Liska <mliska@suse.cz>
22437
22438 * Makefile.in: As qsort_chk is implemented in vec.c, add
22439 vec.o to linkage of gencfn-macros.
22440 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22441 passing the info to record_node_allocation_statistics.
22442 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22443 and pass the info.
22444 * ggc-common.c (struct ggc_usage): Add operator== and use
22445 it in operator< and compare function.
22446 * mem-stats.h (struct mem_usage): Likewise.
22447 * vec.c (struct vec_usage): Remove operator< and compare
22448 function. Can be simply inherited.
22449
22450 2018-01-12 Martin Jambor <mjambor@suse.cz>
22451
22452 PR target/81616
22453 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22454 * tree-ssa-math-opts.c: Include domwalk.h.
22455 (convert_mult_to_fma_1): New function.
22456 (fma_transformation_info): New type.
22457 (fma_deferring_state): Likewise.
22458 (cancel_fma_deferring): New function.
22459 (result_of_phi): Likewise.
22460 (last_fma_candidate_feeds_initial_phi): Likewise.
22461 (convert_mult_to_fma): Added deferring logic, split actual
22462 transformation to convert_mult_to_fma_1.
22463 (math_opts_dom_walker): New type.
22464 (math_opts_dom_walker::after_dom_children): New method, body moved
22465 here from pass_optimize_widening_mul::execute, added deferring logic
22466 bits.
22467 (pass_optimize_widening_mul::execute): Moved most of code to
22468 math_opts_dom_walker::after_dom_children.
22469 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22470 * config/i386/i386.c (ix86_option_override_internal): Added
22471 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22472
22473 2018-01-12 Richard Biener <rguenther@suse.de>
22474
22475 PR debug/83157
22476 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22477 inline instance vars.
22478
22479 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22480
22481 PR target/81819
22482 * config/rx/rx.c (rx_is_restricted_memory_address):
22483 Handle SUBREG case.
22484
22485 2018-01-12 Richard Biener <rguenther@suse.de>
22486
22487 PR tree-optimization/80846
22488 * target.def (split_reduction): New target hook.
22489 * targhooks.c (default_split_reduction): New function.
22490 * targhooks.h (default_split_reduction): Declare.
22491 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22492 target requests first reduce vectors by combining low and high
22493 parts.
22494 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22495 (get_vectype_for_scalar_type_and_size): Export.
22496 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22497 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22498 * doc/tm.texi: Regenerate.
22499 * config/i386/i386.c (ix86_split_reduction): Implement
22500 TARGET_VECTORIZE_SPLIT_REDUCTION.
22501
22502 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22503
22504 PR target/83368
22505 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22506 in PIC mode except for TARGET_VXWORKS_RTP.
22507 * config/sparc/sparc.c: Include cfgrtl.h.
22508 (TARGET_INIT_PIC_REG): Define.
22509 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22510 (sparc_pic_register_p): New predicate.
22511 (sparc_legitimate_address_p): Use it.
22512 (sparc_legitimize_pic_address): Likewise.
22513 (sparc_delegitimize_address): Likewise.
22514 (sparc_mode_dependent_address_p): Likewise.
22515 (gen_load_pcrel_sym): Remove 4th parameter.
22516 (load_got_register): Adjust call to above. Remove obsolete stuff.
22517 (sparc_expand_prologue): Do not call load_got_register here.
22518 (sparc_flat_expand_prologue): Likewise.
22519 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22520 (sparc_use_pseudo_pic_reg): New function.
22521 (sparc_init_pic_reg): Likewise.
22522 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22523 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22524
22525 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22526
22527 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22528 Add item for branch_cost.
22529
22530 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22531
22532 PR rtl-optimization/83565
22533 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22534 not extend the result to a larger mode for rotate operations.
22535 (num_sign_bit_copies1): Likewise.
22536
22537 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22538
22539 PR target/40411
22540 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22541 -symbolic.
22542 Use values-Xc.o for -pedantic.
22543 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22544
22545 2018-01-12 Martin Liska <mliska@suse.cz>
22546
22547 PR ipa/83054
22548 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22549 New function.
22550 (possible_polymorphic_call_targets): Use it.
22551 (ipa_devirt): Likewise.
22552
22553 2018-01-12 Martin Liska <mliska@suse.cz>
22554
22555 * profile-count.h (enum profile_quality): Use 0 as invalid
22556 enum value of profile_quality.
22557
22558 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22559
22560 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22561 -mext-string options.
22562
22563 2018-01-12 Richard Biener <rguenther@suse.de>
22564
22565 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22566 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22567 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22568 Likewise.
22569 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22570
22571 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22572
22573 * configure.ac (--with-long-double-format): Add support for the
22574 configuration option to change the default long double format on
22575 PowerPC systems.
22576 * config.gcc (powerpc*-linux*-*): Likewise.
22577 * configure: Regenerate.
22578 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22579 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22580 used without modification.
22581
22582 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22583
22584 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22585 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22586 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22587 MISC_BUILTIN_SPEC_BARRIER.
22588 (rs6000_init_builtins): Likewise.
22589 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22590 enum value.
22591 (speculation_barrier): New define_insn.
22592 * doc/extend.texi: Document __builtin_speculation_barrier.
22593
22594 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22595
22596 PR target/83203
22597 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22598 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22599 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22600 iterators.
22601 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22602 integral modes instead of "ss" and "sd".
22603 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22604 vectors with 32-bit and 64-bit elements.
22605 (vecdupssescalarmodesuffix): New mode attribute.
22606 (vec_dup<mode>): Use it.
22607
22608 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22609
22610 PR target/83330
22611 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22612 frame if argument is passed on stack.
22613
22614 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22615
22616 PR target/82682
22617 * ree.c (combine_reaching_defs): Optimize also
22618 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22619 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22620
22621 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22622
22623 PR middle-end/83189
22624 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22625
22626 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22627
22628 PR middle-end/83718
22629 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22630 after they are computed.
22631
22632 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22633
22634 PR tree-optimization/83695
22635 * gimple-loop-linterchange.cc
22636 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22637 reset cached scev information after interchange.
22638 (pass_linterchange::execute): Remove call to scev_reset_htab.
22639
22640 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22641
22642 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22643 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22644 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22645 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22646 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22647 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22648 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22649 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22650 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22651 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22652 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22653 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22654 (V_lane_reg): Likewise.
22655 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22656 New define_expand.
22657 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22658 (vfmal_lane_low<mode>_intrinsic,
22659 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22660 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22661 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22662 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22663 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22664 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22665
22666 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22667
22668 * config/arm/arm-cpus.in (fp16fml): New feature.
22669 (ALL_SIMD): Add fp16fml.
22670 (armv8.2-a): Add fp16fml as an option.
22671 (armv8.3-a): Likewise.
22672 (armv8.4-a): Add fp16fml as part of fp16.
22673 * config/arm/arm.h (TARGET_FP16FML): Define.
22674 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22675 when appropriate.
22676 * config/arm/arm-modes.def (V2HF): Define.
22677 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22678 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22679 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22680 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22681 vfmsl_low, vfmsl_high): New set of builtins.
22682 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22683 (vfml_op): New code attribute.
22684 (VFMLHALVES): New int iterator.
22685 (VFML, VFMLSEL): New mode attributes.
22686 (V_reg): Define mapping for V2HF.
22687 (V_hi, V_lo): New mode attributes.
22688 (VF_constraint): Likewise.
22689 (vfml_half, vfml_half_selector): New int attributes.
22690 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22691 define_expand.
22692 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22693 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22694 New define_insn.
22695 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22696 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22697 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22698 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22699 documentation.
22700 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22701 Document new effective target and option set.
22702
22703 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22704
22705 * config/arm/arm-cpus.in (armv8_4): New feature.
22706 (ARMv8_4a): New fgroup.
22707 (armv8.4-a): New arch.
22708 * config/arm/arm-tables.opt: Regenerate.
22709 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22710 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22711 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22712 Add matching rules for -march=armv8.4-a and extensions.
22713 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22714
22715 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22716
22717 PR target/81821
22718 * config/rx/rx.md (BW): New mode attribute.
22719 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22720
22721 2018-01-11 Richard Biener <rguenther@suse.de>
22722
22723 PR tree-optimization/83435
22724 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22725 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22726 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22727
22728 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22729 Alan Hayward <alan.hayward@arm.com>
22730 David Sherwood <david.sherwood@arm.com>
22731
22732 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22733 field.
22734 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22735 (aarch64_print_address_internal): Use it to check for a zero offset.
22736
22737 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22738 Alan Hayward <alan.hayward@arm.com>
22739 David Sherwood <david.sherwood@arm.com>
22740
22741 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22742 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22743 Return a poly_int64 rather than a HOST_WIDE_INT.
22744 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22745 rather than a HOST_WIDE_INT.
22746 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22747 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22748 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22749 final_offset from HOST_WIDE_INT to poly_int64.
22750 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22751 to_constant when getting the number of units in an Advanced SIMD
22752 mode.
22753 (aarch64_builtin_vectorized_function): Check for a constant number
22754 of units.
22755 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22756 GET_MODE_SIZE.
22757 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22758 attribute instead of GET_MODE_NUNITS.
22759 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22760 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22761 GET_MODE_SIZE for fixed-size registers.
22762 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22763 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22764 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22765 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22766 (aarch64_print_operand, aarch64_print_address_internal)
22767 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22768 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22769 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22770 Handle polynomial GET_MODE_SIZE.
22771 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22772 wider than SImode without modification.
22773 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22774 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22775 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22776 passing and returning SVE modes.
22777 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22778 rather than GEN_INT.
22779 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22780 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22781 (aarch64_allocate_and_probe_stack_space): Likewise.
22782 (aarch64_layout_frame): Cope with polynomial offsets.
22783 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22784 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22785 polynomial offsets.
22786 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22787 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22788 poly_int64 rather than a HOST_WIDE_INT.
22789 (aarch64_get_separate_components, aarch64_process_components)
22790 (aarch64_expand_prologue, aarch64_expand_epilogue)
22791 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22792 (aarch64_anchor_offset): New function, split out from...
22793 (aarch64_legitimize_address): ...here.
22794 (aarch64_builtin_vectorization_cost): Handle polynomial
22795 TYPE_VECTOR_SUBPARTS.
22796 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22797 GET_MODE_NUNITS.
22798 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22799 number of elements from the PARALLEL rather than the mode.
22800 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22801 rather than GET_MODE_BITSIZE.
22802 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22803 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22804 (aarch64_expand_vec_perm_const_1): Handle polynomial
22805 d->perm.length () and d->perm elements.
22806 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22807 Apply to_constant to d->perm elements.
22808 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22809 polynomial CONST_VECTOR_NUNITS.
22810 (aarch64_move_pointer): Take amount as a poly_int64 rather
22811 than an int.
22812 (aarch64_progress_pointer): Avoid temporary variable.
22813 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22814 the mode attribute instead of GET_MODE.
22815
22816 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22817 Alan Hayward <alan.hayward@arm.com>
22818 David Sherwood <david.sherwood@arm.com>
22819
22820 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22821 x exists before using it.
22822 (aarch64_add_constant_internal): Rename to...
22823 (aarch64_add_offset_1): ...this. Replace regnum with separate
22824 src and dest rtxes. Handle the case in which they're different,
22825 including when the offset is zero. Replace scratchreg with an rtx.
22826 Use 2 additions if there is no spare register into which we can
22827 move a 16-bit constant.
22828 (aarch64_add_constant): Delete.
22829 (aarch64_add_offset): Replace reg with separate src and dest
22830 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22831 Use aarch64_add_offset_1.
22832 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22833 an rtx rather than an int. Take the delta as a poly_int64
22834 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22835 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22836 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22837 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22838 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22839 and aarch64_add_sp.
22840 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22841 aarch64_add_constant.
22842
22843 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22844
22845 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22846 Use scalar_float_mode.
22847
22848 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22849
22850 * config/aarch64/aarch64-simd.md
22851 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22852 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22853 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22854 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22855 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22856 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22857 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22858 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22859 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22860 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22861
22862 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22863
22864 PR target/83514
22865 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22866 targ_options->x_arm_arch_string is non NULL.
22867
22868 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22869
22870 * config/aarch64/aarch64.h
22871 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22872
22873 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22874
22875 PR target/82096
22876 * expmed.c (emit_store_flag_force): Swap if const op0
22877 and change VOIDmode to mode of op0.
22878
22879 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22880
22881 PR rtl-optimization/83761
22882 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22883 than bytes to mode_for_size.
22884
22885 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22886
22887 PR middle-end/83189
22888 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22889 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22890 profile.
22891
22892 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22893
22894 PR middle-end/83575
22895 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22896 when in layout mode.
22897 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22898 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22899 partition fixup.
22900
22901 2018-01-10 Michael Collison <michael.collison@arm.com>
22902
22903 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22904 * config/aarch64/aarch64-option-extension.def: Add
22905 AARCH64_OPT_EXTENSION of 'fp16fml'.
22906 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22907 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22908 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22909 * config/aarch64/constraints.md (Ui7): New constraint.
22910 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22911 (VFMLA_SEL_W): Ditto.
22912 (f16quad): Ditto.
22913 (f16mac1): Ditto.
22914 (VFMLA16_LOW): New int iterator.
22915 (VFMLA16_HIGH): Ditto.
22916 (UNSPEC_FMLAL): New unspec.
22917 (UNSPEC_FMLSL): Ditto.
22918 (UNSPEC_FMLAL2): Ditto.
22919 (UNSPEC_FMLSL2): Ditto.
22920 (f16mac): New code attribute.
22921 * config/aarch64/aarch64-simd-builtins.def
22922 (aarch64_fmlal_lowv2sf): Ditto.
22923 (aarch64_fmlsl_lowv2sf): Ditto.
22924 (aarch64_fmlalq_lowv4sf): Ditto.
22925 (aarch64_fmlslq_lowv4sf): Ditto.
22926 (aarch64_fmlal_highv2sf): Ditto.
22927 (aarch64_fmlsl_highv2sf): Ditto.
22928 (aarch64_fmlalq_highv4sf): Ditto.
22929 (aarch64_fmlslq_highv4sf): Ditto.
22930 (aarch64_fmlal_lane_lowv2sf): Ditto.
22931 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22932 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22933 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22934 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22935 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22936 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22937 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22938 (aarch64_fmlal_lane_highv2sf): Ditto.
22939 (aarch64_fmlsl_lane_highv2sf): Ditto.
22940 (aarch64_fmlal_laneq_highv2sf): Ditto.
22941 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22942 (aarch64_fmlalq_lane_highv4sf): Ditto.
22943 (aarch64_fmlsl_lane_highv4sf): Ditto.
22944 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22945 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22946 * config/aarch64/aarch64-simd.md:
22947 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22948 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22949 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22950 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22951 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22952 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22953 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22954 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22955 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22956 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22957 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22958 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22959 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22960 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22961 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22962 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22963 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22964 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22965 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22966 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22967 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22968 (vfmlsl_low_u32): Ditto.
22969 (vfmlalq_low_u32): Ditto.
22970 (vfmlslq_low_u32): Ditto.
22971 (vfmlal_high_u32): Ditto.
22972 (vfmlsl_high_u32): Ditto.
22973 (vfmlalq_high_u32): Ditto.
22974 (vfmlslq_high_u32): Ditto.
22975 (vfmlal_lane_low_u32): Ditto.
22976 (vfmlsl_lane_low_u32): Ditto.
22977 (vfmlal_laneq_low_u32): Ditto.
22978 (vfmlsl_laneq_low_u32): Ditto.
22979 (vfmlalq_lane_low_u32): Ditto.
22980 (vfmlslq_lane_low_u32): Ditto.
22981 (vfmlalq_laneq_low_u32): Ditto.
22982 (vfmlslq_laneq_low_u32): Ditto.
22983 (vfmlal_lane_high_u32): Ditto.
22984 (vfmlsl_lane_high_u32): Ditto.
22985 (vfmlal_laneq_high_u32): Ditto.
22986 (vfmlsl_laneq_high_u32): Ditto.
22987 (vfmlalq_lane_high_u32): Ditto.
22988 (vfmlslq_lane_high_u32): Ditto.
22989 (vfmlalq_laneq_high_u32): Ditto.
22990 (vfmlslq_laneq_high_u32): Ditto.
22991 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22992 (AARCH64_FL_FOR_ARCH8_4): New.
22993 (AARCH64_ISA_F16FML): New ISA flag.
22994 (TARGET_F16FML): New feature flag for fp16fml.
22995 (doc/invoke.texi): Document new fp16fml option.
22996
22997 2018-01-10 Michael Collison <michael.collison@arm.com>
22998
22999 * config/aarch64/aarch64-builtins.c:
23000 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23001 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23002 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23003 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23004 (AARCH64_ISA_SHA3): New ISA flag.
23005 (TARGET_SHA3): New feature flag for sha3.
23006 * config/aarch64/iterators.md (sha512_op): New int attribute.
23007 (CRYPTO_SHA512): New int iterator.
23008 (UNSPEC_SHA512H): New unspec.
23009 (UNSPEC_SHA512H2): Ditto.
23010 (UNSPEC_SHA512SU0): Ditto.
23011 (UNSPEC_SHA512SU1): Ditto.
23012 * config/aarch64/aarch64-simd-builtins.def
23013 (aarch64_crypto_sha512hqv2di): New builtin.
23014 (aarch64_crypto_sha512h2qv2di): Ditto.
23015 (aarch64_crypto_sha512su0qv2di): Ditto.
23016 (aarch64_crypto_sha512su1qv2di): Ditto.
23017 (aarch64_eor3qv8hi): Ditto.
23018 (aarch64_rax1qv2di): Ditto.
23019 (aarch64_xarqv2di): Ditto.
23020 (aarch64_bcaxqv8hi): Ditto.
23021 * config/aarch64/aarch64-simd.md:
23022 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23023 (aarch64_crypto_sha512su0qv2di): Ditto.
23024 (aarch64_crypto_sha512su1qv2di): Ditto.
23025 (aarch64_eor3qv8hi): Ditto.
23026 (aarch64_rax1qv2di): Ditto.
23027 (aarch64_xarqv2di): Ditto.
23028 (aarch64_bcaxqv8hi): Ditto.
23029 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23030 (vsha512h2q_u64): Ditto.
23031 (vsha512su0q_u64): Ditto.
23032 (vsha512su1q_u64): Ditto.
23033 (veor3q_u16): Ditto.
23034 (vrax1q_u64): Ditto.
23035 (vxarq_u64): Ditto.
23036 (vbcaxq_u16): Ditto.
23037 * config/arm/types.md (crypto_sha512): New type attribute.
23038 (crypto_sha3): Ditto.
23039 (doc/invoke.texi): Document new sha3 option.
23040
23041 2018-01-10 Michael Collison <michael.collison@arm.com>
23042
23043 * config/aarch64/aarch64-builtins.c:
23044 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23045 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23046 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23047 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23048 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23049 (AARCH64_ISA_SM4): New ISA flag.
23050 (TARGET_SM4): New feature flag for sm4.
23051 * config/aarch64/aarch64-simd-builtins.def
23052 (aarch64_sm3ss1qv4si): Ditto.
23053 (aarch64_sm3tt1aq4si): Ditto.
23054 (aarch64_sm3tt1bq4si): Ditto.
23055 (aarch64_sm3tt2aq4si): Ditto.
23056 (aarch64_sm3tt2bq4si): Ditto.
23057 (aarch64_sm3partw1qv4si): Ditto.
23058 (aarch64_sm3partw2qv4si): Ditto.
23059 (aarch64_sm4eqv4si): Ditto.
23060 (aarch64_sm4ekeyqv4si): Ditto.
23061 * config/aarch64/aarch64-simd.md:
23062 (aarch64_sm3ss1qv4si): Ditto.
23063 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23064 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23065 (aarch64_sm4eqv4si): Ditto.
23066 (aarch64_sm4ekeyqv4si): Ditto.
23067 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23068 (sm3part_op): Ditto.
23069 (CRYPTO_SM3TT): Ditto.
23070 (CRYPTO_SM3PART): Ditto.
23071 (UNSPEC_SM3SS1): New unspec.
23072 (UNSPEC_SM3TT1A): Ditto.
23073 (UNSPEC_SM3TT1B): Ditto.
23074 (UNSPEC_SM3TT2A): Ditto.
23075 (UNSPEC_SM3TT2B): Ditto.
23076 (UNSPEC_SM3PARTW1): Ditto.
23077 (UNSPEC_SM3PARTW2): Ditto.
23078 (UNSPEC_SM4E): Ditto.
23079 (UNSPEC_SM4EKEY): Ditto.
23080 * config/aarch64/constraints.md (Ui2): New constraint.
23081 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23082 * config/arm/types.md (crypto_sm3): New type attribute.
23083 (crypto_sm4): Ditto.
23084 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23085 (vsm3tt1aq_u32): Ditto.
23086 (vsm3tt1bq_u32): Ditto.
23087 (vsm3tt2aq_u32): Ditto.
23088 (vsm3tt2bq_u32): Ditto.
23089 (vsm3partw1q_u32): Ditto.
23090 (vsm3partw2q_u32): Ditto.
23091 (vsm4eq_u32): Ditto.
23092 (vsm4ekeyq_u32): Ditto.
23093 (doc/invoke.texi): Document new sm4 option.
23094
23095 2018-01-10 Michael Collison <michael.collison@arm.com>
23096
23097 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23098 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23099 (AARCH64_FL_FOR_ARCH8_4): New.
23100 (AARCH64_FL_V8_4): New flag.
23101 (doc/invoke.texi): Document new armv8.4-a option.
23102
23103 2018-01-10 Michael Collison <michael.collison@arm.com>
23104
23105 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23106 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23107 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23108 * config/aarch64/aarch64-option-extension.def: Add
23109 AARCH64_OPT_EXTENSION of 'sha2'.
23110 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23111 (crypto): Disable sha2 and aes if crypto disabled.
23112 (crypto): Enable aes and sha2 if enabled.
23113 (simd): Disable sha2 and aes if simd disabled.
23114 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23115 New flags.
23116 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23117 (TARGET_SHA2): New feature flag for sha2.
23118 (TARGET_AES): New feature flag for aes.
23119 * config/aarch64/aarch64-simd.md:
23120 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23121 conditional on TARGET_AES.
23122 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23123 (aarch64_crypto_sha1hsi): Make pattern conditional
23124 on TARGET_SHA2.
23125 (aarch64_crypto_sha1hv4si): Ditto.
23126 (aarch64_be_crypto_sha1hv4si): Ditto.
23127 (aarch64_crypto_sha1su1v4si): Ditto.
23128 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23129 (aarch64_crypto_sha1su0v4si): Ditto.
23130 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23131 (aarch64_crypto_sha256su0v4si): Ditto.
23132 (aarch64_crypto_sha256su1v4si): Ditto.
23133 (doc/invoke.texi): Document new aes and sha2 options.
23134
23135 2018-01-10 Martin Sebor <msebor@redhat.com>
23136
23137 PR tree-optimization/83781
23138 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23139 as string arrays.
23140
23141 2018-01-11 Martin Sebor <msebor@gmail.com>
23142 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23143
23144 PR tree-optimization/83501
23145 PR tree-optimization/81703
23146
23147 * tree-ssa-strlen.c (get_string_cst): Rename...
23148 (get_string_len): ...to this. Handle global constants.
23149 (handle_char_store): Adjust.
23150
23151 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23152 Jim Wilson <jimw@sifive.com>
23153
23154 * config/riscv/riscv-protos.h (riscv_output_return): New.
23155 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23156 (riscv_attribute_table, riscv_output_return),
23157 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23158 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23159 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23160 function.
23161 (riscv_expand_prologue): Add early return for naked function.
23162 (riscv_expand_epilogue): Likewise.
23163 (riscv_function_ok_for_sibcall): Return false for naked function.
23164 (riscv_set_current_function): New.
23165 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23166 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23167 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23168 * doc/extend.texi (RISC-V Function Attributes): New.
23169
23170 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23171
23172 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23173 check for 128-bit long double before checking TCmode.
23174 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23175 128-bit long doubles before checking TFmode or TCmode.
23176 (FLOAT128_IBM_P): Likewise.
23177
23178 2018-01-10 Martin Sebor <msebor@redhat.com>
23179
23180 PR tree-optimization/83671
23181 * builtins.c (c_strlen): Unconditionally return zero for the empty
23182 string.
23183 Use -Warray-bounds for warnings.
23184 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23185 for non-constant array indices with COMPONENT_REF, arrays of
23186 arrays, and pointers to arrays.
23187 (gimple_fold_builtin_strlen): Determine and set length range for
23188 non-constant character arrays.
23189
23190 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23191
23192 PR middle-end/81897
23193 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23194 empty blocks.
23195
23196 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23197
23198 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23199
23200 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23201
23202 PR target/83399
23203 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23204 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23205 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23206 indexed_or_indirect_operand predicate.
23207 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23208 (*vsx_le_perm_load_v8hi): Likewise.
23209 (*vsx_le_perm_load_v16qi): Likewise.
23210 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23211 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23212 (*vsx_le_perm_store_v8hi): Likewise.
23213 (*vsx_le_perm_store_v16qi): Likewise.
23214 (eight unnamed splitters): Likewise.
23215
23216 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23217
23218 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23219 * config/rs6000/emmintrin.h: Likewise.
23220 * config/rs6000/mmintrin.h: Likewise.
23221 * config/rs6000/xmmintrin.h: Likewise.
23222
23223 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23224
23225 PR c++/43486
23226 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23227 "public_flag".
23228 * tree.c (tree_nop_conversion): Return true for location wrapper
23229 nodes.
23230 (maybe_wrap_with_location): New function.
23231 (selftest::check_strip_nops): New function.
23232 (selftest::test_location_wrappers): New function.
23233 (selftest::tree_c_tests): Call it.
23234 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23235 (maybe_wrap_with_location): New decl.
23236 (EXPR_LOCATION_WRAPPER_P): New macro.
23237 (location_wrapper_p): New inline function.
23238 (tree_strip_any_location_wrapper): New inline function.
23239
23240 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23241
23242 PR target/83735
23243 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23244 stack_realign_offset for the largest alignment of stack slot
23245 actually used.
23246 (ix86_find_max_used_stack_alignment): New function.
23247 (ix86_finalize_stack_frame_flags): Use it. Set
23248 max_used_stack_alignment if we don't realign stack.
23249 * config/i386/i386.h (machine_function): Add
23250 max_used_stack_alignment.
23251
23252 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23253
23254 * config/arm/arm.opt (-mbranch-cost): New option.
23255 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23256 account.
23257
23258 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23259
23260 PR target/83629
23261 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23262 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23263
23264 2018-01-10 Richard Biener <rguenther@suse.de>
23265
23266 PR debug/83765
23267 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23268 early out so it also covers the case where we have a non-NULL
23269 origin.
23270
23271 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23272
23273 PR tree-optimization/83753
23274 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23275 for non-strided grouped accesses if the number of elements is 1.
23276
23277 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23278
23279 PR target/81616
23280 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23281 * i386.h (TARGET_USE_GATHER): Define.
23282 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23283
23284 2018-01-10 Martin Liska <mliska@suse.cz>
23285
23286 PR bootstrap/82831
23287 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23288 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23289 partitioning.
23290 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23291 CLEANUP_NO_PARTITIONING is not set.
23292
23293 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23294
23295 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23296 for vectors, as a partial revert of r254296.
23297 * rtl.h (const_vec_p): Delete.
23298 (const_vec_duplicate_p): Don't test for vector CONSTs.
23299 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23300 * expmed.c (make_tree): Likewise.
23301
23302 Revert:
23303 * common.md (E, F): Use CONSTANT_P instead of checking for
23304 CONST_VECTOR.
23305 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23306 checking for CONST_VECTOR.
23307
23308 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23309
23310 PR middle-end/83575
23311 * predict.c (force_edge_cold): Handle in more sane way edges
23312 with no prediction.
23313
23314 2018-01-09 Carl Love <cel@us.ibm.com>
23315
23316 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23317 V4SI, V4SF types.
23318 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23319 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23320 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23321 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23322 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23323 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23324 * config/rs6000/rs6000-protos.h: Add extern defition for
23325 rs6000_generate_float2_double_code.
23326 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23327 function.
23328 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23329 (float2_v2df): Add define_expand.
23330
23331 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23332
23333 PR target/83628
23334 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23335 op_mode in the force_to_mode call.
23336
23337 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23338
23339 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23340 instead of checking each element individually.
23341 (aarch64_evpc_uzp): Likewise.
23342 (aarch64_evpc_zip): Likewise.
23343 (aarch64_evpc_ext): Likewise.
23344 (aarch64_evpc_rev): Likewise.
23345 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23346 instead of checking each element individually. Return true without
23347 generating rtl if
23348 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23349 whether all selected elements come from the same input, instead of
23350 checking each element individually. Remove calls to gen_rtx_REG,
23351 start_sequence and end_sequence and instead assert that no rtl is
23352 generated.
23353
23354 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23355
23356 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23357 order of HIGH and CONST checks.
23358
23359 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23360
23361 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23362 if the destination isn't an SSA_NAME.
23363
23364 2018-01-09 Richard Biener <rguenther@suse.de>
23365
23366 PR tree-optimization/83668
23367 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23368 move prologue...
23369 (canonicalize_loop_form): ... here, renamed from ...
23370 (canonicalize_loop_closed_ssa_form): ... this and amended to
23371 swap successor edges for loop exit blocks to make us use
23372 the RPO order we need for initial schedule generation.
23373
23374 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23375
23376 PR tree-optimization/64811
23377 * match.pd: When optimizing comparisons with Inf, avoid
23378 introducing or losing exceptions from comparisons with NaN.
23379
23380 2018-01-09 Martin Liska <mliska@suse.cz>
23381
23382 PR sanitizer/82517
23383 * asan.c (shadow_mem_size): Add gcc_assert.
23384
23385 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23386
23387 Don't save registers in main().
23388
23389 PR target/83738
23390 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23391 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23392 * config/avr/avr.c (avr_set_current_function): Don't error if
23393 naked, OS_task or OS_main are specified at the same time.
23394 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23395 OS_main.
23396 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23397 attribute.
23398 * common/config/avr/avr-common.c (avr_option_optimization_table):
23399 Switch on -mmain-is-OS_task for optimizing compilations.
23400
23401 2018-01-09 Richard Biener <rguenther@suse.de>
23402
23403 PR tree-optimization/83572
23404 * graphite.c: Include cfganal.h.
23405 (graphite_transform_loops): Connect infinite loops to exit
23406 and remove fake edges at the end.
23407
23408 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23409
23410 * ipa-inline.c (edge_badness): Revert accidental checkin.
23411
23412 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23413
23414 PR ipa/80763
23415 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23416 symbols; not inline clones.
23417
23418 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23419
23420 PR target/83507
23421 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23422 hard registers. Formatting fixes.
23423
23424 PR preprocessor/83722
23425 * gcc.c (try_generate_repro): Pass
23426 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23427 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23428 do_report_bug.
23429
23430 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23431 Kito Cheng <kito.cheng@gmail.com>
23432
23433 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23434 (riscv_leaf_function_p): Delete.
23435 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23436
23437 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23438
23439 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23440 function.
23441 (do_ifelse): New function.
23442 (do_isel): New function.
23443 (do_sub3): New function.
23444 (do_add3): New function.
23445 (do_load_mask_compare): New function.
23446 (do_overlap_load_compare): New function.
23447 (expand_compare_loop): New function.
23448 (expand_block_compare): Call expand_compare_loop() when appropriate.
23449 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23450 option description.
23451 (-mblock-compare-inline-loop-limit): New option.
23452
23453 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23454
23455 PR target/83677
23456 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23457 Reverse order of second and third operands in first alternative.
23458 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23459 of first and second elements in UNSPEC_VPERMR vector.
23460 (altivec_expand_vec_perm_le): Likewise.
23461
23462 2018-01-08 Jeff Law <law@redhat.com>
23463
23464 PR rtl-optimizatin/81308
23465 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23466 (process_switch): If group_case_labels makes a change, then set
23467 cfg_altered.
23468 (pass_convert_switch::execute): If a switch is converted, then
23469 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23470
23471 PR rtl-optimization/81308
23472 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23473 splitting insns.
23474
23475 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23476
23477 PR target/83663 - Revert r255946
23478 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23479 generation for cases where splatting a value is not useful.
23480 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23481 across a vec_duplicate and a paradoxical subreg forming a vector
23482 mode to a vec_concat.
23483
23484 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23485
23486 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23487 -march=armv8.3-a variants.
23488 * config/arm/t-multilib: Likewise.
23489 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23490
23491 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23492
23493 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23494 to generate rtl.
23495 (cceq_ior_compare_complement): Give it a name so I can use it, and
23496 change boolean_or_operator predicate to boolean_operator so it can
23497 be used to generate a crand.
23498 (eqne): New code iterator.
23499 (bd/bd_neg): New code_attrs.
23500 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23501 a single define_insn.
23502 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23503 decrement (bdnzt/bdnzf/bdzt/bdzf).
23504 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23505 with the new names of the branch decrement patterns, and added the
23506 names of the branch decrement conditional patterns.
23507
23508 2018-01-08 Richard Biener <rguenther@suse.de>
23509
23510 PR tree-optimization/83563
23511 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23512 cache.
23513
23514 2018-01-08 Richard Biener <rguenther@suse.de>
23515
23516 PR middle-end/83713
23517 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23518
23519 2018-01-08 Richard Biener <rguenther@suse.de>
23520
23521 PR tree-optimization/83685
23522 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23523 references to abnormals.
23524
23525 2018-01-08 Richard Biener <rguenther@suse.de>
23526
23527 PR lto/83719
23528 * dwarf2out.c (output_indirect_strings): Handle empty
23529 skeleton_debug_str_hash.
23530 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23531
23532 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23533
23534 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23535 (emit_store_direct): Likewise.
23536 (arc_trampoline_adjust_address): Likewise.
23537 (arc_asm_trampoline_template): New function.
23538 (arc_initialize_trampoline): Use asm_trampoline_template.
23539 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23540 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23541 * config/arc/arc.md (flush_icache): Delete pattern.
23542
23543 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23544
23545 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23546 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23547 munaligned-access.
23548
23549 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23550
23551 PR target/83681
23552 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23553 by not USED_FOR_TARGET.
23554 (make_pass_resolve_sw_modes): Likewise.
23555
23556 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23557
23558 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23559 USED_FOR_TARGET.
23560
23561 2018-01-08 Richard Biener <rguenther@suse.de>
23562
23563 PR middle-end/83580
23564 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23565
23566 2018-01-08 Richard Biener <rguenther@suse.de>
23567
23568 PR middle-end/83517
23569 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23570
23571 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23572
23573 PR middle-end/81897
23574 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23575 basic blocks with a small number of successors.
23576 (convert_control_dep_chain_into_preds): Improve handling of
23577 forwarder blocks.
23578 (dump_predicates): Split apart into...
23579 (dump_pred_chain): ...here...
23580 (dump_pred_info): ...and here.
23581 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23582 (can_chain_union_be_invalidated_p): Improve check for invalidation
23583 of paths.
23584 (uninit_uses_cannot_happen): Avoid unnecessary if
23585 convert_control_dep_chain_into_preds yielded nothing.
23586
23587 2018-01-06 Martin Sebor <msebor@redhat.com>
23588
23589 PR tree-optimization/83640
23590 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23591 subtracting negative offset from size.
23592 (builtin_access::overlap): Adjust offset bounds of the access to fall
23593 within the size of the object if possible.
23594
23595 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23596
23597 PR rtl-optimization/83699
23598 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23599 extract_bit_field_as_subreg to cases in which the extracted
23600 value is also a vector.
23601
23602 * lra-constraints.c (process_alt_operands): Test for the equivalence
23603 substitutions when detecting a possible reload cycle.
23604
23605 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23606
23607 PR debug/83480
23608 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23609 by default if flag_selective_schedling{,2}. Formatting fixes.
23610
23611 PR rtl-optimization/83682
23612 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23613 if it has non-VECTOR_MODE element mode.
23614 (vec_duplicate_p): Likewise.
23615
23616 PR middle-end/83694
23617 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23618 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23619
23620 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23621
23622 PR target/83604
23623 * config/i386/i386-builtin.def
23624 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23625 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23626 Require also OPTION_MASK_ISA_AVX512F in addition to
23627 OPTION_MASK_ISA_GFNI.
23628 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23629 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23630 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23631 to OPTION_MASK_ISA_GFNI.
23632 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23633 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23634 OPTION_MASK_ISA_AVX512BW.
23635 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23636 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23637 addition to OPTION_MASK_ISA_GFNI.
23638 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23639 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23640 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23641 to OPTION_MASK_ISA_GFNI.
23642 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23643 a requirement for all ISAs rather than any of them with a few
23644 exceptions.
23645 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23646 processing.
23647 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23648 bitmasks to be enabled with 3 exceptions, instead of requiring any
23649 enabled ISA with lots of exceptions.
23650 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23651 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23652 Change avx512bw in isa attribute to avx512f.
23653 * config/i386/sgxintrin.h: Add license boilerplate.
23654 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23655 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23656 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23657 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23658 defined.
23659 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23660 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23661 temporarily sse2 rather than sse if not enabled already.
23662
23663 PR target/83604
23664 * config/i386/sse.md (VI248_VLBW): Rename to ...
23665 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23666 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23667 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23668 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23669 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23670 mode iterator instead of VI248_VLBW.
23671
23672 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23673
23674 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23675 (record_modified): Skip clobbers; add debug output.
23676 (param_change_prob): Use sreal frequencies.
23677
23678 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23679
23680 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23681 punt for user-aligned variables.
23682
23683 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23684
23685 * tree-chrec.c (chrec_contains_symbols): Return true for
23686 POLY_INT_CST.
23687
23688 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23689
23690 PR target/82439
23691 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23692 of (x|y) == x for BICS pattern.
23693
23694 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23695
23696 PR tree-optimization/83605
23697 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23698 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23699 can throw.
23700
23701 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23702
23703 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23704 * config/epiphany/rtems.h: New file.
23705
23706 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23707 Uros Bizjak <ubizjak@gmail.com>
23708
23709 PR target/83554
23710 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23711 QIreg_operand instead of register_operand predicate.
23712 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23713 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23714 comments instead of -fmitigate[-_]rop.
23715
23716 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23717
23718 PR bootstrap/81926
23719 * cgraphunit.c (symbol_table::compile): Switch to text_section
23720 before calling assembly_start debug hook.
23721 * run-rtl-passes.c (run_rtl_passes): Likewise.
23722 Include output.h.
23723
23724 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23725
23726 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23727 range_int_cst_p rather than !symbolic_range_p before calling
23728 extract_range_from_multiplicative_op_1.
23729
23730 2018-01-04 Jeff Law <law@redhat.com>
23731
23732 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23733 redundant test in assertion.
23734
23735 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23736
23737 * doc/rtl.texi: Document machine_mode wrapper classes.
23738
23739 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23740
23741 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23742 using tree_to_uhwi.
23743
23744 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23745
23746 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23747 the VEC_PERM_EXPR fold to fail.
23748
23749 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23750
23751 PR debug/83585
23752 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23753 to switched_sections.
23754
23755 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23756
23757 PR target/83680
23758 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23759 test for d.testing.
23760
23761 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23762
23763 PR target/83387
23764 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23765 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23766
23767 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23768
23769 PR debug/83666
23770 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23771 is BLKmode and bitpos not zero or mode change is needed.
23772
23773 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23774
23775 PR target/83675
23776 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23777 TARGET_VIS2.
23778
23779 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23780
23781 PR target/83628
23782 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23783 instead of MULT rtx. Update all corresponding splitters.
23784 (*saddl_se): Ditto.
23785 (*ssub<modesuffix>): Ditto.
23786 (*ssubl_se): Ditto.
23787 (*cmp_sadd_di): Update split patterns.
23788 (*cmp_sadd_si): Ditto.
23789 (*cmp_sadd_sidi): Ditto.
23790 (*cmp_ssub_di): Ditto.
23791 (*cmp_ssub_si): Ditto.
23792 (*cmp_ssub_sidi): Ditto.
23793 * config/alpha/predicates.md (const23_operand): New predicate.
23794 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23795 Look for ASHIFT, not MULT inner operand.
23796 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23797
23798 2018-01-04 Martin Liska <mliska@suse.cz>
23799
23800 PR gcov-profile/83669
23801 * gcov.c (output_intermediate_file): Add version to intermediate
23802 gcov file.
23803 * doc/gcov.texi: Document new field 'version' in intermediate
23804 file format. Fix location of '-k' option of gcov command.
23805
23806 2018-01-04 Martin Liska <mliska@suse.cz>
23807
23808 PR ipa/82352
23809 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23810
23811 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23812
23813 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23814
23815 2018-01-03 Martin Sebor <msebor@redhat.com>
23816
23817 PR tree-optimization/83655
23818 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23819 checking calls with invalid arguments.
23820
23821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23822
23823 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23824 (vectorizable_mask_load_store): Delete.
23825 (vectorizable_call): Return false for masked loads and stores.
23826 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23827 instead of gimple_assign_rhs1.
23828 (vectorizable_load): Handle IFN_MASK_LOAD.
23829 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23830
23831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23832
23833 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23834 split out from..,
23835 (vectorizable_mask_load_store): ...here.
23836 (vectorizable_load): ...and here.
23837
23838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23839
23840 * tree-vect-stmts.c (vect_build_all_ones_mask)
23841 (vect_build_zero_merge_argument): New functions, split out from...
23842 (vectorizable_load): ...here.
23843
23844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23845
23846 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23847 split out from...
23848 (vectorizable_mask_load_store): ...here.
23849 (vectorizable_store): ...and here.
23850
23851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23852
23853 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23854 split out from...
23855 (vectorizable_mask_load_store): ...here.
23856
23857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23858
23859 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23860 (vect_model_store_cost): Take a vec_load_store_type instead of a
23861 vect_def_type.
23862 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23863 (vect_model_store_cost): Take a vec_load_store_type instead of a
23864 vect_def_type.
23865 (vectorizable_mask_load_store): Update accordingly.
23866 (vectorizable_store): Likewise.
23867 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23868
23869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23870
23871 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23872 IFN_MASK_LOAD calls here rather than...
23873 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23874
23875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23876 Alan Hayward <alan.hayward@arm.com>
23877 David Sherwood <david.sherwood@arm.com>
23878
23879 * expmed.c (extract_bit_field_1): For vector extracts,
23880 fall back to extract_bit_field_as_subreg if vec_extract
23881 isn't available.
23882
23883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23884 Alan Hayward <alan.hayward@arm.com>
23885 David Sherwood <david.sherwood@arm.com>
23886
23887 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23888 they are variable or constant sized.
23889 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23890 slots for constant-sized data.
23891
23892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23893 Alan Hayward <alan.hayward@arm.com>
23894 David Sherwood <david.sherwood@arm.com>
23895
23896 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23897 handling COND_EXPRs with boolean comparisons, try to find a better
23898 basis for the mask type than the boolean itself.
23899
23900 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23901
23902 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23903 is calculated and how it can be overridden.
23904 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23905 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23906 if defined.
23907 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23908 if nonzero.
23909
23910 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23911 Alan Hayward <alan.hayward@arm.com>
23912 David Sherwood <david.sherwood@arm.com>
23913
23914 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23915 Remove the mode argument.
23916 (aarch64_simd_valid_immediate): Remove the mode and inverse
23917 arguments.
23918 * config/aarch64/iterators.md (bitsize): New iterator.
23919 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23920 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23921 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23922 aarch64_simd_valid_immediate.
23923 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23924 (aarch64_reg_or_bic_imm): Likewise.
23925 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23926 with an insn_type enum and msl with a modifier_type enum.
23927 Replace element_width with a scalar_mode. Change the shift
23928 to unsigned int. Add constructors for scalar_float_mode and
23929 scalar_int_mode elements.
23930 (aarch64_vect_float_const_representable_p): Delete.
23931 (aarch64_can_const_movi_rtx_p)
23932 (aarch64_simd_scalar_immediate_valid_for_move)
23933 (aarch64_simd_make_constant): Update call to
23934 aarch64_simd_valid_immediate.
23935 (aarch64_advsimd_valid_immediate_hs): New function.
23936 (aarch64_advsimd_valid_immediate): Likewise.
23937 (aarch64_simd_valid_immediate): Remove mode and inverse
23938 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23939 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23940 and aarch64_float_const_representable_p on the result.
23941 (aarch64_output_simd_mov_immediate): Remove mode argument.
23942 Update call to aarch64_simd_valid_immediate and use of
23943 simd_immediate_info.
23944 (aarch64_output_scalar_simd_mov_immediate): Update call
23945 accordingly.
23946
23947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23948 Alan Hayward <alan.hayward@arm.com>
23949 David Sherwood <david.sherwood@arm.com>
23950
23951 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23952 (mode_nunits): Likewise CONST_MODE_NUNITS.
23953 * machmode.def (ADJUST_NUNITS): Document.
23954 * genmodes.c (mode_data::need_nunits_adj): New field.
23955 (blank_mode): Update accordingly.
23956 (adj_nunits): New variable.
23957 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23958 parameter.
23959 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23960 listed in adj_nunits.
23961 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23962 listed in adj_nunits. Don't emit case statements for such modes.
23963 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23964 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23965 nothing if adj_nunits is nonnull.
23966 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23967 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23968 (emit_mode_fbit): Update use of print_maybe_const_decl.
23969 (emit_move_size): Likewise. Treat the array as non-const
23970 if adj_nunits.
23971 (emit_mode_adjustments): Handle adj_nunits.
23972
23973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23974
23975 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23976 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23977 (VECTOR_MODES): Use it.
23978 (make_vector_modes): Take the prefix as an argument.
23979
23980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23981 Alan Hayward <alan.hayward@arm.com>
23982 David Sherwood <david.sherwood@arm.com>
23983
23984 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23985 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23986 for MODE_VECTOR_BOOL.
23987 * machmode.def (VECTOR_BOOL_MODE): Document.
23988 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23989 (make_vector_bool_mode): New function.
23990 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23991 MODE_VECTOR_BOOL.
23992 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23993 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23994 Likewise.
23995 * stor-layout.c (int_mode_for_mode): Likewise.
23996 * tree.c (build_vector_type_for_mode): Likewise.
23997 * varasm.c (output_constant_pool_2): Likewise.
23998 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23999 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24000 for MODE_VECTOR_BOOL.
24001 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24002 of mode class checks.
24003 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24004 instead of a list of mode class checks.
24005 (expand_vector_scalar_condition): Likewise.
24006 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24007
24008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24009 Alan Hayward <alan.hayward@arm.com>
24010 David Sherwood <david.sherwood@arm.com>
24011
24012 * machmode.h (mode_size): Change from unsigned short to
24013 poly_uint16_pod.
24014 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24015 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24016 or if measurement_type is not polynomial.
24017 (fixed_size_mode::includes_p): Check for constant-sized modes.
24018 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24019 return a poly_uint16 rather than an unsigned short.
24020 (emit_mode_size): Change the type of mode_size from unsigned short
24021 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24022 (emit_mode_adjustments): Cope with polynomial vector sizes.
24023 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24024 for GET_MODE_SIZE.
24025 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24026 for GET_MODE_SIZE.
24027 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24028 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24029 * caller-save.c (setup_save_areas): Likewise.
24030 (replace_reg_with_saved_mem): Likewise.
24031 * calls.c (emit_library_call_value_1): Likewise.
24032 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24033 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24034 (gen_lowpart_for_combine): Likewise.
24035 * convert.c (convert_to_integer_1): Likewise.
24036 * cse.c (equiv_constant, cse_insn): Likewise.
24037 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24038 (cselib_subst_to_values): Likewise.
24039 * dce.c (word_dce_process_block): Likewise.
24040 * df-problems.c (df_word_lr_mark_ref): Likewise.
24041 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24042 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24043 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24044 (rtl_for_decl_location): Likewise.
24045 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24046 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24047 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24048 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24049 (expand_expr_real_1): Likewise.
24050 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24051 (pad_below): Likewise.
24052 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24053 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24054 * ira.c (get_subreg_tracking_sizes): Likewise.
24055 * ira-build.c (ira_create_allocno_objects): Likewise.
24056 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24057 (ira_sort_regnos_for_alter_reg): Likewise.
24058 * ira-costs.c (record_operand_costs): Likewise.
24059 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24060 (resolve_simple_move): Likewise.
24061 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24062 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24063 (lra_constraints): Likewise.
24064 (CONST_POOL_OK_P): Reject variable-sized modes.
24065 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24066 (add_pseudo_to_slot, lra_spill): Likewise.
24067 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24068 * optabs-query.c (get_best_extraction_insn): Likewise.
24069 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24070 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24071 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24072 * recog.c (offsettable_address_addr_space_p): Likewise.
24073 * regcprop.c (maybe_mode_change): Likewise.
24074 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24075 * regrename.c (build_def_use): Likewise.
24076 * regstat.c (dump_reg_info): Likewise.
24077 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24078 (find_reloads, find_reloads_subreg_address): Likewise.
24079 * reload1.c (eliminate_regs_1): Likewise.
24080 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24081 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24082 (simplify_binary_operation_1, simplify_subreg): Likewise.
24083 * targhooks.c (default_function_arg_padding): Likewise.
24084 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24085 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24086 (verify_gimple_assign_ternary): Likewise.
24087 * tree-inline.c (estimate_move_cost): Likewise.
24088 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24089 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24090 (get_address_cost_ainc): Likewise.
24091 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24092 (vect_supportable_dr_alignment): Likewise.
24093 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24094 (vectorizable_reduction): Likewise.
24095 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24096 (vectorizable_operation, vectorizable_load): Likewise.
24097 * tree.c (build_same_sized_truth_vector_type): Likewise.
24098 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24099 * var-tracking.c (emit_note_insn_var_location): Likewise.
24100 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24101 (ADDR_VEC_ALIGN): Likewise.
24102
24103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24104 Alan Hayward <alan.hayward@arm.com>
24105 David Sherwood <david.sherwood@arm.com>
24106
24107 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24108 unsigned short.
24109 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24110 or if measurement_type is polynomial.
24111 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24112 * combine.c (make_extraction): Likewise.
24113 * dse.c (find_shift_sequence): Likewise.
24114 * dwarf2out.c (mem_loc_descriptor): Likewise.
24115 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24116 (extract_bit_field, extract_low_bits): Likewise.
24117 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24118 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24119 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24120 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24121 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24122 * reload.c (find_reloads): Likewise.
24123 * reload1.c (alter_reg): Likewise.
24124 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24125 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24126 * tree-if-conv.c (predicate_mem_writes): Likewise.
24127 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24128 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24129 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24130 * valtrack.c (dead_debug_insert_temp): Likewise.
24131 * varasm.c (mergeable_constant_section): Likewise.
24132 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24133
24134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24135 Alan Hayward <alan.hayward@arm.com>
24136 David Sherwood <david.sherwood@arm.com>
24137
24138 * expr.c (expand_assignment): Cope with polynomial mode sizes
24139 when assigning to a CONCAT.
24140
24141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24142 Alan Hayward <alan.hayward@arm.com>
24143 David Sherwood <david.sherwood@arm.com>
24144
24145 * machmode.h (mode_precision): Change from unsigned short to
24146 poly_uint16_pod.
24147 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24148 short.
24149 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24150 or if measurement_type is not polynomial.
24151 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24152 in which the mode is already known to be a scalar_int_mode.
24153 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24154 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24155 initializer.
24156 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24157 for GET_MODE_PRECISION.
24158 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24159 for GET_MODE_PRECISION.
24160 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24161 as polynomial.
24162 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24163 (expand_field_assignment, make_extraction): Likewise.
24164 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24165 (get_last_value): Likewise.
24166 * convert.c (convert_to_integer_1): Likewise.
24167 * cse.c (cse_insn): Likewise.
24168 * expr.c (expand_expr_real_1): Likewise.
24169 * lra-constraints.c (simplify_operand_subreg): Likewise.
24170 * optabs-query.c (can_atomic_load_p): Likewise.
24171 * optabs.c (expand_atomic_load): Likewise.
24172 (expand_atomic_store): Likewise.
24173 * ree.c (combine_reaching_defs): Likewise.
24174 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24175 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24176 * tree.h (type_has_mode_precision_p): Likewise.
24177 * ubsan.c (instrument_si_overflow): Likewise.
24178
24179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24180 Alan Hayward <alan.hayward@arm.com>
24181 David Sherwood <david.sherwood@arm.com>
24182
24183 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24184 polynomial numbers of units.
24185 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24186 (valid_vector_subparts_p): New function.
24187 (build_vector_type): Remove temporary shim and take the number
24188 of units as a poly_uint64 rather than an int.
24189 (build_opaque_vector_type): Take the number of units as a
24190 poly_uint64 rather than an int.
24191 * tree.c (build_vector_from_ctor): Handle polynomial
24192 TYPE_VECTOR_SUBPARTS.
24193 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24194 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24195 (build_vector_from_val): If the number of units is variable,
24196 use build_vec_duplicate_cst for constant operands and
24197 VEC_DUPLICATE_EXPR otherwise.
24198 (make_vector_type): Remove temporary is_constant ().
24199 (build_vector_type, build_opaque_vector_type): Take the number of
24200 units as a poly_uint64 rather than an int.
24201 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24202 VECTOR_CST_NELTS.
24203 * cfgexpand.c (expand_debug_expr): Likewise.
24204 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24205 (store_constructor, expand_expr_real_1): Likewise.
24206 (const_scalar_mask_from_tree): Likewise.
24207 * fold-const-call.c (fold_const_reduction): Likewise.
24208 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24209 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24210 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24211 (fold_relational_const): Likewise.
24212 (native_interpret_vector): Likewise. Change the size from an
24213 int to an unsigned int.
24214 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24215 TYPE_VECTOR_SUBPARTS.
24216 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24217 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24218 duplicating a non-constant operand into a variable-length vector.
24219 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24220 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24221 * ipa-icf.c (sem_variable::equals): Likewise.
24222 * match.pd: Likewise.
24223 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24224 * print-tree.c (print_node): Likewise.
24225 * stor-layout.c (layout_type): Likewise.
24226 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24227 * tree-cfg.c (verify_gimple_comparison): Likewise.
24228 (verify_gimple_assign_binary): Likewise.
24229 (verify_gimple_assign_ternary): Likewise.
24230 (verify_gimple_assign_single): Likewise.
24231 * tree-pretty-print.c (dump_generic_node): Likewise.
24232 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24233 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24234 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24235 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24236 (vect_shift_permute_load_chain): Likewise.
24237 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24238 (expand_vector_condition, optimize_vector_constructor): Likewise.
24239 (lower_vec_perm, get_compute_type): Likewise.
24240 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24241 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24242 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24243 (vect_recog_mask_conversion_pattern): Likewise.
24244 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24245 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24246 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24247 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24248 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24249 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24250 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24251 (supportable_widening_operation): Likewise.
24252 (supportable_narrowing_operation): Likewise.
24253 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24254 Likewise.
24255 * varasm.c (output_constant): Likewise.
24256
24257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24258 Alan Hayward <alan.hayward@arm.com>
24259 David Sherwood <david.sherwood@arm.com>
24260
24261 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24262 so that both the length == 3 and length != 3 cases set up their
24263 own permute vectors. Add comments explaining why we know the
24264 number of elements is constant.
24265 (vect_permute_load_chain): Likewise.
24266
24267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24268 Alan Hayward <alan.hayward@arm.com>
24269 David Sherwood <david.sherwood@arm.com>
24270
24271 * machmode.h (mode_nunits): Change from unsigned char to
24272 poly_uint16_pod.
24273 (ONLY_FIXED_SIZE_MODES): New macro.
24274 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24275 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24276 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24277 New typedefs.
24278 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24279 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24280 or if measurement_type is not polynomial.
24281 * genmodes.c (ZERO_COEFFS): New macro.
24282 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24283 poly_uint16.
24284 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24285 Use ZERO_COEFFS when emitting initializers.
24286 * data-streamer.h (bp_pack_poly_value): New function.
24287 (bp_unpack_poly_value): Likewise.
24288 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24289 for GET_MODE_NUNITS.
24290 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24291 for GET_MODE_NUNITS.
24292 * tree.c (make_vector_type): Remove temporary shim and make
24293 the real function take the number of units as a poly_uint64
24294 rather than an int.
24295 (build_vector_type_for_mode): Handle polynomial nunits.
24296 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24297 * emit-rtl.c (const_vec_series_p_1): Likewise.
24298 (gen_rtx_CONST_VECTOR): Likewise.
24299 * fold-const.c (test_vec_duplicate_folding): Likewise.
24300 * genrecog.c (validate_pattern): Likewise.
24301 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24302 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24303 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24304 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24305 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24306 * rtlanal.c (subreg_get_info): Likewise.
24307 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24308 (vect_grouped_load_supported): Likewise.
24309 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24310 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24311 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24312 (simplify_const_unary_operation, simplify_binary_operation_1)
24313 (simplify_const_binary_operation, simplify_ternary_operation)
24314 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24315 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24316 instead of CONST_VECTOR_NUNITS.
24317 * varasm.c (output_constant_pool_2): Likewise.
24318 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24319 explicit-encoded elements in the XVEC for variable-length vectors.
24320
24321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24322
24323 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24324
24325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24326 Alan Hayward <alan.hayward@arm.com>
24327 David Sherwood <david.sherwood@arm.com>
24328
24329 * coretypes.h (fixed_size_mode): Declare.
24330 (fixed_size_mode_pod): New typedef.
24331 * builtins.h (target_builtins::x_apply_args_mode)
24332 (target_builtins::x_apply_result_mode): Change type to
24333 fixed_size_mode_pod.
24334 * builtins.c (apply_args_size, apply_result_size, result_vector)
24335 (expand_builtin_apply_args_1, expand_builtin_apply)
24336 (expand_builtin_return): Update accordingly.
24337
24338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24339
24340 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24341 * cselib.c (cselib_hash_rtx): Likewise.
24342 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24343 CONST_VECTOR encoding.
24344
24345 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24346 Jeff Law <law@redhat.com>
24347
24348 PR target/83641
24349 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24350 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24351 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24352 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24353
24354 PR target/83641
24355 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24356 explicitly probe *sp in a noreturn function if there were any callee
24357 register saves or frame pointer is needed.
24358
24359 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24360
24361 PR debug/83621
24362 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24363 BLKmode for ternary, binary or unary expressions.
24364
24365 PR debug/83645
24366 * var-tracking.c (delete_vta_debug_insn): New inline function.
24367 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24368 insns from get_insns () to NULL instead of each bb separately.
24369 Use delete_vta_debug_insn. No longer static.
24370 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24371 delete_vta_debug_insns callers.
24372 * rtl.h (delete_vta_debug_insns): Declare.
24373 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24374 instead of variable_tracking_main.
24375
24376 2018-01-03 Martin Sebor <msebor@redhat.com>
24377
24378 PR tree-optimization/83603
24379 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24380 arguments past the endof the argument list in functions declared
24381 without a prototype.
24382 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24383 Avoid checking when arguments are null.
24384
24385 2018-01-03 Martin Sebor <msebor@redhat.com>
24386
24387 PR c/83559
24388 * doc/extend.texi (attribute const): Fix a typo.
24389 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24390 issuing -Wsuggest-attribute for void functions.
24391
24392 2018-01-03 Martin Sebor <msebor@redhat.com>
24393
24394 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24395 offset_int::from instead of wide_int::to_shwi.
24396 (maybe_diag_overlap): Remove assertion.
24397 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24398 * gimple-ssa-sprintf.c (format_directive): Same.
24399 (parse_directive): Same.
24400 (sprintf_dom_walker::compute_format_length): Same.
24401 (try_substitute_return_value): Same.
24402
24403 2018-01-03 Jeff Law <law@redhat.com>
24404
24405 PR middle-end/83654
24406 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24407 non-constant residual for zero at runtime and avoid probing in
24408 that case. Reorganize code for trailing problem to mirror handling
24409 of the residual.
24410
24411 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24412
24413 PR tree-optimization/83501
24414 * tree-ssa-strlen.c (get_string_cst): New.
24415 (handle_char_store): Call get_string_cst.
24416
24417 2018-01-03 Martin Liska <mliska@suse.cz>
24418
24419 PR tree-optimization/83593
24420 * tree-ssa-strlen.c: Include tree-cfg.h.
24421 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24422 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24423 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24424 to false.
24425 (strlen_dom_walker::before_dom_children): Call
24426 gimple_purge_dead_eh_edges. Dump tranformation with details
24427 dump flags.
24428 (strlen_dom_walker::before_dom_children): Update call by adding
24429 new argument cleanup_eh.
24430 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24431
24432 2018-01-03 Martin Liska <mliska@suse.cz>
24433
24434 PR ipa/83549
24435 * cif-code.def (VARIADIC_THUNK): New enum value.
24436 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24437 thunks.
24438
24439 2018-01-03 Jan Beulich <jbeulich@suse.com>
24440
24441 * sse.md (mov<mode>_internal): Tighten condition for when to use
24442 vmovdqu<ssescalarsize> for TI and OI modes.
24443
24444 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24445
24446 Update copyright years.
24447
24448 2018-01-03 Martin Liska <mliska@suse.cz>
24449
24450 PR ipa/83594
24451 * ipa-visibility.c (function_and_variable_visibility): Skip
24452 functions with noipa attribure.
24453
24454 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24455
24456 * gcc.c (process_command): Update copyright notice dates.
24457 * gcov-dump.c (print_version): Ditto.
24458 * gcov.c (print_version): Ditto.
24459 * gcov-tool.c (print_version): Ditto.
24460 * gengtype.c (create_file): Ditto.
24461 * doc/cpp.texi: Bump @copying's copyright year.
24462 * doc/cppinternals.texi: Ditto.
24463 * doc/gcc.texi: Ditto.
24464 * doc/gccint.texi: Ditto.
24465 * doc/gcov.texi: Ditto.
24466 * doc/install.texi: Ditto.
24467 * doc/invoke.texi: Ditto.
24468
24469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24470
24471 * vector-builder.h (vector_builder::m_full_nelts): Change from
24472 unsigned int to poly_uint64.
24473 (vector_builder::full_nelts): Update prototype accordingly.
24474 (vector_builder::new_vector): Likewise.
24475 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24476 (vector_builder::operator ==): Likewise.
24477 (vector_builder::finalize): Likewise.
24478 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24479 Take the number of elements as a poly_uint64 rather than an
24480 unsigned int.
24481 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24482 from unsigned int to poly_uint64.
24483 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24484 (vec_perm_indices::new_vector): Likewise.
24485 (vec_perm_indices::length): Likewise.
24486 (vec_perm_indices::nelts_per_input): Likewise.
24487 (vec_perm_indices::input_nelts): Likewise.
24488 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24489 number of elements per input as a poly_uint64 rather than an
24490 unsigned int. Use the original encoding for variable-length
24491 vectors, rather than clamping each individual element.
24492 For the second and subsequent elements in each pattern,
24493 clamp the step and base before clamping their sum.
24494 (vec_perm_indices::series_p): Handle polynomial element counts.
24495 (vec_perm_indices::all_in_range_p): Likewise.
24496 (vec_perm_indices_to_tree): Likewise.
24497 (vec_perm_indices_to_rtx): Likewise.
24498 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24499 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24500 (tree_vector_builder::new_binary_operation): Handle polynomial
24501 element counts. Return false if we need to know the number
24502 of elements at compile time.
24503 * fold-const.c (fold_vec_perm): Punt if the number of elements
24504 isn't known at compile time.
24505
24506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24507
24508 * vec-perm-indices.h (vec_perm_builder): Change element type
24509 from HOST_WIDE_INT to poly_int64.
24510 (vec_perm_indices::element_type): Update accordingly.
24511 (vec_perm_indices::clamp): Handle polynomial element_types.
24512 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24513 (vec_perm_indices::all_in_range_p): Likewise.
24514 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24515 than shwi trees.
24516 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24517 polynomial vec_perm_indices element types.
24518 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24519 * fold-const.c (fold_vec_perm): Likewise.
24520 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24521 * tree-vect-generic.c (lower_vec_perm): Likewise.
24522 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24523 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24524 element type to HOST_WIDE_INT.
24525
24526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24527 Alan Hayward <alan.hayward@arm.com>
24528 David Sherwood <david.sherwood@arm.com>
24529
24530 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24531 rather than an int. Use plus_constant.
24532 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24533 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24534
24535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24536 Alan Hayward <alan.hayward@arm.com>
24537 David Sherwood <david.sherwood@arm.com>
24538
24539 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24540 a HOST_WIDE_INT to a poly_int64.
24541
24542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24543 Alan Hayward <alan.hayward@arm.com>
24544 David Sherwood <david.sherwood@arm.com>
24545
24546 * calls.c (load_register_parameters): Cope with polynomial
24547 mode sizes. Require a constant size for BLKmode parameters
24548 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24549 forces a parameter to be padded at the lsb end in order to
24550 fill a complete number of words, require the parameter size
24551 to be ordered wrt UNITS_PER_WORD.
24552
24553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24554 Alan Hayward <alan.hayward@arm.com>
24555 David Sherwood <david.sherwood@arm.com>
24556
24557 * reload1.c (spill_stack_slot_width): Change element type
24558 from unsigned int to poly_uint64_pod.
24559 (alter_reg): Treat mode sizes as polynomial.
24560
24561 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24562 Alan Hayward <alan.hayward@arm.com>
24563 David Sherwood <david.sherwood@arm.com>
24564
24565 * reload.c (complex_word_subreg_p): New function.
24566 (reload_inner_reg_of_subreg, push_reload): Use it.
24567
24568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24569 Alan Hayward <alan.hayward@arm.com>
24570 David Sherwood <david.sherwood@arm.com>
24571
24572 * lra-constraints.c (process_alt_operands): Reject matched
24573 operands whose sizes aren't ordered.
24574 (match_reload): Refer to this check here.
24575
24576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24577 Alan Hayward <alan.hayward@arm.com>
24578 David Sherwood <david.sherwood@arm.com>
24579
24580 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24581 that the mode size is in the set {1, 2, 4, 8, 16}.
24582
24583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24584 Alan Hayward <alan.hayward@arm.com>
24585 David Sherwood <david.sherwood@arm.com>
24586
24587 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24588 Use plus_constant instead of gen_rtx_PLUS.
24589
24590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24591 Alan Hayward <alan.hayward@arm.com>
24592 David Sherwood <david.sherwood@arm.com>
24593
24594 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24595 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24596 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24597 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24598 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24599 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24600 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24601 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24602 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24603 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24604 a poly_int64.
24605 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24606 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24607 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24608 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24609 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24610 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24611 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24612 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24613 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24614 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24615 function.
24616 * expr.c (emit_move_resolve_push): Treat the input and result
24617 of PUSH_ROUNDING as a poly_int64.
24618 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24619 (emit_push_insn): Likewise.
24620 * lra-eliminations.c (mark_not_eliminable): Likewise.
24621 * recog.c (push_operand): Likewise.
24622 * reload1.c (elimination_effects): Likewise.
24623 * rtlanal.c (nonzero_bits1): Likewise.
24624 * calls.c (store_one_arg): Likewise. Require the padding to be
24625 known at compile time.
24626
24627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24628 Alan Hayward <alan.hayward@arm.com>
24629 David Sherwood <david.sherwood@arm.com>
24630
24631 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24632 Use plus_constant instead of gen_rtx_PLUS.
24633
24634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24635 Alan Hayward <alan.hayward@arm.com>
24636 David Sherwood <david.sherwood@arm.com>
24637
24638 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24639 rather than an int.
24640
24641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24642 Alan Hayward <alan.hayward@arm.com>
24643 David Sherwood <david.sherwood@arm.com>
24644
24645 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24646 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24647 via stack temporaries. Treat the mode size as polynomial too.
24648
24649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24650 Alan Hayward <alan.hayward@arm.com>
24651 David Sherwood <david.sherwood@arm.com>
24652
24653 * expr.c (expand_expr_real_2): When handling conversions involving
24654 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24655 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24656 as a poly_uint64 too.
24657
24658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24659 Alan Hayward <alan.hayward@arm.com>
24660 David Sherwood <david.sherwood@arm.com>
24661
24662 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24663
24664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24665 Alan Hayward <alan.hayward@arm.com>
24666 David Sherwood <david.sherwood@arm.com>
24667
24668 * combine.c (can_change_dest_mode): Handle polynomial
24669 REGMODE_NATURAL_SIZE.
24670 * expmed.c (store_bit_field_1): Likewise.
24671 * expr.c (store_constructor): Likewise.
24672 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24673 and polynomial REGMODE_NATURAL_SIZE.
24674 (gen_lowpart_common): Likewise.
24675 * reginfo.c (record_subregs_of_mode): Likewise.
24676 * rtlanal.c (read_modify_subreg_p): Likewise.
24677
24678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24679 Alan Hayward <alan.hayward@arm.com>
24680 David Sherwood <david.sherwood@arm.com>
24681
24682 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24683 numbers of elements.
24684
24685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24686 Alan Hayward <alan.hayward@arm.com>
24687 David Sherwood <david.sherwood@arm.com>
24688
24689 * match.pd: Cope with polynomial numbers of vector elements.
24690
24691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24692 Alan Hayward <alan.hayward@arm.com>
24693 David Sherwood <david.sherwood@arm.com>
24694
24695 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24696 in a POINTER_PLUS_EXPR.
24697
24698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24699 Alan Hayward <alan.hayward@arm.com>
24700 David Sherwood <david.sherwood@arm.com>
24701
24702 * omp-simd-clone.c (simd_clone_subparts): New function.
24703 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24704 (ipa_simd_modify_function_body): Likewise.
24705
24706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24707 Alan Hayward <alan.hayward@arm.com>
24708 David Sherwood <david.sherwood@arm.com>
24709
24710 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24711 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24712 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24713 (expand_vector_condition, vector_element): Likewise.
24714 (subparts_gt): New function.
24715 (get_compute_type): Use subparts_gt.
24716 (count_type_subparts): Delete.
24717 (expand_vector_operations_1): Use subparts_gt instead of
24718 count_type_subparts.
24719
24720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24721 Alan Hayward <alan.hayward@arm.com>
24722 David Sherwood <david.sherwood@arm.com>
24723
24724 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24725 (vect_compile_time_alias): ...this new function. Do the calculation
24726 on poly_ints rather than trees.
24727 (vect_prune_runtime_alias_test_list): Update call accordingly.
24728
24729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24730 Alan Hayward <alan.hayward@arm.com>
24731 David Sherwood <david.sherwood@arm.com>
24732
24733 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24734 numbers of units.
24735 (vect_schedule_slp_instance): Likewise.
24736
24737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24738 Alan Hayward <alan.hayward@arm.com>
24739 David Sherwood <david.sherwood@arm.com>
24740
24741 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24742 constant and extern definitions for variable-length vectors.
24743 (vect_get_constant_vectors): Note that the number of units
24744 is known to be constant.
24745
24746 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24747 Alan Hayward <alan.hayward@arm.com>
24748 David Sherwood <david.sherwood@arm.com>
24749
24750 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24751 of units as polynomial. Choose between WIDE and NARROW based
24752 on multiple_p.
24753
24754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24755 Alan Hayward <alan.hayward@arm.com>
24756 David Sherwood <david.sherwood@arm.com>
24757
24758 * tree-vect-stmts.c (simd_clone_subparts): New function.
24759 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24760
24761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24762 Alan Hayward <alan.hayward@arm.com>
24763 David Sherwood <david.sherwood@arm.com>
24764
24765 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24766 vectors as polynomial. Use build_index_vector for
24767 IFN_GOMP_SIMD_LANE.
24768
24769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24770 Alan Hayward <alan.hayward@arm.com>
24771 David Sherwood <david.sherwood@arm.com>
24772
24773 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24774 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24775 for variable-length vectors.
24776 (vectorizable_mask_load_store): Treat the number of units as
24777 polynomial, asserting that it is constant if the condition has
24778 already been enforced.
24779 (vectorizable_store, vectorizable_load): Likewise.
24780
24781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24782 Alan Hayward <alan.hayward@arm.com>
24783 David Sherwood <david.sherwood@arm.com>
24784
24785 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24786 of units as polynomial. Punt if we can't tell at compile time
24787 which vector contains the final result.
24788
24789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24790 Alan Hayward <alan.hayward@arm.com>
24791 David Sherwood <david.sherwood@arm.com>
24792
24793 * tree-vect-loop.c (vectorizable_induction): Treat the number
24794 of units as polynomial. Punt on SLP inductions. Use an integer
24795 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24796 cast of such a series for variable-length floating-point
24797 reductions.
24798
24799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24800 Alan Hayward <alan.hayward@arm.com>
24801 David Sherwood <david.sherwood@arm.com>
24802
24803 * tree.h (build_index_vector): Declare.
24804 * tree.c (build_index_vector): New function.
24805 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24806 of units as polynomial, forcibly converting it to a constant if
24807 vectorizable_reduction has already enforced the condition.
24808 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24809 to create a {1,2,3,...} vector.
24810 (vectorizable_reduction): Treat the number of units as polynomial.
24811 Choose vectype_in based on the largest scalar element size rather
24812 than the smallest number of units. Enforce the restrictions
24813 relied on above.
24814
24815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24816 Alan Hayward <alan.hayward@arm.com>
24817 David Sherwood <david.sherwood@arm.com>
24818
24819 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24820 number of units as polynomial.
24821
24822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24823 Alan Hayward <alan.hayward@arm.com>
24824 David Sherwood <david.sherwood@arm.com>
24825
24826 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24827 * target.def (autovectorize_vector_sizes): Return the vector sizes
24828 by pointer, using vector_sizes rather than a bitmask.
24829 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24830 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24831 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24832 Likewise.
24833 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24834 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24835 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24836 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24837 * omp-general.c (omp_max_vf): Likewise.
24838 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24839 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24840 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24841 * tree-vect-slp.c (vect_slp_bb): Likewise.
24842 * doc/tm.texi: Regenerate.
24843 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24844 to a poly_uint64.
24845 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24846 the vector size as a poly_uint64 rather than an unsigned int.
24847 (current_vector_size): Change from an unsigned int to a poly_uint64.
24848 (get_vectype_for_scalar_type): Update accordingly.
24849 * tree.h (build_truth_vector_type): Take the size and number of
24850 units as a poly_uint64 rather than an unsigned int.
24851 (build_vector_type): Add a temporary overload that takes
24852 the number of units as a poly_uint64 rather than an unsigned int.
24853 * tree.c (make_vector_type): Likewise.
24854 (build_truth_vector_type): Take the number of units as a poly_uint64
24855 rather than an unsigned int.
24856
24857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24858 Alan Hayward <alan.hayward@arm.com>
24859 David Sherwood <david.sherwood@arm.com>
24860
24861 * target.def (get_mask_mode): Take the number of units and length
24862 as poly_uint64s rather than unsigned ints.
24863 * targhooks.h (default_get_mask_mode): Update accordingly.
24864 * targhooks.c (default_get_mask_mode): Likewise.
24865 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24866 * doc/tm.texi: Regenerate.
24867
24868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24869 Alan Hayward <alan.hayward@arm.com>
24870 David Sherwood <david.sherwood@arm.com>
24871
24872 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24873 * omp-general.c (omp_max_vf): Likewise.
24874 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24875 (expand_omp_simd): Handle polynomial safelen.
24876 * omp-low.c (omplow_simd_context): Add a default constructor.
24877 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24878 (lower_rec_simd_input_clauses): Update accordingly.
24879 (lower_rec_input_clauses): Likewise.
24880
24881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24882 Alan Hayward <alan.hayward@arm.com>
24883 David Sherwood <david.sherwood@arm.com>
24884
24885 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24886 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24887 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24888 (vect_analyze_slp_cost): Likewise.
24889 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24890 (vect_model_load_cost): Likewise.
24891
24892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24893 Alan Hayward <alan.hayward@arm.com>
24894 David Sherwood <david.sherwood@arm.com>
24895
24896 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24897 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24898 from an unsigned int * to a poly_uint64_pod *.
24899 (calculate_unrolling_factor): New function.
24900 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24901
24902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24903 Alan Hayward <alan.hayward@arm.com>
24904 David Sherwood <david.sherwood@arm.com>
24905
24906 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24907 from an unsigned int to a poly_uint64.
24908 (_loop_vec_info::slp_unrolling_factor): Likewise.
24909 (_loop_vec_info::vectorization_factor): Change from an int
24910 to a poly_uint64.
24911 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24912 (vect_get_num_vectors): New function.
24913 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24914 (vect_get_num_copies): Use vect_get_num_vectors.
24915 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24916 to an unsigned int *.
24917 (vect_analyze_data_refs): Change min_vf from an int * to a
24918 poly_uint64 *.
24919 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24920 than an unsigned HOST_WIDE_INT.
24921 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24922 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24923 to an unsigned int *.
24924 (vect_analyze_data_ref_dependences): Likewise.
24925 (vect_compute_data_ref_alignment): Handle polynomial vf.
24926 (vect_enhance_data_refs_alignment): Likewise.
24927 (vect_prune_runtime_alias_test_list): Likewise.
24928 (vect_shift_permute_load_chain): Likewise.
24929 (vect_supportable_dr_alignment): Likewise.
24930 (dependence_distance_ge_vf): Take the vectorization factor as a
24931 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24932 (vect_analyze_data_refs): Change min_vf from an int * to a
24933 poly_uint64 *.
24934 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24935 vfm1 as a poly_uint64 rather than an int. Make the same change
24936 for the returned bound_scalar.
24937 (vect_gen_vector_loop_niters): Handle polynomial vf.
24938 (vect_do_peeling): Likewise. Update call to
24939 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24940 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24941 be constant.
24942 * tree-vect-loop.c (vect_determine_vectorization_factor)
24943 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24944 (vect_get_known_peeling_cost): Likewise.
24945 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24946 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24947 (vect_transform_loop): Likewise. Use the lowest possible VF when
24948 updating the upper bounds of the loop.
24949 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24950 rather than an int.
24951 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24952 polynomial unroll factors.
24953 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24954 (vect_make_slp_decision): Likewise.
24955 (vect_supported_load_permutation_p): Likewise, and polynomial
24956 vf too.
24957 (vect_analyze_slp_cost): Handle polynomial vf.
24958 (vect_slp_analyze_node_operations): Likewise.
24959 (vect_slp_analyze_bb_1): Likewise.
24960 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24961 than an unsigned HOST_WIDE_INT.
24962 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24963 (vectorizable_load): Handle polynomial vf.
24964 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24965 a poly_uint64.
24966 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24967
24968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24969 Alan Hayward <alan.hayward@arm.com>
24970 David Sherwood <david.sherwood@arm.com>
24971
24972 * match.pd: Handle bit operations involving three constants
24973 and try to fold one pair.
24974
24975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24976
24977 * tree-vect-loop-manip.c: Include gimple-fold.h.
24978 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24979 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24980 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24981 Add a path that uses a step of VF instead of 1, but disable it
24982 for now.
24983 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24984 and niters_no_overflow parameters. Update calls to
24985 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24986 Create a new SSA name if the latter choses to use a ste other
24987 than zero, and return it via niters_vector_mult_vf_var.
24988 * tree-vect-loop.c (vect_transform_loop): Update calls to
24989 vect_do_peeling, vect_gen_vector_loop_niters and
24990 slpeel_make_loop_iterate_ntimes.
24991 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24992 (vect_gen_vector_loop_niters): Update declarations after above changes.
24993
24994 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24995
24996 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24997 128-bit round to integer instructions.
24998 (ceil<mode>2): Likewise.
24999 (btrunc<mode>2): Likewise.
25000 (round<mode>2): Likewise.
25001
25002 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25003
25004 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25005 unaligned VSX load/store on P8/P9.
25006 (expand_block_clear): Allow the use of unaligned VSX
25007 load/store on P8/P9.
25008
25009 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25010
25011 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25012 New function.
25013 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25014 swap associated with both a load and a store.
25015
25016 2018-01-02 Andrew Waterman <andrew@sifive.com>
25017
25018 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25019 * config/riscv/riscv.md (clear_cache): Use it.
25020
25021 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25022
25023 * web.c: Remove out-of-date comment.
25024
25025 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25026
25027 * expr.c (fixup_args_size_notes): Check that any existing
25028 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25029 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25030 (emit_single_push_insn): ...here.
25031
25032 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25033
25034 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25035 (const_vector_encoded_nelts): New function.
25036 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25037 (const_vector_int_elt, const_vector_elt): Declare.
25038 * emit-rtl.c (const_vector_int_elt_1): New function.
25039 (const_vector_elt): Likewise.
25040 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25041 of CONST_VECTOR_ELT.
25042
25043 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25044
25045 * expr.c: Include rtx-vector-builder.h.
25046 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25047 directly on the tree encoding.
25048 (const_vector_from_tree): Likewise.
25049 * optabs.c: Include rtx-vector-builder.h.
25050 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25051 sequence of "u" values.
25052 * vec-perm-indices.c: Include rtx-vector-builder.h.
25053 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25054 directly on the vec_perm_indices encoding.
25055
25056 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25057
25058 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25059 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25060 * rtx-vector-builder.h: New file.
25061 * rtx-vector-builder.c: Likewise.
25062 * rtl.h (rtx_def::u2): Add a const_vector field.
25063 (CONST_VECTOR_NPATTERNS): New macro.
25064 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25065 (CONST_VECTOR_DUPLICATE_P): Likewise.
25066 (CONST_VECTOR_STEPPED_P): Likewise.
25067 (CONST_VECTOR_ENCODED_ELT): Likewise.
25068 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25069 (unwrap_const_vec_duplicate): Likewise.
25070 (const_vec_series_p): Check for a non-duplicated vector encoding.
25071 Say that the function only returns true for integer vectors.
25072 * emit-rtl.c: Include rtx-vector-builder.h.
25073 (gen_const_vec_duplicate_1): Delete.
25074 (gen_const_vector): Call gen_const_vec_duplicate instead of
25075 gen_const_vec_duplicate_1.
25076 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25077 (gen_const_vec_duplicate): Use rtx_vector_builder.
25078 (gen_const_vec_series): Likewise.
25079 (gen_rtx_CONST_VECTOR): Likewise.
25080 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25081 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25082 Build a new vector rather than modifying a CONST_VECTOR in-place.
25083 (handle_special_swappables): Update call accordingly.
25084 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25085 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25086 Build a new vector rather than modifying a CONST_VECTOR in-place.
25087 (handle_special_swappables): Update call accordingly.
25088
25089 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25090
25091 * simplify-rtx.c (simplify_const_binary_operation): Use
25092 CONST_VECTOR_ELT instead of XVECEXP.
25093
25094 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25095
25096 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25097 the selector elements to be different from the data elements
25098 if the selector is a VECTOR_CST.
25099 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25100 ssizetype for the selector.
25101
25102 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25103
25104 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25105 before testing each element individually.
25106 * tree-vect-generic.c (lower_vec_perm): Likewise.
25107
25108 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25109
25110 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25111 * selftest-run-tests.c (selftest::run_tests): Call it.
25112 * vector-builder.h (vector_builder::operator ==): New function.
25113 (vector_builder::operator !=): Likewise.
25114 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25115 (vec_perm_indices::all_from_input_p): New function.
25116 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25117 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25118 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25119 instead of reading the VECTOR_CST directly. Detect whether both
25120 vector inputs are the same before constructing the vec_perm_indices,
25121 and update the number of inputs argument accordingly. Use the
25122 utility functions added above. Only construct sel2 if we need to.
25123
25124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25125
25126 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25127 the broadcast of the low byte.
25128 (expand_mult_highpart): Use an explicit encoding for the permutes.
25129 * optabs-query.c (can_mult_highpart_p): Likewise.
25130 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25131 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25132 (vectorizable_bswap): Likewise.
25133 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25134 explicit encoding for the power-of-2 permutes.
25135 (vect_permute_store_chain): Likewise.
25136 (vect_grouped_load_supported): Likewise.
25137 (vect_permute_load_chain): Likewise.
25138
25139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25140
25141 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25142 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25143 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25144 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25145 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25146 (vect_gen_perm_mask_any): Likewise.
25147
25148 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25149
25150 * int-vector-builder.h: New file.
25151 * vec-perm-indices.h: Include int-vector-builder.h.
25152 (vec_perm_indices): Redefine as an int_vector_builder.
25153 (auto_vec_perm_indices): Delete.
25154 (vec_perm_builder): Redefine as a stand-alone class.
25155 (vec_perm_indices::vec_perm_indices): New function.
25156 (vec_perm_indices::clamp): Likewise.
25157 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25158 (vec_perm_indices::new_vector): New function.
25159 (vec_perm_indices::new_expanded_vector): Update for new
25160 vec_perm_indices class.
25161 (vec_perm_indices::rotate_inputs): New function.
25162 (vec_perm_indices::all_in_range_p): Operate directly on the
25163 encoded form, without computing elided elements.
25164 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25165 encoding. Update for new vec_perm_indices class.
25166 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25167 the given vec_perm_builder.
25168 (expand_vec_perm_var): Update vec_perm_builder constructor.
25169 (expand_mult_highpart): Use vec_perm_builder instead of
25170 auto_vec_perm_indices.
25171 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25172 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25173 or double series encoding as appropriate.
25174 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25175 vec_perm_indices instead of auto_vec_perm_indices.
25176 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25177 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25178 (vect_permute_store_chain): Likewise.
25179 (vect_grouped_load_supported): Likewise.
25180 (vect_permute_load_chain): Likewise.
25181 (vect_shift_permute_load_chain): Likewise.
25182 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25183 (vect_transform_slp_perm_load): Likewise.
25184 (vect_schedule_slp_instance): Likewise.
25185 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25186 (vectorizable_mask_load_store): Likewise.
25187 (vectorizable_bswap): Likewise.
25188 (vectorizable_store): Likewise.
25189 (vectorizable_load): Likewise.
25190 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25191 vec_perm_indices instead of auto_vec_perm_indices. Use
25192 tree_to_vec_perm_builder to read the vector from a tree.
25193 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25194 vec_perm_builder instead of a vec_perm_indices.
25195 (have_whole_vector_shift): Use vec_perm_builder and
25196 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25197 truncation to calc_vec_perm_mask_for_shift.
25198 (vect_create_epilog_for_reduction): Likewise.
25199 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25200 from auto_vec_perm_indices to vec_perm_indices.
25201 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25202 instead of changing individual elements.
25203 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25204 the vector in d.perm.
25205 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25206 from auto_vec_perm_indices to vec_perm_indices.
25207 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25208 instead of changing individual elements.
25209 (arm_vectorize_vec_perm_const): Use new_vector to install
25210 the vector in d.perm.
25211 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25212 Update vec_perm_builder constructor.
25213 (rs6000_expand_interleave): Likewise.
25214 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25215 (rs6000_expand_interleave): Likewise.
25216
25217 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25218
25219 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25220 to qimode could truncate the indices.
25221 * optabs.c (expand_vec_perm_var): Likewise.
25222
25223 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25224
25225 * Makefile.in (OBJS): Add vec-perm-indices.o.
25226 * vec-perm-indices.h: New file.
25227 * vec-perm-indices.c: Likewise.
25228 * target.h (vec_perm_indices): Replace with a forward class
25229 declaration.
25230 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25231 * optabs.h: Include vec-perm-indices.h.
25232 (expand_vec_perm): Delete.
25233 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25234 (expand_vec_perm_const): Declare.
25235 * target.def (vec_perm_const_ok): Replace with...
25236 (vec_perm_const): ...this new hook.
25237 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25238 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25239 * doc/tm.texi: Regenerate.
25240 * optabs.def (vec_perm_const): Delete.
25241 * doc/md.texi (vec_perm_const): Likewise.
25242 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25243 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25244 expand_vec_perm for constant permutation vectors. Assert that
25245 the mode of variable permutation vectors is the integer equivalent
25246 of the mode that is being permuted.
25247 * optabs-query.h (selector_fits_mode_p): Declare.
25248 * optabs-query.c: Include vec-perm-indices.h.
25249 (selector_fits_mode_p): New function.
25250 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25251 is defined, instead of checking whether the vec_perm_const_optab
25252 exists. Use targetm.vectorize.vec_perm_const instead of
25253 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25254 fit in the vector mode before using a variable permute.
25255 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25256 vec_perm_indices instead of an rtx.
25257 (expand_vec_perm): Replace with...
25258 (expand_vec_perm_const): ...this new function. Take the selector
25259 as a vec_perm_indices rather than an rtx. Also take the mode of
25260 the selector. Update call to shift_amt_for_vec_perm_mask.
25261 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25262 Use vec_perm_indices::new_expanded_vector to expand the original
25263 selector into bytes. Check whether the indices fit in the vector
25264 mode before using a variable permute.
25265 (expand_vec_perm_var): Make global.
25266 (expand_mult_highpart): Use expand_vec_perm_const.
25267 * fold-const.c: Includes vec-perm-indices.h.
25268 * tree-ssa-forwprop.c: Likewise.
25269 * tree-vect-data-refs.c: Likewise.
25270 * tree-vect-generic.c: Likewise.
25271 * tree-vect-loop.c: Likewise.
25272 * tree-vect-slp.c: Likewise.
25273 * tree-vect-stmts.c: Likewise.
25274 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25275 Delete.
25276 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25277 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25278 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25279 (aarch64_vectorize_vec_perm_const): ...this new function.
25280 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25281 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25282 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25283 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25284 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25285 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25286 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25287 into...
25288 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25289 check for NEON modes.
25290 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25291 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25292 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25293 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25294 into...
25295 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25296 the old VEC_PERM_CONST conditions.
25297 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25298 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25299 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25300 (ia64_vectorize_vec_perm_const_ok): Merge into...
25301 (ia64_vectorize_vec_perm_const): ...this new function.
25302 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25303 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25304 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25305 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25306 * config/mips/mips.c (mips_expand_vec_perm_const)
25307 (mips_vectorize_vec_perm_const_ok): Merge into...
25308 (mips_vectorize_vec_perm_const): ...this new function.
25309 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25310 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25311 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25312 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25313 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25314 (rs6000_expand_vec_perm_const): Delete.
25315 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25316 Delete.
25317 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25318 (altivec_expand_vec_perm_const_le): Take each operand individually.
25319 Operate on constant selectors rather than rtxes.
25320 (altivec_expand_vec_perm_const): Likewise. Update call to
25321 altivec_expand_vec_perm_const_le.
25322 (rs6000_expand_vec_perm_const): Delete.
25323 (rs6000_vectorize_vec_perm_const_ok): Delete.
25324 (rs6000_vectorize_vec_perm_const): New function.
25325 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25326 an element count and rtx array.
25327 (rs6000_expand_extract_even): Update call accordingly.
25328 (rs6000_expand_interleave): Likewise.
25329 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25330 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25331 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25332 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25333 (rs6000_expand_vec_perm_const): Delete.
25334 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25335 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25336 (altivec_expand_vec_perm_const_le): Take each operand individually.
25337 Operate on constant selectors rather than rtxes.
25338 (altivec_expand_vec_perm_const): Likewise. Update call to
25339 altivec_expand_vec_perm_const_le.
25340 (rs6000_expand_vec_perm_const): Delete.
25341 (rs6000_vectorize_vec_perm_const_ok): Delete.
25342 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25343 reference to the SPE evmerge intructions.
25344 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25345 an element count and rtx array.
25346 (rs6000_expand_extract_even): Update call accordingly.
25347 (rs6000_expand_interleave): Likewise.
25348 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25349 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25350 new function.
25351 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25352
25353 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25354
25355 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25356 vector mode and that that mode matches the mode of the data
25357 being permuted.
25358 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25359 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25360 directly using expand_vec_perm_1 when forcing selectors into
25361 registers.
25362 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25363
25364 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25365
25366 * optabs-query.h (can_vec_perm_p): Delete.
25367 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25368 * optabs-query.c (can_vec_perm_p): Split into...
25369 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25370 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25371 particular selector is valid.
25372 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25373 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25374 (vect_grouped_load_supported): Likewise.
25375 (vect_shift_permute_load_chain): Likewise.
25376 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25377 (vect_transform_slp_perm_load): Likewise.
25378 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25379 (vectorizable_bswap): Likewise.
25380 (vect_gen_perm_mask_checked): Likewise.
25381 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25382 implementations of variable permutation vectors into account
25383 when deciding which selector to use.
25384 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25385 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25386 with a false third argument.
25387 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25388 to test whether the constant selector is valid and can_vec_perm_var_p
25389 to test whether a variable selector is valid.
25390
25391 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25392
25393 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25394 * optabs-query.c (can_vec_perm_p): Likewise.
25395 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25396 instead of vec_perm_indices.
25397 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25398 (vect_gen_perm_mask_checked): Likewise,
25399 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25400 (vect_gen_perm_mask_checked): Likewise,
25401
25402 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25403
25404 * optabs-query.h (qimode_for_vec_perm): Declare.
25405 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25406 (qimode_for_vec_perm): ...this new function.
25407 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25408
25409 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25410
25411 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25412 does not have a conditional at the top.
25413
25414 2018-01-02 Richard Biener <rguenther@suse.de>
25415
25416 * ipa-inline.c (big_speedup_p): Fix expression.
25417
25418 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25419
25420 PR target/81616
25421 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25422 for generic 4->6.
25423
25424 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25425
25426 PR target/81616
25427 Generic tuning.
25428 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25429 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25430 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25431 cond_taken_branch_cost 3->4.
25432
25433 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25434
25435 PR tree-optimization/83581
25436 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25437 TODO_cleanup_cfg if any changes have been made.
25438
25439 PR middle-end/83608
25440 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25441 convert_modes if target mode has the right side, but different mode
25442 class.
25443
25444 PR middle-end/83609
25445 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25446 last argument when extracting from CONCAT. If either from_real or
25447 from_imag is NULL, use expansion through memory. If result is not
25448 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25449 the parts directly to inner mode, if even that fails, use expansion
25450 through memory.
25451
25452 PR middle-end/83623
25453 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25454 check for bswap in mode rather than HImode and use that in expand_unop
25455 too.
25456 \f
25457 Copyright (C) 2018 Free Software Foundation, Inc.
25458
25459 Copying and distribution of this file, with or without modification,
25460 are permitted in any medium without royalty provided the copyright
25461 notice and this notice are preserved.