]> gcc.gnu.org Git - gcc.git/blob - gcc/ChangeLog
re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)
[gcc.git] / gcc / ChangeLog
1 2019-05-29 Jakub Jelinek <jakub@redhat.com>
2
3 PR fortran/90329
4 * lto-streamer.h (LTO_minor_version): Bump to 2.
5
6 Backported from mainline
7 2019-05-16 Jakub Jelinek <jakub@redhat.com>
8
9 PR fortran/90329
10 * tree-core.h (struct tree_decl_common): Document
11 decl_nonshareable_flag for PARM_DECLs.
12 * tree.h (DECL_HIDDEN_STRING_LENGTH): Define.
13 * calls.c (expand_call): Don't try tail call if caller
14 has any DECL_HIDDEN_STRING_LENGTH PARM_DECLs that are or might be
15 passed on the stack and callee needs to pass any arguments on the
16 stack.
17 * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
18 else if instead of series of mutually exclusive ifs. Handle
19 DECL_HIDDEN_STRING_LENGTH for PARM_DECLs.
20 * tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.
21
22 2019-05-28 John David Anglin <danglin@gcc.gnu.org>
23
24 * config/pa/pa.c (hppa_profile_hook): Remove offset adjustment.
25
26 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
27
28 * dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index
29 and DW_OP_GNU_const_index opcodes.
30
31 2019-05-24 John David Anglin <danglin@gcc.gnu.org>
32
33 PR target/90530
34 * config/pa/pa.c (pa_can_change_mode_class): Accept mode changes from
35 DImode to SImode in floating-point registers on 64-bit target.
36 * config/pa/pa.md (umulsidi3): Change nonimmediate_operand to
37 register_operand in xmpyu patterns.
38
39 2019-05-24 Martin Liska <mliska@suse.cz>
40
41 Backport from mainline
42 2019-05-23 Martin Liska <mliska@suse.cz>
43
44 PR sanitizer/90570
45 * gimplify.c (gimplify_target_expr): Skip TREE_STATIC target
46 expression similarly to gimplify_decl_expr.
47
48 2019-05-23 Uroš Bizjak <ubizjak@gmail.com>
49
50 Backported from mainline
51 2019-05-21 Uroš Bizjak <ubizjak@gmail.com>
52
53 * config/i386/cpuid.h (__cpuid): For 32bit targets, zero
54 %ebx and %ecx bafore calling cpuid with leaf 1 or
55 non-constant leaf argument.
56
57 2019-05-21 Uroš Bizjak <ubizjak@gmail.com>
58
59 PR target/90547
60 * config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
61 Avoid calling gen_lowpart with CONST operand.
62
63 2019-05-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
64
65 Backported from mainline
66 2019-05-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
67
68 * config/arm/t-rtems: Replace ARMv7-M multilibs with Cortex-M
69 multilibs.
70
71 2019-05-20 Jeff Law <law@redhat.com>
72
73 Backport from mainline
74 2019-05-17 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
75
76 * config/mips/mips.c (mips_dwarf_frame_reg_mode): Replace
77 TARGET_FLOAT64 with !TARGET_FLOAT32, thus handling both fp64
78 and fpxx modes.
79
80 2019-05-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
81
82 Backport from mainline.
83 2019-05-07 Kelvin Nilsen <kelvin@gcc.gnu.org>
84
85 PR target/89765
86 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
87 In handling of ALTIVEC_BUILTIN_VEC_INSERT, use modular arithmetic
88 to compute vector element selector for both constant and variable
89 operands.
90
91 2019-05-15 David Edelsohn <dje.gcc@gmail.com>
92
93 Backport from mainline
94 2019-04-11 David Edelsohn <dje.gcc@gmail.com>
95 * xcoffout.h (xcoff_private_rodata_section_name): Declare.
96 * xcoffout.c (xcoff_private_rodata_section_name): Define.
97 * config/rs6000/rs6000.c (rs6000_xcoff_asm_init_sections): Create
98 read_only_private_data_section using coff_private_rodata_section_name.
99 (rs6000_xcoff_file_start): Generate coff_private_rodata_section_name.
100
101 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
102 2018-12-13 David Edelsohn <dje.gcc@gmail.com>
103 PR target/61976
104 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
105 in FPRs on AIX. Ensure type is non-NULL.
106 (rs6000_arg_partial_bytes): Same.
107
108 2019-05-14 Martin Liska <mliska@suse.cz>
109
110 Backport from mainline
111 2019-05-13 Martin Liska <mliska@suse.cz>
112
113 PR gcov-profile/90380
114 * gcov.c (handle_cycle): Do not support zero cycle count,
115 it should not be possible.
116 (path_contains_zero_cycle_arc): New function.
117 (circuit): Ignore zero cycle arc counts.
118
119 2019-05-14 Martin Liska <mliska@suse.cz>
120
121 Backport from mainline
122 2019-05-13 Martin Liska <mliska@suse.cz>
123
124 PR gcov-profile/90380
125 * gcov.c (enum loop_type): Remove the enum and
126 the operator.
127 (handle_cycle): Assert that we should not reach
128 a negative count.
129 (circuit): Use loop_found instead of a tri-state loop_type.
130 (get_cycles_count): Do not handle NEGATIVE_LOOP as it can't
131 happen.
132
133 2019-05-11 Andreas Tobler <andreast@gcc.gnu.org>
134
135 Backport from mainline.
136 2019-04-25 Andreas Tobler <andreast@gcc.gnu.org>
137
138 * config/i386/freebsd64.h: Add bits for 32-bit multilib support.
139 * config/i386/t-freebsd64: New file.
140 * config.gcc: Add the t-freebsd64 for multilib support.
141
142 2019-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
143
144 Backport from mainline.
145 2019-05-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
146
147 PR target/89424
148 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add
149 handling of V1TImode.
150
151 2019-05-06 Richard Biener <rguenther@suse.de>
152
153 PR bootstrap/90359
154 Backport from mainline
155 2019-03-11 Jakub Jelinek <jakub@redhat.com>
156
157 PR middle-end/89655
158 PR bootstrap/89656
159 * vr-values.c (vr_values::update_value_range): If
160 old_vr->varying_p (), don't update it, make new_vr also VARYING
161 and return false.
162
163 2019-05-03 Richard Biener <rguenther@suse.de>
164
165 Backport from mainline
166 2019-03-14 Richard Biener <rguenther@suse.de>
167
168 PR middle-end/89698
169 * fold-const.c (operand_equal_p): For INDIRECT_REF check
170 that the access types are similar.
171
172 2019-03-07 Richard Biener <rguenther@suse.de>
173
174 PR tree-optimization/89595
175 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Take
176 stmt iterator as reference, take boolean output parameter to
177 indicate whether the stmt was removed and thus the iterator
178 already advanced.
179 (dom_opt_dom_walker::before_dom_children): Re-iterate over
180 stmts created by folding.
181
182 2019-03-14 Richard Biener <rguenther@suse.de>
183
184 PR tree-optimization/89710
185 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
186 safe_dyn_cast.
187
188 2019-04-15 Richard Biener <rguenther@suse.de>
189
190 PR tree-optimization/90071
191 * tree-ssa-reassoc.c (init_range_entry): Do not pick up
192 abnormal operands from def stmts.
193
194 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
195
196 PR target/86984
197 * expr.c (expand_assignment): Assert that bitpos is positive.
198 (store_field): Likewise
199 (expand_expr_real_1): Make sure that bitpos is positive.
200 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
201 integer overflow.
202
203 2019-03-14 Richard Biener <rguenther@suse.de>
204
205 PR target/89711
206 * config/i386/i386.c (make_resolver_func): Properly set
207 DECL_CONTEXT on the RESULT_DECL.
208 * config/rs6000/rs6000.c (make_resolver_func): Likewise.
209
210 2019-04-30 Jakub Jelinek <jakub@redhat.com>
211
212 Backported from mainline
213 2019-04-24 Jakub Jelinek <jakub@redhat.com>
214
215 PR target/90193
216 * rtl.c (classify_insn): Return JUMP_INSN for asm goto.
217 * emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.
218
219 PR target/90187
220 * config/i386/i386.c (ix86_expand_sse_fp_minmax): Force if_true into
221 a register if both if_true and if_false are MEMs.
222
223 PR tree-optimization/90208
224 * tree-cfg.c (remove_bb): Move forced labels from removed bbs
225 after labels of new_bb, not before them.
226
227 2019-04-16 Jakub Jelinek <jakub@redhat.com>
228
229 PR rtl-optimization/90082
230 * dce.c (can_delete_call): New function.
231 (deletable_insn_p, mark_insn): Use it.
232
233 PR tree-optimization/90090
234 * tree-ssa-math-opts.c (is_division_by): Ignore divisions that can
235 throw internally.
236 (is_division_by_square): Likewise. Formatting fix.
237
238 2019-04-12 Jakub Jelinek <jakub@redhat.com>
239
240 PR rtl-optimization/89965
241 * dce.c: Include rtl-iter.h.
242 (struct check_argument_load_data): New type.
243 (check_argument_load): New function.
244 (find_call_stack_args): Check for loads from stack slots still tracked
245 in sp_bytes and punt if any is found.
246
247 PR c/89946
248 * varasm.c (assemble_start_function): Don't use tree_fits_uhwi_p
249 and gcc_unreachable if it fails, just call tree_to_uhwi which
250 verifies that too. Test TREE_CHAIN instead of list_length > 1.
251 Start warning message with a lower-case letter. Formatting fixes.
252
253 PR rtl-optimization/90026
254 * cfgcleanup.c (try_optimize_cfg): When removing empty bb with no
255 successors, look for BARRIERs inside of the whole BB_FOOTER chain
256 rather than just at the start of it. If e->src BB_FOOTER is not NULL
257 in cfglayout mode, use emit_barrier_after_bb.
258
259 2019-04-11 Jakub Jelinek <jakub@redhat.com>
260
261 PR rtl-optimization/89965
262 * dce.c (sp_based_mem_offset): New function.
263 (find_call_stack_args): Use sp_based_mem_offset.
264
265 2019-04-10 Jakub Jelinek <jakub@redhat.com>
266
267 PR c++/90010
268 * gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
269 with strlen in between hostsz-3 and hostsz-1 inclusive when no
270 translation is needed, and when translation is needed, only append
271 ... if the string length is hostsz or more bytes long. Avoid using
272 strncpy or strcat.
273
274 2019-04-09 Jakub Jelinek <jakub@redhat.com>
275
276 PR tree-optimization/89998
277 * gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
278 instead of integer_type_node if possible, don't add ranges if return
279 type is not compatible with int.
280 * gimple-fold.c (gimple_fold_builtin_sprintf,
281 gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
282 integer_type_node.
283
284 2019-03-29 Jakub Jelinek <jakub@redhat.com>
285
286 PR c/89872
287 * gimplify.c (gimplify_compound_literal_expr): Don't optimize a
288 non-addressable complit into its initializer if it is volatile.
289
290 2019-03-28 Jakub Jelinek <jakub@redhat.com>
291
292 PR middle-end/89621
293 * tree-inline.h (struct copy_body_data): Add
294 dont_remap_vla_if_no_change flag.
295 * tree-inline.c (remap_type_3, remap_type_2): New functions.
296 (remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
297 and remap_type_2 returns false.
298 * omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.
299
300 2019-03-20 Jakub Jelinek <jakub@redhat.com>
301
302 PR target/89752
303 * lra-constraints.c (process_alt_operands) <reg>: For BLKmode, don't
304 update this_alternative nor this_alternative_set.
305
306 2019-03-19 Jakub Jelinek <jakub@redhat.com>
307
308 PR rtl-optimization/89768
309 * loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
310 instead of GEN_INT.
311 (unroll_loop_runtime_iterations): Likewise.
312
313 PR target/89752
314 * gimplify.c (gimplify_asm_expr): For output argument with
315 TREE_ADDRESSABLE type, clear allows_reg if it allows memory, otherwise
316 diagnose error.
317
318 PR target/89726
319 * config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
320 compensation use x2 += 1 instead of x2 -= -1 and when honoring
321 signed zeros, do another copysign after the compensation.
322
323 2019-03-15 Jakub Jelinek <jakub@redhat.com>
324
325 PR debug/89704
326 * dwarf2out.c (add_const_value_attribute): Return false for MINUS,
327 SIGN_EXTEND and ZERO_EXTEND.
328
329 2019-03-14 Jakub Jelinek <jakub@redhat.com>
330
331 PR ipa/89684
332 * multiple_target.c (create_dispatcher_calls): Change
333 references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
334 In the node->iterate_referring loop, push *ref rather than ref, call
335 ref->remove_reference () and always pass 0 to iterate_referring.
336
337 PR rtl-optimization/89679
338 * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
339 would contain a paradoxical SUBREG.
340
341 PR tree-optimization/89703
342 * tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
343 aren't compatible also with builtin_decl_explicit. Check pure
344 or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
345 and BUILT_IN_STPNCPY{,_CHK}.
346
347 2019-03-13 Jakub Jelinek <jakub@redhat.com>
348
349 PR debug/89498
350 * dwarf2out.c (size_of_die): For dw_val_class_view_list always use
351 DWARF_OFFSET_SIZE.
352 (value_format): For dw_val_class_view_list never use DW_FORM_loclistx.
353
354 PR middle-end/88588
355 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args.
356 (ipa_simd_modify_function_body): Handle PHIs.
357
358 2019-03-12 Jakub Jelinek <jakub@redhat.com>
359
360 PR middle-end/89663
361 * builtins.c (expand_builtin_int_roundingfn,
362 expand_builtin_int_roundingfn_2): Return NULL_RTX instead of
363 gcc_unreachable if validate_arglist fails.
364
365 2019-03-09 Jakub Jelinek <jakub@redhat.com>
366
367 PR c/88568
368 * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for
369 dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.
370
371 2019-03-05 Jakub Jelinek <jakub@redhat.com>
372
373 PR target/89587
374 * config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
375 if_multiarch.
376
377 PR middle-end/89590
378 * builtins.c (maybe_emit_free_warning): Punt if free doesn't have
379 exactly one argument.
380
381 2019-02-28 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/89520
384 * convert.c (convert_to_real_1, convert_to_integer_1): Punt for
385 builtins if they don't have a single scalar floating point argument.
386 Formatting fixes.
387
388 2019-02-20 Jakub Jelinek <jakub@redhat.com>
389
390 PR middle-end/89412
391 * expr.c (expand_assignment): If result is a MEM, use change_address
392 instead of simplify_gen_subreg.
393
394 2019-02-20 Jakub Jelinek <jakub@redhat.com>
395 David Malcolm <dmalcolm@redhat.com>
396
397 PR middle-end/89091
398 * fold-const.c (decode_field_reference): Return NULL_TREE if
399 lang_hooks.types.type_for_size returns NULL. Check it before
400 overwriting *exp_. Use return NULL_TREE instead of return 0.
401
402 2019-02-20 Jakub Jelinek <jakub@redhat.com>
403
404 PR middle-end/88074
405 PR middle-end/89415
406 * toplev.c (do_compile): Double the emin/emax exponents to workaround
407 buggy mpc_norm.
408
409 2019-02-19 Richard Biener <rguenther@suse.de>
410
411 PR middle-end/88074
412 * toplev.c (do_compile): Initialize mpfr's exponent range
413 based on available float modes.
414
415 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
416
417 Backport from mainline.
418 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
419 PR target/86538
420 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
421 Define __ARM_FEATURE_ATOMICS.
422
423 2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
424
425 Backport from mainline
426 2018-12-11 Richard Earnshaw <Richard.Earnshaw@arm.com>
427
428 PR target/37369
429 * config/aarch64/iterators.md (sizem1): Add sizes for
430 SFmode and DFmode.
431 (Vbtype): Add SFmode mapping.
432 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
433 (copysign<GPF:mode>3): New expand pattern.
434 (copysign<GPF:mode>3_insn): New insn pattern.
435
436 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
437
438 Backport from mainline:
439 2019-01-25 Richard Sandiford <richard.sandiford@arm.com>
440
441 PR middle-end/89037
442 * varasm.c (output_constructor_bitfield): Use wi::extract_uhwi
443 instead of accessing TREE_INT_CST_ELT directly.
444
445 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
446
447 Backport from mainline:
448 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
449
450 PR target/85910
451 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
452 aarch64_evpc_tbl guard.
453
454 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
455
456 Backport from mainline:
457 2019-03-08 Richard Sandiford <richard.sandiford@arm.com>
458
459 PR debug/89631
460 * dwarf2cfi.c (dwarf2out_frame_debug_expr): Use CONST_POLY_INT
461 instead of POLY_INT_CST.
462
463 2019-04-26 Roman Zhuykov <zhroma@ispras.ru>
464
465 Backport from mainline
466 2019-04-23 Roman Zhuykov <zhroma@ispras.ru>
467
468 PR rtl-optimization/87979
469 * modulo-sched.c (sms_schedule): Start ii value "mii" should
470 not equal zero.
471
472 PR rtl-optimization/84032
473 * modulo-sched.c (ps_insn_find_column): Change condition so that
474 branch will always be the last insn in a row inside partial
475 schedule.
476
477 2019-04-19 Pat Haugen <pthaugen@us.ibm.com>
478
479 Backport from mainline:
480 2019-04-16 Pat Haugen <pthaugen@us.ibm.com>
481
482 PR target/84369
483 * config/rs6000/power9.md: Add store forwarding bypass.
484
485 2019-04-17 Martin Jambor <mjambor@suse.cz>
486
487 Backport from mainline
488 2019-03-10 Martin Jambor <mjambor@suse.cz>
489
490 PR tree-optimization/85762
491 PR tree-optimization/87008
492 PR tree-optimization/85459
493 * tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool
494 it points to if there is a type changing MEM_REF. Adjust all callers.
495 (build_accesses_from_assign): Disable total scalarization if
496 contains_vce_or_bfcref_p returns true through the new parameter, for
497 both rhs and lhs.
498
499 2019-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
500
501 Backport from mainline
502 2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
503
504 PR target/87532
505 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
506 When handling vec_extract, use modular arithmetic to allow
507 constant selectors greater than vector length.
508 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow
509 V1TImode vectors to have constant selector values greater than 0.
510 Use modular arithmetic to compute vector index.
511 (rs6000_split_vec_extract_var): Use modular arithmetic to compute
512 index for in-memory vectors. Correct code generation for
513 in-register vectors. Use inner mode of vector rather than mode of
514 destination for move instruction.
515 (altivec_expand_vec_ext_builtin): Use modular arithmetic to
516 compute index.
517
518 2019-04-12 Kelvin Nilsen <kelvin@gcc.gnu.org>
519
520 PR target/87532
521 * config/rs6000/vsx.md (*vsx_extract_<mode>_<VS_scalar>mode_var):
522 Use QI inner mode with V16QI vector mode.
523
524 2019-04-15 Martin Jambor <mjambor@suse.cz>
525
526 Backport from mainline
527 2019-04-15 Martin Jambor <mjambor@suse.cz>
528
529 PR ipa/89693
530 * cgraph.c (clone_of_p): Loop over clone chain for each step in
531 the thunk chain.
532
533 2019-04-15 Martin Liska <mliska@suse.cz>
534
535 Backport from mainline
536 2019-01-18 Martin Liska <mliska@suse.cz>
537 Richard Biener <rguenther@suse.de>
538
539 PR middle-end/88587
540 * cgraph.h (create_version_clone_with_body): Add new argument
541 with attributes.
542 * cgraphclones.c (cgraph_node::create_version_clone): Add
543 DECL_ATTRIBUTES to a newly created decl. And call
544 valid_attribute_p so that proper cl_target_optimization_node
545 is set for the newly created declaration.
546 * multiple_target.c (create_target_clone): Set DECL_ATTRIBUTES
547 for declaration.
548 (expand_target_clones): Do not call valid_attribute_p, it must
549 be already done.
550 * tree-inline.c (copy_decl_for_dup_finish): Reset mode for
551 vector types.
552
553 2019-04-11 Richard Biener <rguenther@suse.de>
554
555 PR tree-optimization/90018
556 * tree-vect-data-refs.c (vect_preserves_scalar_order_p):
557 Test both SLP and interleaving variants.
558
559 2019-04-10 Matthew Malcomson <matthew.malcomson@arm.com>
560
561 PR target/90024
562 * config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
563 * config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
564 into three.
565 * config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
566 differences directly.
567 (*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.
568
569 2019-04-07 Uroš Bizjak <ubizjak@gmail.com>
570
571 PR target/89945
572 * config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
573 Avoid calling gen_lowpart with SYMBOL_REF and LABEL_REF operand.
574
575 2019-04-04 Martin Sebor <msebor@redhat.com>
576
577 PR middle-end/89934
578 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Bail
579 out if the number of arguments is less than expected.
580
581 2019-04-03 Richard Biener <rguenther@suse.de>
582
583 PR lto/89896
584 * lto-wrapper.c (run_gcc): Avoid implicit rules making
585 the all target phony.
586
587 2019-04-02 Uroš Bizjak <ubizjak@gmail.com>
588
589 PR target/89902
590 PR target/89903
591 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
592 Return false for variable DImode shifts.
593 (dimode_scalar_chain::compute_convert_gain): Do not handle
594 register count operand in variable DImode shifts.
595 (dimode_scalar_chain::make_vector_copies): Remove support to copy
596 count argument of a variable shift instruction to a vector register.
597 (dimode_scalar_chain::convert_reg): Remove support to convert
598 count argument of a variable shift instruction.
599
600 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
601
602 Backport from mainline
603 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
604 Eric Botcazou <ebotcazou@adacore.com>
605
606 PR rtl-optimization/89862
607 * rtl.h (word_register_operation_p): Exclude CONST_INT from operations
608 that operates on the full registers for WORD_REGISTER_OPERATIONS
609 architectures.
610
611 2019-03-28 Uroš Bizjak <ubizjak@gmail.com>
612
613 PR target/89848
614 * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
615 Also process XEXP (src, 0) of a shift insn.
616
617 2019-03-28 Martin Liska <mliska@suse.cz>
618
619 Backport from mainline
620 2018-11-05 Martin Liska <mliska@suse.cz>
621
622 PR web/87829
623 * doc/invoke.texi: Remove options that are
624 not disabled with -Os.
625
626 2019-03-26 Uroš Bizjak <ubizjak@gmail.com>
627
628 PR target/89827
629 * config/i386/i386.c (dimode_scalar_chain::convert_reg):
630 Also process XEXP (src, 0) of a shift insn.
631
632 2019-03-25 Andreas Krebbel <krebbel@linux.ibm.com>
633
634 Backport from mainline
635 2019-03-20 Andreas Krebbel <krebbel@linux.ibm.com>
636
637 PR target/89775
638 * config/s390/s390.c (global_not_special_regno_p): Move to make it
639 available to ...
640 (s390_optimize_register_info): Use global_not_special_regno_p to
641 check for global regs.
642
643 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
644
645 Backport from mainline
646 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
647
648 * config/rs6000/mmintrin.h (_mm_sub_pi32): Fix typo.
649
650 2019-03-21 Bill Schmidt <wschmidt@linux.ibm.com>
651
652 Backport from mainline
653 2019-03-08 Bill Schmidt <wschmidt@linux.ibm.com>
654
655 * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild
656 ud- and du-chains between phases.
657
658 2019-03-19 Richard Biener <rguenther@suse.de>
659
660 PR debug/88389
661 * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.
662
663 2019-03-19 Eric Botcazou <ebotcazou@adacore.com>
664
665 PR rtl-optimization/89753
666 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
667 explicit unrolling factor even more robust.
668
669 2019-03-18 Martin Sebor <msebor@redhat.com>
670
671 PR middle-end/88273
672 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range):
673 Handle anti-ranges the same as no range at all.
674
675 2019-03-18 Martin Jambor <mjambor@suse.cz>
676
677 Backport from mainline
678 2019-03-18 Martin Jambor <mjambor@suse.cz>
679
680 PR tree-optimization/89546
681 * tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if
682 any propagation to its children took place.
683
684 2019-03-17 H.J. Lu <hongjiu.lu@intel.com>
685
686 Backport from mainline
687 2019-03-14 H.J. Lu <hongjiu.lu@intel.com>
688
689 PR target/89523
690 * config/i386/i386.c (ix86_print_operand): Handle 'M' to add
691 addr32 prefix to VSIB address for X32.
692 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
693 "%M2" to opcode.
694 (*avx512pf_gatherpf<mode>df_mask): Likewise.
695 (*avx512pf_scatterpf<mode>sf_mask): Likewise.
696 (*avx512pf_scatterpf<mode>df_mask): Likewise.
697 (*avx2_gathersi<mode>): Prepend "%M3" to opcode.
698 (*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
699 (*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
700 (*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
701 (*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
702 (*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
703 (*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
704 (*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
705 (*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
706 (*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
707 (*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
708 (*avx512f_scatterdi<mode>): Likewise.
709
710 2019-03-15 Richard Biener <rguenther@suse.de>
711
712 Backport from mainline
713 2018-11-30 Jakub Jelinek <jakub@redhat.com>
714
715 PR testsuite/85368
716 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
717 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
718 --param logical-op-non-short-circuit is present, override
719 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
720 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
721
722 2019-03-15 Martin Liska <mliska@suse.cz>
723
724 PR other/89712
725 * doc/invoke.texi: Remove -fdump-class-hierarchy option.
726
727 2019-03-14 Martin Jambor <mjambor@suse.cz>
728
729 Backport from mainline
730 2019-03-07 Martin Jambor <mjambor@suse.cz>
731
732 PR lto/87525
733 * ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit
734 for extern inline functions.
735
736 2019-03-14 Richard Biener <rguenther@suse.de>
737
738 PR middle-end/89572
739 * tree-scalar-evolution.c (get_loop_exit_condition): Use
740 safe_dyn_cast.
741 * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
742 Use gimple_location_safe.
743
744 2019-03-13 Vladimir Makarov <vmakarov@redhat.com>
745
746 PR target/85860
747 * lra-constraints.c (inherit_in_ebb): Update
748 potential_reload_hard_regs along with live_hard_regs.
749
750 2019-03-14 Richard Biener <rguenther@suse.de>
751
752 Backport from mainline
753 2019-03-13 Richard Biener <rguenther@suse.de>
754
755 PR middle-end/89677
756 * tree-scalar-evolution.c (simplify_peeled_chrec): Do not
757 throw FP expressions at tree-affine.
758
759 2019-03-01 Richard Biener <rguenther@suse.de>
760
761 PR middle-end/89497
762 * tree-cfgcleanup.h (cleanup_tree_cfg): Add SSA update flags
763 argument, defaulted to zero.
764 * passes.c (execute_function_todo): Pass down SSA update flags
765 to cleanup_tree_cfg.
766 * tree-cfgcleanup.c: Include tree-into-ssa.h and tree-cfgcleanup.h.
767 (cleanup_tree_cfg_1): After cleanup_control_flow_pre update SSA
768 form if requested.
769 (cleanup_tree_cfg_noloop): Pass down SSA update flags.
770 (cleanup_tree_cfg): Get and pass down SSA update flags.
771
772 2019-02-18 Richard Biener <rguenther@suse.de>
773
774 PR tree-optimization/89296
775 * tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting
776 of no-warning flag to cases that might emit the bogus warning.
777
778 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
779
780 Backport from mainline
781 2019-03-11 Andreas Krebbel <krebbel@linux.ibm.com>
782
783 * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not
784 only on the else branch.
785
786 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
787
788 Backport from mainline
789 2019-02-07 Andreas Krebbel <krebbel@linux.ibm.com>
790
791 * config/s390/s390-builtin-types.def: Add new types.
792 * config/s390/s390-builtins.def: (s390_vec_xl, s390_vec_xld2)
793 (s390_vec_xlw4): Make the memory operand into a const pointer.
794 (s390_vec_xld2, s390_vec_xlw4): Add a variant for single precision
795 float.
796 * config/s390/s390-c.c (s390_expand_overloaded_builtin): Generate
797 a new vector type with the alignment of the scalar memory operand.
798
799 2019-03-12 Richard Biener <rguenther@suse.de>
800
801 PR tree-optimization/89664
802 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
803 free the occurance tree after the early out.
804
805 2019-03-12 Andre Vieira <andre.simoesdiasvieira@arm.com>
806
807 Backport from mainline
808 2019-03-08 Andre Vieira <andre.simoesdiasvieira@arm.com>
809
810 * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
811 requirement.
812
813 2019-03-11 Eric Botcazou <ebotcazou@adacore.com>
814
815 PR rtl-optimization/89588
816 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
817 explicit unrolling factor more robust.
818
819 2019-03-11 Martin Liska <mliska@suse.cz>
820
821 Backport from mainline
822 2019-03-08 Martin Liska <mliska@suse.cz>
823
824 PR target/86952
825 * config/i386/i386.c (ix86_option_override_internal): Disable
826 jump tables when retpolines are used.
827
828 2019-03-11 Martin Liska <mliska@suse.cz>
829
830 Backport from mainline
831 2019-02-11 David Malcolm <dmalcolm@redhat.com>
832
833 PR lto/88147
834 * input.c (selftest::test_line_offset_overflow): New selftest.
835 (selftest::input_c_tests): Call it.
836
837 2019-03-08 Martin Jambor <mjambor@suse.cz>
838
839 Backport from mainline
840 2019-03-07 Martin Jambor <mjambor@suse.cz>
841
842 PR ipa/88235
843 * cgraph.h (cgraph_node): New inline method former_thunk_p.
844 * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk.
845 (clone_of_p): Treat expanded thunks like thunks, be optimistic if they
846 have multiple callees. At the end check if declarations match as
847 opposed to cgraph_nodes.
848
849 2019-03-06 Tamar Christina <tamar.christina@arm.com>
850
851 Backport from trunk.
852 2019-02-25 Tamar Christina <tamar.christina@arm.com>
853
854 PR target/88530
855 * common/config/aarch64/aarch64-common.c
856 (struct aarch64_option_extension): Add is_synthetic.
857 (all_extensions): Use it.
858 (TARGET_OPTION_INIT_STRUCT): Define hook.
859 (struct gcc_targetm_common): Moved to end.
860 (all_extensions_by_on): New.
861 (opt_ext_cmp, typedef opt_ext): New.
862 (aarch64_option_init_struct): New.
863 (aarch64_contains_opt): New.
864 (aarch64_get_extension_string_for_isa_flags): Output smallest set.
865 * config/aarch64/aarch64-option-extensions.def
866 (AARCH64_OPT_EXTENSION): Explicitly include AES and SHA2 in crypto.
867 (fp, simd, crc, lse, fp16, rcpc, rdma, dotprod, aes, sha2, sha3,
868 sm4, fp16fml, sve):
869 Set is_synthetic to false.
870 (crypto): Set is_synthetic to true.
871 * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Add
872 SYNTHETIC.
873
874 2019-03-06 Tamar Christina <tamar.christina@arm.com>
875
876 Backport from trunk.
877 2019-02-28 Tamar Christina <tamar.christina@arm.com>
878
879 PR target/88530
880 * config/aarch64/aarch64-option-extensions.def: Document it.
881 * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature
882 if empty hwcaps.
883
884 2019-03-06 Xiong Hu Luo <luoxhu@linux.ibm.com>
885
886 Backport of r268834 from mainline to gcc-8-branch.
887 2019-02-13 Xiong Hu Luo <luoxhu@linux.vnet.ibm.com>
888
889 * config/rs6000/altivec.h (vec_sbox_be, vec_cipher_be,
890 vec_cipherlast_be, vec_ncipher_be, vec_ncipherlast_be): New #defines.
891 * config/rs6000/crypto.md (CR_vqdi): New define_mode_iterator.
892 (crypto_vsbox_<mode>, crypto_<CR_insn>_<mode>): New define_insns.
893 * config/rs6000/rs6000-builtin.def (VSBOX_BE): New BU_CRYPTO_1.
894 (VCIPHER_BE, VCIPHERLAST_BE, VNCIPHER_BE, VNCIPHERLAST_BE):
895 New BU_CRYPTO_2.
896 * config/rs6000/rs6000.c (builtin_function_type)
897 <CRYPTO_BUILTIN_VSBOX_BE, CRYPTO_BUILTIN_VCIPHER_BE,
898 CRYPTO_BUILTIN_VCIPHERLAST_BE, CRYPTO_BUILTIN_VNCIPHER_BE,
899 CRYPTO_BUILTIN_VNCIPHERLAST_BE>: New switch options.
900 * doc/extend.texi (vec_sbox_be, vec_cipher_be, vec_cipherlast_be,
901 vec_ncipher_be, vec_ncipherlast_be): New builtin functions.
902
903 2019-03-05 Richard Biener <rguenther@suse.de>
904
905 Backport from mainline
906 2019-02-26 Richard Biener <rguenther@suse.de>
907
908 PR tree-optimization/89505
909 * tree-ssa-structalias.c (compute_dependence_clique): Make sure
910 to handle restrict pointed-to vars with multiple subvars
911 correctly.
912
913 2019-03-01 Tamar Christina <tamar.christina@arm.com>
914
915 PR target/89517
916 * config/aarch64/aarch64-option-extensions.def (fp, simd, crypto,
917 fp16): Collapse line.
918
919 2019-03-01 Richard Biener <rguenther@suse.de>
920
921 Backport from mainline
922 2019-03-01 Jakub Jelinek <jakub@redhat.com>
923
924 PR bootstrap/89539
925 * dwarf2out.c (output_comdat_type_unit): Add ATTRIBUTE_UNUSED to
926 early_lto_debug argument.
927
928 2019-02-27 Richard Biener <rguenther@suse.de>
929
930 PR debug/88878
931 * dwarf2out.c (use_debug_types): Disable when in_lto_p.
932
933 2019-02-27 Richard Biener <rguenther@suse.de>
934
935 PR debug/88878
936 * dwarf2out.c (output_comdat_type_unit): Add early_lto_debug
937 parameter, prefix section name with .gnu.debuglto_ if true.
938 (dwarf2out_finish): Pass false to output_comdat_type_unit.
939 (dwarf2out_early_finish): Pass true to output_comdat_type_unit.
940
941 2019-02-27 Richard Biener <rguenther@suse.de>
942
943 PR debug/89514
944 * dwarf2out.c (size_of_die): Key on AT_ref (a)->comdat_type_p
945 rather than on use_debug_types, doing what output_die does.
946 (value_format): Likewise.
947
948 2019-02-28 Eric Botcazou <ebotcazou@adacore.com>
949
950 PR tree-optimization/89536
951 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_NOT_EXPR>: Test
952 only whether bit #0 of the value is 0 instead of the entire value.
953
954 2019-02-28 Li Jia He <helijia@linux.ibm.com>
955
956 Backport from trunk
957 2019-02-20 Li Jia He <helijia@linux.ibm.com>
958
959 PR target/88100
960 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin)
961 <case ALTIVEC_BUILTIN_VSPLTISB, ALTIVEC_BUILTIN_VSPLTISH,
962 ALTIVEC_BUILTIN_VSPLTISW>: Don't convert the operand before
963 range checking it.
964
965 2019-02-27 Uroš Bizjak <ubizjak@gmail.com>
966
967 PR target/89397
968 * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check
969 TARGET_SSE in addition to TARGET_SSE_MATH.
970
971 (ix86_excess_precision): Ditto.
972 (ix86_float_exceptions_rounding_supported_p): Ditto.
973 (use_rsqrt_p): Ditto.
974 * config/i386/sse.md (rsqrt<mode>2): Ditto.
975
976 2019-02-27 Jakub Jelinek <jakub@redhat.com>
977
978 Backported from mainline
979 2019-02-18 Jakub Jelinek <jakub@redhat.com>
980
981 PR target/89361
982 * config/s390/s390.c (s390_indirect_branch_attrvalue,
983 s390_indirect_branch_settings): Define unconditionally.
984 (s390_set_current_function): Likewise, but guard the whole body except
985 the s390_indirect_branch_settings call with
986 #if S390_USE_TARGET_ATTRIBUTE.
987 (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
988
989 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
990
991 Backport from mainline
992 2019-02-19 Eric Botcazou <ebotcazou@adacore.com>
993
994 * rtlanal.c (get_initial_register_offset): Fall back to the estimate
995 as long as the epilogue isn't completed.
996
997 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
998
999 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_IOR_EXPR>: Fix
1000 and move around comment.
1001 <BIT_AND_EXPR>: Likewise.
1002 <BIT_NOT_EXPR>: Add specific handling for boolean types.
1003
1004 2019-02-24 Alan Modra <amodra@gmail.com>
1005
1006 PR target/89271
1007 * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int
1008 output reg on add insn.
1009 (<bd>tf_<mode> split): Likewise. Match predicates with insn.
1010
1011 2019-02-22 Jakub Jelinek <jakub@redhat.com>
1012
1013 * BASE-VER: Set to 8.3.1.
1014
1015 2019-02-22 Release Manager
1016
1017 * GCC 8.3.0 released.
1018
1019 2019-02-15 Richard Biener <rguenther@suse.de>
1020 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR tree-optimization/89278
1023 * tree-loop-distribution.c: Include tree-eh.h.
1024 (generate_memset_builtin, generate_memcpy_builtin): Call
1025 rewrite_to_non_trapping_overflow on builtin->size before passing it
1026 to force_gimple_operand_gsi.
1027
1028 2019-02-15 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR other/89342
1031 * optc-save-gen.awk: Handle optimize_fast like optimize_size or
1032 optimize_debug.
1033 * opth-gen.awk: Likewise.
1034
1035 2019-02-14 David Malcolm <dmalcolm@redhat.com>
1036
1037 Backport of r267957 from trunk.
1038 2019-01-15 David Malcolm <dmalcolm@redhat.com>
1039
1040 PR c++/88795
1041 * tree.c (build_function_type): Assert that arg_types is not
1042 error_mark_node.
1043
1044 2019-02-14 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR rtl-optimization/89354
1047 * combine.c (make_extraction): Punt if extraction_mode is narrower
1048 than len bits.
1049
1050 2019-02-14 David Malcolm <dmalcolm@redhat.com>
1051
1052 Backport of r263339 from trunk.
1053 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1054
1055 * function-tests.c (selftest::test_expansion_to_rtl): Call
1056 free_after_compilation.
1057
1058 2019-02-14 David Malcolm <dmalcolm@redhat.com>
1059
1060 Backport of r263295 from trunk.
1061 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1062
1063 * doc/gcov.texi (-x): Remove duplicate "to".
1064 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1065 (-Wif-not-aligned): Remove duplicate "is".
1066 (-flto): Remove duplicate "the".
1067 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1068 duplicate "v5.00.b".
1069 (MSP430 Options): Remove duplicate "and" from the description
1070 of "-mgprel-sec=regexp".
1071 (x86 Options): Remove duplicate copies of "vmldLog102" and
1072 vmlsLog104 from description of "-mveclibabi=type".
1073
1074 2019-02-14 David Malcolm <dmalcolm@redhat.com>
1075
1076 Backport of r263275 from trunk.
1077 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1078
1079 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1080 pp_take_prefix when saving the existing prefix.
1081 * diagnostic.c (diagnostic_append_note): Likewise.
1082 * langhooks.c (lhd_print_error_function): Likewise.
1083 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1084 param's type. Free the existing prefix.
1085 (pp_take_prefix): New function.
1086 (pretty_printer::pretty_printer): Drop the prefix parameter.
1087 Rename the length parameter to match the comment.
1088 (pretty_printer::~pretty_printer): Free the prefix.
1089 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1090 parameter.
1091 (struct pretty_printer): Drop the "const" from "prefix" field's
1092 type and clarify memory management.
1093 (pp_set_prefix): Drop the "const" from the 2nd param.
1094 (pp_take_prefix): New decl.
1095
1096 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
1097
1098 Backport from trunk
1099 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
1100
1101 PR target/86684
1102 PR target/87149
1103 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
1104
1105 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
1106
1107 Backport from trunk
1108 2019-01-18 Segher Boessenkool <segher@kernel.crashing.org>
1109
1110 PR target/88892
1111 * config/rs6000/rs6000.md (*movsi_from_df): Allow only register
1112 operands.
1113
1114 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
1115
1116 Backport from trunk
1117 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1118
1119 PR rtl-optimization/85805
1120 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1121 value for hard registers if that was written in the same mode.
1122
1123 2019-02-14 Martin Liska <mliska@suse.cz>
1124
1125 Backport from mainline
1126 2019-02-14 Martin Liska <mliska@suse.cz>
1127
1128 PR rtl-optimization/89242
1129 * dce.c (delete_unmarked_insns): Call free_dominance_info we
1130 process a transformation.
1131
1132 2019-02-14 Martin Liska <mliska@suse.cz>
1133
1134 Backport from mainline
1135 2019-02-13 Martin Liska <mliska@suse.cz>
1136
1137 PR lto/88858
1138 * cfgrtl.c (remove_barriers_from_footer): New function.
1139 (try_redirect_by_replacing_jump): Use it.
1140 (cfg_layout_redirect_edge_and_branch): Likewise.
1141
1142 2019-02-14 Martin Liska <mliska@suse.cz>
1143
1144 Backport from mainline
1145 2019-02-11 Martin Liska <mliska@suse.cz>
1146
1147 PR ipa/89009
1148 * ipa-cp.c (build_toporder_info): Remove usage of a param.
1149 * ipa-inline.c (inline_small_functions): Likewise.
1150 * ipa-pure-const.c (propagate_pure_const): Likewise.
1151 (propagate_nothrow): Likewise.
1152 * ipa-reference.c (propagate): Likewise.
1153 * ipa-utils.c (struct searchc_env): Remove unused field.
1154 (searchc): Always search across AVAIL_INTERPOSABLE.
1155 (ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
1156 the only called IPA pure const can properly not propagate
1157 across interposable boundary.
1158 * ipa-utils.h (ipa_reduced_postorder): Remove param.
1159
1160 2019-02-14 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR tree-optimization/89314
1163 * fold-const.c (fold_binary_loc): Cast strlen argument to
1164 const char * before dereferencing it. Formatting fixes.
1165
1166 Backported from mainline
1167 2019-02-13 Jakub Jelinek <jakub@redhat.com>
1168
1169 PR middle-end/89303
1170 * tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
1171 into pt->vars_contains_escaped_heap instead of setting
1172 pt->vars_contains_escaped_heap to it.
1173
1174 PR middle-end/89281
1175 * optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
1176 INTVAL (size), compare it to GET_MODE_MASK instead of
1177 1 << GET_MODE_BITSIZE.
1178
1179 PR target/89290
1180 * config/i386/predicates.md (x86_64_immediate_operand): Allow
1181 TLS UNSPECs offsetted by signed 32-bit CONST_INT even with
1182 -mcmodel=large.
1183
1184 2019-02-09 Jakub Jelinek <jakub@redhat.com>
1185
1186 PR middle-end/89246
1187 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1188 If !node->definition and TYPE_ARG_TYPES is non-NULL, use
1189 TYPE_ARG_TYPES instead of DECL_ARGUMENTS.
1190
1191 2019-02-13 Bill Schmidt <wschmidt@linux.ibm.com>
1192
1193 Backport from mainline
1194 2019-02-11 Bill Schmidt <wschmidt@linux.ibm.com>
1195
1196 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right
1197 and shift-left vector built-ins need to include a TRUNC_MOD_EXPR
1198 for correct semantics.
1199
1200 2019-02-13 Richard Biener <rguenther@suse.de>
1201
1202 Backport from mainline
1203 2019-01-08 Richard Biener <rguenther@suse.de>
1204
1205 PR tree-optimization/86554
1206 * tree-ssa-sccvn.c (visit_nary_op): When value-numbering to
1207 expressions with different overflow behavior make sure there's an
1208 available expression on the path.
1209
1210 2019-02-13 Martin Liska <mliska@suse.cz>
1211
1212 PR lto/89260
1213 * lto-streamer.h (LTO_minor_version): Bump version due
1214 to r268698.
1215
1216 2019-02-13 Richard Biener <rguenther@suse.de>
1217
1218 Backport from mainline
1219 2019-02-12 Richard Biener <rguenther@suse.de>
1220
1221 PR tree-optimization/89253
1222 * tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
1223 duplicate the loop.
1224
1225 2019-02-08 Richard Biener <rguenther@suse.de>
1226
1227 PR middle-end/89223
1228 * tree-data-ref.c (initialize_matrix_A): Fail if constant
1229 doesn't fit in HWI.
1230 (analyze_subscript_affine_affine): Handle failure from
1231 initialize_matrix_A.
1232
1233 2019-01-28 Richard Biener <rguenther@suse.de>
1234
1235 PR tree-optimization/88739
1236 * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid generating
1237 BIT_FIELD_REFs of non-mode-precision integral operands.
1238
1239 2019-02-12 Jan Hubicka <hubicka@ucw.cz>
1240
1241 Backport from mainline:
1242 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
1243
1244 * ipa-visibility.c (localize_node): Also do not localize
1245 LDPR_PREVAILING_DEF_IRONLY_EXP.
1246
1247 2019-02-11 Stefan Agner <stefan@agner.ch>
1248
1249 Backport from mainline.
1250 2019-01-10 Stefan Agner <stefan@agner.ch>
1251
1252 PR target/88648
1253 * config/arm/arm.c (arm_option_override_internal): Force
1254 opts->x_inline_asm_unified to true only if TARGET_THUMB2_P.
1255
1256 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
1257
1258 Backport from mainline:
1259 2019-01-05 Jan Hubicka <hubicka@ucw.cz>
1260
1261 PR tree-opt/86020
1262 Revert:
1263 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
1264
1265 * ipa-inline.c (edge_badness): Use inlined_time instead of
1266 inline_summaries->get.
1267
1268 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1269
1270 Backported from mainline
1271 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1272
1273 PR target/89112
1274 * config/rs6000/rs6000.md (<bd>tf_<mode>): Generate a local label
1275 for the long branch case.
1276
1277 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1278
1279 PR target/89112
1280 * config/rs6000/rs6000-string.c (do_ifelse, expand_cmp_vec_sequence,
1281 expand_compare_loop, expand_block_compare_gpr,
1282 expand_strncmp_align_check, expand_strncmp_gpr_sequence): Insert
1283 REG_BR_PROB notes in inline expansion of memcmp/strncmp. Add
1284 #include "profile-count.h" and "predict.h" for types and functions
1285 needed to work with REG_BR_PROB notes.
1286
1287 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1288
1289 * config/rs6000/rs6000-string.c (expand_compare_loop,
1290 expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
1291 memcmp/strncmp.
1292
1293 2019-02-09 Jakub Jelinek <jakub@redhat.com>
1294
1295 Backported from mainline
1296 2019-01-16 David Malcolm <dmalcolm@redhat.com>
1297
1298 PR target/88861
1299 * combine.c (delete_noop_moves): Convert to "bool" return,
1300 returning true if any edges are eliminated.
1301 (combine_instructions): Also return true if delete_noop_moves
1302 returns true.
1303
1304 2019-02-08 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR rtl-optimization/89234
1307 * except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
1308 is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
1309 (copy_reg_eh_region_note_backward): Likewise.
1310
1311 2019-02-09 Alan Modra <amodra@gmail.com>
1312
1313 PR target/88343
1314 * config/rs6000/rs6000.c (save_reg_p): Match logic in
1315 rs6000_emit_prologue emitting pic_offset_table setup.
1316
1317 2019-02-08 Richard Biener <rguenther@suse.de>
1318
1319 Backport from mainline
1320 2018-11-13 Richard Biener <rguenther@suse.de>
1321
1322 PR tree-optimization/86991
1323 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1324 group building until we have successfully detected the SLP
1325 reduction.
1326 (vect_is_simple_reduction): Remove fixup code here.
1327
1328 2019-02-08 Richard Biener <rguenther@suse.de>
1329
1330 Backport from mainline
1331 2019-02-03 Richard Biener <rguenther@suse.de>
1332
1333 PR debug/87295
1334 * dwarf2out.c (copy_ancestor_tree): Register non-stubs as
1335 orig.
1336
1337 2019-01-29 Richard Biener <rguenther@suse.de>
1338
1339 PR debug/87295
1340 * dwarf2out.c (collect_skeleton_dies): New helper.
1341 (copy_decls_for_unworthy_types): Call it.
1342 (build_abbrev_table): Do not try to replace
1343 DW_AT_signature refs with local refs.
1344
1345 2019-01-17 Richard Biener <rguenther@suse.de>
1346
1347 PR lto/86736
1348 * dwarf2out.c (want_pubnames): Never generate pubnames sections
1349 and friends for the LTO part of debug info.
1350
1351 2019-01-24 Richard Biener <rguenther@suse.de>
1352
1353 PR lto/87187
1354 * tree-streamer-out.c (write_ts_decl_common_tree_pointers):
1355 When in "legacy" debug mode make sure to reset self-origins.
1356
1357 2019-01-15 Richard Biener <rguenther@suse.de>
1358
1359 PR debug/88046
1360 * dwarf2out.c (gen_member_die): Do not generate inheritance
1361 DIEs late.
1362
1363 2018-11-22 Richard Biener <rguenther@suse.de>
1364
1365 PR lto/87229
1366 PR lto/88112
1367 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1368 which can appear in size expressions.
1369 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1370 CALL_EXPR_BY_DESCRIPTOR.
1371 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1372 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1373 CALL_EXPR_BY_DESCRIPTOR.
1374 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1375
1376 2019-02-08 Christophe Lyon <christophe.lyon@linaro.org>
1377
1378 Backport from mainline
1379 2019-01-07 Christophe Lyon <christophe.lyon@linaro.org>
1380
1381 PR target/85596
1382 * doc/install.texi (with-multilib-list): Document for aarch64.
1383
1384 2019-02-08 Richard Biener <rguenther@suse.de>
1385
1386 Backport from mainline
1387 2018-12-10 Richard Biener <rguenther@suse.de>
1388
1389 PR tree-optimization/88427
1390 * vr-values.c (vr_values::extract_range_from_phi_node):
1391 Handle symbolic ranges conservatively when trying to drop
1392 to Inf +- 1.
1393
1394 2018-11-28 Richard Biener <rguenther@suse.de>
1395
1396 PR tree-optimization/88217
1397 * vr-values.c (vr_values::extract_range_from_phi_node): Make
1398 sure to handle results > +INF and < -INF correctly when
1399 trying to drop down to +INF - 1 or -INF + 1.
1400
1401 2018-11-23 Richard Biener <rguenther@suse.de>
1402
1403 PR tree-optimization/88149
1404 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1405 the case where there are two different def types for the
1406 same operand at different operand position in the same stmt.
1407
1408 2019-02-07 Jakub Jelinek <jakub@redhat.com>
1409
1410 Backported from mainline
1411 2019-02-05 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR target/89188
1414 * dce.c (delete_unmarked_insns): Don't remove no-op moves if they
1415 can throw, non-call exceptions are enabled and we can't delete
1416 dead exceptions or alter cfg. Set must_clean if
1417 delete_insn_and_edges returns true, don't set it blindly for calls.
1418
1419 PR rtl-optimization/89195
1420 * combine.c (make_extraction): For MEMs, don't extract bytes outside
1421 of the original MEM.
1422
1423 PR target/89186
1424 * optabs.c (prepare_cmp_insn): Pass x and y to
1425 emit_block_comp_via_libcall rather than XEXP (x, 0) and XEXP (y, 0).
1426
1427 2019-02-02 Jakub Jelinek <jakub@redhat.com>
1428
1429 PR middle-end/87887
1430 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1431 Punt with warning on aggregate return or argument types. Ignore
1432 type/mode checking for uniform arguments.
1433
1434 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1435
1436 PR tree-optimization/88107
1437 * tree-cfg.c (find_outermost_region_in_block): Add ALL argument,
1438 instead of assertion that eh_region_outermost is non-NULL, if it
1439 is NULL, set *ALL to true and return NULL.
1440 (move_sese_region_to_fn): Adjust caller, if all is set, call
1441 duplicate_eh_regions with NULL region.
1442
1443 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1444
1445 PR sanitizer/89124
1446 * ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining
1447 always_inline callees into no_sanitize_address callers.
1448
1449 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1450
1451 PR c++/89105
1452 * config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
1453 for arguments to functions that are TU-local and shouldn't be
1454 referenced by assembly.
1455
1456 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR c++/66676
1459 PR ipa/89104
1460 * omp-simd-clone.c (simd_clone_clauses_extract)
1461 <case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
1462 OMP_CLAUSE_ALIGNED_ALIGNMENT.
1463
1464 2019-01-28 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR middle-end/89002
1467 * gimplify.c (gimplify_omp_for): When adding OMP_CLAUSE_*_GIMPLE_SEQ
1468 for lastprivate/linear IV, push gimplify context around gimplify_assign
1469 and, if it needed any temporaries, pop it into a gimple bind around the
1470 sequence.
1471
1472 PR target/89073
1473 * doc/invoke.texi (-mclwb, -mprfchw, -mrdpid, -mrdseed, -msgx,
1474 -madx, -mhle, -mavx5124fmaps, -mavx512vnni, -mavx5124vnniw): Document
1475 x86 ISA options.
1476 (bmi2): Add missing @opindex.
1477 * doc/extend.texi (x86 target attribute): Move fma4, lwp, ssse3
1478 options alphabetically. Add missing 3dnow, 3dnowa, adx, avx, avx2,
1479 avx5124fmaps, avx5124vnniw, avx512bitalg, avx512bw, avx512cd,
1480 avx512dq, avx512er, avx512f, avx512ifma, avx512pf, avx512vbmi,
1481 avx512vbmi2, avx512vl, avx512vnni, avx512vpopcntdq, bmi, bmi2,
1482 clflushopt, clwb, clzero, crc32, cx16, f16c, fma, fsgsbase,
1483 fxsr, gfni, hle, lzcnt, movbe, movdir64b, movdiri, mwaitx, pconfig,
1484 pku, prefetchwt1, prfchw, rdpid, rdrnd, rdseed, rtm, sahf,
1485 sgx, sha, shstk, tbm, vaes, vpclmulqdq, wbnoinvd, xsave,
1486 xsavec, xsaveopt and xsaves options.
1487
1488 2019-01-27 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR target/87214
1491 * config/i386/sse.md
1492 (<mask_codefor>avx512dq_shuf_<shuffletype>64x2_1<mask_name>,
1493 avx512f_shuf_<shuffletype>64x2_1<mask_name>): Ensure the
1494 first constants in pairs are multiples of 2. Formatting fixes.
1495 (avx512vl_shuf_<shuffletype>32x4_1<mask_name>,
1496 avx512vl_shuf_<shuffletype>32x4_1<mask_name>): Ensure the
1497 first constants in each quadruple are multiples of 4. Formatting fixes.
1498
1499 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1500
1501 PR tree-optimization/88964
1502 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
1503 punt if HONOR_SNANS (chrec).
1504
1505 2019-01-23 Jakub Jelinek <jakub@redhat.com>
1506
1507 PR tree-optimization/88964
1508 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Use
1509 build_zero_cst instead of build_int_cst. Return false for loop
1510 invariants which honor signed zeros.
1511
1512 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR target/88965
1515 * config/rs6000/rs6000.c: Include tree-vrp.h and tree-ssanames.h.
1516 (rs6000_gimple_fold_builtin): If MEM_REF address doesn't satisfy
1517 is_gimple_mem_ref_addr predicate, force it into a SSA_NAME first.
1518
1519 PR middle-end/88968
1520 * gimplify.c (gimplify_omp_atomic): Handle bitfield atomics with
1521 non-integral DECL_BIT_FIELD_REPRESENTATIVEs.
1522
1523 PR target/88905
1524 * optabs.c (add_equal_note): Add op0_mode argument, use it instead of
1525 GET_MODE (op0).
1526 (expand_binop_directly, expand_doubleword_clz,
1527 expand_doubleword_popcount, expand_ctz, expand_ffs,
1528 expand_unop_direct, maybe_emit_unop_insn): Adjust callers.
1529
1530 PR rtl-optimization/49429
1531 PR target/49454
1532 PR rtl-optimization/86334
1533 PR target/88906
1534 * expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
1535 addressable from here...
1536 (emit_block_op_via_libcall): ... to here.
1537
1538 2019-01-17 Jakub Jelinek <jakub@redhat.com>
1539
1540 PR target/88734
1541 * config/aarch64/arm_neon.h: Fix #pragma GCC target syntax - replace
1542 (("..."))) with ("..."). Use arch=armv8.2-a+sha3 instead of
1543 arch=armv8.2-a+crypto for vsha512hq_u64 etc. intrinsics.
1544
1545 PR rtl-optimization/88870
1546 * dce.c (deletable_insn_p): Never delete const/pure calls that can
1547 throw if we can't alter the cfg or delete dead exceptions.
1548 (mark_insn): Don't call find_call_stack_args for such calls.
1549
1550 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR bootstrap/88714
1553 * passes.c (finish_optimization_passes): Call print_combine_total_stats
1554 inside of pass_combine_1 dump rather than pass_profile_1.
1555
1556 2019-01-10 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c/88568
1559 * attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting
1560 DECL_EXTERNAL.
1561
1562 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR debug/88723
1565 * dwarf2out.c (const_ok_for_output_1): Remove redundant call to
1566 const_not_ok_for_debug_p target hook.
1567 (mem_loc_descriptor) <case UNSPEC>: Only call const_ok_for_output_1
1568 on UNSPEC and subexpressions thereof if all subexpressions of the
1569 UNSPEC are CONSTANT_P.
1570
1571 2019-01-05 Jakub Jelinek <jakub@redhat.com>
1572
1573 PR debug/88635
1574 * dwarf2out.c (const_ok_for_output_1): Reject MINUS that contains
1575 SYMBOL_REF, CODE_LABEL or UNSPEC in subexpressions of second argument.
1576 Reject PLUS that contains SYMBOL_REF, CODE_LABEL or UNSPEC in
1577 subexpressions of both operands.
1578 (mem_loc_descriptor): Handle UNSPEC if target hook acks it and all the
1579 subrtxes are CONSTANT_P.
1580
1581 2019-02-07 Richard Biener <rguenther@suse.de>
1582
1583 Backport from mainline
1584 2018-11-20 Richard Biener <rguenther@suse.de>
1585
1586 PR tree-optimization/88105
1587 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1588 backedges.
1589
1590 2018-11-28 Richard Biener <rguenther@suse.de>
1591
1592 PR tree-optimization/88223
1593 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1594 over a stored-same value may-alias store make sure to consider
1595 partial overlaps which are valid when TBAA reasonings do not
1596 apply and byte-granular overlaps are possible at all.
1597
1598 2019-02-07 Richard Biener <rguenther@suse.de>
1599
1600 Backport from mainline
1601 2018-12-11 Richard Biener <rguenther@suse.de>
1602
1603 PR middle-end/88448
1604 PR middle-end/88415
1605 * tree-complex.c (update_complex_assignment): Properly transfer
1606 or clean EH info around gimple_assign_set_rhs_with_ops.
1607
1608 2018-11-15 Richard Biener <rguenther@suse.de>
1609
1610 PR tree-optimization/88030
1611 * tree-complex.c (need_eh_cleanup): New global.
1612 (update_complex_assignment): Mark blocks that need EH update.
1613 (expand_complex_comparison): Likewise.
1614 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1615 perform EH cleanup and schedule CFG cleanup if that did anything.
1616
1617 2018-11-08 Richard Biener <rguenther@suse.de>
1618
1619 PR tree-optimization/87929
1620 * tree-complex.c (expand_complex_comparison): Clean EH.
1621
1622 2019-02-06 Eric Botcazou <ebotcazou@adacore.com>
1623
1624 * config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
1625 after restoring registers saved to allocate the frame on Windows.
1626
1627 2019-02-06 Richard Biener <rguenther@suse.de>
1628
1629 Backport from mainline
1630 2019-01-31 Richard Biener <rguenther@suse.de>
1631
1632 PR tree-optimization/89135
1633 * tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
1634 with abnormal preds.
1635
1636 2019-01-18 Richard Biener <rguenther@suse.de>
1637
1638 PR tree-optimization/88903
1639 * tree-vect-stmts.c (vectorizable_shift): Verify we see all
1640 scalar stmts a SLP shift amount is composed of when detecting
1641 shifts by scalars.
1642
1643 2019-02-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
1644
1645 Backport from mainline.
1646 2019-01-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
1647 * config/rs6000/rs6000-c.c (altivec-resolve_overloaded_builtin):
1648 Change handling of ALTIVEC_BUILTIN_VEC_EXTRACT. Coerce result to
1649 type of vector element when vec_extract is implemented by direct
1650 move.
1651
1652 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1653
1654 Backport from mainline
1655 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1656
1657 PR target/88856
1658 * config/s390/s390.md: Remove load and test FP splitter.
1659
1660 2019-02-04 Bill Schmidt <wshmidt@linux.ibm.com>
1661
1662 PR target/87064
1663 Backport from mainline
1664
1665 2019-01-30 Bill Schmidt <wschmidt@linux.ibm.com>
1666
1667 PR target/87064
1668 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v4sf_scalar):
1669 Disable for little-endian.
1670
1671 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1672
1673 PR target/87064
1674 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v2df_scalar):
1675 Disable for little endian.
1676
1677 2019-02-04 Eric Botcazou <ebotcazou@adacore.com>
1678
1679 * config/sparc/sparc.h: Remove superfluous blank lines.
1680 * config/sparc/sparc.c (global_offset_table_rtx): Rename into...
1681 (got_register_rtx): ...this.
1682 (sparc_got): Adjust to above renaming.
1683 (sparc_tls_got): Likewise.
1684 (sparc_output_mi_thunk): Likewise.
1685 (sparc_init_pic_reg): Likewise.
1686 (save_local_or_in_reg_p): Fix test on the GOT register.
1687 (USE_HIDDEN_LINKONCE): Move around.
1688 (get_pc_thunk_name): Likewise.
1689 (gen_load_pcrel_sym): Likewise.
1690 (load_got_register): Likewise.
1691
1692 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1693
1694 Backport from mainline
1695 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1696
1697 PR tree-optimization/87022
1698 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1699 bits in dist vector rather than the first one.
1700
1701 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1702
1703 Backport from mainline
1704 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1705
1706 PR tree-optimization/88932
1707 * tree-predcom.c (try_combine_chains): Get loop bbs in dom order.
1708
1709 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1710
1711 Backport from mainline
1712 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1713
1714 PR tree-optimization/89008
1715 * gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
1716 process anything of the form X * 0.
1717
1718 2019-01-31 Richard Biener <rguenther@suse.de>
1719
1720 Backport from mainline
1721 2019-01-31 Richard Biener <rguenther@suse.de>
1722
1723 PR rtl-optimization/89115
1724 * lra.c (lra_rtx_hash): Properly hash CONST_INT values.
1725
1726 2019-01-30 Richard Biener <rguenther@suse.de>
1727
1728 PR rtl-optimization/89115
1729 * opts.c (default_options_optimization): Reduce
1730 PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
1731 Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
1732 to the default.
1733
1734 2019-01-30 Kewen Lin <linkw@gcc.gnu.org>
1735
1736 Backport from mainline.
1737 2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
1738
1739 * doc/extend.texi: Add four new prototypes for vec_ld and seven new
1740 prototypes for vec_st.
1741 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add entries
1742 for scalar address type variants of altivec_vec_ld/altivec_vec_st,
1743 mainly on signed/unsigned long long and double.
1744
1745 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1746
1747 Backport from mainline.
1748 * gcc/config.gcc: Force .init_array for ARC.
1749
1750 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1751
1752 Backport from mainline.
1753 * config/arc/atomic.md: Add operand to DMB instruction.
1754
1755 2019-01-27 Uroš Bizjak <ubizjak@gmail.com>
1756
1757 PR target/88948
1758 * rtl.h (prepare_copy_insn): New prototype.
1759 * gcse.c (prepare_copy_insn): New function, split out from
1760 process_insert_insn.
1761 (process_insert_insn): Use prepare_copy_insn.
1762 * store-motion.c (replace_store_insn): Use prepare_copy_insn
1763 instead of gen_move_insn.
1764
1765 2019-01-25 Richard Biener <rguenther@suse.de>
1766
1767 PR tree-optimization/86865
1768 * graphite-scop-detection.c (scop_detection::can_represent_loop):
1769 Reject non-do-while loops.
1770
1771 2019-01-24 Uroš Bizjak <ubizjak@gmail.com>
1772
1773 PR target/88998
1774 * config/i386/sse.md (sse2_cvtpi2pd): Add SSE alternatives.
1775 Disparage MMX alternative.
1776 (sse2_cvtpd2pi): Ditto.
1777 (sse2_cvttpd2pi): Ditto.
1778
1779 2019-01-24 Richard Earnshaw <rearnsha@arm.com>
1780
1781 PR target/88469
1782 * profile-count.h (profile_count): On ARM systems using GCC 6/7/8
1783 force the alignment of m_val.
1784
1785 2019-01-24 Richard Biener <rguenther@suse.de>
1786
1787 Backport from mainline
1788 2019-01-23 Richard Biener <rguenther@suse.de>
1789
1790 PR tree-optimization/89008
1791 * tree-ssa-reassoc.c (eliminate_using_constants): For * 0 do
1792 not leave another stray operand.
1793
1794 2019-01-22 Uroš Bizjak <ubizjak@gmail.com>
1795
1796 PR target/88938
1797 * config/i386/i386.c (ix86_expand_builtin) [case IX86_BUILTIN_BEXTRI32,
1798 case IX86_BUILTIN_BEXTRI64]: Sanitize operands.
1799
1800 2019-01-18 Richard Earnshaw <rearnsha@arm.com>
1801
1802 PR target/88799
1803 * config/arm/arm-cpus.in (mp): New feature.
1804 (sec): New feature.
1805 (fgroup ARMv7ve): Add mp and sec features.
1806 (arch armv7-a): Add options to allow mp and sec extensions.
1807 (cpu generic-armv7-a): Add options to allow mp and sec extensions.
1808 (cpu cortex-a5, cpu cortex-7, cpu cortex-a9): Add mp and sec
1809 extenstions to the base architecture.
1810 (cpu cortex-a8): Add sec extension to the base architecture.
1811 (cpu marvell-pj4): Add mp and sec extensions to the base architecture.
1812 * config/arm/t-aprofile (MULTILIB_MATCHES): Map all armv7-a arch
1813 variants down to the base v7-a varaint.
1814 * config/arm/t-multilib (v7_a_arch_variants): New variable.
1815 * doc/invoke.texi (ARM Options): Add +mp and +sec to the list
1816 of permitted extensions for -march=armv7-a and for
1817 -mcpu=generic-armv7-a.
1818
1819 2019-01-17 Uroš Bizjak <ubizjak@gmail.com>
1820
1821 * config/alpha/alpha.c (alpha_gimplify_va_arg):
1822 Handle split indirect COMPLEX_TYPE arguments.
1823
1824 2019-01-17 Eric Botcazou <ebotcazou@adacore.com>
1825
1826 * gimple-ssa-isolate-paths.c (stmt_uses_name_in_undefined_way): Replace
1827 flag_non_call_exceptions with cfun->can_throw_non_call_exceptions.
1828 (stmt_uses_0_or_null_in_undefined_way): Likewise.
1829 * tree-ssa-alias.c (same_addr_size_stores_p): Likewise.
1830
1831 2019-01-16 Aaron Sawdey <acsawdey@linux.ibm.com>
1832
1833 Backported from mainline
1834 2019-01-03 Aaron Sawdey <acsawdey@linux.ibm.com>
1835 * config/rs6000/rs6000-string.c (expand_block_move): Don't use
1836 unaligned vsx and avoid lxvd2x/stxvd2x.
1837 (gen_lvx_v4si_move): New function.
1838
1839 2019-01-16 Martin Jambor <mjambor@suse.cz>
1840
1841 Backported from mainline
1842 2018-12-10 Martin Jambor <mjambor@suse.cz>
1843
1844 PR ipa/88214
1845 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1846 we check pointers against pointers.
1847
1848 2019-01-10 Jan Hubicka <hubicka@ucw.cz>
1849
1850 Backported from mainline
1851 2018-12-27 Jan Hubicka <hubicka@ucw.cz>
1852
1853 * ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
1854 (polymorphic_call_target_hasher::hash): Hash it.
1855 (polymorphic_call_target_hasher::equal): Compare it.
1856 (possible_polymorphic_call_targets): Set it.
1857 * tree.c (free_lang_data): Rebuild type inheritance graph even on
1858 non-LTO path.
1859
1860 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1861
1862 Backported from mainline
1863 2019-01-02 Richard Biener <rguenther@suse.de>
1864
1865 PR ipa/85574
1866 * ipa-icf.h (sem_item_optimizer::sort_congruence_split): Declare.
1867 * ipa-icf.c (sem_item_optimizer::sort_congruence_split): New
1868 function.
1869 (sem_item_optimizer::do_congruence_step_f): Sort the congruence
1870 set after UIDs before splitting them.
1871
1872 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1873
1874 Backported from mainline
1875 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1876
1877 PR tree-optimization/85574
1878 * tree-ssa-uncprop.c (struct equiv_hash_elt): Remove unused
1879 structure.
1880 (struct ssa_equip_hash_traits): Declare.
1881 (val_ssa_equiv): Use custom hash traits using operand_equal_p.
1882
1883 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1884
1885 * config/sparc/sparc.md (*tablejump_sp32): Merge into...
1886 (*tablejump_sp64): Likewise.
1887 (*tablejump<P:mode>): ...this.
1888 (*call_address_sp32): Merge into...
1889 (*call_address_sp64): Likewise.
1890 (*call_address<P:mode>): ...this.
1891 (*call_symbolic_sp32): Merge into...
1892 (*call_symbolic_sp64): Likewise.
1893 (*call_symbolic<P:mode>): ...this.
1894 (call_value): Remove constraint and add predicate.
1895 (*call_value_address_sp32): Merge into...
1896 (*call_value_address_sp64): Likewise.
1897 (*call_value_address<P:mode>): ...this.
1898 (*call_value_symbolic_sp32): Merge into...
1899 (*call_value_symbolic_sp64): Likewise.
1900 (*call_value_symbolic<P:mode>): ...this.
1901 (*sibcall_symbolic_sp32): Merge into...
1902 (*sibcall_symbolic_sp64): Likewise.
1903 (*sibcall_symbolic<P:mode>): ...this.
1904 (sibcall_value): Remove constraint and add predicate.
1905 (*sibcall_value_symbolic_sp32): Merge into...
1906 (*sibcall_value_symbolic_sp64): Likewise.
1907 (*sibcall_value_symbolic<P:mode>): ...this.
1908 (window_save): Minor tweak.
1909 (*branch_sp32): Merge into...
1910 (*branch_sp64): Likewise.
1911 (*branch<P:mode>): ...this.
1912
1913 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1914 James Clarke <jrtc27@jrtc27.com>
1915
1916 PR target/84010
1917 * config/sparc/sparc.c (sparc_legitimize_tls_address): Only use Pmode
1918 consistently in TLS address generation and adjust code to the renaming
1919 of patterns. Mark calls to __tls_get_addr as const.
1920 * config/sparc/sparc.md (tgd_hi22): Turn into...
1921 (tgd_hi22<P:mode>): ...this and use Pmode throughout.
1922 (tgd_lo10): Turn into...
1923 (tgd_lo10<P:mode>): ...this and use Pmode throughout.
1924 (tgd_add32): Merge into...
1925 (tgd_add64): Likewise.
1926 (tgd_add<P:mode>): ...this and use Pmode throughout.
1927 (tldm_hi22): Turn into...
1928 (tldm_hi22<P:mode>): ...this and use Pmode throughout.
1929 (tldm_lo10): Turn into...
1930 (tldm_lo10<P:mode>): ...this and use Pmode throughout.
1931 (tldm_add32): Merge into...
1932 (tldm_add64): Likewise.
1933 (tldm_add<P:mode>): ...this and use Pmode throughout.
1934 (tldm_call32): Merge into...
1935 (tldm_call64): Likewise.
1936 (tldm_call<P:mode>): ...this and use Pmode throughout.
1937 (tldo_hix22): Turn into...
1938 (tldo_hix22<P:mode>): ...this and use Pmode throughout.
1939 (tldo_lox10): Turn into...
1940 (tldo_lox10<P:mode>): ...this and use Pmode throughout.
1941 (tldo_add32): Merge into...
1942 (tldo_add64): Likewise.
1943 (tldo_add<P:mode>): ...this and use Pmode throughout.
1944 (tie_hi22): Turn into...
1945 (tie_hi22<P:mode>): ...this and use Pmode throughout.
1946 (tie_lo10): Turn into...
1947 (tie_lo10<P:mode>): ...this and use Pmode throughout.
1948 (tie_ld64): Use DImode throughout.
1949 (tie_add32): Merge into...
1950 (tie_add64): Likewise.
1951 (tie_add<P:mode>): ...this and use Pmode throughout.
1952 (tle_hix22_sp32): Merge into...
1953 (tle_hix22_sp64): Likewise.
1954 (tle_hix22<P:mode>): ...this and use Pmode throughout.
1955 (tle_lox22_sp32): Merge into...
1956 (tle_lox22_sp64): Likewise.
1957 (tle_lox22<P:mode>): ...this and use Pmode throughout.
1958 (*tldo_ldub_sp32): Merge into...
1959 (*tldo_ldub_sp64): Likewise.
1960 (*tldo_ldub<P:mode>): ...this and use Pmode throughout.
1961 (*tldo_ldub1_sp32): Merge into...
1962 (*tldo_ldub1_sp64): Likewise.
1963 (*tldo_ldub1<P:mode>): ...this and use Pmode throughout.
1964 (*tldo_ldub2_sp32): Merge into...
1965 (*tldo_ldub2_sp64): Likewise.
1966 (*tldo_ldub2<P:mode>): ...this and use Pmode throughout.
1967 (*tldo_ldsb1_sp32): Merge into...
1968 (*tldo_ldsb1_sp64): Likewise.
1969 (*tldo_ldsb1<P:mode>): ...this and use Pmode throughout.
1970 (*tldo_ldsb2_sp32): Merge into...
1971 (*tldo_ldsb2_sp64): Likewise.
1972 (*tldo_ldsb2<P:mode>): ...this and use Pmode throughout.
1973 (*tldo_ldub3_sp64): Use DImode throughout.
1974 (*tldo_ldsb3_sp64): Likewise.
1975 (*tldo_lduh_sp32): Merge into...
1976 (*tldo_lduh_sp64): Likewise.
1977 (*tldo_lduh<P:mode>): ...this and use Pmode throughout.
1978 (*tldo_lduh1_sp32): Merge into...
1979 (*tldo_lduh1_sp64): Likewise.
1980 (*tldo_lduh1<P:mode>): ...this and use Pmode throughout.
1981 (*tldo_ldsh1_sp32): Merge into...
1982 (*tldo_ldsh1_sp64): Likewise.
1983 (*tldo_ldsh1<P:mode>): ...this and use Pmode throughout.
1984 (*tldo_lduh2_sp64): Use DImode throughout.
1985 (*tldo_ldsh2_sp64): Likewise.
1986 (*tldo_lduw_sp32): Merge into...
1987 (*tldo_lduw_sp64): Likewise.
1988 (*tldo_lduw<P:mode>): ...this and use Pmode throughout.
1989 (*tldo_lduw1_sp64): Use DImode throughout.
1990 (*tldo_ldsw1_sp64): Likewise.
1991 (*tldo_ldx_sp64): Likewise.
1992 (*tldo_stb_sp32): Merge into...
1993 (*tldo_stb_sp64): Likewise.
1994 (*tldo_stb<P:mode>): ...this and use Pmode throughout.
1995 (*tldo_sth_sp32): Merge into...
1996 (*tldo_sth_sp64): Likewise.
1997 (*tldo_sth<P:mode>): ...this and use Pmode throughout.
1998 (*tldo_stw_sp32): Merge into...
1999 (*tldo_stw_sp64): Likewise.
2000 (*tldo_stw<P:mode>): ...this and use Pmode throughout.
2001 (*tldo_stx_sp64): Use DImode throughout.
2002
2003 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
2004
2005 * doc/invoke.texi (-Os): Add reference to -finline-functions.
2006 (-finline-functions): Remove reference to -O2, add references
2007 to -fprofile-use and -fauto-profile.
2008
2009 2019-01-08 Jakub Jelinek <jakub@redhat.com>
2010
2011 Backported from mainline
2012 2019-01-05 Jakub Jelinek <jakub@redhat.com>
2013
2014 PR middle-end/82564
2015 PR target/88620
2016 * expr.c (expand_assignment): For calls returning VLA structures
2017 if to_rtx is not a MEM, force it into a stack temporary.
2018
2019 2019-01-04 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR target/88594
2022 * config/i386/i386.c (ix86_expand_divmod_libfunc): Use mode instead
2023 of GET_MODE (opN) as modes of the libcall arguments.
2024
2025 2019-01-03 Jakub Jelinek <jakub@redhat.com>
2026
2027 PR debug/88644
2028 * dwarf2out.c (modified_type_die): If type is equal to sizetype,
2029 change it to qualified_type.
2030
2031 2018-12-21 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR middle-end/85594
2034 PR middle-end/88553
2035 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
2036 if needed.
2037 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
2038
2039 PR target/88522
2040 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
2041 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
2042 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
2043 -masm=intel.
2044 (gatherq_mode): Remove mode iterator.
2045 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
2046 of <xtg_mode>.
2047 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
2048 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
2049 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
2050
2051 PR rtl-optimization/88563
2052 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
2053 and mode arguments to convert_modes. Likewise swap mode and word_mode
2054 arguments. Handle both arguments with VOIDmode before convert_modes
2055 of one of them. Formatting fixes.
2056
2057 2018-12-19 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR target/88541
2060 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
2061 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
2062
2063 2018-12-14 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c++/82294
2066 PR c++/87436
2067 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
2068 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
2069 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
2070 Fix up COMPLEX_CST handling.
2071 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
2072 it and pass it through to categorize_ctor_elements_1.
2073 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
2074 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
2075 ctor into readonly data section if num_unique_nonzero_elements is
2076 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
2077 bytes.
2078
2079 2018-12-13 Jakub Jelinek <jakub@redhat.com>
2080
2081 PR rtl-optimization/88470
2082 * cfgcleanup.c (outgoing_edges_match): If the function is
2083 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
2084 edge to EXIT, return false.
2085
2086 PR rtl-optimization/88416
2087 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
2088 even if !AUTO_INC_DEC.
2089
2090 2018-12-07 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR target/85593
2093 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
2094 for functions with naked attribute.
2095
2096 2018-12-06 Jakub Jelinek <jakub@redhat.com>
2097
2098 PR target/87598
2099 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
2100 call output_operand_lossage on VOIDmode CONST_INTs. After
2101 output_operand_lossage do return false.
2102
2103 2018-12-05 Jakub Jelinek <jakub@redhat.com>
2104
2105 PR tree-optimization/87360
2106 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
2107 data dependencies, don't return false, just continue.
2108
2109 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2110
2111 PR target/88234
2112 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
2113 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
2114 in unsigned_type_for instead of vector integral type where overflow
2115 doesn't wrap.
2116
2117 2018-11-26 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR c++/86900
2120 * dwarf2out.c (secname_for_decl): For functions with
2121 DECL_SECTION_NAME if in_cold_section_p, try to return
2122 current_function_section's name if it is a named section.
2123
2124 2018-11-22 Jakub Jelinek <jakub@redhat.com>
2125
2126 PR target/85644
2127 PR target/86832
2128 * config/i386/i386.c (ix86_option_override_internal): Default
2129 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
2130 is defined.
2131 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
2132 stack_protect_test, stack_protect_test_<mode>): Use empty condition
2133 instead of TARGET_SSP_TLS_GUARD.
2134
2135 2018-11-20 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR tree-optimization/87895
2138 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
2139 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
2140 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
2141 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
2142 has any preds and always use EDGE_PRED (, 0).
2143
2144 2018-11-19 Jakub Jelinek <jakub@redhat.com>
2145
2146 PR tree-optimization/88071
2147 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2148 of false as last argument to gsi_remove.
2149 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2150 false as last argument to gsi_replace.
2151
2152 PR debug/87039
2153 * omp-expand.c: Don't include debug.h.
2154 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
2155 from innermost outer parallel, task, or target that has a
2156 child_fn set, or, if there is no such outer region, use
2157 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
2158 whether a suitable BLOCK is found or not.
2159 (expand_parallel_call): Don't call adjust_context_and_scope here.
2160 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2161 (expand_omp_taskreg, expand_omp_target): Likewise. Call
2162 adjust_context_and_scope.
2163 * dwarf2out.c (dwarf2out_early_global_decl): For
2164 decl_function_context recurse instead of calling dwarf2out_decl.
2165
2166 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2167
2168 PR rtl-optimization/87475
2169 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2170 CROSSING_JUMP_P insns.
2171 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2172
2173 2018-11-15 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR rtl-optimization/88018
2176 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2177 on the presence of fallthru edge, rather than if it is a USE or not.
2178
2179 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR tree-optimization/87898
2182 * omp-simd-clone.c (ipa_simd_modify_function_body): Remove debug stmts
2183 where the first argument was changed into a non-decl.
2184
2185 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2186
2187 Backport from mainline
2188 2019-01-02 Jan Hubicka <hubicka@ucw.cz>
2189
2190 PR lto/88130
2191 * varpool.c (varpool_node::ctor_useable_for_folding_p): Also return
2192 false at WPA time when body was removed.
2193
2194 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2195
2196 Backport from mainline
2197 2018-08-29 Jan Hubicka <jh@suse.cz>
2198
2199 PR lto/86517
2200 PR lto/88185
2201 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
2202 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2203
2204 2019-01-04 Aaron Sawdey <acsawdey@linux.ibm.com>
2205
2206 Backport from mainline
2207 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2208
2209 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2210 we determine if unaligned vsx is ok.
2211
2212 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2213
2214 Backport from mainline
2215 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
2216
2217 * ipa-utils.c (scale_ipa_profile_for_fn): Break out from ...
2218 (ipa_merge_profiles): ... here; do not ICE on thunks and aliases.
2219
2220 2019-01-03 Martin Liska <mliska@suse.cz>
2221
2222 Backport from mainline
2223 2019-01-01 Jan Hubicka <hubicka@ucw.cz>
2224
2225 * coverage.c (get_coverage_counts): Use current_function_decl.
2226 * profile.c (read_thunk_profile): New function.
2227 (branch_prob): Add THUNK parameter.
2228 * tree-profile.c (tree_profiling): Handle thunks.
2229 * value-prof.c (init_node_map): Handle thunks.
2230 * value-prof.h (branch_prob): Upate prototype.
2231 (read_thunk_profile): Declare.
2232
2233 2019-01-03 Iain Sandoe <iain@sandoe.co.uk>
2234
2235 revert:
2236 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2237
2238 backport from mainline.
2239 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
2240 Iain Sandoe <iain@sandoe.co.uk>
2241
2242 PR target/88343
2243 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
2244 unless it has been used.
2245 (first_reg_to_save): Remove dead code.
2246
2247 2019-01-02 Segher Boessenkool <segher@kernel.crashing.org>
2248
2249 Backport from trunk
2250 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2251
2252 PR inline-asm/55681
2253 * doc/extend.texi (Basic Asm): Update grammar.
2254 (Extended Asm): Update grammar.
2255
2256 Backport from trunk
2257 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2258
2259 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
2260 (Size of an asm): Fix typo. Document asm inline.
2261 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
2262 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
2263 (gimple_asm_set_volatile): Fix typo.
2264 (gimple_asm_inline_p): New.
2265 (gimple_asm_set_inline): New.
2266 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
2267 tree to gimple.
2268 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
2269 gimple_asm_inline_p flag, too.
2270 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
2271 in an ASM_EXPR.
2272 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
2273 a minimum size for an asm.
2274 * tree.h (ASM_INLINE_P): New.
2275
2276 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
2277 Julian Brown <julian@codesourcery.com>
2278
2279 * gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
2280
2281 2018-12-27 Martin Liska <mliska@suse.cz>
2282
2283 Backport from mainline
2284 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
2285
2286 PR ipa/88561
2287 * ipa-polymorphic-call.c
2288 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
2289 arguments of thunks correctly.
2290 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
2291 NULL instance pinter.
2292 * lto-cgraph.c (lto_output_node): Always stream thunk info.
2293
2294 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2295
2296 backport from mainline.
2297 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
2298 Iain Sandoe <iain@sandoe.co.uk>
2299
2300 PR target/88343
2301 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
2302 unless it has been used.
2303 (first_reg_to_save): Remove dead code.
2304
2305 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2306
2307 Backport from mainline
2308 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2309
2310 PR c++/87380
2311 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
2312 default.
2313 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
2314
2315 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2316
2317 Backport from mainline
2318 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2319
2320 PR target/78444
2321 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
2322 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
2323 stack alignment in non-leaf functions.
2324
2325 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
2326
2327 Backport from mainline
2328 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
2329
2330 PR target/88418
2331 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
2332 check operand 1 with vector_operand predicate.
2333 (ix86_expand_sse_movcc): For vector modes, check op_true with
2334 vector_operand, not nonimmediate_operand.
2335
2336 2018-12-19 Bill Schmidt <wschmidt@linux.ibm.com>
2337
2338 Backport from mainline
2339 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
2340
2341 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
2342 Describe when a typedef name can be used as the type specifier for
2343 a vector type, and when it cannot.
2344
2345 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2346
2347 Backport from trunk
2348 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2349
2350 PR target/88213
2351 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
2352 Require TARGET_POWERPC64.
2353
2354 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2355
2356 Backport from trunk
2357 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2358
2359 PR rtl-optimization/88253
2360 * combine.c (combine_simplify_rtx): Test for side-effects before
2361 substituting by zero.
2362
2363 2018-12-15 Segher Boessenkool <segher@kernel.crashing.org>
2364
2365 Backport from trunk
2366 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
2367
2368 PR rtl-optimization/88001
2369 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
2370
2371 2018-12-15 Jan Hubicka <jh@suse.cz>
2372
2373 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
2374 parameters.
2375 (cgraph_build_static_cdtor): Update.
2376 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
2377 callsed.
2378
2379 2018-12-15 Jan Hubicka <jh@suse.cz>
2380
2381 Backport from mainline
2382 2018-11-02 Richard Biener <rguenther@suse.de>
2383
2384 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2385 with is_type_die.
2386
2387 2018-12-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2388
2389 Backport from mainline
2390 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2391
2392 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
2393 behavior.
2394
2395 2018-12-14 Andre Vieira <andre.simoesdiasvieira@arm.com>
2396
2397 Backport from mainline
2398 PR target/88224
2399 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2400 (cortex-r7, cortex-r8): Update fpu and add new configuration.
2401 * doc/invoke.texi (armv7-r): Add two new vfp options.
2402 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2403 support this option.
2404
2405 2018-12-13 H.J. Lu <hongjiu.lu@intel.com>
2406
2407 Backport from mainline
2408 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2409
2410 PR target/87853
2411 * config/i386/emmintrin.h (__v16qs): New to cope with option
2412 -funsigned-char.
2413 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2414 (_mm_cmplt_epi8): Likewise.
2415 (_mm_cmpgt_epi8): Likewise.
2416
2417 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2418
2419 Backport from mainline
2420 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2421
2422 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
2423 s390_vec_double_s64 instead of s390_vcdgb.
2424 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
2425 s390_vcdlgb.
2426
2427 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2428
2429 Backport from mainline
2430 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2431
2432 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
2433 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
2434 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
2435
2436 2018-12-13 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 Backport from mainline
2439 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
2440
2441 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
2442 accounting for STACK_BOUNDARY 128.
2443 (STACK_DYNAMIC_OFFSET): Likewise.
2444
2445 2018-12-12 Peter Bergner <bergner@linux.ibm.com>
2446
2447 Backport from mainline
2448 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
2449
2450 PR target/87496
2451 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2452 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
2453 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
2454 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
2455 require -mlong-double-128.
2456
2457 2018-12-05 Richard Biener <rguenther@suse.de>
2458
2459 Backport from mainline
2460 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2461
2462 PR tree-optimization/87288
2463 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2464 into account when determining PEELING_FOR_NITERS.
2465
2466 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
2467
2468 Backport from mainline
2469 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2470
2471 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2472 emit a diagnostic that it is not supported and reset the option.
2473 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2474 supported and consume the option. (ASM_FINAL_SPEC): New.
2475
2476 2018-12-04 Iain Sandoe <iain@sandoe.co.uk>
2477
2478 Backport from mainline
2479 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2480
2481 PR target/81685
2482 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2483 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2484 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2485
2486 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2487
2488 Backport from mainline
2489 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2490
2491 PR target/87496
2492 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2493 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2494
2495 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2496
2497 Backport from mainline
2498 2018-10-25 Aaron Sawdey <acsawdey@linux.ibm.com>
2499
2500 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2501 a shorter sequence with fewer branches.
2502 (emit_final_str_compare_gpr): Ditto.
2503
2504 Backport from mainline to allow the above code to go in:
2505 2018-06-14 Aaron Sawdey <acsawdey@linux.ibm.com>
2506
2507 * config/rs6000/rs6000-string.c (do_and3, do_and3_mask,
2508 do_cmpb3, do_rotl3): New functions.
2509
2510 2018-11-28 Richard Biener <rguenther@suse.de>
2511
2512 PR tree-optimization/79351
2513 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2514 empty CONSTRUCTORs ensure the store is at a constant position.
2515
2516 2018-11-28 Richard Biener <rguenther@suse.de>
2517
2518 PR tree-optimization/88229
2519 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2520 is an INTEGER_CST before accessing it so.
2521
2522 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2523
2524 Backport from mainline
2525 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
2526
2527 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
2528 DImode parts of the target operand.
2529
2530 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2531
2532 Backport from mainline
2533 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2534
2535 * doc/invoke.texi: Document z14/arch12 -march option.
2536
2537 2018-11-23 Tamar Christina <tamar.christina@arm.com>
2538
2539 Backported from mainline.
2540 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2541
2542 PR target/84711
2543 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2544 (mov<mov>): ..this and enable unconditionally.
2545
2546 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2547
2548 Backport from mainline
2549 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
2550
2551 PR target/88051
2552 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2553 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2554
2555 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
2556
2557 PR rtl-optimization/85925
2558 * rtl.h (word_register_operation_p): New predicate.
2559 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2560 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2561 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
2562 (num_sign_bit_copies1): Likewise.
2563
2564 2018-11-19 Martin Liska <mliska@suse.cz>
2565
2566 PR gcov-profile/88045
2567 * coverage.c (coverage_begin_function): One can't relly on the
2568 fact that function ends on the same line it starts or later.
2569
2570 2018-11-18 Uros Bizjak <ubizjak@gmail.com>
2571
2572 Backport from mainline
2573 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2574
2575 PR target/87928
2576 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2577 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2578 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2579 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2580
2581 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
2582
2583 * tree-switch-conversion.c (emit_case_decision_tree): Pass location
2584 of switch statement to emit_case_nodes.
2585 (do_jump_if_equal): Add LOC parameter and set it on the newly built
2586 GIMPLE comparison statement.
2587 (emit_cmp_and_jump_insns): Likewise.
2588 (emit_case_nodes): Add LOC parameter and pass it to do_jump_if_equal
2589 as well as recursive calls.
2590
2591 2018-11-15 Nathan Sidwell <nathan@acm.org>
2592
2593 PR debug/88006
2594 PR debug/87462
2595 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2596 type list.
2597
2598 2018-11-14 Paul A. Clarke <pc@us.ibm.com>
2599
2600 Backport from mainline
2601 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2602
2603 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2604
2605 Backport from mainline
2606 PR target/85968
2607 * config/arc/arc.c (arc_return_address_register): Fix
2608 if-condition.
2609
2610 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2611
2612 Backport from mainline
2613 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2614 * config/arc/elf.h (PROFILE_HOOK): Define.
2615 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2616
2617 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2618
2619 Backport from mainline
2620 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2621 jump table data in the text section.
2622
2623 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2624
2625 Backport from mainline
2626 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2627 to fit the eh_return pattern.
2628 * config/arc/arc.md (eh_return): Define.
2629 (VUNSPEC_ARC_EH_RETURN): Likewise.
2630 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2631 new implementation.
2632 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2633
2634 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2635
2636 Backport from mainline
2637 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2638
2639 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2640
2641 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2642
2643 Backport from mainline
2644 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2645
2646 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2647
2648 Backport from mainline
2649 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2650
2651 PR middle-end/58372
2652 * cfgexpand.c (pass_expand::execute): Move the call to
2653 finish_eh_generation in front of the call to expand_stack_alignment.
2654
2655 2018-11-07 Max Filippov <jcmvbkbc@gmail.com>
2656
2657 Backport from mainline
2658 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2659
2660 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2661
2662 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2663
2664 PR tree-optimization/87859
2665 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2666 first_nonmergeable_order member.
2667 (merged_store_group::merged_store_group): Initialize them.
2668 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2669 stores with order >= first_nonmergeable_order.
2670 Set merged_store->first_nonmergeable_order if we've skipped any
2671 stores. Attempt to merge overlapping INTEGER_CST stores that
2672 we would otherwise skip.
2673
2674 PR sanitizer/87837
2675 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2676
2677 Backported from mainline
2678 2018-10-20 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR middle-end/87647
2681 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2682
2683 2018-10-19 Jakub Jelinek <jakub@redhat.com>
2684
2685 PR middle-end/85488
2686 PR middle-end/87649
2687 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2688 depend closely nested inside of loop with ordered clause with
2689 a parameter.
2690
2691 2018-10-29 Richard Biener <rguenther@suse.de>
2692
2693 Backport from mainline
2694 2018-09-26 Richard Biener <rguenther@suse.de>
2695
2696 PR debug/87428
2697 PR debug/87362
2698 * tree-inline.c (expand_call_inline): When the location
2699 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2700 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2701 the inserted BLOCK to make inlined_function_outer_scope_p
2702 recognize it.
2703 * dwarf2out.c (add_call_src_coords_attributes): Do not add
2704 coords for reserved locations.
2705
2706 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2707
2708 Backport from mainline
2709 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2710
2711 PR bootstrap/81033
2712 PR target/81733
2713 PR target/52795
2714 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2715 (dwarf2out_switch_text_section): Generate a local label for the second
2716 function sub-section and apply it as the second FDE start label.
2717 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2718 second sub-section start.
2719
2720 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2721
2722 Backport from mainline
2723 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2724
2725 * config/darwin.c
2726 (darwin_function_switched_text_sections): Delete.
2727 * gcc/config/darwin.h
2728 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2729
2730 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2731
2732 backport from mainline.
2733 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2734
2735 PR target/85669
2736 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2737 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2738 (STACK_DYNAMIC_OFFSET): Likewise.
2739
2740 2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
2741
2742 Backport from mainline
2743 2018-10-19 Bill Schmidt <wschmidt@linux.ibm.com>
2744
2745 PR tree-optimization/87473
2746 * gimple-ssa-strength-reduction.c (record_phi_increments_1): For
2747 phi arguments identical to the base expression of the phi
2748 candidate, record a phi-adjust increment of zero minus the index
2749 expression of the hidden basis.
2750 (phi_incr_cost_1): For phi arguments identical to the base
2751 expression of the phi candidate, the difference to compare against
2752 the increment is zero minus the index expression of the hidden
2753 basis, and there is no potential savings from replacing the (phi)
2754 statement.
2755 (ncd_with_phi): For phi arguments identical to the base expression
2756 of the phi candidate, the difference to compare against the
2757 increment is zero minus the index expression of the hidden basis.
2758 (all_phi_incrs_profitable_1): For phi arguments identical to the
2759 base expression of the phi candidate, the increment to be checked
2760 for profitability is zero minus the index expression of the hidden
2761 basis.
2762
2763 2018-10-25 Richard Biener <rguenther@suse.de>
2764
2765 PR tree-optimization/87665
2766 PR tree-optimization/87745
2767 * tree-vectorizer.h (get_earlier_stmt): Remove.
2768 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2769
2770 2018-10-24 Richard Biener <rguenther@suse.de>
2771
2772 PR tree-optimization/87665
2773 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2774 to reflect reality.
2775
2776 2018-10-23 Richard Biener <rguenther@suse.de>
2777
2778 PR tree-optimization/87700
2779 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2780
2781 2018-10-19 Richard Biener <rguenther@suse.de>
2782
2783 PR middle-end/87645
2784 Backport from mainline
2785 2018-07-12 Richard Biener <rguenther@suse.de>
2786
2787 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2788 (vn_lookup_simplify_result): Remove recursion limit applied
2789 here.
2790 (vn_nary_build_or_lookup_1): Adjust.
2791 (try_to_simplify): Likewise.
2792 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2793 here.
2794 (gimple_resimplify2): Likewise.
2795 (gimple_resimplify3): Likewise.
2796 (gimple_resimplify4): Likewise.
2797
2798 2018-10-19 Andreas Krebbel <krebbel@linux.ibm.com>
2799
2800 Backport from mainline
2801 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2802
2803 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2804 into reg if it isn't a general operand.
2805
2806 2018-10-18 Richard Biener <rguenther@suse.de>
2807
2808 PR middle-end/87087
2809 Revert
2810 2018-02-07 Richard Biener <rguenther@suse.de>
2811
2812 PR tree-optimization/84204
2813 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2814 this place.
2815
2816 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2817
2818 PR middle-end/87623
2819 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2820 bail out if both sides do not have the same storage order.
2821
2822 2018-10-17 Richard Biener <rguenther@suse.de>
2823
2824 Backport from mainline
2825 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2826
2827 PR middle-end/63155
2828 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2829 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2830
2831 2018-10-16 Richard Biener <rguenther@suse.de>
2832
2833 Backport from mainline
2834 2018-10-08 Richard Biener <rguenther@suse.de>
2835
2836 PR tree-optimization/63155
2837 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2838 (ssa_propagation_engine::ssa_propagate): Remove redundant
2839 bitmap bit clearing.
2840
2841 2018-10-05 Richard Biener <rguenther@suse.de>
2842
2843 PR tree-optimization/63155
2844 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2845 vertical space in dumpfiles.
2846 * tree-ssa-propagate.h
2847 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2848 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2849 (ssa_edge_worklist_back): Likewise.
2850 (curr_order): Likewise.
2851 (cfg_blocks_get): Remove abstraction.
2852 (cfg_blocks_add): Likewise.
2853 (cfg_blocks_empty_p): Likewise.
2854 (add_ssa_edge): Add to current or next worklist based on
2855 RPO index.
2856 (add_control_edge): Likewise.
2857 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2858 into ...
2859 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2860 iteration from CFG and SSA edge worklist so we process
2861 everything in RPO order, prioritizing forward progress
2862 over iteration.
2863 (ssa_prop_init): Allocate new worklists, do not dump
2864 immediate uses.
2865 (ssa_prop_fini): Free new worklists.
2866
2867 2018-09-24 Richard Biener <rguenther@suse.de>
2868
2869 PR tree-optimization/63155
2870 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2871 the worklist when the edge of the respective argument isn't
2872 executable.
2873
2874 2018-10-16 Wilco Dijkstra <wdijkstr@arm.com>
2875
2876 Backported from mainline
2877 PR target/87511
2878 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2879 Use HOST_WIDE_INT_1U for shift.
2880
2881 2018-10-16 Richard Biener <rguenther@suse.de>
2882
2883 Backport from mainline
2884 2018-09-18 Richard Biener <rguenther@suse.de>
2885
2886 PR middle-end/63155
2887 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2888 (compute_samebase_partition_bases): Likewise.
2889 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2890 (gimple_can_coalesce_p): Simplify.
2891
2892 2018-10-16 Richard Biener <rguenther@suse.de>
2893
2894 Backport from mainline
2895 2018-10-15 Richard Biener <rguenther@suse.de>
2896
2897 PR middle-end/87610
2898 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2899 (visit_loadstore): When a used restrict tag escaped verify that
2900 the points-to solution of "other" pointers do not include
2901 escaped.
2902 (compute_dependence_clique): If a used restrict tag escaped
2903 communicated that down to visit_loadstore.
2904
2905 2018-10-01 Richard Biener <rguenther@suse.de>
2906
2907 PR tree-optimization/87465
2908 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2909 causing branch miscounts.
2910
2911 2018-10-11 Jakub Jelinek <jakub@redhat.com>
2912
2913 Backported from mainline
2914 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2915
2916 PR target/87550
2917 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2918 to special_args set.
2919
2920 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2921
2922 PR target/87414
2923 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2924 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2925 call.
2926
2927 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2928 Andreas Krebbel <krebbel@linux.ibm.com>
2929
2930 PR tree-optimization/86844
2931 * gimple-ssa-store-merging.c
2932 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2933 there are any overlapping stores in between them, make sure they are
2934 also coalesced or we give up completely.
2935
2936 2018-10-09 Will Schmidt <will_schmidt@vnet.ibm.com>
2937
2938 Backport from trunk.
2939 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2940
2941 PR target/86731
2942 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2943 around folding of vec_sl to handle out of range shift values.
2944
2945 2018-10-09 H.J. Lu <hongjiu.lu@intel.com>
2946
2947 Backport from mainline
2948 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2949
2950 PR target/87370
2951 * config/i386/i386.c (construct_container): Use TImode for
2952 BLKmode values in 2 integer registers.
2953
2954 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2955
2956 Backport from mainline
2957 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2958
2959 PR target/87517
2960 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2961 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2962
2963 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2964
2965 Backport from mainline
2966 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2967
2968 PR target/87522
2969 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2970 assembler for -mavx.
2971 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2972
2973 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2974
2975 Backport from mainline
2976 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2977
2978 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2979 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2980
2981 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
2982
2983 PR other/87353
2984 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2985
2986 2018-10-03 Martin Liska <mliska@suse.cz>
2987
2988 Backport from mainline
2989 2018-10-03 Martin Liska <mliska@suse.cz>
2990
2991 PR gcov-profile/86109
2992 * coverage.c (coverage_begin_function): Do not
2993 mark lambdas as artificial.
2994 * tree-core.h (struct GTY): Remove tm_clone_flag
2995 and introduce new lambda_function.
2996 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2997
2998 2018-10-02 H.J. Lu <hongjiu.lu@intel.com>
2999
3000 Backport from mainline
3001 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3002
3003 PR target/82699
3004 * config/i386/i386.c (rest_of_insert_endbranch): Set
3005 endbr_queued_at_entrance to true and don't insert ENDBR if
3006 x86_function_profiler will be called.
3007 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3008 is true.
3009 * config/i386/i386.h (machine_function): Add
3010 endbr_queued_at_entrance.
3011
3012 2018-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3013
3014 Backport from mainline
3015 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3016
3017 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3018 if starting source register is not even.
3019
3020 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3021
3022 PR target/87467
3023 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3024 __m512d type for __A argument rather than __m512.
3025
3026 2018-09-27 Michael Meissner <meissner@linux.ibm.com>
3027
3028 Backport from mainline
3029 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
3030
3031 PR target/87033
3032 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
3033 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
3034 for indexed loads.
3035
3036 2018-09-25 Martin Liska <mliska@suse.cz>
3037
3038 Backport from mainline
3039 2018-09-24 Martin Liska <mliska@suse.cz>
3040
3041 PR sanitizer/85774
3042 * asan.c: Make asan_handled_variables extern.
3043 * asan.h: Likewise.
3044 * cfgexpand.c (expand_stack_vars): Make sure
3045 a representative is unpoison if another
3046 variable in the partition is handled by
3047 use-after-scope sanitization.
3048
3049 2018-09-24 Andrew Pinski <apinski@marvell.com>
3050
3051 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3052 access prev before checking it for NULLness in the
3053 AARCH64_FUSE_CMP_BRANCH case.
3054
3055 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3056
3057 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3058 if the call takes a static chain.
3059
3060 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3061
3062 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3063 (atomic_storehi): Likewise.
3064 (atomic_storesi): Likewise.
3065 (atomic_loaddi): Restore compare and swap exchange loop code.
3066
3067 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3068
3069 Backport from trunk
3070 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3071
3072 PR rtl-optimization/86882
3073 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3074
3075 2018-09-18 Martin Liska <mliska@suse.cz>
3076
3077 Backport from mainline
3078 2018-09-17 Martin Liska <mliska@suse.cz>
3079
3080 PR gcov-profile/85871
3081 * gcov.c (output_intermediate_file): Fix out of bounds
3082 access.
3083
3084 2018-09-16 Hans-Peter Nilsson <hp@bitrange.com>
3085
3086 PR target/85666
3087 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3088 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3089 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3090 leaf_function_p, instead use has_hard_reg_initial_val.
3091
3092 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
3093
3094 PR middle-end/87188
3095 * dojump.c (do_compare_and_jump): Canonicalize function pointers
3096 when one operand is a function pointer. Use POINTER_TYPE_P and
3097 FUNC_OR_METHOD_TYPE_P.
3098 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3099 * fold-const.c (build_range_check): Likewise.
3100 * match.pd (simple_comparison): Likewise.
3101
3102 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
3103
3104 Backport from trunk
3105 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
3106
3107 PR target/87224
3108 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3109 alternatives.
3110
3111 2018-09-14 Carl Love <cel@us.ibm.com>
3112
3113 Backport from trunk
3114 2018-09-14 Carl Love <cel@us.ibm.com>
3115
3116 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3117 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3118
3119 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
3120
3121 Backport from trunk
3122 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
3123
3124 PR target/86989
3125 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
3126 the TOC register.
3127
3128 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
3129
3130 Backport from trunk
3131 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
3132
3133 PR rtl-optimization/86771
3134 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
3135 of two SETs into those two SETs, one to be placed at i2, if that SETs
3136 destination is modified between i2 and i3.
3137
3138 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3139
3140 Backport from mainline
3141 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
3142
3143 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3144 constants.
3145 ("trunc<BFP:mode><DFP_ALL:mode>2")
3146 ("trunc<DFP_ALL:mode><BFP:mode>2")
3147 ("extend<BFP:mode><DFP_ALL:mode>2")
3148 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3149 according to the target operand type.
3150
3151 2018-09-12 Jakub Jelinek <jakub@redhat.com>
3152
3153 PR middle-end/87248
3154 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3155 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
3156
3157 2018-09-05 Nathan Sidwell <nathan@acm.org>
3158
3159 PR c++/87137
3160 * stor-layout.c (place_field): Scan forwards to check last
3161 bitfield when ms_bitfield_placement is in effect.
3162
3163 2018-09-05 Richard Biener <rguenther@suse.de>
3164
3165 PR bootstrap/87225
3166 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3167 return.
3168
3169 2018-09-05 Jakub Jelinek <jakub@redhat.com>
3170
3171 Backported from mainline
3172 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR target/87198
3175 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3176 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3177 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3178 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3179 and OPTION_MASK_ISA_XSAVEC_UNSET.
3180
3181 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3182
3183 PR middle-end/87138
3184 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3185 gen_int_mode. Formatting fixes.
3186
3187 2018-08-11 Jakub Jelinek <jakub@redhat.com>
3188
3189 PR tree-optimization/86835
3190 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
3191 new_stmt after def_gsi, make sure to insert new_square_stmt after
3192 that stmt, not 2 stmts before it.
3193
3194 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3195
3196 Backport from mainline
3197 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3198
3199 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3200 XOR operations in NAND case.
3201
3202 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3203
3204 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3205
3206 2018-09-03 Tom de Vries <tdevries@suse.de>
3207
3208 backport from trunk:
3209 2018-06-21 Tom de Vries <tdevries@suse.de>
3210
3211 PR tree-optimization/85859
3212 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3213 test with comment from bb_no_side_effects_p.
3214
3215 2018-09-01 Michael Matz <matz@suse.de>
3216
3217 Backport from mainline
3218 PR tree-optimization/87074
3219 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3220 PHIs for outer-loop uses.
3221
3222 2018-08-31 Richard Biener <rguenther@suse.de>
3223
3224 Backport from mainline
3225 2018-08-27 Richard Biener <rguenther@suse.de>
3226
3227 PR tree-optimization/86927
3228 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3229 use const cond reduction code.
3230
3231 2018-08-23 Richard Biener <rguenther@suse.de>
3232
3233 PR middle-end/87024
3234 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
3235 calls.
3236
3237 2018-08-22 Richard Biener <rguenther@suse.de>
3238
3239 PR tree-optimization/86945
3240 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
3241
3242 2018-08-17 Richard Biener <rguenther@suse.de>
3243
3244 PR middle-end/86505
3245 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3246 across a va-arg-pack using call adjust its return value accordingly.
3247
3248 2018-08-02 Richard Biener <rguenther@suse.de>
3249
3250 PR tree-optimization/86816
3251 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3252 which checks for value availability before querying it.
3253 (gvn_uses_equal): Use it.
3254 (same_succ_hash): Likewise.
3255 (gimple_equal_p): Likewise.
3256
3257 2018-07-17 Richard Biener <rguenther@suse.de>
3258
3259 PR lto/86456
3260 * dwarf2out.c (init_sections_and_labels): Always generate
3261 a debug_line_str_section for early LTO debug.
3262 (dwarf2out_finish): Reset debug_line_str_hash output early.
3263 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3264 with fat LTO part.
3265 (dwarf2out_early_finish): Output debug_line_str.
3266
3267 2018-08-29 Luis Machado <luis.machado@linaro.org>
3268
3269 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static global.
3270 (qdf24xx_tunings): Set vector cost structure to qdf24xx_vector_cost.
3271
3272 2018-08-29 Luis Machado <luis.machado@linaro.org>
3273
3274 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3275 <register_sextend>: Set to 3.
3276
3277 2018-08-27 Martin Sebor <msebor@redhat.com>
3278
3279 PR tree-optimization/86914
3280 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3281
3282 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3283
3284 PR middle-end/87099
3285 * calls.c (maybe_warn_nonstring_arg): Punt early if
3286 warn_stringop_overflow is zero. Don't call get_range_strlen
3287 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3288 Only use lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3289 increment lenrng[0].
3290
3291 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR rtl-optimization/87065
3294 * combine.c (simplify_if_then_else): Formatting fix.
3295 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3296 check.
3297 (known_cond): Don't return const_true_rtx for vector modes. Use
3298 CONST0_RTX instead of const0_rtx. Formatting fixes.
3299
3300 2018-08-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3301
3302 Backport from mainline
3303 PR target/86662
3304 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3305 with all enabled __intN types.
3306
3307 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3308
3309 2018-08-21 H.J. Lu <hongjiu.lu@intel.com>
3310
3311 Backport from mainline
3312 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
3313
3314 PR target/87014
3315 * config/i386/i386.md (eh_return): Always update EH return
3316 address in word_mode.
3317
3318 2018-08-17 John David Anglin <danglin@gcc.gnu.org>
3319
3320 Backport from mainline
3321 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3322
3323 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3324 Update comment for atomic instructions.
3325 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3326 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3327 Remove.
3328 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3329 load for __ATOMIC_SEQ_CST model.
3330 (atomic_loaddi_1): Remove float register target.
3331 (atomic_storedi): Handle CONST_INT values.
3332 (atomic_storedi_1): Remove float register source. Add special case
3333 for zero value.
3334 (memory_barrier): New expander and insn.
3335
3336 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3337
3338 Backport from mainline
3339 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3340
3341 PR target/86640
3342 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3343 instead of GEN_INT.
3344
3345 2018-08-16 Martin Liska <mliska@suse.cz>
3346
3347 Backport from mainline
3348 2018-08-02 Martin Liska <mliska@suse.cz>
3349
3350 PR gcov-profile/86817
3351 * gcov.c (process_all_functions): New function.
3352 (main): Call it.
3353 (process_file): Move functions processing to
3354 process_all_functions.
3355
3356 2018-08-14 Siddhesh Poyarekar <siddhesh@sourceware.org>
3357
3358 Backport from mainline
3359 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3360
3361 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3362 neon_dup_q to...
3363 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3364
3365 2018-08-13 Liu Hao <lh_mouse@126.com>
3366
3367 Backport from mainline
3368 2018-08-13 Liu Hao <lh_mouse@126.com>
3369
3370 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3371 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3372 and clear it thereafter, as it only works for DBCS.
3373
3374 2018-08-13 Liu Hao <lh_mouse@126.com>
3375
3376 Backport from mainline
3377 2018-08-13 Liu Hao <lh_mouse@126.com>
3378
3379 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3380 handle returned by _get_osf_handle().
3381
3382 2018-08-14 Richard Sandiford <richard.sandiford@arm.com>
3383
3384 Backport from mainline
3385 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3386
3387 PR tree-optimization/86871
3388 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3389 instead of gimple_assign_lhs.
3390
3391 2018-08-07 H.J. Lu <hongjiu.lu@intel.com>
3392
3393 Backport from mainline
3394 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3395
3396 PR target/86386
3397 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3398 cfun->machine->max_used_stack_alignment if needed.
3399
3400 2018-08-02 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3401
3402 Backport from mainline
3403 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3404
3405 PR middle-end/86705
3406 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3407 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3408 requested variable alignment.
3409 (expand_one_ssa_partition): Likewise.
3410 (expand_one_var): Likewise.
3411
3412 2018-08-02 Andreas Schwab <schwab@linux-m68k.org>
3413
3414 Backport from mainline
3415 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3416
3417 PR target/86820
3418 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3419 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3420
3421 2018-08-01 Richard Biener <rguenther@suse.de>
3422
3423 PR bootstrap/86724
3424 * graphite.h: Include isl/id.h and isl/space.h to allow build
3425 with ISL 0.20.
3426
3427 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3428
3429 PR target/86651
3430 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3431 mode for COFF targets.
3432 * defaults.h (TARGET_COFF): Define.
3433 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3434 TARGET_COFF): Define.
3435 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3436 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3437 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3438
3439 2018-07-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3440
3441 Backport from mainline
3442 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3443
3444 PR c/86617
3445 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3446
3447 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3448
3449 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3450 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3451 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3452
3453 2018-07-26 Uros Bizjak <ubizjak@gmail.com>
3454
3455 Backport from mainline
3456 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3457
3458 PR target/86511
3459 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3460 conditional move when trapping comparison was split to a
3461 non-trapping one (and vice versa).
3462
3463 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3464
3465 Backported from mainline
3466 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3467
3468 PR middle-end/86627
3469 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3470 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3471 and abs_d == d, do the power of two handling if profitable.
3472
3473 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3474
3475 PR middle-end/86542
3476 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3477 to _looptemp_ clauses, other than the first two.
3478
3479 PR middle-end/86539
3480 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3481 and cond temporaries don't have reference type if iterator has
3482 pointer type. For init use &for_pre_body instead of pre_p if
3483 for_pre_body is non-empty.
3484
3485 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3486
3487 PR middle-end/86660
3488 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3489 declare target to variables if they have always,{to,from,tofrom} map
3490 kinds.
3491
3492 * BASE-VER: Set to 8.2.1.
3493
3494 2018-07-26 Release Manager
3495
3496 * GCC 8.2.0 released.
3497
3498 2018-07-18 Martin Sebor <msebor@redhat.com>
3499
3500 PR middle-end/85602
3501 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3502 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3503 Handle integer subtraction.
3504 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3505 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3506 * doc/invoke.texi (-Wstringop-truncation): Update.
3507
3508 gcc/testsuite/ChangeLog:
3509
3510 2018-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3511
3512 Backport from mainline
3513 2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
3514
3515 * config/arc/arc-protos.h (arc_pad_return): Remove.
3516 * config/arc/arc.c (machine_function): Remove force_short_suffix
3517 and size_reason.
3518 (arc_print_operand): Adjust printing of '&'.
3519 (arc_verify_short): Remove conditional printing of short suffix.
3520 (arc_final_prescan_insn): Remove reference to size_reason.
3521 (pad_return): New function.
3522 (arc_reorg): Call pad_return.
3523 (arc_pad_return): Remove.
3524 (arc_init_machine_status): Remove reference to force_short_suffix.
3525 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3526 (attr length): When attribute iscompact is true force to 2
3527 regardless; in the case of maybe check if we want to force the
3528 instruction to have 4 bytes length.
3529 (nopv): Change it to generate 4 byte long nop as well.
3530 (blockage): New pattern.
3531 (simple_return): Remove call to arc_pad_return.
3532 (p_return_i): Likewise.
3533
3534 2018-07-19 Richard Biener <rguenther@suse.de>
3535
3536 Backport from mainline
3537 2018-07-13 Richard Biener <rguenther@suse.de>
3538
3539 PR debug/86452
3540 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3541 instead of get_context_die.
3542
3543 2018-07-11 Richard Biener <rguenther@suse.de>
3544
3545 PR debug/86457
3546 * dwarf2out.c (init_sections_and_labels): Use
3547 output_asm_line_debug_info consistently.
3548 (dwarf2out_early_finish): Likewise.
3549 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3550 type units.
3551
3552 2018-07-16 Richard Biener <rguenther@suse.de>
3553
3554 Backport from mainline
3555 2018-07-13 Richard Biener <rguenther@suse.de>
3556
3557 PR middle-end/85974
3558 * match.pd (addr1 - addr2): Allow either of the operand to
3559 have a conversion.
3560
3561 2018-06-15 Richard Biener <rguenther@suse.de>
3562
3563 PR middle-end/86076
3564 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3565 before adjusting their block.
3566
3567 2018-06-06 Richard Biener <rguenther@suse.de>
3568
3569 PR tree-optimization/85935
3570 * graphite-scop-detection.c (find_params_in_bb): Analyze
3571 condition operands with respect to the correct loop. Assert
3572 the analysis doesn't fail.
3573
3574 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3575
3576 PR tree-optimization/86514
3577 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3578 conversion to a boolean type from a type with greater precision.
3579
3580 2018-07-15 Bill Schmidt <wschmidt@linux.ibm.com>
3581
3582 Backport from mainline
3583 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3584 Steve Munroe <munroesj52@gmail.com>
3585
3586 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3587 (_mm_andnot_si128): Likewise.
3588 (_mm_or_si128): Likewise.
3589 (_mm_xor_si128): Likewise.
3590
3591 2018-07-14 Martin Sebor <msebor@redhat.com>
3592
3593 PR tree-optimization/86274
3594 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3595 precondition.
3596 (format_floating): Correct handling of infinities and NaNs.
3597
3598 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3599
3600 Backport from mainline
3601 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3602 Sunil K Pandey <sunil.k.pandey@intel.com>
3603
3604 PR target/84413
3605 * config/i386/i386.c (m_CORE_AVX512): New.
3606 (m_CORE_AVX2): Likewise.
3607 (m_CORE_ALL): Add m_CORE_AVX2.
3608 * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2.
3609 Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal
3610 and remove the rest of m_SKYLAKE_AVX512.
3611
3612 2018-07-13 Marek Polacek <polacek@redhat.com>
3613
3614 Backport from trunk
3615 2018-07-03 Marek Polacek <polacek@redhat.com>
3616
3617 PR middle-end/86202
3618 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3619
3620 2018-07-12 Richard Biener <rguenther@suse.de>
3621
3622 PR target/84829
3623 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3624 Remove -mieee-fp handling.
3625
3626 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR tree-optimization/86492
3629 * gimple-ssa-store-merging.c
3630 (imm_store_chain_info::coalesce_immediate_stores): Call
3631 check_no_overlap even for the merge_overlapping case.
3632
3633 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3634
3635 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3636 Use __mmask64 type instead of __mmask8 for __M argument.
3637 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3638 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3639 __U argument.
3640 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3641 __mmask16 for __M argument.
3642 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3643 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3644 to __mmask16 instead of __mmask8.
3645 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3646 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3647 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3648 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3649 instead of __mmask16 for __U argument.
3650 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3651 __mmask16 instead of __mmask8 for __U argument.
3652 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3653 __U argument.
3654 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3655 __mmask16.
3656 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3657 argument.
3658 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3659 __U argument.
3660 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3661 __mmask16.
3662 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3663 of __mmask16.
3664 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3665 __U argument.
3666 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3667 __U argument.
3668 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3669 __U argument.
3670 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3671 __U argument.
3672 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3673 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3674 return type as well as __M argument type and all casts from __mmask8
3675 to __mmask32.
3676 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3677 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3678 return type as well as __M argument type and all casts from __mmask8
3679 to __mmask16.
3680 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3681 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3682 return type as well as __M argument type and all casts from __mmask8
3683 to __mmask32.
3684 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3685 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3686 return type as well as __M argument type and all casts from __mmask8
3687 to __mmask16.
3688 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3689 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3690 __mmask16.
3691
3692 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3693
3694 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3695 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3696 for __U argument.
3697
3698 2018-07-05 Martin Sebor <msebor@redhat.com>
3699
3700 PR c++/86400
3701 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3702 than its domain to compute its the upper bound of a char array.
3703
3704 2018-07-03 Carl Love <cel@us.ibm.com>
3705
3706 Backport from trunk
3707 2018-07-03 Carl Love <cel@us.ibm.com>
3708
3709 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3710 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3711 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3712 VSX_BUILTIN_DOUBLEL_V4SF.
3713
3714 2018-07-04 Luis Machado <luis.machado@linaro.org>
3715
3716 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3717 global.
3718 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3719
3720 2018-07-02 Segher Boessenkool <segher@kernel.crashing.org>
3721
3722 Backport from trunk
3723 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3724
3725 PR target/86285
3726 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3727 ieee128_float_type_node to long_double_type_node unless
3728 TARGET_LONG_DOUBLE_128 is set.
3729
3730 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3731
3732 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3733 -fno-omit-frame-pointer when not optimizing.
3734
3735 2018-06-30 Alexandre Oliva <aoliva@redhat.com>
3736
3737 PR debug/86064
3738 * dwarf2out.c (loc_list_has_views): Adjust comments.
3739 (dw_loc_list): Split single cross-partition range with
3740 nonzero locview.
3741
3742 2018-06-29 Kelvin Nilsen <kelvin@gcc.gnu.org>
3743
3744 Backport from mainline
3745 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3746
3747 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3748 behavior of vec_pack (vector double, vector double) to match
3749 behavior of vec_float2 (vector double, vector double).
3750
3751 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3752
3753 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3754
3755 2018-06-28 Kelvin Nilsen <kelvin@gcc.gnu.org>
3756
3757 Backport from mainline
3758 2017-05-23 Segher Boessenkool <segher@kernel.crashing.org>
3759
3760 * doc/sourcebuild.texi (Endianness): New subsubsection.
3761
3762 2018-06-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3763
3764 Backport from mainline
3765 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3766
3767 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3768 behavior of vec_packsu (vector unsigned long long, vector unsigned
3769 long long) to match behavior of vec_packs with same signature.
3770
3771 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3772
3773 Backport from trunk
3774 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3775
3776 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3777 unaligned vsx for 16B memset.
3778
3779 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3780
3781 Backport from trunk
3782 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3783
3784 PR target/86222
3785 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3786 correctly.
3787
3788 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3789
3790 Backport from trunk
3791 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3792
3793 PR rtl-optimization/85645
3794 * regrename.c (build_def_use): Also kill the chains that include the
3795 destination of a REG_CFA_REGISTER note.
3796
3797 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3798
3799 Backport from trunk
3800 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3801
3802 PR rtl-optimization/85645
3803 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3804 insn that has a REG_CFA_REGISTER note.
3805
3806 2018-06-26 Robin Dapp <rdapp@linux.ibm.com>
3807
3808 * config/s390/s390.h (enum processor_flags): Do not use
3809 default tune parameter when -march was specified.
3810
3811 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3812
3813 PR target/86314
3814 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3815 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3816 operands.
3817
3818 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3819
3820 Back port from trunk
3821 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3822
3823 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3824 added IEEE/IBM long double multilib support on PowerPC little
3825 endian Linux systems.
3826 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3827 (MULTILIB_DEFAULTS): Likewise.
3828 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3829 Likewise.
3830 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3831 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3832 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3833
3834 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3835
3836 Backport from trunk
3837 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
3838
3839 * config/rs6000/rs6000.md (abs<mode>2): Handle IFmode.
3840
3841 2018-05-02 Jan Hubicka <jh@suse.cz>
3842
3843 Backport from mainline
3844 2018-04-30 Jan Hubicka <jh@suse.cz>
3845
3846 * lto-wrapper.c (ltrans_priorities): New static var.
3847 (cmp_priority): New.
3848 (run_gcc): Read priorities and if doing parallel build order
3849 the Makefile by them.
3850
3851 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3852
3853 Backport from trunk
3854 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3855
3856 PR target/86197
3857 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3858 ieee128 argument takes up only one (vector) register, not two (floating
3859 point) registers.
3860
3861 2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
3862
3863 PR tree-optimization/85989
3864 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3865 variable.
3866 (backprop::intersect_uses): Check it when deciding whether this
3867 is a backedge reference.
3868 (backprop::process_block): Add each phi to m_visited_phis
3869 after visiting it, then clear it at the end.
3870
3871 2018-06-22 David Edelsohn <dje.gcc@gmail.com>
3872
3873 Backport from mainline
3874
3875 2018-06-19 Tony Reix <tony.reix@atos.com>
3876 Damien Bergamini <damien.bergamini@atos.com>
3877 David Edelsohn <dje.gcc@gmail.com>
3878
3879 * collect2.c (static_obj): New variable.
3880 (static_libs): New variable.
3881 (is_in_list): Uncomment declaration.
3882 (main): Track AIX libraries linked statically.
3883 (is_in_list): Uncomment definition.
3884 (scan_prog_file): Don't add AIX shared libraries initializer
3885 to constructor list if linking statically.
3886
3887 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3888
3889 Back port from trunk
3890 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3891
3892 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3893 conversion insn that shows up when pr85657-3.c is compiled using
3894 IEEE 128-bit long double.
3895
3896 Back port from trunk
3897 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3898
3899 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3900 multiply and divide external functions from being created more
3901 than once.
3902
3903 Back port from trunk
3904 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3905
3906 * config/rs6000/rs6000.md (neg<mode>2_internal): Use the correct
3907 mode to check whether the mode is IBM extended.
3908
3909 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3910
3911 PR target/85358
3912 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3913 floating point modes, so that IFmode is numerically greater than
3914 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3915 to declare the ordering. This prevents IFmode from being
3916 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3917 machine. Include rs6000-modes.h to share the fractional values
3918 between genmodes* and the rest of the compiler.
3919 (IFmode): Likewise.
3920 (KFmode): Likewise.
3921 (TFmode): Likewise.
3922 * config/rs6000/rs6000-modes.h: New file.
3923 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3924 meaning of rs6000_long_double_size so that 126..128 selects an
3925 appropriate 128-bit floating point type.
3926 (rs6000_option_override_internal): Likewise.
3927 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3928 (TARGET_LONG_DOUBLE_128): Change the meaning of
3929 rs6000_long_double_size so that 126..128 selects an appropriate
3930 128-bit floating point type.
3931 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3932 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3933 source and destination to match the standard usage.
3934 (truncifkf2): Likewise.
3935 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3936 ISA 2.07 to use an explicit clobber, instead of passing in a
3937 temporary.
3938 (copysign<mode>3_soft): Likewise.
3939
3940 Back port from trunk
3941 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3942
3943 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3944 TARGET_ELF.
3945
3946 Back port from trunk
3947 2018-06-04 Michael Meissner <meissner@linux.ibm.com>
3948
3949 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3950 track if we pass or return IEEE 128-bit floating point.
3951 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3952 C++ mangling that is compatible with GCC 8.1.
3953 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3954 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3955 floating point types.
3956 (rs6000_function_arg_advance_1): Likewise.
3957 (rs6000_mangle_type): Optionally generate mangled names that match
3958 what GCC 8.1 generated for IEEE 128-bit floating point types.
3959 (rs6000_globalize_decl_name): If we have an external function that
3960 passes or returns IEEE 128-bit types, generate a weak reference
3961 from the mangled name used in GCC 8.1 to the current mangled
3962 name.
3963 (rs6000_init_builtins): Make __ibm128 use the long double type if
3964 long double is IBM extended double. Make __float128 use the long
3965 double type if long double is IEEE 128-bit.
3966
3967 PR target/85657
3968 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3969 macro for __ibm128 built-in functions.
3970 (PACK_IF): Add __ibm128 pack/unpack functions.
3971 (UNPACK_IF): Likewise.
3972 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3973 enable long double built-in functions if long double is IEEE
3974 128-bit floating point.
3975 (rs6000_invalid_builtin): Update long double built-in function
3976 error message.
3977 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3978 functions, adjust the built-in function to use the long double
3979 built-in function if __ibm128 and long double are the same type.
3980 * doc/extend.texi (PowerPC builtins): Update documention for
3981 __builtin_{,un}pack_longdouble. Add documentation for
3982 __builtin_{,un}pack_ibm128.
3983
3984 Back port from trunk
3985 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
3986
3987 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3988 the 128-bit floating point types. Fix function comment.
3989
3990 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3991
3992 Back port from trunk
3993 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
3994
3995 PR target/85657
3996 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
3997 define __ibm128 as long double.
3998 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
3999 as a distinct type with IEEE 128-bit floating point is supported.
4000 (init_float128_ieee): Fix up conversions between IFmode and IEEE
4001 128-bit types to use the correct functions.
4002 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4003 convert between 128-bit floating point types that have different
4004 modes but the same representation, instead of using gen_lowpart to
4005 makean alias.
4006 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4007 KFmode.
4008 (IFKF_reg): New attributes to give the register constraints for
4009 IFmode and KFmode.
4010 (extend<mode>tf2_internal): New insns to mark an explicit
4011 conversion between 128-bit floating point types that have a
4012 different mode but share the same representation.
4013
4014 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4015
4016 PR target/85994
4017 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4018 -x assembler-with-cpp.
4019
4020 2018-06-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
4021
4022 Backported from mainline
4023 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4024
4025 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4026 multilibs for *-*-rtems*.
4027 * config/riscv/t-rtems: New file.
4028
4029 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4030
4031 Backported from mainline
4032 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4033
4034 PR rtl-optimization/86108
4035 * bb-reorder.c (create_forwarder_block): Renamed to ...
4036 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4037 jump from new landing pad to the second part.
4038 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4039 Adjust callers.
4040
4041 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4042
4043 PR debug/86194
4044 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4045 be narrowed.
4046
4047 PR tree-optimization/86231
4048 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4049 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4050
4051 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4052
4053 Backport from mainline
4054 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4055
4056 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4057 constant.
4058 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4059
4060 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4061
4062 * gimplify.c (gimplify_init_constructor): Really never clear for an
4063 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4064
4065 2018-06-18 Martin Sebor <msebor@redhat.com>
4066
4067 PR c/82063
4068 * calls.c (alloc_max_size): Correct a logic error/typo.
4069 Treat excessive arguments as infinite. Warn for invalid arguments.
4070 * doc/invoke.texi (-Walloc-size-larger-than): Update.
4071
4072 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4073
4074 PR middle-end/86095
4075 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4076 documented as preserved for backward compatibility only.
4077 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4078
4079 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4080
4081 PR middle-end/85878
4082 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4083 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4084 Only call store_expr for halves if the mode is the same.
4085
4086 PR middle-end/86123
4087 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4088 Fix up comment formatting.
4089
4090 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR middle-end/86122
4093 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4094 unsigned_type_for returns NULL.
4095
4096 PR target/85945
4097 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4098 subregs of multi-word pseudos unless the float mode has word size.
4099
4100 2018-06-14 Richard Biener <rguenther@suse.de>
4101
4102 PR middle-end/86139
4103 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4104 duplicate and harmful type_hash_canon.
4105 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4106
4107 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4108
4109 Backport from mainline
4110 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4111
4112 * config/rtems.h (STDINT_LONG32): Define.
4113
4114 2018-05-05 Roland McGrath <mcgrathr@google.com>
4115
4116 PR other/77609
4117 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
4118 any section for which we don't know a specific type it should have,
4119 regardless of name. Previously this was done only for the exact
4120 names ".init_array", ".fini_array", and ".preinit_array".
4121 (default_elf_asm_named_section): Add comment about
4122 relationship with default_section_type_flags and SECTION_NOTYPE.
4123 (get_section): Don't consider it a type conflict if one side has
4124 SECTION_NOTYPE and the other doesn't, as long as neither has the
4125 SECTION_BSS et al used in the default_section_type_flags logic.
4126
4127 2018-06-13 Martin Sebor <msebor@redhat.com>
4128
4129 PR tree-optimization/86114
4130 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4131 of integer types.
4132 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4133
4134 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4135
4136 PR target/86048
4137 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4138 offsets for register save directives. Emit a second batch of save
4139 directives, if need be, when the function accesses prior frames.
4140
4141 2018-06-11 Jason Merrill <jason@redhat.com>
4142
4143 PR c++/80485 - inline function non-zero address.
4144 * symtab.c (nonzero_address): Check DECL_COMDAT.
4145
4146 2018-06-11 Peter Bergner <bergner@vnet.ibm.com>
4147
4148 Backport from mainline
4149 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4150
4151 PR target/85755
4152 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4153 addresses.
4154
4155 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4156
4157 Backport from trunk
4158 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4159
4160 PR target/85755
4161 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4162 on the correct operand.
4163 (*movdi_internal64): Ditto.
4164
4165 2018-06-08 Carl Love <cel@us.ibm.com>
4166
4167 Backport from mainline
4168 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4169 vextract_fp_from_shortl): Add BE support.
4170
4171 2018-06-08 Carl Love <cel@us.ibm.com>
4172
4173 Backport from mainline
4174 * gcc/config/rs6000/vsx.md (first_match_index_<mode>):
4175 Calculate index using natureal element order.
4176 (first_match_or_eos_index_<mode>):
4177 Calculate index using natural element order.
4178 (first_match_index_<mode>):
4179 Calculate index using natural element order.
4180 (first_match_or_eos_index_<mode>):
4181 Calculate index using natural order.
4182 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4183 for BE and LE modes.
4184 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4185 P9V_BUILTIN_VCLZLSBB_V16QI.
4186 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4187 specific.
4188
4189 2018-06-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4190
4191 Backport from mainline
4192 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4193
4194 PR target/81497
4195 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4196 qualifier_void_pointer and qualifier_const_void_pointer.
4197 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4198 (arm_init_builtins): Handle the above.
4199 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4200 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4201 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4202 void intrinsics.
4203
4204 2018-06-07 Uros Bizjak <ubizjak@gmail.com>
4205
4206 PR target/85684
4207 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
4208 Generate SImode target register for null target.
4209 <case IX86_BUILTIN_XGETBV>: Ditto.
4210 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
4211 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
4212
4213 2018-06-07 Peter Bergner <bergner@vnet.ibm.com>
4214
4215 Backport from mainline
4216 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
4217
4218 PR target/63177
4219 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4220 Don't handle -mcpu=power8 if -mpower9-vector is also used.
4221
4222 2018-06-06 Richard Biener <rguenther@suse.de>
4223
4224 Backport from mainline
4225 2018-06-04 Richard Biener <rguenther@suse.de>
4226
4227 PR tree-optimization/86038
4228 * tracer.c (find_best_successor): Check probability for
4229 being initialized, bail out if not.
4230
4231 2018-05-30 Richard Biener <rguenther@suse.de>
4232
4233 PR tree-optimization/85964
4234 * tracer.c (better_p): Drop initialized count check, we only
4235 call the function with initialized counts now.
4236 (find_best_successor): Do find a best edge if one
4237 has uninitialized count.
4238 (find_best_predecessor): Likewise. Do BB frequency check only
4239 if count is initialized.
4240
4241 2018-05-28 Richard Biener <rguenther@suse.de>
4242
4243 PR tree-optimization/85934
4244 * tree-vect-generic.c (expand_vector_operations_1): Hoist
4245 vector boolean check before scalar optimization.
4246
4247 2018-05-22 Richard Biener <rguenther@suse.de>
4248
4249 PR tree-optimization/85863
4250 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4251 comparisons when vectype is specified.
4252 (vectorizable_condition): Do not specify vectype for
4253 vect_is_simple_cond when SLP vectorizing.
4254
4255 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4256
4257 Backport from mainline
4258 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4259
4260 * config/s390/s390-builtin-types.def: Add void function type.
4261 * config/s390/s390-builtins.def: Use the function type for the
4262 tbeginc builtin.
4263
4264 2018-06-04 Martin Sebor <msebor@redhat.com>
4265
4266 PR c/85623
4267 * calls.c (maybe_warn_nonstring_arg): Use string length to set
4268 or ajust the presumed bound on an operation to avoid unnecessary
4269 warnings.
4270
4271 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4272
4273 PR target/86003
4274 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4275 of bits to ignore when comparing architectures.
4276
4277 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4278
4279 PR c++/86025
4280 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4281
4282 2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
4283
4284 PR tree-optimization/85712
4285 Backport from mainline:
4286 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
4287
4288 PR tree-optimization/85712
4289 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4290 first_interp field.
4291 (alloc_cand_and_find_basis): Initialize first_interp field.
4292 (slsr_process_mul): Modify first_interp field.
4293 (slsr_process_add): Likewise.
4294 (slsr_process_cast): Modify first_interp field for each new
4295 interpretation.
4296 (slsr_process_copy): Likewise.
4297 (dump_candidate): Dump first_interp field.
4298 (replace_mult_candidate): Process all interpretations, not just
4299 subsequent ones.
4300 (replace_rhs_if_not_dup): Likewise.
4301 (replace_one_candidate): Likewise.
4302
4303 Backport from mainline:
4304 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4305
4306 PR tree-optimization/85712
4307 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4308 this candidate has already been replaced in-situ by a copy.
4309
4310 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4311
4312 PR target/85950
4313 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4314 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4315 sequence.
4316 (sse4_1_round<mode>2): Use nonimmediate_operand
4317 for operand 1 predicate.
4318
4319 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4320
4321 PR target/85984
4322 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4323 functions with naked attribute.
4324
4325 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4326
4327 PR target/85829
4328 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4329 and movx for Haswell.
4330
4331 2018-05-30 Jakub Jelinek <jakub@redhat.com>
4332
4333 Backported from mainline
4334 2018-05-14 Jakub Jelinek <jakub@redhat.com>
4335
4336 PR target/85756
4337 * config/i386/i386.md: Disallow non-commutative arithmetics in
4338 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4339 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
4340 in the peephole2 before it.
4341
4342 2018-05-08 Jakub Jelinek <jakub@redhat.com>
4343
4344 PR target/85683
4345 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
4346 after cmpelim optimization.
4347
4348 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
4349
4350 Backport from mainline
4351 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
4352
4353 PR target/85900
4354 PR target/85345
4355 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4356
4357 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4358
4359 PR target/85900
4360 PR target/85345
4361 * varasm.c (assemble_alias): Check ifunc_resolver only on
4362 FUNCTION_DECL.
4363
4364 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4365
4366 PR target/85345
4367 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4368 attribute.
4369 (cgraph_node::create_alias): Likewise.
4370 (cgraph_node::get_availability): Check ifunc_resolver instead
4371 of looking up ifunc attribute.
4372 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4373 * varasm.c (do_assemble_alias): Likewise.
4374 (assemble_alias): Likewise.
4375 (default_binds_local_p_3): Likewise.
4376 * cgraph.h (cgraph_node): Add ifunc_resolver.
4377 (cgraph_node::only_called_directly_or_aliased_p): Return false
4378 for IFUNC resolver.
4379 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4380 attribute.
4381 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4382 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4383 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4384 instead of looking up ifunc attribute.
4385
4386 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4387
4388 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4389
4390 2018-05-25 Richard Biener <rguenther@suse.de>
4391
4392 PR c++/85912
4393 * tree-dump.c (dequeue_and_dump): Remove access to removed
4394 operand 2 of a SWITCH_EXPR.
4395
4396 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4397
4398 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4399 Add {q} suffix to insn mnemonic.
4400
4401 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4402
4403 PR target/85903
4404 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4405 when memory input operand is handled.
4406
4407 2018-05-23 Bin Cheng <bin.cheng@arm.com>
4408
4409 Backport from mainline
4410 2018-05-17 Bin Cheng <bin.cheng@arm.com>
4411 Richard Biener <rguenther@suse.de>
4412
4413 PR tree-optimization/85793
4414 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4415 for VMAT_ELEMENTWISE.
4416
4417 2018-05-23 Richard Biener <rguenther@suse.de>
4418
4419 PR middle-end/85874
4420 * tree-data-ref.c (create_runtime_alias_checks): Defer
4421 and ignore overflow warnings.
4422
4423 2018-05-23 Martin Liska <mliska@suse.cz>
4424
4425 Backport from mainline
4426 2018-05-23 Yury Gribov <tetra2005@gmail.com>
4427
4428 PR tree-optimization/85822
4429 * tree-vrp.c (is_masked_range_test): Fix handling of negative
4430 constants.
4431
4432 2018-05-23 Martin Liska <mliska@suse.cz>
4433
4434 Backport from mainline
4435 2018-05-11 Martin Liska <mliska@suse.cz>
4436
4437 PR sanitizer/85556
4438 * doc/extend.texi: Document LLVM style format for no_sanitize
4439 attribute.
4440
4441 2018-05-22 Martin Sebor <msebor@redhat.com>
4442
4443 PR middle-end/85643
4444 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4445
4446 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
4447
4448 PR tree-optimization/85814
4449 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4450 a null return from get_strinfo when unsharing the next
4451 strinfo in the chain.
4452
4453 2018-05-21 Pat Haugen <pthaugen@us.ibm.com>
4454
4455 Backport from mainline
4456 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
4457 Segher Boessenkool <segher@kernel.crashing.org>
4458
4459 PR target/85698
4460 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest operand.
4461
4462 2018-05-18 Toon Moene <toon@moene.org>
4463
4464 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4465 directly after that of -floop-interchange. Indicate that both
4466 options are enabled by default when specifying -O3.
4467
4468 2018-05-11 Martin Jambor <mjambor@suse.cz>
4469
4470 PR ipa/85655
4471 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
4472 single const.
4473
4474 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4475
4476 PR target/85733
4477 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
4478
4479 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4480
4481 PR target/85606
4482 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
4483 equivalent.
4484 (cortex-m0): Use armv6s-m isa.
4485 (cortex-m0plus): Likewise.
4486 (cortex-m1): Likewise.
4487 (cortex-m0.small-multiply): Likewise.
4488 (cortex-m0plus.small-multiply): Likewise.
4489 (cortex-m1.small-multiply): Likewise.
4490
4491 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
4492
4493 PR rtl-optimization/85638
4494 * bb-reorder.c: Include common/common-target.h.
4495 (create_forwarder_block): New function extracted from...
4496 (fix_up_crossing_landing_pad): ...here. Rename into...
4497 (dw2_fix_up_crossing_landing_pad): ...this.
4498 (sjlj_fix_up_crossing_landing_pad): New function.
4499 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
4500 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
4501 from both partitions and exit the loop after one iteration.
4502
4503 2018-05-08 Richard Biener <rguenther@suse.de>
4504
4505 Backport from mainline
4506 2018-05-04 Richard Biener <rguenther@suse.de>
4507
4508 PR middle-end/85588
4509 * fold-const.c (negate_expr_p): Restrict negation of operand
4510 zero of a division to when we know that can happen without
4511 overflow.
4512 (fold_negate_expr_1): Likewise.
4513
4514 2018-05-03 Richard Biener <rguenther@suse.de>
4515
4516 PR tree-optimization/85615
4517 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4518 to loops not nested in BBs loop father to avoid creating multi-entry
4519 loops.
4520
4521 2018-05-02 Richard Biener <rguenther@suse.de>
4522
4523 PR middle-end/85567
4524 * gimplify.c (gimplify_save_expr): When in SSA form allow
4525 SAVE_EXPRs to compute to SSA vars.
4526
4527 2018-05-02 Richard Biener <rguenther@suse.de>
4528
4529 PR tree-optimization/85597
4530 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4531 do not use split vect_get_vec_defs call but call vect_get_slp_defs
4532 directly.
4533
4534 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
4535
4536 PR target/85658
4537 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
4538 (check_arch): Likewise.
4539 (check_fpu): Return the result rather than printing it.
4540 (end arch): Fix operator precedence.
4541 (end cpu): Likewise.
4542 (END): Print the result from check_fpu.
4543
4544 2018-05-08 Richard Biener <rguenther@suse.de>
4545
4546 Backport from mainline
4547 2018-05-04 Richard Biener <rguenther@suse.de>
4548
4549 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
4550 * gimple-ssa-store-merging.c
4551 (imm_store_chain_info::output_merged_store): Remove redundant create,
4552 release split_store vector contents on failure.
4553 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
4554 scalar stmt vector on cache hit.
4555
4556 2018-05-04 Richard Biener <rguenther@suse.de>
4557
4558 PR middle-end/85627
4559 * tree-complex.c (tree_lower_complex): Handle removed blocks.
4560
4561 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4562
4563 Backport from mainline.
4564 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4565
4566 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4567 GET_MODE_MASK before any checking.
4568 (nds32_can_use_bset_p): Likewise.
4569 (nds32_can_use_btgl_p): Likewise.
4570
4571 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4572
4573 Backport from mainline.
4574 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4575
4576 * config/nds32/nds32-doubleword.md: New define_split pattern for
4577 illegal register number.
4578
4579 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4580
4581 Backport from mainline.
4582 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4583
4584 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4585
4586 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4587
4588 Backport from mainline.
4589 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4590
4591 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4592
4593 2018-05-06 Jakub Jelinek <jakub@redhat.com>
4594
4595 PR c++/85659
4596 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
4597 the type is addressable. Don't force op into register if it has
4598 BLKmode.
4599
4600 2018-05-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4601
4602 Backport from trunk.
4603 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4604
4605 PR target/85512
4606 * config/aarch64/constraints.md (Usg): Limit to 31.
4607 (Usj): Limit to 63.
4608
4609 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4610
4611 * BASE-VER: Set to 8.1.1.
4612
4613 2018-05-02 Release Manager
4614
4615 * GCC 8.1.0 released.
4616
4617 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
4618
4619 PR tree-optimization/85586
4620 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4621 exit early for statements in the same group if the accesses are
4622 not strided.
4623
4624 2018-05-01 Jakub Jelinek <jakub@redhat.com>
4625
4626 PR web/85578
4627 * doc/install.texi2html: Replace _002d with - and _002a with * in
4628 generated html files using sed.
4629
4630 2018-04-27 Martin Jambor <mjambor@suse.cz>
4631
4632 PR ipa/85549
4633 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4634 the jump function allows for passing through aggregate values.
4635
4636 2018-04-27 Jeff Law <law@redhat.com>
4637
4638 * config.gcc: Mark tile* targets as deprecated/obsolete.
4639
4640 2018-04-27 Jakub Jelinek <jakub@redhat.com>
4641
4642 PR tree-optimization/85529
4643 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4644 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4645 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4646 zero extension or masking of the MSB bit.
4647 (optimize_range_tests): Add FIRST_BB argument, pass it through
4648 to optimize_range_tests_var_bound.
4649 (maybe_optimize_range_tests, reassociate_bb): Adjust
4650 optimize_range_tests callers.
4651
4652 2018-04-26 Richard Biener <rguenther@suse.de>
4653 Jakub Jelinek <jakub@redhat.com>
4654
4655 * cgraph.h (symbol_table): Just declare debug method here.
4656 * symtab.c (symbol_table::debug): Define.
4657
4658 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
4659
4660 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4661
4662 2018-04-25 H.J. Lu <hongjiu.lu@intel.com>
4663
4664 Backport from mainline
4665 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
4666
4667 PR target/85473
4668 * config/i386/i386.c (ix86_expand_builtin): Change memory
4669 operand to XI, extend p0 to Pmode.
4670 * config/i386/i386.md: Change unspec volatile and operand
4671 1 mode to XI, change operand 0 mode to P.
4672
4673 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4674
4675 * DEV-PHASE: Set to prerelease.
4676
4677 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4678
4679 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4680 in __abskf2 and __powikf2.
4681
4682 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4683
4684 PR target/85512
4685 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4686 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4687 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4688 Use the above on operand 2. Reindent.
4689 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4690
4691 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4692
4693 PR target/85485
4694 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4695 handle OPT_mcet.
4696 * config/i386/i386.opt (mcet): Removed.
4697 * doc/install.texi: Remove -mcet documentation.
4698 * doc/invoke.texi: Likewise.
4699
4700 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4701
4702 PR target/85485
4703 * doc/install.texi: Remove -mcet from bootstrap-cet.
4704
4705 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4706
4707 PR target/85511
4708 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4709 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4710 if TARGET_64BIT.
4711
4712 PR target/85503
4713 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4714 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4715 containing a CONST_VECTOR.
4716
4717 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4718
4719 * doc/install.texi: Update newlib dependency for nvptx.
4720
4721 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4722
4723 PR target/85508
4724 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4725 instead of INTVAL when shifting x left.
4726
4727 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4728
4729 PR tree-optimization/85478
4730 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4731 vect_grouped_store_supported for single element vectors.
4732
4733 2018-04-24 Richard Biener <rguenther@suse.de>
4734
4735 PR target/85491
4736 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4737 load cost increase to the case of non-constant step.
4738
4739 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4740
4741 PR target/84828
4742 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4743 destination if any_malformed_asm.
4744
4745 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4746
4747 PR middle-end/85496
4748 * expr.c (store_field): In the bitfield case, if the value comes from
4749 a function call and is returned in registers by means of a PARALLEL,
4750 do not change the mode of the temporary unless BLKmode and VOIDmode.
4751
4752 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4753
4754 PR rtl-optimization/85423
4755 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4756 dependencies to debug insns when the previous insn is non-debug.
4757
4758 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4759
4760 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4761 enums into a single definition.
4762 (fls): Fix predicates and printing.
4763 (seti): Likewise.
4764
4765 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4766
4767 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4768 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4769 and short u6 immediate.
4770 (check_if_valid_sleep_operand): Remove.
4771 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4772
4773 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4774
4775 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4776 flag_always_save_lp condition.
4777 * config/nds32/nds32.opt (malways-save-lp): New option.
4778
4779 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4780
4781 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4782 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4783 * config/nds32/nds32.h
4784 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4785 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4786
4787 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4788
4789 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4790 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4791
4792 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4793 Chung-Ju Wu <jasonwucj@gmail.com>
4794
4795 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4796 Declare.
4797 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4798 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4799
4800 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4801
4802 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4803
4804 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4805
4806 * config/nds32/nds32-protos.h (nds32_data_alignment,
4807 nds32_local_alignment): Declare.
4808 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4809 nds32_local_alignment): New functions.
4810 (TARGET_CONSTANT_ALIGNMENT): Define.
4811 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4812
4813 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4814
4815 * config/nds32/nds32.c
4816 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4817 (TARGET_MODES_TIEABLE_P): Likewise.
4818
4819 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4820
4821 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4822 level Ofast and Og.
4823
4824 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4825 Chung-Ju Wu <jasonwucj@gmail.com>
4826
4827 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4828 for unaligned access.
4829 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4830 unaligned access.
4831 * config/nds32/nds32-intrinsic.md: Likewise.
4832 * config/nds32/nds32_intrinsic.h: Likewise.
4833 * config/nds32/nds32.h (nds32_builtins): Likewise.
4834 * config/nds32/nds32.opt (munaligned-access): New option.
4835 * config/nds32/nds32.c (nds32_asm_file_start): Display
4836 flag_unaligned_access status.
4837
4838 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4839
4840 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4841 -mno-relax is present.
4842 * config/riscv/linux.h (LINK_SPEC): Ditto.
4843
4844 2018-04-20 Martin Sebor <msebor@redhat.com>
4845
4846 PR c/85365
4847 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4848 for null pointers.
4849 (gimple_fold_builtin_stxcpy_chk): Same.
4850 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4851
4852 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4853
4854 PR target/85456
4855 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4856 __powikf2 when long double is IEEE 128-bit.
4857
4858 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4859
4860 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4861 step to make sure stack always aligned.
4862
4863 2018-04-20 Carl Love <cel@us.ibm.com>
4864
4865 PR target/83402
4866 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4867 size check for arg0.
4868
4869 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
4870 Tom de Vries <tom@codesourcery.com>
4871
4872 PR target/85445
4873 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4874 Emit insns for calls too.
4875 (nvptx_find_par): Always look for worker-level predecessor insn.
4876 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
4877 calls.
4878 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4879 (nvptx_process_pars): Propagate frames for calls.
4880
4881 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
4882
4883 PR target/85469
4884 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4885 Removed.
4886 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4887 (ix86_handle_option): Don't handle OPT_mibt.
4888 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4889 __SHSTK__.
4890 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4891 has_ibt and ibt.
4892 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4893 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4894 (ix86_target_macros): Define __CET__ with flag_cf_protection
4895 for -fcf-protection.
4896 * config/i386/i386.c (isa2_opts): Remove -mibt.
4897 * config/i386/i386.h (TARGET_IBT): Removed.
4898 (TARGET_IBT_P): Likewise.
4899 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4900 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4901 * config/i386/i386.opt (mcet): Update help message.
4902 (mshstk): Likewise.
4903 (mibt): Removed.
4904 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
4905 -mcet as an alias for -mshstk.
4906
4907 2018-04-20 Richard Biener <rguenther@suse.de>
4908
4909 PR middle-end/85475
4910 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4911 complexity by forcing a single use of the multiply operand.
4912
4913 2018-04-20 Martin Jambor <mjambor@suse.cz>
4914
4915 ipa/85449
4916 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4917 recursion dependency to only apply to non-clones.
4918
4919 2018-04-20 Martin Jambor <mjambor@suse.cz>
4920
4921 ipa/85447
4922 * ipa-cp.c (create_specialized_node): Check that clones of
4923 self-recursive edges exist during IPA-CP.
4924
4925 2018-04-19 Toon Moene <toon@moene.org>
4926
4927 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4928 by -O3.
4929
4930 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4931
4932 PR tree-optimization/85467
4933 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4934 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
4935 VECTOR_CST element to type.
4936
4937 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4938
4939 PR target/85397
4940 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4941 * config/i386/i386.md (builtin_setjmp_setup): Removed.
4942 (builtin_longjmp): Likewise.
4943 (save_stack_nonlocal): New pattern.
4944 (restore_stack_nonlocal): Likewise.
4945
4946 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4947
4948 PR target/85404
4949 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4950 Replace ASM_OUTPUT_LABEL with fprintf.
4951
4952 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4953
4954 PR target/85417
4955 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4956 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4957 * config/i386/i386-c.c (ix86_target_macros_internal): Also
4958 define __IBT__ and __SHSTK__ for -fcf-protection.
4959 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4960 TARGET_IBT.
4961 (ix86_trampoline_init): Likewise.
4962 (x86_output_mi_thunk): Likewise.
4963 (ix86_notrack_prefixed_insn_p): Likewise.
4964 (ix86_option_override_internal): Don't disallow -fcf-protection.
4965 * config/i386/i386.md (rdssp<mode>): Also enable for
4966 -fcf-protection.
4967 (incssp<mode>): Likewise.
4968 (nop_endbr): Likewise.
4969 * config/i386/i386.opt (mcet): Change help message to built-in
4970 functions only.
4971 (mibt): Likewise.
4972 (mshstk): Likewise.
4973 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4974 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
4975 enable CET built-in functions.
4976
4977 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
4978
4979 * common/config/i386/i386-common.c
4980 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4981 OPTION_MASK_ISA_MOVDIRI_UNSET,
4982 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4983 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4984 * config.gcc (movdirintrin.h): New header.
4985 * config/i386/cpuid.h (bit_MOVDIRI,
4986 bit_MOVDIR64B): New bits.
4987 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4988 and -mmvodir64b.
4989 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4990 (VOID, PVOID, PCVOID)): New function types.
4991 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4992 __builtin_ia32_directstoreu_u64,
4993 __builtin_ia32_movdir64b): New builtins.
4994 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
4995 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
4996 and -mmovdiri.
4997 (ix86_valid_target_attribute_inner_p): Ditto.
4998 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
4999 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
5000 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
5001 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
5002 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
5003 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
5004 (movdiri<mode>, movdir64b_<mode>): New.
5005 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
5006 * config/i386/immintrin.h: Include movdirintrin.h.
5007 * config/i386/movdirintrin.h: New file.
5008 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
5009
5010 2018-04-19 Richard Biener <rguenther@suse.de>
5011
5012 PR middle-end/85455
5013 * cfg.c (clear_bb_flags): When loop state says we have
5014 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
5015
5016 2018-04-19 Richard Biener <rguenther@suse.de>
5017
5018 PR tree-optimization/84737
5019 * tree-vect-data-refs.c (vect_copy_ref_info): New function
5020 copying restrict info.
5021 (vect_setup_realignment): Use it.
5022 * tree-vectorizer.h (vect_copy_ref_info): Declare.
5023 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
5024 the first DR to all generated stores.
5025 (vectorizable_load): Likewise for loads.
5026
5027 2018-04-19 Jakub Jelinek <jakub@redhat.com>
5028
5029 PR tree-optimization/85446
5030 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
5031 the integral and pointer types to have the same precision.
5032
5033 * doc/install.texi: Document --disable-cet being the default and
5034 --enable-cet=auto.
5035
5036 2018-04-18 Martin Liska <mliska@suse.cz>
5037
5038 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
5039 style.
5040
5041 2018-04-18 Martin Liska <mliska@suse.cz>
5042
5043 Revert
5044 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5045
5046 PR ipa/83983
5047 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5048 arguments if they are comparable.
5049
5050 2018-04-18 Martin Liska <mliska@suse.cz>
5051
5052 Revert
5053 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
5054
5055 PR lto/84805
5056 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5057 incomplete types.
5058
5059 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
5060
5061 PR target/85388
5062 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
5063 ENDBR after calling __morestack.
5064
5065 2018-04-18 David Malcolm <dmalcolm@redhat.com>
5066
5067 PR jit/85384
5068 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
5069 by using gcc_base_ver to generate a gcc_driver_version, and use
5070 it when generating GCC_DRIVER_NAME.
5071 * configure: Regenerate.
5072
5073 2018-04-18 Jakub Jelinek <jakub@redhat.com>
5074
5075 PR target/81084
5076 * config.gcc: Obsolete powerpc*-*-*spe*.
5077
5078 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5079
5080 PR debug/84637
5081 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
5082 (stabstr_D): Change type of unum from unsigned int to
5083 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
5084 type.
5085
5086 2018-04-17 Jim Wilson <jimw@sifive.com>
5087
5088 PR 84856
5089 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
5090 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
5091 Set arg_pointer_offset after using pretend_args_size.
5092
5093 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5094
5095 PR rtl-optimization/85431
5096 * dse.c (record_store): Ignore zero width stores.
5097
5098 PR sanitizer/85230
5099 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
5100 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
5101 __builtin_stack_restore rather than after it.
5102 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
5103 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
5104 argument instead of virtual_dynamic_stack_rtx.
5105
5106 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
5107
5108 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
5109 New prototype.
5110 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
5111 Add note to error message to explain internal mapping of overloaded
5112 built-in function name to non-overloaded built-in function name.
5113 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
5114 function.
5115
5116 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
5117
5118 PR target/85424
5119 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
5120 where the inputs overlap with the output.
5121
5122 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5123
5124 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
5125 (=v, v) alternative and explicit "memory" attribute.
5126 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
5127 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5128 attributes.
5129 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
5130 "sselog1" type instead of "sselog".
5131 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
5132 "sselog". Remove explicit "memory" attribute.
5133 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
5134 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5135 attributes.
5136 (vec_extract_hi_v32hi): Merge all alternatives into one, use
5137 "sselog1" type instead of "sselog". Remove explicit "memory"
5138 attribute.
5139 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
5140 use "sselog1" type instead of "sselog". Remove explicit "memory"
5141 attribute.
5142 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
5143 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
5144 attributes.
5145 (vec_extract_hi_v64qi): Merge all alternatives into one, use
5146 "sselog1" type instead of "sselog". Remove explicit "memory"
5147 attribute.
5148 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
5149 use "sselog1" type instead of "sselog". Remove explicit "memory"
5150 attribute.
5151
5152 PR target/85430
5153 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
5154
5155 PR middle-end/85414
5156 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
5157 on a SUBREG.
5158
5159 2018-04-17 Martin Jambor <mjambor@suse.cz>
5160
5161 PR ipa/85421
5162 * ipa-cp.c (create_specialized_node): Call
5163 expand_all_artificial_thunks if necessary.
5164
5165 2018-04-17 Martin Liska <mliska@suse.cz>
5166
5167 PR lto/85405
5168 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
5169 in message, remote space in between '_G' and '('.
5170
5171 2018-04-17 Jakub Jelinek <jakub@redhat.com>
5172
5173 PR target/85281
5174 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
5175 avx512f_vmcmp<mode>3<round_saeonly_name>,
5176 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
5177 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
5178 avx512f_rndscale<mode><round_saeonly_name>,
5179 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
5180 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
5181 Use %<iptr>2 instead of %2 for -masm=intel.
5182 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
5183 avx512f_vcvttss2usi<round_saeonly_name>,
5184 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
5185 -masm=intel.
5186 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
5187 avx512f_vcvttsd2usi<round_saeonly_name>,
5188 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
5189 Use %q1 instead of %1 for -masm=intel.
5190 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
5191 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
5192 of %3 for -masm=intel.
5193 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
5194 -masm=intel.
5195 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
5196 -masm=intel.
5197 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
5198 -masm=intel.
5199 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
5200 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
5201 %g1.
5202 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
5203 -masm=intel.
5204 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
5205 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
5206 %g1 and one with %0 and %1.
5207 (avx512er_vmrcp28<mode><round_saeonly_name>,
5208 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
5209 %1 for -masm=intel.
5210 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
5211 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
5212 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
5213 of %0 and %{%4%} for -masm=intel.
5214 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
5215 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
5216 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
5217 order of %0 and %{%5%}%{z%} for -masm=intel.
5218
5219 2018-04-17 Jan Hubicka <jh@suse.cz>
5220
5221 PR lto/85405
5222 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
5223
5224 2018-04-17 Martin Liska <mliska@suse.cz>
5225
5226 PR ipa/85329
5227 * multiple_target.c (create_dispatcher_calls): Set apostrophes
5228 for target_clone error message. Make default implementation
5229 clone to be a local declaration.
5230 (separate_attrs): Add new argument and check for an empty
5231 string.
5232 (expand_target_clones): Handle it.
5233 (ipa_target_clone): Make redirection just for target_clones
5234 functions.
5235
5236 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
5237 Tom de Vries <tom@codesourcery.com>
5238
5239 PR middle-end/84955
5240 * omp-expand.c (expand_oacc_for): Add dummy false branch for
5241 tiled basic blocks without omp continue statements.
5242
5243 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
5244
5245 PR target/83660
5246 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5247 vec_extract expression as having side effects to make sure it gets
5248 a cleanup point.
5249
5250 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
5251
5252 PR target/85403
5253 * config/i386/i386.c (get_builtin_code_for_version): Check
5254 error_mark_node.
5255
5256 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
5257
5258 PR target/84331
5259 * gcc/config.gcc: Support "skylake".
5260 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5261 PROCESSOR_SKYLAKE.
5262 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5263 (processor_target_table): Add "skylake".
5264 (ix86_option_override_internal): Add "skylake".
5265 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5266 PROCESSOR_CANNONLAKE.
5267 (get_builtin_code_for_version): Fix priority for
5268 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5269 PROCESSOR_SKYLAKE-AVX512.
5270 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5271 (processor_type): Add PROCESSOR_SKYLAKE.
5272
5273 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
5274 Jason Merrill <jason@redhat.com>
5275
5276 PR c++/85112
5277 * convert.c (convert_to_integer_1): Use direct recursion for
5278 enumeral types and types with a precision less than the number
5279 of bits in their mode.
5280
5281 2018-04-16 Julia Koval <julia.koval@intel.com>
5282
5283 PR target/84413
5284 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5285 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5286
5287 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
5288
5289 PR target/85293
5290 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5291 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5292 and -mno-direct-move.
5293
5294 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
5295
5296 PR target/83402
5297 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5298 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5299 Ensure negative shifts result in {0}.
5300
5301 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
5302
5303 PR rtl-optimization/79916
5304 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5305 regs (if any) to define how to gnerate SD moves when LRA is in
5306 progress.
5307
5308 2018-04-13 Jakub Jelinek <jakub@redhat.com>
5309
5310 PR rtl-optimization/85393
5311 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5312 * except.c (expand_dw2_landing_pad_for_region): Make static.
5313 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5314 a label and unconditional jump to old_bb, rather than
5315 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5316 basic block.
5317
5318 PR rtl-optimization/85376
5319 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5320 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5321 instead of a specific value.
5322
5323 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5324 Bin Cheng <bin.cheng@arm.com>
5325
5326 PR tree-optimization/82965
5327 PR tree-optimization/83991
5328 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5329 by_profile_only parameter.
5330 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5331 information if the loop was predicted to iterate too many times.
5332 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5333
5334 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5335
5336 PR lto/71991
5337 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5338 always inline.
5339
5340 2018-04-13 Martin Liska <mliska@suse.cz>
5341 Jakub Jelinek <jakub@redhat.com>
5342
5343 PR middle-end/81657
5344 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5345 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5346 * builtins.c (expand_builtin_memory_copy_args): Use
5347 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5348 handle dest_addr == pc_rtx.
5349
5350 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
5351
5352 PR target/85291
5353 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5354 asked to not generate direct moves.
5355 (fix_trunc<mode>si2_stfiwx): Similar.
5356 (fix_trunc<mode>si2_internal): Similar.
5357
5358 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5359
5360 PR debug/83157
5361 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5362 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5363 lookup if dest in some wider mode is known to be const0_rtx and
5364 if so, record permanent equivalence for it to be ZERO_EXTEND of
5365 the narrower mode destination.
5366
5367 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5368
5369 * lto-streamer-out.c (output_function): Revert 259346.
5370 * omp-expand.c (expand_oacc_for): Likewise.
5371
5372 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
5373
5374 PR rtl-optimization/85354
5375 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5376 * sel-sched.c (sel_global_init): ... here.
5377
5378 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
5379
5380 PR target/85238
5381 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5382 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5383 mode for PE-COFF targets.
5384 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5385 (i386_pe_asm_lto_end): Likewise.
5386 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5387 (TARGET_ASM_LTO_END): Likewise.
5388 * config/i386/winnt.c (saved_debug_info_level): New static variable.
5389 (i386_pe_asm_lto_start): New function.
5390 (i386_pe_asm_lto_end): Likewise.
5391
5392 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5393 Richard Biener <rguenther@suse.de>
5394
5395 PR middle-end/84955
5396 * lto-streamer-out.c (output_function): Fix CFG loop state before
5397 streaming out.
5398 * omp-expand.c (expand_oacc_for): Handle calls to internal
5399 functions like regular functions.
5400
5401 2018-04-12 Richard Biener <rguenther@suse.de>
5402
5403 PR lto/85371
5404 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5405 for the early LTO debug to properly generate references to it
5406 during DIE emission. Do not re-use that for the skeleton for
5407 split-dwarf.
5408 (dwarf2out_early_finish): Likewise.
5409
5410 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5411
5412 PR target/85328
5413 * config/i386/sse.md
5414 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5415 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5416 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5417 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5418 and output is a reg, avoid creating invalid lowpart subreg, but
5419 instead split into a 512-bit move. Don't split if not AVX512VL,
5420 input is xmm16+ reg and output is a mem.
5421 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5422 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5423 xmm16+ reg and output is a mem.
5424
5425 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5426
5427 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5428 also for flag_dwarf2_cfi_asm.
5429
5430 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5431
5432 PR rtl-optimization/85342
5433 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5434 a bool scalar var inside of the loop instead. Don't try to update
5435 recog_data.operand after failed apply_change_group.
5436
5437 2018-04-12 Tom de Vries <tom@codesourcery.com>
5438
5439 PR target/85296
5440 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5441 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
5442 array with flexible array member as array without given dimension.
5443 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5444 argument for undefined param to true.
5445
5446 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
5447
5448 PR target/85321
5449 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5450 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5451 from PowerPC section.
5452 * config/rs6000/sysv4.opt (mcall-): Improve help text.
5453 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5454 help text that is too long.
5455 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5456 help text that is too long.
5457 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5458 help text that is too long.
5459
5460 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
5461
5462 * config/alpha/alpha.md (stack_probe_internal): Rename
5463 from "probe_stack". Update all callers.
5464
5465 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5466
5467 PR rtl-optimization/84566
5468 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5469 sched_macro_fuse_insns.
5470
5471 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5472
5473 PR target/84301
5474 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5475 (compute_block_dependences): ... from here.
5476
5477 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5478
5479 PR tree-optimization/85331
5480 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5481 from int to HOST_WIDE_INT.
5482
5483 2018-04-11 Martin Jambor <mjambor@suse.cz>
5484
5485 PR ipa/84149
5486 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5487 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5488 not the same as the source val.
5489 (cgraph_edge_brings_value_p): New parameter.
5490 (gather_edges_for_value): Pass destination value to
5491 cgraph_edge_brings_value_p.
5492 (perhaps_add_new_callers): Likewise.
5493 (get_info_about_necessary_edges): Likewise and exclude values brought
5494 only by self-recursive edges.
5495 (create_specialized_node): Redirect only clones of self-calling edges.
5496 (+self_recursive_pass_through_p): New function.
5497 (find_more_scalar_values_for_callers_subset): Use it.
5498 (find_aggregate_values_for_callers_subset): Likewise.
5499 (known_aggs_to_agg_replacement_list): Removed.
5500 (decide_whether_version_node): Re-calculate known constants for all
5501 remaining context clones.
5502
5503 2018-04-11 Richard Biener <rguenther@suse.de>
5504
5505 PR lto/85339
5506 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5507 from early DWARF output.
5508 (dwarf2out_early_finish): Output line info unconditionally into
5509 early DWARF and add reference to it.
5510
5511 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5512
5513 PR target/85281
5514 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5515 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5516 other than V2DFmode using iptr mode attribute.
5517 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5518
5519 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5520
5521 PR rtl-optimization/84659
5522 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5523
5524 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5525
5526 PR debug/85302
5527 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5528 SIZEP is NULL.
5529 (output_loc_list): Pass address of a dummy size variable even in the
5530 locview handling loop.
5531 (index_location_lists): Add comment on why skip_loc_list_entry can't
5532 call size_of_locs.
5533
5534 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5535
5536 PR target/85261
5537 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5538 into register.
5539
5540 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
5541
5542 PR target/85321
5543 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5544 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5545 and -mstring-compare-inline-limit.
5546
5547 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5548
5549 PR target/85287
5550 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5551 for stack clash protection in a register whenever we need it to be in
5552 a register.
5553
5554 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5555
5556 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5557 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5558
5559 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5560
5561 PR target/85321
5562 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5563 the help text.
5564 (mlong-double-): Ditto.
5565 * config/rs6000/sysv4.opt (msdata=): Ditto.
5566 (mtls-size=): Ditto.
5567
5568 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5569
5570 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5571 erroneous entries for
5572 "vector int vec_ldl (int, long int *)", and
5573 "vector unsigned int vec_ldl (int, unsigned long int *)".
5574 Add comments and entries for
5575 "vector bool char vec_ldl (int, bool char *)",
5576 "vector bool short vec_ldl (int, bool short *)",
5577 "vector bool int vec_ldl (int, bool int *)",
5578 "vector bool long long vec_ldl (int, bool long long *)",
5579 "vector pixel vec_ldl (int, pixel *)",
5580 "vector long long vec_ldl (int, long long *)",
5581 "vector unsigned long long vec_ldl (int, unsigned long long *)".
5582 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5583 type tree bool_long_long_type_node and correct definition of
5584 bool_V2DI_type_node to make reference to this new type tree.
5585 (rs6000_mangle_type): Replace erroneous reference to
5586 bool_long_type_node with bool_long_long_type_node.
5587 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5588 comments to emphasize sign distinctions for char and int types and
5589 replace RS6000_BTI_bool_long constant with
5590 RS6000_BTI_bool_long_long constant. Also add comment to restrict
5591 use of RS6000_BTI_pixel.
5592 (bool_long_type_node): Remove this macro definition.
5593 (bool_long_long_type_node): New macro definition
5594
5595 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5596
5597 PR rtl-optimization/85300
5598 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5599 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5600 simplify_unary_operation fails.
5601
5602 2018-04-10 Martin Liska <mliska@suse.cz>
5603
5604 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5605 cgraph_edge and ipa_ref.
5606
5607 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5608
5609 PR target/85177
5610 PR target/85255
5611 * config/i386/sse.md
5612 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5613 computation of the VEC_MERGE selector from mask.
5614 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5615 Fix decoding of the VEC_MERGE selector into mask.
5616
5617 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5618
5619 PR tree-optimization/85286
5620 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5621
5622 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5623
5624 * final.c (final_1): Set insn_last_address as well as
5625 insn_current_address.
5626
5627 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5628
5629 PR target/85173
5630 * explow.c (emit_stack_probe): Call validize_mem on memory location
5631 before passing it to gen_probe_stack. Create address operand and
5632 legitimize it for the probe_stack_address case.
5633
5634 2018-04-09 Jan Hubicka <jh@suse.cz>
5635
5636 PR lto/85078
5637 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5638 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5639 * tree.c (free_lang_data_in_type): Fix handling of binfos;
5640 walk basetypes.
5641 (free_lang_data): Rebuild type inheritance graph.
5642
5643 2018-04-09 Martin Sebor <msebor@redhat.com>
5644
5645 * invoke.texi (-finline-small-functions): Mention other optimization
5646 options.
5647 (-findirect-inlining, -fpartial-inlining): Same.
5648 (-finline-functions-called-once): Same.
5649 (-freorder-blocks-and-partition): Same.
5650
5651 2018-04-09 Jan Hubicka <jh@suse.cz>
5652
5653 PR rtl/84058
5654 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5655 jumps; choose last target that matches the criteria (i.e.
5656 no partition changes for non-crossing jumps).
5657 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5658 support for redirecting crossing jumps to non-crossing.
5659
5660 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
5661
5662 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5663 also for naked functions.
5664
5665 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
5666
5667 * config/arc/arc.md (add_shift): New pattern.
5668 (add_shift2): Likewise.
5669 (sub_shift): Likewise.
5670 (sub_shift_cmp0_noout): Likewise.
5671 (compare_si_ashiftsi): Likewise.
5672 (xbfu_cmp0_noout): New combine pattern.
5673 (xbfu_cmp0"): Likewise.
5674 (movsi_set_cc_insn): Place the predicable variant first.
5675 (commutative_binary_cmp0_noout): Remove clobber.
5676 (commutative_binary_cmp0): New pattern.
5677 (noncommutative_binary_cmp0): Likewise.
5678 (noncommutative_binary_cmp0_noout): Likewise.
5679 (noncommutative_binary_comparison_result_used): Removed.
5680 (rsub_cmp0): New pattern.
5681 (rsub_cmp0_noout): Likewise.
5682 (extzvsi): Changed, keep only meaningful variants.
5683 (SQH, SEZ): New iterators.
5684 (SQH_postfix): New mode attribute.
5685 (SEZ_prefix): New code attribute.
5686 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5687 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5688 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5689 of numerical value.
5690 (noncommutative_operator): Check the availability of barrel
5691 shifter option.
5692
5693 2018-04-09 Richard Biener <rguenther@suse.de>
5694
5695 PR tree-optimization/85284
5696 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5697 Only use the niter constraining form of simple_iv when the exit
5698 is always executed.
5699
5700 2018-04-09 Tom de Vries <tom@codesourcery.com>
5701
5702 PR target/84041
5703 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5704 (define_expand "*memory_barrier"): New define_expand.
5705 (define_insn "memory_barrier"): New insn.
5706
5707 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5708
5709 PR rtl-optimization/80463
5710 PR rtl-optimization/83972
5711 PR rtl-optimization/83480
5712
5713 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5714 correct producer for the insn.
5715 (tidy_control_flow): Fixup seqnos in case of debug insns.
5716
5717 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5718
5719 PR rtl-optimization/83913
5720
5721 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5722 different sched-times when merging exprs.
5723
5724 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5725
5726 PR rtl-optimization/83962
5727
5728 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5729 tidy_fallthru_edge and tidy_control_flow.
5730
5731 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5732
5733 PR rtl-optimization/83530
5734
5735 * sel-sched.c (force_next_insn): New global variable.
5736 (remove_insn_for_debug): When force_next_insn is true, also leave only
5737 next insn in the ready list.
5738 (sel_sched_region): When the region wasn't scheduled, make another pass
5739 over it with force_next_insn set to 1.
5740
5741 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5742
5743 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5744 into tm_file.
5745 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5746 for interrupt control.
5747 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5748 functions for interrupt control.
5749 * config/nds32/nds32-intrinsic.md: Likewise.
5750 * config/nds32/nds32_intrinsic.h: Likewise.
5751 * config/nds32/nds32.h (nds32_builtins): Likewise.
5752
5753 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5754
5755 * config/nds32/nds32.c (nds32_init_machine_status,
5756 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5757 strict_aligned_p field.
5758 (nds32_expand_to_rtl_hook): New function.
5759 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5760 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5761
5762 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5763 Chung-Ju Wu <jasonwucj@gmail.com>
5764
5765 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5766 * config/nds32/nds32-n7.md: New file.
5767 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5768 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5769 pipeline.
5770 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5771 * config/nds32/nds32.md (pipeline_model): Add n7.
5772 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5773 * config/nds32/pipelines.md: Include n7 settings.
5774
5775 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5776 Chung-Ju Wu <jasonwucj@gmail.com>
5777
5778 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5779 * config/nds32/nds32-e8.md: New file.
5780 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5781 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5782 pipeline.
5783 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5784 * config/nds32/nds32.md (pipeline_model): Add e8.
5785 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5786 * config/nds32/pipelines.md: Include e8 settings.
5787
5788 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5789 Chung-Ju Wu <jasonwucj@gmail.com>
5790
5791 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5792 * config/nds32/nds32-n8.md: New file.
5793 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5794 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5795 pipeline.
5796 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5797 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5798 * config/nds32/nds32.md (pipeline_model): Add n8.
5799 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5800 * config/nds32/pipelines.md: Include n8 settings.
5801
5802 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5803 Chung-Ju Wu <jasonwucj@gmail.com>
5804
5805 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5806 * config/nds32/nds32-n9-2r1w.md: New file.
5807 * config/nds32/nds32-n9-3r2w.md: New file.
5808 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5809 nds32_register_ports): New or modify for cpu n9.
5810 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5811 pipeline.
5812 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5813 * config/nds32/nds32-utils.c: New file.
5814 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5815 TARGET_MUL_SLOW): Define.
5816 * config/nds32/nds32.md (pipeline_model): New attribute.
5817 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5818 New options that support cpu n9.
5819 * config/nds32/pipelines.md: Include n9 settings.
5820 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5821
5822 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5823
5824 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5825 information if necessary.
5826 (output_cond_branch_compare_zero): Likewise.
5827 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5828 (nds32_target_alignment): Refine for alignment.
5829 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5830 (FUNCTION_BOUNDARY): Modify.
5831 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5832 align case.
5833 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5834
5835 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5836
5837 * config/nds32/constants.md (unspec_volatile_element): Add values for
5838 TLB operation and data prefetch.
5839 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5840 functions for TLB operation and data prefetch.
5841 * config/nds32/nds32-intrinsic.md: Likewise.
5842 * config/nds32/nds32_intrinsic.h: Likewise.
5843 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5844 (nds32_print_operand): Likewise.
5845 * config/nds32/nds32.h (nds32_builtins): Likewise.
5846
5847 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5848 Andrew Pinski <pinsika@gcc.gnu.org>
5849
5850 PR middle-end/82976
5851 * match.pd: Use constant_boolean_node of correct type instead of
5852 boolean_true_node or boolean_false_node for simplifying
5853 pointer comparisons to zero.
5854
5855 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5856
5857 PR tree-optimization/80021
5858 * tree.c (verify_type_variant): Make error call in verify_variant_match
5859 translatable and remove final full stop.
5860
5861 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5862
5863 * config/nds32/constants.md (unspec_volatile_element): Add
5864 UNSPEC_VOLATILE_EH_RETURN.
5865 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5866 nds32_output_stack_pop): Support dwarf exception handling process.
5867 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5868 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5869 exception handling process.
5870 (nds32_compute_stack_frame): Likewise.
5871 (nds32_return_addr_rtx): Likewise.
5872 (nds32_initial_elimination_offset): Likewise.
5873 (nds32_expand_prologue): Likewise.
5874 (nds32_expand_epilogue): Likewise.
5875 (nds32_dynamic_chain_address): New function.
5876 * config/nds32/nds32.h (machine_function): Add fields for dwarf
5877 exception handling.
5878 (DYNAMIC_CHAIN_ADDRESS): Define.
5879 (EH_RETURN_DATA_REGNO): Define.
5880 (EH_RETURN_STACKADJ_RTX): Define.
5881 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5882 patterns for dwarf exception handling.
5883
5884 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5885
5886 * config/nds32/nds32.h: Clean up obsolete macros.
5887
5888 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5889
5890 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5891 Add enum values for particular instructions.
5892 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5893 particular intrinsic functions.
5894 * config/nds32/nds32-intrinsic.md: Likewise.
5895 * config/nds32/nds32_intrinsic.h: Likewise.
5896 * config/nds32/nds32.h (nds32_builtins): Likewise.
5897 * config/nds32/nds32.md (type): Add pbsad and pbsada.
5898 (btst, ave): New patterns for particular instructions.
5899
5900 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5901
5902 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5903 Add enum values for atomic load/store and memory sync.
5904 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5905 and memory sync.
5906 * config/nds32/nds32-intrinsic.md: Likewise.
5907 * config/nds32/nds32_intrinsic.h: Likewise.
5908 * config/nds32/nds32.h (nds32_builtins): Likewise.
5909
5910 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5911
5912 PR tree-optimization/85257
5913 * fold-const.c (native_encode_vector): If not all elts could fit
5914 and off is -1, return 0 rather than offset.
5915 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5916 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5917 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
5918 adjust buffer in native_interpret_expr call.
5919
5920 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5921
5922 * config/nds32/constants.md (unspec_volatile_element): Add cache
5923 control enum values.
5924 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5925 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5926 * config/nds32/nds32.c (nds32_cctl_names): New.
5927 (nds32_print_operand): Handle cache control register names.
5928 * config/nds32/nds32.h (nds32_builtins): New enum values.
5929 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5930 macros.
5931 * config/nds32/nds32.md (type): Add mmu.
5932 * config/nds32/pipelines.md (simple_insn): Add mmu.
5933
5934 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5935
5936 * config/nds32/nds32.md (type): Remove call.
5937 * config/nds32/pipelines.md (simple_insn): Likewise.
5938
5939 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5940
5941 * config/nds32/constants.md (unspec_volatile_element): Add
5942 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5943 UNSPEC_VOLATILE_FMFCFG.
5944 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5945 description for fmfcfg and fmfcsr.
5946 (bdesc_1arg): Add fmtcsr.
5947 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5948 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5949 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5950 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5951 unspec_fmfcfg): New patterns.
5952 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5953 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5954 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5955 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5956 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5957 __nds32__fmfcfg): Define.
5958
5959 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5960
5961 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5962 intrinsic register names.
5963 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5964 intrinsic register enum values and macros.
5965
5966 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5967
5968 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5969 for load/store addressing form.
5970 (nds32_print_operand_address): Likewise.
5971
5972 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
5973
5974 PR target/85196
5975 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5976 based on LABEL_REF. Remove useless assertion.
5977 (pic_address_needs_scratch): Fix formatting.
5978 (sparc_legitimize_pic_address): Minor tweaks.
5979 (sparc_delegitimize_address): Adjust assertion accordingly.
5980 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5981 into symbolic_operand.
5982 (movsi_high_pic_label_ref): Likewise.
5983 (movsi_lo_sum_pic_label_ref): Likewise.
5984 (movdi_pic_label_ref): Likewise.
5985 (movdi_high_pic_label_ref): Likewise.
5986 (movdi_lo_sum_pic_label_ref): Likewise.
5987
5988 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
5989
5990 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5991 custom LIB_SPEC setup.
5992
5993 2018-04-06 Ruslan Bukin <br@bsdpad.com>
5994 Kito Cheng <kito.cheng@gmail.com>
5995
5996 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
5997 * config/riscv/freebsd.h: New.
5998
5999 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6000
6001 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
6002 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
6003 file.
6004
6005 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6006 Kito Cheng <kito.cheng@gmail.com>
6007
6008 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
6009 nds32_output_call, nds32_symbol_binds_local_p): New functions.
6010 * config/nds32/nds32-protos.h (nds32_output_call,
6011 nds32_output_return): Declare.
6012 * config/nds32/nds32.md: Refine all the call and return patterns.
6013
6014 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6015
6016 PR debug/85252
6017 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
6018 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
6019
6020 PR rtl-optimization/84872
6021 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
6022 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
6023 EDGE_CROSSING edge.
6024
6025 2018-04-06 Tamar Christina <tamar.christina@arm.com>
6026
6027 * expr.c (copy_blkmode_to_reg): Revert 254862.
6028 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
6029
6030 2018-04-06 Richard Biener <rguenther@suse.de>
6031
6032 PR middle-end/85244
6033 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
6034 after seeing a component reference with an adjacent field. Treat
6035 refs to arrays at struct end of external decls similar to
6036 refs to unconstrained commons.
6037
6038 2018-04-06 Jakub Jelinek <jakub@redhat.com>
6039
6040 PR sanitizer/85213
6041 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
6042 look through SAVE_EXPRs with non-side-effects argument. Adjust
6043 recursive calls.
6044 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
6045 save_p here.
6046
6047 2018-04-06 Richard Biener <rguenther@suse.de>
6048
6049 PR middle-end/85180
6050 * alias.c (find_base_term): New wrapper around find_base_term
6051 unwinding CSELIB_VAL_PTR changes.
6052 (find_base_term): Do not restore CSELIB_VAL_PTR during the
6053 recursion.
6054
6055 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6056
6057 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
6058 instructions.
6059 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
6060 constant definitions.
6061 ("nop"): lr 0,0 -> nopr r0
6062 ("nop_lr0", "nop_lr1"): New insn definitions.
6063
6064 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
6065
6066 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
6067 NDS32_V3PUSH_AVAILABLE_P macro.
6068
6069 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
6070 Chung-Ju Wu <jasonwucj@gmail.com>
6071
6072 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
6073 (nds32*-*-*): Add float and fpu_config into supported_defaults.
6074 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
6075 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
6076 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
6077 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
6078 * config/nds32/constraints.md: New constraints and checking for hard
6079 float configuration.
6080 * config/nds32/iterators.md: New mode iterator and attribute for hard
6081 float configuration.
6082 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
6083 patterns.
6084 * config/nds32/nds32-fpu.md: New file.
6085 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
6086 deal with hard float code generation.
6087 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
6088 ARCH_V3S.
6089 (abi_type, float_reg_number): New enum type.
6090 * config/nds32/nds32-predicates.c: New predicates for hard float.
6091 * config/nds32/nds32-protos.h: Declare functions for hard float.
6092 * config/nds32/nds32.c: Implementation for hard float configuration.
6093 * config/nds32/nds32.h: Definitions for hard float configuration.
6094 * config/nds32/nds32.md: Include hard float machine description and
6095 modify patterns for hard float configuration.
6096 * config/nds32/nds32.opt: New options for hard float configuration.
6097 * config/nds32/predicates.md: New predicates for hard float
6098 configuration.
6099
6100 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6101
6102 * common/config/nds32/nds32-common.c
6103 (nds32_option_optimization_table): Enable -mreleax-hint by default.
6104
6105 2018-04-05 Jakub Jelinek <jakub@redhat.com>
6106
6107 PR middle-end/85195
6108 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
6109 CONSTRUCTOR_ELT (ctor, ...)->value.
6110
6111 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
6112
6113 PR target/85193
6114 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
6115
6116 2018-04-05 Tom de Vries <tom@codesourcery.com>
6117
6118 PR target/85204
6119 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
6120 cond jump.
6121
6122 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6123 Kito Cheng <kito.cheng@gmail.com>
6124
6125 * config/nds32/constraints.md (U33): Fine-tune checking condition.
6126 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
6127 * config/nds32/nds32.h (nds32_16bit_address_type): Add
6128 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
6129
6130 2018-04-05 Shiva Chen <shiva0217@gmail.com>
6131 Kito Cheng <kito.cheng@gmail.com>
6132
6133 * config/nds32/constraints.md (Ufe): New memory constraint.
6134 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
6135 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
6136 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
6137 operands.
6138 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
6139 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
6140
6141 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6142
6143 * config/nds32/nds32.md: Use optimize_size in the condition for
6144 alu-shift instructions.
6145
6146 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6147
6148 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
6149
6150 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6151
6152 * config/nds32/nds32.md (negsi2): Refine pattern.
6153
6154 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6155 Chung-Ju Wu <jasonwucj@gmail.com>
6156
6157 * config/nds32/iterators.md (shift_rotate): New code iterator.
6158 (shift): New code attribute.
6159 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
6160 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
6161 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
6162 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
6163 bit-wise operations.
6164 (andsi3, *andsi3): Ditto.
6165 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
6166 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
6167 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
6168 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
6169 nds32_ior_operand, nds32_xor_operand): New predicates.
6170
6171 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6172
6173 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
6174 (addsi3, subsi3): ... this.
6175
6176 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6177
6178 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
6179
6180 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6181
6182 * config/nds32/nds32.md: Adjust indention.
6183
6184 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
6185
6186 * config/nds32/nds32.md (feature): New attribute.
6187
6188 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
6189
6190 * config/nds32/nds32.md (subtype): New attribute.
6191
6192 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
6193
6194 PR target/85203
6195 * config/arm/arm-builtins.c (arm_expand_builtin): Change
6196 expansion to perform a bitwise AND of the argument followed by a
6197 boolean negation of the result.
6198
6199 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
6200
6201 PR rtl-optimization/84878
6202 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
6203 the basic block. Assert the use reference is not artificial and that
6204 it has an associated insn.
6205
6206 2018-04-04 Michael Matz <matz@suse.de>
6207
6208 * builtins.c (compute_objsize): Pass correct operand
6209 to array_at_struct_end_p.
6210
6211 2018-04-04 Richard Biener <rguenther@suse.de>
6212
6213 PR lto/85176
6214 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
6215 from contexts for DINFO_LEVEL_TERSE and below.
6216
6217 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6218
6219 * config/nds32/nds32-doubleword.md (move_<mode>): Require
6220 resiter_operand condition.
6221 * config/nds32/nds32.md (*move<mode>): Ditto.
6222
6223 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6224 Monk Chiang <sh.chiang04@gmail.com>
6225
6226 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
6227
6228 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6229
6230 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
6231
6232 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6233 Kito Cheng <kito.cheng@gmail.com>
6234
6235 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
6236 nds32_cond_code_str, output_cond_branch,
6237 output_cond_branch_compare_zero, nds32_expand_cbranch,
6238 nds32_expand_cstore, nds32_expand_movcc,
6239 nds32_output_cbranchsi4_equality_zero,
6240 nds32_output_cbranchsi4_equality_reg,
6241 nds32_output_cbranchsi4_equality_reg_or_const_int,
6242 nds32_output_cbranchsi4_greater_less_zero: New functions.
6243 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
6244 nds32_expand_cstore, nds32_expand_movcc,
6245 nds32_output_cbranchsi4_equality_zero,
6246 nds32_output_cbranchsi4_equality_reg,
6247 nds32_output_cbranchsi4_equality_reg_or_const_int,
6248 nds32_output_cbranchsi4_greater_less_zero): Declare.
6249 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6250 nds32_rimm11s_operand): New predicates.
6251 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6252 * config/nds32/nds32.md: Rewrite all the branch and conditional move
6253 patterns.
6254
6255 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6256
6257 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6258 * config/nds32/nds32.md: Ditto.
6259 * config/nds32/pipelines.md: Ditto.
6260
6261 2018-04-04 Richard Biener <rguenther@suse.de>
6262
6263 PR tree-optimization/85168
6264 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6265 propagating abnormals.
6266
6267 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6268
6269 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6270
6271 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6272 Kito Cheng <kito.cheng@gmail.com>
6273
6274 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6275 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6276 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6277 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6278 * config/nds32/nds32.md (sibcall_internal): New.
6279 (sibcall_register): Remove.
6280 (sibcall_immediate): Remove.
6281 (sibcall_value_internal): New.
6282 (sibcall_value_register): Remove.
6283 (sibcall_value_immediate): Remove.
6284 * config/nds32/predicates.md (nds32_general_register_operand): New.
6285 (nds32_call_address_operand): New.
6286
6287 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6288
6289 PR rtl-optimization/85167
6290 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6291 bb_defs if *split_p, instead preinitialize it to NULL.
6292
6293 PR tree-optimization/85156
6294 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6295 evaluating the argument multiple times.
6296
6297 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
6298
6299 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6300 than vector.
6301 (_mm_cvtpd_ps): Likewise.
6302 (_mm_cvttpd_epi32): Likewise.
6303 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6304 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6305 vector, pixel, and bool following altivec.h include.
6306
6307 2018-04-03 Martin Sebor <msebor@redhat.com>
6308
6309 * doc/extend.texi (Common Function Attributes): Clarify.
6310 (const attribute): Likewise.
6311 (pure attribute): Likewise.
6312
6313 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6314
6315 PR target/85169
6316 * config/i386/i386.c (ix86_expand_vector_set): Use
6317 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
6318
6319 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
6320
6321 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6322 instructions when changing rounding bits to preserve precision bits
6323 in the x87 control word.
6324
6325 2018-04-03 Martin Liska <mliska@suse.cz>
6326
6327 PR tree-optimization/82491
6328 * rtl.h (strip_offset_and_add): Replace += suboffset with
6329 poly_uint64 () + suboffset.
6330
6331 2018-03-29 Martin Liska <mliska@suse.cz>
6332 Martin Jambor <mjambor@suse.cz>
6333
6334 PR ipa/84947
6335 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6336 param_type is not an integral or pointer type.
6337
6338 2018-04-03 Richard Biener <rguenther@suse.de>
6339
6340 * sese.h (recompute_all_dominators): Remove.
6341
6342 2018-04-02 Martin Sebor <msebor@redhat.com>
6343
6344 * doc/invoke.texi (-Wrestrict): Fix typos.
6345
6346 2018-04-02 Jim Wilson <jimw@sifive.com>
6347
6348 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6349 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6350 (<optab>di3, <optab>si3_extend): Likewise.
6351 (<optab>si3_mask, <optab>si3_mask_1): New.
6352 (<optab>di3_mask, <optab>di3_mask_1): New.
6353 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6354 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6355 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6356
6357 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
6358
6359 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6360 example.
6361
6362 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
6363
6364 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6365 (nds32_canonicalize_comparison): New function.
6366
6367 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6368 Kito Cheng <kito.cheng@gmail.com>
6369 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6370
6371 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6372 * config/nds32/constants.md (unspec_volatile_element): Add
6373 UNSPEC_VOLATILE_RELAX_GROUP.
6374 * config/nds32/nds32-relax-opt.c: New file.
6375 * config/nds32/nds32-predicates.c
6376 (nds32_symbol_load_store_p): New function.
6377 * config/nds32/nds32-protos.h
6378 (nds32_symbol_load_store_p): Declare function.
6379 (make_pass_nds32_relax_opt): Declare new rtl pass function.
6380 * config/nds32/nds32.c
6381 (nds32_register_pass): New function to register pass.
6382 (nds32_register_passes): New function to register passes.
6383 * config/nds32/nds32.md (relax_group): New pattern.
6384 * config/nds32/nds32.opt (mrelax-hint): New option.
6385 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6386
6387 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
6388
6389 * config/nds32/t-nds32: Modify files dependency.
6390
6391 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6392
6393 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6394 (PROFILE_HOOK): Define its implementation.
6395
6396 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6397
6398 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6399 type and 32-bit size.
6400
6401 2018-04-01 Jakub Jelinek <jakub@redhat.com>
6402
6403 PR middle-end/85090
6404 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6405 (V_128_256): New mode iterator.
6406 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6407 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6408 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6409 of V.
6410 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6411 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6412
6413 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
6414
6415 PR target/83315
6416 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6417 NaN inputs correctly.
6418
6419 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
6420
6421 PR target/80546
6422 * config/rs6000/vsx.md (??r): New mode attribute.
6423 (*vsx_mov<mode>_64bit): Use it.
6424 (*vsx_mov<mode>_32bit): Likewise.
6425
6426 2018-03-30 Martin Sebor <msebor@redhat.com>
6427
6428 PR tree-optimization/84818
6429 * builtins.c (check_access): Use warning_n.
6430
6431 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6432
6433 PR target/83822
6434 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6435 condition.
6436 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6437 condition.
6438
6439 2018-03-30 Julia Koval <julia.koval@intel.com>
6440
6441 PR target/84413
6442 * x86-tune.def (movx, partial_reg_dependency): Enable for
6443 m_SKYLAKE_AVX512.
6444
6445 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
6446
6447 PR inline-asm/84985
6448 * lra-constraints.c (process_alt_operands): Move setting
6449 this_alternative_matches below.
6450
6451 2018-03-29 Martin Liska <mliska@suse.cz>
6452
6453 PR lto/84995.
6454 * doc/invoke.texi: Document how LTO works with debug info.
6455 Describe auto-load support of binutils. Mention 'x86-64'
6456 as valid option value of -march option.
6457
6458 2018-03-29 Jakub Jelinek <jakub@redhat.com>
6459
6460 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6461
6462 PR c/85094
6463 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6464 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6465 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6466 checking.
6467
6468 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6469
6470 PR target/84912
6471 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6472 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6473 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6474 for RS6000_BTM_POWERPC64.
6475 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6476 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6477 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6478 definition.
6479 (DIVDE): Use it.
6480 (DIVDEU): Likewise.
6481
6482 2018-03-28 Carl Love <cel@us.ibm.com>
6483
6484 Revert
6485 2017-09-27 Carl Love <cel@us.ibm.com>
6486
6487 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6488 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6489 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6490 fctiw instruction.
6491
6492 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6493
6494 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6495 instead of __vector bool.
6496 (_mm_max_pu8): Likewise.
6497 (_mm_min_pi16): Likewise.
6498
6499 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6500
6501 PR target/84912
6502 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6503 (DIVWEUO): Likewise.
6504 (DIVDEO): Likewise.
6505 (DIVDEUO): Likewise.
6506 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6507 DIVWEUO and DIVDEUO.
6508 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6509 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6510 (div_extend): Likewise.
6511 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6512 builtin function.
6513 (__builtin_divweuo): Likewise.
6514 (__builtin_divdeo): Likewise.
6515 (__builtin_divdeuo): Likewise.
6516
6517 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6518
6519 PR target/85095
6520 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6521 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6522
6523 PR tree-optimization/82004
6524 * gimple-match-head.c (optimize_pow_to_exp): New function.
6525 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6526 Don't fold to exp if optimize_pow_to_exp is false.
6527
6528 2018-03-28 Martin Liska <mliska@suse.cz>
6529
6530 PR other/84819
6531 * calls.c (initialize_argument_information): Fix trailing space.
6532 * common.opt: Fix typo and provide better explanation for
6533 -fsanitize-coverage option.
6534 * config/i386/i386.opt: Fix typo.
6535
6536 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6537 Martin Liska <mliska@suse.cz>
6538
6539 PR sanitizer/85081
6540 * gimplify.c (asan_poison_variable): Don't do the check for
6541 gimplify_omp_ctxp here.
6542 (gimplify_decl_expr): Do it here.
6543 (gimplify_target_expr): Likewise.
6544
6545 2018-03-28 Martin Liska <mliska@suse.cz>
6546
6547 PR target/84988
6548 * config/i386/i386.c (ix86_function_arg_advance): Do not call
6549 chkp_type_bounds_count if MPX is not enabled.
6550
6551 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
6552
6553 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6554
6555 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6556
6557 PR target/84914
6558 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6559 function to create the function decl for complex long double
6560 multiply and divide for -mabi=ieeelongdouble.
6561 (init_float128_ieee): Call it.
6562
6563 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
6564
6565 PR target/85044
6566 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6567 -fcf-protection=branch -mibt.
6568 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6569
6570 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6571
6572 PR target/81863
6573 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
6574
6575 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
6576
6577 PR target/85056
6578 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6579 extern array declarations.
6580
6581 2018-03-27 Richard Biener <rguenther@suse.de>
6582
6583 PR middle-end/84067
6584 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6585 explicit single_use checks.
6586
6587 2018-03-27 Richard Biener <rguenther@suse.de>
6588
6589 PR tree-optimization/85082
6590 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6591 Valueize the VUSE.
6592
6593 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6594
6595 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6596 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6597 Turn on fasynchronous-unwind-tables and funwind-tables.
6598
6599 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
6600
6601 PR target/85073
6602 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6603 (*bmi_blsr_<mode>_ccz): Ditto.
6604
6605 2018-03-26 Tom de Vries <tom@codesourcery.com>
6606
6607 PR tree-optimization/85063
6608 * omp-general.c (offloading_function_p): New function. Factor out
6609 of ...
6610 * omp-offload.c (pass_omp_target_link::gate): ... here.
6611 * omp-general.h (offloading_function_p): Declare.
6612 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6613 with attribute omp declare target for offloading functions.
6614
6615 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
6616
6617 PR tree-optimization/84005
6618 * tree-data-ref.h (get_base_for_alignment): Declare.
6619 * tree-data-ref.c (get_base_for_alignment_1): New function.
6620 (get_base_for_alignment): Likewise.
6621 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6622 get_base_for_alignment to find a suitable base object, instead
6623 of always using drb->base_address.
6624
6625 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6626
6627 PR inline-asm/85022
6628 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6629 known size by default.
6630
6631 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
6632
6633 PR inline-asm/85030
6634 * lra-constraints.c (process_alt_operands): Don't match BLKmode
6635 and non BLKmode operands.
6636
6637 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6638
6639 PR target/85026
6640 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6641 Clean up attributes.
6642
6643 2018-03-23 Richard Biener <rguenther@suse.de>
6644
6645 PR debug/85020
6646 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6647 we are going to emit early debug for LTO.
6648
6649 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6650
6651 PR inline-asm/85034
6652 * function.c (match_asm_constraints_1): Don't optimize if input
6653 doesn't satisfy general_operand predicate for output's mode.
6654
6655 PR inline-asm/85022
6656 * alias.c (write_dependence_p): Don't require for x_canonicalized
6657 non-VOIDmode if x has VOIDmode.
6658
6659 PR sanitizer/85029
6660 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6661 just don't try to optimize it rather than assert it never happens.
6662
6663 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6664
6665 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6666 macro expansions for definition of ST_INTERNAL_<mode> and
6667 LD_INTERNAL_<mode> builtins.
6668 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6669 Remove prototype.
6670 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6671 function.
6672 (altivec_expand_st_builtin): Likewise.
6673 (altivec_expand_builtin): Remove calls to deleted functions.
6674 (rs6000_address_for_altivec): Delete this function.
6675 * config/rs6000/vector.md: Remove expands for
6676 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6677
6678 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6679
6680 PR target/84826
6681 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6682 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6683 re-computing once computed.
6684 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6685 (arm_init_machine_status): Initialize
6686 machine->static_chain_stack_bytes.
6687
6688 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6689
6690 PR target/84760
6691 * doc/extend.texi: Add four new prototypes for vec_ld.
6692 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6693 definitions for more logical presentation.
6694 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6695 entries for V1TI variants of __builtin_altivec_ld builtin.
6696 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6697 handling of V1TI variant of LVX icode pattern.
6698 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6699 (rs6000_gimple_fold_builtin): Likewise.
6700 (altivec_init_builtins): Add code to define
6701 __builtin_altivec_lvx_v1ti function.
6702
6703 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6704
6705 PR inline-asm/84941
6706 * function.c (match_asm_constraints_1): Don't do the optimization
6707 if input isn't a REG, SUBREG, MEM or constant.
6708
6709 2018-03-22 Tom de Vries <tom@codesourcery.com>
6710
6711 PR tree-optimization/84956
6712 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6713 bb_has_abnormal_pred.
6714
6715 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6716
6717 PR sanitizer/85018
6718 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6719 DECL_INITIAL (decl) to decl at the end.
6720 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6721 adjust the comment.
6722
6723 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6724
6725 * doc/extend.texi (__builtin_tgmath): Document when complex
6726 integer types are treated as _Complex _Float64.
6727
6728 2018-03-21 Tom de Vries <tom@codesourcery.com>
6729
6730 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6731
6732 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6733
6734 PR tree-optimization/84960
6735 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6736 if it is ENTRY block, move them into single succ of ENTRY in that case.
6737
6738 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6739
6740 PR tree-optimization/84811
6741 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6742 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6743 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6744 (known_subrange_p): Update accordingly. Cast each value involved
6745 in the size comparison, rather than casting the result of the
6746 subtraction.
6747
6748 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6749
6750 PR tree-optimization/84982
6751 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6752 by flipping the least significant bit rather than all bits from
6753 bitpos to bitpos + bitsize - 1.
6754
6755 2018-03-21 Nathan Sidwell <nathan@acm.org>
6756
6757 * doc/extend.texi (Deprecated Features): Remove mention of
6758 long-deleted deprecations.
6759
6760 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6761
6762 PR jit/84288
6763 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6764 * configure: Regenerate.
6765
6766 2018-03-21 Tom de Vries <tom@codesourcery.com>
6767
6768 PR tree-optimization/83126
6769 * tree-parloops.c (num_phis): New function.
6770 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6771
6772 2018-03-21 Nathan Sidwell <nathan@acm.org>
6773
6774 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6775 mention anon-struct/union members and trailing attributes.
6776
6777 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6778
6779 PR tree-optimization/84969
6780 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6781 builtin memset partitions if they set different rhs values.
6782
6783 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6784
6785 PR rtl-optimization/84989
6786 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6787 VEC_DUPLICATE with scalar result mode.
6788
6789 2018-03-21 Martin Liska <mliska@suse.cz>
6790
6791 PR ipa/84963
6792 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6793 not intended return statement.
6794
6795 2018-03-21 Martin Liska <mliska@suse.cz>
6796
6797 PR target/84988
6798 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6799 (chkp_find_bound_slots_1): Limit number of iterations.
6800
6801 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6802
6803 PR target/84838
6804 * Minor grammar fixes for x86 options.
6805
6806 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6807
6808 PR debug/84875
6809 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6810 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6811
6812 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6813
6814 PR target/83789
6815 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6816 (altivec_lvx_<mode>_1op): Likewise.
6817 (altivec_stvx_<mode>_2op): Likewise.
6818 (altivec_stvx_<mode>_1op): Likewise.
6819 (altivec_lvx_<VM2:mode>): New define_expand.
6820 (altivec_stvx_<VM2:mode>): Likewise.
6821 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6822 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6823 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6824 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6825 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6826 (rs6000_gen_lvx): Likewise.
6827 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6828 (altivec_expand_stv_builtin): Likewise.
6829 (altivec_expand_builtin): Likewise.
6830 * config/rs6000/vector.md: Likewise.
6831
6832 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6833
6834 PR target/82518
6835 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6836 BYTES_BIG_ENDIAN.
6837
6838 2018-03-20 Richard Biener <rguenther@suse.de>
6839
6840 PR target/84986
6841 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6842 sign-conversions as zero, fall back to standard scalar_stmt
6843 cost for the rest.
6844
6845 2018-03-20 Martin Liska <mliska@suse.cz>
6846
6847 PR ipa/84825
6848 * predict.c (rebuild_frequencies): Handle case when we have
6849 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6850
6851 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6852
6853 PR target/84990
6854 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6855 flag_section_anchors.
6856 * varasm.c (use_blocks_for_decl_p): Remove hack for
6857 dw2_force_const_mem.
6858
6859 PR target/84845
6860 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6861 to ...
6862 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
6863 be created, use lowpart_subreg of operands[0] rather than operands[0]
6864 itself.
6865 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6866 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6867 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6868 and n constraint instead of aarch64_shift_imm_di and Usd.
6869 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6870 (*aarch64_<optab>_reg_minus<mode>3): ... this.
6871
6872 2018-03-20 Sudakshina Das <sudi.das@arm.com>
6873
6874 PR target/82989
6875 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6876 to favor GPR over NEON registers.
6877 (<shift>di3_neon): Likewise.
6878
6879 2018-03-20 Tom de Vries <tom@codesourcery.com>
6880
6881 PR target/84952
6882 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6883 (nvptx_process_pars): Emit bar.sync asap and alap.
6884
6885 2018-03-20 Tom de Vries <tom@codesourcery.com>
6886
6887 PR target/84954
6888 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6889 seen_label if seen_label is already set.
6890
6891 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6892
6893 PR target/84945
6894 * config/i386/i386.c (fold_builtin_cpu): For features above 31
6895 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6896 Use 1U instead of 1. Formatting fixes.
6897
6898 PR c/84953
6899 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6900 instead of TREE_TYPE (s1) for the return value.
6901
6902 2018-03-19 Jakub Jelinek <jakub@redhat.com>
6903
6904 PR tree-optimization/84946
6905 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6906 bitsize + bitsize in poly_uint64 rather than poly_int64.
6907
6908 PR sanitizer/78651
6909 * dwarf2asm.c: Include fold-const.c.
6910 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6911 of decl rather than decl itself.
6912
6913 PR rtl-optimization/84643
6914 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6915
6916 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
6917
6918 PR sanitizer/78651
6919 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6920 calling assemble_variable.
6921
6922 2018-03-19 Sudakshina Das <sudi.das@arm.com>
6923
6924 PR target/81647
6925 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6926 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6927
6928 2018-03-19 Jim Wilson <jimw@sifive.com>
6929
6930 PR bootstrap/84856
6931 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6932 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6933 (riscv_first_stack_step): Likewise.
6934 (riscv_option_override): Use STACK_BOUNDARY instead of
6935 MIN_STACK_BOUNDARY.
6936 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6937 MIN_STACK_BOUNDARY.
6938 (BIGGEST_ALIGNMENT): Set to 128.
6939 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6940 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6941 STACK_BOUNDARY.
6942
6943 2018-03-19 Richard Biener <rguenther@suse.de>
6944
6945 PR tree-optimization/84933
6946 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6947 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6948
6949 2018-03-19 Richard Biener <rguenther@suse.de>
6950
6951 PR tree-optimization/84859
6952 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6953 (cond_if_else_store_replacement): Perform sinking operation on
6954 single-store BBs regardless of MAX_STORES_TO_SINK setting.
6955 Generalize what a BB with a single eligible store is.
6956
6957 2018-03-19 Richard Biener <rguenther@suse.de>
6958
6959 PR tree-optimization/84929
6960 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6961 chrec_is_positive against non-chrec arg.
6962
6963 2018-03-19 Tamar Christina <tamar.christina@arm.com>
6964
6965 PR target/84711
6966 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6967
6968 2018-03-18 Martin Liska <mliska@suse.cz>
6969
6970 PR rtl-optimization/84635
6971 * regrename.c (build_def_use): Use matches_mode only when
6972 matches >= 0.
6973
6974 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
6975
6976 PR tree-optimization/84913
6977 * tree-vect-loop.c (vectorizable_reduction): Don't try to
6978 vectorize chains of COND_EXPRs.
6979
6980 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6981
6982 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6983
6984 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6985
6986 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6987
6988 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6989
6990 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6991
6992 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6993 Kito Cheng <kito.cheng@gmail.com>
6994
6995 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
6996 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
6997 (nds32_adjust_reg_alloc_order): New function.
6998 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
6999
7000 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
7001
7002 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
7003 nds32_print_operand, nds32_print_operand_address): Use
7004 HOST_WIDE_INT_PRINT_DEC instead.
7005
7006 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
7007
7008 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
7009
7010 2018-03-17 Jakub Jelinek <jakub@redhat.com>
7011
7012 PR target/84902
7013 * config/i386/i386.c (initial_ix86_tune_features,
7014 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
7015 unsigned long long.
7016 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
7017 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
7018 rather than 1u << ix86_tune. Formatting fix.
7019 (ix86_option_override_internal): Change ix86_arch_mask from
7020 unsigned int to unsigned HOST_WIDE_INT, initialize to
7021 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
7022 (ix86_function_specific_restore): Likewise.
7023
7024 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7025
7026 PR target/84899
7027 * postreload.c (reload_combine_recognize_pattern): Perform
7028 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
7029 truncate_int_for_mode the result for the destination's mode.
7030
7031 PR c/84909
7032 * hsa-gen.c (mem_type_for_type): Fix comment typo.
7033 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
7034 Likewise.
7035 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7036 Likewise.
7037
7038 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
7039
7040 PR target/84876
7041 * lra-assigns.c (lra_split_hard_reg_for): Don't use
7042 regno_allocno_class_array and sorted_pseudos.
7043 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
7044 insns where regno is used.
7045
7046 2018-03-16 Martin Liska <mliska@suse.cz>
7047
7048 PR ipa/84833
7049 * multiple_target.c (create_dispatcher_calls): Redirect
7050 reference in the symbol table.
7051
7052 2018-03-16 Martin Liska <mliska@suse.cz>
7053
7054 PR ipa/84722
7055 * multiple_target.c (create_dispatcher_calls): Redirect also
7056 an alias.
7057
7058 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7059
7060 PR c++/79937
7061 PR c++/82410
7062 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
7063 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
7064 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
7065
7066 2018-03-16 Julia Koval <julia.koval@intel.com>
7067
7068 * doc/invoke.texi (Skylake Server): Add CLWB.
7069 Cannonlake): Remove CLWB.
7070
7071 2018-03-16 Jakub Jelinek <jakub@redhat.com>
7072
7073 PR tree-optimization/84841
7074 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
7075 1 << 3.
7076 (FLOAT_ONE_CONST_TYPE): Define.
7077 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
7078 (sort_by_operand_rank): Put entries with higher constant_type last
7079 rather than first to match comments.
7080
7081 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
7082
7083 * config/nios2/nios2.md (movsi_internal): Fix thinko in
7084 split predicate.
7085
7086 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7087
7088 PR c++/79085
7089 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
7090 check and use address of target always.
7091
7092 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
7093
7094 PR target/84574
7095 * config/i386/i386.c (indirect_thunk_needed): Update comments.
7096 (indirect_thunk_bnd_needed): Likewise.
7097 (indirect_thunks_used): Likewise.
7098 (indirect_thunks_bnd_used): Likewise.
7099 (indirect_return_needed): New.
7100 (indirect_return_bnd_needed): Likewise.
7101 (output_indirect_thunk_function): Add a bool argument for
7102 function return.
7103 (output_indirect_thunk_function): Don't generate alias for
7104 function return thunk.
7105 (ix86_code_end): Call output_indirect_thunk_function to generate
7106 function return thunks.
7107 (ix86_output_function_return): Set indirect_return_bnd_needed
7108 and indirect_return_needed instead of indirect_thunk_bnd_needed
7109 and indirect_thunk_needed.
7110
7111 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
7112
7113 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
7114 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
7115 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
7116
7117 2018-03-15 David Malcolm <dmalcolm@redhat.com>
7118 Paul Hua <paul.hua.gm@gmail.com>
7119
7120 PR c/84852
7121 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
7122
7123 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
7124
7125 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
7126 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
7127 resp. SFmode cases.
7128
7129 2018-03-15 Tamar Christina <tamar.christina@arm.com>
7130
7131 PR target/84711
7132 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
7133 instead of GET_MODE_SIZE when comparing Units.
7134
7135 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7136
7137 PR target/68256
7138 * varasm.c (hash_section): Return an unchangeble hash value
7139 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
7140 Return !aarch64_can_use_per_function_literal_pools_p ().
7141
7142 2018-03-15 Jakub Jelinek <jakub@redhat.com>
7143
7144 PR target/84860
7145 * optabs.c (emit_conditional_move): Pass address of cmode's copy
7146 rather than address of cmode as last argument to prepare_cmp_insn.
7147
7148 2018-03-15 Julia Koval <julia.koval@intel.com>
7149
7150 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
7151 F_AVX512VNNI, F_AVX512BITALG): New.
7152
7153 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
7154
7155 PR target/83451
7156 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
7157 insn for floating-point loads and stores.
7158
7159 2018-03-14 Carl Love <cel@us.ibm.com>
7160
7161 * config/rs6000/rs6000-c.c: Add macro definitions for
7162 ALTIVEC_BUILTIN_VEC_PERMXOR.
7163 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
7164 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
7165 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
7166 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
7167 UNSPEC_VPERMXOR.
7168 * config/doc/extend.texi: Add prototypes for vec_permxor.
7169
7170 2018-03-14 David Malcolm <dmalcolm@redhat.com>
7171
7172 PR c/84852
7173 * diagnostic-show-locus.c (class layout_point): Convert m_line
7174 from int to linenum_type.
7175 (line_span::comparator): Use linenum "compare" function when
7176 comparing line numbers.
7177 (test_line_span): New function.
7178 (layout_range::contains_point): Convert param "row" from int to
7179 linenum_type.
7180 (layout_range::intersects_line_p): Likewise.
7181 (layout::will_show_line_p): Likewise.
7182 (layout::print_source_line): Likewise.
7183 (layout::should_print_annotation_line_p): Likewise.
7184 (layout::print_annotation_line): Likewise.
7185 (layout::print_leading_fixits): Likewise.
7186 (layout::annotation_line_showed_range_p): Likewise.
7187 (struct line_corrections): Likewise for field m_row.
7188 (line_corrections::line_corrections): Likewise for param "row".
7189 (layout::print_trailing_fixits): Likewise.
7190 (layout::get_state_at_point): Likewise.
7191 (layout::get_x_bound_for_row): Likewise.
7192 (layout::print_line): Likewise.
7193 (diagnostic_show_locus): Likewise for locals "last_line" and
7194 "row".
7195 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
7196 * input.c (selftest::test_linenum_comparisons): New function.
7197 (selftest::input_c_tests): Call it.
7198 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
7199 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
7200 * selftest.h (ASSERT_GT): New macro.
7201 (ASSERT_GT_AT): New macro.
7202 (ASSERT_LT): New macro.
7203 (ASSERT_LT_AT): New macro.
7204
7205 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
7206
7207 PR rtl-optimization/84780
7208 * combine.c (distribute_links): Don't make a link based on pc_rtx.
7209
7210 2018-03-14 Martin Liska <mliska@suse.cz>
7211
7212 * tree.c (record_node_allocation_statistics): Use
7213 get_stats_node_kind.
7214 (get_stats_node_kind): New function extracted from
7215 record_node_allocation_statistics.
7216 (free_node): Use get_stats_node_kind.
7217
7218 2018-03-14 Richard Biener <rguenther@suse.de>
7219
7220 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
7221 that the value-set of ANTIC_IN doesn't grow.
7222
7223 Revert
7224 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7225 member.
7226 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7227 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7228
7229 2018-03-14 Julia Koval <julia.koval@intel.com>
7230
7231 * config.gcc (icelake-client, icelake-server): New.
7232 (icelake): Remove.
7233 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
7234 (initial_ix86_arch_features): Ditto.
7235 (PTA_SKYLAKE): Add SGX.
7236 (PTA_ICELAKE): Remove.
7237 (PTA_ICELAKE_CLIENT): New.
7238 (PTA_ICELAKE_SERVER): New.
7239 (ix86_option_override_internal): Split up icelake on icelake client and
7240 icelake server.
7241 (get_builtin_code_for_version): Ditto.
7242 (fold_builtin_cpu): Ditto.
7243 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
7244 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
7245 * config/i386/i386.h (processor_type): Ditto.
7246 * doc/invoke.texi: Ditto.
7247
7248 2018-03-14 Jakub Jelinek <jakub@redhat.com>
7249
7250 PR sanitizer/83392
7251 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7252 INTEGER_CST offset, add it together with bitpos / 8 and
7253 sign extend based on POINTER_SIZE.
7254
7255 PR target/84844
7256 Revert
7257 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
7258
7259 PR target/78090
7260 * config/i386/constraints.md (Yc): New register constraint.
7261 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7262 Use Yc constraint for alternative 2 of operand 0. Remove
7263 preferred_for_speed attribute.
7264
7265 2018-03-14 Richard Biener <rguenther@suse.de>
7266
7267 PR tree-optimization/84830
7268 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7269 with the old one to avoid oscillations.
7270
7271 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
7272
7273 PR target/83712
7274 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7275 pseudos.
7276 (assign_by_spills): Return a flag of reload assignment failure.
7277 Do not process the reload assignment failures. Do not spill other
7278 reload pseudos if they has the same reg class. Update n if
7279 necessary.
7280 (lra_assign): Add a return arg. Set up from the result of
7281 assign_by_spills call.
7282 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7283 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7284 usage_insns if it is not NULL.
7285 (spill_hard_reg_in_range): New function.
7286 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7287 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7288 function prototypes.
7289 (lra_assign): Change prototype.
7290 * lra.c (lra): Add code to deal with fails by splitting hard reg
7291 live ranges.
7292
7293 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
7294
7295 * config/riscv/riscv.opt (mrelax): New option.
7296 * config/riscv/riscv.c (riscv_file_start): Emit ".option
7297 "norelax" when riscv_mrelax is disabled.
7298 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7299
7300 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7301
7302 PR target/84743
7303 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7304 reassociation for int modes.
7305
7306 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7307
7308 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7309 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7310 for big-endian.
7311 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7312 * config/aarch64/aarch64-sve.md
7313 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7314 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7315 (*extend<mode><Vwide>2): Rename to...
7316 (aarch64_sve_extend<mode><Vwide>2): ...this.
7317 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7318 renaming the old pattern to...
7319 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
7320 unsigned packs.
7321 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7322 define_expand, renaming the old pattern to...
7323 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7324 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7325 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7326 account when deciding which SVE instruction the optab should use.
7327 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7328
7329 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7330
7331 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7332 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7333 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7334 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7335 (tlsdesc_small_<mode>): Turn a define_expand and use
7336 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
7337 (tlsdesc_small_advsimd_<mode>): ...this.
7338 (tlsdesc_small_sve_<mode>): New pattern.
7339
7340 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7341
7342 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7343 (UNSPEC_UMUL_HIGHPART): New constants.
7344 (MUL_HIGHPART): New int iteraor.
7345 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7346 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7347 define_expand.
7348 (*<su>mul<mode>3_highpart): New define_insn.
7349
7350 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7351
7352 PR lto/84805
7353 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7354 incomplete types.
7355
7356 2018-03-13 Martin Liska <mliska@suse.cz>
7357
7358 PR ipa/84658.
7359 * (sem_item_optimizer::sem_item_optimizer): Initialize new
7360 vector.
7361 (sem_item_optimizer::~sem_item_optimizer): Release it.
7362 (sem_item_optimizer::merge_classes): Register variable aliases.
7363 (sem_item_optimizer::fixup_pt_set): New function.
7364 (sem_item_optimizer::fixup_points_to_sets): Likewise.
7365 * ipa-icf.h: Declare new variables and functions.
7366
7367 2018-03-13 Jakub Jelinek <jakub@redhat.com>
7368
7369 PR middle-end/84834
7370 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7371 integer_pow2p@2 and test integer_pow2p in condition.
7372 (A < 0 ? C : 0): Similarly for @1.
7373
7374 PR middle-end/84831
7375 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7376 characters starting at p contain '\0' character, don't look beyond
7377 that.
7378
7379 PR target/84827
7380 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7381 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7382
7383 PR target/84828
7384 * reg-stack.c (change_stack): Change update_end var from int to
7385 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7386 also call set_block_for_insn on the newly added insns and rescan.
7387
7388 PR target/84786
7389 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7390 on the last operand.
7391
7392 PR c++/84704
7393 * tree.c (stabilize_reference_1): Return save_expr (e) for
7394 STATEMENT_LIST even if it doesn't have side-effects.
7395
7396 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
7397
7398 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7399
7400 2018-03-12 Renlin Li <renlin.li@arm.com>
7401
7402 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7403 aarch64_output_scalar_simd_mov_immediate.
7404
7405 2018-03-12 Martin Sebor <msebor@redhat.com>
7406
7407 PR tree-optimization/83456
7408 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7409 for perfectly overlapping calls to memcpy.
7410 (gimple_fold_builtin_memory_chk): Same.
7411 (gimple_fold_builtin_strcpy): Handle no-warning.
7412 (gimple_fold_builtin_stxcpy_chk): Same.
7413 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7414
7415 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7416
7417 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7418 parameter. Use it for SFmode.
7419 (rs6000_function_arg_advance_1): Adjust.
7420 (rs6000_function_arg): Adjust.
7421 (rs6000_gimplify_va_arg): Pass false for that new parameter.
7422
7423 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7424
7425 PR rtl-optimization/84169
7426 PR rtl-optimization/84780
7427 * combine.c (can_combine_p): Check for a 2-insn combination whether
7428 the destination register is used between the two insns, too.
7429
7430 2018-03-12 Richard Biener <rguenther@suse.de>
7431
7432 PR tree-optimization/84803
7433 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7434 for refs DR analysis didn't process.
7435
7436 2018-03-12 Richard Biener <rguenther@suse.de>
7437
7438 PR tree-optimization/84777
7439 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7440 force-vectorize loops ignore whether we are optimizing for size.
7441
7442 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
7443
7444 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7445 (TARGET_MD_ASM_ADJUST): Define.
7446
7447 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
7448 Kito Cheng <kito.cheng@gmail.com>
7449 Chung-Ju Wu <jasonwucj@gmail.com>
7450
7451 * config/nds32/nds32.c (nds32_compute_stack_frame,
7452 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7453 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7454 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7455 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7456 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7457 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7458 * config/nds32/nds32.md (prologue, epilogue): Use macro
7459 NDS32_V3PUSH_AVAILABLE_P to do checking.
7460
7461 2018-03-11 Jakub Jelinek <jakub@redhat.com>
7462
7463 PR debug/58150
7464 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7465 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7466 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
7467 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
7468 addition of most attributes on !orig_type_die or the attribute not
7469 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7470
7471 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7472 Chung-Ju Wu <jasonwucj@gmail.com>
7473
7474 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7475 __NDS32_VH__ macro.
7476 * config/nds32/nds32.opt (mvh): New option.
7477
7478 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7479 Chung-Ju Wu <jasonwucj@gmail.com>
7480
7481 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7482 function.
7483 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7484 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7485 definition.
7486
7487 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7488 Chung-Ju Wu <jasonwucj@gmail.com>
7489
7490 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7491 function.
7492 * config/nds32/nds32-multiple.md (strlensi): New pattern.
7493 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7494
7495 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
7496 Kito Cheng <kito.cheng@gmail.com>
7497 Chung-Ju Wu <jasonwucj@gmail.com>
7498
7499 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7500 UNSPEC_FFMISM and UNSPEC_FLMISM.
7501 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7502 for ffb, ffmism and flmism.
7503 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7504 (unspec_ffmism): Ditto.
7505 (unspec_flmism): Ditto.
7506 (nds32_expand_builtin_impl): Check if string extension is available.
7507 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7508 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7509
7510 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
7511
7512 Reverting patch:
7513 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7514
7515 PR target/83712
7516 * lra-assigns.c (assign_by_spills): Return a flag of reload
7517 assignment failure. Do not process the reload assignment
7518 failures. Do not spill other reload pseudos if they has the same
7519 reg class.
7520 (lra_assign): Add a return arg. Set up from the result of
7521 assign_by_spills call.
7522 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7523 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7524 usage_insns if it is not NULL.
7525 (spill_hard_reg_in_range): New function.
7526 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7527 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7528 function prototypes.
7529 (lra_assign): Change prototype.
7530 * lra.c (lra): Add code to deal with fails by splitting hard reg
7531 live ranges.
7532
7533 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
7534
7535 PR target/84807
7536 * config/i386/i386.opt: Replace Enforcment with Enforcement.
7537
7538 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
7539
7540 PR debug/84620
7541 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7542 (dw_val_node): Add val_symbolic_view.
7543 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7544 (symview_upper_bound): New.
7545 (new_line_info_table): Initialize symviews_since_reset.
7546 (dwarf2out_source_line): Count symviews_since_reset and set
7547 symview_upper_bound.
7548 (dw_val_equal_p): Handle symview.
7549 (add_AT_symview): New.
7550 (print_dw_val): Handle symview.
7551 (attr_checksum, attr_checksum_ordered): Likewise.
7552 (same_dw_val_p, size_of_die): Likewise.
7553 (value_format, output_die): Likewise.
7554 (add_high_low_attributes): Use add_AT_symview for entry_view.
7555 (dwarf2out_finish): Reset symview_upper_bound, clear
7556 zero_view_p.
7557
7558 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
7559
7560 PR target/83969
7561 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7562 Add strict argument and use it.
7563 (rs6000_split_multireg_move): Update for new strict argument.
7564 (mem_operand_gpr): Disallow all non-offsettable addresses.
7565 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7566
7567 2018-03-09 Jakub Jelinek <jakub@redhat.com>
7568
7569 PR target/84772
7570 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7571 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7572 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7573
7574 PR c++/84767
7575 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7576 decl, use remap_type if we want to use the type.
7577
7578 2018-03-09 Martin Sebor <msebor@redhat.com>
7579
7580 PR tree-optimization/84526
7581 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7582 Remove dead code.
7583 (builtin_access::generic_overlap): Be prepared to handle non-array
7584 base objects.
7585
7586 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
7587
7588 PR rtl-optimization/84682
7589 * lra-constraints.c (process_address_1): Check is_address flag
7590 for address constraints.
7591 (process_alt_operands): Likewise.
7592 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7593 preprocess_constraints.
7594 * recog.h (preprocess_constraints): Add oploc parameter.
7595 Adjust callers.
7596 * recog.c (preprocess_constraints): Test address_operand for
7597 CT_ADDRESS constraints.
7598
7599 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7600
7601 PR target/83712
7602 * lra-assigns.c (assign_by_spills): Return a flag of reload
7603 assignment failure. Do not process the reload assignment
7604 failures. Do not spill other reload pseudos if they has the same
7605 reg class.
7606 (lra_assign): Add a return arg. Set up from the result of
7607 assign_by_spills call.
7608 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7609 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7610 usage_insns if it is not NULL.
7611 (spill_hard_reg_in_range): New function.
7612 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7613 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7614 function prototypes.
7615 (lra_assign): Change prototype.
7616 * lra.c (lra): Add code to deal with fails by splitting hard reg
7617 live ranges.
7618
7619 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7620
7621 PR target/83193
7622 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7623 Accept complain bool parameter. Only emit errors if it is true.
7624 (arm_parse_cpu_option_name): Likewise.
7625 (arm_target_thumb_only): Adjust callers of the above.
7626 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7627 prototype to take a default true bool parameter.
7628 (arm_parse_arch_option_name): Likewise.
7629
7630 2018-03-09 David Malcolm <dmalcolm@redhat.com>
7631 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7632
7633 PR jit/64089
7634 PR jit/84288
7635 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7636 * configure: Regenerate.
7637 * configure.ac ("linker --version-script option"): New.
7638 ("linker soname option"): New.
7639
7640 2018-03-09 Richard Biener <rguenther@suse.de>
7641
7642 PR tree-optimization/84775
7643 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7644 immediate uses of predicate stmts and mark them modified.
7645
7646 Revert
7647 PR tree-optimization/84178
7648 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7649 to caller.
7650 (version_loop_for_if_conversion): Delay update_ssa call.
7651 (tree_if_conversion): Delay update_ssa until after predicate
7652 insertion.
7653
7654 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
7655
7656 PR target/84763
7657 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7658 when the function accesses prior frames.
7659
7660 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7661
7662 PR debug/84456
7663 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7664 gen_llsym, otherwise call maybe_gen_llsym.
7665
7666 PR inline-asm/84742
7667 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7668 has ',' character inside of it.
7669
7670 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7671
7672 PR target/84748
7673 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7674 as clobbering CC_REGNUM.
7675
7676 2018-03-08 Richard Biener <rguenther@suse.de>
7677
7678 PR middle-end/84552
7679 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7680 (follow_copies_to_constant): Do not follow SSA names registered
7681 for update.
7682
7683 2018-03-08 Richard Biener <rguenther@suse.de>
7684
7685 PR tree-optimization/84178
7686 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7687 to caller.
7688 (version_loop_for_if_conversion): Delay update_ssa call.
7689 (tree_if_conversion): Delay update_ssa until after predicate
7690 insertion.
7691
7692 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7693
7694 PR tree-optimization/84178
7695 * tree-if-conv.c (release_bb_predicate): Remove the
7696 the assertion that the stmts have NULL use_ops.
7697 Discard the statements, asserting that they haven't
7698 yet been added to a BB.
7699
7700 2018-03-08 Richard Biener <rguenther@suse.de>
7701
7702 PR tree-optimization/84746
7703 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7704 (phi_translate): Pass in destination ANTIC_OUT set.
7705 (phi_translate_1): Likewise. For a simplified result lookup
7706 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7707 (phi_translate_set): Adjust.
7708 (do_pre_regular_insertion): Likewise.
7709 (do_pre_partial_partial_insertion): Likewise.
7710
7711 2018-03-08 Martin Liska <mliska@suse.cz>
7712
7713 PR gcov-profile/84735
7714 * doc/gcov.texi: Document usage of profile files.
7715 * gcov-io.h: Document changes in the format.
7716
7717 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7718
7719 PR debug/84404
7720 PR debug/84408
7721 * dwarf2out.c (struct dw_line_info_table): Update comments for
7722 view == -1.
7723 (FORCE_RESET_NEXT_VIEW): New.
7724 (FORCE_RESETTING_VIEW_P): New.
7725 (RESETTING_VIEW_P): Check for -1 too.
7726 (ZERO_VIEW_P): Likewise.
7727 (new_line_info_table): Force-reset next view.
7728 (dwarf2out_begin_function): Likewise.
7729 (dwarf2out_source_line): Simplify zero_view_p initialization.
7730 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7731 view directly. Omit view when omitting .loc at line 0.
7732
7733 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7734
7735 PR tree-optimization/84740
7736 * tree-switch-conversion.c (process_switch): Call build_constructors
7737 only if info.phi_count is non-zero.
7738
7739 PR tree-optimization/84739
7740 * tree-tailcall.c (find_tail_calls): Check call arguments against
7741 DECL_ARGUMENTS (current_function_decl) rather than
7742 DECL_ARGUMENTS (func) when checking for tail recursion.
7743
7744 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7745
7746 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7747 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7748 Volker Reichelt's entry and add entries for people that perform
7749 GCC fuzzy testing and report numerous bugs.
7750
7751 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7752
7753 PR target/82411
7754 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7755 readonly data in sdata, if that is disabled.
7756 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7757 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7758 -mreadonly-in-sdata option.
7759
7760 2018-03-07 Martin Sebor <msebor@redhat.com>
7761
7762 PR tree-optimization/84468
7763 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7764 basic block when looking for nul assignment.
7765
7766 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7767
7768 PR target/84277
7769 * except.h (output_function_exception_table): Adjust prototype.
7770 * except.c (output_function_exception_table): Remove FNNAME parameter
7771 and add SECTION parameter. Ouput one part of the table at a time.
7772 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7773 the first part of the exception table and emit unwind directives.
7774 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7775 (i386_pe_seh_cold_init): Likewise.
7776 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7777 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7778 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7779 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7780 * config/i386/winnt.c: Include except.h.
7781 (struct seh_frame_state): Add reg_offset, after_prologue and
7782 in_cold_section fields.
7783 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7784 (i386_pe_seh_cold_init): New function.
7785 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7786 to seh->in_cold_section.
7787 (seh_emit_push): Record the offset of the push.
7788 (seh_emit_save): Record the offet of the save.
7789 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7790 Test seh->after_prologue to disregard the epilogue.
7791 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7792 (i386_pe_end_cold_function): New function.
7793
7794 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7795
7796 PR fortran/84565
7797 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7798 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7799
7800 PR c++/84704
7801 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7802 on tmp_var.
7803 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7804 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7805
7806 PR middle-end/84723
7807 * multiple_target.c: Include tree-inline.h and intl.h.
7808 (expand_target_clones): Diagnose and fail if node->definition and
7809 !tree_versionable_function_p (node->decl).
7810
7811 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7812
7813 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7814 sprint_ul.
7815 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7816 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7817 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7818
7819 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7820
7821 PR target/84710
7822 * combine.c (try_combine): Use reg_or_subregno instead of handling
7823 just paradoxical SUBREGs and REGs.
7824
7825 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7826
7827 * config/arc/arc.c (arc_finalize_pic): Remove function.
7828 (arc_must_save_register): We use single base PIC register, remove
7829 checks to save/restore the PIC register.
7830 (arc_expand_prologue): Likewise.
7831 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7832 Remove.
7833 (arc_verify_short): Likewise.
7834 (arc_attr_type): Likewise.
7835 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7836 (walk_stores): Likewise.
7837 (arc_address_cost): Make it static.
7838 (arc_verify_short): Likewise.
7839 (branch_dest): Likewise.
7840 (arc_attr_type): Likewise.
7841 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7842 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7843 (arc_final_prescan_insn): Remove inserting the nops due to
7844 hardware hazards. It is done in reorg step.
7845 (insn_length_variant_t): Remove.
7846 (insn_length_parameters_t): Likewise.
7847 (arc_insn_length_parameters): Likewise.
7848 (arc_get_insn_variants): Likewise.
7849 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7850
7851 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7852
7853 PR inline-asm/84683
7854 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7855 assertion failure.
7856
7857 PR tree-optimization/84687
7858 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7859 on new_node->decl.
7860 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7861
7862 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7863
7864 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7865 Rename to ppc_speculation_barrier.
7866 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7867 __builtin_ppc_speculation_barrier.
7868
7869 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7870
7871 PR target/84700
7872 * combine.c (combine_simplify_rtx): Don't try to simplify if
7873 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7874 are equal to x.
7875
7876 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
7877
7878 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7879 to 32 bytes when compiling for POWER9.
7880
7881 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7882
7883 PR target/84564
7884 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7885 regparm >= 3 with no arg reg available also for calls with
7886 flag_force_indirect_call. Pass decl to ix86_function_regparm.
7887
7888 PR target/84524
7889 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7890 orig,vex.
7891 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
7892
7893 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
7894
7895 PR target/84264
7896 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7897
7898 2018-03-05 Richard Biener <rguenther@suse.de>
7899
7900 PR tree-optimization/84486
7901 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7902 When inserting a __builtin_assume_aligned call set the LHS
7903 SSA name alignment info accordingly.
7904
7905 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
7906
7907 PR tree-optimization/84114
7908 * config/aarch64/aarch64.c (aarch64_reassociation_width)
7909 Avoid reassociation of FLOAT_MODE addition.
7910
7911 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
7912
7913 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7914 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7915 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7916 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7917 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7918 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7919 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7920 and -mwbnoinvd.
7921 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7922 __builtin_ia32_wbinvd): New builtins.
7923 (SPECIAL_ARGS2): New.
7924 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7925 (SPECIAL_ARGS2): New.
7926 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7927 (ix86_valid_target_attribute_inner_p): Ditto.
7928 (ix86_init_mmx_sse_builtins): Add special_args2.
7929 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7930 TARGET_WBNOINVD_P): New.
7931 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7932 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7933 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7934 * config/i386/immintrin.h (_wbinvd): New intrinsic.
7935 * config/i386/pconfigintrin.h: New file.
7936 * config/i386/wbnoinvdintrin.h: Ditto.
7937 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
7938 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7939
7940 2018-03-05 Richard Biener <rguenther@suse.de>
7941
7942 PR tree-optimization/84670
7943 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7944 member.
7945 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7946 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7947 (compute_antic_aux): Only assert the number of values in ANTIC_IN
7948 doesn't grow if all successors (recursively) were visited at least
7949 once.
7950
7951 2018-03-05 Richard Biener <rguenther@suse.de>
7952
7953 PR tree-optimization/84650
7954 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7955 if executed in the loop pipeline.
7956
7957 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
7958
7959 * doc/configfiles.texi (Configuration Files): Move info about
7960 conditionalizing $target-protos.h to...
7961 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
7962 differs from $target-protos.h.
7963
7964 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
7965 Chung-Ju Wu <jasonwucj@gmail.com>
7966
7967 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7968 * config/nds32/nds32-multiple.md (setmemsi): Define.
7969 * config/nds32/nds32-memory-manipulation.c
7970 (nds32_gen_dup_4_byte_to_word_value): New.
7971 (emit_setmem_word_loop): New.
7972 (emit_setmem_byte_loop): New.
7973 (nds32_expand_setmem_loop): New.
7974 (nds32_expand_setmem_loop_v3m): New.
7975 (nds32_expand_setmem_unroll): New.
7976 (nds32_expand_setmem): New.
7977
7978 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7979 Chung-Ju Wu <jasonwucj@gmail.com>
7980
7981 * config/nds32/nds32-memory-manipulation.c
7982 (nds32_emit_load_store): New.
7983 (nds32_emit_post_inc_load_store): New.
7984 (nds32_emit_mem_move): New.
7985 (nds32_emit_mem_move_block): New.
7986 (nds32_expand_movmemsi_loop_unknown_size): New.
7987 (nds32_expand_movmemsi_loop_known_size): New.
7988 (nds32_expand_movmemsi_loop): New.
7989 (nds32_expand_movmemsi_unroll): New.
7990 (nds32_expand_movmemqi): Rename ...
7991 (nds32_expand_movmemsi): ... to this.
7992 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7993 (movmemsi): ... to this.
7994 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
7995 (nds32_expand_movmemsi): ... to this.
7996
7997 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7998 Monk Chiang <sh.chiang04@gmail.com>
7999 Chung-Ju Wu <jasonwucj@gmail.com>
8000
8001 * config/nds32/nds32-protos.h
8002 (nds32_expand_load_multiple): New arguments.
8003 (nds32_expand_store_multiple): Ditto.
8004 (nds32_valid_multiple_load_store): Rename ...
8005 (nds32_valid_multiple_load_store_p): ... to this.
8006 * config/nds32/nds32-memory-manipulation.c
8007 (nds32_expand_load_multiple): Refine implementation.
8008 (nds32_expand_store_multiple): Ditto.
8009 * config/nds32/nds32-multiple.md
8010 (load_multiple): Update nds32_expand_load_multiple interface.
8011 (store_multiple): Update nds32_expand_store_multiple interface.
8012 * config/nds32/nds32-predicates.c
8013 (nds32_valid_multiple_load_store): Rename ...
8014 (nds32_valid_multiple_load_store_p): ... to this and refine
8015 implementation.
8016 * config/nds32/predicates.md
8017 (nds32_load_multiple_and_update_address_operation): New predicate.
8018 (nds32_store_multiple_and_update_address_operation): New predicate.
8019
8020 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
8021 Chung-Ju Wu <jasonwucj@gmail.com>
8022
8023 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
8024 (combo): New attribute.
8025 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
8026
8027 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
8028
8029 * config/nds32/nds32.opt: Change -mcmodel= default value.
8030
8031 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
8032 Monk Chiang <sh.chiang04@gmail.com>
8033 Chung-Ju Wu <jasonwucj@gmail.com>
8034
8035 * config/nds32/constants.md (unspec_element): New enum.
8036 * config/nds32/constraints.md (Umw): New constraint.
8037 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
8038 * config/nds32/nds32-intrinsic.md: Likewise.
8039 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
8040 (nds32_valid_smw_lwm_base_p): New.
8041 (nds32_output_smw_single_word): New.
8042 (nds32_output_lmw_single_word): New.
8043 (nds32_expand_unaligned_load): New.
8044 (nds32_expand_unaligned_store): New.
8045 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
8046 (nds32_output_smw_single_word): Declare.
8047 (nds32_output_lmw_single_word): Declare.
8048 (nds32_expand_unaligned_load): Declare.
8049 (nds32_expand_unaligned_store): Declare.
8050 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
8051 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
8052 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
8053 NDS32_BUILTIN_UASTORE_DW.
8054 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
8055 predicate.
8056
8057 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
8058 Kito Cheng <kito.cheng@gmail.com>
8059 Chung-Ju Wu <jasonwucj@gmail.com>
8060
8061 * config/nds32/nds32-intrinsic.c
8062 (nds32_expand_builtin_null_ftype_reg): Delete.
8063 (nds32_expand_builtin_reg_ftype_imm): Ditto.
8064 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
8065 (nds32_read_argument): New.
8066 (nds32_legitimize_target): Ditto.
8067 (nds32_legitimize_argument): Ditto.
8068 (nds32_check_constant_argument): Ditto.
8069 (nds32_expand_unop_builtin): Ditto.
8070 (nds32_expand_unopimm_builtin): Ditto.
8071 (nds32_expand_binop_builtin): Ditto.
8072 (nds32_builtin_decl_impl): Ditto.
8073 (builtin_description): Ditto.
8074 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
8075 (nds32_init_builtins_impl): Ditto.
8076 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
8077 (nds32_builtin_decl): New.
8078 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
8079 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
8080
8081 2018-03-02 Jeff Law <law@redhat.com>
8082
8083 * reorg.c (stop_search_p): Handle DEBUG_INSN.
8084 (redundant_insn, fill_simple_delay_slots): Likewise.
8085 (fill_slots_from_thread): Likewise.
8086 * resource.c (mark_referenced_resources): Likewise.
8087 (mark_set_resources, find_dead_or_set_registers): Likewise.
8088
8089 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8090
8091 * substring-locations.h (format_warning_va): Formatting fix for
8092 ATTRIBUTE_GCC_DIAG.
8093 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
8094 argument.
8095 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
8096 * substring-locations.c: Include intl.h.
8097 (format_warning_va): Turned into small wrapper around
8098 format_warning_n_va, renamed to ...
8099 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
8100 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
8101 use ngettext.
8102 (format_warning_at_substring_n): New function.
8103 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
8104 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
8105 format_warning_at_substring with just a shorter name instead of
8106 const function pointer.
8107 (fmtwarn_n): New function.
8108 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
8109 appropriate, get rid of all the fmtstr temporaries, move conditionals
8110 with G_() wrapped string literals directly into fmtwarn arguments,
8111 cast dir.len to (int), formatting fixes.
8112
8113 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
8114
8115 * doc/invoke.texi: Remove "Cilk Plus" references.
8116
8117 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8118 Richard Biener <rguenther@suse.de>
8119
8120 PR ipa/84628
8121 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
8122 for error or warning attributes if CALL_FROM_THUNK_P is set.
8123 Formatting fixes.
8124
8125 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8126
8127 PR target/56540
8128 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
8129 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
8130
8131 PR target/56540
8132 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
8133 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
8134
8135 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
8136 instead of -1U in last predictors element's probability member.
8137
8138 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8139
8140 PR ipa/83983
8141 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8142 arguments if they are comparable.
8143
8144 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8145
8146 PR tree-optimization/84634
8147 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
8148 masks and masked_loop_p with a single loop_masks, making sure it's
8149 null for bb vectorization.
8150
8151 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
8152
8153 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8154 (vect_analyze_data_ref_access): Use loop->safe_len rather than
8155 loop->force_vectorize to check whether there is no alias.
8156
8157 2018-03-02 Jakub Jelinek <jakub@redhat.com>
8158
8159 PR target/84614
8160 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
8161 prototypes.
8162 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
8163 comments.
8164 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
8165 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
8166 instead of a loop around prev_real_insn.
8167 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
8168 prev_real_insn.
8169
8170 PR inline-asm/84625
8171 * config/i386/i386.c (ix86_print_operand): Use conditional
8172 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
8173 zero vector.
8174
8175 2018-03-02 Richard Biener <rguenther@suse.de>
8176
8177 PR tree-optimization/84427
8178 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
8179 (bitmap_set_subtract_values): Rewrite to handle multiple
8180 exprs per value.
8181 (clean): Likewise.
8182 (prune_clobbered_mems): Likewise.
8183 (phi_translate): Take edge instead of pred/phiblock.
8184 (phi_translate_1): Likewise.
8185 (phi_translate_set): Likewise. Insert all translated
8186 exprs for a value into the set, keeping possibly multiple
8187 expressions per value.
8188 (compute_antic_aux): Adjust for phi_translate changes.
8189 When intersecting union the expressions and prune those
8190 not in the final value set, keeping possibly multiple
8191 expressions per value. Do not use value-insertion
8192 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
8193 all expressions. Add verification that the value-sets
8194 only shrink during iteration.
8195 (compute_partial_antic_aux): Adjust for the phi_translate changes.
8196 (do_pre_regular_insertion): Likewise.
8197 (do_pre_partial_partial_insertion): Likewise.
8198
8199 2018-03-02 Richard Biener <rguenther@suse.de>
8200
8201 PR target/82005
8202 * config/darwin.c (saved_debug_info_level): New static global.
8203 (darwin_asm_lto_start): Disable debug info generation for LTO out.
8204 (darwin_asm_lto_end): Restore debug info generation settings.
8205
8206 2018-03-01 Martin Liska <mliska@suse.cz>
8207
8208 PR sanitizer/82484
8209 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8210 volatile arguments.
8211
8212 2018-03-01 Richard Biener <rguenther@suse.de>
8213
8214 PR debug/84645
8215 * dwarf2out.c (gen_variable_die): Properly handle late VLA
8216 type annotation with LTO when debug was disabled at compile-time.
8217
8218 2018-03-01 Matthew Fortune <mfortune@gmail.com>
8219
8220 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
8221 XINT with INTVAL.
8222 (mips_final_postscan_insn): Likewise.
8223
8224 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
8225
8226 PR rtl-optimization/84528
8227 * alias.c (init_alias_target): Add commentary.
8228 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
8229 a unique base value if the frame pointer is not eliminated
8230 to the stack pointer.
8231
8232 2018-03-01 Tom de Vries <tom@codesourcery.com>
8233
8234 PR rtl-optimization/83327
8235 * lra-int.h (hard_regs_spilled_into): Declare.
8236 * lra.c (hard_regs_spilled_into): Define.
8237 (init_reg_info): Init hard_regs_spilled_into.
8238 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
8239 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
8240 (process_bb_lives): Handle hard_regs_spilled_into.
8241 (lra_create_live_ranges_1): Before doing liveness propagation, clear
8242 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
8243
8244 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
8245
8246 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8247 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8248 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8249 * config/rs6000/aix72.h: New file.
8250
8251 2018-02-28 Jakub Jelinek <jakub@redhat.com>
8252
8253 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8254 instead of warning_at with conditional singular and plural messages
8255 where possible.
8256
8257 PR target/52991
8258 * stor-layout.c (update_alignment_for_field): For
8259 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8260 && !DECL_PACKED (field), do the alignment update, just use
8261 only desired_align instead of MAX (type_align, desired_align)
8262 as the alignment.
8263 (place_field): Don't do known_align < desired_align handling
8264 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8265 is non-NULL, instead do it after rli->prev_field handling and
8266 only if not within a bitfield word. For DECL_PACKED (field)
8267 use type_align of BITS_PER_UNIT.
8268
8269 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
8270
8271 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8272 superfluous parentheses and trailing spaces.
8273
8274 2018-02-28 Richard Biener <rguenther@suse.de>
8275
8276 PR tree-optimization/84584
8277 * graphite-scop-detection.c (scop_detection::add_scop): Discard
8278 SCoPs with fake exit edge.
8279
8280 2018-02-28 Martin Liska <mliska@suse.cz>
8281
8282 PR testsuite/84597
8283 * timevar.c (timer::print): Fix format to properly print 100%
8284 values.
8285
8286 2018-02-28 Richard Biener <rguenther@suse.de>
8287
8288 PR middle-end/84607
8289 * genmatch.c (capture_info::walk_match): Do not mark
8290 captured expressions without operands as expr_p given
8291 they act more like predicates and should be subject to
8292 "lost tail" side-effect preserving.
8293
8294 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
8295
8296 PR rtl-optimization/81611
8297 * auto-inc-dec.c (attempt_change): Move dead note from
8298 mem_insn if it's the next use of regno
8299 (find_address): Take address use of reg holding
8300 non-incremented value. Add parm to limit search to the named
8301 reg only.
8302 (merge_in_block): Attempt to use a mem insn that is the next
8303 use of the original regno.
8304
8305 2018-02-27 Martin Sebor <msebor@redhat.com>
8306
8307 PR c++/83871
8308 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8309 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8310
8311 2018-02-27 Martin Sebor <msebor@redhat.com>
8312
8313 PR translation/84207
8314 * diagnostic-core.h (warning_n, error_n, inform_n): Change
8315 n argument to unsigned HOST_WIDE_INT.
8316 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8317 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
8318 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8319 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8320
8321 2018-02-27 Richard Biener <rguenther@suse.de>
8322
8323 PR tree-optimization/84512
8324 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8325 Do not use the estimate returned from record_stmt_cost for
8326 the scalar iteration cost but sum properly using add_stmt_cost.
8327
8328 2018-02-27 Richard Biener <rguenther@suse.de>
8329
8330 PR tree-optimization/84466
8331 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8332 Adjust last change to less strictly validate use operands.
8333
8334 2018-02-27 Martin Liska <mliska@suse.cz>
8335
8336 PR gcov-profile/84548
8337 * gcov.c (process_file): Allow partial overlap and consider it
8338 also as group functions.
8339 (output_lines): Properly calculate range of lines for a group.
8340
8341 2018-02-27 Martin Liska <mliska@suse.cz>
8342
8343 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8344 'ggc' suffixes. Change first column width.
8345 (timer::print): Fix formatting of the column.
8346
8347 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
8348
8349 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8350 preserve inline entry blocks for the sake of debug inline
8351 entry point markers alone.
8352 (remove_unused_locals): Suggest in comments a better place to
8353 force the preservation of inline entry blocks that are
8354 otherwise unused, but do not preserve them.
8355
8356 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8357
8358 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8359
8360 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8361
8362 PR target/84039
8363 * config/i386/constraints.md (Bs): Replace
8364 ix86_indirect_branch_register with
8365 TARGET_INDIRECT_BRANCH_REGISTER.
8366 (Bw): Likewise.
8367 * config/i386/i386.md (indirect_jump): Likewise.
8368 (tablejump): Likewise.
8369 (*sibcall_memory): Likewise.
8370 (*sibcall_value_memory): Likewise.
8371 Peepholes of indirect call and jump via memory: Likewise.
8372 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8373 (*sibcall_value_GOT_32): Likewise.
8374 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8375 (GOT_memory_operand): Likewise.
8376 (call_insn_operand): Likewise.
8377 (sibcall_insn_operand): Likewise.
8378 (GOT32_symbol_operand): Likewise.
8379 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8380
8381 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8382
8383 PR rtl-optimization/83496
8384 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8385 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
8386 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8387 redundant insn, if any.
8388 (relax_delay_slots): Likewise.
8389 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8390
8391 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
8392
8393 PR tree-optimization/83965
8394 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8395 that grouped statements are part of a reduction chain. Return
8396 true if the statement is not marked as a reduction itself but
8397 is part of a group.
8398 (vect_recog_dot_prod_pattern): Don't check whether the statement
8399 is part of a group here.
8400 (vect_recog_sad_pattern): Likewise.
8401 (vect_recog_widen_sum_pattern): Likewise.
8402
8403 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8404
8405 PR debug/84545
8406 * final.c (rest_of_clean_state): Also look for calls inside sequences.
8407
8408 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8409
8410 PR target/84530
8411 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8412 the bool argument.
8413 (ix86_output_indirect_function_return): New prototype.
8414 (ix86_split_simple_return_pop_internal): Likewise.
8415 * config/i386/i386.c (indirect_return_via_cx): New.
8416 (indirect_return_via_cx_bnd): Likewise.
8417 (indirect_thunk_name): Handle return va CX_REG.
8418 (output_indirect_thunk_function): Create alias for
8419 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8420 (ix86_output_indirect_jmp): Remove the bool argument.
8421 (ix86_output_indirect_function_return): New function.
8422 (ix86_split_simple_return_pop_internal): Likewise.
8423 * config/i386/i386.md (*indirect_jump): Don't pass false
8424 to ix86_output_indirect_jmp.
8425 (*tablejump_1): Likewise.
8426 (simple_return_pop_internal): Change it to define_insn_and_split.
8427 Call ix86_split_simple_return_pop_internal to split it for
8428 -mfunction-return=.
8429 (simple_return_indirect_internal): Call
8430 ix86_output_indirect_function_return instead of
8431 ix86_output_indirect_jmp.
8432
8433 2018-02-26 Jakub Jelinek <jakub@redhat.com>
8434
8435 PR bootstrap/84405
8436 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8437 memset and value initialization afterwards.
8438
8439 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
8440
8441 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8442
8443 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8444
8445 PR target/84521
8446 * common/config/aarch64/aarch64-common.c
8447 (aarch_option_optimization_table[]): Switch
8448 off fomit-frame-pointer
8449
8450 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8451 Chung-Ju Wu <jasonwucj@gmail.com>
8452
8453 * config/nds32/nds32-multiple.md (load_multiple): Disallow
8454 volatile memory.
8455 (store_multiple): Ditto.
8456
8457 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8458
8459 * config.gcc: Add --with-cpu support for nds32 target.
8460 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8461 * config/nds32/nds32.opt: Add -mcpu= option.
8462
8463 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
8464
8465 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8466 isel=yes): Warn for these deprecated options.
8467
8468 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
8469
8470 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8471 ISA_2_5_MASKS_EMBEDDED.
8472
8473 2018-02-23 Jakub Jelinek <jakub@redhat.com>
8474
8475 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8476 p->max as pointers rather than using iterative_hash_expr.
8477
8478 2018-02-23 Carl Love <cel@us.ibm.com>
8479
8480 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8481 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8482 BU_P8V_OVERLOAD_2.
8483 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8484 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8485 P8V_BUILTIN_VEC_VUNSIGNED2.
8486
8487 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
8488
8489 PR target/81572
8490 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8491 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8492 LRA_UNKNOWN_ALT.
8493 * lra-constraints.c (curr_insn_transform): Set up
8494 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
8495 LRA_UNKNOWN_ALT.
8496 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8497 * lra-eliminations.c (spill_pseudos): Ditto.
8498 (process_insn_for_elimination): Ditto.
8499 * lra-lives.c (reg_early_clobber_p): Use the new macros.
8500 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8501 LRA_NON_CLOBBERED_ALT.
8502
8503 2018-02-22 Martin Sebor <msebor@redhat.com>
8504
8505 PR tree-optimization/84480
8506 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8507 to maybe_diag_stxncpy_trunc. Call it.
8508 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8509 from gimple_fold_builtin_strcpy. Print inlining stack.
8510 (handle_builtin_stxncpy): Print inlining stack.
8511 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8512
8513 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
8514
8515 PR target/84176
8516 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8517 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8518 and -fcheck-pointer-bounds are used together.
8519 (indirect_thunk_prefix): New enum.
8520 (indirect_thunk_need_prefix): New function.
8521 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
8522 "_nt" instead of "_bnd" for NOTRACK prefix.
8523 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8524 (output_indirect_thunk_function): Likewise.
8525 (): Likewise.
8526 (ix86_code_end): Update output_indirect_thunk_function calls.
8527 (ix86_output_indirect_branch_via_reg): Replace
8528 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8529 (ix86_output_indirect_branch_via_push): Likewise.
8530 (ix86_output_function_return): Likewise.
8531 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8532 incompatible with -fcf-protection=branch and
8533 -fcheck-pointer-bounds.
8534
8535 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8536
8537 PR target/83335
8538 * config/aarch64/aarch64.c (aarch64_print_address_internal):
8539 Change gcc_assert call to output_operand_lossage.
8540
8541 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8542
8543 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8544
8545 2018-02-22 DJ Delorie <dj@redhat.com>
8546 Sebastian Perta <sebastian.perta@renesas.com>
8547 Oleg Endo <olegendo@gcc.gnu.org>
8548
8549 * config/rx/rx.c (rx_rtx_costs): New function.
8550 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8551
8552 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
8553
8554 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8555
8556 2018-02-22 Martin Liska <mliska@suse.cz>
8557
8558 PR driver/83193
8559 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8560 Add "native" as a possible value.
8561
8562 2018-02-22 Martin Liska <mliska@suse.cz>
8563
8564 PR driver/83193
8565 * config/i386/i386.c (ix86_option_override_internal):
8566 Add "native" as a possible value for -march and -mtune.
8567
8568 2018-02-22 Jakub Jelinek <jakub@redhat.com>
8569
8570 PR target/84502
8571 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8572 to all type variants.
8573
8574 PR tree-optimization/84503
8575 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8576 width as info->bitpos + info->bitsize - start.
8577 (merged_store_group::merge_overlapping): Simplify width computation.
8578 (check_no_overlap): New function.
8579 (imm_store_chain_info::try_coalesce_bswap): Compute expected
8580 start + width and last_order of the group, fail if check_no_overlap
8581 fails.
8582 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8583 to group if check_no_overlap fails.
8584
8585 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8586
8587 * config/rs6000/altivec.md: Delete contraint arguments to
8588 define_expand, define_split, and define_peephole2, and in
8589 define_insn_and_split if always unused.
8590 * config/rs6000/darwin.md: Ditto.
8591 * config/rs6000/dfp.md: Ditto.
8592 * config/rs6000/rs6000.md: Ditto.
8593 * config/rs6000/sync.md: Ditto.
8594 * config/rs6000/vector.md: Ditto.
8595 * config/rs6000/vsx.md: Ditto.
8596
8597 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8598
8599 * config/rs6000/altivec.md: Write output control strings as braced
8600 blocks instead of double-quoted strings.
8601 * config/rs6000/darwin.md: Ditto.
8602 * config/rs6000/rs6000.md: Ditto.
8603 * config/rs6000/vector.md: Ditto.
8604 * config/rs6000/vsx.md: Ditto.
8605
8606 2018-02-21 Jason Merrill <jason@redhat.com>
8607
8608 PR c++/84314 - ICE with templates and fastcall attribute.
8609 * attribs.c (build_type_attribute_qual_variant): Remove assert.
8610
8611 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8612
8613 * ipa-cp.c (determine_versionability): Fix comment typos.
8614
8615 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8616
8617 PR c/84229
8618 * ipa-cp.c (determine_versionability): Do not version functions caling
8619 va_arg_pack.
8620
8621 2018-02-21 Martin Liska <mliska@suse.cz>
8622
8623 PR driver/83193
8624 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8625 Add "native" as a possible value.
8626 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
8627 the macro when native cpu detection is available.
8628
8629 2018-02-21 Martin Liska <mliska@suse.cz>
8630
8631 PR driver/83193
8632 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8633 Add "native" as a possible value.
8634 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8635 when native cpu detection is available.
8636
8637 2018-02-21 Jakub Jelinek <jakub@redhat.com>
8638 Martin Sebor <msebor@redhat.com>
8639
8640 PR tree-optimization/84478
8641 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8642 false.
8643 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8644 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8645 support which is conservatively correct, for 2 only stay conservative
8646 for maxlen. Formatting and comment capitalization fixes. Add STRICT
8647 argument to the 2 argument get_range_strlen, adjust 6 arg
8648 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8649 false.
8650 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8651 (gimple_fold_builtin_strlen): Pass true as last argument to
8652 get_range_strlen.
8653
8654 2018-02-20 Martin Sebor <msebor@redhat.com>
8655
8656 PR middle-end/84095
8657 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8658 (builtin_memref::set_base_and_offset): Same. Handle inner references.
8659 (builtin_memref::builtin_memref): Factor out parts into
8660 set_base_and_offset and call it.
8661
8662 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8663
8664 PR middle-end/84406
8665 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8666 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8667 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
8668 search at the associated MODE_INT.
8669
8670 2018-02-20 Jeff Law <law@redhat.com>
8671
8672 PR middle-end/82123
8673 PR tree-optimization/81592
8674 PR middle-end/79257
8675 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8676 for range data rather than using global data.
8677 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8678 range data rather than using global data.
8679 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8680 pass it to children as needed.
8681 (struct directive::fmtresult): Similarly.
8682 (struct directive::set_width): Similarly.
8683 (struct directive::set_precision): Similarly.
8684 (format_integer, format_directive, parse_directive): Similarly.
8685 (format_none): Accept unnamed vr_values parameter.
8686 (format_percent, format_floating, format_character): Similarly.
8687 (format_string, format_plain): Similarly.
8688 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8689 the EVRP range analyzer for range data rather than using global data.
8690 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8691 gimple-ssa-evrp-analyze.h
8692 (class sprintf_dom_walker): Add after_dom_children member function.
8693 Add evrp_range_analyzer member.
8694 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8695 range analyzer as needed.
8696 (sprintf_dom_walker::after_dom_children): New member function.
8697 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8698 if not optimizing.
8699 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8700 (evrp_range_analyzer::pop_to_marker): Likewise.
8701
8702 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8703
8704 PR tree-optimization/84419
8705 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8706 with the required type if its current type is compatible but
8707 different.
8708
8709 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8710
8711 PR middle-end/82004
8712 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8713 after vectorization.
8714
8715 2018-02-20 Martin Liska <mliska@suse.cz>
8716
8717 PR driver/83193
8718 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8719 possible values if we don't have a hint.
8720
8721 2018-02-20 Martin Liska <mliska@suse.cz>
8722
8723 PR c/84310
8724 PR target/79747
8725 * final.c (shorten_branches): Build align_tab array with one
8726 more element.
8727 * opts.c (finish_options): Add alignment option limit check.
8728 (MAX_CODE_ALIGN): Likewise.
8729 (MAX_CODE_ALIGN_VALUE): Likewise.
8730 * doc/invoke.texi: Document maximum allowed option value for
8731 all -falign-* options.
8732
8733 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8734
8735 PR target/84146
8736 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8737 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8738 * var-tracking.c (emit_note_insn_var_location): Remove all references
8739 to NOTE_INSN_CALL_ARG_LOCATION.
8740 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8741 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8742 Use copy_rtx_if_shared.
8743 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8744 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8745 (dwarf2out_var_location): Remove handling of
8746 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8747 on call_insn.
8748 * final.c (final_scan_insn): Remove all references to
8749 NOTE_INSN_CALL_ARG_LOCATION.
8750 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8751 before dumping final insns.
8752 * except.c (emit_note_eh_region_end): Remove all references to
8753 NOTE_INSN_CALL_ARG_LOCATION.
8754 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8755 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8756 * config/arc/arc.c (hwloop_optimize): Likewise.
8757 * config/arm/arm.c (create_fix_barrier): Likewise.
8758 * config/s390/s390.c (s390_chunkify_start): Likewise.
8759 * config/sh/sh.c (find_barrier): Likewise.
8760 * config/i386/i386.c (rest_of_insert_endbranch,
8761 ix86_seh_fixup_eh_fallthru): Likewise.
8762 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8763 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8764 * config/frv/frv.c (frv_function_prologue): Likewise.
8765 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8766 reg note.
8767 (note_outside_basic_block_p): Remove all references to
8768 NOTE_INSN_CALL_ARG_LOCATION.
8769 * gengtype.c (adjust_field_rtx_def): Likewise.
8770 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8771 Likewise.
8772 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8773 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8774
8775 PR c++/84444
8776 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8777 is ADDR_EXPR.
8778
8779 PR tree-optimization/84452
8780 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8781 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8782 is NULL.
8783
8784 2018-02-19 Martin Liska <mliska@suse.cz>
8785
8786 PR sanitizer/82183
8787 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8788
8789 2018-02-19 Martin Liska <mliska@suse.cz>
8790 Richard Sandiford <richard.sandiford@linaro.org>
8791
8792 PR tree-optimization/82491
8793 * gimple-fold.c (get_base_constructor): Make earlier bail out
8794 to prevent ubsan.
8795
8796 2018-02-19 Carl Love <cel@us.ibm.com>
8797
8798 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8799 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8800 BU_P8V_OVERLOAD_1.
8801 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8802 P8V_BUILTIN_VEC_NEG.
8803
8804 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8805
8806 * config/rl78/rl78.md (movdf): New define expand.
8807
8808 2018-02-19 Martin Liska <mliska@suse.cz>
8809
8810 PR other/80589
8811 * doc/invoke.texi: Fix typo.
8812 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8813
8814 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8815
8816 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8817 handle rs6000_single_float and rs6000_double_float specially for
8818 e500 family CPUs.
8819
8820 2018-02-16 Jeff Law <law@redhat.com>
8821
8822 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8823 (pop_regs): Use it.
8824
8825 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8826
8827 PR ipa/84425
8828 * ipa-inline.c (inline_small_functions): Fix a typo.
8829
8830 2018-02-16 Nathan Sidwell <nathan@acm.org>
8831
8832 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8833
8834 2018-02-16 Carl Love <cel@us.ibm.com>
8835
8836 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8837 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8838 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8839 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8840 expansion to P8V_BUILTIN_VEC_FLOAT2.
8841
8842 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8843
8844 PR rtl-optimization/70023
8845 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8846 src_regno into account.
8847
8848 2018-02-16 Carl Love <cel@us.ibm.com>
8849
8850 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8851 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8852 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8853 * config/rs6000/rs6000.c: Remove case statements for
8854 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8855 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8856 and P9V_BUILTIN_VEC_VINSERT4B.
8857 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8858 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8859 * config/rs6000/vsx.md:
8860 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8861 vec_insert4b.
8862
8863 2018-02-16 Carl Love <cel@us.ibm.com>
8864
8865 * config/rs6000/altivec.h: Add builtin names vec_extract4b
8866 vec_insert4b.
8867 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8868 definitions.
8869 * config/rs6000/rs6000-c.c: Add the definitions for
8870 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8871 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8872 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8873 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
8874 definition for insert4b and define insn *insert3b_internal.
8875 * doc/extend.texi: Add documentation for vec_extract4b.
8876
8877 2018-02-16 Nathan Sidwell <nathan@acm.org>
8878
8879 * doc/extend.texi (Backwards Compatibility): Mention friend
8880 injection. Note for-scope is deprecated.
8881 * doc/invoke.texi (-ffriend-injection): Deprecate.
8882
8883 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
8884
8885 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8886 that moved to I2, also allow destinations that are a paradoxical
8887 subreg (instead of a normal reg).
8888
8889 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
8890
8891 PR target/83831
8892 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8893 to QImode.
8894
8895 2018-02-16 Richard Biener <rguenther@suse.de>
8896
8897 PR tree-optimization/84037
8898 PR tree-optimization/84016
8899 PR target/82862
8900 * config/i386/i386.c (ix86_builtin_vectorization_cost):
8901 Adjust vec_construct for the fact we need additional higher latency
8902 128bit inserts for AVX256 and AVX512 vector builds.
8903 (ix86_add_stmt_cost): Scale vector construction cost for
8904 elementwise loads.
8905
8906 2018-02-16 Richard Biener <rguenther@suse.de>
8907
8908 PR tree-optimization/84417
8909 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8910 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8911 (non_rewritable_lvalue_p): Likewise, use poly-ints.
8912
8913 2018-02-16 Martin Liska <mliska@suse.cz>
8914
8915 PR sanitizer/84307
8916 * internal-fn.def (ASAN_CHECK): Set proper flags.
8917 (ASAN_MARK): Likewise.
8918
8919 2018-02-16 Julia Koval <julia.koval@intel.com>
8920
8921 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8922 from PTA_CANNONLAKE.
8923
8924 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8925
8926 PR target/84272
8927 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8928 Use ++iter rather than iter++ for std::list iterators.
8929 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
8930 defer deleting them until all nodes in the forest are processed. Do
8931 free even leaf nodes. Change to_process into auto_vec.
8932
8933 PR bootstrap/84405
8934 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8935 * vec.h (vec_default_construct): Use memset instead of placement new
8936 if BROKEN_VALUE_INITIALIZATION is defined.
8937 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8938 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8939 is defined.
8940
8941 PR rtl-optimization/83723
8942 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8943 * lra.c (lra_substitute_pseudo): Likewise. If true, use
8944 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
8945 recursive calls.
8946 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8947 callers.
8948 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8949
8950 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
8951
8952 PR rtl-optimization/81443
8953 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8954 from inner REGs to paradoxical SUBREGs.
8955
8956 2018-02-16 Richard Biener <rguenther@suse.de>
8957
8958 PR tree-optimization/84399
8959 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8960 For operands we can analyze at their definition make sure we can
8961 analyze them at each use as well.
8962
8963 2018-02-16 Richard Biener <rguenther@suse.de>
8964
8965 PR tree-optimization/84190
8966 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8967 volatile accesses if the decl isn't volatile.
8968
8969 2018-02-15 Jason Merrill <jason@redhat.com>
8970
8971 PR c++/84314 - ICE with templates and fastcall attribute.
8972 * attribs.c (build_type_attribute_qual_variant): Don't clobber
8973 TYPE_CANONICAL on an existing type.
8974
8975 2018-02-15 Jakub Jelinek <jakub@redhat.com>
8976
8977 PR tree-optimization/84383
8978 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8979 dstoff nor call operand_equal_p if dstbase is NULL.
8980
8981 PR tree-optimization/84334
8982 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8983 also a CONSTANT_CLASS_P, punt.
8984
8985 2018-02-14 Jim Wilson <jimw@sifive.com>
8986
8987 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8988 first SMALL_OPERAND check. New local min_second_step. Move assert
8989 to where locals are set. Add TARGET_RVC support.
8990 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8991
8992 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
8993
8994 * doc/invoke.texi: Correct -Wformat-overflow code sample.
8995
8996 2018-02-14 Martin Sebor <msebor@redhat.com>
8997
8998 PR tree-optimization/83698
8999 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
9000 arrays constrain the offset range to their bounds.
9001 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
9002 (builtin_access::overlap): Avoid setting the size of overlap if it's
9003 already been set.
9004 (maybe_diag_overlap): Also consider arrays when deciding what values
9005 of offsets to include in diagnostics.
9006
9007 2018-02-14 Martin Sebor <msebor@redhat.com>
9008
9009 PR c/84108
9010 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
9011 that correspond to the kind of a declaration.
9012
9013 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
9014
9015 PR target/83984
9016 * config/pa/pa.md: Load address of PIC label using the linkage table
9017 if the label is nonlocal.
9018
9019 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
9020
9021 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
9022 warning message if user requests -maltivec=be.
9023 * doc/invoke.texi: Document deprecation of -maltivec=be.
9024
9025 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
9026
9027 PR target/84220
9028 * config/rs6000/rs6000-c.c: Update definitions for
9029 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
9030 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
9031
9032 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9033
9034 PR target/84239
9035 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
9036 add _get_ssp intrinsics. Remove argument from
9037 __builtin_ia32_rdssp[d|q].
9038 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
9039 * config/i386/i386-builtin.def: Remove argument from
9040 __builtin_ia32_rdssp[d|q].
9041 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
9042 ix86_expand_special_args_builtin for _rdssp[d|q].
9043 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
9044 Clear register before usage.
9045 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
9046 Add documentation for new _get_ssp and _inc_ssp intrinsics.
9047
9048 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
9049
9050 PR tree-optimization/84357
9051 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
9052 operand 1 of an ARRAY_REF too.
9053
9054 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
9055
9056 PR target/83831
9057 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
9058 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9059 declarations.
9060 (set_of_reg): New struct.
9061 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
9062 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
9063 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
9064 functions.
9065 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
9066 Split into bitclr, bitset, bitinvert patterns if appropriate.
9067 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
9068 use rx_fuse_in_memory_bitop.
9069 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
9070 to named insn, correct maximum insn length.
9071
9072 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
9073
9074 PR target/79242
9075 * machmode.def: Define a complex mode for PARTIAL_INT.
9076 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
9077 MODE_PARTIAL_INT.
9078 * doc/rtl.texi: Document CSPImode.
9079 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
9080 handling.
9081 (msp430_hard_regno_nregs_with_padding): Likewise.
9082
9083 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
9084
9085 PR target/84279
9086 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
9087
9088 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
9089
9090 PR rtl-optimization/84169
9091 * combine.c (try_combine): New variable split_i2i3. Set it to true if
9092 we generated a parallel as new i3 and we split that to new i2 and i3
9093 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
9094 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
9095 those to i2, not i1. Partially rewrite this scan code.
9096
9097 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9098
9099 PR c/82210
9100 * stor-layout.c (place_field): For variable length fields, adjust
9101 offset_align afterwards not just based on the field's alignment,
9102 but also on the size.
9103
9104 PR middle-end/84309
9105 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
9106 of exps and logs in the use_exp2 case.
9107
9108 2018-02-13 Jeff Law <law@redhat.com>
9109
9110 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
9111 entry for "vector".
9112
9113 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
9114 ARGS as unused.
9115
9116 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
9117
9118 PR debug/84342
9119 PR debug/84319
9120 * common.opt (gas-loc-support, gas-locview-support): New.
9121 (ginline-points, ginternal-reset-location-views): New.
9122 * doc/invoke.texi: Document them. Use @itemx where intended.
9123 (gvariable-location-views): Adjust.
9124 * target.def (reset_location_view): New.
9125 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
9126 (TARGET_RESET_LOCATION_VIEW): New.
9127 * doc/tm.texi: Rebuilt.
9128 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
9129 (dwarf2out_default_as_locview_support): New.
9130 (output_asm_line_debug_info): Use option variables.
9131 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
9132 (output_loc_list): Likewise.
9133 (add_high_low_attributes): Check option variables.
9134 Don't output entry view attribute in strict mode.
9135 (gen_inlined_subroutine_die): Check option variables.
9136 (dwarf2out_inline_entry): Likewise.
9137 (init_sections_and_labels): Likewise.
9138 (dwarf2out_early_finish): Likewise.
9139 (maybe_reset_location_view): New, from...
9140 (dwarf2out_var_location): ... here. Call it.
9141 * debug.h (dwarf2out_default_as_loc_support): Declare.
9142 (dwarf2out_default_as_locview_support): Declare.
9143 * hooks.c (hook_int_rtx_insn_0): New.
9144 * hooks.h (hook_int_rtx_insn_0): Declare.
9145 * toplev.c (process_options): Take -gas-loc-support and
9146 -gas-locview-support from dwarf2out. Enable
9147 -gvariable-location-views by default only with locview
9148 assembler support. Enable -ginternal-reset-location-views by
9149 default only if the target defines the corresponding hook.
9150 Enable -ginline-points by default if location views are
9151 enabled; force it disabled if statement frontiers are
9152 disabled.
9153 * tree-inline.c (expand_call_inline): Check option variables.
9154 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9155
9156 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
9157
9158 PR tree-optimization/84321
9159 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
9160 handling. Also check whether the anti-range contains any values
9161 that satisfy the mask; switch to a VR_RANGE if not.
9162
9163 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
9164
9165 PR sanitizer/84340
9166 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
9167
9168 2018-02-13 Martin Jambor <mjambor@suse.cz>
9169
9170 PR c++/83990
9171 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
9172 of call statements, also set location of a load to a temporary.
9173
9174 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
9175
9176 * config/rl78/rl78.c (add_vector_labels): New function.
9177 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
9178 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
9179 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
9180 which checks that no arguments are passed.
9181 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
9182 * doc/extend.texi: Documentation for the new attribute.
9183
9184 2018-02-13 Andreas Schwab <schwab@suse.de>
9185
9186 * config/riscv/linux.h (CPP_SPEC): Define.
9187
9188 2018-02-13 Jakub Jelinek <jakub@redhat.com>
9189
9190 PR target/84335
9191 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
9192 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
9193 OPTION_MASK_ISA_AES as first argument to def_builtin_const
9194 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
9195 instead of OPTION_MASK_ISA_PCLMUL as first argument to
9196 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
9197 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
9198 temporarily for AES and PCLMUL builtins.
9199
9200 PR tree-optimization/84339
9201 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
9202 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
9203 Formatting fixes.
9204
9205 PR middle-end/84309
9206 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
9207 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
9208 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
9209 inline function.
9210 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
9211 inline function.
9212 * omp-simd-clone.h: New file.
9213 * omp-simd-clone.c: Include omp-simd-clone.h.
9214 (expand_simd_clones): No longer static.
9215 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
9216 cgraph.h and omp-simd-clone.h.
9217 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
9218 (vect_recog_widen_shift_pattern): Formatting fix.
9219 (vect_pattern_recog_1): Don't check optab for calls.
9220
9221 PR target/84336
9222 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
9223 operands[2] into a REG before using gen_lowpart on it.
9224
9225 2018-02-12 Jeff Law <law@redhat.com>
9226
9227 PR target/83760
9228 * config/sh/sh.c (find_barrier): Consider a sibling call
9229 a barrier as well.
9230
9231 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
9232 successfully back substituting a reg.
9233
9234 2018-02-12 Richard Biener <rguenther@suse.de>
9235
9236 PR tree-optimization/84037
9237 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
9238 parameter, move visited init to caller.
9239 (vect_slp_analyze_operations): Separate cost from validity
9240 check, initialize visited once for all instances.
9241 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
9242 for all instances.
9243 * tree-vect-stmts.c (vect_model_simple_cost): Make early
9244 out an assert.
9245 (vect_model_promotion_demotion_cost): Likewise.
9246 (vectorizable_bswap): Guard cost modeling with !slp_node
9247 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9248 SLP stmts.
9249 (vectorizable_call): Likewise.
9250 (vectorizable_conversion): Likewise.
9251 (vectorizable_assignment): Likewise.
9252 (vectorizable_shift): Likewise.
9253 (vectorizable_operation): Likewise.
9254 (vectorizable_store): Likewise.
9255 (vectorizable_load): Likewise.
9256 (vectorizable_condition): Likewise.
9257 (vectorizable_comparison): Likewise.
9258
9259 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
9260
9261 PR sanitizer/84307
9262 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9263 (ASAN_MARK): Fix fnspec to account for return value, change pointer
9264 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9265
9266 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9267
9268 PR middle-end/83665
9269 * params.def (inline-min-speedup): Increase from 8 to 15.
9270 (max-inline-insns-auto): Decrease from 40 to 30.
9271 * ipa-split.c (consider_split): Add some buffer for function to
9272 be considered inlining candidate.
9273 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9274 default values.
9275
9276 2018-02-12 Richard Biener <rguenther@suse.de>
9277
9278 PR tree-optimization/84037
9279 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9280 matched stmts if we cannot swap the non-matched ones.
9281
9282 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9283
9284 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9285 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9286 _mm_maskz_scalef_round_ss): New intrinsics.
9287 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9288 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9289 __builtin_ia32_scalefss_round): Remove.
9290 (__builtin_ia32_scalefsd_mask_round,
9291 __builtin_ia32_scalefss_mask_round): New intrinsics.
9292 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9293 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9294 ((match_operand:VF_128 2 "<round_nimm_predicate>"
9295 "<round_constraint>")): Changed to ...
9296 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9297 "<round_scalar_constraint>")): ... this.
9298 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9299 %0, %1, %2<round_op3>}"): Changed to ...
9300 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9301 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9302 %2<round_scalar_mask_op3>}"): ... this.
9303 * config/i386/subst.md (round_scalar_nimm_predicate): New.
9304
9305 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9306
9307 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9308 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9309 (_mm_maskz_sqrt_round_ss): New intrinsics.
9310 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9311 (__builtin_ia32_sqrtsd_mask_round)
9312 (__builtin_ia32_sqrtss_mask_round): New builtins.
9313 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9314 (__builtin_ia32_sqrtss_round): Remove.
9315 (__builtin_ia32_sqrtsd_mask_round)
9316 (__builtin_ia32_sqrtss_mask_round): New builtins.
9317 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9318 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9319 ((match_operand:VF_128 1 "vector_operand"
9320 "xBm,<round_constraint>")): Changed to ...
9321 ((match_operand:VF_128 1 "vector_operand"
9322 "xBm,<round_scalar_constraint>")): ... this.
9323 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9324 %0, %2, %<iptr>1<round_op3>}): Changed to ...
9325 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9326 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9327 %<iptr>1<round_scalar_mask_op3>}): ... this.
9328 ((set_attr "prefix" "<round_prefix>")): Changed to ...
9329 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9330
9331 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
9332
9333 PR target/84266
9334 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9335 Cast vec_cmpeq result to correct type.
9336 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9337 Cast vec_cmpgt result to correct type.
9338
9339 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
9340
9341 * final.c (final_scan_insn_1): Renamed from...
9342 (final_scan_insn): ... this. New wrapper, to recover
9343 seen from the outermost call in recursive ones.
9344 * config/sparc/sparc.c (output_return): Drop seen from call.
9345 (output_sibcall): Likewise.
9346 * config/visium/visium.c (output_branch): Likewise.
9347
9348 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
9349
9350 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9351 function label.
9352
9353 2018-02-10 Alan Modra <amodra@gmail.com>
9354
9355 PR target/84300
9356 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9357 Specify LR as an input.
9358
9359 2018-02-10 Jakub Jelinek <jakub@redhat.com>
9360
9361 PR sanitizer/83987
9362 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9363 remove_member_access_dummy_vars): New functions.
9364 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9365 lower_omp_1, execute_lower_omp): Use them.
9366
9367 PR rtl-optimization/84308
9368 * shrink-wrap.c (spread_components): Release todo vector.
9369
9370 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
9371
9372 PR rtl-optimization/57193
9373 * ira-color.c (struct allocno_color_data): Add member
9374 conflict_allocno_hard_prefs.
9375 (update_conflict_allocno_hard_prefs): New.
9376 (bucket_allocno_compare_func): Add a preference based on
9377 conflict_allocno_hard_prefs.
9378 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9379 (color_allocnos): Remove a dead code. Initiate
9380 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
9381
9382 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9383
9384 PR target/84226
9385 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9386 constraint from =wa to wa. Avoid a subreg on the output operand,
9387 instead use a pseudo and subreg it in a move.
9388 (p9_xxbrd_<mode>): Changed to ...
9389 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9390 (p9_xxbrd_v2df): New expander.
9391 (p9_xxbrw_<mode>): Changed to ...
9392 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9393 (p9_xxbrw_v4sf): New expander.
9394
9395 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9396
9397 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9398
9399 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
9400
9401 PR target/83926
9402 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9403 multiply in 32-bit mode.
9404 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9405 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9406 mode.
9407
9408 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9409
9410 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9411 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9412 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9413 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9414
9415 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
9416
9417 PR lto/84213
9418 * dwarf2out.c (is_trivial_indirect_ref): New function.
9419 (dwarf2out_late_global_decl): Do not generate a location
9420 attribute for variables that have a non-trivial DECL_VALUE_EXPR
9421 and that are not defined in the current unit.
9422
9423 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9424
9425 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9426 instead of a libcall for UNORDERED.
9427
9428 2018-02-09 Tamar Christina <tamar.christina@arm.com>
9429
9430 PR target/82641
9431 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9432 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9433
9434 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9435
9436 PR target/PR84295
9437 * config/s390/s390.c (s390_set_current_function): Invoke
9438 s390_indirect_branch_settings also if fndecl didn't change.
9439
9440 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9441
9442 * config/rs6000/rs6000.md (blockage): Set length to zero.
9443
9444 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9445
9446 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9447
9448 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9449
9450 PR sanitizer/84285
9451 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9452 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9453 -static-lib*san.
9454
9455 PR debug/84252
9456 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9457 PARALLEL incoming that failed vt_get_decl_and_offset check.
9458
9459 PR middle-end/84237
9460 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9461 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9462 TREE_READONLY bit.
9463 (get_variable_section): For decls in named .bss* sections pass true as
9464 second argument to bss_initializer_p.
9465
9466 2018-02-09 Marek Polacek <polacek@redhat.com>
9467 Jakub Jelinek <jakub@redhat.com>
9468
9469 PR c++/83659
9470 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9471 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
9472 Sync some changes from cxx_fold_indirect_ref.
9473
9474 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9475
9476 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9477 markers.
9478 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9479 (BLOCK_INLINE_ENTRY_LABEL): New.
9480 (dwarf2out_var_location): Disregard inline entry markers.
9481 (inline_entry_data): New struct.
9482 (inline_entry_data_hasher): New hashtable type.
9483 (inline_entry_data_hasher::hash): New.
9484 (inline_entry_data_hasher::equal): New.
9485 (inline_entry_data_table): New variable.
9486 (add_high_low_attributes): Add DW_AT_entry_pc and
9487 DW_AT_GNU_entry_view attributes if a pending entry is found
9488 in inline_entry_data_table. Add old entry_pc attribute only
9489 if debug nonbinding markers are disabled.
9490 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9491 markers are enabled.
9492 (block_within_block_p, dwarf2out_inline_entry): New.
9493 (dwarf2out_finish): Check that no entries remained in
9494 inline_entry_data_table.
9495 * final.c (reemit_insn_block_notes): Handle inline entry notes.
9496 (final_scan_insn, notice_source_line): Likewise.
9497 (rest_of_clean_state): Skip inline entry markers.
9498 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9499 markers.
9500 * gimple.c (gimple_build_debug_inline_entry): New.
9501 * gimple.h (enum gimple_debug_subcode): Add
9502 GIMPLE_DEBUG_INLINE_ENTRY.
9503 (gimple_build_debug_inline_entry): Declare.
9504 (gimple_debug_inline_entry_p): New.
9505 (gimple_debug_nonbind_marker_p): Adjust.
9506 * insn-notes.def (INLINE_ENTRY): New.
9507 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9508 inline entry marker notes.
9509 (print_insn): Likewise.
9510 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9511 (INSN_DEBUG_MARKER_KIND): Likewise.
9512 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9513 * tree-inline.c (expand_call_inline): Build and insert
9514 debug_inline_entry stmt.
9515 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9516 inline entry blocks early, if nonbind markers are enabled.
9517 (dump_scope_block): Dump fragment info.
9518 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9519 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9520 (gimple_build_debug_inline_entry): New.
9521 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9522 Enable/disable inline entry points too.
9523 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9524 (DEBUG_INSN): Describe inline entry markers.
9525
9526 * common.opt (gvariable-location-views): New.
9527 (gvariable-location-views=incompat5): New.
9528 * config.in: Rebuilt.
9529 * configure: Rebuilt.
9530 * configure.ac: Test assembler for view support.
9531 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9532 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9533 * dwarf2out.c (var_loc_view): New typedef.
9534 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9535 (dwarf2out_locviews_in_attribute): New.
9536 (dwarf2out_locviews_in_loclist): New.
9537 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9538 (enum dw_line_info_opcode): Add LI_adv_address.
9539 (struct dw_line_info_table): Add view.
9540 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9541 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9542 (zero_view_p): New variable.
9543 (ZERO_VIEW_P): New macro.
9544 (output_asm_line_debug_info): New.
9545 (struct var_loc_node): Add view.
9546 (add_AT_view_list, AT_loc_list): New.
9547 (add_var_loc_to_decl): Add view param. Test it against last.
9548 (new_loc_list): Add view params. Record them.
9549 (AT_loc_list_ptr): Handle loc and view lists.
9550 (view_list_to_loc_list_val_node): New.
9551 (print_dw_val): Handle dw_val_class_view_list.
9552 (size_of_die): Likewise.
9553 (value_format): Likewise.
9554 (loc_list_has_views): New.
9555 (gen_llsym): Set vl_symbol too.
9556 (maybe_gen_llsym, skip_loc_list_entry): New.
9557 (dwarf2out_maybe_output_loclist_view_pair): New.
9558 (output_loc_list): Output view list or entries too.
9559 (output_view_list_offset): New.
9560 (output_die): Handle dw_val_class_view_list.
9561 (output_dwarf_version): New.
9562 (output_compilation_unit_header): Use it.
9563 (output_skeleton_debug_sections): Likewise.
9564 (output_rnglists, output_line_info): Likewise.
9565 (output_pubnames, output_aranges): Update version comments.
9566 (output_one_line_info_table): Output view numbers in asm comments.
9567 (dw_loc_list): Determine current endview, pass it to new_loc_list.
9568 Call maybe_gen_llsym.
9569 (loc_list_from_tree_1): Adjust.
9570 (add_AT_location_description): Create view list attribute if
9571 needed, check it's absent otherwise.
9572 (convert_cfa_to_fb_loc_list): Adjust.
9573 (maybe_emit_file): Call output_asm_line_debug_info for test.
9574 (dwarf2out_var_location): Reset views as needed. Precompute
9575 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
9576 attribute. Set view.
9577 (new_line_info_table): Reset next view.
9578 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9579 (dwarf2out_source_line): Likewise. Output view resets and labels to
9580 the assembler, or select appropriate line info opcodes.
9581 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9582 (optimize_string_length): Catch it. Adjust.
9583 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
9584 dw_val_class_view_list, and remove it if no longer needed.
9585 (hash_loc_list): Hash view numbers.
9586 (loc_list_hasher::equal): Compare them.
9587 (optimize_location_lists): Check whether a view list symbol is
9588 needed, and whether the locview attribute is present, and
9589 whether they match. Remove the locview attribute if no longer
9590 needed.
9591 (index_location_lists): Call skip_loc_list_entry for test.
9592 (dwarf2out_finish): Call output_asm_line_debug_info for test.
9593 Use output_dwarf_version.
9594 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9595 (struct dw_val_node): Add val_view_list.
9596 * final.c (SEEN_NEXT_VIEW): New.
9597 (set_next_view_needed): New.
9598 (clear_next_view_needed): New.
9599 (maybe_output_next_view): New.
9600 (final_start_function): Rename to...
9601 (final_start_function_1): ... this. Take pointer to FIRST,
9602 add SEEN parameter. Emit param bindings in the initial view.
9603 (final_start_function): Reintroduce SEEN-less interface.
9604 (final): Rename to...
9605 (final_1): ... this. Take SEEN parameter. Output final pending
9606 next view at the end.
9607 (final): Reintroduce seen-less interface.
9608 (final_scan_insn): Output pending next view before switching
9609 sections or ending a block. Mark the next view as needed when
9610 outputting variable locations. Notify debug backend of section
9611 changes, and of location view changes.
9612 (rest_of_handle_final): Adjust.
9613 * toplev.c (process_options): Autodetect value for debug variable
9614 location views option. Warn on incompat5 without -gdwarf-5.
9615 * doc/invoke.texi (gvariable-location-views): New.
9616 (gvariable-location-views=incompat5): New.
9617 (gno-variable-location-views): New.
9618
9619 2018-02-08 David Malcolm <dmalcolm@redhat.com>
9620
9621 PR tree-optimization/84136
9622 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9623 that the result of find_edge is non-NULL.
9624
9625 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9626
9627 PR target/83008
9628 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9629 storing integer register in SImode. Fix cost of 256 and 512
9630 byte aligned SSE register store.
9631
9632 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9633
9634 * config/i386/i386.c (ix86_multiplication_cost): Fix
9635 multiplication cost for TARGET_AVX512DQ.
9636
9637 2018-02-08 Marek Polacek <polacek@redhat.com>
9638
9639 PR tree-optimization/84238
9640 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9641 get_range_strlen.
9642
9643 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9644
9645 PR tree-optimization/84265
9646 * tree-vect-stmts.c (vectorizable_store): Don't treat
9647 VMAT_CONTIGUOUS accesses as grouped.
9648 (vectorizable_load): Likewise.
9649
9650 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9651
9652 PR tree-optimization/81635
9653 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9654 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9655 (test_round_for_mask): New functions.
9656 (wide_int_cc_tests): Call test_round_for_mask.
9657 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9658 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9659 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9660 range returned by get_range_info.
9661
9662 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9663
9664 PR ipa/81360
9665 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9666 * symtab.c: Include builtins.h
9667 (symtab_node::output_to_lto_symbol_table_p): Move here
9668 from lto-streamer-out.c:output_symbol_p.
9669 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9670 (output_symbol_p): Move all logic to symtab.c
9671 (produce_symtab): Update.
9672
9673 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9674
9675 * config/s390/s390-opts.h (enum indirect_branch): Define.
9676 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9677 (s390_indirect_branch_via_thunk)
9678 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9679 (enum s390_indirect_branch_type): Define.
9680 * config/s390/s390.c (struct s390_frame_layout, struct
9681 machine_function): Remove.
9682 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9683 (indirect_branch_table_label_no, indirect_branch_table_name):
9684 Define variables.
9685 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9686 (enum s390_indirect_branch_option): Define.
9687 (s390_return_addr_from_memory): New function.
9688 (s390_handle_string_attribute): New function.
9689 (s390_attribute_table): Add new attribute handler.
9690 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9691 (s390_indirect_branch_via_thunk): New function.
9692 (s390_indirect_branch_via_inline_thunk): New function.
9693 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9694 sibling call optimization for non z10 compiles.
9695 (s390_emit_call): Force indirect branch target to be a single
9696 register. Add r1 clobber for non-z10 compiles.
9697 (s390_emit_epilogue): Emit return jump via return_use expander.
9698 (s390_reorg): Handle JUMP_INSNs as execute targets.
9699 (s390_option_override_internal): Perform validity checks for the
9700 new command line options.
9701 (s390_indirect_branch_attrvalue): New function.
9702 (s390_indirect_branch_settings): New function.
9703 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9704 (s390_output_indirect_thunk_function): New function.
9705 (s390_code_end): Implement target hook.
9706 (s390_case_values_threshold): Implement target hook.
9707 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9708 macros.
9709 * config/s390/s390.h (struct s390_frame_layout)
9710 (struct machine_function): Move here from s390.c.
9711 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9712 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9713 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9714 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9715 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9716 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9717 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9718 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9719 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9720 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9721 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9722 (mnemonic attribute): Add values which aren't recognized
9723 automatically.
9724 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9725 pattern for branch conversion. Fix mnemonic attribute.
9726 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9727 indirect branch via thunk if requested.
9728 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9729 ("*indirect_jump"): Disable for branch conversion using out of
9730 line thunks.
9731 ("indirect_jump_via_thunk<mode>_z10")
9732 ("indirect_jump_via_thunk<mode>")
9733 ("indirect_jump_via_inlinethunk<mode>_z10")
9734 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9735 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9736 ("casesi_jump_via_inlinethunk<mode>_z10")
9737 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9738 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9739 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9740 ("*indirect2_jump"): Disable for branch conversion.
9741 ("casesi_jump"): Turn into expander and expand patterns for branch
9742 conversion.
9743 ("return_use"): New expander.
9744 ("*return"): Emit return via thunk and rename it to ...
9745 ("*return<mode>"): ... this one.
9746 * config/s390/s390.opt: Add new options and and enum for the
9747 option values.
9748
9749 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9750
9751 * lra-constraints.c (match_reload): Unconditionally use
9752 gen_lowpart_SUBREG, rather than selecting between that
9753 and equivalent gen_rtx_SUBREG code.
9754
9755 2018-02-08 Richard Biener <rguenther@suse.de>
9756
9757 PR tree-optimization/84233
9758 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9759 changed flag instead of boguously re-using phi_inserted.
9760
9761 2018-02-08 Martin Jambor <mjambor@suse.cz>
9762
9763 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9764 static local variables.
9765
9766 2018-02-08 Richard Biener <rguenther@suse.de>
9767
9768 PR tree-optimization/84278
9769 * tree-vect-stmts.c (vectorizable_store): When looking for
9770 smaller vector types to perform grouped strided loads/stores
9771 make sure the mode is supported by the target.
9772 (vectorizable_load): Likewise.
9773
9774 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9775
9776 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9777 Increase LDP/STP opportunities by adding adjacent callee-saves.
9778
9779 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9780
9781 PR rtl-optimization/84068
9782 PR rtl-optimization/83459
9783 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9784
9785 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9786
9787 PR tree-optimization/84224
9788 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9789 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9790 non-zero arguments.
9791
9792 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9793
9794 PR target/84113
9795 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9796 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9797 count, remove one USE.
9798
9799 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9800
9801 * doc/install.texi (Configuration): Document the
9802 --with-long-double-format={ibm,ieee} PowerPC configuration
9803 options.
9804
9805 PR target/84154
9806 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9807 Convert from define_expand to be define_insn_and_split. Rework
9808 float/double/_Float128 conversions to QI/HI/SImode to work with
9809 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9810 conversions to QI/HImode types did a store and then a load to
9811 truncate the value. For conversions to VSX registers, don't split
9812 the insn, instead emit the code directly. Use the code iterator
9813 any_fix to combine signed and unsigned conversions.
9814 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9815 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9816 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9817 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9818 (fix_<mode>di2_hw): Likewise.
9819 (fixuns_<mode>di2_hw): Likewise.
9820 (fix_<mode>si2_hw): Likewise.
9821 (fixuns_<mode>si2_hw): Likewise.
9822 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9823 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9824 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9825 fix<uns>_trunc<SFDF:mode>si2_p8.
9826 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
9827 used.
9828 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9829 (fix<uns>_<mode>_mem): Likewise.
9830 (fctiw<u>z_<mode>_mem): Likewise.
9831 (fix<uns>_<mode>_mem): Likewise.
9832 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9833 the register allocator from doing a direct move to the GPRs to do
9834 a store, and instead use the ISA 3.0 store byte/half-word from
9835 vector register instruction. For IEEE 128-bit floating point,
9836 also optimize stores of 32-bit ints.
9837 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9838
9839 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9840
9841 * genextract.c (push_pathstr_operand): New function to support
9842 [a-zA-Z].
9843 (walk_rtx): Call push_pathstr_operand.
9844 (print_path): Support [a-zA-Z].
9845
9846 2018-02-07 Richard Biener <rguenther@suse.de>
9847
9848 PR tree-optimization/84037
9849 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9850 (cse_and_gimplify_to_preheader): Declare.
9851 (vect_get_place_in_interleaving_chain): Likewise.
9852 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9853 ivexpr_map.
9854 (_loop_vec_info::~_loop_vec_info): Delete it.
9855 (cse_and_gimplify_to_preheader): New function.
9856 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9857 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9858 (vectorizable_load): Likewise. For grouped stores always base
9859 the IV on the first element.
9860 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9861 condition before gimplifying.
9862
9863 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9864
9865 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9866 *DIV_EXPR and *MOD_EXPR.
9867
9868 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
9869
9870 PR target/84248
9871 * config/i386/i386.c (ix86_option_override_internal): Mask out
9872 the CF_SET bit when checking -fcf-protection.
9873
9874 2018-02-07 Tom de Vries <tom@codesourcery.com>
9875
9876 PR libgomp/84217
9877 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9878 enough.
9879
9880 2018-02-07 Richard Biener <rguenther@suse.de>
9881
9882 PR tree-optimization/84204
9883 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9884 this place.
9885
9886 PR tree-optimization/84205
9887 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9888 special-case isl_ast_op_zdiv_r.
9889
9890 PR tree-optimization/84223
9891 * graphite-scop-detection.c (gather_bbs::before_dom_children):
9892 Only add conditions from within the region.
9893 (gather_bbs::after_dom_children): Adjust.
9894
9895 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
9896
9897 PR target/84209
9898 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9899 * config/avr/avr.md: Only post-reload split REG-REG moves if
9900 either register is GENERAL_REG_P.
9901
9902 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9903
9904 PR tree-optimization/84235
9905 * tree-ssa-scopedtables.c
9906 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9907 if the subtraction is performed in floating point type where NaNs are
9908 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9909 build 1. Formatting fix.
9910
9911 2018-02-06 Jakub Jelinek <jakub@redhat.com>
9912
9913 PR target/84146
9914 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9915 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9916 and skip it regardless of bb boundaries. Use CALL_P macro,
9917 don't test INSN_P (insn) together with CALL_P or JUMP_P check
9918 unnecessarily, formatting fix.
9919
9920 2018-02-06 Michael Collison <michael.collison@arm.com>
9921
9922 * config/arm/thumb2.md:
9923 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9924 (*thumb_mov_notscc): Ditto.
9925
9926 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
9927
9928 PR target/84154
9929 * config/rs6000/rs6000.md (su code attribute): Use "u" for
9930 unsigned_fix, not "s".
9931
9932 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9933
9934 * configure.ac (gcc_fn_eh_frame_ro): New function.
9935 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9936 correct .eh_frame permissions.
9937 * configure: Regenerate.
9938
9939 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
9940
9941 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9942 irrelevant options.
9943
9944 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9945
9946 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9947 Display warning message for -mno-speculate-indirect-jumps.
9948
9949 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
9950
9951 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9952 Undocumented.
9953 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9954
9955 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
9956
9957 PR tree-optimization/84225
9958 * tree-eh.c (find_trapping_overflow): Only call
9959 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9960
9961 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9962
9963 PR target/84145
9964 * config/i386/i386.c: Reimplement the check of possible options
9965 -mibt/-mshstk conbination. Change error messages.
9966 * doc/invoke.texi: Fix a typo: remove extra '='.
9967
9968 2018-02-06 Marek Polacek <polacek@redhat.com>
9969
9970 PR tree-optimization/84228
9971 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9972
9973 2018-02-06 Tamar Christina <tamar.christina@arm.com>
9974
9975 PR target/82641
9976 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9977 emitted arch directives.
9978 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9979 __ARM_FEATURE_COPROC before changing architectures.
9980
9981 2018-02-06 Richard Biener <rguenther@suse.de>
9982
9983 * config/i386/i386.c (print_reg): Fix typo.
9984 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9985
9986 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
9987
9988 * configure: Regenerate.
9989
9990 2018-02-05 Martin Sebor <msebor@redhat.com>
9991
9992 PR tree-optimization/83369
9993 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
9994 inlining context.
9995
9996 2018-02-05 Martin Liska <mliska@suse.cz>
9997
9998 * doc/invoke.texi: Cherry-pick upstream r323995.
9999
10000 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
10001
10002 * ira.c (ira_init_register_move_cost): Adjust comment.
10003
10004 2018-02-05 Martin Liska <mliska@suse.cz>
10005
10006 PR gcov-profile/84137
10007 * doc/gcov.texi: Fix typo in documentation.
10008
10009 2018-02-05 Martin Liska <mliska@suse.cz>
10010
10011 PR gcov-profile/83879
10012 * doc/gcov.texi: Document necessity of --dynamic-list-data when
10013 using dlopen functionality.
10014
10015 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
10016
10017 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
10018 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
10019 _mm_maskz_range_ss, _mm_mask_range_round_ss,
10020 _mm_maskz_range_round_ss): New intrinsics.
10021 (__builtin_ia32_rangesd128_round)
10022 (__builtin_ia32_rangess128_round): Remove.
10023 (__builtin_ia32_rangesd128_mask_round,
10024 __builtin_ia32_rangess128_mask_round): New builtins.
10025 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
10026 __builtin_ia32_rangess128_round): Remove.
10027 (__builtin_ia32_rangesd128_mask_round,
10028 __builtin_ia32_rangess128_mask_round): New builtins.
10029 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
10030 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
10031 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
10032 "<round_saeonly_constraint>")): Changed to ...
10033 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
10034 "<round_saeonly_scalar_constraint>")): ... this.
10035 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
10036 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
10037 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
10038 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
10039 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
10040
10041 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
10042
10043 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
10044 options.
10045 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
10046 Remove all values except native, 8540 and 8548.
10047
10048 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
10049
10050 * config/i386/i386.c (ix86_output_function_return): Pass
10051 INVALID_REGNUM, instead of -1, as invalid register number to
10052 indirect_thunk_name and output_indirect_thunk.
10053
10054 2018-02-02 Julia Koval <julia.koval@intel.com>
10055
10056 * config.gcc: Add -march=icelake.
10057 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
10058 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
10059 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
10060 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
10061 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
10062 (processor_target_table): Add icelake.
10063 (ix86_option_override_internal): Handle new PTAs.
10064 (get_builtin_code_for_version): Handle icelake.
10065 (M_INTEL_COREI7_ICELAKE): New.
10066 (fold_builtin_cpu): Handle icelake.
10067 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
10068 * doc/invoke.texi: Add -march=icelake.
10069
10070 2018-02-02 Julia Koval <julia.koval@intel.com>
10071
10072 * config/i386/i386.c (ix86_option_override_internal): Change flags type
10073 to wide_int_bitmask.
10074 * wide-int-bitmask.h: New.
10075
10076 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
10077
10078 PR target/84066
10079 * config/i386/i386.md: Replace Pmode with word_mode in
10080 builtin_setjmp_setup and builtin_longjmp to support x32.
10081
10082 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
10083
10084 PR target/56010
10085 PR target/83743
10086 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
10087 #include "opts.h".
10088 (rs6000_supported_cpu_names): New static variable.
10089 (linux_cpu_translation_table): Likewise.
10090 (elf_platform) <cpu>: Define new static variable and use it.
10091 Translate kernel AT_PLATFORM name to canonical name if needed.
10092 Error if platform name is unknown.
10093
10094 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
10095
10096 PR target/84089
10097 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
10098
10099 2018-02-01 Jeff Law <law@redhat.com>
10100
10101 PR target/84128
10102 * config/i386/i386.c (release_scratch_register_on_entry): Add new
10103 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
10104 the scratch if RELEASE_VIA_POP is false.
10105 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
10106 If we have to save a temporary register, decrement SIZE appropriately.
10107 Pass new arguments to release_scratch_register_on_entry.
10108 (ix86_adjust_stack_and_probe): Likewise.
10109 (ix86_emit_probe_stack_range): Pass new arguments to
10110 release_scratch_register_on_entry.
10111
10112 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
10113
10114 PR rtl-optimization/84157
10115 * combine.c (change_zero_ext): Use REG_P predicate in
10116 front of HARD_REGISTER_P predicate.
10117
10118 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
10119
10120 * config/avr/avr.c (avr_option_override): Move disabling of
10121 -fdelete-null-pointer-checks to...
10122 * common/config/avr/avr-common.c (avr_option_optimization_table):
10123 ...here.
10124
10125 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10126
10127 PR tree-optimization/81635
10128 * tree-data-ref.c (split_constant_offset_1): For types that
10129 wrap on overflow, try to use range info to prove that wrapping
10130 cannot occur.
10131
10132 2018-02-01 Renlin Li <renlin.li@arm.com>
10133
10134 PR target/83370
10135 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10136 TAILCALL_ADDR_REGS.
10137 (aarch64_register_move_cost): Likewise.
10138 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
10139 TAILCALL_ADDR_REGS.
10140 (REG_CLASS_NAMES): Likewise.
10141 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
10142 TAILCALL_ADDR_REGS. Remove IP registers.
10143 * config/aarch64/aarch64.md (Ucs): Update register constraint.
10144
10145 2018-02-01 Richard Biener <rguenther@suse.de>
10146
10147 * domwalk.h (dom_walker::dom_walker): Add additional constructor
10148 for specifying RPO order and allow NULL for that.
10149 * domwalk.c (dom_walker::dom_walker): Likewise.
10150 (dom_walker::walk): Handle NULL RPO order.
10151 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
10152 in RPO order.
10153 (rewrite_update_dom_walker): Likewise.
10154 (mark_def_dom_walker): Likewise.
10155
10156 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10157
10158 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
10159 (aarch64_maybe_expand_sve_subreg_move): Declare.
10160 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
10161 * config/aarch64/predicates.md (aarch64_any_register_operand): New
10162 predicate.
10163 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
10164 that are semantically a reverse operation.
10165 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
10166 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
10167 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
10168 functions.
10169 (aarch64_can_change_mode_class): For big-endian, forbid changes
10170 between two SVE modes if they have different element sizes.
10171
10172 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10173
10174 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
10175 the TImode handling for big-endian targets.
10176
10177 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10178
10179 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
10180 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
10181 not just bytes.
10182 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
10183 Remove BSWAP handing for big-endian targets and use the form of
10184 LD1RQ appropariate for the mode.
10185
10186 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10187
10188 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
10189 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
10190 duplicated element.
10191
10192 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
10193
10194 PR tearget/83845
10195 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
10196 check for operands that need to go through aarch64_sve_reload_be.
10197
10198 2018-02-01 Jakub Jelinek <jakub@redhat.com>
10199
10200 PR tree-optimization/81661
10201 PR tree-optimization/84117
10202 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
10203 * tree-eh.c: Include gimplify.h.
10204 (find_trapping_overflow, replace_trapping_overflow,
10205 rewrite_to_non_trapping_overflow): New functions.
10206 * tree-vect-loop.c: Include tree-eh.h.
10207 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
10208 * tree-data-ref.c: Include tree-eh.h.
10209 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
10210
10211 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
10212
10213 PR rtl-optimization/84123
10214 * combine.c (change_zero_ext): Check if hard register satisfies
10215 can_change_dest_mode before calling gen_lowpart_SUBREG.
10216
10217 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
10218
10219 PR target/82444
10220 * ira.c (ira_init_register_move_cost): Remove assert.
10221
10222 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10223
10224 PR rtl-optimization/84071
10225 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
10226 * doc/tm.texi: Regenerate.
10227
10228 2018-01-31 Richard Biener <rguenther@suse.de>
10229
10230 PR tree-optimization/84132
10231 * tree-data-ref.c (analyze_miv_subscript): Properly
10232 check whether evolution_function_is_affine_multivariate_p
10233 before calling gcd_of_steps_may_divide_p.
10234
10235 2018-01-31 Julia Koval <julia.koval@intel.com>
10236
10237 PR target/83618
10238 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
10239 * config/i386/i386.md (rdpid_rex64) New.
10240 (rdpid): Make 32bit only.
10241
10242 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
10243
10244 PR lto/84105
10245 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
10246 an IDENTIFIER_NODE for FUNCTION_TYPE's.
10247
10248 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10249
10250 Revert
10251 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10252
10253 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10254
10255 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10256
10257 PR rtl-optimization/84071
10258 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10259 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10260
10261 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10262
10263 * config/arc/arc.c (arc_handle_aux_attribute): New function.
10264 (arc_attribute_table): Add 'aux' attribute.
10265 (arc_in_small_data_p): Consider aux like variables.
10266 (arc_is_aux_reg_p): New function.
10267 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10268 (arc_get_aux_arg): New function.
10269 (prepare_move_operands): Handle aux-register access.
10270 (arc_handle_aux_attribute): New function.
10271 * doc/extend.texi (ARC Variable attributes): Add subsection.
10272
10273 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10274
10275 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10276 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10277 (arc_attribute_table): Add 'uncached' attribute.
10278 (arc_print_operand): Print '.di' flag for uncached memory
10279 accesses.
10280 (arc_in_small_data_p): Do not consider for small data the uncached
10281 types.
10282 (arc_is_uncached_mem_p): New function.
10283 * config/arc/predicates.md (compact_store_memory_operand): Check
10284 for uncached memory accesses.
10285 (nonvol_nonimm_operand): Likewise.
10286 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10287
10288 2018-01-31 Jakub Jelinek <jakub@redhat.com>
10289
10290 PR c/84100
10291 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10292 falign-loops=): Add Optimization flag.
10293
10294 2018-01-30 Jeff Law <law@redhat.com>
10295
10296 PR target/84064
10297 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10298 INT_REGISTERS_SAVED. Check it prior to calling
10299 get_scratch_register_on_entry.
10300 (ix86_adjust_stack_and_probe): Similarly.
10301 (ix86_emit_probe_stack_range): Similarly.
10302 (ix86_expand_prologue): Corresponding changes.
10303
10304 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10305
10306 PR target/40411
10307 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10308 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10309
10310 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
10311
10312 PR target/84112
10313 * lra-constraints.c (curr_insn_transform): Process AND in the
10314 address.
10315
10316 2018-01-30 Jakub Jelinek <jakub@redhat.com>
10317
10318 PR rtl-optimization/83986
10319 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10320 dependence against last_pending_memory_flush in addition to
10321 pending_jump_insns.
10322
10323 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
10324
10325 PR tree-optimization/81611
10326 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10327 copies.
10328
10329 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10330
10331 PR target/83758
10332 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10333 a reg rtx.
10334
10335 2018-01-30 Richard Biener <rguenther@suse.de>
10336 Jakub Jelinek <jakub@redhat.com>
10337
10338 PR tree-optimization/84111
10339 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10340 inner loops added during recursion, as they don't have up-to-date
10341 SSA form.
10342
10343 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10344
10345 PR ipa/81360
10346 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10347 (can_inline_edge_by_limits_p): ... here.
10348 (can_early_inline_edge_p, check_callers,
10349 update_caller_keys, update_callee_keys, recursive_inlining,
10350 add_new_edges_to_heap, speculation_useful_p,
10351 inline_small_functions,
10352 inline_small_functions, flatten_function,
10353 inline_to_all_callers_1): Update.
10354
10355 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10356
10357 * profile-count.c (profile_count::combine_with_ipa_count): Handle
10358 zeros correctly.
10359
10360 2018-01-30 Richard Biener <rguenther@suse.de>
10361
10362 PR tree-optimization/83008
10363 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10364 invariant and constant vector uses in stmts when they need
10365 more than one stmt.
10366
10367 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10368
10369 PR bootstrap/84017
10370 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10371 * configure: Regenerate.
10372
10373 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10374
10375 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10376 pattern.
10377 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10378 Use gen_rtx_REG rather than gen_lowpart.
10379
10380 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10381
10382 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10383 rather than 0 when creating partial subregs.
10384
10385 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10386
10387 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10388 of usage.
10389
10390 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
10391
10392 PR target/81550
10393 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10394 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10395 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10396 flags. This restores the settings used before the 2017-07-24.
10397 Turning off pre increment/decrement/modify allows IVOPTS to
10398 optimize DF/SF loops where the index is an int.
10399
10400 2018-01-29 Richard Biener <rguenther@suse.de>
10401 Kelvin Nilsen <kelvin@gcc.gnu.org>
10402
10403 PR bootstrap/80867
10404 * tree-vect-stmts.c (vectorizable_call): Don't call
10405 targetm.vectorize_builtin_md_vectorized_function if callee is
10406 NULL.
10407
10408 2018-01-22 Carl Love <cel@us.ibm.com>
10409
10410 * doc/extend.tex: Fix typo in second arg in
10411 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10412
10413 2018-01-29 Richard Biener <rguenther@suse.de>
10414
10415 PR tree-optimization/84086
10416 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10417 (flush_ssaname_freelist): When SSA names were released reset
10418 the SCEV hash table.
10419
10420 2018-01-29 Richard Biener <rguenther@suse.de>
10421
10422 PR tree-optimization/84057
10423 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10424 removed paths when removing edges.
10425
10426 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
10427
10428 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10429 -mfunction-return=@var{choice}.
10430
10431 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
10432
10433 PR diagnostic/84034
10434 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10435 Handle CR like TAB.
10436 (layout::print_source_line): Likewise.
10437 (test_get_line_width_without_trailing_whitespace): Add test cases.
10438
10439 2018-01-27 Jakub Jelinek <jakub@redhat.com>
10440
10441 PR middle-end/84040
10442 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10443 debug insns.
10444
10445 2018-01-26 Jim Wilson <jimw@sifive.com>
10446
10447 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10448
10449 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10450 specified.
10451
10452 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10453
10454 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10455 and CMP + SUB-immediate -> SUBS.
10456
10457 2018-01-26 Martin Sebor <msebor@redhat.com>
10458
10459 PR tree-optimization/83896
10460 * tree-ssa-strlen.c (get_string_len): Rename...
10461 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
10462 Avoid assuming length is constant.
10463 (handle_char_store): Use HOST_WIDE_INT for string length.
10464
10465 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
10466
10467 PR target/81763
10468 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10469 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10470
10471 2018-01-26 Richard Biener <rguenther@suse.de>
10472
10473 PR rtl-optimization/84003
10474 * dse.c (record_store): Only record redundant stores when
10475 the earlier store aliases at least all accesses the later one does.
10476
10477 2018-01-26 Jakub Jelinek <jakub@redhat.com>
10478
10479 PR rtl-optimization/83985
10480 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10481 REG_CFA_RESTORE insns.
10482 (delete_unmarked_insns): Don't ignore separate shrink wrapping
10483 REG_CFA_RESTORE insns here.
10484
10485 PR c/83989
10486 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10487 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10488
10489 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10490
10491 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10492 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10493 (arc_init): Likewise.
10494 (arc_override_options): Likewise.
10495 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10496 value.
10497 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10498 support.
10499 * config/arc/arc.h (TARGET_DBNZ): Define.
10500 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10501 properly set the tune attribute.
10502 (dbnz): Use TARGET_DBNZ guard.
10503 * config/arc/arc.opt (mtune): Add core3 option.
10504
10505 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10506
10507 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10508 recognize new pic like addresses.
10509 (arc_delegitimize_address): Clean up.
10510
10511 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10512
10513 * config/arc/arc-arches.def: Option mrf16 valid for all
10514 architectures.
10515 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10516 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10517 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10518 * config/arc/arc-tables.opt: Regenerate.
10519 * config/arc/arc.c (arc_conditional_register_usage): Handle
10520 reduced register file case.
10521 (arc_file_start): Set must have build attributes.
10522 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10523 mrf16 option value.
10524 * config/arc/arc.opt (mrf16): Add new option.
10525 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10526 * config/arc/genmultilib.awk: Handle new mrf16 option.
10527 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10528 * config/arc/t-multilib: Regenerate.
10529 * doc/invoke.texi (ARC Options): Document mrf16 option.
10530
10531 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10532
10533 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10534 * config/arc/arc.c (arc_handle_secure_attribute): New function.
10535 (arc_attribute_table): Add 'secure_call' attribute.
10536 (arc_print_operand): Print secure call operand.
10537 (arc_function_ok_for_sibcall): Don't optimize tail calls when
10538 secure.
10539 (arc_is_secure_call_p): New function. * config/arc/arc.md
10540 (call_i): Add support for sjli instruction.
10541 (call_value_i): Likewise.
10542 * config/arc/constraints.md (Csc): New constraint.
10543
10544 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10545 John Eric Martin <John.Martin@emmicro-us.com>
10546
10547 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10548 * config/arc/arc.c (_arc_jli_section): New struct.
10549 (arc_jli_section): New type.
10550 (rc_jli_sections): New static variable.
10551 (arc_handle_jli_attribute): New function.
10552 (arc_attribute_table): Add jli_always and jli_fixed attribute.
10553 (arc_file_end): New function.
10554 (TARGET_ASM_FILE_END): Define.
10555 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10556 (arc_add_jli_section): New function.
10557 (jli_call_scan): Likewise.
10558 (arc_reorg): Call jli_call_scan.
10559 (arc_output_addsi): Remove 'S' from printing asm operand.
10560 (arc_is_jli_call_p): New function.
10561 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10562 operand.
10563 (movhi_insn): Likewise.
10564 (movsi_insn): Likewise.
10565 (movsi_set_cc_insn): Likewise.
10566 (loadqi_update): Likewise.
10567 (load_zeroextendqisi_update): Likewise.
10568 (load_signextendqisi_update): Likewise.
10569 (loadhi_update): Likewise.
10570 (load_zeroextendhisi_update): Likewise.
10571 (load_signextendhisi_update): Likewise.
10572 (loadsi_update): Likewise.
10573 (loadsf_update): Likewise.
10574 (movsicc_insn): Likewise.
10575 (bset_insn): Likewise.
10576 (bxor_insn): Likewise.
10577 (bclr_insn): Likewise.
10578 (bmsk_insn): Likewise.
10579 (bicsi3_insn): Likewise.
10580 (cmpsi_cc_c_insn): Likewise.
10581 (movsi_ne): Likewise.
10582 (movsi_cond_exec): Likewise.
10583 (clrsbsi2): Likewise.
10584 (norm_f): Likewise.
10585 (normw): Likewise.
10586 (swap): Likewise.
10587 (divaw): Likewise.
10588 (flag): Likewise.
10589 (sr): Likewise.
10590 (kflag): Likewise.
10591 (ffs): Likewise.
10592 (ffs_f): Likewise.
10593 (fls): Likewise.
10594 (call_i): Remove 'S' asm letter, add jli instruction.
10595 (call_value_i): Likewise.
10596 * config/arc/arc.op (mjli-always): New option.
10597 * config/arc/constraints.md (Cji): New constraint.
10598 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10599 operand.
10600 (subsf3_fpx): Likewise.
10601 (mulsf3_fpx): Likewise.
10602 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10603 asm operand.
10604 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10605 function attrbutes.
10606 * doc/invoke.texi (ARC): Document mjli-always option.
10607
10608 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
10609
10610 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10611 avoid addition with 0 and use incw and decw where possible.
10612
10613 2018-01-26 Richard Biener <rguenther@suse.de>
10614
10615 PR tree-optimization/81082
10616 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10617 association if it requires casting to unsigned.
10618 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10619 from fold_plusminus_mult_expr to catch important cases late when
10620 range info is available.
10621
10622 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10623
10624 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10625 * configure.ac (hidden_linkonce): New test.
10626 * configure: Regenerate.
10627 * config.in: Regenerate.
10628
10629 2018-01-26 Julia Koval <julia.koval@intel.com>
10630
10631 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10632 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10633 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10634 _mm_mask_bitshuffle_epi64_mask): Fix type.
10635 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10636 USI_FTYPE_V4DI_V4DI_USI): Remove.
10637 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10638 __builtin_ia32_vpshufbitqmb256_mask,
10639 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10640 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10641 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10642
10643 2018-01-26 Alan Modra <amodra@gmail.com>
10644
10645 PR target/84033
10646 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10647 UNSPEC_VBPERMQ. Sort other unspecs.
10648
10649 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
10650
10651 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10652
10653 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
10654
10655 PR middle-end/83055
10656 * predict.c (drop_profile): Do not push/pop cfun; update also
10657 node->count.
10658 (handle_missing_profiles): Fix logic looking for zero profiles.
10659
10660 2018-01-25 Jakub Jelinek <jakub@redhat.com>
10661
10662 PR middle-end/83977
10663 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10664 on functions with #pragma omp declare simd or functions with simd
10665 attribute.
10666 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10667 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10668 Remove trailing \n from warning_at calls.
10669
10670 2018-01-25 Tom de Vries <tom@codesourcery.com>
10671
10672 PR target/84028
10673 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10674 for neutered workers.
10675
10676 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10677
10678 PR target/68467
10679 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10680 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10681
10682 2018-01-24 Jeff Law <law@redhat.com>
10683
10684 PR target/83994
10685 * i386.c (get_probe_interval): Move to earlier point.
10686 (ix86_compute_frame_layout): If -fstack-clash-protection and
10687 the frame is larger than the probe interval, then use pushes
10688 to save registers rather than reg->mem moves.
10689 (ix86_expand_prologue): Remove conditional for int_registers_saved
10690 assertion.
10691
10692 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10693
10694 PR target/84014
10695 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10696 min/max for never referenced object.
10697
10698 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10699
10700 PR middle-end/83977
10701 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10702 here.
10703 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10704 attributes from DECL_ATTRIBUTES (decl) without affecting
10705 DECL_ATTRIBUTES (current_function_decl).
10706 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10707 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10708
10709 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10710
10711 PR tree-optimization/83979
10712 * fold-const.c (fold_comparison): Use constant_boolean_node
10713 instead of boolean_{true,false}_node.
10714
10715 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10716
10717 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10718 with zero counts.
10719
10720 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10721
10722 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10723 Simplify the clause that sets the length attribute.
10724 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10725 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10726 clause that sets the length attribute.
10727 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10728
10729 2018-01-24 Tom de Vries <tom@codesourcery.com>
10730
10731 PR target/83589
10732 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10733 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10734 Add strict parameter.
10735 (prevent_branch_around_nothing): Insert dummy insn between branch to
10736 label and label with no ptx insn inbetween.
10737 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10738
10739 2018-01-24 Tom de Vries <tom@codesourcery.com>
10740
10741 PR target/81352
10742 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10743 for neutered threads in warp.
10744 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10745
10746 2018-01-24 Richard Biener <rguenther@suse.de>
10747
10748 PR tree-optimization/83176
10749 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10750 operands.
10751
10752 2018-01-24 Richard Biener <rguenther@suse.de>
10753
10754 PR tree-optimization/82819
10755 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10756 code generating pluses that are no-ops in the target precision.
10757
10758 2018-01-24 Richard Biener <rguenther@suse.de>
10759
10760 PR middle-end/84000
10761 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10762
10763 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10764
10765 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10766 to merge probabilities.
10767 * predict.c (probably_never_executed): Also mark as cold functions
10768 with global 0 profile and guessed local profile.
10769 * profile-count.c (profile_probability::combine_with_count): New
10770 member function.
10771 * profile-count.h (profile_probability::operator*,
10772 profile_probability::operator*=, profile_probability::operator/,
10773 profile_probability::operator/=): Reduce precision to adjusted
10774 and set value to guessed on contradictory divisions.
10775 (profile_probability::combine_with_freq): Remove.
10776 (profile_probability::combine_wiht_count): Declare.
10777 (profile_count::force_nonzero):: Set to adjusted.
10778 (profile_count::probability_in):: Set quality to adjusted.
10779 * tree-ssa-tail-merge.c (replace_block_by): Use
10780 combine_with_count.
10781
10782 2018-01-23 Andrew Waterman <andrew@sifive.com>
10783 Jim Wilson <jimw@sifive.com>
10784
10785 * config/riscv/riscv.c (riscv_stack_boundary): New.
10786 (riscv_option_override): Set riscv_stack_boundary. Handle
10787 riscv_preferred_stack_boundary_arg.
10788 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10789 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10790 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10791 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10792 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10793 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10794
10795 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10796
10797 PR target/83905
10798 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10799 of struct ix86_frame.
10800 (ix86_expand_epilogue): Likewise. Add a local variable for
10801 the reg_save_offset field in struct ix86_frame.
10802
10803 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10804
10805 PR tree-optimization/82604
10806 * tree-loop-distribution.c (enum partition_kind): New enum item
10807 PKIND_PARTIAL_MEMSET.
10808 (partition_builtin_p): Support above new enum item.
10809 (generate_code_for_partition): Ditto.
10810 (compute_access_range): Differentiate cases that equality can be
10811 proven at all loops, the innermost loops or no loops.
10812 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10813 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10814 (finalize_partitions, distribute_loop): Don't fuse partition of
10815 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10816 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10817 parloop is enabled.
10818
10819 2018-01-23 Martin Liska <mliska@suse.cz>
10820
10821 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10822 order to ignore the predictor.
10823 (PRED_POLYMORPHIC_CALL): Likewise.
10824 (PRED_RECURSIVE_CALL): Likewise.
10825
10826 2018-01-23 Martin Liska <mliska@suse.cz>
10827
10828 * tree-profile.c (tree_profiling): Print function header to
10829 aware reader which function we are working on.
10830 * value-prof.c (gimple_find_values_to_profile): Do not print
10831 not interesting value histograms.
10832
10833 2018-01-23 Martin Liska <mliska@suse.cz>
10834
10835 * profile-count.h (enum profile_quality): Add
10836 profile_uninitialized as the first value. Do not number values
10837 as they are zero based.
10838 (profile_count::verify): Update sanity check.
10839 (profile_probability::verify): Likewise.
10840
10841 2018-01-23 Nathan Sidwell <nathan@acm.org>
10842
10843 * doc/invoke.texi (ffor-scope): Deprecate.
10844
10845 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10846
10847 PR tree-optimization/83510
10848 * domwalk.c (set_all_edges_as_executable): New function.
10849 (dom_walker::dom_walker): Convert bool param
10850 "skip_unreachable_blocks" to enum reachability. Move setup of
10851 edge flags to set_all_edges_as_executable and only do it when
10852 reachability is REACHABLE_BLOCKS.
10853 * domwalk.h (enum dom_walker::reachability): New enum.
10854 (dom_walker::dom_walker): Convert bool param
10855 "skip_unreachable_blocks" to enum reachability.
10856 (set_all_edges_as_executable): New decl.
10857 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
10858 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10859 "reachability".
10860 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10861 but converting true to REACHABLE_BLOCKS.
10862 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10863 * tree-vrp.c
10864 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10865 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10866 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10867 REACHABLE_BLOCKS.
10868 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10869 if check_all_array_refs will be called.
10870
10871 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10872
10873 * tree.c (selftest::test_location_wrappers): Add more test
10874 coverage.
10875
10876 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10877
10878 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10879 (selftest::test_bit_in_range): Likewise.
10880
10881 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10882
10883 PR testsuite/83888
10884 * doc/sourcebuild.texi (vect_float): Say that the selector
10885 only describes the situation when -funsafe-math-optimizations is on.
10886 (vect_float_strict): Document.
10887
10888 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10889
10890 PR tree-optimization/83965
10891 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10892 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10893 instead of checking only for a reduction.
10894 (vect_recog_widen_sum_pattern): Likewise.
10895
10896 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10897
10898 * predict.c (probably_never_executed): Only use precise profile info.
10899 (compute_function_frequency): Skip after inlining hack since we now
10900 have quality checking.
10901
10902 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10903
10904 * profile-count.h (profile_probability::very_unlikely,
10905 profile_probability::unlikely, profile_probability::even): Set
10906 precision to guessed.
10907
10908 2018-01-23 Richard Biener <rguenther@suse.de>
10909
10910 PR tree-optimization/83963
10911 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10912 Properly terminate dominator walk when crossing the exit edge not
10913 when visiting its source block.
10914
10915 2018-01-23 Jakub Jelinek <jakub@redhat.com>
10916
10917 PR c++/83918
10918 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10919 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10920
10921 2018-01-22 Jakub Jelinek <jakub@redhat.com>
10922
10923 PR tree-optimization/83957
10924 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
10925 semicolon after for body surrounded by braces.
10926
10927 PR tree-optimization/83081
10928 * profile-count.h (profile_probability::split): New method.
10929 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10930 Use profile_probability::split.
10931 (do_compare_rtx_and_jump): Fix adjustment of probabilities
10932 when splitting a single conditional jump into 2.
10933
10934 2018-01-22 David Malcolm <dmalcolm@redhat.com>
10935
10936 PR tree-optimization/69452
10937 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10938 decl.
10939
10940 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10941
10942 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10943 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10944 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10945
10946 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10947
10948 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
10949 * config/rl78/rl78.md (movdi): New define_expand.
10950 * config/rl78/rl78.c (rl78_split_movdi): New function.
10951
10952 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
10953
10954 PR target/83862
10955 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10956 no longer used.
10957 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10958 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10959 128-bit to produce an UNSPEC move to get the double word with the
10960 signbit and then a shift directly to do signbit.
10961 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10962 implementation with a new version that just does either a direct
10963 move or a regular move. Move memory interface to separate insns.
10964 Move insns so they are next to the expander.
10965 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10966 with signbit move. Split big and little endian case.
10967 (signbit<mode>2_dm_mem_le): Likewise.
10968 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10969 (signbit<mode>2_dm2): Likewise.
10970
10971 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10972
10973 * config/rl78/rl78.md (anddi3): New define_expand.
10974
10975 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10976
10977 * config/rl78/rl78.md (umindi3): New define_expand.
10978
10979 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10980
10981 * config/rl78/rl78.md (smindi3): New define_expand.
10982
10983 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10984
10985 * config/rl78/rl78.md (smaxdi3): New define_expand.
10986
10987 2018-01-22 Carl Love <cel@us.ibm.com>
10988
10989 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10990 LVX_V1TI): Add macro expansion.
10991 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10992 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10993 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
10994 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
10995 Change check to determine if the instruction is a byte reversing
10996 entry. Fix typo in comment.
10997 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
10998 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
10999 Add def_builtin calls for new builtins.
11000 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
11001 Add define_insn expansion.
11002
11003 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11004
11005 * config/rl78/rl78.md (umaxdi3): New define_expand.
11006
11007 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
11008
11009 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
11010 for non-QImode registers.
11011
11012 2018-01-22 Richard Biener <rguenther@suse.de>
11013
11014 PR tree-optimization/83963
11015 * graphite-scop-detection.c (scop_detection::get_sese): Delay
11016 including the loop exit block.
11017 (scop_detection::merge_sese): Likewise.
11018 (scop_detection::add_scop): Do it here instead.
11019
11020 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11021
11022 * doc/sourcebuild.texi (arm_softfloat): Document.
11023
11024 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
11025
11026 PR gcc/77734
11027 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
11028 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
11029 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
11030
11031 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11032 David Edelsohn <dje.gcc@gmail.com>
11033
11034 PR target/83946
11035 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11036 Change "crset eq" to "crset 2".
11037 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11038 (*call_indirect_aix<mode>_nospec): Likewise.
11039 (*call_value_indirect_aix<mode>_nospec): Likewise.
11040 (*call_indirect_elfv2<mode>_nospec): Likewise.
11041 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
11042 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
11043 change assembly output from . to $.
11044 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11045 (indirect_jump<mode>_nospec): Change assembly output from . to $.
11046 (*tablejump<mode>_internal1_nospec): Likewise.
11047
11048 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
11049
11050 PR target/80870
11051 * config/sh/sh_optimize_sett_clrt.cc:
11052 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
11053
11054 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
11055
11056 PR tree-optimization/83940
11057 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
11058 offset_dt to vect_constant_def rather than vect_unknown_def_type.
11059 (vect_check_load_store_mask): Add a mask_dt_out parameter and
11060 use it to pass back the definition type.
11061 (vect_check_store_rhs): Likewise rhs_dt_out.
11062 (vect_build_gather_load_calls): Add a mask_dt argument and use
11063 it instead of a call to vect_is_simple_use.
11064 (vectorizable_store): Update calls to vect_check_load_store_mask
11065 and vect_check_store_rhs. Use the dt returned by the latter instead
11066 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
11067 instead of calls to vect_is_simple_use. Pass the scalar rather
11068 than the vector operand to vect_is_simple_use when handling
11069 second and subsequent copies of an rhs value.
11070 (vectorizable_load): Update calls to vect_check_load_store_mask
11071 and vect_build_gather_load_calls. Use the cached mask_dt and
11072 gs_info.offset_dt instead of calls to vect_is_simple_use.
11073
11074 2018-01-20 Jakub Jelinek <jakub@redhat.com>
11075
11076 PR middle-end/83945
11077 * tree-emutls.c: Include gimplify.h.
11078 (lower_emutls_2): New function.
11079 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
11080 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
11081 it before further processing.
11082
11083 PR target/83930
11084 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
11085 UINTVAL (trueop1) instead of INTVAL (op1).
11086
11087 2018-01-19 Jakub Jelinek <jakub@redhat.com>
11088
11089 PR debug/81570
11090 PR debug/83728
11091 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
11092 INCOMING_FRAME_SP_OFFSET if not defined.
11093 (scan_trace): Add ENTRY argument. If true and
11094 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
11095 emit a note to adjust the CFA offset.
11096 (create_cfi_notes): Adjust scan_trace callers.
11097 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
11098 INCOMING_FRAME_SP_OFFSET in the CIE.
11099 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
11100 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
11101 Likewise.
11102 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
11103 * doc/tm.texi: Regenerated.
11104
11105 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11106
11107 PR rtl-optimization/83147
11108 * lra-constraints.c (remove_inheritance_pseudos): Use
11109 lra_substitute_pseudo_within_insn.
11110
11111 2018-01-19 Tom de Vries <tom@codesourcery.com>
11112 Cesar Philippidis <cesar@codesourcery.com>
11113
11114 PR target/83920
11115 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
11116
11117 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
11118
11119 PR target/83790
11120 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
11121 spaces for function labels.
11122
11123 2018-01-19 Martin Liska <mliska@suse.cz>
11124
11125 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
11126 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
11127 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
11128 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
11129 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
11130 (PRED_CONST_RETURN): Change from 69 to 65.
11131 (PRED_NULL_RETURN): Change from 91 to 71.
11132 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
11133 (PRED_LOOP_GUARD): Change from 66 to 73.
11134
11135 2018-01-19 Martin Liska <mliska@suse.cz>
11136
11137 * predict.c (predict_insn_def): Add new assert.
11138 (struct branch_predictor): Change type to signed integer.
11139 (test_prediction_value_range): Amend test to cover
11140 PROB_UNINITIALIZED.
11141 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
11142 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
11143 (PRED_LOOP_ITERATIONS_MAX): Likewise.
11144 (PRED_LOOP_IV_COMPARE): Likewise.
11145 * predict.h (PROB_UNINITIALIZED): Define new constant.
11146
11147 2018-01-19 Martin Liska <mliska@suse.cz>
11148
11149 * predict.c (dump_prediction): Add new format for
11150 analyze_brprob.py script which is enabled with -details
11151 suboption.
11152 * profile-count.h (precise_p): New function.
11153
11154 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11155
11156 PR tree-optimization/83922
11157 * tree-vect-loop.c (vect_verify_full_masking): Return false if
11158 there are no statements that need masking.
11159 (vect_active_double_reduction_p): New function.
11160 (vect_analyze_loop_operations): Use it when handling phis that
11161 are not in the loop header.
11162
11163 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
11164
11165 PR tree-optimization/83914
11166 * tree-vect-loop.c (vectorizable_induction): Don't convert
11167 init_expr or apply the peeling adjustment for inductions
11168 that are nested within the vectorized loop.
11169
11170 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11171
11172 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
11173 instead of NEG.
11174
11175 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11176
11177 PR sanitizer/81715
11178 PR testsuite/83882
11179 * function.h (gimplify_parameters): Add gimple_seq * argument.
11180 * function.c: Include gimple.h and options.h.
11181 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
11182 for the added local temporaries if needed.
11183 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
11184 if there are any parameter cleanups, wrap whole body into a
11185 try/finally with the cleanups.
11186
11187 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
11188
11189 PR target/82964
11190 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
11191 Use GET_MODE_CLASS for scalar floating point.
11192
11193 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11194
11195 PR ipa/82256
11196 patch by PaX Team
11197 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
11198 Fix call of call_cgraph_insertion_hooks.
11199
11200 2018-01-18 Martin Sebor <msebor@redhat.com>
11201
11202 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
11203
11204 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
11205
11206 PR ipa/83619
11207 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
11208 frequencies.
11209
11210 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
11211
11212 PR other/70268
11213 * common.opt: (-ffile-prefix-map): New option.
11214 * opts.c (common_handle_option): Defer it.
11215 * opts-global.c (handle_common_deferred_options): Handle it.
11216 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
11217 * file-prefix-map.h: New file.
11218 (remap_debug_filename, add_debug_prefix_map): ...here.
11219 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
11220 * final.c (debug_prefix_map, add_debug_prefix_map
11221 remap_debug_filename): Move to...
11222 * file-prefix-map.c: New file.
11223 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
11224 generalize, get rid of alloca(), use strrchr() instead of strchr().
11225 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
11226 Implement in terms of add_prefix_map().
11227 (remap_macro_filename, remap_debug_filename): Implement in term of
11228 remap_filename().
11229 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
11230 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
11231 * dbxout.c: Include file-prefix-map.h.
11232 * varasm.c: Likewise.
11233 * vmsdbgout.c: Likewise.
11234 * xcoffout.c: Likewise.
11235 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
11236 * doc/cppopts.texi (-fmacro-prefix-map): Document.
11237 * doc/invoke.texi (-ffile-prefix-map): Document.
11238 (-fdebug-prefix-map): Update description.
11239
11240 2018-01-18 Martin Liska <mliska@suse.cz>
11241
11242 * config/i386/i386.c (indirect_thunk_name): Document that also
11243 lfence is emitted.
11244 (output_indirect_thunk): Document why both instructions
11245 (pause and lfence) are generated.
11246
11247 2018-01-18 Richard Biener <rguenther@suse.de>
11248
11249 PR tree-optimization/83887
11250 * graphite-scop-detection.c
11251 (scop_detection::get_nearest_dom_with_single_entry): Remove.
11252 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11253 (scop_detection::merge_sese): Re-implement with a flood-fill
11254 algorithm that properly finds a SESE region if it exists.
11255
11256 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11257
11258 PR c/61240
11259 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11260 pointer_diff optimizations use view_convert instead of convert.
11261
11262 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11263
11264 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11265 Generate different code for -mno-speculate-indirect-jumps.
11266 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11267 (*call_indirect_aix<mode>): Disable for
11268 -mno-speculate-indirect-jumps.
11269 (*call_indirect_aix<mode>_nospec): New define_insn.
11270 (*call_value_indirect_aix<mode>): Disable for
11271 -mno-speculate-indirect-jumps.
11272 (*call_value_indirect_aix<mode>_nospec): New define_insn.
11273 (*sibcall_nonlocal_sysv<mode>): Generate different code for
11274 -mno-speculate-indirect-jumps.
11275 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11276
11277 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11278
11279 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11280 long double type, set the flags for noting the default long double
11281 type, even if we don't pass or return a long double type.
11282
11283 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
11284
11285 PR ipa/83051
11286 * ipa-inline.c (flatten_function): Do not overwrite final inlining
11287 failure.
11288
11289 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
11290
11291 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11292 support for merge[hl].
11293 (fold_mergehl_helper): New helper function.
11294 (tree-vector-builder.h): New #include for tree_vector_builder usage.
11295 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11296 (altivec_vmrglw_direct): Add xxmrglw insn.
11297
11298 2018-01-17 Andrew Waterman <andrew@sifive.com>
11299
11300 * config/riscv/riscv.c (riscv_conditional_register_usage): If
11301 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11302
11303 2018-01-17 David Malcolm <dmalcolm@redhat.com>
11304
11305 PR lto/83121
11306 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11307 call the lto_location_cache before reading the
11308 DECL_SOURCE_LOCATION of the types.
11309
11310 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
11311 Richard Sandiford <richard.sandiford@linaro.org>
11312
11313 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11314 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11315 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11316 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11317 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11318 Add declaration.
11319 * config/aarch64/constraints.md (aarch64_movti_operand):
11320 Limit immediates.
11321 * config/aarch64/predicates.md (Uti): Add new constraint.
11322
11323 2018-01-17 Carl Love <cel@us.ibm.com>
11324
11325 * config/rs6000/vsx.md (define_expand xl_len_r,
11326 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11327 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11328 lxvll.
11329 (define_expand, define_insn): Move the shift left from the
11330 define_insn to the define_expand for lxvl and stxvl instructions.
11331 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11332 and XL_LEN_R definitions to PURE.
11333
11334 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
11335
11336 * config/i386/i386.c (indirect_thunk_name): Declare regno
11337 as unsigned int. Compare regno with INVALID_REGNUM.
11338 (output_indirect_thunk): Ditto.
11339 (output_indirect_thunk_function): Ditto.
11340 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
11341 in the call to output_indirect_thunk_function.
11342
11343 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
11344
11345 PR middle-end/83884
11346 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11347 rather than the size of inner_type to determine the stack slot size
11348 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11349
11350 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
11351
11352 PR target/83546
11353 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11354 to PTA_SILVERMONT.
11355
11356 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
11357
11358 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11359 endian Linux systems to optionally enable multilibs for selecting
11360 the long double type if the user configured an explicit type.
11361 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11362 have no long double multilibs if not defined.
11363 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11364 warn if the user used -mabi={ieee,ibm}longdouble and we built
11365 multilibs for long double.
11366 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11367 appropriate multilib option.
11368 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11369 multilib options.
11370 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11371 for building long double multilibs.
11372 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11373
11374 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
11375
11376 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11377 copies.
11378
11379 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11380 64 bits.
11381 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11382 128 bits.
11383
11384 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11385 variables.
11386
11387 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11388 return value.
11389
11390 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11391
11392 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11393 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11394
11395 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11396
11397 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11398 different rtl trees depending on TARGET_64BIT.
11399 (rs6000_gen_lvx): Likewise.
11400
11401 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11402
11403 * config/visium/visium.md (nop): Tweak comment.
11404 (hazard_nop): Likewise.
11405
11406 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11407
11408 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11409 -mspeculate-indirect-jumps.
11410 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11411 for -mno-speculate-indirect-jumps.
11412 (*call_indirect_elfv2<mode>_nospec): New define_insn.
11413 (*call_value_indirect_elfv2<mode>): Disable for
11414 -mno-speculate-indirect-jumps.
11415 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11416 (indirect_jump): Emit different RTL for
11417 -mno-speculate-indirect-jumps.
11418 (*indirect_jump<mode>): Disable for
11419 -mno-speculate-indirect-jumps.
11420 (*indirect_jump<mode>_nospec): New define_insn.
11421 (tablejump): Emit different RTL for
11422 -mno-speculate-indirect-jumps.
11423 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11424 (tablejumpsi_nospec): New define_expand.
11425 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11426 (tablejumpdi_nospec): New define_expand.
11427 (*tablejump<mode>_internal1): Disable for
11428 -mno-speculate-indirect-jumps.
11429 (*tablejump<mode>_internal1_nospec): New define_insn.
11430 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11431 option.
11432
11433 2018-01-16 Artyom Skrobov tyomitch@gmail.com
11434
11435 * caller-save.c (insert_save): Drop unnecessary parameter. All
11436 callers updated.
11437
11438 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11439 Richard Biener <rguenth@suse.de>
11440
11441 PR libgomp/83590
11442 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11443 return early, inline manually is_gimple_sizepos. Make sure if we
11444 call gimplify_expr we don't end up with a gimple constant.
11445 * tree.c (variably_modified_type_p): Don't return true for
11446 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
11447 * gimplify.h (is_gimple_sizepos): Remove.
11448
11449 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11450
11451 PR tree-optimization/83857
11452 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11453 vectorizable_live_operation for pure SLP statements.
11454 (vectorizable_live_operation): Handle PHIs.
11455
11456 2018-01-16 Richard Biener <rguenther@suse.de>
11457
11458 PR tree-optimization/83867
11459 * tree-vect-stmts.c (vect_transform_stmt): Precompute
11460 nested_in_vect_loop_p since the scalar stmt may get invalidated.
11461
11462 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11463
11464 PR c/83844
11465 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11466 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11467 If off is not INTEGER_CST, issue a may not be aligned warning
11468 rather than isn't aligned. Use isn%'t rather than isn't.
11469 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11470 into MULT_EXPR.
11471 <case MULT_EXPR>: Improve the case when bottom and one of the
11472 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11473 operand, in that case check if the other operand is multiple of
11474 bottom divided by the INTEGER_CST operand.
11475
11476 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11477
11478 PR target/83858
11479 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11480 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11481 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11482 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11483 * config/pa/pa.c (pa_function_arg_advance): Likewise.
11484 (pa_function_arg, pa_arg_partial_bytes): Likewise.
11485 (pa_function_arg_size): New function.
11486
11487 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11488
11489 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11490 in a separate statement.
11491
11492 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11493
11494 PR tree-optimization/83847
11495 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11496 group gathers and scatters.
11497
11498 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11499
11500 PR rtl-optimization/86620
11501 * params.def (max-sched-ready-insns): Bump minimum value to 1.
11502
11503 PR rtl-optimization/83213
11504 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11505 to last if both are JUMP_INSNs.
11506
11507 PR tree-optimization/83843
11508 * gimple-ssa-store-merging.c
11509 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11510 store_immediate_info for bswap/nop orig_stores.
11511
11512 2018-01-15 Andrew Waterman <andrew@sifive.com>
11513
11514 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11515 !TARGET_MUL.
11516 <UDIV>: Increase cost if !TARGET_DIV.
11517
11518 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
11519
11520 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11521 (define_attr "cr_logical_3op"): New.
11522 (cceq_ior_compare): Adjust.
11523 (cceq_ior_compare_complement): Adjust.
11524 (*cceq_rev_compare): Adjust.
11525 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11526 (is_cracked_insn): Adjust.
11527 (insn_must_be_first_in_group): Adjust.
11528 * config/rs6000/40x.md: Adjust.
11529 * config/rs6000/440.md: Adjust.
11530 * config/rs6000/476.md: Adjust.
11531 * config/rs6000/601.md: Adjust.
11532 * config/rs6000/603.md: Adjust.
11533 * config/rs6000/6xx.md: Adjust.
11534 * config/rs6000/7450.md: Adjust.
11535 * config/rs6000/7xx.md: Adjust.
11536 * config/rs6000/8540.md: Adjust.
11537 * config/rs6000/cell.md: Adjust.
11538 * config/rs6000/e300c2c3.md: Adjust.
11539 * config/rs6000/e500mc.md: Adjust.
11540 * config/rs6000/e500mc64.md: Adjust.
11541 * config/rs6000/e5500.md: Adjust.
11542 * config/rs6000/e6500.md: Adjust.
11543 * config/rs6000/mpc.md: Adjust.
11544 * config/rs6000/power4.md: Adjust.
11545 * config/rs6000/power5.md: Adjust.
11546 * config/rs6000/power6.md: Adjust.
11547 * config/rs6000/power7.md: Adjust.
11548 * config/rs6000/power8.md: Adjust.
11549 * config/rs6000/power9.md: Adjust.
11550 * config/rs6000/rs64.md: Adjust.
11551 * config/rs6000/titan.md: Adjust.
11552
11553 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11554
11555 * config/i386/predicates.md (indirect_branch_operand): Rewrite
11556 ix86_indirect_branch_register logic.
11557
11558 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11559
11560 * config/i386/constraints.md (Bs): Update
11561 ix86_indirect_branch_register check. Don't check
11562 ix86_indirect_branch_register with GOT_memory_operand.
11563 (Bw): Likewise.
11564 * config/i386/predicates.md (GOT_memory_operand): Don't check
11565 ix86_indirect_branch_register here.
11566 (GOT32_symbol_operand): Likewise.
11567
11568 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11569
11570 * config/i386/predicates.md (constant_call_address_operand):
11571 Rewrite ix86_indirect_branch_register logic.
11572 (sibcall_insn_operand): Likewise.
11573
11574 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11575
11576 * config/i386/constraints.md (Bs): Replace
11577 ix86_indirect_branch_thunk_register with
11578 ix86_indirect_branch_register.
11579 (Bw): Likewise.
11580 * config/i386/i386.md (indirect_jump): Likewise.
11581 (tablejump): Likewise.
11582 (*sibcall_memory): Likewise.
11583 (*sibcall_value_memory): Likewise.
11584 Peepholes of indirect call and jump via memory: Likewise.
11585 * config/i386/i386.opt: Likewise.
11586 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11587 (GOT_memory_operand): Likewise.
11588 (call_insn_operand): Likewise.
11589 (sibcall_insn_operand): Likewise.
11590 (GOT32_symbol_operand): Likewise.
11591
11592 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11593
11594 PR middle-end/83837
11595 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11596 type rather than type addr's type points to.
11597 (expand_omp_atomic_mutex): Likewise.
11598 (expand_omp_atomic): Likewise.
11599
11600 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11601
11602 PR target/83839
11603 * config/i386/i386.c (output_indirect_thunk_function): Use
11604 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11605 for __x86_return_thunk.
11606
11607 2018-01-15 Richard Biener <rguenther@suse.de>
11608
11609 PR middle-end/83850
11610 * expmed.c (extract_bit_field_1): Fix typo.
11611
11612 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11613
11614 PR target/83687
11615 * config/arm/iterators.md (VF): New mode iterator.
11616 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11617 Remove integer-related logic from pattern.
11618 (neon_vabd<mode>_3): Likewise.
11619
11620 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11621
11622 PR middle-end/82694
11623 * common.opt (fstrict-overflow): No longer an alias.
11624 (fwrapv-pointer): New option.
11625 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11626 also for pointer types based on flag_wrapv_pointer.
11627 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11628 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11629 opts->x_flag_wrapv got set.
11630 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11631 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11632 POINTER_TYPE_OVERFLOW_UNDEFINED.
11633 * match.pd: Likewise in address comparison pattern.
11634 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11635
11636 2018-01-15 Richard Biener <rguenther@suse.de>
11637
11638 PR lto/83804
11639 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11640 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
11641 Reset type names to their identifier if their TYPE_DECL doesn't
11642 have linkage (and thus is used for ODR and devirt).
11643 (save_debug_info_for_decl): Remove.
11644 (save_debug_info_for_type): Likewise.
11645 (add_tree_to_fld_list): Adjust.
11646 * tree-pretty-print.c (dump_generic_node): Make dumping of
11647 type names more robust.
11648
11649 2018-01-15 Richard Biener <rguenther@suse.de>
11650
11651 * BASE-VER: Bump to 8.0.1.
11652
11653 2018-01-14 Martin Sebor <msebor@redhat.com>
11654
11655 PR other/83508
11656 * builtins.c (check_access): Avoid warning when the no-warning bit
11657 is set.
11658
11659 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
11660
11661 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11662 * ira-color (allocno_hard_regs_compare): Likewise.
11663
11664 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
11665
11666 PR target/83013
11667 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11668 Use .pushsection/.popsection.
11669
11670 2018-01-14 Martin Sebor <msebor@redhat.com>
11671
11672 PR c++/81327
11673 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11674
11675 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11676
11677 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11678 entry from extra_headers.
11679 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11680 extra_headers, make the list bitwise identical to the i?86-*-* one.
11681
11682 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11683
11684 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11685 -mcmodel=large with -mindirect-branch=thunk,
11686 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11687 -mfunction-return=thunk-extern.
11688 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11689 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11690 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11691
11692 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11693
11694 * config/i386/i386.c (print_reg): Print the name of the full
11695 integer register without '%'.
11696 (ix86_print_operand): Handle 'V'.
11697 * doc/extend.texi: Document 'V' modifier.
11698
11699 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11700
11701 * config/i386/constraints.md (Bs): Disallow memory operand for
11702 -mindirect-branch-register.
11703 (Bw): Likewise.
11704 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11705 (GOT_memory_operand): Likewise.
11706 (call_insn_operand): Likewise.
11707 (sibcall_insn_operand): Likewise.
11708 (GOT32_symbol_operand): Likewise.
11709 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11710 for -mindirect-branch-register.
11711 (tablejump): Likewise.
11712 (*sibcall_memory): Likewise.
11713 (*sibcall_value_memory): Likewise.
11714 Disallow peepholes of indirect call and jump via memory for
11715 -mindirect-branch-register.
11716 (*call_pop): Replace m with Bw.
11717 (*call_value_pop): Likewise.
11718 (*sibcall_pop_memory): Replace m with Bs.
11719 * config/i386/i386.opt (mindirect-branch-register): New option.
11720 * doc/invoke.texi: Document -mindirect-branch-register option.
11721
11722 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11723
11724 * config/i386/i386-protos.h (ix86_output_function_return): New.
11725 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11726 set function_return_type.
11727 (indirect_thunk_name): Add ret_p to indicate thunk for function
11728 return.
11729 (output_indirect_thunk_function): Pass false to
11730 indirect_thunk_name.
11731 (ix86_output_indirect_branch_via_reg): Likewise.
11732 (ix86_output_indirect_branch_via_push): Likewise.
11733 (output_indirect_thunk_function): Create alias for function
11734 return thunk if regno < 0.
11735 (ix86_output_function_return): New function.
11736 (ix86_handle_fndecl_attribute): Handle function_return.
11737 (ix86_attribute_table): Add function_return.
11738 * config/i386/i386.h (machine_function): Add
11739 function_return_type.
11740 * config/i386/i386.md (simple_return_internal): Use
11741 ix86_output_function_return.
11742 (simple_return_internal_long): Likewise.
11743 * config/i386/i386.opt (mfunction-return=): New option.
11744 (indirect_branch): Mention -mfunction-return=.
11745 * doc/extend.texi: Document function_return function attribute.
11746 * doc/invoke.texi: Document -mfunction-return= option.
11747
11748 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11749
11750 * config/i386/i386-opts.h (indirect_branch): New.
11751 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11752 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11753 with local indirect jump when converting indirect call and jump.
11754 (ix86_set_indirect_branch_type): New.
11755 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11756 (indirectlabelno): New.
11757 (indirect_thunk_needed): Likewise.
11758 (indirect_thunk_bnd_needed): Likewise.
11759 (indirect_thunks_used): Likewise.
11760 (indirect_thunks_bnd_used): Likewise.
11761 (INDIRECT_LABEL): Likewise.
11762 (indirect_thunk_name): Likewise.
11763 (output_indirect_thunk): Likewise.
11764 (output_indirect_thunk_function): Likewise.
11765 (ix86_output_indirect_branch_via_reg): Likewise.
11766 (ix86_output_indirect_branch_via_push): Likewise.
11767 (ix86_output_indirect_branch): Likewise.
11768 (ix86_output_indirect_jmp): Likewise.
11769 (ix86_code_end): Call output_indirect_thunk_function if needed.
11770 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11771 needed.
11772 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11773 (ix86_attribute_table): Add indirect_branch.
11774 * config/i386/i386.h (machine_function): Add indirect_branch_type
11775 and has_local_indirect_jump.
11776 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11777 to true.
11778 (tablejump): Likewise.
11779 (*indirect_jump): Use ix86_output_indirect_jmp.
11780 (*tablejump_1): Likewise.
11781 (simple_return_indirect_internal): Likewise.
11782 * config/i386/i386.opt (mindirect-branch=): New option.
11783 (indirect_branch): New.
11784 (keep): Likewise.
11785 (thunk): Likewise.
11786 (thunk-inline): Likewise.
11787 (thunk-extern): Likewise.
11788 * doc/extend.texi: Document indirect_branch function attribute.
11789 * doc/invoke.texi: Document -mindirect-branch= option.
11790
11791 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11792
11793 PR ipa/83051
11794 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11795
11796 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11797
11798 * ipa-inline.c (want_inline_small_function_p): Return false if
11799 inlining has already failed with CIF_FINAL_ERROR.
11800 (update_caller_keys): Call want_inline_small_function_p before
11801 can_inline_edge_p.
11802 (update_callee_keys): Likewise.
11803
11804 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11805
11806 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11807 New function.
11808 (rs6000_quadword_masked_address_p): Likewise.
11809 (quad_aligned_load_p): Likewise.
11810 (quad_aligned_store_p): Likewise.
11811 (const_load_sequence_p): Add comment to describe the outer-most loop.
11812 (mimic_memory_attributes_and_flags): New function.
11813 (rs6000_gen_stvx): Likewise.
11814 (replace_swapped_aligned_store): Likewise.
11815 (rs6000_gen_lvx): Likewise.
11816 (replace_swapped_aligned_load): Likewise.
11817 (replace_swapped_load_constant): Capitalize argument name in
11818 comment describing this function.
11819 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11820 and stores that access quad-word aligned addresses and replace
11821 with stvx or lvx instructions when appropriate.
11822 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11823 New function prototype.
11824 (rs6000_quadword_masked_address_p): Likewise.
11825 (rs6000_gen_lvx): Likewise.
11826 (rs6000_gen_stvx): Likewise.
11827 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11828 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11829 when memory address is aligned.
11830 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11831 this split to select lvx instruction when memory address is aligned.
11832 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11833 instruction when memory address is aligned.
11834 (*vsx_le_perm_load_v16qi): Likewise.
11835 (four unnamed splitters): Modify to select the stvx instruction
11836 when memory is aligned.
11837
11838 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11839
11840 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11841 which appears in the queue multiple times.
11842
11843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11844 Alan Hayward <alan.hayward@arm.com>
11845 David Sherwood <david.sherwood@arm.com>
11846
11847 * tree-vectorizer.h (vec_lower_bound): New structure.
11848 (_loop_vec_info): Add check_nonzero and lower_bounds.
11849 (LOOP_VINFO_CHECK_NONZERO): New macro.
11850 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11851 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11852 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11853 fields. Make seg_len the distance travelled, not including the
11854 access size.
11855 (dr_direction_indicator): Declare.
11856 (dr_zero_step_indicator): Likewise.
11857 (dr_known_forward_stride_p): Likewise.
11858 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11859 tree-ssanames.h.
11860 (runtime_alias_check_p): Allow runtime alias checks with
11861 variable strides.
11862 (operator ==): Compare access_size and align.
11863 (prune_runtime_alias_test_list): Rework for new distinction between
11864 the access_size and seg_len.
11865 (create_intersect_range_checks_index): Likewise. Cope with polynomial
11866 segment lengths.
11867 (get_segment_min_max): New function.
11868 (create_intersect_range_checks): Use it.
11869 (dr_step_indicator): New function.
11870 (dr_direction_indicator): Likewise.
11871 (dr_zero_step_indicator): Likewise.
11872 (dr_known_forward_stride_p): Likewise.
11873 * tree-loop-distribution.c (data_ref_segment_size): Return
11874 DR_STEP * (niters - 1).
11875 (compute_alias_check_pairs): Update call to the dr_with_seg_len
11876 constructor.
11877 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11878 (vect_preserves_scalar_order_p): New function, split out from...
11879 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
11880 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11881 (vect_vfa_access_size): New function.
11882 (vect_vfa_align): Likewise.
11883 (vect_compile_time_alias): Take access_size_a and access_b arguments.
11884 (dump_lower_bound): New function.
11885 (vect_check_lower_bound): Likewise.
11886 (vect_small_gap_p): Likewise.
11887 (vectorizable_with_step_bound_p): Likewise.
11888 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11889 depencies if the vectorization factor is 1. Convert the checks
11890 for nonzero steps into checks on the bounds of DR_STEP. Try using
11891 a bunds check for variable steps if the minimum required step is
11892 relatively small. Update calls to the dr_with_seg_len
11893 constructor and to vect_compile_time_alias.
11894 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11895 function.
11896 (vect_loop_versioning): Call it.
11897 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11898 when retrying.
11899 (vect_estimate_min_profitable_iters): Account for any bounds checks.
11900
11901 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11902 Alan Hayward <alan.hayward@arm.com>
11903 David Sherwood <david.sherwood@arm.com>
11904
11905 * doc/sourcebuild.texi (vect_scatter_store): Document.
11906 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11907 optabs.
11908 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11909 Document.
11910 * genopinit.c (main): Add supports_vec_scatter_store and
11911 supports_vec_scatter_store_cached to target_optabs.
11912 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11913 IFN_MASK_SCATTER_STORE.
11914 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11915 functions.
11916 * internal-fn.h (internal_store_fn_p): Declare.
11917 (internal_fn_stored_value_index): Likewise.
11918 * internal-fn.c (scatter_store_direct): New macro.
11919 (expand_scatter_store_optab_fn): New function.
11920 (direct_scatter_store_optab_supported_p): New macro.
11921 (internal_store_fn_p): New function.
11922 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11923 IFN_MASK_SCATTER_STORE.
11924 (internal_fn_mask_index): Likewise.
11925 (internal_fn_stored_value_index): New function.
11926 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11927 for scatter stores.
11928 * optabs-query.h (supports_vec_scatter_store_p): Declare.
11929 * optabs-query.c (supports_vec_scatter_store_p): New function.
11930 * tree-vectorizer.h (vect_get_store_rhs): Declare.
11931 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11932 true for scatter stores.
11933 (vect_gather_scatter_fn_p): Handle scatter stores too.
11934 (vect_check_gather_scatter): Consider using scatter stores if
11935 supports_vec_scatter_store_p.
11936 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11937 scatter stores too.
11938 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11939 internal_fn_stored_value_index.
11940 (check_load_store_masking): Handle scatter stores too.
11941 (vect_get_store_rhs): Make public.
11942 (vectorizable_call): Use internal_store_fn_p.
11943 (vectorizable_store): Handle scatter store internal functions.
11944 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11945 when deciding whether the end of the group has been reached.
11946 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11947 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11948 (mask_scatter_store<mode>): New insns.
11949
11950 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11951 Alan Hayward <alan.hayward@arm.com>
11952 David Sherwood <david.sherwood@arm.com>
11953
11954 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11955 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11956 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11957 function.
11958 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11959 Use vect_truncate_gather_scatter_offset if we can't treat the
11960 operation as a normal gather load or scatter store.
11961 (get_group_load_store_type): Take the gather_scatter_info
11962 as argument. Try using a gather load or scatter store for
11963 single-element groups.
11964 (get_load_store_type): Update calls to get_group_load_store_type
11965 and vect_use_strided_gather_scatters_p.
11966
11967 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11968 Alan Hayward <alan.hayward@arm.com>
11969 David Sherwood <david.sherwood@arm.com>
11970
11971 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11972 optional tree argument.
11973 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11974 null target hooks.
11975 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11976 but continue to use the current value as a fallback.
11977 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11978 to compare the updates.
11979 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11980 (get_load_store_type): Use it when handling a strided access.
11981 (vect_get_strided_load_store_ops): New function.
11982 (vect_get_data_ptr_increment): Likewise.
11983 (vectorizable_load): Handle strided gather loads. Always pass
11984 a step to vect_create_data_ref_ptr and bump_vector_ptr.
11985
11986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11987 Alan Hayward <alan.hayward@arm.com>
11988 David Sherwood <david.sherwood@arm.com>
11989
11990 * doc/md.texi (gather_load@var{m}): Document.
11991 (mask_gather_load@var{m}): Likewise.
11992 * genopinit.c (main): Add supports_vec_gather_load and
11993 supports_vec_gather_load_cached to target_optabs.
11994 * optabs-tree.c (init_tree_optimization_optabs): Use
11995 ggc_cleared_alloc to allocate target_optabs.
11996 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
11997 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
11998 functions.
11999 * internal-fn.h (internal_load_fn_p): Declare.
12000 (internal_gather_scatter_fn_p): Likewise.
12001 (internal_fn_mask_index): Likewise.
12002 (internal_gather_scatter_fn_supported_p): Likewise.
12003 * internal-fn.c (gather_load_direct): New macro.
12004 (expand_gather_load_optab_fn): New function.
12005 (direct_gather_load_optab_supported_p): New macro.
12006 (direct_internal_fn_optab): New function.
12007 (internal_load_fn_p): Likewise.
12008 (internal_gather_scatter_fn_p): Likewise.
12009 (internal_fn_mask_index): Likewise.
12010 (internal_gather_scatter_fn_supported_p): Likewise.
12011 * optabs-query.c (supports_at_least_one_mode_p): New function.
12012 (supports_vec_gather_load_p): Likewise.
12013 * optabs-query.h (supports_vec_gather_load_p): Declare.
12014 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
12015 and memory_type field.
12016 (NUM_PATTERNS): Bump to 15.
12017 * tree-vect-data-refs.c: Include internal-fn.h.
12018 (vect_gather_scatter_fn_p): New function.
12019 (vect_describe_gather_scatter_call): Likewise.
12020 (vect_check_gather_scatter): Try using internal functions for
12021 gather loads. Recognize existing calls to a gather load function.
12022 (vect_analyze_data_refs): Consider using gather loads if
12023 supports_vec_gather_load_p.
12024 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
12025 (vect_get_gather_scatter_offset_type): Likewise.
12026 (vect_convert_mask_for_vectype): Likewise.
12027 (vect_add_conversion_to_patterm): Likewise.
12028 (vect_try_gather_scatter_pattern): Likewise.
12029 (vect_recog_gather_scatter_pattern): New pattern recognizer.
12030 (vect_vect_recog_func_ptrs): Add it.
12031 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
12032 internal_fn_mask_index and internal_gather_scatter_fn_p.
12033 (check_load_store_masking): Take the gather_scatter_info as an
12034 argument and handle gather loads.
12035 (vect_get_gather_scatter_ops): New function.
12036 (vectorizable_call): Check internal_load_fn_p.
12037 (vectorizable_load): Likewise. Handle gather load internal
12038 functions.
12039 (vectorizable_store): Update call to check_load_store_masking.
12040 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
12041 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
12042 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
12043 (aarch64_gather_scale_operand_d): New predicates.
12044 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
12045 (mask_gather_load<mode>): New insns.
12046
12047 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12048 Alan Hayward <alan.hayward@arm.com>
12049 David Sherwood <david.sherwood@arm.com>
12050
12051 * optabs.def (fold_left_plus_optab): New optab.
12052 * doc/md.texi (fold_left_plus_@var{m}): Document.
12053 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
12054 * internal-fn.c (fold_left_direct): Define.
12055 (expand_fold_left_optab_fn): Likewise.
12056 (direct_fold_left_optab_supported_p): Likewise.
12057 * fold-const-call.c (fold_const_fold_left): New function.
12058 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
12059 * tree-parloops.c (valid_reduction_p): New function.
12060 (gather_scalar_reductions): Use it.
12061 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
12062 (vect_finish_replace_stmt): Declare.
12063 * tree-vect-loop.c (fold_left_reduction_fn): New function.
12064 (needs_fold_left_reduction_p): New function, split out from...
12065 (vect_is_simple_reduction): ...here. Accept reductions that
12066 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
12067 (vect_force_simple_reduction): Also store the reduction type in
12068 the assignment's STMT_VINFO_REDUC_TYPE.
12069 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
12070 (merge_with_identity): New function.
12071 (vect_expand_fold_left): Likewise.
12072 (vectorize_fold_left_reduction): Likewise.
12073 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
12074 scalar phi in place for it. Check for target support and reject
12075 cases that would reassociate the operation. Defer the transform
12076 phase to vectorize_fold_left_reduction.
12077 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
12078 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
12079 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
12080
12081 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12082
12083 * tree-if-conv.c (predicate_mem_writes): Remove redundant
12084 call to ifc_temp_var.
12085
12086 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12087 Alan Hayward <alan.hayward@arm.com>
12088 David Sherwood <david.sherwood@arm.com>
12089
12090 * target.def (legitimize_address_displacement): Take the original
12091 offset as a poly_int.
12092 * targhooks.h (default_legitimize_address_displacement): Update
12093 accordingly.
12094 * targhooks.c (default_legitimize_address_displacement): Likewise.
12095 * doc/tm.texi: Regenerate.
12096 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
12097 as an argument, moving assert of ad->disp == ad->disp_term to...
12098 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
12099 Try calling targetm.legitimize_address_displacement before expanding
12100 the address rather than afterwards, and adjust for the new interface.
12101 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
12102 Match the new hook interface. Handle SVE addresses.
12103 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
12104 new hook interface.
12105
12106 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12107
12108 * Makefile.in (OBJS): Add early-remat.o.
12109 * target.def (select_early_remat_modes): New hook.
12110 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
12111 * doc/tm.texi: Regenerate.
12112 * targhooks.h (default_select_early_remat_modes): Declare.
12113 * targhooks.c (default_select_early_remat_modes): New function.
12114 * timevar.def (TV_EARLY_REMAT): New timevar.
12115 * passes.def (pass_early_remat): New pass.
12116 * tree-pass.h (make_pass_early_remat): Declare.
12117 * early-remat.c: New file.
12118 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
12119 function.
12120 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
12121
12122 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12123 Alan Hayward <alan.hayward@arm.com>
12124 David Sherwood <david.sherwood@arm.com>
12125
12126 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
12127 vfm1 with a bound_epilog parameter.
12128 (vect_do_peeling): Update calls accordingly, and move the prologue
12129 call earlier in the function. Treat the base bound_epilog as 0 for
12130 fully-masked loops and retain vf - 1 for other loops. Add 1 to
12131 this base when peeling for gaps.
12132 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
12133 with fully-masked loops.
12134 (vect_estimate_min_profitable_iters): Handle the single peeled
12135 iteration in that case.
12136
12137 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12138 Alan Hayward <alan.hayward@arm.com>
12139 David Sherwood <david.sherwood@arm.com>
12140
12141 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
12142 single-element interleaving even if the size is not a power of 2.
12143 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
12144 accesses for single-element interleaving if the group size is
12145 not a power of 2.
12146
12147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12148 Alan Hayward <alan.hayward@arm.com>
12149 David Sherwood <david.sherwood@arm.com>
12150
12151 * doc/md.texi (fold_extract_last_@var{m}): Document.
12152 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
12153 * optabs.def (fold_extract_last_optab): New optab.
12154 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
12155 * internal-fn.c (fold_extract_direct): New macro.
12156 (expand_fold_extract_optab_fn): Likewise.
12157 (direct_fold_extract_optab_supported_p): Likewise.
12158 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
12159 * tree-vect-loop.c (vect_model_reduction_cost): Handle
12160 EXTRACT_LAST_REDUCTION.
12161 (get_initial_def_for_reduction): Do not create an initial vector
12162 for EXTRACT_LAST_REDUCTION reductions.
12163 (vectorizable_reduction): Leave the scalar phi in place for
12164 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
12165 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
12166 epilogue code for EXTRACT_LAST_REDUCTION and defer the
12167 transform phase to vectorizable_condition.
12168 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
12169 split out from...
12170 (vect_finish_stmt_generation): ...here.
12171 (vect_finish_replace_stmt): New function.
12172 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
12173 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
12174 pattern.
12175 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
12176
12177 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12178 Alan Hayward <alan.hayward@arm.com>
12179 David Sherwood <david.sherwood@arm.com>
12180
12181 * doc/md.texi (extract_last_@var{m}): Document.
12182 * optabs.def (extract_last_optab): New optab.
12183 * internal-fn.def (EXTRACT_LAST): New internal function.
12184 * internal-fn.c (cond_unary_direct): New macro.
12185 (expand_cond_unary_optab_fn): Likewise.
12186 (direct_cond_unary_optab_supported_p): Likewise.
12187 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
12188 loops using EXTRACT_LAST.
12189 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
12190 (extract_last_<mode>): ...this optab.
12191 (vec_extract<mode><Vel>): Update accordingly.
12192
12193 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12194 Alan Hayward <alan.hayward@arm.com>
12195 David Sherwood <david.sherwood@arm.com>
12196
12197 * target.def (empty_mask_is_expensive): New hook.
12198 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
12199 * doc/tm.texi: Regenerate.
12200 * targhooks.h (default_empty_mask_is_expensive): Declare.
12201 * targhooks.c (default_empty_mask_is_expensive): New function.
12202 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
12203 if the target says that empty masks are expensive.
12204 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
12205 New function.
12206 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
12207
12208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12209 Alan Hayward <alan.hayward@arm.com>
12210 David Sherwood <david.sherwood@arm.com>
12211
12212 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
12213 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
12214 (vect_use_loop_mask_for_alignment_p): New function.
12215 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
12216 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
12217 niters_skip argument. Make sure that the first niters_skip elements
12218 of the first iteration are inactive.
12219 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
12220 Update call to vect_set_loop_masks_directly.
12221 (get_misalign_in_elems): New function, split out from...
12222 (vect_gen_prolog_loop_niters): ...here.
12223 (vect_update_init_of_dr): Take a code argument that specifies whether
12224 the adjustment should be added or subtracted.
12225 (vect_update_init_of_drs): Likewise.
12226 (vect_prepare_for_masked_peels): New function.
12227 (vect_do_peeling): Skip prologue peeling if we're using a mask
12228 instead. Update call to vect_update_inits_of_drs.
12229 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12230 mask_skip_niters.
12231 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
12232 alignment. Do not include the number of peeled iterations in
12233 the minimum threshold in that case.
12234 (vectorizable_induction): Adjust the start value down by
12235 LOOP_VINFO_MASK_SKIP_NITERS iterations.
12236 (vect_transform_loop): Call vect_prepare_for_masked_peels.
12237 Take the number of skipped iterations into account when calculating
12238 the loop bounds.
12239 * tree-vect-stmts.c (vect_gen_while_not): New function.
12240
12241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12242 Alan Hayward <alan.hayward@arm.com>
12243 David Sherwood <david.sherwood@arm.com>
12244
12245 * doc/sourcebuild.texi (vect_fully_masked): Document.
12246 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12247 default value to 0.
12248 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12249 split out from...
12250 (vect_analyze_loop_2): ...here. Don't check the vectorization
12251 factor against the number of loop iterations if the loop is
12252 fully-masked.
12253
12254 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12255 Alan Hayward <alan.hayward@arm.com>
12256 David Sherwood <david.sherwood@arm.com>
12257
12258 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12259 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12260 (dump_groups): Update accordingly.
12261 (iv_use::mem_type): New member variable.
12262 (address_p): New function.
12263 (record_use): Add a mem_type argument and initialize the new
12264 mem_type field.
12265 (record_group_use): Add a mem_type argument. Use address_p.
12266 Remove obsolete null checks of base_object. Update call to record_use.
12267 (find_interesting_uses_op): Update call to record_group_use.
12268 (find_interesting_uses_cond): Likewise.
12269 (find_interesting_uses_address): Likewise.
12270 (get_mem_type_for_internal_fn): New function.
12271 (find_address_like_use): Likewise.
12272 (find_interesting_uses_stmt): Try find_address_like_use before
12273 calling find_interesting_uses_op.
12274 (addr_offset_valid_p): Use the iv mem_type field as the type
12275 of the addressed memory.
12276 (add_autoinc_candidates): Likewise.
12277 (get_address_cost): Likewise.
12278 (split_small_address_groups_p): Use address_p.
12279 (split_address_groups): Likewise.
12280 (add_iv_candidate_for_use): Likewise.
12281 (autoinc_possible_for_pair): Likewise.
12282 (rewrite_groups): Likewise.
12283 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12284 (determine_group_iv_cost): Update after split of USE_ADDRESS.
12285 (get_alias_ptr_type_for_ptr_address): New function.
12286 (rewrite_use_address): Rewrite address uses in calls that were
12287 identified by find_address_like_use.
12288
12289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12290 Alan Hayward <alan.hayward@arm.com>
12291 David Sherwood <david.sherwood@arm.com>
12292
12293 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12294 TARGET_MEM_REFs.
12295 * gimple-expr.h (is_gimple_addressable: Likewise.
12296 * gimple-expr.c (is_gimple_address): Likewise.
12297 * internal-fn.c (expand_call_mem_ref): New function.
12298 (expand_mask_load_optab_fn): Use it.
12299 (expand_mask_store_optab_fn): Likewise.
12300
12301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12302 Alan Hayward <alan.hayward@arm.com>
12303 David Sherwood <david.sherwood@arm.com>
12304
12305 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12306 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12307 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12308 (cond_umax@var{mode}): Document.
12309 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12310 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12311 (cond_umin_optab, cond_umax_optab): New optabs.
12312 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12313 (COND_IOR, COND_XOR): New internal functions.
12314 * internal-fn.h (get_conditional_internal_fn): Declare.
12315 * internal-fn.c (cond_binary_direct): New macro.
12316 (expand_cond_binary_optab_fn): Likewise.
12317 (direct_cond_binary_optab_supported_p): Likewise.
12318 (get_conditional_internal_fn): New function.
12319 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12320 Cope with reduction statements that are vectorized as calls rather
12321 than assignments.
12322 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12323 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12324 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12325 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12326 (UNSPEC_COND_EOR): New unspecs.
12327 (optab): Add mappings for them.
12328 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12329 (sve_int_op, sve_fp_op): New int attributes.
12330
12331 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12332 Alan Hayward <alan.hayward@arm.com>
12333 David Sherwood <david.sherwood@arm.com>
12334
12335 * optabs.def (while_ult_optab): New optab.
12336 * doc/md.texi (while_ult@var{m}@var{n}): Document.
12337 * internal-fn.def (WHILE_ULT): New internal function.
12338 * internal-fn.h (direct_internal_fn_supported_p): New override
12339 that takes two types as argument.
12340 * internal-fn.c (while_direct): New macro.
12341 (expand_while_optab_fn): New function.
12342 (convert_optab_supported_p): Likewise.
12343 (direct_while_optab_supported_p): New macro.
12344 * wide-int.h (wi::udiv_ceil): New function.
12345 * tree-vectorizer.h (rgroup_masks): New structure.
12346 (vec_loop_masks): New typedef.
12347 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12348 and fully_masked_p.
12349 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12350 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12351 (vect_max_vf): New function.
12352 (slpeel_make_loop_iterate_ntimes): Delete.
12353 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12354 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12355 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12356 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12357 internal-fn.h, stor-layout.h and optabs-query.h.
12358 (vect_set_loop_mask): New function.
12359 (add_preheader_seq): Likewise.
12360 (add_header_seq): Likewise.
12361 (interleave_supported_p): Likewise.
12362 (vect_maybe_permute_loop_masks): Likewise.
12363 (vect_set_loop_masks_directly): Likewise.
12364 (vect_set_loop_condition_masked): Likewise.
12365 (vect_set_loop_condition_unmasked): New function, split out from
12366 slpeel_make_loop_iterate_ntimes.
12367 (slpeel_make_loop_iterate_ntimes): Rename to..
12368 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
12369 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12370 (vect_do_peeling): Update call accordingly.
12371 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12372 loops.
12373 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12374 mask_compare_type, can_fully_mask_p and fully_masked_p.
12375 (release_vec_loop_masks): New function.
12376 (_loop_vec_info): Use it to free the loop masks.
12377 (can_produce_all_loop_masks_p): New function.
12378 (vect_get_max_nscalars_per_iter): Likewise.
12379 (vect_verify_full_masking): Likewise.
12380 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12381 retries, and free the mask rgroups before retrying. Check loop-wide
12382 reasons for disallowing fully-masked loops. Make the final decision
12383 about whether use a fully-masked loop or not.
12384 (vect_estimate_min_profitable_iters): Do not assume that peeling
12385 for the number of iterations will be needed for fully-masked loops.
12386 (vectorizable_reduction): Disable fully-masked loops.
12387 (vectorizable_live_operation): Likewise.
12388 (vect_halve_mask_nunits): New function.
12389 (vect_double_mask_nunits): Likewise.
12390 (vect_record_loop_mask): Likewise.
12391 (vect_get_loop_mask): Likewise.
12392 (vect_transform_loop): Handle the case in which the final loop
12393 iteration might handle a partial vector. Call vect_set_loop_condition
12394 instead of slpeel_make_loop_iterate_ntimes.
12395 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12396 (check_load_store_masking): New function.
12397 (prepare_load_store_mask): Likewise.
12398 (vectorizable_store): Handle fully-masked loops.
12399 (vectorizable_load): Likewise.
12400 (supportable_widening_operation): Use vect_halve_mask_nunits for
12401 booleans.
12402 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12403 (vect_gen_while): New function.
12404 * config/aarch64/aarch64.md (umax<mode>3): New expander.
12405 (aarch64_uqdec<mode>): New insn.
12406
12407 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12408 Alan Hayward <alan.hayward@arm.com>
12409 David Sherwood <david.sherwood@arm.com>
12410
12411 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12412 (reduc_xor_scal_optab): New optabs.
12413 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12414 (reduc_xor_scal_@var{m}): Document.
12415 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12416 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12417 internal functions.
12418 * fold-const-call.c (fold_const_call): Handle them.
12419 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12420 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12421 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12422 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12423 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12424 (UNSPEC_XORV): New unspecs.
12425 (optab): Add entries for them.
12426 (BITWISEV): New int iterator.
12427 (bit_reduc_op): New int attributes.
12428
12429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12430 Alan Hayward <alan.hayward@arm.com>
12431 David Sherwood <david.sherwood@arm.com>
12432
12433 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12434 * internal-fn.def (VEC_SHL_INSERT): New internal function.
12435 * optabs.def (vec_shl_insert_optab): New optab.
12436 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12437 (duplicate_and_interleave): Likewise.
12438 * tree-vect-loop.c: Include internal-fn.h.
12439 (neutral_op_for_slp_reduction): New function, split out from
12440 get_initial_defs_for_reduction.
12441 (get_initial_def_for_reduction): Handle option 2 for variable-length
12442 vectors by loading the neutral value into a vector and then shifting
12443 the initial value into element 0.
12444 (get_initial_defs_for_reduction): Replace the code argument with
12445 the neutral value calculated by neutral_op_for_slp_reduction.
12446 Use gimple_build_vector for constant-length vectors.
12447 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12448 but the first group_size elements have a neutral value.
12449 Use duplicate_and_interleave otherwise.
12450 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12451 Update call to get_initial_defs_for_reduction. Handle SLP
12452 reductions for variable-length vectors by creating one vector
12453 result for each scalar result, with the elements associated
12454 with other scalar results stubbed out with the neutral value.
12455 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12456 Require IFN_VEC_SHL_INSERT for double reductions on
12457 variable-length vectors, or SLP reductions that have
12458 a neutral value. Require can_duplicate_and_interleave_p
12459 support for variable-length unchained SLP reductions if there
12460 is no neutral value, such as for MIN/MAX reductions. Also require
12461 the number of vector elements to be a multiple of the number of
12462 SLP statements when doing variable-length unchained SLP reductions.
12463 Update call to vect_create_epilog_for_reduction.
12464 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12465 and remove initial values.
12466 (duplicate_and_interleave): Make public.
12467 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12468 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12469
12470 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12471 Alan Hayward <alan.hayward@arm.com>
12472 David Sherwood <david.sherwood@arm.com>
12473
12474 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12475 (can_duplicate_and_interleave_p): New function.
12476 (vect_get_and_check_slp_defs): Take the vector of statements
12477 rather than just the current one. Remove excess parentheses.
12478 Restriction rejectinon of vect_constant_def and vect_external_def
12479 for variable-length vectors to boolean types, or types for which
12480 can_duplicate_and_interleave_p is false.
12481 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12482 (duplicate_and_interleave): New function.
12483 (vect_get_constant_vectors): Use gimple_build_vector for
12484 constant-length vectors and suitable variable-length constant
12485 vectors. Use duplicate_and_interleave for other variable-length
12486 vectors. Don't defer the update when inserting new statements.
12487
12488 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12489 Alan Hayward <alan.hayward@arm.com>
12490 David Sherwood <david.sherwood@arm.com>
12491
12492 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12493 min_profitable_iters doesn't go negative.
12494
12495 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12496 Alan Hayward <alan.hayward@arm.com>
12497 David Sherwood <david.sherwood@arm.com>
12498
12499 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12500 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12501 * optabs.def (vec_mask_load_lanes_optab): New optab.
12502 (vec_mask_store_lanes_optab): Likewise.
12503 * internal-fn.def (MASK_LOAD_LANES): New internal function.
12504 (MASK_STORE_LANES): Likewise.
12505 * internal-fn.c (mask_load_lanes_direct): New macro.
12506 (mask_store_lanes_direct): Likewise.
12507 (expand_mask_load_optab_fn): Handle masked operations.
12508 (expand_mask_load_lanes_optab_fn): New macro.
12509 (expand_mask_store_optab_fn): Handle masked operations.
12510 (expand_mask_store_lanes_optab_fn): New macro.
12511 (direct_mask_load_lanes_optab_supported_p): Likewise.
12512 (direct_mask_store_lanes_optab_supported_p): Likewise.
12513 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12514 parameter.
12515 (vect_load_lanes_supported): Likewise.
12516 * tree-vect-data-refs.c (strip_conversion): New function.
12517 (can_group_stmts_p): Likewise.
12518 (vect_analyze_data_ref_accesses): Use it instead of checking
12519 for a pair of assignments.
12520 (vect_store_lanes_supported): Take a masked_p parameter.
12521 (vect_load_lanes_supported): Likewise.
12522 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12523 vect_store_lanes_supported and vect_load_lanes_supported.
12524 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12525 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12526 parameter. Don't allow gaps for masked accesses.
12527 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
12528 and vect_load_lanes_supported.
12529 (get_load_store_type): Take a masked_p parameter and update
12530 call to get_group_load_store_type.
12531 (vectorizable_store): Update call to get_load_store_type.
12532 Handle IFN_MASK_STORE_LANES.
12533 (vectorizable_load): Update call to get_load_store_type.
12534 Handle IFN_MASK_LOAD_LANES.
12535
12536 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12537 Alan Hayward <alan.hayward@arm.com>
12538 David Sherwood <david.sherwood@arm.com>
12539
12540 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12541 modes for SVE.
12542 * config/aarch64/aarch64-protos.h
12543 (aarch64_sve_struct_memory_operand_p): Declare.
12544 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12545 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12546 (VPRED, vpred): Handle SVE structure modes.
12547 * config/aarch64/constraints.md (Utx): New constraint.
12548 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12549 (aarch64_sve_struct_nonimmediate_operand): New predicates.
12550 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12551 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12552 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12553 structure modes. Split into pieces after RA.
12554 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12555 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12556 New patterns.
12557 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12558 SVE structure modes.
12559 (aarch64_classify_address): Likewise.
12560 (sizetochar): Move earlier in file.
12561 (aarch64_print_operand): Handle SVE register lists.
12562 (aarch64_array_mode): New function.
12563 (aarch64_sve_struct_memory_operand_p): Likewise.
12564 (TARGET_ARRAY_MODE): Redefine.
12565
12566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12567 Alan Hayward <alan.hayward@arm.com>
12568 David Sherwood <david.sherwood@arm.com>
12569
12570 * target.def (array_mode): New target hook.
12571 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12572 * doc/tm.texi: Regenerate.
12573 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12574 * hooks.c (hook_optmode_mode_uhwi_none): New function.
12575 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12576 targetm.array_mode.
12577 * stor-layout.c (mode_for_array): Likewise. Support polynomial
12578 type sizes.
12579
12580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12581 Alan Hayward <alan.hayward@arm.com>
12582 David Sherwood <david.sherwood@arm.com>
12583
12584 * fold-const.c (fold_binary_loc): Check the argument types
12585 rather than the result type when testing for a vector operation.
12586
12587 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12588
12589 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12590 * doc/tm.texi: Regenerate.
12591
12592 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12593 Alan Hayward <alan.hayward@arm.com>
12594 David Sherwood <david.sherwood@arm.com>
12595
12596 * doc/invoke.texi (-msve-vector-bits=): Document new option.
12597 (sve): Document new AArch64 extension.
12598 * doc/md.texi (w): Extend the description of the AArch64
12599 constraint to include SVE vectors.
12600 (Upl, Upa): Document new AArch64 predicate constraints.
12601 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12602 enum.
12603 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12604 (msve-vector-bits=): New option.
12605 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12606 SVE when these are disabled.
12607 (sve): New extension.
12608 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12609 modes. Adjust their number of units based on aarch64_sve_vg.
12610 (MAX_BITSIZE_MODE_ANY_MODE): Define.
12611 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12612 aarch64_addr_query_type.
12613 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12614 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12615 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12616 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12617 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12618 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12619 (aarch64_simd_imm_zero_p): Delete.
12620 (aarch64_check_zero_based_sve_index_immediate): Declare.
12621 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12622 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12623 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12624 (aarch64_sve_float_mul_immediate_p): Likewise.
12625 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12626 rather than an rtx.
12627 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12628 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12629 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12630 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12631 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12632 (aarch64_regmode_natural_size): Likewise.
12633 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12634 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12635 left one place.
12636 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12637 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12638 for VG and the SVE predicate registers.
12639 (V_ALIASES): Add a "z"-prefixed alias.
12640 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12641 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12642 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12643 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12644 (REG_CLASS_NAMES): Add entries for them.
12645 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
12646 and the predicate registers.
12647 (aarch64_sve_vg): Declare.
12648 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12649 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12650 (REGMODE_NATURAL_SIZE): Define.
12651 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12652 SVE macros.
12653 * config/aarch64/aarch64.c: Include cfgrtl.h.
12654 (simd_immediate_info): Add a constructor for series vectors,
12655 and an associated step field.
12656 (aarch64_sve_vg): New variable.
12657 (aarch64_dbx_register_number): Handle VG and the predicate registers.
12658 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12659 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12660 (VEC_ANY_DATA, VEC_STRUCT): New constants.
12661 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12662 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12663 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12664 (aarch64_get_mask_mode): New functions.
12665 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12666 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12667 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
12668 predicate modes and predicate registers. Explicitly restrict
12669 GPRs to modes of 16 bytes or smaller. Only allow FP registers
12670 to store a vector mode if it is recognized by
12671 aarch64_classify_vector_mode.
12672 (aarch64_regmode_natural_size): New function.
12673 (aarch64_hard_regno_caller_save_mode): Return the original mode
12674 for predicates.
12675 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12676 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12677 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12678 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12679 functions.
12680 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12681 does not overlap dest if the function is frame-related. Handle
12682 SVE constants.
12683 (aarch64_split_add_offset): New function.
12684 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12685 them aarch64_add_offset.
12686 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12687 and update call to aarch64_sub_sp.
12688 (aarch64_add_cfa_expression): New function.
12689 (aarch64_expand_prologue): Pass extra temporary registers to the
12690 functions above. Handle the case in which we need to emit new
12691 DW_CFA_expressions for registers that were originally saved
12692 relative to the stack pointer, but now have to be expressed
12693 relative to the frame pointer.
12694 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12695 functions above.
12696 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12697 IP0 and IP1 values for SVE frames.
12698 (aarch64_expand_vec_series): New function.
12699 (aarch64_expand_sve_widened_duplicate): Likewise.
12700 (aarch64_expand_sve_const_vector): Likewise.
12701 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12702 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12703 into the register, rather than emitting a SET directly.
12704 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12705 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12706 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12707 (offset_9bit_signed_scaled_p): New functions.
12708 (aarch64_replicate_bitmask_imm): New function.
12709 (aarch64_bitmask_imm): Use it.
12710 (aarch64_cannot_force_const_mem): Reject expressions involving
12711 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12712 (aarch64_classify_index): Handle SVE indices, by requiring
12713 a plain register index with a scale that matches the element size.
12714 (aarch64_classify_address): Handle SVE addresses. Assert that
12715 the mode of the address is VOIDmode or an integer mode.
12716 Update call to aarch64_classify_symbol.
12717 (aarch64_classify_symbolic_expression): Update call to
12718 aarch64_classify_symbol.
12719 (aarch64_const_vec_all_in_range_p): New function.
12720 (aarch64_print_vector_float_operand): Likewise.
12721 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12722 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12723 and the FP immediates 1.0 and 0.5.
12724 (aarch64_print_address_internal): Handle SVE addresses.
12725 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12726 (aarch64_regno_regclass): Handle predicate registers.
12727 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12728 data modes.
12729 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12730 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12731 (aarch64_convert_sve_vector_bits): New function.
12732 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12733 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12734 rather than an rtx.
12735 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12736 Handle SVE vector and predicate modes. Accept VL-based constants
12737 that need only one temporary register, and VL offsets that require
12738 no temporary registers.
12739 (aarch64_conditional_register_usage): Mark the predicate registers
12740 as fixed if SVE isn't available.
12741 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12742 Return true for SVE vector and predicate modes.
12743 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12744 rather than an unsigned int. Handle SVE modes.
12745 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12746 SVE modes.
12747 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12748 if SVE is enabled.
12749 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12750 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12751 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12752 (aarch64_sve_float_mul_immediate_p): New functions.
12753 (aarch64_sve_valid_immediate): New function.
12754 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12755 Explicitly reject structure modes. Check for INDEX constants.
12756 Handle PTRUE and PFALSE constants.
12757 (aarch64_check_zero_based_sve_index_immediate): New function.
12758 (aarch64_simd_imm_zero_p): Delete.
12759 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12760 vector modes. Accept constants in the range of CNT[BHWD].
12761 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12762 ask for an Advanced SIMD mode.
12763 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12764 (aarch64_simd_vector_alignment): Handle SVE predicates.
12765 (aarch64_vectorize_preferred_vector_alignment): New function.
12766 (aarch64_simd_vector_alignment_reachable): Use it instead of
12767 the vector size.
12768 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12769 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12770 functions.
12771 (MAX_VECT_LEN): Delete.
12772 (expand_vec_perm_d): Add a vec_flags field.
12773 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12774 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12775 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12776 for SVE modes.
12777 (aarch64_evpc_rev): Rename to...
12778 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12779 (aarch64_evpc_rev_global): New function.
12780 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12781 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12782 MAX_VECT_LEN.
12783 (aarch64_evpc_sve_tbl): New function.
12784 (aarch64_expand_vec_perm_const_1): Update after rename of
12785 aarch64_evpc_rev. Handle SVE permutes too, trying
12786 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12787 than aarch64_evpc_tbl.
12788 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12789 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12790 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12791 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12792 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12793 (aarch64_expand_sve_vcond): New functions.
12794 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12795 of aarch64_vector_mode_p.
12796 (aarch64_dwarf_poly_indeterminate_value): New function.
12797 (aarch64_compute_pressure_classes): Likewise.
12798 (aarch64_can_change_mode_class): Likewise.
12799 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12800 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12801 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12802 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12803 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12804 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12805 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12806 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12807 constraints.
12808 (Dn, Dl, Dr): Accept const as well as const_vector.
12809 (Dz): Likewise. Compare against CONST0_RTX.
12810 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12811 of "vector" where appropriate.
12812 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12813 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12814 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12815 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12816 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12817 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12818 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12819 (v_int_equiv): Extend to SVE modes.
12820 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12821 mode attributes.
12822 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12823 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12824 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12825 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12826 (SVE_COND_FP_CMP): New int iterators.
12827 (perm_hilo): Handle the new unpack unspecs.
12828 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12829 attributes.
12830 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12831 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12832 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12833 (aarch64_equality_operator, aarch64_constant_vector_operand)
12834 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12835 (aarch64_sve_nonimmediate_operand): Likewise.
12836 (aarch64_sve_general_operand): Likewise.
12837 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12838 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12839 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12840 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12841 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12842 (aarch64_sve_float_arith_immediate): Likewise.
12843 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12844 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12845 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12846 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12847 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12848 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12849 (aarch64_sve_float_arith_operand): Likewise.
12850 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12851 (aarch64_sve_float_mul_operand): Likewise.
12852 (aarch64_sve_vec_perm_operand): Likewise.
12853 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12854 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12855 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12856 as well as const_vector.
12857 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12858 in file. Use CONST0_RTX and CONSTM1_RTX.
12859 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
12860 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12861 Use aarch64_simd_imm_zero.
12862 * config/aarch64/aarch64-sve.md: New file.
12863 * config/aarch64/aarch64.md: Include it.
12864 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12865 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12866 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12867 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12868 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12869 (sve): New attribute.
12870 (enabled): Disable instructions with the sve attribute unless
12871 TARGET_SVE.
12872 (movqi, movhi): Pass CONST_POLY_INT operaneds through
12873 aarch64_expand_mov_immediate.
12874 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12875 CNT[BHSD] immediates.
12876 (movti): Split CONST_POLY_INT moves into two halves.
12877 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12878 Split additions that need a temporary here if the destination
12879 is the stack pointer.
12880 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12881 (*add<mode>3_poly_1): New instruction.
12882 (set_clobber_cc): New expander.
12883
12884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12885
12886 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12887 parameter and use it instead of GET_MODE_SIZE (innermode). Use
12888 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12889 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12890 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
12891 Change innermode from fixed_mode_size to machine_mode.
12892 (simplify_subreg): Update call accordingly. Handle a constant-sized
12893 subreg of a variable-length CONST_VECTOR.
12894
12895 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12896 Alan Hayward <alan.hayward@arm.com>
12897 David Sherwood <david.sherwood@arm.com>
12898
12899 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12900 (add_offset_to_base): New function, split out from...
12901 (create_mem_ref): ...here. When handling a scale other than 1,
12902 check first whether the address is valid without the offset.
12903 Add it into the base if so, leaving the index and scale as-is.
12904
12905 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12906
12907 PR c++/83778
12908 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12909 fold_for_warn before checking if arg2 is INTEGER_CST.
12910
12911 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
12912
12913 * config/rs6000/predicates.md (load_multiple_operation): Delete.
12914 (store_multiple_operation): Delete.
12915 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12916 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12917 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12918 guarded by TARGET_STRING.
12919 (rs6000_output_load_multiple): Delete.
12920 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12921 OPTION_MASK_STRING / TARGET_STRING handling.
12922 (print_operand) <'N', 'O'>: Add comment that these are unused now.
12923 (const rs6000_opt_masks) <"string">: Change mask to 0.
12924 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12925 (MASK_STRING): Delete.
12926 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12927 parts. Simplify.
12928 (load_multiple): Delete.
12929 (*ldmsi8): Delete.
12930 (*ldmsi7): Delete.
12931 (*ldmsi6): Delete.
12932 (*ldmsi5): Delete.
12933 (*ldmsi4): Delete.
12934 (*ldmsi3): Delete.
12935 (store_multiple): Delete.
12936 (*stmsi8): Delete.
12937 (*stmsi7): Delete.
12938 (*stmsi6): Delete.
12939 (*stmsi5): Delete.
12940 (*stmsi4): Delete.
12941 (*stmsi3): Delete.
12942 (movmemsi_8reg): Delete.
12943 (corresponding unnamed define_insn): Delete.
12944 (movmemsi_6reg): Delete.
12945 (corresponding unnamed define_insn): Delete.
12946 (movmemsi_4reg): Delete.
12947 (corresponding unnamed define_insn): Delete.
12948 (movmemsi_2reg): Delete.
12949 (corresponding unnamed define_insn): Delete.
12950 (movmemsi_1reg): Delete.
12951 (corresponding unnamed define_insn): Delete.
12952 * config/rs6000/rs6000.opt (mno-string): New.
12953 (mstring): Replace by deprecation warning stub.
12954 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12955
12956 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12957
12958 * regrename.c (regrename_do_replace): If replacing the same
12959 reg multiple times, try to reuse last created gen_raw_REG.
12960
12961 PR debug/81155
12962 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12963 main to workaround a bug in GDB.
12964
12965 2018-01-12 Tom de Vries <tom@codesourcery.com>
12966
12967 PR target/83737
12968 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12969
12970 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
12971
12972 PR rtl-optimization/80481
12973 * ira-color.c (get_cap_member): New function.
12974 (allocnos_conflict_by_live_ranges_p): Use it.
12975 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12976 (setup_slot_coalesced_allocno_live_ranges): Ditto.
12977
12978 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
12979
12980 PR target/83628
12981 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12982 (*saddl_se_1): Ditto.
12983 (*ssubsi_1): Ditto.
12984 (*ssubl_se_1): Ditto.
12985
12986 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12987
12988 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12989 rather than wi::to_widest for DR_INITs.
12990 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12991 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12992 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
12993 INTEGER_CSTs.
12994 (vect_analyze_group_access_1): Note that here.
12995
12996 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12997
12998 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
12999 polynomial type sizes.
13000
13001 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
13002
13003 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
13004 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
13005 (gimple_add_tmp_var): Likewise.
13006
13007 2018-01-12 Martin Liska <mliska@suse.cz>
13008
13009 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
13010 (gimple_alloc_sizes): Likewise.
13011 (dump_gimple_statistics): Use PRIu64 in printf format.
13012 * gimple.h: Change uint64_t to int.
13013
13014 2018-01-12 Martin Liska <mliska@suse.cz>
13015
13016 * tree-core.h: Use uint64_t instead of int.
13017 * tree.c (tree_node_counts): Likewise.
13018 (tree_node_sizes): Likewise.
13019 (dump_tree_statistics): Use PRIu64 in printf format.
13020
13021 2018-01-12 Martin Liska <mliska@suse.cz>
13022
13023 * Makefile.in: As qsort_chk is implemented in vec.c, add
13024 vec.o to linkage of gencfn-macros.
13025 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
13026 passing the info to record_node_allocation_statistics.
13027 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
13028 and pass the info.
13029 * ggc-common.c (struct ggc_usage): Add operator== and use
13030 it in operator< and compare function.
13031 * mem-stats.h (struct mem_usage): Likewise.
13032 * vec.c (struct vec_usage): Remove operator< and compare
13033 function. Can be simply inherited.
13034
13035 2018-01-12 Martin Jambor <mjambor@suse.cz>
13036
13037 PR target/81616
13038 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
13039 * tree-ssa-math-opts.c: Include domwalk.h.
13040 (convert_mult_to_fma_1): New function.
13041 (fma_transformation_info): New type.
13042 (fma_deferring_state): Likewise.
13043 (cancel_fma_deferring): New function.
13044 (result_of_phi): Likewise.
13045 (last_fma_candidate_feeds_initial_phi): Likewise.
13046 (convert_mult_to_fma): Added deferring logic, split actual
13047 transformation to convert_mult_to_fma_1.
13048 (math_opts_dom_walker): New type.
13049 (math_opts_dom_walker::after_dom_children): New method, body moved
13050 here from pass_optimize_widening_mul::execute, added deferring logic
13051 bits.
13052 (pass_optimize_widening_mul::execute): Moved most of code to
13053 math_opts_dom_walker::after_dom_children.
13054 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
13055 * config/i386/i386.c (ix86_option_override_internal): Added
13056 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
13057
13058 2018-01-12 Richard Biener <rguenther@suse.de>
13059
13060 PR debug/83157
13061 * dwarf2out.c (gen_variable_die): Do not reset old_die for
13062 inline instance vars.
13063
13064 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
13065
13066 PR target/81819
13067 * config/rx/rx.c (rx_is_restricted_memory_address):
13068 Handle SUBREG case.
13069
13070 2018-01-12 Richard Biener <rguenther@suse.de>
13071
13072 PR tree-optimization/80846
13073 * target.def (split_reduction): New target hook.
13074 * targhooks.c (default_split_reduction): New function.
13075 * targhooks.h (default_split_reduction): Declare.
13076 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
13077 target requests first reduce vectors by combining low and high
13078 parts.
13079 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
13080 (get_vectype_for_scalar_type_and_size): Export.
13081 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
13082 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
13083 * doc/tm.texi: Regenerate.
13084 * config/i386/i386.c (ix86_split_reduction): Implement
13085 TARGET_VECTORIZE_SPLIT_REDUCTION.
13086
13087 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13088
13089 PR target/83368
13090 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
13091 in PIC mode except for TARGET_VXWORKS_RTP.
13092 * config/sparc/sparc.c: Include cfgrtl.h.
13093 (TARGET_INIT_PIC_REG): Define.
13094 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
13095 (sparc_pic_register_p): New predicate.
13096 (sparc_legitimate_address_p): Use it.
13097 (sparc_legitimize_pic_address): Likewise.
13098 (sparc_delegitimize_address): Likewise.
13099 (sparc_mode_dependent_address_p): Likewise.
13100 (gen_load_pcrel_sym): Remove 4th parameter.
13101 (load_got_register): Adjust call to above. Remove obsolete stuff.
13102 (sparc_expand_prologue): Do not call load_got_register here.
13103 (sparc_flat_expand_prologue): Likewise.
13104 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
13105 (sparc_use_pseudo_pic_reg): New function.
13106 (sparc_init_pic_reg): Likewise.
13107 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13108 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
13109
13110 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
13111
13112 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
13113 Add item for branch_cost.
13114
13115 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13116
13117 PR rtl-optimization/83565
13118 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
13119 not extend the result to a larger mode for rotate operations.
13120 (num_sign_bit_copies1): Likewise.
13121
13122 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13123
13124 PR target/40411
13125 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
13126 -symbolic.
13127 Use values-Xc.o for -pedantic.
13128 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
13129
13130 2018-01-12 Martin Liska <mliska@suse.cz>
13131
13132 PR ipa/83054
13133 * ipa-devirt.c (final_warning_record::grow_type_warnings):
13134 New function.
13135 (possible_polymorphic_call_targets): Use it.
13136 (ipa_devirt): Likewise.
13137
13138 2018-01-12 Martin Liska <mliska@suse.cz>
13139
13140 * profile-count.h (enum profile_quality): Use 0 as invalid
13141 enum value of profile_quality.
13142
13143 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
13144
13145 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
13146 -mext-string options.
13147
13148 2018-01-12 Richard Biener <rguenther@suse.de>
13149
13150 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
13151 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
13152 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
13153 Likewise.
13154 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
13155
13156 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
13157
13158 * configure.ac (--with-long-double-format): Add support for the
13159 configuration option to change the default long double format on
13160 PowerPC systems.
13161 * config.gcc (powerpc*-linux*-*): Likewise.
13162 * configure: Regenerate.
13163 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
13164 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
13165 used without modification.
13166
13167 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13168
13169 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
13170 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
13171 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
13172 MISC_BUILTIN_SPEC_BARRIER.
13173 (rs6000_init_builtins): Likewise.
13174 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
13175 enum value.
13176 (speculation_barrier): New define_insn.
13177 * doc/extend.texi: Document __builtin_speculation_barrier.
13178
13179 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13180
13181 PR target/83203
13182 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
13183 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
13184 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
13185 iterators.
13186 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
13187 integral modes instead of "ss" and "sd".
13188 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
13189 vectors with 32-bit and 64-bit elements.
13190 (vecdupssescalarmodesuffix): New mode attribute.
13191 (vec_dup<mode>): Use it.
13192
13193 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
13194
13195 PR target/83330
13196 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
13197 frame if argument is passed on stack.
13198
13199 2018-01-11 Jakub Jelinek <jakub@redhat.com>
13200
13201 PR target/82682
13202 * ree.c (combine_reaching_defs): Optimize also
13203 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
13204 reg2=any_extend(exp); reg1=reg2;, formatting fix.
13205
13206 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13207
13208 PR middle-end/83189
13209 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
13210
13211 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
13212
13213 PR middle-end/83718
13214 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
13215 after they are computed.
13216
13217 2018-01-11 Bin Cheng <bin.cheng@arm.com>
13218
13219 PR tree-optimization/83695
13220 * gimple-loop-linterchange.cc
13221 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
13222 reset cached scev information after interchange.
13223 (pass_linterchange::execute): Remove call to scev_reset_htab.
13224
13225 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13226
13227 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
13228 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
13229 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
13230 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
13231 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
13232 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
13233 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
13234 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
13235 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
13236 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
13237 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
13238 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
13239 (V_lane_reg): Likewise.
13240 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
13241 New define_expand.
13242 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
13243 (vfmal_lane_low<mode>_intrinsic,
13244 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
13245 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
13246 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13247 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13248 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13249 vfmsl_lane_high<mode>_intrinsic): New define_insns.
13250
13251 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13252
13253 * config/arm/arm-cpus.in (fp16fml): New feature.
13254 (ALL_SIMD): Add fp16fml.
13255 (armv8.2-a): Add fp16fml as an option.
13256 (armv8.3-a): Likewise.
13257 (armv8.4-a): Add fp16fml as part of fp16.
13258 * config/arm/arm.h (TARGET_FP16FML): Define.
13259 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13260 when appropriate.
13261 * config/arm/arm-modes.def (V2HF): Define.
13262 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13263 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13264 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13265 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13266 vfmsl_low, vfmsl_high): New set of builtins.
13267 * config/arm/iterators.md (PLUSMINUS): New code iterator.
13268 (vfml_op): New code attribute.
13269 (VFMLHALVES): New int iterator.
13270 (VFML, VFMLSEL): New mode attributes.
13271 (V_reg): Define mapping for V2HF.
13272 (V_hi, V_lo): New mode attributes.
13273 (VF_constraint): Likewise.
13274 (vfml_half, vfml_half_selector): New int attributes.
13275 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13276 define_expand.
13277 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13278 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13279 New define_insn.
13280 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13281 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13282 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13283 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
13284 documentation.
13285 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13286 Document new effective target and option set.
13287
13288 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13289
13290 * config/arm/arm-cpus.in (armv8_4): New feature.
13291 (ARMv8_4a): New fgroup.
13292 (armv8.4-a): New arch.
13293 * config/arm/arm-tables.opt: Regenerate.
13294 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13295 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13296 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13297 Add matching rules for -march=armv8.4-a and extensions.
13298 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13299
13300 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
13301
13302 PR target/81821
13303 * config/rx/rx.md (BW): New mode attribute.
13304 (sync_lock_test_and_setsi): Add mode suffix to insn output.
13305
13306 2018-01-11 Richard Biener <rguenther@suse.de>
13307
13308 PR tree-optimization/83435
13309 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13310 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13311 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13312
13313 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13314 Alan Hayward <alan.hayward@arm.com>
13315 David Sherwood <david.sherwood@arm.com>
13316
13317 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13318 field.
13319 (aarch64_classify_address): Initialize it. Track polynomial offsets.
13320 (aarch64_print_address_internal): Use it to check for a zero offset.
13321
13322 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13323 Alan Hayward <alan.hayward@arm.com>
13324 David Sherwood <david.sherwood@arm.com>
13325
13326 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13327 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13328 Return a poly_int64 rather than a HOST_WIDE_INT.
13329 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13330 rather than a HOST_WIDE_INT.
13331 * config/aarch64/aarch64.h (aarch64_frame): Protect with
13332 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
13333 hard_fp_offset, frame_size, initial_adjust, callee_offset and
13334 final_offset from HOST_WIDE_INT to poly_int64.
13335 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13336 to_constant when getting the number of units in an Advanced SIMD
13337 mode.
13338 (aarch64_builtin_vectorized_function): Check for a constant number
13339 of units.
13340 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13341 GET_MODE_SIZE.
13342 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13343 attribute instead of GET_MODE_NUNITS.
13344 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13345 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13346 GET_MODE_SIZE for fixed-size registers.
13347 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13348 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13349 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13350 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13351 (aarch64_print_operand, aarch64_print_address_internal)
13352 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13353 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13354 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13355 Handle polynomial GET_MODE_SIZE.
13356 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
13357 wider than SImode without modification.
13358 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13359 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13360 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13361 passing and returning SVE modes.
13362 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13363 rather than GEN_INT.
13364 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13365 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13366 (aarch64_allocate_and_probe_stack_space): Likewise.
13367 (aarch64_layout_frame): Cope with polynomial offsets.
13368 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13369 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
13370 polynomial offsets.
13371 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13372 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13373 poly_int64 rather than a HOST_WIDE_INT.
13374 (aarch64_get_separate_components, aarch64_process_components)
13375 (aarch64_expand_prologue, aarch64_expand_epilogue)
13376 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13377 (aarch64_anchor_offset): New function, split out from...
13378 (aarch64_legitimize_address): ...here.
13379 (aarch64_builtin_vectorization_cost): Handle polynomial
13380 TYPE_VECTOR_SUBPARTS.
13381 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13382 GET_MODE_NUNITS.
13383 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13384 number of elements from the PARALLEL rather than the mode.
13385 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13386 rather than GET_MODE_BITSIZE.
13387 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13388 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13389 (aarch64_expand_vec_perm_const_1): Handle polynomial
13390 d->perm.length () and d->perm elements.
13391 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
13392 Apply to_constant to d->perm elements.
13393 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13394 polynomial CONST_VECTOR_NUNITS.
13395 (aarch64_move_pointer): Take amount as a poly_int64 rather
13396 than an int.
13397 (aarch64_progress_pointer): Avoid temporary variable.
13398 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13399 the mode attribute instead of GET_MODE.
13400
13401 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13402 Alan Hayward <alan.hayward@arm.com>
13403 David Sherwood <david.sherwood@arm.com>
13404
13405 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13406 x exists before using it.
13407 (aarch64_add_constant_internal): Rename to...
13408 (aarch64_add_offset_1): ...this. Replace regnum with separate
13409 src and dest rtxes. Handle the case in which they're different,
13410 including when the offset is zero. Replace scratchreg with an rtx.
13411 Use 2 additions if there is no spare register into which we can
13412 move a 16-bit constant.
13413 (aarch64_add_constant): Delete.
13414 (aarch64_add_offset): Replace reg with separate src and dest
13415 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
13416 Use aarch64_add_offset_1.
13417 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13418 an rtx rather than an int. Take the delta as a poly_int64
13419 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
13420 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13421 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13422 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13423 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13424 and aarch64_add_sp.
13425 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13426 aarch64_add_constant.
13427
13428 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13429
13430 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13431 Use scalar_float_mode.
13432
13433 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13434
13435 * config/aarch64/aarch64-simd.md
13436 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13437 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13438 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13439 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13440 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13441 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13442 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13443 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13444 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13445 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13446
13447 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13448
13449 PR target/83514
13450 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13451 targ_options->x_arm_arch_string is non NULL.
13452
13453 2018-01-11 Tamar Christina <tamar.christina@arm.com>
13454
13455 * config/aarch64/aarch64.h
13456 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
13457
13458 2018-01-11 Sudakshina Das <sudi.das@arm.com>
13459
13460 PR target/82096
13461 * expmed.c (emit_store_flag_force): Swap if const op0
13462 and change VOIDmode to mode of op0.
13463
13464 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13465
13466 PR rtl-optimization/83761
13467 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13468 than bytes to mode_for_size.
13469
13470 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13471
13472 PR middle-end/83189
13473 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13474 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13475 profile.
13476
13477 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13478
13479 PR middle-end/83575
13480 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13481 when in layout mode.
13482 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13483 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13484 partition fixup.
13485
13486 2018-01-10 Michael Collison <michael.collison@arm.com>
13487
13488 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13489 * config/aarch64/aarch64-option-extension.def: Add
13490 AARCH64_OPT_EXTENSION of 'fp16fml'.
13491 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13492 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13493 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13494 * config/aarch64/constraints.md (Ui7): New constraint.
13495 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13496 (VFMLA_SEL_W): Ditto.
13497 (f16quad): Ditto.
13498 (f16mac1): Ditto.
13499 (VFMLA16_LOW): New int iterator.
13500 (VFMLA16_HIGH): Ditto.
13501 (UNSPEC_FMLAL): New unspec.
13502 (UNSPEC_FMLSL): Ditto.
13503 (UNSPEC_FMLAL2): Ditto.
13504 (UNSPEC_FMLSL2): Ditto.
13505 (f16mac): New code attribute.
13506 * config/aarch64/aarch64-simd-builtins.def
13507 (aarch64_fmlal_lowv2sf): Ditto.
13508 (aarch64_fmlsl_lowv2sf): Ditto.
13509 (aarch64_fmlalq_lowv4sf): Ditto.
13510 (aarch64_fmlslq_lowv4sf): Ditto.
13511 (aarch64_fmlal_highv2sf): Ditto.
13512 (aarch64_fmlsl_highv2sf): Ditto.
13513 (aarch64_fmlalq_highv4sf): Ditto.
13514 (aarch64_fmlslq_highv4sf): Ditto.
13515 (aarch64_fmlal_lane_lowv2sf): Ditto.
13516 (aarch64_fmlsl_lane_lowv2sf): Ditto.
13517 (aarch64_fmlal_laneq_lowv2sf): Ditto.
13518 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13519 (aarch64_fmlalq_lane_lowv4sf): Ditto.
13520 (aarch64_fmlsl_lane_lowv4sf): Ditto.
13521 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13522 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13523 (aarch64_fmlal_lane_highv2sf): Ditto.
13524 (aarch64_fmlsl_lane_highv2sf): Ditto.
13525 (aarch64_fmlal_laneq_highv2sf): Ditto.
13526 (aarch64_fmlsl_laneq_highv2sf): Ditto.
13527 (aarch64_fmlalq_lane_highv4sf): Ditto.
13528 (aarch64_fmlsl_lane_highv4sf): Ditto.
13529 (aarch64_fmlalq_laneq_highv4sf): Ditto.
13530 (aarch64_fmlsl_laneq_highv4sf): Ditto.
13531 * config/aarch64/aarch64-simd.md:
13532 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13533 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13534 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13535 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13536 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13537 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13538 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13539 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13540 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13541 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13542 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13543 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13544 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13545 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13546 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13547 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13548 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13549 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13550 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13551 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13552 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13553 (vfmlsl_low_u32): Ditto.
13554 (vfmlalq_low_u32): Ditto.
13555 (vfmlslq_low_u32): Ditto.
13556 (vfmlal_high_u32): Ditto.
13557 (vfmlsl_high_u32): Ditto.
13558 (vfmlalq_high_u32): Ditto.
13559 (vfmlslq_high_u32): Ditto.
13560 (vfmlal_lane_low_u32): Ditto.
13561 (vfmlsl_lane_low_u32): Ditto.
13562 (vfmlal_laneq_low_u32): Ditto.
13563 (vfmlsl_laneq_low_u32): Ditto.
13564 (vfmlalq_lane_low_u32): Ditto.
13565 (vfmlslq_lane_low_u32): Ditto.
13566 (vfmlalq_laneq_low_u32): Ditto.
13567 (vfmlslq_laneq_low_u32): Ditto.
13568 (vfmlal_lane_high_u32): Ditto.
13569 (vfmlsl_lane_high_u32): Ditto.
13570 (vfmlal_laneq_high_u32): Ditto.
13571 (vfmlsl_laneq_high_u32): Ditto.
13572 (vfmlalq_lane_high_u32): Ditto.
13573 (vfmlslq_lane_high_u32): Ditto.
13574 (vfmlalq_laneq_high_u32): Ditto.
13575 (vfmlslq_laneq_high_u32): Ditto.
13576 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13577 (AARCH64_FL_FOR_ARCH8_4): New.
13578 (AARCH64_ISA_F16FML): New ISA flag.
13579 (TARGET_F16FML): New feature flag for fp16fml.
13580 (doc/invoke.texi): Document new fp16fml option.
13581
13582 2018-01-10 Michael Collison <michael.collison@arm.com>
13583
13584 * config/aarch64/aarch64-builtins.c:
13585 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13586 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13587 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13588 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13589 (AARCH64_ISA_SHA3): New ISA flag.
13590 (TARGET_SHA3): New feature flag for sha3.
13591 * config/aarch64/iterators.md (sha512_op): New int attribute.
13592 (CRYPTO_SHA512): New int iterator.
13593 (UNSPEC_SHA512H): New unspec.
13594 (UNSPEC_SHA512H2): Ditto.
13595 (UNSPEC_SHA512SU0): Ditto.
13596 (UNSPEC_SHA512SU1): Ditto.
13597 * config/aarch64/aarch64-simd-builtins.def
13598 (aarch64_crypto_sha512hqv2di): New builtin.
13599 (aarch64_crypto_sha512h2qv2di): Ditto.
13600 (aarch64_crypto_sha512su0qv2di): Ditto.
13601 (aarch64_crypto_sha512su1qv2di): Ditto.
13602 (aarch64_eor3qv8hi): Ditto.
13603 (aarch64_rax1qv2di): Ditto.
13604 (aarch64_xarqv2di): Ditto.
13605 (aarch64_bcaxqv8hi): Ditto.
13606 * config/aarch64/aarch64-simd.md:
13607 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13608 (aarch64_crypto_sha512su0qv2di): Ditto.
13609 (aarch64_crypto_sha512su1qv2di): Ditto.
13610 (aarch64_eor3qv8hi): Ditto.
13611 (aarch64_rax1qv2di): Ditto.
13612 (aarch64_xarqv2di): Ditto.
13613 (aarch64_bcaxqv8hi): Ditto.
13614 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13615 (vsha512h2q_u64): Ditto.
13616 (vsha512su0q_u64): Ditto.
13617 (vsha512su1q_u64): Ditto.
13618 (veor3q_u16): Ditto.
13619 (vrax1q_u64): Ditto.
13620 (vxarq_u64): Ditto.
13621 (vbcaxq_u16): Ditto.
13622 * config/arm/types.md (crypto_sha512): New type attribute.
13623 (crypto_sha3): Ditto.
13624 (doc/invoke.texi): Document new sha3 option.
13625
13626 2018-01-10 Michael Collison <michael.collison@arm.com>
13627
13628 * config/aarch64/aarch64-builtins.c:
13629 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13630 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13631 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13632 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13633 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13634 (AARCH64_ISA_SM4): New ISA flag.
13635 (TARGET_SM4): New feature flag for sm4.
13636 * config/aarch64/aarch64-simd-builtins.def
13637 (aarch64_sm3ss1qv4si): Ditto.
13638 (aarch64_sm3tt1aq4si): Ditto.
13639 (aarch64_sm3tt1bq4si): Ditto.
13640 (aarch64_sm3tt2aq4si): Ditto.
13641 (aarch64_sm3tt2bq4si): Ditto.
13642 (aarch64_sm3partw1qv4si): Ditto.
13643 (aarch64_sm3partw2qv4si): Ditto.
13644 (aarch64_sm4eqv4si): Ditto.
13645 (aarch64_sm4ekeyqv4si): Ditto.
13646 * config/aarch64/aarch64-simd.md:
13647 (aarch64_sm3ss1qv4si): Ditto.
13648 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13649 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13650 (aarch64_sm4eqv4si): Ditto.
13651 (aarch64_sm4ekeyqv4si): Ditto.
13652 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13653 (sm3part_op): Ditto.
13654 (CRYPTO_SM3TT): Ditto.
13655 (CRYPTO_SM3PART): Ditto.
13656 (UNSPEC_SM3SS1): New unspec.
13657 (UNSPEC_SM3TT1A): Ditto.
13658 (UNSPEC_SM3TT1B): Ditto.
13659 (UNSPEC_SM3TT2A): Ditto.
13660 (UNSPEC_SM3TT2B): Ditto.
13661 (UNSPEC_SM3PARTW1): Ditto.
13662 (UNSPEC_SM3PARTW2): Ditto.
13663 (UNSPEC_SM4E): Ditto.
13664 (UNSPEC_SM4EKEY): Ditto.
13665 * config/aarch64/constraints.md (Ui2): New constraint.
13666 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13667 * config/arm/types.md (crypto_sm3): New type attribute.
13668 (crypto_sm4): Ditto.
13669 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13670 (vsm3tt1aq_u32): Ditto.
13671 (vsm3tt1bq_u32): Ditto.
13672 (vsm3tt2aq_u32): Ditto.
13673 (vsm3tt2bq_u32): Ditto.
13674 (vsm3partw1q_u32): Ditto.
13675 (vsm3partw2q_u32): Ditto.
13676 (vsm4eq_u32): Ditto.
13677 (vsm4ekeyq_u32): Ditto.
13678 (doc/invoke.texi): Document new sm4 option.
13679
13680 2018-01-10 Michael Collison <michael.collison@arm.com>
13681
13682 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13683 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13684 (AARCH64_FL_FOR_ARCH8_4): New.
13685 (AARCH64_FL_V8_4): New flag.
13686 (doc/invoke.texi): Document new armv8.4-a option.
13687
13688 2018-01-10 Michael Collison <michael.collison@arm.com>
13689
13690 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13691 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13692 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13693 * config/aarch64/aarch64-option-extension.def: Add
13694 AARCH64_OPT_EXTENSION of 'sha2'.
13695 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13696 (crypto): Disable sha2 and aes if crypto disabled.
13697 (crypto): Enable aes and sha2 if enabled.
13698 (simd): Disable sha2 and aes if simd disabled.
13699 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13700 New flags.
13701 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13702 (TARGET_SHA2): New feature flag for sha2.
13703 (TARGET_AES): New feature flag for aes.
13704 * config/aarch64/aarch64-simd.md:
13705 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13706 conditional on TARGET_AES.
13707 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13708 (aarch64_crypto_sha1hsi): Make pattern conditional
13709 on TARGET_SHA2.
13710 (aarch64_crypto_sha1hv4si): Ditto.
13711 (aarch64_be_crypto_sha1hv4si): Ditto.
13712 (aarch64_crypto_sha1su1v4si): Ditto.
13713 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13714 (aarch64_crypto_sha1su0v4si): Ditto.
13715 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13716 (aarch64_crypto_sha256su0v4si): Ditto.
13717 (aarch64_crypto_sha256su1v4si): Ditto.
13718 (doc/invoke.texi): Document new aes and sha2 options.
13719
13720 2018-01-10 Martin Sebor <msebor@redhat.com>
13721
13722 PR tree-optimization/83781
13723 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13724 as string arrays.
13725
13726 2018-01-11 Martin Sebor <msebor@gmail.com>
13727 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13728
13729 PR tree-optimization/83501
13730 PR tree-optimization/81703
13731
13732 * tree-ssa-strlen.c (get_string_cst): Rename...
13733 (get_string_len): ...to this. Handle global constants.
13734 (handle_char_store): Adjust.
13735
13736 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13737 Jim Wilson <jimw@sifive.com>
13738
13739 * config/riscv/riscv-protos.h (riscv_output_return): New.
13740 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13741 (riscv_attribute_table, riscv_output_return),
13742 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13743 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13744 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13745 function.
13746 (riscv_expand_prologue): Add early return for naked function.
13747 (riscv_expand_epilogue): Likewise.
13748 (riscv_function_ok_for_sibcall): Return false for naked function.
13749 (riscv_set_current_function): New.
13750 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13751 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13752 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13753 * doc/extend.texi (RISC-V Function Attributes): New.
13754
13755 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13756
13757 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13758 check for 128-bit long double before checking TCmode.
13759 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13760 128-bit long doubles before checking TFmode or TCmode.
13761 (FLOAT128_IBM_P): Likewise.
13762
13763 2018-01-10 Martin Sebor <msebor@redhat.com>
13764
13765 PR tree-optimization/83671
13766 * builtins.c (c_strlen): Unconditionally return zero for the empty
13767 string.
13768 Use -Warray-bounds for warnings.
13769 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13770 for non-constant array indices with COMPONENT_REF, arrays of
13771 arrays, and pointers to arrays.
13772 (gimple_fold_builtin_strlen): Determine and set length range for
13773 non-constant character arrays.
13774
13775 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13776
13777 PR middle-end/81897
13778 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13779 empty blocks.
13780
13781 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13782
13783 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13784
13785 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13786
13787 PR target/83399
13788 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13789 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13790 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13791 indexed_or_indirect_operand predicate.
13792 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13793 (*vsx_le_perm_load_v8hi): Likewise.
13794 (*vsx_le_perm_load_v16qi): Likewise.
13795 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13796 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13797 (*vsx_le_perm_store_v8hi): Likewise.
13798 (*vsx_le_perm_store_v16qi): Likewise.
13799 (eight unnamed splitters): Likewise.
13800
13801 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13802
13803 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13804 * config/rs6000/emmintrin.h: Likewise.
13805 * config/rs6000/mmintrin.h: Likewise.
13806 * config/rs6000/xmmintrin.h: Likewise.
13807
13808 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13809
13810 PR c++/43486
13811 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13812 "public_flag".
13813 * tree.c (tree_nop_conversion): Return true for location wrapper
13814 nodes.
13815 (maybe_wrap_with_location): New function.
13816 (selftest::check_strip_nops): New function.
13817 (selftest::test_location_wrappers): New function.
13818 (selftest::tree_c_tests): Call it.
13819 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13820 (maybe_wrap_with_location): New decl.
13821 (EXPR_LOCATION_WRAPPER_P): New macro.
13822 (location_wrapper_p): New inline function.
13823 (tree_strip_any_location_wrapper): New inline function.
13824
13825 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13826
13827 PR target/83735
13828 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13829 stack_realign_offset for the largest alignment of stack slot
13830 actually used.
13831 (ix86_find_max_used_stack_alignment): New function.
13832 (ix86_finalize_stack_frame_flags): Use it. Set
13833 max_used_stack_alignment if we don't realign stack.
13834 * config/i386/i386.h (machine_function): Add
13835 max_used_stack_alignment.
13836
13837 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13838
13839 * config/arm/arm.opt (-mbranch-cost): New option.
13840 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13841 account.
13842
13843 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13844
13845 PR target/83629
13846 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13847 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13848
13849 2018-01-10 Richard Biener <rguenther@suse.de>
13850
13851 PR debug/83765
13852 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13853 early out so it also covers the case where we have a non-NULL
13854 origin.
13855
13856 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13857
13858 PR tree-optimization/83753
13859 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13860 for non-strided grouped accesses if the number of elements is 1.
13861
13862 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13863
13864 PR target/81616
13865 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13866 * i386.h (TARGET_USE_GATHER): Define.
13867 * x86-tune.def (X86_TUNE_USE_GATHER): New.
13868
13869 2018-01-10 Martin Liska <mliska@suse.cz>
13870
13871 PR bootstrap/82831
13872 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13873 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13874 partitioning.
13875 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13876 CLEANUP_NO_PARTITIONING is not set.
13877
13878 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13879
13880 * doc/rtl.texi: Remove documentation of (const ...) wrappers
13881 for vectors, as a partial revert of r254296.
13882 * rtl.h (const_vec_p): Delete.
13883 (const_vec_duplicate_p): Don't test for vector CONSTs.
13884 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13885 * expmed.c (make_tree): Likewise.
13886
13887 Revert:
13888 * common.md (E, F): Use CONSTANT_P instead of checking for
13889 CONST_VECTOR.
13890 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13891 checking for CONST_VECTOR.
13892
13893 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13894
13895 PR middle-end/83575
13896 * predict.c (force_edge_cold): Handle in more sane way edges
13897 with no prediction.
13898
13899 2018-01-09 Carl Love <cel@us.ibm.com>
13900
13901 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13902 V4SI, V4SF types.
13903 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13904 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13905 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13906 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
13907 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13908 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
13909 * config/rs6000/rs6000-protos.h: Add extern defition for
13910 rs6000_generate_float2_double_code.
13911 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13912 function.
13913 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13914 (float2_v2df): Add define_expand.
13915
13916 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
13917
13918 PR target/83628
13919 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13920 op_mode in the force_to_mode call.
13921
13922 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13923
13924 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13925 instead of checking each element individually.
13926 (aarch64_evpc_uzp): Likewise.
13927 (aarch64_evpc_zip): Likewise.
13928 (aarch64_evpc_ext): Likewise.
13929 (aarch64_evpc_rev): Likewise.
13930 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13931 instead of checking each element individually. Return true without
13932 generating rtl if
13933 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13934 whether all selected elements come from the same input, instead of
13935 checking each element individually. Remove calls to gen_rtx_REG,
13936 start_sequence and end_sequence and instead assert that no rtl is
13937 generated.
13938
13939 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13940
13941 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13942 order of HIGH and CONST checks.
13943
13944 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13945
13946 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13947 if the destination isn't an SSA_NAME.
13948
13949 2018-01-09 Richard Biener <rguenther@suse.de>
13950
13951 PR tree-optimization/83668
13952 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13953 move prologue...
13954 (canonicalize_loop_form): ... here, renamed from ...
13955 (canonicalize_loop_closed_ssa_form): ... this and amended to
13956 swap successor edges for loop exit blocks to make us use
13957 the RPO order we need for initial schedule generation.
13958
13959 2018-01-09 Joseph Myers <joseph@codesourcery.com>
13960
13961 PR tree-optimization/64811
13962 * match.pd: When optimizing comparisons with Inf, avoid
13963 introducing or losing exceptions from comparisons with NaN.
13964
13965 2018-01-09 Martin Liska <mliska@suse.cz>
13966
13967 PR sanitizer/82517
13968 * asan.c (shadow_mem_size): Add gcc_assert.
13969
13970 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
13971
13972 Don't save registers in main().
13973
13974 PR target/83738
13975 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13976 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13977 * config/avr/avr.c (avr_set_current_function): Don't error if
13978 naked, OS_task or OS_main are specified at the same time.
13979 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13980 OS_main.
13981 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13982 attribute.
13983 * common/config/avr/avr-common.c (avr_option_optimization_table):
13984 Switch on -mmain-is-OS_task for optimizing compilations.
13985
13986 2018-01-09 Richard Biener <rguenther@suse.de>
13987
13988 PR tree-optimization/83572
13989 * graphite.c: Include cfganal.h.
13990 (graphite_transform_loops): Connect infinite loops to exit
13991 and remove fake edges at the end.
13992
13993 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13994
13995 * ipa-inline.c (edge_badness): Revert accidental checkin.
13996
13997 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13998
13999 PR ipa/80763
14000 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
14001 symbols; not inline clones.
14002
14003 2018-01-09 Jakub Jelinek <jakub@redhat.com>
14004
14005 PR target/83507
14006 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
14007 hard registers. Formatting fixes.
14008
14009 PR preprocessor/83722
14010 * gcc.c (try_generate_repro): Pass
14011 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
14012 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
14013 do_report_bug.
14014
14015 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
14016 Kito Cheng <kito.cheng@gmail.com>
14017
14018 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
14019 (riscv_leaf_function_p): Delete.
14020 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
14021
14022 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14023
14024 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
14025 function.
14026 (do_ifelse): New function.
14027 (do_isel): New function.
14028 (do_sub3): New function.
14029 (do_add3): New function.
14030 (do_load_mask_compare): New function.
14031 (do_overlap_load_compare): New function.
14032 (expand_compare_loop): New function.
14033 (expand_block_compare): Call expand_compare_loop() when appropriate.
14034 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
14035 option description.
14036 (-mblock-compare-inline-loop-limit): New option.
14037
14038 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14039
14040 PR target/83677
14041 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
14042 Reverse order of second and third operands in first alternative.
14043 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
14044 of first and second elements in UNSPEC_VPERMR vector.
14045 (altivec_expand_vec_perm_le): Likewise.
14046
14047 2018-01-08 Jeff Law <law@redhat.com>
14048
14049 PR rtl-optimizatin/81308
14050 * tree-switch-conversion.c (cfg_altered): New file scoped static.
14051 (process_switch): If group_case_labels makes a change, then set
14052 cfg_altered.
14053 (pass_convert_switch::execute): If a switch is converted, then
14054 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
14055
14056 PR rtl-optimization/81308
14057 * recog.c (split_all_insns): Conditionally cleanup the CFG after
14058 splitting insns.
14059
14060 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
14061
14062 PR target/83663 - Revert r255946
14063 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
14064 generation for cases where splatting a value is not useful.
14065 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
14066 across a vec_duplicate and a paradoxical subreg forming a vector
14067 mode to a vec_concat.
14068
14069 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14070
14071 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
14072 -march=armv8.3-a variants.
14073 * config/arm/t-multilib: Likewise.
14074 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
14075
14076 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14077
14078 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
14079 to generate rtl.
14080 (cceq_ior_compare_complement): Give it a name so I can use it, and
14081 change boolean_or_operator predicate to boolean_operator so it can
14082 be used to generate a crand.
14083 (eqne): New code iterator.
14084 (bd/bd_neg): New code_attrs.
14085 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
14086 a single define_insn.
14087 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
14088 decrement (bdnzt/bdnzf/bdzt/bdzf).
14089 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
14090 with the new names of the branch decrement patterns, and added the
14091 names of the branch decrement conditional patterns.
14092
14093 2018-01-08 Richard Biener <rguenther@suse.de>
14094
14095 PR tree-optimization/83563
14096 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
14097 cache.
14098
14099 2018-01-08 Richard Biener <rguenther@suse.de>
14100
14101 PR middle-end/83713
14102 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
14103
14104 2018-01-08 Richard Biener <rguenther@suse.de>
14105
14106 PR tree-optimization/83685
14107 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
14108 references to abnormals.
14109
14110 2018-01-08 Richard Biener <rguenther@suse.de>
14111
14112 PR lto/83719
14113 * dwarf2out.c (output_indirect_strings): Handle empty
14114 skeleton_debug_str_hash.
14115 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
14116
14117 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14118
14119 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
14120 (emit_store_direct): Likewise.
14121 (arc_trampoline_adjust_address): Likewise.
14122 (arc_asm_trampoline_template): New function.
14123 (arc_initialize_trampoline): Use asm_trampoline_template.
14124 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
14125 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
14126 * config/arc/arc.md (flush_icache): Delete pattern.
14127
14128 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
14129
14130 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
14131 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
14132 munaligned-access.
14133
14134 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14135
14136 PR target/83681
14137 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
14138 by not USED_FOR_TARGET.
14139 (make_pass_resolve_sw_modes): Likewise.
14140
14141 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
14142
14143 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
14144 USED_FOR_TARGET.
14145
14146 2018-01-08 Richard Biener <rguenther@suse.de>
14147
14148 PR middle-end/83580
14149 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
14150
14151 2018-01-08 Richard Biener <rguenther@suse.de>
14152
14153 PR middle-end/83517
14154 * match.pd ((t * 2) / 2) -> t): Add missing :c.
14155
14156 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
14157
14158 PR middle-end/81897
14159 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
14160 basic blocks with a small number of successors.
14161 (convert_control_dep_chain_into_preds): Improve handling of
14162 forwarder blocks.
14163 (dump_predicates): Split apart into...
14164 (dump_pred_chain): ...here...
14165 (dump_pred_info): ...and here.
14166 (can_one_predicate_be_invalidated_p): Add debugging printfs.
14167 (can_chain_union_be_invalidated_p): Improve check for invalidation
14168 of paths.
14169 (uninit_uses_cannot_happen): Avoid unnecessary if
14170 convert_control_dep_chain_into_preds yielded nothing.
14171
14172 2018-01-06 Martin Sebor <msebor@redhat.com>
14173
14174 PR tree-optimization/83640
14175 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
14176 subtracting negative offset from size.
14177 (builtin_access::overlap): Adjust offset bounds of the access to fall
14178 within the size of the object if possible.
14179
14180 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
14181
14182 PR rtl-optimization/83699
14183 * expmed.c (extract_bit_field_1): Restrict the vector usage of
14184 extract_bit_field_as_subreg to cases in which the extracted
14185 value is also a vector.
14186
14187 * lra-constraints.c (process_alt_operands): Test for the equivalence
14188 substitutions when detecting a possible reload cycle.
14189
14190 2018-01-06 Jakub Jelinek <jakub@redhat.com>
14191
14192 PR debug/83480
14193 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
14194 by default if flag_selective_schedling{,2}. Formatting fixes.
14195
14196 PR rtl-optimization/83682
14197 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
14198 if it has non-VECTOR_MODE element mode.
14199 (vec_duplicate_p): Likewise.
14200
14201 PR middle-end/83694
14202 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
14203 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
14204
14205 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14206
14207 PR target/83604
14208 * config/i386/i386-builtin.def
14209 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
14210 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
14211 Require also OPTION_MASK_ISA_AVX512F in addition to
14212 OPTION_MASK_ISA_GFNI.
14213 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
14214 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
14215 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
14216 to OPTION_MASK_ISA_GFNI.
14217 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
14218 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
14219 OPTION_MASK_ISA_AVX512BW.
14220 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
14221 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
14222 addition to OPTION_MASK_ISA_GFNI.
14223 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
14224 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
14225 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
14226 to OPTION_MASK_ISA_GFNI.
14227 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
14228 a requirement for all ISAs rather than any of them with a few
14229 exceptions.
14230 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
14231 processing.
14232 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
14233 bitmasks to be enabled with 3 exceptions, instead of requiring any
14234 enabled ISA with lots of exceptions.
14235 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
14236 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
14237 Change avx512bw in isa attribute to avx512f.
14238 * config/i386/sgxintrin.h: Add license boilerplate.
14239 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
14240 to __AVX512F__ and __AVX512VL to __AVX512VL__.
14241 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
14242 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
14243 defined.
14244 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
14245 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
14246 temporarily sse2 rather than sse if not enabled already.
14247
14248 PR target/83604
14249 * config/i386/sse.md (VI248_VLBW): Rename to ...
14250 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
14251 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14252 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14253 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14254 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14255 mode iterator instead of VI248_VLBW.
14256
14257 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
14258
14259 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14260 (record_modified): Skip clobbers; add debug output.
14261 (param_change_prob): Use sreal frequencies.
14262
14263 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14264
14265 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14266 punt for user-aligned variables.
14267
14268 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14269
14270 * tree-chrec.c (chrec_contains_symbols): Return true for
14271 POLY_INT_CST.
14272
14273 2018-01-05 Sudakshina Das <sudi.das@arm.com>
14274
14275 PR target/82439
14276 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14277 of (x|y) == x for BICS pattern.
14278
14279 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14280
14281 PR tree-optimization/83605
14282 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14283 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14284 can throw.
14285
14286 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
14287
14288 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14289 * config/epiphany/rtems.h: New file.
14290
14291 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14292 Uros Bizjak <ubizjak@gmail.com>
14293
14294 PR target/83554
14295 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14296 QIreg_operand instead of register_operand predicate.
14297 * config/i386/i386.c (ix86_rop_should_change_byte_p,
14298 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14299 comments instead of -fmitigate[-_]rop.
14300
14301 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14302
14303 PR bootstrap/81926
14304 * cgraphunit.c (symbol_table::compile): Switch to text_section
14305 before calling assembly_start debug hook.
14306 * run-rtl-passes.c (run_rtl_passes): Likewise.
14307 Include output.h.
14308
14309 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14310
14311 * tree-vrp.c (extract_range_from_binary_expr_1): Check
14312 range_int_cst_p rather than !symbolic_range_p before calling
14313 extract_range_from_multiplicative_op_1.
14314
14315 2018-01-04 Jeff Law <law@redhat.com>
14316
14317 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14318 redundant test in assertion.
14319
14320 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14321
14322 * doc/rtl.texi: Document machine_mode wrapper classes.
14323
14324 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14325
14326 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14327 using tree_to_uhwi.
14328
14329 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14330
14331 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14332 the VEC_PERM_EXPR fold to fail.
14333
14334 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14335
14336 PR debug/83585
14337 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14338 to switched_sections.
14339
14340 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14341
14342 PR target/83680
14343 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14344 test for d.testing.
14345
14346 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
14347
14348 PR target/83387
14349 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14350 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14351
14352 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14353
14354 PR debug/83666
14355 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14356 is BLKmode and bitpos not zero or mode change is needed.
14357
14358 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14359
14360 PR target/83675
14361 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14362 TARGET_VIS2.
14363
14364 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
14365
14366 PR target/83628
14367 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14368 instead of MULT rtx. Update all corresponding splitters.
14369 (*saddl_se): Ditto.
14370 (*ssub<modesuffix>): Ditto.
14371 (*ssubl_se): Ditto.
14372 (*cmp_sadd_di): Update split patterns.
14373 (*cmp_sadd_si): Ditto.
14374 (*cmp_sadd_sidi): Ditto.
14375 (*cmp_ssub_di): Ditto.
14376 (*cmp_ssub_si): Ditto.
14377 (*cmp_ssub_sidi): Ditto.
14378 * config/alpha/predicates.md (const23_operand): New predicate.
14379 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14380 Look for ASHIFT, not MULT inner operand.
14381 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14382
14383 2018-01-04 Martin Liska <mliska@suse.cz>
14384
14385 PR gcov-profile/83669
14386 * gcov.c (output_intermediate_file): Add version to intermediate
14387 gcov file.
14388 * doc/gcov.texi: Document new field 'version' in intermediate
14389 file format. Fix location of '-k' option of gcov command.
14390
14391 2018-01-04 Martin Liska <mliska@suse.cz>
14392
14393 PR ipa/82352
14394 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14395
14396 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14397
14398 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14399
14400 2018-01-03 Martin Sebor <msebor@redhat.com>
14401
14402 PR tree-optimization/83655
14403 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14404 checking calls with invalid arguments.
14405
14406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14407
14408 * tree-vect-stmts.c (vect_get_store_rhs): New function.
14409 (vectorizable_mask_load_store): Delete.
14410 (vectorizable_call): Return false for masked loads and stores.
14411 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
14412 instead of gimple_assign_rhs1.
14413 (vectorizable_load): Handle IFN_MASK_LOAD.
14414 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14415
14416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14417
14418 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14419 split out from..,
14420 (vectorizable_mask_load_store): ...here.
14421 (vectorizable_load): ...and here.
14422
14423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14424
14425 * tree-vect-stmts.c (vect_build_all_ones_mask)
14426 (vect_build_zero_merge_argument): New functions, split out from...
14427 (vectorizable_load): ...here.
14428
14429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14430
14431 * tree-vect-stmts.c (vect_check_store_rhs): New function,
14432 split out from...
14433 (vectorizable_mask_load_store): ...here.
14434 (vectorizable_store): ...and here.
14435
14436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14437
14438 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14439 split out from...
14440 (vectorizable_mask_load_store): ...here.
14441
14442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14443
14444 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14445 (vect_model_store_cost): Take a vec_load_store_type instead of a
14446 vect_def_type.
14447 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14448 (vect_model_store_cost): Take a vec_load_store_type instead of a
14449 vect_def_type.
14450 (vectorizable_mask_load_store): Update accordingly.
14451 (vectorizable_store): Likewise.
14452 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14453
14454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14455
14456 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14457 IFN_MASK_LOAD calls here rather than...
14458 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14459
14460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14461 Alan Hayward <alan.hayward@arm.com>
14462 David Sherwood <david.sherwood@arm.com>
14463
14464 * expmed.c (extract_bit_field_1): For vector extracts,
14465 fall back to extract_bit_field_as_subreg if vec_extract
14466 isn't available.
14467
14468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14469 Alan Hayward <alan.hayward@arm.com>
14470 David Sherwood <david.sherwood@arm.com>
14471
14472 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14473 they are variable or constant sized.
14474 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14475 slots for constant-sized data.
14476
14477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14478 Alan Hayward <alan.hayward@arm.com>
14479 David Sherwood <david.sherwood@arm.com>
14480
14481 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14482 handling COND_EXPRs with boolean comparisons, try to find a better
14483 basis for the mask type than the boolean itself.
14484
14485 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14486
14487 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14488 is calculated and how it can be overridden.
14489 * genmodes.c (max_bitsize_mode_any_mode): New variable.
14490 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14491 if defined.
14492 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14493 if nonzero.
14494
14495 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14496 Alan Hayward <alan.hayward@arm.com>
14497 David Sherwood <david.sherwood@arm.com>
14498
14499 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14500 Remove the mode argument.
14501 (aarch64_simd_valid_immediate): Remove the mode and inverse
14502 arguments.
14503 * config/aarch64/iterators.md (bitsize): New iterator.
14504 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14505 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14506 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14507 aarch64_simd_valid_immediate.
14508 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14509 (aarch64_reg_or_bic_imm): Likewise.
14510 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14511 with an insn_type enum and msl with a modifier_type enum.
14512 Replace element_width with a scalar_mode. Change the shift
14513 to unsigned int. Add constructors for scalar_float_mode and
14514 scalar_int_mode elements.
14515 (aarch64_vect_float_const_representable_p): Delete.
14516 (aarch64_can_const_movi_rtx_p)
14517 (aarch64_simd_scalar_immediate_valid_for_move)
14518 (aarch64_simd_make_constant): Update call to
14519 aarch64_simd_valid_immediate.
14520 (aarch64_advsimd_valid_immediate_hs): New function.
14521 (aarch64_advsimd_valid_immediate): Likewise.
14522 (aarch64_simd_valid_immediate): Remove mode and inverse
14523 arguments. Rewrite to use the above. Use const_vec_duplicate_p
14524 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14525 and aarch64_float_const_representable_p on the result.
14526 (aarch64_output_simd_mov_immediate): Remove mode argument.
14527 Update call to aarch64_simd_valid_immediate and use of
14528 simd_immediate_info.
14529 (aarch64_output_scalar_simd_mov_immediate): Update call
14530 accordingly.
14531
14532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14533 Alan Hayward <alan.hayward@arm.com>
14534 David Sherwood <david.sherwood@arm.com>
14535
14536 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14537 (mode_nunits): Likewise CONST_MODE_NUNITS.
14538 * machmode.def (ADJUST_NUNITS): Document.
14539 * genmodes.c (mode_data::need_nunits_adj): New field.
14540 (blank_mode): Update accordingly.
14541 (adj_nunits): New variable.
14542 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14543 parameter.
14544 (emit_mode_size_inline): Set need_bytesize_adj for all modes
14545 listed in adj_nunits.
14546 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14547 listed in adj_nunits. Don't emit case statements for such modes.
14548 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14549 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
14550 nothing if adj_nunits is nonnull.
14551 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14552 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14553 (emit_mode_fbit): Update use of print_maybe_const_decl.
14554 (emit_move_size): Likewise. Treat the array as non-const
14555 if adj_nunits.
14556 (emit_mode_adjustments): Handle adj_nunits.
14557
14558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14559
14560 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14561 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14562 (VECTOR_MODES): Use it.
14563 (make_vector_modes): Take the prefix as an argument.
14564
14565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14566 Alan Hayward <alan.hayward@arm.com>
14567 David Sherwood <david.sherwood@arm.com>
14568
14569 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14570 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14571 for MODE_VECTOR_BOOL.
14572 * machmode.def (VECTOR_BOOL_MODE): Document.
14573 * genmodes.c (VECTOR_BOOL_MODE): New macro.
14574 (make_vector_bool_mode): New function.
14575 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14576 MODE_VECTOR_BOOL.
14577 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14578 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14579 Likewise.
14580 * stor-layout.c (int_mode_for_mode): Likewise.
14581 * tree.c (build_vector_type_for_mode): Likewise.
14582 * varasm.c (output_constant_pool_2): Likewise.
14583 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14584 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
14585 for MODE_VECTOR_BOOL.
14586 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14587 of mode class checks.
14588 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14589 instead of a list of mode class checks.
14590 (expand_vector_scalar_condition): Likewise.
14591 (type_for_widest_vector_mode): Handle BImode as an inner mode.
14592
14593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14594 Alan Hayward <alan.hayward@arm.com>
14595 David Sherwood <david.sherwood@arm.com>
14596
14597 * machmode.h (mode_size): Change from unsigned short to
14598 poly_uint16_pod.
14599 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14600 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14601 or if measurement_type is not polynomial.
14602 (fixed_size_mode::includes_p): Check for constant-sized modes.
14603 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14604 return a poly_uint16 rather than an unsigned short.
14605 (emit_mode_size): Change the type of mode_size from unsigned short
14606 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
14607 (emit_mode_adjustments): Cope with polynomial vector sizes.
14608 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14609 for GET_MODE_SIZE.
14610 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14611 for GET_MODE_SIZE.
14612 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14613 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14614 * caller-save.c (setup_save_areas): Likewise.
14615 (replace_reg_with_saved_mem): Likewise.
14616 * calls.c (emit_library_call_value_1): Likewise.
14617 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14618 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14619 (gen_lowpart_for_combine): Likewise.
14620 * convert.c (convert_to_integer_1): Likewise.
14621 * cse.c (equiv_constant, cse_insn): Likewise.
14622 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14623 (cselib_subst_to_values): Likewise.
14624 * dce.c (word_dce_process_block): Likewise.
14625 * df-problems.c (df_word_lr_mark_ref): Likewise.
14626 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14627 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14628 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14629 (rtl_for_decl_location): Likewise.
14630 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14631 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14632 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14633 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14634 (expand_expr_real_1): Likewise.
14635 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14636 (pad_below): Likewise.
14637 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14638 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14639 * ira.c (get_subreg_tracking_sizes): Likewise.
14640 * ira-build.c (ira_create_allocno_objects): Likewise.
14641 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14642 (ira_sort_regnos_for_alter_reg): Likewise.
14643 * ira-costs.c (record_operand_costs): Likewise.
14644 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14645 (resolve_simple_move): Likewise.
14646 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14647 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14648 (lra_constraints): Likewise.
14649 (CONST_POOL_OK_P): Reject variable-sized modes.
14650 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14651 (add_pseudo_to_slot, lra_spill): Likewise.
14652 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14653 * optabs-query.c (get_best_extraction_insn): Likewise.
14654 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14655 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14656 (expand_mult_highpart, valid_multiword_target_p): Likewise.
14657 * recog.c (offsettable_address_addr_space_p): Likewise.
14658 * regcprop.c (maybe_mode_change): Likewise.
14659 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14660 * regrename.c (build_def_use): Likewise.
14661 * regstat.c (dump_reg_info): Likewise.
14662 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14663 (find_reloads, find_reloads_subreg_address): Likewise.
14664 * reload1.c (eliminate_regs_1): Likewise.
14665 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14666 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14667 (simplify_binary_operation_1, simplify_subreg): Likewise.
14668 * targhooks.c (default_function_arg_padding): Likewise.
14669 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14670 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14671 (verify_gimple_assign_ternary): Likewise.
14672 * tree-inline.c (estimate_move_cost): Likewise.
14673 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14674 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14675 (get_address_cost_ainc): Likewise.
14676 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14677 (vect_supportable_dr_alignment): Likewise.
14678 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14679 (vectorizable_reduction): Likewise.
14680 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14681 (vectorizable_operation, vectorizable_load): Likewise.
14682 * tree.c (build_same_sized_truth_vector_type): Likewise.
14683 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14684 * var-tracking.c (emit_note_insn_var_location): Likewise.
14685 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14686 (ADDR_VEC_ALIGN): Likewise.
14687
14688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14689 Alan Hayward <alan.hayward@arm.com>
14690 David Sherwood <david.sherwood@arm.com>
14691
14692 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14693 unsigned short.
14694 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14695 or if measurement_type is polynomial.
14696 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14697 * combine.c (make_extraction): Likewise.
14698 * dse.c (find_shift_sequence): Likewise.
14699 * dwarf2out.c (mem_loc_descriptor): Likewise.
14700 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14701 (extract_bit_field, extract_low_bits): Likewise.
14702 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14703 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14704 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14705 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14706 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14707 * reload.c (find_reloads): Likewise.
14708 * reload1.c (alter_reg): Likewise.
14709 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14710 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14711 * tree-if-conv.c (predicate_mem_writes): Likewise.
14712 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14713 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14714 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14715 * valtrack.c (dead_debug_insert_temp): Likewise.
14716 * varasm.c (mergeable_constant_section): Likewise.
14717 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14718
14719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14720 Alan Hayward <alan.hayward@arm.com>
14721 David Sherwood <david.sherwood@arm.com>
14722
14723 * expr.c (expand_assignment): Cope with polynomial mode sizes
14724 when assigning to a CONCAT.
14725
14726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14727 Alan Hayward <alan.hayward@arm.com>
14728 David Sherwood <david.sherwood@arm.com>
14729
14730 * machmode.h (mode_precision): Change from unsigned short to
14731 poly_uint16_pod.
14732 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14733 short.
14734 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14735 or if measurement_type is not polynomial.
14736 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14737 in which the mode is already known to be a scalar_int_mode.
14738 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14739 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14740 initializer.
14741 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14742 for GET_MODE_PRECISION.
14743 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14744 for GET_MODE_PRECISION.
14745 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14746 as polynomial.
14747 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14748 (expand_field_assignment, make_extraction): Likewise.
14749 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14750 (get_last_value): Likewise.
14751 * convert.c (convert_to_integer_1): Likewise.
14752 * cse.c (cse_insn): Likewise.
14753 * expr.c (expand_expr_real_1): Likewise.
14754 * lra-constraints.c (simplify_operand_subreg): Likewise.
14755 * optabs-query.c (can_atomic_load_p): Likewise.
14756 * optabs.c (expand_atomic_load): Likewise.
14757 (expand_atomic_store): Likewise.
14758 * ree.c (combine_reaching_defs): Likewise.
14759 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14760 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14761 * tree.h (type_has_mode_precision_p): Likewise.
14762 * ubsan.c (instrument_si_overflow): Likewise.
14763
14764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14765 Alan Hayward <alan.hayward@arm.com>
14766 David Sherwood <david.sherwood@arm.com>
14767
14768 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14769 polynomial numbers of units.
14770 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14771 (valid_vector_subparts_p): New function.
14772 (build_vector_type): Remove temporary shim and take the number
14773 of units as a poly_uint64 rather than an int.
14774 (build_opaque_vector_type): Take the number of units as a
14775 poly_uint64 rather than an int.
14776 * tree.c (build_vector_from_ctor): Handle polynomial
14777 TYPE_VECTOR_SUBPARTS.
14778 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14779 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14780 (build_vector_from_val): If the number of units is variable,
14781 use build_vec_duplicate_cst for constant operands and
14782 VEC_DUPLICATE_EXPR otherwise.
14783 (make_vector_type): Remove temporary is_constant ().
14784 (build_vector_type, build_opaque_vector_type): Take the number of
14785 units as a poly_uint64 rather than an int.
14786 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14787 VECTOR_CST_NELTS.
14788 * cfgexpand.c (expand_debug_expr): Likewise.
14789 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14790 (store_constructor, expand_expr_real_1): Likewise.
14791 (const_scalar_mask_from_tree): Likewise.
14792 * fold-const-call.c (fold_const_reduction): Likewise.
14793 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14794 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14795 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14796 (fold_relational_const): Likewise.
14797 (native_interpret_vector): Likewise. Change the size from an
14798 int to an unsigned int.
14799 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14800 TYPE_VECTOR_SUBPARTS.
14801 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14802 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14803 duplicating a non-constant operand into a variable-length vector.
14804 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14805 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14806 * ipa-icf.c (sem_variable::equals): Likewise.
14807 * match.pd: Likewise.
14808 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14809 * print-tree.c (print_node): Likewise.
14810 * stor-layout.c (layout_type): Likewise.
14811 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14812 * tree-cfg.c (verify_gimple_comparison): Likewise.
14813 (verify_gimple_assign_binary): Likewise.
14814 (verify_gimple_assign_ternary): Likewise.
14815 (verify_gimple_assign_single): Likewise.
14816 * tree-pretty-print.c (dump_generic_node): Likewise.
14817 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14818 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14819 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14820 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14821 (vect_shift_permute_load_chain): Likewise.
14822 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14823 (expand_vector_condition, optimize_vector_constructor): Likewise.
14824 (lower_vec_perm, get_compute_type): Likewise.
14825 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14826 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14827 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14828 (vect_recog_mask_conversion_pattern): Likewise.
14829 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14830 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14831 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14832 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14833 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14834 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14835 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14836 (supportable_widening_operation): Likewise.
14837 (supportable_narrowing_operation): Likewise.
14838 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14839 Likewise.
14840 * varasm.c (output_constant): Likewise.
14841
14842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14843 Alan Hayward <alan.hayward@arm.com>
14844 David Sherwood <david.sherwood@arm.com>
14845
14846 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14847 so that both the length == 3 and length != 3 cases set up their
14848 own permute vectors. Add comments explaining why we know the
14849 number of elements is constant.
14850 (vect_permute_load_chain): Likewise.
14851
14852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14853 Alan Hayward <alan.hayward@arm.com>
14854 David Sherwood <david.sherwood@arm.com>
14855
14856 * machmode.h (mode_nunits): Change from unsigned char to
14857 poly_uint16_pod.
14858 (ONLY_FIXED_SIZE_MODES): New macro.
14859 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14860 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14861 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14862 New typedefs.
14863 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14864 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14865 or if measurement_type is not polynomial.
14866 * genmodes.c (ZERO_COEFFS): New macro.
14867 (emit_mode_nunits_inline): Make mode_nunits_inline return a
14868 poly_uint16.
14869 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14870 Use ZERO_COEFFS when emitting initializers.
14871 * data-streamer.h (bp_pack_poly_value): New function.
14872 (bp_unpack_poly_value): Likewise.
14873 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14874 for GET_MODE_NUNITS.
14875 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14876 for GET_MODE_NUNITS.
14877 * tree.c (make_vector_type): Remove temporary shim and make
14878 the real function take the number of units as a poly_uint64
14879 rather than an int.
14880 (build_vector_type_for_mode): Handle polynomial nunits.
14881 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14882 * emit-rtl.c (const_vec_series_p_1): Likewise.
14883 (gen_rtx_CONST_VECTOR): Likewise.
14884 * fold-const.c (test_vec_duplicate_folding): Likewise.
14885 * genrecog.c (validate_pattern): Likewise.
14886 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14887 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14888 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14889 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14890 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14891 * rtlanal.c (subreg_get_info): Likewise.
14892 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14893 (vect_grouped_load_supported): Likewise.
14894 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14895 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14896 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14897 (simplify_const_unary_operation, simplify_binary_operation_1)
14898 (simplify_const_binary_operation, simplify_ternary_operation)
14899 (test_vector_ops_duplicate, test_vector_ops): Likewise.
14900 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14901 instead of CONST_VECTOR_NUNITS.
14902 * varasm.c (output_constant_pool_2): Likewise.
14903 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14904 explicit-encoded elements in the XVEC for variable-length vectors.
14905
14906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14907
14908 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14909
14910 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14911 Alan Hayward <alan.hayward@arm.com>
14912 David Sherwood <david.sherwood@arm.com>
14913
14914 * coretypes.h (fixed_size_mode): Declare.
14915 (fixed_size_mode_pod): New typedef.
14916 * builtins.h (target_builtins::x_apply_args_mode)
14917 (target_builtins::x_apply_result_mode): Change type to
14918 fixed_size_mode_pod.
14919 * builtins.c (apply_args_size, apply_result_size, result_vector)
14920 (expand_builtin_apply_args_1, expand_builtin_apply)
14921 (expand_builtin_return): Update accordingly.
14922
14923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14924
14925 * cse.c (hash_rtx_cb): Hash only the encoded elements.
14926 * cselib.c (cselib_hash_rtx): Likewise.
14927 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14928 CONST_VECTOR encoding.
14929
14930 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14931 Jeff Law <law@redhat.com>
14932
14933 PR target/83641
14934 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14935 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14936 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14937 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14938
14939 PR target/83641
14940 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14941 explicitly probe *sp in a noreturn function if there were any callee
14942 register saves or frame pointer is needed.
14943
14944 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14945
14946 PR debug/83621
14947 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14948 BLKmode for ternary, binary or unary expressions.
14949
14950 PR debug/83645
14951 * var-tracking.c (delete_vta_debug_insn): New inline function.
14952 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14953 insns from get_insns () to NULL instead of each bb separately.
14954 Use delete_vta_debug_insn. No longer static.
14955 (vt_debug_insns_local, variable_tracking_main_1): Adjust
14956 delete_vta_debug_insns callers.
14957 * rtl.h (delete_vta_debug_insns): Declare.
14958 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14959 instead of variable_tracking_main.
14960
14961 2018-01-03 Martin Sebor <msebor@redhat.com>
14962
14963 PR tree-optimization/83603
14964 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14965 arguments past the endof the argument list in functions declared
14966 without a prototype.
14967 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14968 Avoid checking when arguments are null.
14969
14970 2018-01-03 Martin Sebor <msebor@redhat.com>
14971
14972 PR c/83559
14973 * doc/extend.texi (attribute const): Fix a typo.
14974 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14975 issuing -Wsuggest-attribute for void functions.
14976
14977 2018-01-03 Martin Sebor <msebor@redhat.com>
14978
14979 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14980 offset_int::from instead of wide_int::to_shwi.
14981 (maybe_diag_overlap): Remove assertion.
14982 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14983 * gimple-ssa-sprintf.c (format_directive): Same.
14984 (parse_directive): Same.
14985 (sprintf_dom_walker::compute_format_length): Same.
14986 (try_substitute_return_value): Same.
14987
14988 2018-01-03 Jeff Law <law@redhat.com>
14989
14990 PR middle-end/83654
14991 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14992 non-constant residual for zero at runtime and avoid probing in
14993 that case. Reorganize code for trailing problem to mirror handling
14994 of the residual.
14995
14996 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14997
14998 PR tree-optimization/83501
14999 * tree-ssa-strlen.c (get_string_cst): New.
15000 (handle_char_store): Call get_string_cst.
15001
15002 2018-01-03 Martin Liska <mliska@suse.cz>
15003
15004 PR tree-optimization/83593
15005 * tree-ssa-strlen.c: Include tree-cfg.h.
15006 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
15007 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
15008 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
15009 to false.
15010 (strlen_dom_walker::before_dom_children): Call
15011 gimple_purge_dead_eh_edges. Dump tranformation with details
15012 dump flags.
15013 (strlen_dom_walker::before_dom_children): Update call by adding
15014 new argument cleanup_eh.
15015 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
15016
15017 2018-01-03 Martin Liska <mliska@suse.cz>
15018
15019 PR ipa/83549
15020 * cif-code.def (VARIADIC_THUNK): New enum value.
15021 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
15022 thunks.
15023
15024 2018-01-03 Jan Beulich <jbeulich@suse.com>
15025
15026 * sse.md (mov<mode>_internal): Tighten condition for when to use
15027 vmovdqu<ssescalarsize> for TI and OI modes.
15028
15029 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15030
15031 Update copyright years.
15032
15033 2018-01-03 Martin Liska <mliska@suse.cz>
15034
15035 PR ipa/83594
15036 * ipa-visibility.c (function_and_variable_visibility): Skip
15037 functions with noipa attribure.
15038
15039 2018-01-03 Jakub Jelinek <jakub@redhat.com>
15040
15041 * gcc.c (process_command): Update copyright notice dates.
15042 * gcov-dump.c (print_version): Ditto.
15043 * gcov.c (print_version): Ditto.
15044 * gcov-tool.c (print_version): Ditto.
15045 * gengtype.c (create_file): Ditto.
15046 * doc/cpp.texi: Bump @copying's copyright year.
15047 * doc/cppinternals.texi: Ditto.
15048 * doc/gcc.texi: Ditto.
15049 * doc/gccint.texi: Ditto.
15050 * doc/gcov.texi: Ditto.
15051 * doc/install.texi: Ditto.
15052 * doc/invoke.texi: Ditto.
15053
15054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15055
15056 * vector-builder.h (vector_builder::m_full_nelts): Change from
15057 unsigned int to poly_uint64.
15058 (vector_builder::full_nelts): Update prototype accordingly.
15059 (vector_builder::new_vector): Likewise.
15060 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
15061 (vector_builder::operator ==): Likewise.
15062 (vector_builder::finalize): Likewise.
15063 * int-vector-builder.h (int_vector_builder::int_vector_builder):
15064 Take the number of elements as a poly_uint64 rather than an
15065 unsigned int.
15066 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
15067 from unsigned int to poly_uint64.
15068 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
15069 (vec_perm_indices::new_vector): Likewise.
15070 (vec_perm_indices::length): Likewise.
15071 (vec_perm_indices::nelts_per_input): Likewise.
15072 (vec_perm_indices::input_nelts): Likewise.
15073 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
15074 number of elements per input as a poly_uint64 rather than an
15075 unsigned int. Use the original encoding for variable-length
15076 vectors, rather than clamping each individual element.
15077 For the second and subsequent elements in each pattern,
15078 clamp the step and base before clamping their sum.
15079 (vec_perm_indices::series_p): Handle polynomial element counts.
15080 (vec_perm_indices::all_in_range_p): Likewise.
15081 (vec_perm_indices_to_tree): Likewise.
15082 (vec_perm_indices_to_rtx): Likewise.
15083 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
15084 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
15085 (tree_vector_builder::new_binary_operation): Handle polynomial
15086 element counts. Return false if we need to know the number
15087 of elements at compile time.
15088 * fold-const.c (fold_vec_perm): Punt if the number of elements
15089 isn't known at compile time.
15090
15091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15092
15093 * vec-perm-indices.h (vec_perm_builder): Change element type
15094 from HOST_WIDE_INT to poly_int64.
15095 (vec_perm_indices::element_type): Update accordingly.
15096 (vec_perm_indices::clamp): Handle polynomial element_types.
15097 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15098 (vec_perm_indices::all_in_range_p): Likewise.
15099 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
15100 than shwi trees.
15101 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
15102 polynomial vec_perm_indices element types.
15103 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
15104 * fold-const.c (fold_vec_perm): Likewise.
15105 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
15106 * tree-vect-generic.c (lower_vec_perm): Likewise.
15107 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15108 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
15109 element type to HOST_WIDE_INT.
15110
15111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15112 Alan Hayward <alan.hayward@arm.com>
15113 David Sherwood <david.sherwood@arm.com>
15114
15115 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
15116 rather than an int. Use plus_constant.
15117 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
15118 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
15119
15120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15121 Alan Hayward <alan.hayward@arm.com>
15122 David Sherwood <david.sherwood@arm.com>
15123
15124 * calls.c (emit_call_1, expand_call): Change struct_value_size from
15125 a HOST_WIDE_INT to a poly_int64.
15126
15127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15128 Alan Hayward <alan.hayward@arm.com>
15129 David Sherwood <david.sherwood@arm.com>
15130
15131 * calls.c (load_register_parameters): Cope with polynomial
15132 mode sizes. Require a constant size for BLKmode parameters
15133 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
15134 forces a parameter to be padded at the lsb end in order to
15135 fill a complete number of words, require the parameter size
15136 to be ordered wrt UNITS_PER_WORD.
15137
15138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15139 Alan Hayward <alan.hayward@arm.com>
15140 David Sherwood <david.sherwood@arm.com>
15141
15142 * reload1.c (spill_stack_slot_width): Change element type
15143 from unsigned int to poly_uint64_pod.
15144 (alter_reg): Treat mode sizes as polynomial.
15145
15146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15147 Alan Hayward <alan.hayward@arm.com>
15148 David Sherwood <david.sherwood@arm.com>
15149
15150 * reload.c (complex_word_subreg_p): New function.
15151 (reload_inner_reg_of_subreg, push_reload): Use it.
15152
15153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15154 Alan Hayward <alan.hayward@arm.com>
15155 David Sherwood <david.sherwood@arm.com>
15156
15157 * lra-constraints.c (process_alt_operands): Reject matched
15158 operands whose sizes aren't ordered.
15159 (match_reload): Refer to this check here.
15160
15161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15162 Alan Hayward <alan.hayward@arm.com>
15163 David Sherwood <david.sherwood@arm.com>
15164
15165 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
15166 that the mode size is in the set {1, 2, 4, 8, 16}.
15167
15168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15169 Alan Hayward <alan.hayward@arm.com>
15170 David Sherwood <david.sherwood@arm.com>
15171
15172 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
15173 Use plus_constant instead of gen_rtx_PLUS.
15174
15175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15176 Alan Hayward <alan.hayward@arm.com>
15177 David Sherwood <david.sherwood@arm.com>
15178
15179 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
15180 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
15181 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
15182 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
15183 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
15184 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
15185 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
15186 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
15187 * config/i386/i386.c (ix86_push_rounding): ...this new function.
15188 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
15189 a poly_int64.
15190 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
15191 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
15192 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
15193 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
15194 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
15195 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
15196 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
15197 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
15198 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
15199 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
15200 function.
15201 * expr.c (emit_move_resolve_push): Treat the input and result
15202 of PUSH_ROUNDING as a poly_int64.
15203 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
15204 (emit_push_insn): Likewise.
15205 * lra-eliminations.c (mark_not_eliminable): Likewise.
15206 * recog.c (push_operand): Likewise.
15207 * reload1.c (elimination_effects): Likewise.
15208 * rtlanal.c (nonzero_bits1): Likewise.
15209 * calls.c (store_one_arg): Likewise. Require the padding to be
15210 known at compile time.
15211
15212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15213 Alan Hayward <alan.hayward@arm.com>
15214 David Sherwood <david.sherwood@arm.com>
15215
15216 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
15217 Use plus_constant instead of gen_rtx_PLUS.
15218
15219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15220 Alan Hayward <alan.hayward@arm.com>
15221 David Sherwood <david.sherwood@arm.com>
15222
15223 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
15224 rather than an int.
15225
15226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15227 Alan Hayward <alan.hayward@arm.com>
15228 David Sherwood <david.sherwood@arm.com>
15229
15230 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
15231 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
15232 via stack temporaries. Treat the mode size as polynomial too.
15233
15234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15235 Alan Hayward <alan.hayward@arm.com>
15236 David Sherwood <david.sherwood@arm.com>
15237
15238 * expr.c (expand_expr_real_2): When handling conversions involving
15239 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
15240 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
15241 as a poly_uint64 too.
15242
15243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15244 Alan Hayward <alan.hayward@arm.com>
15245 David Sherwood <david.sherwood@arm.com>
15246
15247 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15248
15249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15250 Alan Hayward <alan.hayward@arm.com>
15251 David Sherwood <david.sherwood@arm.com>
15252
15253 * combine.c (can_change_dest_mode): Handle polynomial
15254 REGMODE_NATURAL_SIZE.
15255 * expmed.c (store_bit_field_1): Likewise.
15256 * expr.c (store_constructor): Likewise.
15257 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15258 and polynomial REGMODE_NATURAL_SIZE.
15259 (gen_lowpart_common): Likewise.
15260 * reginfo.c (record_subregs_of_mode): Likewise.
15261 * rtlanal.c (read_modify_subreg_p): Likewise.
15262
15263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15264 Alan Hayward <alan.hayward@arm.com>
15265 David Sherwood <david.sherwood@arm.com>
15266
15267 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15268 numbers of elements.
15269
15270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15271 Alan Hayward <alan.hayward@arm.com>
15272 David Sherwood <david.sherwood@arm.com>
15273
15274 * match.pd: Cope with polynomial numbers of vector elements.
15275
15276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15277 Alan Hayward <alan.hayward@arm.com>
15278 David Sherwood <david.sherwood@arm.com>
15279
15280 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15281 in a POINTER_PLUS_EXPR.
15282
15283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15284 Alan Hayward <alan.hayward@arm.com>
15285 David Sherwood <david.sherwood@arm.com>
15286
15287 * omp-simd-clone.c (simd_clone_subparts): New function.
15288 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15289 (ipa_simd_modify_function_body): Likewise.
15290
15291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15292 Alan Hayward <alan.hayward@arm.com>
15293 David Sherwood <david.sherwood@arm.com>
15294
15295 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15296 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15297 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15298 (expand_vector_condition, vector_element): Likewise.
15299 (subparts_gt): New function.
15300 (get_compute_type): Use subparts_gt.
15301 (count_type_subparts): Delete.
15302 (expand_vector_operations_1): Use subparts_gt instead of
15303 count_type_subparts.
15304
15305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15306 Alan Hayward <alan.hayward@arm.com>
15307 David Sherwood <david.sherwood@arm.com>
15308
15309 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15310 (vect_compile_time_alias): ...this new function. Do the calculation
15311 on poly_ints rather than trees.
15312 (vect_prune_runtime_alias_test_list): Update call accordingly.
15313
15314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15315 Alan Hayward <alan.hayward@arm.com>
15316 David Sherwood <david.sherwood@arm.com>
15317
15318 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15319 numbers of units.
15320 (vect_schedule_slp_instance): Likewise.
15321
15322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15323 Alan Hayward <alan.hayward@arm.com>
15324 David Sherwood <david.sherwood@arm.com>
15325
15326 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15327 constant and extern definitions for variable-length vectors.
15328 (vect_get_constant_vectors): Note that the number of units
15329 is known to be constant.
15330
15331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15332 Alan Hayward <alan.hayward@arm.com>
15333 David Sherwood <david.sherwood@arm.com>
15334
15335 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15336 of units as polynomial. Choose between WIDE and NARROW based
15337 on multiple_p.
15338
15339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15340 Alan Hayward <alan.hayward@arm.com>
15341 David Sherwood <david.sherwood@arm.com>
15342
15343 * tree-vect-stmts.c (simd_clone_subparts): New function.
15344 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15345
15346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15347 Alan Hayward <alan.hayward@arm.com>
15348 David Sherwood <david.sherwood@arm.com>
15349
15350 * tree-vect-stmts.c (vectorizable_call): Treat the number of
15351 vectors as polynomial. Use build_index_vector for
15352 IFN_GOMP_SIMD_LANE.
15353
15354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15355 Alan Hayward <alan.hayward@arm.com>
15356 David Sherwood <david.sherwood@arm.com>
15357
15358 * tree-vect-stmts.c (get_load_store_type): Treat the number of
15359 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15360 for variable-length vectors.
15361 (vectorizable_mask_load_store): Treat the number of units as
15362 polynomial, asserting that it is constant if the condition has
15363 already been enforced.
15364 (vectorizable_store, vectorizable_load): Likewise.
15365
15366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15367 Alan Hayward <alan.hayward@arm.com>
15368 David Sherwood <david.sherwood@arm.com>
15369
15370 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15371 of units as polynomial. Punt if we can't tell at compile time
15372 which vector contains the final result.
15373
15374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15375 Alan Hayward <alan.hayward@arm.com>
15376 David Sherwood <david.sherwood@arm.com>
15377
15378 * tree-vect-loop.c (vectorizable_induction): Treat the number
15379 of units as polynomial. Punt on SLP inductions. Use an integer
15380 VEC_SERIES_EXPR for variable-length integer reductions. Use a
15381 cast of such a series for variable-length floating-point
15382 reductions.
15383
15384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15385 Alan Hayward <alan.hayward@arm.com>
15386 David Sherwood <david.sherwood@arm.com>
15387
15388 * tree.h (build_index_vector): Declare.
15389 * tree.c (build_index_vector): New function.
15390 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15391 of units as polynomial, forcibly converting it to a constant if
15392 vectorizable_reduction has already enforced the condition.
15393 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
15394 to create a {1,2,3,...} vector.
15395 (vectorizable_reduction): Treat the number of units as polynomial.
15396 Choose vectype_in based on the largest scalar element size rather
15397 than the smallest number of units. Enforce the restrictions
15398 relied on above.
15399
15400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15401 Alan Hayward <alan.hayward@arm.com>
15402 David Sherwood <david.sherwood@arm.com>
15403
15404 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15405 number of units as polynomial.
15406
15407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15408 Alan Hayward <alan.hayward@arm.com>
15409 David Sherwood <david.sherwood@arm.com>
15410
15411 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15412 * target.def (autovectorize_vector_sizes): Return the vector sizes
15413 by pointer, using vector_sizes rather than a bitmask.
15414 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15415 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15416 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15417 Likewise.
15418 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15419 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15420 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15421 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15422 * omp-general.c (omp_max_vf): Likewise.
15423 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15424 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15425 * tree-vect-loop.c (vect_analyze_loop): Likewise.
15426 * tree-vect-slp.c (vect_slp_bb): Likewise.
15427 * doc/tm.texi: Regenerate.
15428 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15429 to a poly_uint64.
15430 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15431 the vector size as a poly_uint64 rather than an unsigned int.
15432 (current_vector_size): Change from an unsigned int to a poly_uint64.
15433 (get_vectype_for_scalar_type): Update accordingly.
15434 * tree.h (build_truth_vector_type): Take the size and number of
15435 units as a poly_uint64 rather than an unsigned int.
15436 (build_vector_type): Add a temporary overload that takes
15437 the number of units as a poly_uint64 rather than an unsigned int.
15438 * tree.c (make_vector_type): Likewise.
15439 (build_truth_vector_type): Take the number of units as a poly_uint64
15440 rather than an unsigned int.
15441
15442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15443 Alan Hayward <alan.hayward@arm.com>
15444 David Sherwood <david.sherwood@arm.com>
15445
15446 * target.def (get_mask_mode): Take the number of units and length
15447 as poly_uint64s rather than unsigned ints.
15448 * targhooks.h (default_get_mask_mode): Update accordingly.
15449 * targhooks.c (default_get_mask_mode): Likewise.
15450 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15451 * doc/tm.texi: Regenerate.
15452
15453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15454 Alan Hayward <alan.hayward@arm.com>
15455 David Sherwood <david.sherwood@arm.com>
15456
15457 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15458 * omp-general.c (omp_max_vf): Likewise.
15459 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15460 (expand_omp_simd): Handle polynomial safelen.
15461 * omp-low.c (omplow_simd_context): Add a default constructor.
15462 (omplow_simd_context::max_vf): Change from int to poly_uint64.
15463 (lower_rec_simd_input_clauses): Update accordingly.
15464 (lower_rec_input_clauses): Likewise.
15465
15466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15467 Alan Hayward <alan.hayward@arm.com>
15468 David Sherwood <david.sherwood@arm.com>
15469
15470 * tree-vectorizer.h (vect_nunits_for_cost): New function.
15471 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15472 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15473 (vect_analyze_slp_cost): Likewise.
15474 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15475 (vect_model_load_cost): Likewise.
15476
15477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15478 Alan Hayward <alan.hayward@arm.com>
15479 David Sherwood <david.sherwood@arm.com>
15480
15481 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15482 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15483 from an unsigned int * to a poly_uint64_pod *.
15484 (calculate_unrolling_factor): New function.
15485 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
15486
15487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15488 Alan Hayward <alan.hayward@arm.com>
15489 David Sherwood <david.sherwood@arm.com>
15490
15491 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15492 from an unsigned int to a poly_uint64.
15493 (_loop_vec_info::slp_unrolling_factor): Likewise.
15494 (_loop_vec_info::vectorization_factor): Change from an int
15495 to a poly_uint64.
15496 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15497 (vect_get_num_vectors): New function.
15498 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15499 (vect_get_num_copies): Use vect_get_num_vectors.
15500 (vect_analyze_data_ref_dependences): Change max_vf from an int *
15501 to an unsigned int *.
15502 (vect_analyze_data_refs): Change min_vf from an int * to a
15503 poly_uint64 *.
15504 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15505 than an unsigned HOST_WIDE_INT.
15506 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15507 (vect_analyze_data_ref_dependence): Change max_vf from an int *
15508 to an unsigned int *.
15509 (vect_analyze_data_ref_dependences): Likewise.
15510 (vect_compute_data_ref_alignment): Handle polynomial vf.
15511 (vect_enhance_data_refs_alignment): Likewise.
15512 (vect_prune_runtime_alias_test_list): Likewise.
15513 (vect_shift_permute_load_chain): Likewise.
15514 (vect_supportable_dr_alignment): Likewise.
15515 (dependence_distance_ge_vf): Take the vectorization factor as a
15516 poly_uint64 rather than an unsigned HOST_WIDE_INT.
15517 (vect_analyze_data_refs): Change min_vf from an int * to a
15518 poly_uint64 *.
15519 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15520 vfm1 as a poly_uint64 rather than an int. Make the same change
15521 for the returned bound_scalar.
15522 (vect_gen_vector_loop_niters): Handle polynomial vf.
15523 (vect_do_peeling): Likewise. Update call to
15524 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15525 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15526 be constant.
15527 * tree-vect-loop.c (vect_determine_vectorization_factor)
15528 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15529 (vect_get_known_peeling_cost): Likewise.
15530 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15531 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15532 (vect_transform_loop): Likewise. Use the lowest possible VF when
15533 updating the upper bounds of the loop.
15534 (vect_min_worthwhile_factor): Make static. Return an unsigned int
15535 rather than an int.
15536 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15537 polynomial unroll factors.
15538 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15539 (vect_make_slp_decision): Likewise.
15540 (vect_supported_load_permutation_p): Likewise, and polynomial
15541 vf too.
15542 (vect_analyze_slp_cost): Handle polynomial vf.
15543 (vect_slp_analyze_node_operations): Likewise.
15544 (vect_slp_analyze_bb_1): Likewise.
15545 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15546 than an unsigned HOST_WIDE_INT.
15547 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15548 (vectorizable_load): Handle polynomial vf.
15549 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15550 a poly_uint64.
15551 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15552
15553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15554 Alan Hayward <alan.hayward@arm.com>
15555 David Sherwood <david.sherwood@arm.com>
15556
15557 * match.pd: Handle bit operations involving three constants
15558 and try to fold one pair.
15559
15560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15561
15562 * tree-vect-loop-manip.c: Include gimple-fold.h.
15563 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15564 niters_maybe_zero parameters. Handle other cases besides a step of 1.
15565 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15566 Add a path that uses a step of VF instead of 1, but disable it
15567 for now.
15568 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15569 and niters_no_overflow parameters. Update calls to
15570 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15571 Create a new SSA name if the latter choses to use a ste other
15572 than zero, and return it via niters_vector_mult_vf_var.
15573 * tree-vect-loop.c (vect_transform_loop): Update calls to
15574 vect_do_peeling, vect_gen_vector_loop_niters and
15575 slpeel_make_loop_iterate_ntimes.
15576 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15577 (vect_gen_vector_loop_niters): Update declarations after above changes.
15578
15579 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
15580
15581 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15582 128-bit round to integer instructions.
15583 (ceil<mode>2): Likewise.
15584 (btrunc<mode>2): Likewise.
15585 (round<mode>2): Likewise.
15586
15587 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15588
15589 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15590 unaligned VSX load/store on P8/P9.
15591 (expand_block_clear): Allow the use of unaligned VSX
15592 load/store on P8/P9.
15593
15594 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15595
15596 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15597 New function.
15598 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15599 swap associated with both a load and a store.
15600
15601 2018-01-02 Andrew Waterman <andrew@sifive.com>
15602
15603 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15604 * config/riscv/riscv.md (clear_cache): Use it.
15605
15606 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
15607
15608 * web.c: Remove out-of-date comment.
15609
15610 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15611
15612 * expr.c (fixup_args_size_notes): Check that any existing
15613 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15614 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15615 (emit_single_push_insn): ...here.
15616
15617 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15618
15619 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15620 (const_vector_encoded_nelts): New function.
15621 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15622 (const_vector_int_elt, const_vector_elt): Declare.
15623 * emit-rtl.c (const_vector_int_elt_1): New function.
15624 (const_vector_elt): Likewise.
15625 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15626 of CONST_VECTOR_ELT.
15627
15628 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15629
15630 * expr.c: Include rtx-vector-builder.h.
15631 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15632 directly on the tree encoding.
15633 (const_vector_from_tree): Likewise.
15634 * optabs.c: Include rtx-vector-builder.h.
15635 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15636 sequence of "u" values.
15637 * vec-perm-indices.c: Include rtx-vector-builder.h.
15638 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15639 directly on the vec_perm_indices encoding.
15640
15641 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15642
15643 * doc/rtl.texi (const_vector): Describe new encoding scheme.
15644 * Makefile.in (OBJS): Add rtx-vector-builder.o.
15645 * rtx-vector-builder.h: New file.
15646 * rtx-vector-builder.c: Likewise.
15647 * rtl.h (rtx_def::u2): Add a const_vector field.
15648 (CONST_VECTOR_NPATTERNS): New macro.
15649 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15650 (CONST_VECTOR_DUPLICATE_P): Likewise.
15651 (CONST_VECTOR_STEPPED_P): Likewise.
15652 (CONST_VECTOR_ENCODED_ELT): Likewise.
15653 (const_vec_duplicate_p): Check for a duplicated vector encoding.
15654 (unwrap_const_vec_duplicate): Likewise.
15655 (const_vec_series_p): Check for a non-duplicated vector encoding.
15656 Say that the function only returns true for integer vectors.
15657 * emit-rtl.c: Include rtx-vector-builder.h.
15658 (gen_const_vec_duplicate_1): Delete.
15659 (gen_const_vector): Call gen_const_vec_duplicate instead of
15660 gen_const_vec_duplicate_1.
15661 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15662 (gen_const_vec_duplicate): Use rtx_vector_builder.
15663 (gen_const_vec_series): Likewise.
15664 (gen_rtx_CONST_VECTOR): Likewise.
15665 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15666 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15667 Build a new vector rather than modifying a CONST_VECTOR in-place.
15668 (handle_special_swappables): Update call accordingly.
15669 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15670 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15671 Build a new vector rather than modifying a CONST_VECTOR in-place.
15672 (handle_special_swappables): Update call accordingly.
15673
15674 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15675
15676 * simplify-rtx.c (simplify_const_binary_operation): Use
15677 CONST_VECTOR_ELT instead of XVECEXP.
15678
15679 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15680
15681 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15682 the selector elements to be different from the data elements
15683 if the selector is a VECTOR_CST.
15684 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15685 ssizetype for the selector.
15686
15687 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15688
15689 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15690 before testing each element individually.
15691 * tree-vect-generic.c (lower_vec_perm): Likewise.
15692
15693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15694
15695 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15696 * selftest-run-tests.c (selftest::run_tests): Call it.
15697 * vector-builder.h (vector_builder::operator ==): New function.
15698 (vector_builder::operator !=): Likewise.
15699 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15700 (vec_perm_indices::all_from_input_p): New function.
15701 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15702 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15703 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15704 instead of reading the VECTOR_CST directly. Detect whether both
15705 vector inputs are the same before constructing the vec_perm_indices,
15706 and update the number of inputs argument accordingly. Use the
15707 utility functions added above. Only construct sel2 if we need to.
15708
15709 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15710
15711 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15712 the broadcast of the low byte.
15713 (expand_mult_highpart): Use an explicit encoding for the permutes.
15714 * optabs-query.c (can_mult_highpart_p): Likewise.
15715 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15716 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15717 (vectorizable_bswap): Likewise.
15718 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15719 explicit encoding for the power-of-2 permutes.
15720 (vect_permute_store_chain): Likewise.
15721 (vect_grouped_load_supported): Likewise.
15722 (vect_permute_load_chain): Likewise.
15723
15724 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15725
15726 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15727 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15728 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15729 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15730 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15731 (vect_gen_perm_mask_any): Likewise.
15732
15733 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15734
15735 * int-vector-builder.h: New file.
15736 * vec-perm-indices.h: Include int-vector-builder.h.
15737 (vec_perm_indices): Redefine as an int_vector_builder.
15738 (auto_vec_perm_indices): Delete.
15739 (vec_perm_builder): Redefine as a stand-alone class.
15740 (vec_perm_indices::vec_perm_indices): New function.
15741 (vec_perm_indices::clamp): Likewise.
15742 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15743 (vec_perm_indices::new_vector): New function.
15744 (vec_perm_indices::new_expanded_vector): Update for new
15745 vec_perm_indices class.
15746 (vec_perm_indices::rotate_inputs): New function.
15747 (vec_perm_indices::all_in_range_p): Operate directly on the
15748 encoded form, without computing elided elements.
15749 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15750 encoding. Update for new vec_perm_indices class.
15751 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15752 the given vec_perm_builder.
15753 (expand_vec_perm_var): Update vec_perm_builder constructor.
15754 (expand_mult_highpart): Use vec_perm_builder instead of
15755 auto_vec_perm_indices.
15756 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15757 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15758 or double series encoding as appropriate.
15759 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15760 vec_perm_indices instead of auto_vec_perm_indices.
15761 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15762 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15763 (vect_permute_store_chain): Likewise.
15764 (vect_grouped_load_supported): Likewise.
15765 (vect_permute_load_chain): Likewise.
15766 (vect_shift_permute_load_chain): Likewise.
15767 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15768 (vect_transform_slp_perm_load): Likewise.
15769 (vect_schedule_slp_instance): Likewise.
15770 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15771 (vectorizable_mask_load_store): Likewise.
15772 (vectorizable_bswap): Likewise.
15773 (vectorizable_store): Likewise.
15774 (vectorizable_load): Likewise.
15775 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15776 vec_perm_indices instead of auto_vec_perm_indices. Use
15777 tree_to_vec_perm_builder to read the vector from a tree.
15778 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15779 vec_perm_builder instead of a vec_perm_indices.
15780 (have_whole_vector_shift): Use vec_perm_builder and
15781 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15782 truncation to calc_vec_perm_mask_for_shift.
15783 (vect_create_epilog_for_reduction): Likewise.
15784 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15785 from auto_vec_perm_indices to vec_perm_indices.
15786 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15787 instead of changing individual elements.
15788 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15789 the vector in d.perm.
15790 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15791 from auto_vec_perm_indices to vec_perm_indices.
15792 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15793 instead of changing individual elements.
15794 (arm_vectorize_vec_perm_const): Use new_vector to install
15795 the vector in d.perm.
15796 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15797 Update vec_perm_builder constructor.
15798 (rs6000_expand_interleave): Likewise.
15799 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15800 (rs6000_expand_interleave): Likewise.
15801
15802 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15803
15804 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15805 to qimode could truncate the indices.
15806 * optabs.c (expand_vec_perm_var): Likewise.
15807
15808 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15809
15810 * Makefile.in (OBJS): Add vec-perm-indices.o.
15811 * vec-perm-indices.h: New file.
15812 * vec-perm-indices.c: Likewise.
15813 * target.h (vec_perm_indices): Replace with a forward class
15814 declaration.
15815 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15816 * optabs.h: Include vec-perm-indices.h.
15817 (expand_vec_perm): Delete.
15818 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15819 (expand_vec_perm_const): Declare.
15820 * target.def (vec_perm_const_ok): Replace with...
15821 (vec_perm_const): ...this new hook.
15822 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15823 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15824 * doc/tm.texi: Regenerate.
15825 * optabs.def (vec_perm_const): Delete.
15826 * doc/md.texi (vec_perm_const): Likewise.
15827 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15828 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15829 expand_vec_perm for constant permutation vectors. Assert that
15830 the mode of variable permutation vectors is the integer equivalent
15831 of the mode that is being permuted.
15832 * optabs-query.h (selector_fits_mode_p): Declare.
15833 * optabs-query.c: Include vec-perm-indices.h.
15834 (selector_fits_mode_p): New function.
15835 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15836 is defined, instead of checking whether the vec_perm_const_optab
15837 exists. Use targetm.vectorize.vec_perm_const instead of
15838 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15839 fit in the vector mode before using a variable permute.
15840 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15841 vec_perm_indices instead of an rtx.
15842 (expand_vec_perm): Replace with...
15843 (expand_vec_perm_const): ...this new function. Take the selector
15844 as a vec_perm_indices rather than an rtx. Also take the mode of
15845 the selector. Update call to shift_amt_for_vec_perm_mask.
15846 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15847 Use vec_perm_indices::new_expanded_vector to expand the original
15848 selector into bytes. Check whether the indices fit in the vector
15849 mode before using a variable permute.
15850 (expand_vec_perm_var): Make global.
15851 (expand_mult_highpart): Use expand_vec_perm_const.
15852 * fold-const.c: Includes vec-perm-indices.h.
15853 * tree-ssa-forwprop.c: Likewise.
15854 * tree-vect-data-refs.c: Likewise.
15855 * tree-vect-generic.c: Likewise.
15856 * tree-vect-loop.c: Likewise.
15857 * tree-vect-slp.c: Likewise.
15858 * tree-vect-stmts.c: Likewise.
15859 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15860 Delete.
15861 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15862 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15863 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15864 (aarch64_vectorize_vec_perm_const): ...this new function.
15865 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15866 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15867 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15868 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15869 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15870 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15871 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15872 into...
15873 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
15874 check for NEON modes.
15875 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15876 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15877 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15878 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15879 into...
15880 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
15881 the old VEC_PERM_CONST conditions.
15882 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15883 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15884 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15885 (ia64_vectorize_vec_perm_const_ok): Merge into...
15886 (ia64_vectorize_vec_perm_const): ...this new function.
15887 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15888 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15889 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15890 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15891 * config/mips/mips.c (mips_expand_vec_perm_const)
15892 (mips_vectorize_vec_perm_const_ok): Merge into...
15893 (mips_vectorize_vec_perm_const): ...this new function.
15894 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15895 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15896 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15897 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15898 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15899 (rs6000_expand_vec_perm_const): Delete.
15900 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15901 Delete.
15902 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15903 (altivec_expand_vec_perm_const_le): Take each operand individually.
15904 Operate on constant selectors rather than rtxes.
15905 (altivec_expand_vec_perm_const): Likewise. Update call to
15906 altivec_expand_vec_perm_const_le.
15907 (rs6000_expand_vec_perm_const): Delete.
15908 (rs6000_vectorize_vec_perm_const_ok): Delete.
15909 (rs6000_vectorize_vec_perm_const): New function.
15910 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15911 an element count and rtx array.
15912 (rs6000_expand_extract_even): Update call accordingly.
15913 (rs6000_expand_interleave): Likewise.
15914 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15915 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15916 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15917 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15918 (rs6000_expand_vec_perm_const): Delete.
15919 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15920 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15921 (altivec_expand_vec_perm_const_le): Take each operand individually.
15922 Operate on constant selectors rather than rtxes.
15923 (altivec_expand_vec_perm_const): Likewise. Update call to
15924 altivec_expand_vec_perm_const_le.
15925 (rs6000_expand_vec_perm_const): Delete.
15926 (rs6000_vectorize_vec_perm_const_ok): Delete.
15927 (rs6000_vectorize_vec_perm_const): New function. Remove stray
15928 reference to the SPE evmerge intructions.
15929 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15930 an element count and rtx array.
15931 (rs6000_expand_extract_even): Update call accordingly.
15932 (rs6000_expand_interleave): Likewise.
15933 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15934 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15935 new function.
15936 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15937
15938 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15939
15940 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15941 vector mode and that that mode matches the mode of the data
15942 being permuted.
15943 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15944 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
15945 directly using expand_vec_perm_1 when forcing selectors into
15946 registers.
15947 (expand_vec_perm_var): New function, split out from expand_vec_perm.
15948
15949 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15950
15951 * optabs-query.h (can_vec_perm_p): Delete.
15952 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15953 * optabs-query.c (can_vec_perm_p): Split into...
15954 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15955 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15956 particular selector is valid.
15957 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15958 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15959 (vect_grouped_load_supported): Likewise.
15960 (vect_shift_permute_load_chain): Likewise.
15961 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15962 (vect_transform_slp_perm_load): Likewise.
15963 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15964 (vectorizable_bswap): Likewise.
15965 (vect_gen_perm_mask_checked): Likewise.
15966 * fold-const.c (fold_ternary_loc): Likewise. Don't take
15967 implementations of variable permutation vectors into account
15968 when deciding which selector to use.
15969 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15970 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15971 with a false third argument.
15972 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15973 to test whether the constant selector is valid and can_vec_perm_var_p
15974 to test whether a variable selector is valid.
15975
15976 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15977
15978 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15979 * optabs-query.c (can_vec_perm_p): Likewise.
15980 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15981 instead of vec_perm_indices.
15982 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15983 (vect_gen_perm_mask_checked): Likewise,
15984 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15985 (vect_gen_perm_mask_checked): Likewise,
15986
15987 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15988
15989 * optabs-query.h (qimode_for_vec_perm): Declare.
15990 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15991 (qimode_for_vec_perm): ...this new function.
15992 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
15993
15994 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15995
15996 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
15997 does not have a conditional at the top.
15998
15999 2018-01-02 Richard Biener <rguenther@suse.de>
16000
16001 * ipa-inline.c (big_speedup_p): Fix expression.
16002
16003 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16004
16005 PR target/81616
16006 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
16007 for generic 4->6.
16008
16009 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
16010
16011 PR target/81616
16012 Generic tuning.
16013 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
16014 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
16015 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
16016 cond_taken_branch_cost 3->4.
16017
16018 2018-01-01 Jakub Jelinek <jakub@redhat.com>
16019
16020 PR tree-optimization/83581
16021 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
16022 TODO_cleanup_cfg if any changes have been made.
16023
16024 PR middle-end/83608
16025 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
16026 convert_modes if target mode has the right side, but different mode
16027 class.
16028
16029 PR middle-end/83609
16030 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
16031 last argument when extracting from CONCAT. If either from_real or
16032 from_imag is NULL, use expansion through memory. If result is not
16033 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
16034 the parts directly to inner mode, if even that fails, use expansion
16035 through memory.
16036
16037 PR middle-end/83623
16038 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
16039 check for bswap in mode rather than HImode and use that in expand_unop
16040 too.
16041 \f
16042 Copyright (C) 2018 Free Software Foundation, Inc.
16043
16044 Copying and distribution of this file, with or without modification,
16045 are permitted in any medium without royalty provided the copyright
16046 notice and this notice are preserved.
This page took 0.752291 seconds and 5 git commands to generate.