Fix divergence in indirect profiling (PR gcov-profile/84107).
[official-gcc.git] / gcc / ChangeLog
blobfdae3d1909ae2c20345caef45913c4dd9516fad6
1 2018-10-04  Martin Liska  <mliska@suse.cz>
3         PR gcov-profile/84107
4         * tree-profile.c (init_ic_make_global_vars):
5         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6         Come up with new ic_tuple* variables.  Emit
7         __gcov_indirect_call{,_topn} variables.
8         (gimple_gen_ic_profiler): Access the variable
9         and emit gimple.
10         (gimple_gen_ic_func_profiler): Access
11         __gcov_indirect_call.callee field.
12         (gimple_init_gcov_profiler): Use ptr_type_node.
13         * value-prof.c (gimple_ic): Use ptr_type_node.
15 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17         PR tree-optimization/85787
18         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
19         into this function and add support for detecting multiple phis.
20         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
22 2018-10-04  Martin Liska  <mliska@suse.cz>
24         PR ipa/87491
25         * ipa-inline.c (inline_to_all_callers_1):
26         Call ultimate_alias_target for node being inlined.
28 2018-10-04  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
30         * lra-constraints.c (process_address_1): Bail out for all
31         satisfied fixed constraints.
33 2018-10-03  Jeff Law  <law@redhat.com>
35         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
36         target's wchar_t.
37         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
38         * tree.h (get_typenode_from_name): Prototype.
40 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
42         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
43         Change operand 2 predicate to nonimmediate_operand.
44         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
46 2018-10-03  Martin Sebor  <msebor@redhat.com>
47             Jeff Law  <law@redhat.com>
49         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
50         initialize it.
51         (get_string_length): Detect unterminated arrays.
52         (format_string): Same.
53         (format_directive): Warn about unterminated arrays.
54         (handle_gimple_call): Mark statements with no_warning as needed.
56 2018-10-03  Jim Wilson  <jimw@sifive.com>
58         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
59         also define __riscv_abi_rve.  Delete trailing white space.
61 2018-10-03  Paul Koning  <ni1d@arrl.net>
63         Enable LRA register allocator for PDP11.
64         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
65         (R): Likewise.
66         (D): Likewise.
67         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
68         * config/pdp11/pdp11.opt (-mlra): New option.
69         * doc/invoke.texi (PDP-11 Options): Document -mlra.
71 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
73         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
74         (*<absneg:code>extend<mode>xf2): Ditto.
76 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
78         PR tree-optimization/87415
79         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
80         precision fields.
82 2018-10-02  Jeff Law  <law@redhat.com>
84         * gimple-fold.c (get_range_strlen): Only set *nonstr when
85         an unterminated string is discovered.  Bubble up range
86         even for unterminated strings.
87         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
88         indicates the string was not terminated via NONSTR.
90 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
92         * tree-vrp.c (extract_range_from_unary_expr): Special case all
93         pointer conversions.
94         Do not do anything special for anti-ranges.
96 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
98         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
99         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
101 2018-10-03  Martin Liska  <mliska@suse.cz>
103         PR gcov-profile/86109
104         * coverage.c (coverage_begin_function): Do not
105         mark lambdas as artificial.
106         * tree-core.h (struct GTY): Remove tm_clone_flag
107         and introduce new lambda_function.
108         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
110 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
112         PR target/87474
113         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
114         P8_VECTOR and VSX are enabled.
116 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
118         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
119         0x3907 as CPU model number.
121 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
123         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
124         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
125         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
126         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
127         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
128         * config/s390/s390.md: Likewise. Rename also the cpu attribute
129         value from arch12 to z14.
131 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
133         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
134         (isinfxf2): Ditto.
135         (isinf<mode>2): Ditto.
137 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
139         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
140         before emitting fxam.  Perform calculations in XFmode.
142 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
144         * match.pd (((X /[ex] A) +- B) * A): New transformation.
146 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
148         PR middle-end/87319
149         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
150         * tree.c (signed_or_unsigned_type_for): Handle complex.
152 2018-10-02  Jeff Law  <law@redhat.com>
154         * gimple-fold.c (get_range_strlen): Remove dead code.
156 2018-10-02  Martin Sebor  <msebor@redhat.com>
157             Jeff Law  <law@redhat.com>
159         * builtins.c (unterminated_array): Add new arguments.
160         If argument is not terminated, bubble up size and exact
161         state to callers.
162         (expand_builtin_strnlen): Detect, avoid expanding
163         and diagnose unterminated arrays.
164         (c_strlen): Fill in offset of start of unterminated strings.
165         * builtins.h (unterminated_array): Update prototype.
167 2018-10-02  Richard Biener  <rguenther@suse.de>
169         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
170         of haddv4df, first reduce to SSE width and exploit the fact
171         that we only need element zero with the reduction result.
172         (reduc_plus_scal_v2df): Likewise.
174 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
176         * dojump.h (do_jump): Delete.
177         (do_jump_1): Likewise.
178         (split_comparison): Move around.
179         * dojump.c (do_jump): Make static.
180         (do_jump_1): Likewise.
181         (jumpifnot): Move around.
182         (jumpifnot_1): Likewise.
183         (jumpif): Likewise.
184         (jumpif_1): Likewise.
185         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
187 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
189         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
190         insns in the delay slot and add_insn_after for the jump insn.
192 2018-10-02  Richard Biener  <rguenther@suse.de>
194         * tree-inline.c (expand_call_inline): Use the location of
195         the callee declaration for the inline-entry marker.
196         * final.c (notice_source_line): Remove special-casing of
197         NOTE_INSN_INLINE_ENTRY.
199 2018-10-01  Carl Love  <cel@us.ibm.com>
201         PR 69431
202         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
203         (__builtin_mtfsb0): New.
204         (__builtin_mtfsb1): New.
205         ( __builtin_set_fpscr_rn): New.
206         (__builtin_set_fpscr_drn): New.
207         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
208         (rs6000_expand_set_fpscr_rn_builtin): Add.
209         (rs6000_expand_set_fpscr_drn_builtin): Add.
210         (rs6000_expand_builtin): Add case statement entries for
211         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
212         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
213         RS6000_BUILTIN_MFFSL.
214         (rs6000_init_builtins): Add ftype initialization and def_builtin
215         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
216         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
217         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
218         rs6000_mffscdrn): Add define_insn.
219         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
220         * doc/extend.texi: Add documentation for the builtins.
222 2018-10-01  Richard Biener  <rguenther@suse.de>
224         PR tree-optimization/87465
225         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
226         causing branch miscounts.
228 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
230         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
231         aarch64_option_default_param):  New.
232         (params.h): Include.
233         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
234         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
235         stack-clash protection validation code.
237 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
239         * params.c (validate_param): New.
240         (add_params): Use it.
241         (set_param_value): Refactor param validation into validate_param.
242         (diagnostic.h): Include.
243         * diagnostic.h (diagnostic_ready_p): New.
245 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
247         * params.c (set_param_value):
248         Add index of parameter being validated.
249         * common/common-target.def (option_validate_param): New.
250         * common/common-targhooks.h (default_option_validate_param): New.
251         * common/common-targhooks.c (default_option_validate_param): New.
252         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
253         * doc/tm.texi: Regenerate.
255 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
257         PR target/86486
258         * config/aarch64/aarch64.c (aarch64_override_options_internal):
259         Add validation for stack-clash parameters and set defaults.
261 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
263         PR target/86486
264         * configure.ac: Add stack-clash-protection-guard-size.
265         * doc/install.texi: Document it.
266         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
267         * params.def: Update comment for guard-size.
268         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
269         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
270         * configure: Regenerate.
272 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
274         PR target/86486
275         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
276         STACK_DYNAMIC_OFFSET): New.
277         * config/aarch64/aarch64.c (aarch64_layout_frame):
278         Update outgoing args size.
279         (aarch64_stack_clash_protection_alloca_probe_range,
280         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
282 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
284         PR target/86486
285         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
286         probe ranges.
287         * target.def (stack_clash_protection_alloca_probe_range): New.
288         (stack_clash_protection_final_dynamic_probe): Remove.
289         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
290         (default_stack_clash_protection_final_dynamic_probe): Remove.
291         * targhooks.c: Likewise.
292         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
293         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
294         * doc/tm.texi: Regenerate.
296 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
298         PR target/86486
299         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
300         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
301         aarch64_clamp_to_uimm12_shift): New.
302         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
303         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
305 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
307         PR target/86486
308         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
310 2018-10-01  Jeff Law  <law@redhat.com>
311             Richard Sandiford <richard.sandiford@linaro.org>
312             Tamar Christina  <tamar.christina@arm.com>
314         PR target/86486
315         * config/aarch64/aarch64.md
316         (probe_stack_range): Add k (SP) constraint.
317         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
318         STACK_CLASH_MAX_UNROLL_PAGES): New.
319         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
320         stack probes for stack clash.
321         (aarch64_allocate_and_probe_stack_space): New.
322         (aarch64_expand_prologue): Use it.
323         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
324         (aarch64_sub_sp): Add emit_move_imm optional param.
326 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
328         PR tree-optimization/87261
329         * match.pd: Remove trailing whitespace.
330         Add (x & y) | ~(x | y) -> ~(x ^ y),
331         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
333 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
335         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
336         constraints.
337         (ashlsi3_insn): Update instruction constraints.
338         (ashrsi3_insn): Likewise.
339         (rotrsi3): Likewise.
340         (add_shift): Likewise.
341         * config/arc/constraints.md (Csz): New 32 bit constraint. It
342         avoids placing in the limm field small constants which, otherwise,
343         could end into a small instruction.
345 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
347         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
348         destination register is not odd-even.
349         (umaddsidi4_split): Likewise.
351 2018-10-01  Richard Biener  <rguenther@suse.de>
353         * tree-inline.c (expand_call_inline): Store origin of fn
354         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
355         * tree.c (block_ultimate_origin): Simplify and do some
356         checking.
358 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
360         * config/i386/mmx.md (EMMS): New int iterator.
361         (emms): New int attribute.
362         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
363         EMMS int iterator.  Explicitly declare clobbers.
364         (mmx_emms): Remove expander.
365         (mmx_femms): Ditto.
366         * config/i386/predicates.md (emms_operation): Remove predicate.
367         (vzeroall_pattern): New predicate.
368         (vzeroupper_pattern): Rename from vzeroupper_operation.
369         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
370         vzeroupper_pattern and vzeroall_pattern predicates.
372 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
374         PR rtl-optimization/86939
375         * ira-lives.c (make_hard_regno_born): Rename from this...
376         (make_hard_regno_live): ... to this.  Remove update to conflict
377         information.  Update function comment.
378         (make_hard_regno_dead): Add conflict information update.  Update
379         function comment.
380         (make_object_born): Rename from this...
381         (make_object_live): ... to this.  Remove update to conflict information.
382         Update function comment.
383         (make_object_dead):  Add conflict information update.  Update function
384         comment.
385         (mark_pseudo_regno_live): Call make_object_live.
386         (mark_pseudo_regno_subword_live): Likewise.
387         (mark_hard_reg_dead): Update function comment.
388         (mark_hard_reg_live): Call make_hard_regno_live.
389         (process_bb_node_lives): Likewise.
390         * lra-lives.c (make_hard_regno_born): Rename from this...
391         (make_hard_regno_live): ... to this.  Remove update to conflict
392         information.  Remove now uneeded check_pic_pseudo_p argument.
393         Update function comment.
394         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
395         to conflict information.  Update function comment.
396         (mark_pseudo_live): Remove update to conflict information.  Update
397         function comment.
398         (mark_pseudo_dead): Add conflict information update.
399         (mark_regno_live): Call make_hard_regno_live.
400         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
401         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
403 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
405         PR target/87370
406         * config/i386/i386.c (construct_container): Use TImode for
407         BLKmode values in 2 integer registers.
409 2018-09-29  Jeff Law  <law@redhat.com>
411         * builtins.c (unterminated_array): Pass in c_strlen_data * to
412         c_strlen rather than just a tree *.
413         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
414         Update recursive calls appropriately.  If caller did not provide a
415         suitable data pointer, create a local one.  When a non-terminated
416         string is discovered, bubble up information about the string via the
417         c_strlen_data object.
418         * builtins.h (c_strlen): Update prototype.
419         (c_strlen_data): New structure.
420         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
421         For a type 2 call, if c_strlen indicates a non-terminated string
422         use the length of the non-terminated string.
423         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
425 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
427         PR target/87467
428         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
429         __m512d type for __A argument rather than __m512.
431 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
433         * match.pd (simple_comparison): Don't optimize if either operand is
434         a function pointer when target needs function pointer canonicalization.
436 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
438         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
439         power5 .. power9 to remove indirection.
440         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
441         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
442         ASM_CPU_476_SPEC): Delete.
443         (ASM_CPU_SPEC): Adjust.
444         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
445         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
447 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
449         * config.in: Delete HAVE_AS_DCI.
450         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
451         * config/rs6000/rs6000.h: Ditto.
452         * configure.ac: Delete HAVE_AS_DCI.
453         * configure: Regenerate.
455 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
457         * config.in (HAVE_AS_LWSYNC): Delete.
458         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
459         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
460         do it as a .long .
461         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
462         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
463         as a .long .
464         * configure.ac: Delete HAVE_AS_LWSYNC.
465         * configure: Regenerate.
467 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
468             Pierre-Marie de Rodat  <derodat@adacore.com>
470         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
471         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
472         (cgraph_node::create_thunk): Add indirect_offset parameter.
473         (thunk_adjust): Likewise.
474         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
475         and initialize the corresponding field with it.
476         (cgraph_node::dump): Dump indirect_offset field.
477         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
478         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
479         (thunk_adjust): Add indirect_offset parameter and deal with it.
480         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
481         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
482         or if the thunk is external or local.  Fix formatting.  Do not chain
483         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
484         if any, in the GIMPLE representation.
485         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
486         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
487         (input_node): Read indirect_offset field.
488         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
489         call to thunk_adjust.
490         * tree-nested.c (struct nesting_info): Add thunk_p field.
491         (create_nesting_tree): Set it.
492         (convert_all_function_calls): Copy static chain from targets to thunks.
493         (finalize_nesting_tree_1): Return early for thunks.
494         (unnest_nesting_tree_1): Do not finalize thunks.
495         (gimplify_all_functions): Do not gimplify thunks.
497 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
499         * opt-suggestions.c (option_proposer::build_option_suggestions):
500         Release "option_values".
502 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
504         * coverage.c (get_coverage_counts): Convert problem-reporting dump
505         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
506         * dumpfile.c (kind_as_string): New function.
507         (dump_loc): Rather than a hardcoded prefix of "note: ", use
508         kind_as_string to vary the prefix based on dump_kind.
509         (selftest::test_capture_of_dump_calls): Update for above.
511 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
513         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
514         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
516 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
518         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
519         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
520         INVALID_REGNUM instead of FPSR_REG.
521         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
522         * config/i386/i386.md: Update comment of FP compares.
523         (fldenv): Do not clobber FPSR_REG.
525 2018-09-28  Richard Biener  <rguenther@suse.de>
527         * tree.h (BLOCK_ORIGIN): New.
528         * omp-expand.c (grid_expand_target_grid_body): Assign
529         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
530         * tree-inline.c (remap_block): Likewise.
531         * auto-profile.c (get_function_decl_from_block): Simplify
532         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
533         * langhooks.c (lhd_print_error_function): Likewise.
534         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
535         Likewise.
536         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
537         * tree.c (block_nonartificial_location): Likewise.
538         (block_ultimate_origin): Likewise.
539         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
540         no longer needed LTO case.
542 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
543             Jan Hubicka  <jh@suse.cz>
544             Martin Jambor  <mjambor@suse.cz>
546         * simplify-rtx.c (simplify_merge_mask): New function.
547         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
548         same masks are used in op1 or op2.
549         (test_vec_merge): New function.
550         (test_vector_ops): Call test_vec_merge.
552 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
554         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
555         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
556         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
557         (cypress_costs): Set it.
558         (supersparc_costs): Likewise.
559         (hypersparc_costs): Likewise.
560         (leon_cost): Likewise.
561         (leon3_costs): Likewise.
562         (sparclet_costs): Likewise.
563         (ultrasparc_costs): Likewise.
564         (ultrasparc_costs): Likewise.
565         (niagara_costs): Likewise.
566         (niagara2_costs): Likewise.
567         (niagara3_costs): Likewise.
568         (niagara4_costs): Likewise.
569         (niagara7_costs): Likewise.
570         (m8_costs): Likewise.
571         (TARGET_CAN_FOLLOW_JUMP): Define.
572         (pass_work_around_errata::gate): Minor tweak.
573         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
574         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
575         Automaitcally clear MASK_FSMULD mask for V7 processors.
576         (sparc_can_follow_jump): New static function.
577         (output_ubranch): Deal with CROSSING_JUMP_P.
578         (sparc_use_sched_lookahead): Rewrite using switch statement.
579         (sparc_issue_rate): Reorder.
580         (sparc_branch_cost): New function.
582 2018-09-27  Martin Sebor  <msebor@redhat.com>
584         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
585         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
586         (int_fits_type_p): Same.
588 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
590         * config/i386/i386.md (FPCR_REG): Remove.
591         (UNSPEC_FLDCW): Remove.
592         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
593         (x86_fldcw_1): Remove insn pattern.
594         (fnstenv): Do not clobber FPCR_REG.
595         (fldenv): Ditto.
596         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
597         (CALL_USED_REGISTERS): Ditto.
598         (REG_ALLOC_ORDER): Ditto.
599         (REG_CLASS_CONTENTS): Ditto.
600         (HI_REGISTER_NAMES): Ditto.
601         (ADDITIONAL_REGISTER_NAMES): Use defines instead
602         of numerical constants.
603         * config/i386/i386.c (regclass_map): Remove fpsr register.
604         (dbx_register_map): Ditto.
605         (dbx64_register_map): Ditto.
606         (svr4_dbx_register_map): Ditto.
607         (print_reg): Do not handle FPCR_REG.
609 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
611         PR target/87149
612         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
613         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
614         Delete, always treat as true.
615         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
616         Ditto.  Simplify remaining code.
617         * config/powerpcspe/powerpcspe.h: Ditto.
618         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
619         Simplify remaining code.
620         (rs6000_expand_builtin): Ditto.
621         * config/rs6000/rs6000.h: Ditto.
622         * configure.ac: Ditto.
623         * configure: Regenerate.
625 2018-09-27  Martin Liska  <mliska@suse.cz>
627         * coverage.c (get_coverage_counts): Revert the formatting
628         of missing profile opt info.
630 2018-09-27  Richard Biener  <rguenther@suse.de>
632         PR debug/37801
633         PR debug/87440
634         * dwarf2out.c (set_block_origin_self): Do not mark outermost
635         block as we do not output that.
636         (gen_inlined_subroutine_die): Elide the originally outermost
637         block, matching what we do for concrete instances.
638         (decls_for_scope): Add parameter specifying whether to recurse
639         to subblocks.
641 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
642             Tom de Vries  <tom@codesourcery.com>
644         PR 82089
646         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
647         STORE_FLAG_VALUE == 1.
649 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
651         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
652         constant definitions.
653         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
654         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
655         ("speculation_barrier"): New expander definition.
657 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
659         PR gcov-profile/86957
660         * common.opt: New warning option -Wmissing-profile.
661         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
662         * doc/invoke.texi: Document -Wmissing-profile.
664 2018-09-26  Jim Wilson  <jimw@sifive.com>
666         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
667         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
669 2018-09-26  Martin Sebor  <msebor@redhat.com>
671         * tree.c (zerop): Change return type to bool.
672         (integer_zerop, integer_onep, integer_each_onep): Same.
673         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
674         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
675         (real_onep, real_minus_onep, chain_index): Same.
676         (print_type_hash_statistics, type_list_equal): Same.
677         * tree.h (zerop): Same.
678         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
679         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
680         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
681         (real_onep, real_minus_onep, chain_index): Same.
682         (print_type_hash_statistics, type_list_equal): Same.
684 2018-09-26  Jim Wilson  <jimw@sifive.com>
686         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
688 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
690         PR target/87414
691         * config/i386/i386.c: Include debug.h and dwarf2out.h.
692         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
693         call.
695 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
697         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
699 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
701         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
702         and FP_SECOND_SSE_REGS.
703         (REG_CLASS_NAMES): Ditto.
704         (REG_CLASS_CONTENTS): Ditto.
705         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
706         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
707         (ix86_preferred_output_reload_class): Ditto.
708         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
709         clobber constraint to "=&f".
710         (fix_truncdi_i387): Ditto.
711         (lrintxfdi2): Ditto.
712         (fistdi2_<rounding>): Ditto.
713         (fpremxf4_i387): Change "=u" constraint to "=f".
714         (fprem1xf4_i387): Ditto.
715         (sincosxf3): Ditto.
716         (fptanxf4_i387): Ditto.
717         (fxtractxf3_i387): Ditto.
718         (fscalexf4_i387): Ditto.
719         (atan2xf3): Change "u" constraint to "f".
720         (fyl2xxf3_i387): Ditto.
721         (fyl2xp1xf3_i387): Ditto.
723 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
725         PR target/87439
726         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
727         for removed I387_MASK_PM entity.
730 2018-09-26  Jeff Law  <law@redhat.com>
731         Revert
732         2018-09-26  Alexey Neyman  <stilor@att.net>
734         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
735         headers are no longer pulled in by <isl/val.h>.
737 2018-09-26  Richard Biener  <rguenther@suse.de>
739         PR debug/87443
740         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
741         or concrete instance DIE to the tree.  Create abstract origin
742         attributes also for concrete instances.
744 2018-09-26  Alexey Neyman  <stilor@att.net>
746         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
747         headers are no longer pulled in by <isl/val.h>.
749 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
751         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
752         Use new helper functions.
753         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
754         Use new helper functions.
755         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
756         aarch_mm_needs_release): New declarations.
757         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
758         aarch_mm_needs_release): New.
760 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
762         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
763         (arm32_output_mi_thunk): Deal with long calls.
765 2018-09-26  Richard Biener  <rguenther@suse.de>
767         PR debug/87428
768         PR debug/87362
769         * tree-inline.c (expand_call_inline): When the location
770         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
771         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
772         the inserted BLOCK to make inlined_function_outer_scope_p
773         recognize it.
774         * dwarf2out.c (add_call_src_coords_attributes): Do not add
775         coords for reserved locations.
777 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
779         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
780         (*call_indirect_nonlocal_sysv<mode>): Ditto.
781         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
782         (*sibcall_nonlocal_sysv<mode>): Ditto.
783         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
784         (<bd>_<mode>): Ditto.
785         (<bd>tf_<mode>): Ditto.
787 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
789         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
790         control string as a list of templates instead of as C code.
791         (*altivec_movti): Ditto.
792         * config/rs6000/darwin.md (movdf_low_di): Ditto.
794 2018-09-25  Jim Wilson  <jimw@sifive.com>
796         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
797         when target symbol is weak.
799 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
801         PR c/87387
802         * builtins.c (unterminated_array): Simplify.
803         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
804         where pointer arithmetic is safe.
806 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
808         PR target/86987
809         * config/rs6000/altivec.md (altivec_vspltb): Use
810         const_0_to_15_operand instead of u5bit_cint_operand.
811         (*altivec_vspltb_internal): Ditto.
812         (altivec_vspltb_direct): Ditto.
813         (altivec_vsplth): Use const_0_to_7_operand instead of
814         u5bit_cint_operand.
815         (*altivec_vsplth_internal): Ditto.
816         (altivec_vsplth_direct): Ditto.
817         (altivec_vspltw): Use const_0_to_3_operand instead of
818         u5bit_cint_operand.
819         (*altivec_vspltw_internal): Ditto.
820         (altivec_vspltw_direct): Ditto.
821         (altivec_vspltsf): Ditto.
822         (*altivec_vspltsf_internal): Ditto.
823         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
824         various splats with the proper size immediate.  Reorder the various
825         cases by ascending size of immediate, and put all such together.
827 2018-09-25  Richard Biener  <rguenther@suse.de>
829         PR debug/83941
830         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
831         GC-ification.
832         (maybe_create_die_with_external_ref): Do not create
833         DW_TAG_imported_unit here.
834         (add_abstract_origin_attribute): Handle external BLOCK refs.
835         (dwarf2out_abstract_function): Simplify LTO case.
836         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
837         rather than using maybe_create_die_with_external_ref.
839 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
841         PR target/71278
842         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
843         (frndintxf2_mask_pm_i387): Ditto.
844         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
845         Enable for !flag_trapping_math.
846         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
847         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
848         Change operand 1 predicate to nonimmediate_operand.
849         (attr "i387_cw"): Remove mask_pm.
850         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
851         (enum ix86_entity): Remove I387_MASK_PM.
852         * config/i386/i386.c (ix86_i387_mode_needed): Do not
853         handle I387_MASK_PM.
854         (ix86_mode_needed): Ditto.
855         (ix86_mode_after): Ditto.
856         (ix86_mode_entry): Ditto.
857         (ix86_mode_exit): Ditto.
858         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
860 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
862         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
863         to_update_switch_stmts to vNULL instead of calling create on them
864         immediately.
866 2018-09-25  Richard Biener  <rguenther@suse.de>
868         PR tree-optimization/87402
869         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
870         (visit_phi): Re-instantiate handling of supposed to be VARYING
871         but non-VARYING backedge value.
873 2018-09-25  Richard Biener  <rguenther@suse.de>
875         PR debug/83941
876         * dwarf2out.c (struct sym_off_pair): New.
877         (external_die_map): New global.
878         (lookup_decl_die): When in LTO create DIEs lazily from the
879         external_die_map.
880         (lookup_block_die): New function, create DIEs lazily in LTO.
881         (equate_block_to_die): New function.
882         (dwarf2out_die_ref_for_decl): During WPA get the association
883         from the external DIE map.
884         (dwarf2out_register_external_die): Record mapping into the
885         external DIE map.
886         (maybe_create_die_with_external_ref): New function split out from
887         DIE generation part of old dwarf2out_register_external_die.
888         (add_abstract_origin_attribute): Do not return the DIE.  When
889         in LTO reference externals directly.
890         (dwarf2out_abstract_function): When in LTO ignore calls for
891         decls with external DIEs (already present abstract instances).
892         (gen_call_site_die): Adjust.
893         (add_high_low_attributes): Likewise.
894         (gen_lexical_block_die): Likewise.
895         (gen_inlined_subroutine_die): Likewie.
896         (gen_block_die): Likewise.
897         (dwarf2out_inline_entry): Likewise.
898         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
899         DIEs.
901 2018-09-25  Martin Liska  <mliska@suse.cz>
903         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
904         integers and not by a float value.
906 2018-09-25  Martin Liska  <mliska@suse.cz>
908         PR fortran/87394
909         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
910         instead of NULL.
911         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
912         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
913         * godump.c (go_format_type): Remove extra parenthesis.
915 2018-09-25  Martin Liska  <mliska@suse.cz>
917         * alias.c (set_dest_equal_p): Remove unused function.
918         * config/i386/i386.c (def_builtin_pure2): Likewise.
919         * diagnostic-show-locus.c (class layout): Remove
920         unused field.
921         (layout::layout): Likewise here.
922         * dump-context.h (class temp_dump_context): Likewise.
923         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
924         (add_AT_loclistsptr): Likewise.
925         (add_AT_offset): Likewise.
926         (get_AT_hi_pc): Likewise.
927         (is_comdat_die): Likewise.
928         (type_is_enum): Likewise.
929         (ceiling): Likewise.
930         (add_AT_vms_delta): Likewise.
931         (is_class_die): Likewise.
932         * edit-context.c (class line_event): Remove unused field.
933         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
934         unused function.
935         * ipa-cp.c (ipa_get_vr_lat): Likewise.
936         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
937         (ok_for_base_p_nonstrict): Likewise.
938         * tree-chrec.c (is_not_constant_evolution): Likewise.
939         (chrec_fold_poly_cst): Likewise.
940         * tree-if-conv.c (has_pred_critical_p): Likewise.
941         * tree-ssa-coalesce.c (print_exprs): Likewise.
942         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
943         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
944         * tree-vrp.c (value_ranges_intersect_p): Likewise.
945         (value_range_nonnegative_p): Likewise.
947 2018-09-25  Martin Liska  <mliska@suse.cz>
949         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
950         Do not handle "GNU Pascal".
951         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
952         Likewise.
953         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
954         from documentation. Likewise.
955         * dbxout.c (dbxout_range_type): Likewise.
956         * doc/cpp.texi: Likewise.
957         * doc/extend.texi: Likewise.
958         * doc/frontends.texi: Likewise.
959         * doc/invoke.texi: Remove Pascal entry.
960         * tree.def (CLEANUP_POINT_EXPR): Likewise.
961         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
963 2018-09-25  Martin Liska  <mliska@suse.cz>
965         PR middle-end/86078
966         * doc/invoke.texi: Document all parameters and remove default
967         of the parameters.
969 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
971         PR bootstrap/87417
972         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
973         contains HOST_WIDE_INTs when computing its size.
975 2018-09-24  Jim Wilson  <jimw@sifive.com>
977         PR target/87391
978         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
979         not TARGET_RVE.
980         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
982 2018-09-24  Andrew Pinski  <apinski@marvell.com>
984         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
985         access prev before checking it for NULLness in the
986         AARCH64_FUSE_CMP_BRANCH case.
988 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
990         PR target/82699
991         * config/i386/i386.c (rest_of_insert_endbranch): Set
992         endbr_queued_at_entrance to true and don't insert ENDBR if
993         x86_function_profiler will be called.
994         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
995         is true.
996         * config/i386/i386.h (machine_function): Add
997         endbr_queued_at_entrance.
999 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1001         * genattrtab.c (mk_attr_alt): Use alternative_mask.
1002         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1003         types.
1004         (check_attr_test): Use alternative_mask.
1005         (get_attr_value): Likewise.
1006         (compute_alternative_mask): Use alternative_mask and XWINT.
1007         (make_alternative_compare): Use alternative_mask.
1008         (attr_alt_subset_p): Use XWINT.
1009         (attr_alt_subset_of_compl_p): Likewise.
1010         (attr_alt_intersection): Use alternative_mask and XWINT.
1011         (attr_alt_union): Likewise.
1012         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1013         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1014         (simplify_test_exp): Use alternative_mask and XWINT.
1015         (write_test_expr): Use alternative_mask and XWINT, adjust bit
1016         number calculation to support 64 bits.  Generate code that
1017         checks 64-bit masks.
1018         (main): Use alternative_mask.
1019         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1021 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1023         PR target/80080
1024         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1025         RETURN+USE when returning via %r14.
1027 2018-09-24  Martin Liska  <mliska@suse.cz>
1029         * gcov.c (output_lines): Print colorization legend
1030         for both flag_use_colors and flag_use_hotness_colors.
1031         Reword the help.
1033 2018-09-24  Martin Liska  <mliska@suse.cz>
1035         * coverage.c (get_coverage_counts): Use warning_at
1036         with current_function_decl location. Use %qD in warning
1037         message.
1039 2018-09-24  Martin Liska  <mliska@suse.cz>
1041         * memory-block.h (memory_block_pool::release): Annotate with
1042         valgrind that the memory is not accessible.
1044 2018-09-24  Martin Liska  <mliska@suse.cz>
1046         PR sanitizer/85774
1047         * asan.c: Make asan_handled_variables extern.
1048         * asan.h: Likewise.
1049         * cfgexpand.c (expand_stack_vars): Make sure
1050         a representative is unpoison if another
1051         variable in the partition is handled by
1052         use-after-scope sanitization.
1054 2018-09-24  Richard Biener  <rguenther@suse.de>
1056         PR tree-optimization/63155
1057         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1058         the worklist when the edge of the respective argument isn't
1059         executable.
1061 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1063         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1064         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1065         (MASK_CLASS_P): Update for rename.
1066         (MAYBE_MASK_CLASS_P): Ditto.
1067         (REG_CLASS_NAMES): Update.
1068         (REG_CLASS_CONTENT): Update.
1069         * config/i386/i386.c (regclass_map): Update for MASK_REG
1070         and ALL_MASK_REGS rename.
1071         * config/i386/constraints.md (Yk): Update for rename.
1072         (k): Ditto.
1074 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1076         * config/i386/i386.h (enum reg_class): Remove
1077         EVEX_SSE_REGS and MOD4_SSE_REGS.
1078         (REG_CLASS_NAMES): Update.
1079         (REG_CLASS_CONTENT): Update.
1080         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1081         registers as ALL_SSE_REGS.
1082         (ix86_additional_allocno_class_p): Remove.
1083         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1084         (ix86_register_priority): Lower priority of EVEX SSE registers.
1085         Use IN_RANGE macro where appropriate.
1086         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1087         AVX-5124VNNIW checks.
1088         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1089         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1090         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1091         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1092         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1093         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1094         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1095         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1096         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1097         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1098         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1099         * config/i386/constraints.md (Yh): Remove.
1101 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1103         * config/i386/i386.c (regclass_map): Declare integer REX registers
1104         as GENERAL_REGS.
1106 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1108         * doc/service.texi (Service): Switch the fsf.org link to https.
1110 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1112         PR target/86798
1113         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1114         Define to speculation_safe_value_not_needed.
1116 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1118         PR middle-end/81035
1119         * doc/extend.texi (Common Function Attributes): Mention that
1120         noreturn suppresses tail call optimization.
1122 2018-09-21  Jeff Law  <law@redhat.com>
1124         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1125         vr_values::cleanup_edges_and_switches.
1126         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1127         vr_values class.
1128         (identify_jump_threads): Remove EDGE_IGNORE handling.
1129         (execute_vrp): Move handling of to_remove_edges and
1130         to_update_switch_stmts into vr_values class member functions.
1131         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1132         (to_update_switch_stmts): Likewise.
1133         * vr-values.c: Include cfghooks.h.
1134         (vr_values::vr_values): Initialize to_remove_edges and
1135         to_update_switch_stmts.
1136         (vr_values::~vr_values): Verify to_remove_edges and
1137         to_update_switch_stmts are empty.
1138         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1139         (vr_values::cleanup_edges_and_switches): New member function.
1140         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1141         function.  Add new data members.
1143 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
1145         PR tree-optimization/87309
1146         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1147         calls with pflags and alt_flags.
1148         (selftest::test_capture_of_dump_calls): Add test of interaction of
1149         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1151 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1153         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1155 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1157         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1159 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1161         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1162         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1163         (VXWORKS_LIBS_RTP): Minor reordering.
1165 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1167         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1168         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1170 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1172         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1173         (PTRDIFF_TYPE): Likewise.
1175 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1177         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1178         triplet, similar to support for VxWorks7.
1179         * config/vxworks-dummy.h: Provide a default definition
1180         of TARGET_VXWORKS64 to 0.
1182 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1184         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1185         * config/vxworks-dummy.h: here.
1187 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1189         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1191 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
1192             Bo Zhou  <zbo.zhou@hisilicon.com>
1194         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1195         * config/aarch64/aarch64-tune.md: Regenerated.
1196         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1197         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1198         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1200 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
1201             Julian Brown  <julian@codesourcery.com>
1203         * builtins.c (get_builtin_sync_mem): Handle address spaces.
1205 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1207         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1208         if the call takes a static chain.
1210 2018-09-21  Martin Liska  <mliska@suse.cz>
1212         * auto-profile.c (autofdo_source_profile::read): Do not
1213         set sum_all.
1214         (read_profile): Do not add working sets.
1215         (read_autofdo_file): Remove sum_all.
1216         (afdo_callsite_hot_enough_for_early_inline): Remove const
1217         qualifier.
1218         * coverage.c (struct counts_entry): Remove gcov_summary.
1219         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1220         do not support GCOV_TAG_PROGRAM_SUMMARY.
1221         (get_coverage_counts): Remove summary and expected
1222         arguments.
1223         * coverage.h (get_coverage_counts): Likewise.
1224         * doc/gcov-dump.texi: Remove -w option.
1225         * gcov-dump.c (dump_working_sets): Remove.
1226         (main): Do not support '-w' option.
1227         (print_usage): Likewise.
1228         (tag_summary): Likewise.
1229         * gcov-io.c (gcov_write_summary): Do not dump
1230         histogram.
1231         (gcov_read_summary): Likewise.
1232         (gcov_histo_index): Remove.
1233         (gcov_histogram_merge): Likewise.
1234         (compute_working_sets): Likewise.
1235         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1236         it not obsolete.
1237         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1238         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1239         (GCOV_HISTOGRAM_SIZE): Remove.
1240         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1241         (struct gcov_summary): Simplify rapidly just
1242         to runs and sum_max fields.
1243         (gcov_histo_index): Remove.
1244         (NUM_GCOV_WORKING_SETS): Likewise.
1245         (compute_working_sets): Likewise.
1246         * gcov-tool.c (print_overlap_usage_message): Remove
1247         trailing empty line.
1248         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1249         (output_lines): Remove program related line.
1250         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1251         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1252         histogram.
1253         (input_profile_summary): Do not read it.
1254         (merge_profile_summaries): And do not merge it.
1255         (input_symtab): Do not call removed function.
1256         * modulo-sched.c (sms_schedule): Do not print sum_max.
1257         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1258         removed when histogram method was invented.
1259         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1260         mode.
1261         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1262         GCOV coding style.
1263         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1264         and dump selected value.
1265         * profile.c (add_working_set): Remove.
1266         (get_working_sets): Likewise.
1267         (find_working_set): Likewise.
1268         (get_exec_counts): Do not work with working sets.
1269         (read_profile_edge_counts): Do not inform as sum_max is removed.
1270         (compute_branch_probabilities): Likewise.
1271         (compute_value_histograms): Remove argument for call of
1272         get_coverage_counts.
1273         * profile.h: Do not make gcov_summary const.
1275 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
1277         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1279 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1281         PR tree-optimization/86990
1282         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1283         Check that the entire merged store group is made of constants only for
1284         overlapping stores.
1286 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1288         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1289         (VTABLE_VERIFICATION_SPEC): Likewise.
1290         (SANITIZER_EARLY_SPEC): Likewise.
1291         (SANITIZER_SPEC): Likewise.
1292         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1293         * doc/invoke.texi (Link Options): Document -r.
1295 2018-09-20  Richard Biener <rguenther@suse.de>
1297         PR middle-end/87054
1298         * gimplify.c (gimplify_expr): Retain alignment of
1299         addressable lvalue in dereference.
1301 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
1303         PR bootstrap/87013
1304         * configure.ac: Check for .loc is_stmt support.
1305         * configure, config.in: Rebuilt.
1306         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1307         if not supported.
1309 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1311         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1312         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1313         -misel=no.
1315 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1317         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1318         VECTOR_OTHER.
1319         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1320         case VECTOR_OTHER.
1322 2018-09-20  Marek Polacek  <polacek@redhat.com>
1324         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1326 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1328         PR tree-optimization/87288
1329         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1330         into account when determining PEELING_FOR_NITERS.
1332 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1334         PR tree-optimization/86877
1335         * tree-vect-loop.c (vect_analyze_loop_2): Call
1336         vect_verify_datarefs_alignment.
1338 2018-09-19  Marek Polacek  <polacek@redhat.com>
1340         * doc/invoke.texi: Document -Wclass-conversion.
1342 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
1344         * config/pa/pa.c (pa_adjust_priority): Delete.
1345         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
1347         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
1348         (atomic_storehi): Likewise.
1349         (atomic_storesi): Likewise.
1350         (atomic_loaddi): Restore compare and swap exchange loop code.
1352 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
1354         PR rtl-optimization/86902
1355         * combine.c (try_combine): When changing the CC mode used, don't change
1356         an unrelated mode in other_insn to that new CC mode.
1358 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
1360         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
1361         with %T in place of calls to dump_generic_expr.
1362         (prune_runtime_alias_test_list): Likewise.
1363         (create_runtime_alias_checks): Likewise.
1364         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
1365         (vect_analyze_data_ref_dependence): Likewise.
1366         (vect_slp_analyze_data_ref_dependence): Likewise.
1367         (vect_record_base_alignment): Likewise.  Use %G in place of call
1368         to dump_gimple_stmt.
1369         (vect_compute_data_ref_alignment): Likewise.
1370         (verify_data_ref_alignment): Likewise.
1371         (vect_find_same_alignment_drs): Likewise.
1372         (vect_analyze_group_access_1): Likewise.
1373         (vect_analyze_data_ref_accesses): Likewise.
1374         (dependence_distance_ge_vf): Likewise.
1375         (dump_lower_bound): Likewise.
1376         (vect_prune_runtime_alias_test_list): Likewise.
1377         (vect_find_stmt_data_reference): Likewise.
1378         (vect_analyze_data_refs): Likewise.
1379         (vect_create_addr_base_for_vector_ref): Likewise.
1380         (vect_create_data_ref_ptr): Likewise.
1381         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
1382         (vect_can_advance_ivs_p): Likewise.
1383         (vect_update_ivs_after_vectorizer): Likewise.
1384         (vect_gen_prolog_loop_niters): Likewise.
1385         (vect_prepare_for_masked_peels): Likewise.
1386         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1387         (vect_determine_vectorization_factor): Likewise.
1388         (vect_is_simple_iv_evolution): Likewise.
1389         (vect_analyze_scalar_cycles_1): Likewise.
1390         (vect_analyze_loop_operations): Likewise.
1391         (report_vect_op): Likewise.
1392         (vect_is_slp_reduction): Likewise.
1393         (check_reduction_path): Likewise.
1394         (vect_is_simple_reduction): Likewise.
1395         (vect_create_epilog_for_reduction): Likewise.
1396         (vect_finalize_reduction:): Likewise.
1397         (vectorizable_induction): Likewise.
1398         (vect_transform_loop_stmt): Likewise.
1399         (vect_transform_loop): Likewise.
1400         (optimize_mask_stores): Likewise.
1401         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
1402         (vect_split_statement): Likewise.
1403         (vect_recog_over_widening_pattern): Likewise.
1404         (vect_recog_average_pattern): Likewise.
1405         (vect_determine_min_output_precision_1): Likewise.
1406         (vect_determine_precisions_from_range): Likewise.
1407         (vect_determine_precisions_from_users): Likewise.
1408         (vect_mark_pattern_stmts): Likewise.
1409         (vect_pattern_recog_1): Likewise.
1410         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1411         (vect_record_max_nunits): Likewise.
1412         (vect_build_slp_tree_1): Likewise.
1413         (vect_build_slp_tree_2): Likewise.
1414         (vect_print_slp_tree): Likewise.
1415         (vect_analyze_slp_instance): Likewise.
1416         (vect_detect_hybrid_slp_stmts): Likewise.
1417         (vect_detect_hybrid_slp_1): Likewise.
1418         (vect_slp_analyze_operations): Likewise.
1419         (vect_slp_analyze_bb_1): Likewise.
1420         (vect_transform_slp_perm_load): Likewise.
1421         (vect_schedule_slp_instance): Likewise.
1422         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1423         (vect_mark_stmts_to_be_vectorized): Likewise.
1424         (vect_init_vector_1): Likewise.
1425         (vect_get_vec_def_for_operand): Likewise.
1426         (vect_finish_stmt_generation_1): Likewise.
1427         (vect_check_load_store_mask): Likewise.
1428         (vectorizable_call): Likewise.
1429         (vectorizable_conversion): Likewise.
1430         (vectorizable_operation): Likewise.
1431         (vectorizable_load): Likewise.
1432         (vect_analyze_stmt): Likewise.
1433         (vect_is_simple_use): Likewise.
1434         (vect_get_vector_types_for_stmt): Likewise.
1435         (vect_get_mask_type_for_stmt): Likewise.
1436         * tree-vectorizer.c (increase_alignment): Likewise.
1438 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
1440         * doc/rtl.texi: Adjust vec_select description.
1441         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
1442         non-constant selectors.
1444 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
1446         * config/aarch64/aarch64-protos.h
1447         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
1448         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
1449         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
1450         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
1451         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
1452         (AARCH64_FL_PROFILE): Move index so flags are ordered.
1453         (AARCH64_ISA_RCPC8_4): New flag.
1454         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
1455         to aarch64_offset_9bit_signed_unscaled_p.
1456         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
1457         and use stlur.
1458         * config/aarch64/constraints.md (Ust): New constraint.
1459         * config/aarch64/predicates.md.
1460         (aarch64_9bit_offset_memory_operand): New predicate.
1461         (aarch64_rcpc_memory_operand): New predicate.
1463 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
1465         PR rtl-optimization/87361
1466         * rtlanal.c (nonzero_bits1): Revert accidental change.
1468 2018-09-19  Richard Biener  <rguenther@suse.de>
1470         PR tree-optimization/87349
1471         PR tree-optimization/87342
1472         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
1474 2018-09-18  Marek Polacek  <polacek@redhat.com>
1476         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
1477         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
1479 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
1481         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
1483 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
1485         PR rtl-optimization/86882
1486         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
1488 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
1490         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
1491         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
1493 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
1495         PR other/87353
1496         * doc/invoke.texi (Link Options): Fix formatting and grammar.
1498 2018-09-18  Richard Biener  <rguenther@suse.de>
1500         PR middle-end/63155
1501         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
1502         (compute_samebase_partition_bases): Likewise.
1503         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
1504         (gimple_can_coalesce_p): Simplify.
1506 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
1508         Handle a library implementation of ffs calling __builtin_ffs.
1509         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
1510         (mmix_init_libfuncs): New function: make __builtin_ffs expand
1511         to __ffsdi2.
1513 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
1515         * diagnostic-show-locus.c (class layout_range): Add field
1516         "m_original_idx".
1517         (layout_range::layout_range): Add "original_idx" param and use it
1518         to initialize new field.
1519         (make_range): Use 0 for original_idx.
1520         (layout::layout): Pass in index to calls to
1521         maybe_add_location_range.
1522         (layout::maybe_add_location_range): Add param "original_idx" and
1523         pass it on to layout_range.
1524         (layout::print_any_labels): Pass on range->m_original_idx to
1525         get_text call.
1526         (gcc_rich_location::add_location_if_nearby): Use 0 for
1527         original_idx.
1528         * gcc-rich-location.h (text_range_label::get_text): Update for new
1529         param.
1530         (range_label_for_type_mismatch::get_text): Likewise.
1532 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
1534         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
1536 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
1538         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
1539         format_string_diagnostic_t.
1540         (fmtwarn_n): Likewise.
1541         * substring-locations.c
1542         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
1543         (format_warning_n_va): Convert to...
1544         (format_string_diagnostic_t::emit_warning_n_va): ...this.
1545         (format_warning_va): Convert to...
1546         (format_string_diagnostic_t::emit_warning_va): ...this.
1547         (format_warning_at_substring): Convert to...
1548         (format_string_diagnostic_t::emit_warning): ...this.
1549         (format_warning_at_substring_n): Convert to...
1550         (format_string_diagnostic_t::emit_warning_n): ...this.
1551         * substring-locations.h (class format_string_diagnostic_t): New
1552         class.
1553         (format_warning_va): Convert to
1554         format_string_diagnostic_t::emit_warning_va.
1555         (format_warning_n_va): Convert to
1556         format_string_diagnostic_t::emit_warning_n_va.
1557         (format_warning_at_substring): Convert to
1558         format_string_diagnostic_t::emit_warning.
1559         (format_warning_at_substring_n): Convert to
1560         format_string_diagnostic_t::emit_warning_n.
1562 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
1563             Bernd Schmidt <bernds_cb1@t-online.de>
1565         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
1566         SImode args.
1568 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
1570         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
1571         operand 0 predicate to nonimmediate operand.
1572         (rint<mode>2_frndint): Remove insn pattern.
1573         (rint<mode>2): Change operand 1 predicate to general_operand.
1574         Extend operand 1 to XFmode and generate rintxf2 insn.
1575         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
1576         Do not use X87MODEF mode macro.
1577         (frndintxf2_<rounding>_i387): Rename from
1578         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
1579         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
1580         to XFmode and generate significandxf3 insn.
1582 2018-09-17  Richard Biener  <rguenther@suse.de>
1584         PR tree-optimization/87328
1585         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
1586         visiting unexecutable backedges when not iterating.
1587         (do_rpo_vn): Mark all edges not executable even when not
1588         iterating.
1590 2018-09-17  Martin Jambor  <mjambor@suse.cz>
1592         PR c/63886
1593         * doc/invoke.texi (Warning Options): Likewise.
1595 2018-09-17  Richard Biener  <rguenther@suse.de>
1597         PR tree-optimization/87301
1598         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
1599         clean EH info from leftover copy assignments.
1601 2018-09-17  Martin Liska  <mliska@suse.cz>
1603         PR gcov-profile/85871
1604         * gcov.c (output_intermediate_file): Fix out of bounds
1605         access.
1607 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
1609         * config/arc/arc.c: Object attributes for core4 not reflected
1610         correctly.
1611         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
1612         core3).
1614 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
1616         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
1618 2018-09-17  Martin Liska  <mliska@suse.cz>
1620         * doc/gcov.texi: Document new option --use-hotness-colors.
1621         * gcov.c (struct source_info): Declare new field.
1622         (source_info::source_info): Set default for maximum_count.
1623         (print_usage): Add new -q option.
1624         (process_args): Process it.
1625         (accumulate_line_info): Save src->maximum_count.
1626         (output_line_beginning): Make color line number if
1627         flag_use_hotness_colors is set.
1628         (output_line_details): Pass default argument value.
1629         (output_lines): Pass src->maximum_count.
1631 2018-09-17  Martin Liska  <mliska@suse.cz>
1633         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
1634         Use processor_names table.
1635         * config/i386/i386.c (ix86_default_align): Use
1636         processor_cost_table for alignment values.
1637         (ix86_option_override_internal): Use processor_names.
1638         (ix86_function_specific_print): Likewise.
1639         * config/i386/i386.h (struct processor_costs):
1640         Add alignment values.
1641         (struct ptt): Remove and replace with const char *.
1642         * config/i386/x86-tune-costs.h (struct processor_costs):
1643         Declare default alignments for all costs.
1645 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
1647         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
1648         symbolics or VR_VARYING ranges for ABS_EXPR.
1649         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
1650         when range will wrap.
1652 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
1654         PR middle-end/86864
1655         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
1656         before and after a JUMP_TABLE_DATA.
1658 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
1660         PR middle-end/87188
1661         * dojump.c (do_compare_and_jump): Canonicalize function pointers
1662         when one operand is a function pointer.  Use POINTER_TYPE_P and
1663         FUNC_OR_METHOD_TYPE_P.
1664         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
1665         * fold-const.c (build_range_check): Likewise.
1666         * match.pd (simple_comparison): Likewise.
1668 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
1670         PR c/82967
1671         * spellcheck.c (get_edit_distance_cutoff): New function.
1672         (selftest::test_edit_distance_unit_test_oneway): Rename to...
1673         (selftest::test_get_edit_distance_one_way): ...this.
1674         (selftest::test_get_edit_distance_unit): Rename to...
1675         (selftest::test_get_edit_distance_both_ways): ...this.
1676         (selftest::test_edit_distances): Move tests to this new function,
1677         and test some more pairs of strings.  Update for above renaming.
1678         (selftest::get_old_cutoff): New function.
1679         (selftest::test_get_edit_distance_cutoff): New function.
1680         (selftest::assert_suggested_for): New function.
1681         (ASSERT_SUGGESTED_FOR): New macro.
1682         (selftest::assert_not_suggested_for): New function.
1683         (ASSERT_NOT_SUGGESTED_FOR): New macro.
1684         (selftest::test_suggestions): New function.
1685         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
1686         tests to selftest::test_edit_distances and call it.  Add calls to
1687         selftest::test_get_edit_distance_cutoff and
1688         selftest::test_suggestions.
1689         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
1690         (best_match::consider): Replace hard-coded cutoff calculation with
1691         a call to...
1692         (best_match::get_cutoff): New declaration.
1693         (best_match::get_best_meaningful_candidate): Likewise.
1695 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1697         * builtins.c (fold_builtin_strlen): Remove TODO comment.
1699 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1701         revert:
1702         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1704         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1705         terminated string literal.
1707 2018-09-14  Martin Sebor  <msebor@redhat.com>
1709         * builtins.c (unterminated_array): Handle ARRAY_REF.
1710         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
1711         * builtins.h (unterminated_array): Declare extern.
1712         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
1713         arrays.
1714         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
1715         calls.
1717 2018-09-14  Martin Sebor  <msebor@redhat.com>
1718             Jeff Law  <law@redhat.com>
1720         * builtins.c (unterminated_array): New.
1721         (expand_builtin_strcpy): Adjust.
1722         (expand_builtin_strcpy_args): Detect unterminated arrays.
1723         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
1724         unterminated arrays.
1725         * gimple-fold.h (get_maxval_strlen): Add argument.
1726         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
1728         * gimple-fold.c (get_range_strlen): Add argument.
1729         (get_maxval_strlen): Adjust.
1730         * gimple-fold.h (get_range_strlen): Add argument.
1732 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
1734         * config/i386/movdirintrin.h: Fix copyright year.
1736 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
1738         * reg-stack.c: Include regs.h.
1739         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
1740         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
1741         FIRST_STACK_REG, not DFmode.
1742         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
1743         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
1744         (change stack): Default register mode to the reg_raw_mode of
1745         FIRST_STACK_REG, not DFmode.
1746         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
1747         (*swapxf): Rename from swapxf.
1749 2018-09-14  Carl Love  <cel@us.ibm.com>
1751         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
1752         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
1754 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
1756         PR target/87224
1757         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
1758         alternatives.
1760 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
1762         PR target/85628
1763         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
1765 2018-09-14  Jason Merrill  <jason@redhat.com>
1767         Fix --enable-gather-detailed-mem-stats.
1768         * hash-table.c (hash_table_usage): Change from variable to function.
1769         * hash-table.h: Adjust.
1770         * Makefile.in: Add missing dependencies on hash-table.h.
1772 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1774         PR tree-optimization/87259
1775         PR lto/87283
1776         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
1777         execute_cse_reciprocals_1 has tried transforming.
1779 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
1781         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
1782         VR_VARYING for PLUS/MINUS_EXPR.
1784 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1786         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
1787         formatting.
1789 2018-09-14  Richard Biener  <rguenther@suse.de>
1791         PR middle-end/63155
1792         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
1793         bits for the merged partition.
1795 2018-09-13  Martin Sebor  <msebor@redhat.com>
1796             Bernd Edlinger  <bernd.edlinger@hotmail.de>
1798         * builtins.h (c_srlen): Add argument.
1799         * builtins.c (warn_string_no_nul): New function.
1800         (c_strlen): Add argument and use it.  Update recursive calls.
1801         Pass DECL argument to string_constant to get info on non
1802         terminated strings.  Update *NONSTR as needed.
1803         (fold_builtin_strlen): Add argument to calls to c_strlen.
1804         Warn for unterminated arrays.
1805         (warn_string_no_null): Add prototype.
1806         * expr.c (string_constant): Update arguments.  Update recursive
1807         calls appropriately.  Detect missing NUL terminator and outermost
1808         declaration its missing in.
1809         Improve checks for arrays with nonzero lower bound or elements
1810         that are not a single byte.  Simplify offset computation.
1811         Simplify checks for non-NUL terminated strings.
1812         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
1813         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
1815 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1817         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
1818         correctly.
1819         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
1820         argument.  Fix range checks.
1821         * fold-const.h (c_getstr): Adjust protoype.
1822         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
1823         string is constant but contains no NUL byte.
1825         * expr.c (string_constant): Adjust function comment.
1826         Remove bogus check for zero termination.
1828         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
1830         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
1831         (get_constant_size): Don't make STRING_CSTs larger than they are.
1832         (check_string_literal): New check function for STRING_CSTs.
1833         (output_constant): Use it.
1835 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
1837         PR target/86812
1838         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
1840 2018-09-13  Richard Biener  <rguenther@suse.de>
1842         PR tree-optimization/87263
1843         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
1844         (struct unwind_state): Add max_rpo field.
1845         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
1846         Compute max_rpo, the max RPO number a block can be backwards reached
1847         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
1848         separating it from the iterating mode.
1850 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1852         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
1853         (rfs_decision): New scheduling decision.
1855 2018-09-13  Richard Biener  <rguenther@suse.de>
1857         PR bootstrap/87134
1858         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
1859         (vn_nary_op_insert_pieces_predicated): Do not write useless
1860         valid_dominated_by_p entry outside of the allocated storage.
1862 2018-09-13  Omar Sandoval  <osandov@osandov.com>
1863             Tom de Vries  <tdevries@suse.de>
1865         PR debug/86985
1866         * dwarf2out.c (is_c): New function.
1867         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
1869 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
1871         PR target/85628
1872         * config/aarch64/aarch64.md (*aarch64_bfxil):
1873         Define.
1874         * config/aarch64/constraints.md (Ulc): Define.
1875         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
1876         Define.
1877         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
1878         New function.
1880 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1882         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
1883         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
1884         aarch64_layout_frame call.
1885         (aarch64_expand_epilogue): Likewise.
1886         (aarch64_initial_elimination_offset): Likewise.
1887         (aarch64_get_separate_components): Likewise.
1888         (aarch64_use_return_insn_p): Likewise.
1889         (aarch64_layout_frame): Remove unneeded check.
1891 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1893         * configure.ac: Only append
1894         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
1895         gcc_config_arguments if it was never reconfigured or last reconfigure
1896         was with different arguments.
1897         * configure: Regenerated.
1899 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1900             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1902         PR middle-end/87290
1903         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
1904         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
1906 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1908         PR tree-optimization/87287
1909         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
1910         X % C == 0 to X % (unsigned) C == 0 optimization to ...
1911         * match.pd (X % C == 0): ... here.  New optimization.
1913 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1915         PR middle-end/82853
1916         * expr.h (maybe_optimize_mod_cmp): Declare.
1917         * expr.c (mod_inv): New function.
1918         (maybe_optimize_mod_cmp): New function.
1919         (do_store_flag): Use it.
1920         * cfgexpand.c (expand_gimple_cond): Likewise.
1922 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
1923             Julian Brown  <julian@codesourcery.com>
1925         PR middle-end/86336
1926         * gimplify.c (gimplify_scan_omp_clauses): Set
1927         target_firstprivatize_array_bases in OpenACC parallel and kernels
1928         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
1929         OpenACC data regions.
1931 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
1933         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
1934         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
1936 2018-09-12  Richard Biener  <rguenther@suse.de>
1938         PR tree-optimization/87280
1939         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
1940         edge but unreachable target.
1941         (do_rpo_vn): For conservatively handling a PHI only mark
1942         the backedge executable but not the block reachable.
1944 2018-09-12  Richard Biener  <rguenther@suse.de>
1946         PR tree-optimization/87266
1947         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
1948         visited blocks.
1950 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
1952         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
1953         constants.
1954         ("trunc<BFP:mode><DFP_ALL:mode>2")
1955         ("trunc<DFP_ALL:mode><BFP:mode>2")
1956         ("extend<BFP:mode><DFP_ALL:mode>2")
1957         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
1958         according to the target operand type.
1960 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1961             Andreas Krebbel  <krebbel@linux.ibm.com>
1963         PR tree-optimization/86844
1964         * gimple-ssa-store-merging.c
1965         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
1966         there are any overlapping stores in between them, make sure they are
1967         also coalesced or we give up completely.
1969 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1971         PR middle-end/87248
1972         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
1973         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
1975 2018-09-12  Tom de Vries  <tdevries@suse.de>
1977         * common.opt (gdescribe-dies): Add option.
1978         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
1979         attribute for artifical and nameless decls.
1980         (dwarf2out_register_external_die): Add description attribute to
1981         external reference die.
1982         (add_desc_attribute): New functions.
1983         (gen_subprogram_die): Add description attribute to
1984         DW_TAG_call_site_parameter.
1985         * tree-pretty-print.c (print_generic_expr_to_str): New function.
1986         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
1987         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
1988         -gno-describe-dies.
1989         (@item -gdescribe-dies): Add.
1991 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
1993         * tree-vrp.c (vrp_shift_undefined_p): Remove.
1994         (extract_range_from_binary_expr_1: Call
1995         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
1996         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1997         depend on sign.
1999 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
2001         * gimple-ssa-warn-alloca.c
2002         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2003         field for ALLOCA_BOUND_*_LARGE.
2005 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2007         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2009 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2011         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2012         for clobbers.  Remove obsolete comment.
2014 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2016         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2017         mpxchk, mpxld and mpxst types.
2018         (define_attr length_immediate): Remove all processing of mpx types.
2019         (define_attr prefix_0f): Ditto.
2020         (define_attr memory): Ditto.
2022 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
2024         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2025         (log<mode>2): Change operand 1 predicate to general_operand.
2026         Extend operand 1 to XFmode and generate logxf3 insn.
2027         (log10<mode>2): Change operand 1 predicate to general_operand.
2028         Extend operand 1 to XFmode and generate log10xf3 insn.
2029         (log2<mode>2): Change operand 1 predicate to general_operand.
2030         Extend operand 1 to XFmode and generate log2xf3 insn.
2031         (fyl2xp1_extend<mode>xf3_i387): Remove.
2032         (log1p<mode>2): Change operand 1 predicate to general_operand.
2033         Extend operand 1 to XFmode and generate log1pxf3 insn.
2034         (fxtract_extend<mode>xf3_i387): Remove.
2035         (logb<mode>2): Change operand 1 predicate to general_operand.
2036         Extend operand 1 to XFmode and generate logbxf3 insn.
2037         (ilogb<mode>2): Change operand 1 predicate to general_operand.
2038         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2039         (significand<mode>2): Change operand 1 predicate to general_operand.
2040         Extend operand 1 to XFmode and generate significandxf3 insn.
2042 2018-09-11  Nathan Sidwell  <nathan@acm.org>
2044         * gcc.c (perror_with_name, pfatal_with_name): Delete.
2045         (load_specs): Use fatal_error.
2046         (DELETE_IF_ORDINARY, process_command): Use error.
2047         (execute, run_attempt): Use fatal_error.
2049 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
2051         * diagnostic-core.h (sorry_at): New prototype.
2052         * diagnostic.c (sorry_at): New function.
2054 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
2056         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2057         by zero as VR_UNDEFINED.
2059 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2061         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2062         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2063         (<sincos>mode2): New expander.
2064         (sincos_extend<mode>xf3_i387): Remove insn pattern.
2065         (sincos -> sin, cos splitters): Remove splitter patterns.
2066         (sincos<mode>3): Change operand 2 predicate to general_operand.
2067         Extend operand 2 to XFmode and generate sincosxf3 insn.
2068         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2069         Change operand 3 predicate to const1_operand.
2070         (fptan_extend<mode>xf4_i387): Remove insn pattern.
2071         (tanxf2): Update operands in the call to fptanxf4_i387.
2072         (tan<mode>2): Change operand 1 predicate to general_operand.
2073         Extend operand 1 to XFmode and generate tanxf3 insn.
2074         (atan2xf3): Rename from *fpatanxf3_i387.
2075         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2076         (atan2xf3): Remove expander.
2077         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
2078         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2079         (atan<mode>2): Change operand 1 predicate to general_operand.
2080         Extend operand 1 to XFmode and generate atanxf3 insn.
2082 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
2084         * config/i386/i386.md (x87/SSE constant load splitter): Use
2085         memory_operand instead of nonimmediate_operand for input operand
2086         predicate.
2088 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
2090         * config/i386/i386.md (float partial SSE register stall splitter): Move
2091         splitter near its instruction pattern.
2092         (float_extend partial SSE register stall splitter): Ditto.
2093         (float_truncate partial SSE register stall splitter): Ditto.
2095 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
2097         PR target/86794
2098         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2099         to speculation_safe_value_not_needed.
2101         PR target/85666
2102         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2103         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2104         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2105         leaf_function_p, instead use has_hard_reg_initial_val.
2107 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2109         * gcc.h (pfatal_with_name): Don't declare here.
2110         * gcc.c (pfatal_with_name): Make static.
2112 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2114         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2115         earlyclobber.
2117 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2119         PR rtl-optimization/85458
2120         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2121         priority hook to reduce the priority of EXPR.
2123 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2125         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2126         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2127         with X87_ENABLE_FLOAT.  Remove preparation code.
2128         (*float<SWI48:mode><MODEF:mode>2): Rename from
2129         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2130         math using "enabled" attribute.
2131         (*floatdi<MODEF:mode>2_i387): Rename from
2132         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2133         enable for 32bit targets only.
2134         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2135         splitter.
2136         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2137         as operand 1 predicate.  Rewrite as define_insn_and_split.
2138         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2140 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2142         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2143         to fallthru to FLOAT case.
2145 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2147         PR target/86731
2148         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2149         around folding of vec_sl to handle out of range shift values.
2151 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2153         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2154         Update callers to gen_fix_trunc<mode>_i387_fisttp
2155         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2156         nonimmediate_operand.
2157         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2158         and corresponding splitters.
2159         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2160         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2161         (fix_truncdi_i387_with_temp): Remove insn pattern
2162         and corresponding splitters.
2163         (fix_trunc<mode>_i387): Change operand 0 predicate to
2164         nonimmediate_operand.
2165         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2166         and corresponding splitters.
2167         (*fistdi2_1): Remove.
2168         (fistdi2): Ditto.
2169         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2170         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
2171         (*fist<mode>2_1): Remove.
2172         (fist<mode>2): Ditto.
2173         (fist<mode>2_with_temp): Remove insn pattern and corresponding
2174         splitters.
2175         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
2176         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2177         (fistdi2_<rounding>): Change operand 0 predicate to
2178         nonimmediate_operand.
2179         (fistdi2_<rounding>_with_temp): Remove insn pattern
2180         and corresponding splitters.
2181         (fist<mode>2_<rounding>): Change operand 0 predicate to
2182         nonimmediate_operand.
2183         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2184         and corresponding splitters.
2186         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2188 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2190         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2191         the init value.
2193 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2195         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2196         early gimple folding of vec_splat().
2197         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2198         * gimple-fold.h: Add an extern define for tree_vec_extract().
2200 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2202         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2203         wrappers around TREE_TYPE comparisons.
2205 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2207         PR target/80080
2208         * config/s390/predicates.md: Add nonsym_memory_operand.
2209         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2210         contains a SYMBOL_REF, load it into an intermediate pseudo.
2211         (s390_emit_compare_and_swap): Legitimize operand.
2212         * config/s390/s390.md: Use the new nonsym_memory_operand
2213         with UNSPECV_CAS patterns.
2215 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2217         PR target/80080
2218         * config/s390/s390-passes.def: New file.
2219         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2220         declaration.
2221         (make_pass_s390_early_mach): Add declaration.
2222         * config/s390/s390.c (make_pass_s390_early_mach):
2223         (s390_option_override): Remove dynamic registration.
2224         * config/s390/t-s390: Add s390-passes.def.
2226 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2228         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2229         Remove UNSPEC_LTREL_BASE check.
2230         (annotate_constant_pool_refs): Likewise.
2231         (find_constant_pool_ref): Likewise.
2232         (find_ltrel_base): Removed.
2233         (replace_ltrel_base): Removed.
2234         (s390_mainpool_finish): Remove replace_ltrel_base call.
2235         (s390_chunkify_start): Remove pending LTREL_BASE logic.
2236         (s390_chunkify_finish): Remove replace_ltrel_base call.
2237         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2239 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
2241         PR target/86779
2242         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2243         to speculation_safe_value_not_needed.
2245 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
2246             Bernd Schmidt  <bernds_cb1@t-online.de>
2248         * config/nvptx/nvptx-opts.h: New file.
2249         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2250         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2251         (ASM_SPEC): Define.
2252         (TARGET_SM35): New macro.
2253         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2254         correct predicate.
2255         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2256         values.
2257         (misa=): New option.
2258         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2260 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
2262         * config/i386/i386.md (truncdfsf2): Remove expander.
2263         (truncdfsf2_with_temp): Ditto.
2264         (truncxf<mode>2): Ditto.
2265         (*truncdfsf_fast_mixed): Remove insn pattern.
2266         (*truncdfsf_fast_i387): Ditto.
2267         (*truncdfsf_mixed): Ditto.
2268         (*truncdfsf_i387): Ditto.
2269         (*truncdfsf2_i387_1): Ditto.
2270         (*truncxfsf2_mixed): Ditto.
2271         (*truncxfdf2_mixed): Ditto.
2272         (*truncxf<mode>2_i387_noop): Ditto. Update callers
2273         to call gen_truncxf<mode>2 instead.
2274         (*truncxf<mode>2_i387): Remove.
2275         (reg->reg splitters): Remove splitter pattern.
2276         (reg->mem splitters): Ditto.
2278         (truncdfsf2): New insn pattern.
2279         (truncxf<mode>2): Ditto.
2281 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2283         * tree-ssa-math-opts.c (is_mult_by): New function.
2284         (is_square_of): Use the above.
2285         (optimize_recip_sqrt): New function.
2286         (pass_cse_reciprocals::execute): Use the above.
2288 2018-09-05  Richard Biener  <rguenther@suse.de>
2290         PR bootstrap/87134
2291         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2292         to zero-init the emplaced vec.
2294 2018-09-05  Martin Liska  <mliska@suse.cz>
2296         PR tree-optimization/87205
2297         * tree-switch-conversion.c (pass_lower_switch::execute):
2298         Group cases for switch statements.
2300 2018-09-05  Richard Biener  <rguenther@suse.de>
2302         PR tree-optimization/87217
2303         * tree-ssa-sccvn.c (vuse_valueize): New.
2304         (vn_reference_lookup_pieces): Use it.
2305         (vn_reference_lookup): Likewise.
2307 2018-09-05  Nathan Sidwell  <nathan@acm.org>
2309         PR c++/87137
2310         * stor-layout.c (place_field): Scan forwards to check last
2311         bitfield when ms_bitfield_placement is in effect.
2313 2018-09-05  Richard Biener  <rguenther@suse.de>
2315         PR bootstrap/87225
2316         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2317         return.
2319 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2320             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2322         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2323         * config.gcc (extra_objs): Build it.
2324         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2325         Likewise.
2326         * config/aarch64/aarch64-passes.def
2327         (pass_tag_collision_avoidance): New pass.
2328         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2329         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2330         (aarch64_classify_address): Remove static qualifier.
2331         (aarch64_address_info, aarch64_address_type): Move to...
2332         * config/aarch64/aarch64-protos.h: ... here.
2333         (make_pass_tag_collision_avoidance): New function.
2334         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2335         New tuning flag.
2337 2018-09-05  Martin Liska  <mliska@suse.cz>
2339         * doc/gcov.texi: Update documentation of humar
2340         readable mode.
2341         * gcov.c (format_count): Print one decimal place, it provides
2342         more fine number of situations like '1G' vs. '1.4G'.
2344 2018-09-05  Martin Liska  <mliska@suse.cz>
2346         PR target/87164
2347         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
2348         * optc-gen.awk: Allow 'Var' for Deprecated options in order
2349         to generate a MASK value.
2351 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
2353         PR debug/86593
2354         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
2355         if frame pointer isn't used.
2356         (compute_frame_pointer_to_fb_displacement): Likewise.
2358 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
2360         PR target/87198
2361         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2362         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2363         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2364         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2365         and OPTION_MASK_ISA_XSAVEC_UNSET.
2367 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
2369         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2370         XOR operations in NAND case.
2372 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
2374         * wide-int-range.cc (wide_int_range_convert): New.
2375         * wide-int-range.h (wide_int_range_convert): New.
2376         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
2377         code into wide_int_range_convert.
2378         (extract_range_into_wide_ints): Do not munge anti range constants
2379         into the entire domain.  Just return the range back.
2381 2018-09-04  Martin Liska  <mliska@suse.cz>
2383         * genmatch.c (output_line_directive): Add new argument
2384         fnargs.
2385         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
2387 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
2389         * doc/invoke.texi (Option Summary): Add whitespace.
2391         * doc/invoke.texi (Option Summary): Add -Waligned-new.
2393 2018-09-04  Richard Biener  <rguenther@suse.de>
2395         PR tree-optimization/87211
2396         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
2397         backedge value we're supposed to treat as VARYING also number
2398         the PHI to VARYING in case it got a different value-number already.
2400 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
2402         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
2403         (extract_range_from_binary_expr_1): Do not call
2404         vrp_can_optimize_bit_op.
2405         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
2406         static.
2407         (wide_int_range_get_mask_and_bounds): New.
2408         (wide_int_range_optimize_bit_op): New.
2409         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
2410         (wide_int_range_bit_and): Same.
2411         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
2412         (wide_int_range_optimize_bit_op): New.
2413         (wide_int_range_get_mask_and_bounds): New.
2415 2018-09-04  Richard Biener  <rguenther@suse.de>
2417         PR tree-optimization/87176
2418         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
2419         variable.  When value-numbering a virtual PHI node make sure
2420         to not value-number to the backedge value.
2422 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
2424         * doc/extend.texi (Long Long, Hex Floats): Document support for
2425         long long and hex floats in more recent versions of ISO C++.
2427 2018-09-03  Richard Biener  <rguenther@suse.de>
2429         PR tree-optimization/87177
2430         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
2431         cleanup.
2433 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2435         * bb-reorder.c (edge_order): Convert to C-qsort-style
2436         tri-state comparator.
2437         (reorder_basic_blocks_simple): Change std::stable_sort to
2438         gcc_stablesort.
2440 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2442         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
2443         tri-state comparator.
2444         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
2446 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2448         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
2449         (mergesort): ... here as maximum count for using netsort.
2450         (gcc_qsort): Set nlim to 3 if stable sort is requested.
2451         (gcc_stablesort): New.
2452         * system.h (gcc_stablesort): Declare.
2454 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2456         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
2457         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
2458         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
2460 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
2462         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
2463         lxsdx and stxsdx alternatives.
2464         (*mov<mode>_hardfloat64): Ditto.
2465         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
2467 2018-09-03  Richard Biener  <rguenther@suse.de>
2469         PR tree-optimization/87200
2470         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
2471         simplify result.
2473 2018-09-03  Martin Liska  <mliska@suse.cz>
2475         PR tree-optimization/87201
2476         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2477         Fix parenthesis in an expression.
2479 2018-09-03  Richard Biener  <rguenther@suse.de>
2481         PR tree-optimization/87197
2482         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
2483         visited.  CSE the VN_INFO hashtable lookup.
2485         PR tree-optimization/87169
2486         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
2487         iterating make sure there's no extra backedges from irreducible
2488         regions feeding the header.  Mark the destination block
2489         executable.
2491 2018-09-03  Martin Liska  <mliska@suse.cz>
2493         PR driver/83193
2494         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
2495         * common/common-targhooks.c (default_get_valid_option_values):
2496         New function.
2497         * common/common-targhooks.h (default_get_valid_option_values):
2498         Likewise.
2499         * common/config/i386/i386-common.c: Move processor_target_table
2500         from i386.c.
2501         (ix86_get_valid_option_values): New function.
2502         (TARGET_GET_VALID_OPTION_VALUES): New macro.
2503         * config/i386/i386.c (struct ptt): Move to i386-common.c.
2504         (PTA_*): Move all defined masks into i386-common.c.
2505         (ix86_function_specific_restore): Use new processor_cost_table.
2506         * config/i386/i386.h (struct ptt): Moved from i386.c.
2507         (struct pta): Likewise.
2508         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
2509         * doc/tm.texi.in: Likewise.
2510         * opt-suggestions.c (option_proposer::suggest_option):
2511         Pass prefix to build_option_suggestions.
2512         (option_proposer::get_completions): Likewise.
2513         (option_proposer::build_option_suggestions): Use the new target
2514         hook.
2515         * opts.c (struct option_help_tuple): New struct.
2516         (print_filtered_help): Use the new target hook.
2518 2018-09-03  Martin Liska  <mliska@suse.cz>
2520         PR middle-end/59521
2521         * predict.c (set_even_probabilities): Add likely_edges
2522         argument and handle cases where we have precisely one
2523         likely edge.
2524         (combine_predictions_for_bb): Catch also likely_edges.
2525         (tree_predict_by_opcode): Handle gswitch statements.
2526         * tree-cfg.h (find_case_label_for_value): New declaration.
2527         (find_taken_edge_switch_expr): Likewise.
2528         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2529         Find pivot in decision tree based on probabily, not by number of
2530         nodes.
2532 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
2534         * doc/standards.texi (Standards): Update Objective-C reference.
2536 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2538         * doc/install.texi (Prerequisites): Update link for MPC.
2540 2018-09-01  Michael Matz  <matz@suse.de>
2542         PR tree-optimization/87074
2543         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
2544         PHIs for outer-loop uses.
2546 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2548         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
2549         * doc/invoke.texi (C Dialect Options): Ditto.
2551 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2553         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
2555 2018-08-31  Richard Biener  <rguenther@suse.de>
2557         PR tree-optimization/87168
2558         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
2559         (rpo_elim::eliminate_avail): When OP was not visited it must
2560         be available.
2562 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
2564         * tree-vrp.c (copy_value_range): Convert param "from" from
2565         "value_range *" to "const value_range *".
2566         (range_is_null): Likewise for param "vr".
2567         (range_int_cst_p): Likewise.
2568         (range_int_cst_singleton_p): Likewise.
2569         (symbolic_range_p): Likewise.
2570         (value_ranges_intersect_p): Likewise for both params.
2571         (value_range_nonnegative_p): Likewise for param "vr".
2572         (value_range_constant_singleton): Likewise.
2573         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
2574         (extract_range_into_wide_ints): Likewise for param "vr".
2575         (extract_range_from_multiplicative_op): Likewise for params "vr0"
2576         and "vr1".
2577         (vrp_can_optimize_bit_op): Likewise.
2578         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
2579         "vr1_".
2580         (extract_range_from_unary_expr): Likewise.
2581         (debug_value_range): Likewise for param "vr".
2582         (value_range::dump): Add "const" qualifier.
2583         (vrp_prop::check_array_ref): Convert local "vr" from
2584         "value_range *" to "const value_range *".
2585         (vrp_prop::check_mem_ref): Likewise.
2586         (vrp_prop::visit_stmt): Likewise for local "old_vr".
2587         (vrp_intersect_ranges_1): Likewise for param "vr_1".
2588         (vrp_intersect_ranges): Likewise.
2589         (simplify_stmt_for_jump_threading): Likewise for local "vr".
2590         (vrp_prop::vrp_finalize): Likewise.
2591         * tree-vrp.h (value_range::dump): Add "const" qualifier.
2592         (vrp_intersect_ranges): Add "const" qualifier to params as above.
2593         (extract_range_from_unary_expr): Likewise.
2594         (value_range_constant_singleton): Likewise.
2595         (symbolic_range_p): Likewise.
2596         (copy_value_range): Likewise.
2597         (extract_range_from_binary_expr_1): Likewise.
2598         (range_int_cst_p): Likewise.
2599         (vrp_set_zero_nonzero_bits): Likewise.
2600         (range_int_cst_singleton_p): Likewise.
2602 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
2604         * config/aarch64/arm_neon.h (vabsd_s64): New.
2605         (vnegd_s64): Likewise.
2607 2018-08-31  Martin Jambor  <mjambor@suse.cz>
2609         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
2611 2018-08-31  Martin Liska  <mliska@suse.cz>
2613         * ipa-icf.c (sem_item::add_type): Use
2614         sem_item::m_type_hash_cache.
2615         * ipa-icf.h: Move the cache from sem_item_optimizer
2616         to sem_item.
2618 2018-08-31  Nathan Sidwell  <nathan@acm.org>
2620         * doc/extend.texi (Backwards Compatibility): Remove implicit
2621         extern C leeway of () being (...).
2623 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2625         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
2627 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
2629         PR target/86684
2630         PR target/87149
2631         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
2633 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
2635         PR middle-end/87138
2636         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
2637         gen_int_mode.  Formatting fixes.
2639 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
2641         * target.def (custom_function_descriptors): Improve documentation.
2642         * doc/tm.texi.in (Trampolines): Expand discussion of function
2643         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
2644         beginning of the section.
2645         * doc/tm.texi: Regenerated.
2647 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
2649         * cfg.h (class auto_edge_flag): Spell out the template-id of the
2650         base class in the initializer list.  This is a workaround for
2651         building with older GCC.
2652         (class auto_bb_flag): Likewise.
2654 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2656         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
2657         (altivec_vcmpequ<VI_char>_p): Remove star.
2658         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
2659         vector load modes.
2660         (expand_strncmp_vec_sequence): New function.
2661         (emit_final_str_compare_vec): New function.
2662         (expand_strn_compare): Add support for vector strncmp.
2663         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
2664         length specification to bytes.
2665         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
2666         (vcmpnezb_p): New pattern.
2667         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
2668         for option -mstring-compare-inline-limit.
2670 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
2672         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
2673         (PTA_SKYLAKE): Add PTA_AES.
2674         (PTA_GOLDMONT): Likewise.
2676 2018-08-29  Jan Hubicka  <jh@suse.cz>
2678         PR lto/86517
2679         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
2680         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2682 2018-08-29  Jan Hubicka  <jh@suse.cz>
2684         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
2685         TYPE_STUB_DECL.
2686         (hash_tree): Do not visit TYPE_STUB_DECL.
2687         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
2688         stream TYPE_STUB_DECL.
2689         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
2690         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
2691         after free_lang_data.
2692         (type_in_anonymous_namespace_p): Likewise.
2694 2018-08-29  Jan Hubicka  <jh@suse.cz>
2696         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2697         comment that it has to be even number.
2698         (class sreal): Change m_sig type to int32_t.
2699         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2700         int64_t for temporary calculations.
2701         (sreal_verify_basics): Drop one bit from minimum and maximum.
2703 2018-08-30  Richard Biener  <rguenther@suse.de>
2705         PR tree-optimization/87147
2706         * tree-ssa-sccvn.c (SSA_VISITED): New function.
2707         (visit_phi): When the degenerate result is from the backedge and
2708         we didn't visit its definition yet drop to VARYING.
2709         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
2711 2018-08-29  Jan Hubicka  <jh@suse.cz>
2713         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
2714         DECL_VINDEX.
2715         (hash_tree): Likewise.
2717 2018-08-29  Jan Hubicka  <jh@suse.cz>
2719         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
2720         and TYPE_NEXT_REF_TO.
2722 2018-08-29  Jan Hubicka  <jh@suse.cz>
2724         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2725         comment that it has to be even number.
2726         (class sreal): Change m_sig type to int32_t.
2727         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2728         int64_t for temporary calculations.
2729         (sreal_verify_basics): Drop one bit from minimum and maximum.
2731 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
2733         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
2735 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
2737         PR middle-end/86995
2738         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
2739         if to_add is negative.
2741 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2743         PR middle-end/87053
2744         * builtins.c (c_strlen): Improve range checks.
2746 2018-08-29  Martin Sebor  <msebor@redhat.com>
2747             Jeff Law  <law@redhat.com>
2749         PR tree-optimization/86714
2750         PR tree-optimization/86711
2751         * builtins.c (c_strlen): Add arguments to call to string_constant.
2752         * expr.c (string_constant): Add argument.  Detect missing nul
2753         terminator and outermost declaration it's missing in.
2754         * expr.h (string_constant): Add argument.
2755         * fold-const.c (read_from_constant_string): Add arguments to call to
2756         string_constant.
2757         (c_getstr): Likewise.
2758         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2759         to string_constant.
2760         * tree-ssa-strlen.c (get_stridx): Likewise.
2762 2018-08-29  Jan Hubicka  <jh@suse.cz>
2764         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
2765         Do not stream DECL_VINDEX.
2766         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
2767         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
2768         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
2770 2018-08-29  Richard Biener  <rguenther@suse.de>
2772         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
2773         virtual operands that are not default defs to honor region
2774         boundaries.
2775         (rpo_vn_valueize): Remove ineffective code here.
2777 2018-08-29  Richard Biener  <rguenther@suse.de>
2779         PR tree-optimization/87132
2780         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
2781         when skipping defs reachable over backedges.
2783 2018-08-29  Richard Biener  <rguenther@suse.de>
2785         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
2786         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
2787         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
2788         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
2789         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
2790         (vn_reference_lookup_3): Remove use of const_parms.
2791         (free_rpo_vn): Do not free const_parms.
2792         (do_rpo_vn): Do not call init_const_parms.
2793         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
2794         SSA_NAME_POINTS_TO_READONLY_MEMORY.
2795         (call_may_clobber_ref_p_1): Likewise.
2797 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
2799         PR other/86726
2800         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
2801         (-O): Ditto.
2802         (-ftree-scev-cprop): Document.
2804 2018-08-29  Jan Hubicka  <jh@suse.cz>
2806         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
2807         parameters.
2808         (sreal constructor): Update.
2809         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
2810         sreal:operator/): Update.
2812 2018-08-29  Martin Liska  <mliska@suse.cz>
2814         * tree-switch-conversion.c (switch_conversion::expand):
2815         Strenghten assumption about gswitch statements.
2817 2018-08-29  Richard Biener  <rguenther@suse.de>
2819         PR tree-optimization/87117
2820         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
2821         re-value-number released SSA VDEFs.
2823 2018-08-29  Richard Biener  <rguenther@suse.de>
2825         PR tree-optimization/87126
2826         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
2828 2018-08-28  Jim Wilson  <jimw@sifive.com>
2830         * config/riscv/pic.md: Rewrite.
2831         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
2832         invalid address.
2833         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
2834         (SOFTF, default_load, softload, softstore): New.
2836 2018-08-28  Jeff Law  <law@redhat.com>
2838         * fold-const.c (fold_binary_loc): Remove recently added assert.
2840 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2842         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
2843         to OP parmeter of generated function.
2845 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
2847         PR tree-optimization/87009
2848         * match.pd: Add boolean optimizations.
2850 2018-08-28  Martin Sebor  <msebor@redhat.com>
2852         PR middle-end/86631
2853         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
2854         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
2855         (pass_walloca::gate): Use it.
2856         (alloca_call_type): Same.
2857         (pass_walloca::execute): Same.
2858         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
2860 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
2862         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
2863         GCC_VERSION for usage of "__gcc_dump_printf__" format from
2864         >= 3005 to >= 9000.
2866 2018-08-28  Richard Biener  <rguenther@suse.de>
2868         PR tree-optimization/87124
2869         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
2870         constants before looking up avail.
2872 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
2874         PR middle-end/87099
2875         * calls.c (maybe_warn_nonstring_arg): Punt early if
2876         warn_stringop_overflow is zero.  Don't call get_range_strlen
2877         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
2878         Swap comparison operands to have constants on rhs.  Only use
2879         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
2880         increment lenrng[0].
2882 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
2884         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
2885         use of tree_to_shwi.  Remove duplicated test for the size being
2886         a whole number of bytes.
2888 2018-08-28  Richard Biener  <rguenther@suse.de>
2890         PR tree-optimization/87117
2891         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
2892         Handle removed stmt without LHS (GIMPLE_NOP).
2894 2018-08-28  Richard Biener  <rguenther@suse.de>
2896         PR tree-optimization/87117
2897         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
2898         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
2900 2018-08-28  Richard Biener  <rguenther@suse.de>
2902         PR tree-optimization/87117
2903         * tree-ssa-pre.c (compute_avail): Do not make expressions
2904         with predicated values available.
2905         (get_expr_value_id): Assert we do not run into predicated value
2906         expressions.
2908 2018-08-28  Richard Biener  <rguenther@suse.de>
2910         PR tree-optimization/87117
2911         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
2912         get virtual operands.
2913         (get_expr_operands): Handle STRING_CST like other decls.
2915 2018-08-28  Martin Liska  <mliska@suse.cz>
2917         * tree.h: Update documentation of fndecl_built_in_p
2918         functions.
2921 2018-08-27  Jeff Law  <law@redhat.com>
2922         PR tree-optimization/87110
2923         * tree-ssa-dse.c (compute_trims): Handle non-constant
2924         TYPE_SIZE_UNIT.
2926 2018-08-27  Martin Sebor  <msebor@redhat.com>
2928         PR tree-optimization/86914
2929         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
2931 2018-08-27  Martin Sebor  <msebor@redhat.com>
2933         PR tree-optimization/87112
2934         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
2935         the type of the bound argument.
2937 2018-08-27  Jeff Law  <law@redhat.com>
2939         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
2940         type does not have a TYPE_SIZE_UNIT.
2942 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
2944         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
2945         with include of backend.h.
2947 2018-08-27  Richard Biener  <rguenther@suse.de>
2949         PR tree-optimization/86927
2950         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
2951         use const cond reduction code.
2953 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
2955         PR tree-optimization/85758
2956         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
2958 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2960         PR c++/87091
2961         * diagnostic-show-locus.c (class layout_range): Update for
2962         conversion of show_caret_p to a tri-state.
2963         (layout_range::layout_range): Likewise.
2964         (make_range): Likewise.
2965         (layout::maybe_add_location_range): Likewise.
2966         (layout::should_print_annotation_line_p): Don't show annotation
2967         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
2968         (layout::get_state_at_point): Update for conversion of
2969         show_caret_p to a tri-state.  Bail out early for
2970         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
2971         underlining or source colorization.
2972         (gcc_rich_location::add_location_if_nearby): Update for conversion
2973         of show_caret_p to a tri-state.
2974         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
2975         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
2976         Likewise.
2977         (selftest::test_one_liner_labels): Likewise.
2978         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
2979         conversion of show_caret_p to a tri-state.
2980         * pretty-print.c (text_info::set_location): Likewise.
2981         * pretty-print.h (text_info::set_location): Likewise.
2982         * substring-locations.c (format_warning_n_va): Likewise.
2983         * tree-diagnostic.c (default_tree_printer): Likewise.
2984         * tree-pretty-print.c (newline_and_indent): Likewise.
2986 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2988         PR c++/87091
2989         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
2990         line above for line-insertion fix-it hints.
2991         (selftest::test_fixit_insert_containing_newline): Update the
2992         expected results, and add a test with line-numbering enabled.
2994 2018-08-27  Martin Liska  <mliska@suse.cz>
2996         PR sanitizer/86962
2997         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2998         params with DECL_HAS_VALUE_EXPR_P.
3000 2018-08-27  Martin Liska  <mliska@suse.cz>
3002         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3003         selected expansion strategy.
3005 2018-08-27  Martin Liska  <mliska@suse.cz>
3007         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3008         * builtins.c (is_builtin_fn): Likewise.
3009         * attribs.c (diag_attr_exclusions): Use new function
3010         fndecl_built_in_p and remove check for FUNCTION_DECL if
3011         possible.
3012         (builtin_mathfn_code): Likewise.
3013         (fold_builtin_expect): Likewise.
3014         (fold_call_expr): Likewise.
3015         (fold_builtin_call_array): Likewise.
3016         (fold_call_stmt): Likewise.
3017         (set_builtin_user_assembler_name): Likewise.
3018         (is_simple_builtin): Likewise.
3019         * calls.c (gimple_alloca_call_p): Likewise.
3020         (maybe_warn_nonstring_arg): Likewise.
3021         * cfgexpand.c (expand_call_stmt): Likewise.
3022         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3023         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3024         (cgraph_node::verify_node): Likewise.
3025         * cgraphclones.c (build_function_decl_skip_args): Likewise.
3026         (cgraph_node::create_clone): Likewise.
3027         * config/arm/arm.c (arm_insert_attributes): Likewise.
3028         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3029         * dse.c (scan_insn): Likewise.
3030         * expr.c (expand_expr_real_1): Likewise.
3031         * fold-const.c (operand_equal_p): Likewise.
3032         (fold_binary_loc): Likewise.
3033         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3034         * gimple-low.c (lower_stmt): Likewise.
3035         * gimple-pretty-print.c (dump_gimple_call): Likewise.
3036         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3037         Likewise.
3038         * gimple.c (gimple_build_call_from_tree): Likewise.
3039         (gimple_call_builtin_p): Likewise.
3040         (gimple_call_combined_fn): Likewise.
3041         * gimplify.c (gimplify_call_expr): Likewise.
3042         (gimple_boolify): Likewise.
3043         (gimplify_modify_expr): Likewise.
3044         (gimplify_addr_expr): Likewise.
3045         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3046         * ipa-cp.c (determine_versionability): Likewise.
3047         * ipa-fnsummary.c (compute_fn_summary): Likewise.
3048         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3049         * ipa-split.c (visit_bb): Likewise.
3050         (split_function): Likewise.
3051         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3052         * lto-cgraph.c (input_node): Likewise.
3053         * lto-streamer-out.c (write_symbol): Likewise.
3054         * omp-low.c (setjmp_or_longjmp_p): Likewise.
3055         (lower_omp_1): Likewise.
3056         * predict.c (strip_predict_hints): Likewise.
3057         * print-tree.c (print_node): Likewise.
3058         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3059         * trans-mem.c (is_tm_irrevocable): Likewise.
3060         (is_tm_load): Likewise.
3061         (is_tm_simple_load): Likewise.
3062         (is_tm_store): Likewise.
3063         (is_tm_simple_store): Likewise.
3064         (is_tm_abort): Likewise.
3065         (tm_region_init_1): Likewise.
3066         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3067         * tree-cfg.c (verify_gimple_call): Likewise.
3068         (move_stmt_r): Likewise.
3069         (stmt_can_terminate_bb_p): Likewise.
3070         * tree-eh.c (lower_eh_constructs_2): Likewise.
3071         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3072         * tree-inline.c (remap_gimple_stmt): Likewise.
3073         (copy_bb): Likewise.
3074         (estimate_num_insns): Likewise.
3075         (fold_marked_statements): Likewise.
3076         * tree-sra.c (scan_function): Likewise.
3077         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3078         (optimize_stack_restore): Likewise.
3079         (pass_fold_builtins::execute): Likewise.
3080         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3081         (mark_all_reaching_defs_necessary_1): Likewise.
3082         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3083         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3084         (pass_forwprop::execute): Likewise.
3085         * tree-ssa-loop-im.c (stmt_cost): Likewise.
3086         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3087         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3088         * tree-ssa-strlen.c (get_string_length): Likewise.
3089         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3090         (find_func_aliases_for_call): Likewise.
3091         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3092         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3093         * tree-tailcall.c (find_tail_calls): Likewise.
3094         * tree.c (need_assembler_name_p): Likewise.
3095         (free_lang_data_in_decl): Likewise.
3096         (get_call_combined_fn): Likewise.
3097         * ubsan.c (is_ubsan_builtin_p): Likewise.
3098         * varasm.c (incorporeal_function_p): Likewise.
3099         * tree.h (DECL_BUILT_IN): Remove and replace with
3100         fndecl_built_in_p.
3101         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3102         (fndecl_built_in_p): New.
3104 2018-08-27  Martin Liska  <mliska@suse.cz>
3106         PR tree-optimization/86847
3107         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3108         Dump also subtree probability.
3109         (switch_decision_tree::do_jump_if_equal): New function.
3110         (switch_decision_tree::emit_case_nodes): Handle special
3111         situations in balanced tree that can be emitted much simpler.
3112         Fix calculation of probabilities that happen in tree expansion.
3113         * tree-switch-conversion.h (struct cluster): Add
3114         is_single_value_p.
3115         (struct simple_cluster): Likewise.
3116         (struct case_tree_node): Add new function has_child.
3117         (do_jump_if_equal): New.
3119 2018-08-27  Martin Liska  <mliska@suse.cz>
3121         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3122         Add new argument to bit_test_cluster constructor.
3123         (bit_test_cluster::emit): Set bits really number of values
3124         handlel by a test.
3125         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3126         probability argument.
3127         * tree-switch-conversion.h (struct bit_test_cluster):
3128         Add m_handles_entire_switch.
3130 2018-08-27  Martin Liska  <mliska@suse.cz>
3132         PR tree-optimization/86702
3133         * tree-switch-conversion.c (jump_table_cluster::emit):
3134         Make probabilities even for values in jump table
3135         according to number of cases handled.
3136         (switch_decision_tree::compute_cases_per_edge): Pass
3137         argument to reset_out_edges_aux function.
3138         (switch_decision_tree::analyze_switch_statement): Likewise.
3139         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3140         Make it static.
3142 2018-08-27  Martin Liska  <mliska@suse.cz>
3144         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3145         cfun argument explicitly.
3146         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3147         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3148         function gimple_switch_default_bb.
3149         (convert_switch_statements):
3150         (expand_builtins):
3151         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3152         * stmt.c (label_to_block_fn): Use label_to_block and pass
3153         cfun argument explicitly and use gimple_switch_label_bb.
3154         (expand_case): Likewise.
3155         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3156         cfun argument explicitly. Likewise.
3157         (make_edges_bb): Likewise.
3158         (make_cond_expr_edges): Likewise.
3159         (get_cases_for_edge): Likewise.
3160         (make_gimple_switch_edges): Likewise.
3161         (label_to_block_fn): Likewise.
3162         (label_to_block): Likewise.
3163         (make_goto_expr_edges): Likewise.
3164         (make_gimple_asm_edges): Likewise.
3165         (main_block_label): Likewise.
3166         (group_case_labels_stmt): Likewise.
3167         (find_taken_edge_computed_goto): Likewise.
3168         (find_taken_edge_switch_expr): Likewise.
3169         (gimple_verify_flow_info): Likewise.
3170         (gimple_redirect_edge_and_branch): Likewise.
3171         (gimple_switch_label_bb): New function.
3172         (gimple_switch_default_bb): Likewise.
3173         (gimple_switch_edge): Likewise.
3174         (gimple_switch_default_edge): Likewise.
3175         * tree-cfg.h (label_to_block_fn): Remove and replace ...
3176         (label_to_block): ... with this.
3177         (gimple_switch_label_bb): New.
3178         (gimple_switch_default_bb): Likewise.
3179         (gimple_switch_edge): Likewise.
3180         (gimple_switch_default_edge): Likewise.
3181         * tree-cfgcleanup.c (convert_single_case_switch): Use
3182         new gimple functions and pass new argument to label_to_block.
3183         (cleanup_control_flow_bb):
3184         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3185         cfun argument explicitly.
3186         (make_eh_edges): Likewise.
3187         (redirect_eh_dispatch_edge): Likewise.
3188         (lower_resx): Likewise.
3189         (lower_eh_dispatch): Likewise.
3190         (maybe_remove_unreachable_handlers): Likewise.
3191         (unsplit_eh): Likewise.
3192         (cleanup_empty_eh): Likewise.
3193         (verify_eh_edges): Likewise.
3194         (verify_eh_dispatch_edge): Likewise.
3195         * tree-ssa-dom.c (record_edge_info): Likewise.
3196         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3197         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3198         (thread_through_normal_block): Likewise.
3199         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3200         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3201         * tree-switch-conversion.c (switch_conversion::collect): Use new
3202         gimple functions.
3203         (switch_conversion::check_final_bb): Likewise.
3204         (switch_conversion::gather_default_values): Pass new argument
3205         to label_to_block.
3206         (switch_conversion::build_constructors): Likewise.
3207         (switch_decision_tree::compute_cases_per_edge): Use new
3208         gimple_switch_edge function.
3209         (switch_decision_tree::analyze_switch_statement): Pass new argument
3210         to label_to_block.
3211         (switch_decision_tree::try_switch_expansion): Use
3212         gimple_switch_default_edge.
3213         * tree-vrp.c (find_switch_asserts): Pass new argument
3214         to label_to_block.
3215         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3216         (vr_values::simplify_switch_using_ranges): Likewise.
3218 2018-08-27  Richard Biener  <rguenther@suse.de>
3220         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3221         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3223         * tree-ssa-sccvn.h (struct vn_pval): New structure.
3224         (struct vn_nary_op_s): Add unwind_to member.  Add
3225         predicated_values flag and put result into a union together
3226         with a linked list of vn_pval.
3227         (struct vn_ssa_aux): Add name member to make maintaining
3228         a map of SSA name to vn_ssa_aux possible.  Remove no longer
3229         needed info, dfsnum, low, visited, on_sccstack, use_processed
3230         and range_info_anti_range_p members.
3231         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3232         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3233         New functions.
3234         (vn_valueize): New global.
3235         (vn_context_bb): Likewise.
3236         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3237         VN_INFO_PTR_INFO): Remove.
3238         * tree-ssa-sccvn.c: ... (rewrite)
3239         (pass_fre::execute): For -O2+ initialize loops and run
3240         RPO VN in optimistic mode (iterating).  For -O1 and -Og
3241         run RPO VN in non-optimistic mode.
3242         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3243         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3244         * doc/invoke.texi (sccvn-max-scc-size): Remove.
3245         (rpo-vn-max-loop-depth): Document.
3246         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3247         when valuezing the VUSE signals we walked out of the region.
3248         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3249         (phi_translate): Set VN context block to use for availability
3250         lookup.
3251         (compute_avail): Likewise.
3252         (pre_valueize): New function.
3253         (pass_pre::execute): Adjust to the RPO VN API.
3255         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3256         (propagate_constants_for_unrolling): Remove.
3257         (tree_unroll_loops_completely): Perform value-numbering
3258         on the unrolled bodies loop parent.
3260 2018-08-27  Richard Biener  <rguenther@suse.de>
3262         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3263         for partial antic compute.
3265 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
3267         PR rtl-optimization/87065
3268         * combine.c (simplify_if_then_else): Formatting fix.
3269         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3270         check.
3271         (known_cond): Don't return const_true_rtx for vector modes.  Use
3272         CONST0_RTX instead of const0_rtx.  Formatting fixes.
3274 2018-08-27  Martin Liska  <mliska@suse.cz>
3276         PR gcov-profile/87069
3277         * gcov.c (process_file): Record files already processed
3278         and warn about a file being processed multiple times.
3280 2018-08-27  Martin Liska  <mliska@suse.cz>
3282         PR driver/83193
3283         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3284         Set default values for x_aarch64_*_string strings.
3285         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3286         prefix.  For -mabi do not print '=ABI' in help and use
3287         <option_value> format for -msve-vector-bits and -moverride
3288         options.
3290 2018-08-26  Jeff Law  <law@redhat.com>
3292         * config/mips/frame-header-opt.c: Include "backend.h" rather than
3293         "cfg.h"
3295 2018-08-26  Marek Polacek  <polacek@redhat.com>
3297         PR c++/87029, Implement -Wredundant-move.
3298         * doc/invoke.texi: Document -Wredundant-move.
3300 2018-08-25  Martin Sebor  <msebor@redhat.com>
3302         PR tree-optimization/87059
3303         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3304         to the same type as the other.
3305         * fold-const.c (fold_binary_loc): Assert expectation.
3307 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
3309         * config/darwin.c (machopic_legitimize_pic_address): Clean up
3310         extraneous parentheses, dead code section and formatting.
3312 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
3314         PR c++/87091
3315         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3316         wide enough for jumps in the line-numbering to be visible.
3317         (layout::print_gap_in_line_numbering): New member function.
3318         (layout::calculate_line_spans): When using line numbering, merge
3319         line spans that are only 1 line apart.
3320         (diagnostic_show_locus): When printing line numbers, show gaps in
3321         line numbering directly, rather than printing headers.
3322         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3323         line-numbering with multiple line spans.
3324         (selftest::test_fixit_insert_containing_newline_2): Add test of
3325         line-numbering, in which the spans are close enough to be merged.
3327 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3329         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3330         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
3331         * tree-vrp.c (range_is_nonnull): Remove.
3332         (range_includes_zero_p): Accept value_range instead of min/max.
3333         (extract_range_from_binary_expr_1): Do not early bail on
3334         POINTER_PLUS_EXPR.
3335         Use range_includes_zero_p instead of range_is_nonnull.
3336         (extract_range_from_unary_expr): Use range_includes_zero_p instead
3337         of range_is_nonnull.
3338         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
3339         special case VR_ANTI_RANGE.
3340         (vrp_finalize): Same.
3341         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
3342         instead of min/max.
3343         (range_is_nonnull): Remove.
3344         * vr-values.c (vrp_stmt_computes_nonzero): Use
3345         range_includes_zero_p instead of range_is_nonnull.
3346         (extract_range_basic): Pass value_range to range_includes_zero_p
3347         instead of range_is_nonnull.
3349 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
3351         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
3352         * emit-rtl.h (rtl_data): Remove return_bnd.
3353         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
3354         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
3355         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
3356         (POINTER_BOUNDS_MODE): Remove definition.
3357         (make_pointer_bounds_mode): Remove.
3358         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
3359         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
3360         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
3361         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
3362         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
3363         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
3364         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
3366         * config/i386/i386-modes.def (BND32, BND64): Remove.
3367         * config/i386/i386.c (dbx_register_map): Remove bound registers.
3368         (dbx64_register_map): Ditto.
3369         (svr4_dbx_register_map): Ditto.
3370         (indirect_thunk_bnd_needed): Remove.
3371         (indirect_thunks_bnd_used): Ditto.
3372         (indirect_return_bnd_needed): Ditto.
3373         (indirect_return_via_cx_bnd): Ditto.
3374         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
3375         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
3376         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
3377         (output_indirect_thunk_function): Remove handling of
3378         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
3379         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
3380         (ix86_save_reg): Remove handling of crtl->return_bnd.
3381         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
3382         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
3383         and UNSPEC_BNDLX_ADDR.
3384         (ix86_output_indirect_branch_via_reg): Remove handling of
3385         indirect_thunk_prefix_bnd.
3386         (ix86_output_indirect_branch_via_push): Ditto.
3387         (ix86_output_function_return): Ditto.
3388         (ix86_output_indirect_function_return): Ditto.
3389         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
3390         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
3391         (CALL_USED_REGISTERS): Ditto.
3392         (REG_ALLOC_ORDER): Update for removal of bound registers.
3393         (HI_REGISTER_NAMES): Ditto.
3394         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
3395         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
3396         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
3397         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
3398         (FIRST_PSEUDO_REG): Update.
3399         (BND): Remove mode iterator.
3400         * config/i386/predicates.md (bnd_mem_operator): Remove.
3402 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
3404         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
3405         vectors.
3407 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
3409         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
3410         the case in which the permute needs only a single element and
3411         repeats for every vector of the result.  Extend that case to
3412         handle variable-length vectors.
3413         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3415 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
3417         PR debug/79342
3418         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
3419         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
3421 2018-08-24  Richard Biener  <rguenther@suse.de>
3423         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
3424         bb_flags_allocated members.
3425         (auto_flag): New RAII class for allocating flags.
3426         (auto_edge_flag): New RAII class for allocating edge flags.
3427         (auto_bb_flag): New RAII class for allocating bb flags.
3428         * cfgloop.c (verify_loop_structure): Allocate temporary edge
3429         flag dynamically.
3430         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
3431         in favor of temporarily allocated BB flag.
3432         * hsa-brig.c: Re-order includes.
3433         * hsa-dump.c: Likewise.
3434         * hsa-regalloc.c: Likewise.
3435         * print-rtl.c: Likewise.
3436         * profile-count.c: Likewise.
3438 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
3440         PR target/86989
3441         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
3442         the TOC register.
3444 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3446         PR 87073/bootstrap
3447         * wide-int-range.cc (wide_int_range_div): Do not ignore result
3448         from wide_int_range_multiplicative_op.
3450 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3452         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
3453         "permutaion".
3455 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
3457         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
3458         to 'expanded'.
3460 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
3462         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
3463         full GENERIC expression used for replacement.
3465 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
3467         * tree-vrp.c (abs_extent_range): Remove.
3468         (extract_range_into_wide_ints): Pass wide ints by reference.
3469         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
3470         Pass wide ints by reference in all calls to
3471         extract_range_into_wide_ints.
3472         * wide-int-range.cc (wide_int_range_div): New.
3473         * wide-int-range.h (wide_int_range_div): New.
3474         (wide_int_range_includes_zero_p): New.
3475         (wide_int_range_zero_p): New.
3477 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
3479         * config/aarch64/aarch64.md (arches): New enum.
3480         (arch): New enum attr.
3481         (arch_enabled): New attr.
3482         (enabled): Now uses arch_enabled only.
3483         (simd, sve, fp16): Removed attribute.
3484         (fp): Attr now defined in terms of 'arch'.
3485         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
3486         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
3487         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
3488         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
3489         attributes into 'arch'.
3490         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
3491         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
3492         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
3493         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
3494         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
3495         'simd' attribute into 'arch'.
3496         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
3497         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
3498         Convert use of 'fp' attribute to 'arch'.
3499         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
3500         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
3501         into 'arch'.
3502         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
3503         (different modes) Merge 'fp' and 'simd' into 'arch'.
3504         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
3505         'simd' into 'arch'.
3507 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
3509         PR rtl-optimization/87026
3510         * expmed.c (canonicalize_comparison): If we can no longer create
3511         pseudoregisters, don't.
3513 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
3515         PR target/86951
3516         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
3517         prototype.
3518         * config/arm/arm.c (speculation_barrier_libfunc): New static
3519         variable.
3520         (arm_init_libfuncs): Initialize it.
3521         (arm_emit_speculation_barrier): New function.
3522         * config/arm/arm.md (speculation_barrier): Call
3523         arm_emit_speculation_barrier for architectures that do not have
3524         DSB or ISB.
3525         (speculation_barrier_insn): Only match on Armv7 or later.
3527 2018-08-23  Richard Biener  <rguenther@suse.de>
3529         PR middle-end/87024
3530         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
3531         calls.
3533 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
3535         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
3536         of single-vector TBLs.
3537         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
3538         one input is given.
3540 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
3542         PR target/85910
3543         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
3544         aarch64_evpc_tbl guard.
3546 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3548         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
3549         behaviour.
3551 2018-08-22  Martin Sebor  <msebor@redhat.com>
3553         PR middle-end/87052
3554         * tree-pretty-print.c (pretty_print_string): Add argument.
3555         (dump_generic_node): Call to pretty_print_string with string size.
3557 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
3559         PR rtl-optimization/86771
3560         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
3561         of two SETs into those two SETs, one to be placed at i2, if that SETs
3562         destination is modified between i2 and i3.
3564 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3566         PR tree-optimization/86725
3567         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
3568         function.
3569         (vect_analyze_scalar_cycles_1): Check it.
3571 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3573         PR tree-optimization/86725
3574         * tree-vect-loop.c (vect_is_simple_reduction): When treating
3575         an outer loop phi as a double reduction, make sure that the
3576         single user of the phi result is an inner loop phi.
3578 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3580         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
3581         grouped stores with gaps to a strided group.
3583 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3585         * tree-vect-stmts.c (get_group_load_store_type)
3586         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
3587         first statement in a group.
3589 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3591         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
3592         the sequence used in gcc/gcc.c.
3594 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3596         PR other/704
3597         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
3598         building it.
3600 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3602         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
3603         Darwin10-specific unwinder-shim.
3604         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
3605         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
3606         New to cater for Darwin10 Rosetta.
3608 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3610         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
3611         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
3613 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3615         PR bootstrap/81033
3616         PR target/81733
3617         PR target/52795
3618         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
3619         (dwarf2out_switch_text_section): Generate a local label for the
3620         second function sub-section and apply it as the second FDE start
3621         label.
3622         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
3623         second sub-section start.
3625 2018-08-22  Richard Biener  <rguenther@suse.de>
3627         PR tree-optimization/86988
3628         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
3630 2018-08-22  Richard Biener  <rguenther@suse.de>
3632         PR tree-optimization/86945
3633         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
3635 2018-08-22  Alexandre Oliva <oliva@adacore.com>
3637         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
3638         a comment about how uses of r2 for .sdata2 come about.
3640 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
3642         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
3644 2018-08-21  Marek Polacek  <polacek@redhat.com>
3646         PR c++/86981, Implement -Wpessimizing-move.
3647         * doc/invoke.texi: Document -Wpessimizing-move.
3649 2018-08-21  Jan Hubicka  <jh@suse.cz>
3651         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
3652         * tree.h (is_redundant_typedef): Remove.
3653         * dwarf2out.c (is_redundant_typedef): Turn into static function.
3655 2018-08-21  Jan Hubicka  <jh@suse.cz>
3657         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
3658         when possible.
3660 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
3662         * expmed.c (extract_low_bits): Reject invalid subregs early.
3664 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3666         PR middle-end/86121
3667         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
3668         behaviour.
3670 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3672         * config/vxworks.h: Guard vxworks_asm_out_constructor and
3673         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
3674         * config/vxworks.c: Likewise.
3676 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3678         * config/vxworks.c: Set targetm.have_ctors_dtors
3679         if HAVE_INITFINI_ARRAY_SUPPORT.
3680         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
3681         if HAVE_INITFINI_ARRAY_SUPPORT.
3683 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3685         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
3686         default search path for VxWorks < 7.
3688 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3690         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
3691         (get_format_string): Refer to c_getstr.
3693 2018-08-21  Tom de Vries  <tdevries@suse.de>
3695         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3696         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3697         (debuginfo_early_stop): Declare.
3698         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3699         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3700         (debuginfo_early_stop): New function.
3701         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
3702         and debuginfo_early_stop.
3703         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
3704         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
3705         (general_init): Call debuginfo_early_init.
3706         (finalize): Call debuginfo_fini.
3707         (do_compile): Call debuginfo_init.
3708         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
3709         -fdump-early-debug.
3710         (@item -fdump-debug, @item -fdump-earlydebug): Add.
3712 2018-08-21  Tom de Vries  <tdevries@suse.de>
3714         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
3715         flag_dump_noaddr and flag_dump_unnumbered.
3717 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
3719         * wide-int-range.cc (wide_int_range_abs): New.
3720         (wide_int_range_order_set): Rename from wide_int_range_min_max.
3721         * wide-int-range.h (wide_int_range_abs): New.
3722         (wide_int_range_min_max): New.
3723         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
3724         case to call wide_int_range_abs.
3725         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
3726         (extract_range_from_abs_expr): Delete.
3728 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
3730         PR target/87033
3731         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
3732         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
3733         for indexed loads.
3735 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3736             Jeff Law <law@redhat.com>
3738         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
3739         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
3741 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
3743         PR other/84889
3744         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
3745         (decl_attributes): Likewise.
3746         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
3747         instance.
3748         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3749         * diagnostic-core.h (class auto_diagnostic_group): New class.
3750         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
3751         (diagnostic_report_diagnostic): Handle the first diagnostics within
3752         a group.
3753         (emit_diagnostic): Add auto_diagnostic_group instance.
3754         (inform): Likewise.
3755         (inform_n): Likewise.
3756         (warning): Likewise.
3757         (warning_at): Likewise.
3758         (warning_n): Likewise.
3759         (pedwarn): Likewise.
3760         (permerror): Likewise.
3761         (error): Likewise.
3762         (error_n): Likewise.
3763         (error_at): Likewise.
3764         (sorry): Likewise.
3765         (fatal_error): Likewise.
3766         (internal_error): Likewise.
3767         (internal_error_no_backtrace): Likewise.
3768         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
3769         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
3770         * diagnostic.h (struct diagnostic_context): Add fields
3771         "diagnostic_group_nesting_depth",
3772         "diagnostic_group_emission_count", "begin_group_cb",
3773         "end_group_cb".
3774         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
3775         Add auto_diagnostic_group instance(s).
3776         (find_explicit_erroneous_behavior): Likewise.
3777         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
3778         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
3779         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
3780         (gimplify_va_arg_expr): Likewise.
3781         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
3782         (HSA_SORRY_AT): Likewise.
3783         * ipa-devirt.c (compare_virtual_tables): Likewise.
3784         (warn_odr): Likewise.
3785         * multiple_target.c (expand_target_clones): Likewise.
3786         * opts-common.c (cmdline_handle_error): Likewise.
3787         * reginfo.c (globalize_reg): Likewise.
3788         * substring-locations.c (format_warning_n_va): Likewise.
3789         * tree-inline.c (expand_call_inline): Likewise.
3790         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
3791         * tree-ssa-loop-niter.c
3792         (do_warn_aggressive_loop_optimizations): Likewise.
3793         * tree-ssa-uninit.c (warn_uninit): Likewise.
3794         * tree.c (warn_deprecated_use): Likewise.
3796 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
3798         PR target/87014
3799         * config/i386/i386.md (eh_return): Always update EH return
3800         address in word_mode.
3802 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
3804         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
3805         TARGET_SPLIT_COMPLEX_ARG is defined.
3807 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3809         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
3811 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3813         PR target/86984
3814         * expr.c (expand_assignment): Assert that bitpos is positive.
3815         (store_field): Likewise
3816         (expand_expr_real_1): Make sure that bitpos is positive.
3817         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
3818         integer overflow.
3820 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3822         * Makefile.in (CPP_ID_DATA_H): Delete.
3823         (CPP_INTERNAL_H): Don't add it.
3824         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
3825         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
3827 2018-08-20  Richard Biener  <rguenther@suse.de>
3829         PR tree-optimization/78655
3830         * tree-vrp.c (extract_range_from_binary_expr_1): Make
3831         pointer + offset nonnull if either operand is nonnull work.
3833 2018-08-20  Tom de Vries  <tdevries@suse.de>
3835         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
3836         unless the referenced die describes the added property using
3837         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
3838         Otherwise, add a DW_AT_location to the referenced die.
3840 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
3842         PR target/86994
3843         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
3844         register_operand when calling ix86_set_reg_reg_cost.
3845         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
3846         Set *total to 0 for operands that satisfy x86_64_immediate_operand
3847         predicate and to 1 otherwise.
3849 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
3851         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
3852         emit a diagnostic that it is not supported and reset the option.
3853         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
3854         supported and consume the option.  (ASM_FINAL_SPEC): New.
3856 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3858         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
3859         a sentence.
3861 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
3863         C-SKY port: Documentation
3865         * doc/extend.texi (C-SKY Function Attributes): New section.
3866         * doc/invoke.texi (Option Summary): Add C-SKY options.
3867         (C-SKY Options): New section.
3868         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
3870 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3871             Huibin Wang  <huibin_wang@c-sky.com>
3872             Sandra Loosemore  <sandra@codesourcery.com>
3873             Chung-Lin Tang  <cltang@codesourcery.com>
3875         C-SKY port: Backend implementation
3877         * config/csky/*: New.
3878         * common/config/csky/*: New.
3880 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3881             Huibin Wang  <huibin_wang@c-sky.com>
3882             Sandra Loosemore  <sandra@codesourcery.com>
3883             Chung-Lin Tang  <cltang@codesourcery.com>
3884             Andrew Jenner  <andrew@codesourcery.com>
3886         C-SKY port: Configury
3888         * config.gcc (csky-*-*): New.
3889         * configure.ac: Add csky to targets for dwarf2 debug_line support.
3890         * configure: Regenerated.
3892 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
3894         * dump-context.h: Include "dumpfile.h".
3895         (dump_context::dump_printf_va): Convert final param from va_list
3896         to va_list *.  Convert from ATTRIBUTE_PRINTF to
3897         ATTRIBUTE_GCC_DUMP_PRINTF.
3898         (dump_context::dump_printf_loc_va): Likewise.
3899         * dumpfile.c: Include "stringpool.h".
3900         (make_item_for_dump_printf_va): Delete.
3901         (make_item_for_dump_printf): Delete.
3902         (class dump_pretty_printer): New class.
3903         (dump_pretty_printer::dump_pretty_printer): New ctor.
3904         (dump_pretty_printer::emit_items): New member function.
3905         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
3906         function.
3907         (dump_pretty_printer::emit_item): New member function.
3908         (dump_pretty_printer::stash_item): New member function.
3909         (dump_pretty_printer::format_decoder_cb): New member function.
3910         (dump_pretty_printer::decode_format): New member function.
3911         (dump_context::dump_printf_va): Reimplement in terms of
3912         dump_pretty_printer.
3913         (dump_context::dump_printf_loc_va): Convert final param from va_list
3914         to va_list *.
3915         (dump_context::begin_scope): Reimplement call to
3916         make_item_for_dump_printf.
3917         (dump_printf): Update for change to dump_printf_va.
3918         (dump_printf_loc): Likewise.
3919         (selftest::test_capture_of_dump_calls): Convert "stmt" from
3920         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
3921         with %T, %E, and %G.
3922         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
3923         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
3924         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
3925         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
3926         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
3927         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
3928         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
3929         within a dump_printf_loc call to "%wu".
3930         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
3931         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
3932         missing space after "=".
3933         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
3934         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
3935         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
3936         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
3937         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
3938         duplicate "vectorized" from message.
3940 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3942         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
3943         polyNxK_t element's TYPE_STRING_FLAG.
3945 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3947         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
3948         (they were unnamed before).  Fix comments.
3950 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3952         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
3954 2018-08-17  Richard Biener  <rguenther@suse.de>
3956         PR tree-optimization/86841
3957         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
3959 2018-08-17  Martin Liska  <mliska@suse.cz>
3961         * common.opt: Remove Warn, Init and Report for options with
3962         Ignore/Deprecated flag. Warning is done automatically for
3963         Deprecated flags.
3964         * config/i386/i386.opt: Likewise.
3965         * config/ia64/ia64.opt: Likewise.
3966         * config/rs6000/rs6000.opt: Likewise.
3967         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
3968         Remove usage of flag_check_pointer_bounds.
3969         * lto-wrapper.c (merge_and_complain): Do not handle
3970         OPT_fcheck_pointer_bounds.
3971         (append_compiler_options): Likewise.
3972         * opt-functions.awk: Do not handle Deprecated.
3973         * optc-gen.awk: Check that Var, Report and Init are not
3974         used for an option with Ignore/Deprecated flag.
3975         * opts-common.c (decode_cmdline_option): Do not report
3976         CL_ERR_DEPRECATED.
3977         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
3978         options.
3979         * opts.h (struct cl_option): Remove cl_deprecated flag.
3980         (CL_ERR_DEPRECATED): Remove error enum value.
3982 2018-08-17  Richard Biener  <rguenther@suse.de>
3984         PR middle-end/86505
3985         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3986         across a va-arg-pack using call adjust its return value accordingly.
3988 2018-08-16  Martin Sebor  <msebor@redhat.com>
3990         PR tree-optimization/86853
3991         * gimple-ssa-sprintf.c (struct format_result): Rename member.
3992         (struct fmtresult): Add member and initialize it in ctors.
3993         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
3994         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
3995         (format_directive): Set POSUNDER4K when MAYFAIL is set.
3996         (parse_directive): Handle %C same as %c.
3997         (sprintf_dom_walker::compute_format_length): Adjust.
3998         (is_call_safe): Adjust.
4000 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4002         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
4003         for determining how to count the elements.
4004         * builtins.h (c_strlen): Adjust prototype.
4005         * expr.c (string_constant): Add new parameter mem_size.
4006         Set *mem_size appropriately.
4007         * expr.h (string_constant): Adjust protoype.
4008         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4009         * gimple-fold.h (get_range_strlen): Adjust prototype.
4010         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4011         (format_string): Call get_string_length with eltsize.
4013 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4015         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4016         to emit the span, rather than setting it as the prefix.
4018 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
4020         * diagnostic-show-locus.c (layout::start_annotation_line): Add
4021         "margin_char" parameter, defaulting to space.  Use it in place
4022         of pp_space for the initial part of the margin.
4023         (layout::print_leading_fixits): Use '+' when filling the margin
4024         of line-insertion fix-it hints.
4026 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4028         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4029         Delete.
4031 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4033         * config/rs6000/altivec.md: Don't set length attribute to the default
4034         value.
4035         * config/rs6000/darwin.md: Ditto.
4036         * config/rs6000/dfp.md: Ditto.
4037         * config/rs6000/htm.md: Ditto.
4038         * config/rs6000/rs6000.md: Ditto.
4039         * config/rs6000/sync.md: Ditto.
4040         * config/rs6000/vsx.md: Ditto.
4042 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4044         * config/rs6000/altivec.md: Don't set length attribute to the default
4045         value, for branch instructions.
4046         * config/rs6000/darwin.md: Ditto.
4047         * config/rs6000/rs6000.md: Ditto.
4049 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
4051         * config/rs6000/rs6000.md (length): Always define as const_int 4.
4052         (unnamed conditional branch define_insn): Set length to 4 or 8
4053         depending on offset.
4054         (<bd>_<mode>): Similar, for alternative 0.
4055         (<bd>tf_<mode>): Ditto.
4057 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4059         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4061 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
4063         * doc/rtl.texi: Replace old RTX class names with new names.
4066 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
4068         * expmed.h (canonicalize_comparison): New declaration.
4069         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4070         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4071         * optabs.c (prepare_cmp_insn): Likewise.
4072         * rtl.h (unsigned_condition_p): New function which checks if a
4073         comparison operator is unsigned.
4075 2018-08-16  Nathan Sidwell  <nathan@acm.org>
4077         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4078         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4080 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4082         PR target/84711
4083         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4084         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4085         (mov<mov>): ..this and enable unconditionally.
4087 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
4089         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4091 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
4093         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4094         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4095         "Common" with "Target".
4097 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4099         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4100         * doc/invoke.texi (mmitigate-rop): Remove.
4101         * config/i386/i386.c: Do not include "regrename.h".
4102         (ix86_rop_should_change_byte_p, reg_encoded_number)
4103         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4104         Remove.
4105         (ix86_reorg): Remove call to ix86_mitigate_rop.
4106         * config/i386/i386.md (attr "modrm_class"): Remove.
4107         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4108         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4109         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4111 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4113         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4114         allow folding of mergeh() and mergel() for the float and double types.
4115         (fold_mergehl_helper): Rework to handle building a permute tree
4116         for float vectors.
4118 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4120         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4121         for TARGET_SSE.
4123 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4125         * common.opt (fdiagnostics-show-labels): New option.
4126         * diagnostic-show-locus.c (class layout_range): Add field
4127         "m_label".
4128         (class layout): Add field "m_show_labels_p".
4129         (layout_range::layout_range): Add param "label" and use it to
4130         initialize m_label.
4131         (make_range): Pass in NULL for new "label" param of layout_range's
4132         ctor.
4133         (layout::layout): Initialize m_show_labels_p.
4134         (layout::maybe_add_location_range): Pass in loc_range->m_label
4135         when constructing layout_range instances.
4136         (struct line_label): New struct.
4137         (layout::print_any_labels): New member function.
4138         (layout::print_line): Call it if label-printing is enabled.
4139         (selftest::test_one_liner_labels): New test.
4140         (selftest::test_diagnostic_show_locus_one_liner): Call it.
4141         * diagnostic.c (diagnostic_initialize): Initialize
4142         context->show_labels_p.
4143         * diagnostic.h (struct diagnostic_context): Add field
4144         "show_labels_p".
4145         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4146         -fno-diagnostics-show-labels.
4147         * dwarf2out.c (gen_producer_string): Add
4148         OPT_fdiagnostics_show_labels to the ignored options.
4149         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4150         param.
4151         (gcc_rich_location::maybe_add_expr): Likewise.
4152         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4153         label" param, defaulting to NULL.
4154         (gcc_rich_location::add_expr): Add "label" param.
4155         (gcc_rich_location::maybe_add_expr): Likewise.
4156         (class text_range_label): New class.
4157         (class range_label_for_type_mismatch): New class.
4158         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4159         of format_warning_va.
4160         (fmtwarn_n): Likewise for new params of format_warning_n_va.
4161         * lto-wrapper.c (merge_and_complain): Add
4162         OPT_fdiagnostics_show_labels to the "pick one setting" options.
4163         (append_compiler_options): Likewise to the dropped options.
4164         (append_diag_options): Likewise to the passed-on options.
4165         * opts.c (common_handle_option): Handle the new option.
4166         * selftest-diagnostic.c
4167         (test_diagnostic_context::test_diagnostic_context): Enable
4168         show_labels_p.
4169         * substring-locations.c: Include "gcc-rich-location.h".
4170         (format_warning_n_va): Add "fmt_label" and "param_label" params
4171         and use them as appropriate.
4172         (format_warning_va): Add "fmt_label" and "param_label" params,
4173         passing them on to format_warning_n_va.
4174         (format_warning_at_substring): Likewise.
4175         (format_warning_at_substring_n): Likewise.
4176         * substring-locations.h (format_warning_va): Add "fmt_label" and
4177         "param_label" params.
4178         (format_warning_n_va): Likewise.
4179         (format_warning_at_substring): Likewise.
4180         (format_warning_at_substring_n): Likewise.
4181         * toplev.c (general_init): Initialize global_dc->show_labels_p.
4183 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
4185         PR testsuite/86519
4186         * builtins.c (expand_builtin_memcmp): Do not expand the call
4187         when overflow is detected.
4189 2018-08-15  Martin Sebor  <msebor@redhat.com>
4191         PR tree-optimization/71625
4192         * config/aarch64/aarch64-builtins.c
4193         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4195 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
4197         * config/s390/s390.c (s390_reorg): Remove loop.
4199 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4201         * config/darwin.c
4202          (darwin_function_switched_text_sections): Delete.
4203         * gcc/config/darwin.h
4204          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4206 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4208         PR target/81685
4209         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4210         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
4211         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4213 2018-08-15  Martin Liska  <mliska@suse.cz>
4215         PR tree-optimization/86925
4216         * predict.c (expr_expected_value_1): When taking
4217         later predictor, assign also probability.
4218         Use fold_build2_initializer_loc in order to fold
4219         the expression in -frounding-math.
4221 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
4223         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4224         patterns.
4225         (expand_vec_perm_1): Try the new method.
4227 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4229         PR target/86547
4230         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4231         Check whether lra_live_max_point is 0 before dividing.
4233 2018-08-14  Martin Sebor  <msebor@redhat.com>
4235         PR tree-optimization/86650
4236         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4237         (vrp_prop::check_mem_ref): Same.
4239 2018-08-13  Liu Hao <lh_mouse@126.com>
4241         * pretty-print.c (eat_esc_sequence): Swap the foreground and
4242         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4243         and clear it thereafter, as it only works for DBCS.
4245 2018-08-13  Liu Hao <lh_mouse@126.com>
4247         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4248         handle returned by _get_osf_handle().
4250 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4252         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4253         for folding vec_perm.
4255 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4257         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4258         Add support for gimple-folding of vec_pack() and vec_unpack()
4259         intrinsics.
4261 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
4263         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4264         vec_xst variants to the list.
4265         (rs6000_gimple_fold_builtin): Add support for folding unaligned
4266         vector loads and stores.
4268 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
4270         * config.gcc (rs6000-ibm-aix4.x): Delete.
4271         (rs6000-ibm-aix5.1): Delete.
4272         (rs6000-ibm-aix5.2): Delete.
4273         (rs6000-ibm-aix5.3): Delete.
4274         * config/rs6000/aix43.h: Delete.
4275         * config/rs6000/aix51.h: Delete.
4276         * config/rs6000/aix52.h: Delete.
4277         * config/rs6000/t-aix43: Delete.
4279 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
4281         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4282         New function.
4283         (s390_decompose_address): Factor out constant pool ref
4284         decomposition.
4286 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4288         * config/nds32/nds32-predicates.c
4289         (nds32_can_use_bclr_p): Change return type as bool.
4290         (nds32_can_use_bset_p): Ditto.
4291         (nds32_can_use_btgl_p): Ditto.
4292         (nds32_can_use_bitci_p): Ditto.
4293         * config/nds32/nds32-protos.h
4294         (nds32_can_use_bclr_p): Change declaration.
4295         (nds32_can_use_bset_p): Ditto.
4296         (nds32_can_use_btgl_p): Ditto.
4297         (nds32_can_use_bitci_p): Ditto.
4299 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4301         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4302         Support -msched-prolog-epilog option.
4303         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4305 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4307         * common/config/nds32/nds32-common.c
4308         (nds32_option_optimization_table): Enalbe -malways-align.
4310 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4312         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4313         extra_headers.
4314         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4315         OPT_misr_secure_ case.
4316         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4317         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4318         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4319         secure attribute.
4320         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4321         (nds32_isr_info): New field security_level.
4322         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4323         * config/nds32/nds32.md (return_internal): Consider critical attribute.
4324         * config/nds32/nds32.opt (misr-secure): New option.
4325         * config/nds32/nds32_init.inc: New file.
4326         * config/nds32/nds32_isr.h: New file.
4328 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
4330         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4331         Update comment for atomic instructions.
4332         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4333         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4334         Remove.
4335         (atomic_loaddi): Revise fence expansion to only emit fence prior to
4336         load for __ATOMIC_SEQ_CST model.
4337         (atomic_loaddi_1): Remove float register target.
4338         (atomic_storedi): Handle CONST_INT values.
4339         (atomic_storedi_1): Remove float register source.  Add special case
4340         for zero value.
4341         (memory_barrier): New expander and insn.
4343 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
4345         PR tree-optimization/86835
4346         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
4347         new_stmt after def_gsi, make sure to insert new_square_stmt after
4348         that stmt, not 2 stmts before it.
4350 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
4352         PR target/82418
4353         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
4354         instead of SWI48.
4356 2018-08-10  Martin Liska  <mliska@suse.cz>
4358         PR target/83610
4359         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
4360         function type.
4361         * builtins.c (expand_builtin_expect_with_probability):
4362         New function.
4363         (expand_builtin_expect_with_probability): New function.
4364         (build_builtin_expect_predicate): Add new argumnet probability
4365         for BUILT_IN_EXPECT_WITH_PROBABILITY.
4366         (fold_builtin_expect):
4367         (fold_builtin_2):
4368         (fold_builtin_3):
4369         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
4370         * builtins.h (fold_builtin_expect): Set new argument.
4371         * doc/extend.texi: Document __builtin_expect_with_probability.
4372         * doc/invoke.texi: Likewise.
4373         * gimple-fold.c (gimple_fold_call): Pass new argument.
4374         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
4375         also BUILT_IN_EXPECT_WITH_PROBABILITY.
4376         * predict.c (get_predictor_value): New function.
4377         (expr_expected_value): Add new argument probability. Assume
4378         that predictor and probability are always non-null.
4379         (expr_expected_value_1): Likewise.  For __builtin_expect and
4380         __builtin_expect_with_probability set probability.  Handle
4381         combination in binary expressions.
4382         (tree_predict_by_opcode): Simplify code by simply calling
4383         get_predictor_value.
4384         (pass_strip_predict_hints::execute): Add handling of
4385         BUILT_IN_EXPECT_WITH_PROBABILITY.
4386         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
4387         new predictor.
4388         * tree.h (DECL_BUILT_IN_P): New function.
4390 2018-08-10  Martin Liska  <mliska@suse.cz>
4392         PR tree-optimization/85799
4393         * passes.def: Add argument for pass_strip_predict_hints.
4394         * predict.c (class pass_strip_predict_hints): Add new argument
4395         early_p.
4396         (strip_predictor_early): New function.
4397         (pass_strip_predict_hints::execute): Call the function to
4398         strip predictors.
4399         (strip_predict_hints): New function.
4400         * predict.def: Fix comment.
4402 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4404         * Makefile.in: Clarify which tm.texi to copy over to assert the
4405         right to grant a GFDL license for all.
4407 2018-08-09  Jeff Law  <law@redhat.com>
4409         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
4410         unused variable.
4412 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
4414         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
4415         prototype.
4417 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4419         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
4420         reductions for variable-length vectors.
4422 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
4424         PR other/84889
4425         * common.opt (fdiagnostics-show-line-numbers): New option.
4426         * diagnostic-show-locus.c (class layout): Add fields
4427         "m_show_line_numbers_p" and "m_linenum_width";
4428         (num_digits): New function.
4429         (test_num_digits): New function.
4430         (layout::layout): Initialize new fields.  Update m_x_offset
4431         logic to handle any left margin.
4432         (layout::print_source_line): Print line number when requested.
4433         (layout::start_annotation_line): New member function.
4434         (layout::print_annotation_line): Call it.
4435         (layout::print_leading_fixits): Likewise.
4436         (layout::print_trailing_fixits): Likewise.  Update calls to
4437         move_to_column for new parameter.
4438         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
4439         it to potentially call start_annotation_line.
4440         (layout::show_ruler): Call start_annotation_line.
4441         (selftest::test_line_numbers_multiline_range): New selftest.
4442         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
4443         and selftest::test_line_numbers_multiline_range.
4444         * diagnostic.c (diagnostic_initialize): Initialize
4445         show_line_numbers_p.
4446         * diagnostic.h (struct diagnostic_context): Add field
4447         "show_line_numbers_p".
4448         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4449         -fno-diagnostics-show-line-numbers.
4450         * dwarf2out.c (gen_producer_string): Add
4451         OPT_fdiagnostics_show_line_numbers to the ignored options.
4452         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
4453         one setting" options.
4454         (append_compiler_options): Likewise to the dropped options.
4455         (append_diag_options): Likewise to the passed-on options.
4456         * opts.c (common_handle_option): Handle the new option.
4457         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
4459 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4461         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
4462         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
4463         third argument of type "const signed char" to descriptions of
4464         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
4465         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
4466         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
4467         __builtin_bcdsub_ov functions.
4469 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4471         PR tree-optimization/86858
4472         * tree-vect-loop.c (vect_is_simple_reduction): Restore
4473         flow_bb_inside_loop_p calls.
4475 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4477         PR tree-optimization/86871
4478         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
4479         instead of gimple_assign_lhs.
4481 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
4483         PR target/86887
4484         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
4485         register constraint to operand 0.
4486         (add<mode>3_carryinC): Likewise.
4487         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
4489 2018-08-09  Martin Liska  <mliska@suse.cz>
4491         PR c/86895
4492         * common.opt: Remove extra line.
4494 2018-08-09  Martin Liska  <mliska@suse.cz>
4496         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
4497         at the end of a line, make first letter capital and end up
4498         a sentence with a dot.
4499         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
4500         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
4501         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
4502         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
4503         (PARAM_MAX_ISL_OPERATIONS): Likewise.
4504         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
4505         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
4506         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
4507         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
4508         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
4509         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
4510         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
4511         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
4512         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
4513         (PARAM_TREE_REASSOC_WIDTH): Likewise.
4514         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
4515         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
4516         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
4518 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
4520         PR target/84332
4521         * config/s390/s390.c (s390_option_override_internal): Reduce the
4522         stack-clash-protection-probe-interval param if it would be too big
4523         for z900.
4525 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
4527         PR target/46179
4528         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
4529         * config/m68k/m68k.c (handle_move_double): Don't call
4530         m68k_final_prescan_insn.
4531         (m68k_adjust_decorated_operand): Renamed from
4532         m68k_final_prescan_insn, remove first and third operand and
4533         simplify.
4534         (print_operand): Call it.
4535         (print_operand_address): Call it.
4537 2018-08-08  Nathan Sidwell  <nathan@acm.org>
4539         * diagnostic.c (diagnostic_report_current_module): Use
4540         linemap_included_from & linemap_included_from_linemap.
4542 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
4544         * config/aarch64/aarch64-cores.def: Add phecda core.
4545         * config/aarch64/aarch64-tune.md: Regenerate.
4546         * doc/invoke.texi: Add phecda core.
4548 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
4550         PR target/85295
4551         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
4552         definitions.
4553         * config/s390/s390.md ("movti"): Add more alternatives for
4554         constant to GPR copies.
4556 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
4558         * config/s390/s390.c: Fix whitespace damage throughout the file.
4559         * config/s390/s390.h: Likewise.
4560         * config/s390/tpf.h: Likewise.
4562 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
4564         * config/s390/s390.c (s390_loadrelative_operand_p):
4565         Remove TARGET_CPU_ZARCH usages.
4566         (s390_rtx_costs): Likewise.
4567         (s390_legitimate_constant_p): Likewise.
4568         (s390_cannot_force_const_mem): Likewise.
4569         (legitimate_reload_constant_p): Likewise.
4570         (s390_preferred_reload_class): Likewise.
4571         (legitimize_pic_address): Likewise.
4572         (legitimize_tls_address): Likewise.
4573         (s390_split_branches): Removed.
4574         (s390_add_execute): Removed.
4575         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
4576         (s390_mainpool_start): Likewise.
4577         (s390_mainpool_finish): Likewise.
4578         (s390_mainpool_cancel): Removed.
4579         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
4580         (s390_chunkify_cancel): Likewise.
4581         (s390_return_addr_rtx): Likewise.
4582         (s390_register_info): Remove split_branches_pending_p uages.
4583         (s390_optimize_register_info): Likewise.
4584         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
4585         split_branches_pending_p usages.
4586         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
4587         (s390_load_got): Likewise.
4588         (s390_expand_split_stack_prologue): Likewise.
4589         (output_asm_nops): Likewise.
4590         (s390_function_profiler): Likewise.
4591         (s390_emit_call): Likewise.
4592         (s390_conditional_register_usage): Likewise.
4593         (s390_optimize_prologue): Likewise.
4594         (s390_reorg): Remove TARGET_CPU_ZARCH and
4595         split_branches_pending_p usages.
4596         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
4597         usages.
4598         (s390_output_indirect_thunk_function): Likewise.
4599         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
4600         (TARGET_CPU_ZARCH_P): Removed.
4601         (struct machine_function): Remove split_branches_pending_p.
4602         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
4604 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
4606         * common/config/s390/s390-common.c (processor_flags_table):
4607         Remove flags.
4608         * config.gcc: Remove with_arch/with_tune support.
4609         * config/s390/2064.md: Remove cpu attribute comparisons.
4610         * config/s390/driver-native.c (s390_host_detect_local_cpu):
4611         Remove MTN.
4612         * config/s390/linux.h (ASM_SPEC):
4613         Remove -march support.
4614         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
4615         Use a table to get an arch level.
4616         * config/s390/s390-opts.h (enum processor_type):
4617         Remove enum values.
4618         * config/s390/s390.c
4619         (processor_table): Remove entries, add arch_level values.
4620         (s390_issue_rate): Remove cases.
4621         (s390_option_override): Adjust
4622         s390_option_override_internal() call.
4623         (s390_option_override_internal): Remove deprecation warning.
4624         (s390_valid_target_attribute_tree): Adjust
4625         s390_option_override_internal() call.
4626         * config/s390/s390.h (struct s390_processor):
4627         Share with s390-c.c, add arch_level field.
4628         * config/s390/s390.md:
4629         Remove occurrences in cpu attribute.
4630         * config/s390/s390.opt: Remove -march/-mtune support.
4631         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
4632         * doc/invoke.texi: Remove deprecation warning.
4634 2018-08-08  Luis Machado  <luis.machado@linaro.org>
4636         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
4637         global.
4638         (qdf24xx_tunings): Set vector cost structure to
4639         qdf24xx_vector_cost.
4641         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
4642         <register_sextend>: Set to 3.
4644 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
4646         PR target/86838
4647         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
4648         * config/aarch64/aarch64-simd.md
4649         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
4650         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
4651         (aarch64_frecpx<mode>): ...this new pattern.
4652         * config/aarch64/aarch64-simd-builtins.def: Remove comment
4653         about aarch64_frecp<FRECP:frecp_suffix><mode>.
4655 2018-08-07  Martin Liska  <mliska@suse.cz>
4657         PR middle-end/83023
4658         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
4659         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
4660         * predict.def (PRED_MALLOC_NONNULL): New predictor.
4661         * doc/extend.texi: Document that malloc attribute adds
4662         hit to compiler.
4664 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
4666         PR target/86785
4667         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4668         Define to speculation_safe_value_not_needed.
4670 2018-08-06  Jeff Law  <law@redhat.com>
4672         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
4673         the vr_values instance to cprop_into_stmt.
4674         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
4675         (cprop_operand): Also query EVRP to determine if OP is a constant.
4677 2018-08-06  Nathan Sidwell  <nathan@acm.org>
4679         * diagnostic.c (diagnostic_report_current_module): Reroll
4680         included-at loop.  Translate text.
4682 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
4684         * function-tests.c (selftest::test_expansion_to_rtl): Call
4685         free_after_compilation.
4687 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4689         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
4691 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
4693         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
4694         loops with memory block operations from getting unrolled.
4696 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
4698         PR target/86807
4699         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4700         Define to speculation_safe_value_not_needed.
4702 2018-08-06  Jeff Law  <law@redhat.com>
4704         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
4705         assert.
4707 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4709         PR target/86662
4710         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
4711         with all enabled __intN types.
4713         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
4715 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4717         * alias.c (record_set): Check for clobber high.
4718         * cfgexpand.c (expand_gimple_stmt): Likewise.
4719         * combine-stack-adj.c (single_set_for_csa): Likewise.
4720         * combine.c (find_single_use_1): Likewise.
4721         (set_nonzero_bits_and_sign_copies): Likewise.
4722         (get_combine_src_dest): Likewise.
4723         (is_parallel_of_n_reg_sets): Likewise.
4724         (try_combine): Likewise.
4725         (record_dead_and_set_regs_1): Likewise.
4726         (reg_dead_at_p_1): Likewise.
4727         (reg_dead_at_p): Likewise.
4728         * dce.c (deletable_insn_p): Likewise.
4729         (mark_nonreg_stores_1): Likewise.
4730         (mark_nonreg_stores_2): Likewise.
4731         * df-scan.c (df_find_hard_reg_defs): Likewise.
4732         (df_uses_record): Likewise.
4733         (df_get_call_refs): Likewise.
4734         * dwarf2out.c (mem_loc_descriptor): Likewise.
4735         * haifa-sched.c (haifa_classify_rtx): Likewise.
4736         * ira-build.c (create_insn_allocnos): Likewise.
4737         * ira-costs.c (scan_one_insn): Likewise.
4738         * ira.c (equiv_init_movable_p): Likewise.
4739         (rtx_moveable_p): Likewise.
4740         (interesting_dest_for_shprep): Likewise.
4741         * jump.c (mark_jump_label_1): Likewise.
4742         * postreload-gcse.c (record_opr_changes): Likewise.
4743         * postreload.c (reload_cse_simplify): Likewise.
4744         (struct reg_use): Add source expr.
4745         (reload_combine): Check for clobber high.
4746         (reload_combine_note_use): Likewise.
4747         (reload_cse_move2add): Likewise.
4748         (move2add_note_store): Likewise.
4749         * print-rtl.c (print_pattern): Likewise.
4750         * recog.c (decode_asm_operands): Likewise.
4751         (store_data_bypass_p): Likewise.
4752         (if_test_bypass_p): Likewise.
4753         * regcprop.c (kill_clobbered_value): Likewise.
4754         (kill_set_value): Likewise.
4755         * reginfo.c (reg_scan_mark_refs): Likewise.
4756         * reload1.c (maybe_fix_stack_asms): Likewise.
4757         (eliminate_regs_1): Likewise.
4758         (elimination_effects): Likewise.
4759         (mark_not_eliminable): Likewise.
4760         (scan_paradoxical_subregs): Likewise.
4761         (forget_old_reloads_1): Likewise.
4762         * reorg.c (find_end_label): Likewise.
4763         (try_merge_delay_insns): Likewise.
4764         (redundant_insn): Likewise.
4765         (own_thread_p): Likewise.
4766         (fill_simple_delay_slots): Likewise.
4767         (fill_slots_from_thread): Likewise.
4768         (dbr_schedule): Likewise.
4769         * resource.c (update_live_status): Likewise.
4770         (mark_referenced_resources): Likewise.
4771         (mark_set_resources): Likewise.
4772         * rtl.c (copy_rtx): Likewise.
4773         * rtlanal.c (reg_referenced_p): Likewise.
4774         (single_set_2): Likewise.
4775         (noop_move_p): Likewise.
4776         (note_stores): Likewise.
4777         * sched-deps.c (sched_analyze_reg): Likewise.
4778         (sched_analyze_insn): Likewise.
4780 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4782         * cse.c (invalidate_reg): New function extracted from...
4783         (invalidate): ...here.
4784         (canonicalize_insn): Check for clobber high.
4785         (invalidate_from_clobbers): invalidate clobber highs.
4786         (invalidate_from_sets_and_clobbers): Likewise.
4787         (count_reg_usage): Check for clobber high.
4788         (insn_live_p): Likewise.
4789         * cselib.c (cselib_expand_value_rtx_1):Likewise.
4790         (cselib_invalidate_regno): Check for clobber in setter.
4791         (cselib_invalidate_rtx): Pass through setter.
4792         (cselib_invalidate_rtx_note_stores):
4793         (cselib_process_insn): Check for clobber high.
4794         * cselib.h (cselib_invalidate_rtx): Add operand.
4796 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4798         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
4799         (mark_not_eliminable): Likewise.
4800         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
4801         * lra-lives.c (process_bb_lives): Check for clobber high.
4802         * lra.c (new_insn_reg): Remember clobber highs.
4803         (collect_non_operand_hard_regs): Check for clobber high.
4804         (lra_set_insn_recog_data): Likewise.
4805         (add_regs_to_insn_regno_info): Likewise.
4806         (lra_update_insn_regno_info): Likewise.
4808 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4810         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
4811         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
4813 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4815         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
4816         (copy_insn_1): Likewise.
4817         (gen_hard_reg_clobber_high): New gen function.
4818         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
4819         * genemit.c (gen_exp): Likewise.
4820         (gen_emit_seq): Pass through info.
4821         (gen_insn): Check for CLOBBER_HIGH.
4822         (gen_expand): Pass through info.
4823         (gen_split): Likewise.
4824         (output_add_clobbers): Likewise.
4825         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
4826         (remove_clobbers): Likewise.
4827         * rtl.h (gen_hard_reg_clobber_high): New declaration.
4829 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4831         * doc/rtl.texi (clobber_high): Add.
4832         (parallel): Add in clobber high
4833         * rtl.c (rtl_check_failed_code3): Add function.
4834         * rtl.def (CLOBBER_HIGH): Add expression.
4835         * rtl.h (RTL_CHECKC3): Add macro.
4836         (rtl_check_failed_code3): Add declaration.
4837         (XC3EXP): Add macro.
4839 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
4841         PR target/86386
4842         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
4843         cfun->machine->max_used_stack_alignment if needed.
4845 2018-08-04  Martin Sebor  <msebor@redhat.com>
4847         PR tree-optimization/86571
4848         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
4849         NaN output to 4.
4851 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4853         PR target/86799
4854         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4855         Define.
4857 2018-08-03  Jeff Law  <law@redhat.com>
4859         PR target/86795
4860         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4861         Define to speculation_safe_value_not_needed.
4863 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
4865         * doc/gcov.texi (-x): Remove duplicate "to".
4866         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
4867         (-Wif-not-aligned): Remove duplicate "is".
4868         (-flto): Remove duplicate "the".
4869         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
4870         duplicate "v5.00.b".
4871         (MSP430 Options): Remove duplicate "and" from the description
4872         of "-mgprel-sec=regexp".
4873         (x86 Options): Remove duplicate copies of "vmldLog102" and
4874         vmlsLog104 from description of "-mveclibabi=type".
4876 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4878         * internal-fn.h (first_commutative_argument): Declare.
4879         * internal-fn.c (first_commutative_argument): New function.
4880         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
4881         restrictions for pattern statements.  Use first_commutative_argument
4882         to look for commutative operands in calls to internal functions.
4884 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
4886         * Makefile.in (wide-int-range.o): New.
4887         * tree-vrp.c: Move all the wide_int_* functions to...
4888         * wide-int-range.cc: ...here.
4889         * tree-vrp.h: Move all the wide_int_* prototypes to...
4890         * wide-int-range.h: ...here.
4892 2018-08-03  Tom de Vries  <tdevries@suse.de>
4894         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
4895         UI_NONE.
4896         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
4897         * except.c (output_function_exception_table): Do early exit if
4898         targetm_common.except_unwind_info (&global_options) == UI_NONE.
4900 2018-08-03  Martin Liska  <mliska@suse.cz>
4902         * predict.c (dump_prediction): Change to 2 digits
4903         in fraction part.
4905 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4907         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
4908         neon_dup_q to...
4909         (falkor_am_1_gtov_gtov): ... a new insn reservation.
4911 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
4913         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
4914         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
4915         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
4916         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
4917         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
4919 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
4921         * diagnostic-show-locus.c (diagnostic_show_locus): Use
4922         pp_take_prefix when saving the existing prefix.
4923         * diagnostic.c (diagnostic_append_note): Likewise.
4924         * langhooks.c (lhd_print_error_function): Likewise.
4925         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
4926         param's type.  Free the existing prefix.
4927         (pp_take_prefix): New function.
4928         (pretty_printer::pretty_printer): Drop the prefix parameter.
4929         Rename the length parameter to match the comment.
4930         (pretty_printer::~pretty_printer): Free the prefix.
4931         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
4932         parameter.
4933         (struct pretty_printer): Drop the "const" from "prefix" field's
4934         type and clarify memory management.
4935         (pp_set_prefix): Drop the "const" from the 2nd param.
4936         (pp_take_prefix): New decl.
4938 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4940         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
4941         for word_mode_ok here instead of passing as argument.
4942         (expand_block_compare): Change select_block_compare_mode() call.
4943         (expand_strncmp_gpr_sequence): New function.
4944         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
4946 2018-08-02  Jeff Law  <law@redhat.com>
4948         PR target/86790
4949         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4950         Define to speculation_safe_value_not_needed.
4952         PR target/86784
4953         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4954         Define to speculation_safe_value_not_needed.
4956 2018-08-02  Tom de Vries  <tdevries@suse.de>
4958         PR target/86660
4959         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
4960         function.  Return UI_TARGET unconditionally.
4961         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
4962         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
4964 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4966         * genemit.c (print_overload_test): Fix typo.
4968 2018-08-02  Richard Biener  <rguenther@suse.de>
4970         PR tree-optimization/86816
4971         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
4972         which checks for value availability before querying it.
4973         (gvn_uses_equal): Use it.
4974         (same_succ_hash): Likewise.
4975         (gimple_equal_p): Likewise.
4977 2018-08-02  Nick Clifton  <nickc@redhat.com>
4979         PR target/86813
4980         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4981         Define to speculation_safe_value_not_needed.
4983         PR target/86810
4984         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4985         Define to speculation_safe_value_not_needed.
4987         PR target/86810
4988         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4989         Define to speculation_safe_value_not_needed.
4991         PR target/86803
4992         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4993         Define to speculation_safe_value_not_needed.
4995         PR target/86797
4996         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4997         Define to speculation_safe_value_not_needed.
4999         PR target/86791
5000         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5001         Define to speculation_safe_value_not_needed.
5003         PR target/86789
5004         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5005         Define to speculation_safe_value_not_needed.
5007         PR target/86787
5008         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5009         Define to speculation_safe_value_not_needed.
5011         PR target/86782
5012         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5013         speculation_safe_value_not_needed.
5015         PR target/86781
5016         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5017         to speculation_safe_value_not_needed.
5019 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5021         * doc/md.texi: Expand the documentation of instruction names
5022         to mention port-local uses.  Document '@' in pattern names.
5023         * read-md.h (overloaded_instance, overloaded_name): New structs.
5024         (mapping): Declare.
5025         (md_reader::handle_overloaded_name): New member function.
5026         (md_reader::get_overloads): Likewise.
5027         (md_reader::m_first_overload): New member variable.
5028         (md_reader::m_next_overload_ptr): Likewise.
5029         (md_reader::m_overloads_htab): Likewise.
5030         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5031         m_next_overload_ptr and m_overloads_htab.
5032         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5033         (get_mode_token, get_code_token, get_int_token): New functions.
5034         (map_attr_string): Add an optional argument that passes back
5035         the associated iterator.
5036         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5037         (md_reader::handle_overloaded_name, add_overload_instance): New
5038         functions.
5039         (apply_iterators): Handle '@' names.  Report an error if '@'
5040         is used without iterators.
5041         (initialize_iterators): Initialize the new iterator_group fields.
5042         * genopinit.c (handle_overloaded_code_for)
5043         (handle_overloaded_gen): New functions.
5044         (main): Use them to print declarations of maybe_code_for_* and
5045         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5046         * genemit.c (print_overload_arguments, print_overload_test)
5047         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5048         (main): Use it to print definitions of maybe_code_for_* and
5049         maybe_gen_* functions.
5050         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5051         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5052         instead of explicit mode checks.
5053         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5054         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5055         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5056         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5057         (aarch64_expand_compare_and_swap): Likewise
5058         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5059         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5060         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5061         (aarch64_constant_pool_reload_icode): Delete.
5062         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5063         instead of aarch64_constant_pool_reload_icode.  Use
5064         code_for_aarch64_reload_mov instead of explicit mode checks.
5065         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5066         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5067         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5068         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5069         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5070         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5071         (aarch64_atomic_load_op_code): Delete.
5072         (aarch64_emit_atomic_load_op): Likewise.
5073         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5074         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
5075         instead of aarch64_emit_atomic_load_op.
5076         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5077         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5078         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5079         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5080         character before the pattern name.
5081         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5082         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5083         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5084         (aarch64_frecps<mode>): Likewise.
5085         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5086         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5087         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5088         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5089         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5091 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
5093         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5094         Allow HFmode constants if TARGET_FP_F16INST.
5096 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
5098         PR target/86014
5099         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5100         No longer check last store for clobber of address register.
5102 2018-08-02  Martin Liska  <mliska@suse.cz>
5104         PR gcov-profile/86817
5105         * gcov.c (process_all_functions): New function.
5106         (main): Call it.
5107         (process_file): Move functions processing to
5108         process_all_functions.
5110 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5112         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5113         "const" to the "gimple *" and "rtx_insn *" parameters.
5114         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5115         Likewise.
5116         (dump_location_t::dump_location_t): Likewise.
5118 2018-08-01  Martin Sebor  <msebor@redhat.com>
5120         PR tree-optimization/86650
5121         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5122         rather than a "gcall *".  Directly pass the data of interest
5123         to percent_K_format, rather than building a temporary CALL_EXPR
5124         to hold it.
5125         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5126         (gimple_fold_builtin_strncat): Adjust.
5127         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5128         gcall* argument with gimple*.
5129         * gimple-ssa-warn-restrict.c (check_call): Same.
5130         (wrestrict_dom_walker::before_dom_children): Same.
5131         (builtin_access::builtin_access): Same.
5132         (check_bounds_or_overlap): Same
5133         (maybe_diag_overlap): Same.
5134         (maybe_diag_offset_bounds): Same.
5135         * tree-diagnostic.c (default_tree_printer): Move usage of
5136         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5137         to this callsite.
5138         * tree-pretty-print.c (percent_K_format): Add argument.
5139         * tree-pretty-print.h: Add argument.
5140         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5141         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5142         (maybe_diag_stxncpy_trunc): Same.
5143         (handle_builtin_stxncpy): Same.
5144         (handle_builtin_strcat): Same.
5146 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5148         * match.pd: Optimise pointer range checks.
5150 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5152         PR tree-optimization/86758
5153         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5154         to remove pattern statements.
5156 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5158         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5159         result of dfs_enumerate_from when constructing stmt_vec_infos,
5160         instead of additionally calling get_loop_body.
5162 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5164         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5165         parameter.
5166         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5167         When creating an iv, assert that the step is not known to be zero.
5168         (vect_setup_realignment): Update call accordingly.
5169         * tree-vect-stmts.c (vectorizable_store): Likewise.
5170         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
5172 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5174         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5175         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5176         (vectorizable_reduction): Likewise.
5177         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5178         (vect_detect_hybrid_slp_stmts): Likewise.
5179         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5181 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
5183         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5184         (wide_int_set_zero_nonzero_bits): ...this.
5185         (zero_nonzero_bits_from_vr): Rename to...
5186         (vrp_set_zero_nonzero_bits): ...this.
5187         (extract_range_from_multiplicative_op_1): Abstract wide int
5188         code...
5189         (wide_int_range_multiplicative_op): ...here.
5190         (extract_range_from_binary_expr_1): Extract wide int binary
5191         operations into their own functions.
5192         (wide_int_range_lshift): New.
5193         (wide_int_range_can_optimize_bit_op): New.
5194         (wide_int_range_shift_undefined_p): New.
5195         (wide_int_range_bit_xor): New.
5196         (wide_int_range_bit_ior): New.
5197         (wide_int_range_bit_and): New.
5198         (wide_int_range_trunc_mod): New.
5199         (extract_range_into_wide_ints): New.
5200         (vrp_shift_undefined_p): New.
5201         (extract_range_from_multiplicative_op): New.
5202         (vrp_can_optimize_bit_op): New.
5203         * tree-vrp.h (value_range::dump): New.
5204         (wide_int_range_multiplicative_op): New.
5205         (wide_int_range_lshift):New.
5206         (wide_int_range_shift_undefined_p): New.
5207         (wide_int_range_bit_xor): New.
5208         (wide_int_range_bit_ior): New.
5209         (wide_int_range_bit_and): New.
5210         (wide_int_range_trunc_mod): New.
5211         (zero_nonzero_bits_from_bounds): Rename to...
5212         (wide_int_set_zero_nonzero_bits): ...this.
5213         (zero_nonzero_bits_from_vr): Rename to...
5214         (vrp_set_zero_nonzero_bits): ...this.
5215         (range_easy_mask_min_max): Rename to...
5216         (wide_int_range_can_optimize_bit_op): this.
5217         * vr-values.c (simplify_bit_ops_using_ranges): Rename
5218         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5220 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5222         * tree-vectorizer.h (vect_orig_stmt): New function.
5223         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5224         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5225         (vect_create_epilog_for_reduction): Likewise.
5226         (vectorizable_live_operation): Likewise.
5227         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5228         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5229         * tree-vect-stmts.c (vectorizable_call): Likewise.
5230         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5232 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5234         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5235         argument.
5236         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5237         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5238         (vect_transform_loop): Likewise.
5239         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5241 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5243         * tree-vectorizer.h (vect_schedule_slp): Return void.
5244         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5245         (vect_schedule_slp): Likewise.
5247 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5249         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5250         argument.
5251         (vect_transform_loop): Update calls accordingly.  Schedule SLP
5252         instances before the main loop, if any exist.
5254 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5256         PR tree-optimization/86749
5257         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5258         If the lhs is used in a COND_EXPR, check that it is being used
5259         as the "then" or "else" value.
5261 2018-08-01  Tom de Vries  <tdevries@suse.de>
5263         PR target/86800
5264         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5265         speculation_safe_value_not_needed.
5267 2018-08-01  Richard Biener  <rguenther@suse.de>
5269         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5270         as base and offset.
5272 2018-08-01  Martin Liska  <mliska@suse.cz>
5274         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5275         format how successful transformation is dumped.
5276         (gimple_mod_pow2_value_transform): Likewise.
5277         (gimple_mod_subtract_transform): Likewise.
5278         (gimple_stringops_transform): Likewise.
5280 2018-08-01  Martin Liska  <mliska@suse.cz>
5282         PR value-prof/35543
5283         * value-prof.c (interesting_stringop_to_profile_p):
5284         Simplify the code and add BUILT_IN_MEMMOVE.
5285         (gimple_stringops_transform): Likewise.
5287 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
5289         * config/aarch64/aarch64-simd.md
5290         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5291         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5292         use GPI iterator instead of SI mode.
5294 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5296         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5297         rs6000_speculation_barrier.
5298         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5299         new barrier pattern name.
5301 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5303         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5304         (speculation_barrier): New insn.
5306 2018-08-01  Richard Biener  <rguenther@suse.de>
5308         PR bootstrap/86724
5309         * graphite.h: Include isl/id.h and isl/space.h to allow build
5310         with ISL 0.20.
5312 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
5314         PR target/86651
5315         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5316         mode for COFF targets.
5317         * defaults.h (TARGET_COFF): Define.
5318         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5319         TARGET_COFF): Define.
5320         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5321         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5322         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5324 2018-07-31  Alexandre Oliva <oliva@adacore.com>
5326         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5327         * gimple-streamer-out.c (output_bb): Save it.
5328         * lto-streamer-in.c (input_struct_function_base): Restore
5329         instance discriminator if available.  Create map on demand.
5330         * lto-streamer-out.c (output_struct_function_base): Save it if
5331         available.
5332         * final.c (decl_to_instance_map): Document LTO strategy.
5334 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
5335             Olivier Hainque  <hainque@adacore.com>
5337         * debug.h (decl_to_instance_map_t): New type.
5338         (decl_to_instance_map): Declare.
5339         (maybe_create_decl_to_instance_map): New inline function.
5340         * final.c (bb_discriminator, last_bb_discriminator): New statics,
5341         to track basic block discriminators.
5342         (final_start_function_1): Initialize them.
5343         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
5344         bb_discriminator.
5345         (decl_to_instance_map): New variable.
5346         (map_decl_to_instance, maybe_set_discriminator): New functions.
5347         (notice_source_line): Set discriminator.
5349 2018-07-31  Ian Lance Taylor  <iant@golang.org>
5351         * targhooks.c (default_have_speculation_safe_value): Add
5352         ATTRIBUTE_UNUSED.
5354 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5356         * dump-context.h: Include "pretty-print.h".
5357         (dump_context::refresh_dumps_are_enabled): New decl.
5358         (dump_context::emit_item): New decl.
5359         (class dump_context): Add fields "m_test_pp" and
5360         "m_test_pp_flags".
5361         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5362         (temp_dump_context::get_dumped_text): New decl.
5363         (class temp_dump_context): Add field "m_pp".
5364         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
5365         (dump_context::refresh_dumps_are_enabled): ...and add a test for
5366         m_test_pp.
5367         (set_dump_file): Update for above change.
5368         (set_alt_dump_file): Likewise.
5369         (dump_loc): New overload, taking a pretty_printer *.
5370         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
5371         to any test pretty-printer.
5372         (make_item_for_dump_gimple_stmt): New function, adapted from
5373         optinfo::add_gimple_stmt.
5374         (dump_context::dump_gimple_stmt): Call it, and use the result,
5375         eliminating the direct usage of dump_file and alt_dump_file in
5376         favor of indirectly using them via emit_item.
5377         (make_item_for_dump_gimple_expr): New function, adapted from
5378         optinfo::add_gimple_expr.
5379         (dump_context::dump_gimple_expr): Call it, and use the result,
5380         eliminating the direct usage of dump_file and alt_dump_file in
5381         favor of indirectly using them via emit_item.
5382         (make_item_for_dump_generic_expr): New function, adapted from
5383         optinfo::add_tree.
5384         (dump_context::dump_generic_expr): Call it, and use the result,
5385         eliminating the direct usage of dump_file and alt_dump_file in
5386         favor of indirectly using them via emit_item.
5387         (make_item_for_dump_printf_va): New function, adapted from
5388         optinfo::add_printf_va.
5389         (make_item_for_dump_printf): New function.
5390         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
5391         and use the result, eliminating the direct usage of dump_file and
5392         alt_dump_file in favor of indirectly using them via emit_item.
5393         (make_item_for_dump_dec): New function.
5394         (dump_context::dump_dec): Call it, and use the result,
5395         eliminating the direct usage of dump_file and alt_dump_file in
5396         favor of indirectly using them via emit_item.
5397         (make_item_for_dump_symtab_node): New function, adapted from
5398         optinfo::add_symtab_node.
5399         (dump_context::dump_symtab_node): Call it, and use the result,
5400         eliminating the direct usage of dump_file and alt_dump_file in
5401         favor of indirectly using them via emit_item.
5402         (dump_context::begin_scope): Reimplement, avoiding direct usage
5403         of dump_file and alt_dump_file in favor of indirectly using them
5404         via emit_item.
5405         (dump_context::emit_item): New member function.
5406         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5407         Set up test pretty-printer on the underlying context.  Call
5408         refresh_dumps_are_enabled.
5409         (temp_dump_context::~temp_dump_context): Call
5410         refresh_dumps_are_enabled.
5411         (temp_dump_context::get_dumped_text): New member function.
5412         (selftest::verify_dumped_text): New function.
5413         (ASSERT_DUMPED_TEXT_EQ): New macro.
5414         (selftest::test_capture_of_dump_calls): Run all tests twice, with
5415         and then without optinfo enabled.  Add uses of
5416         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
5417         * dumpfile.h: Update comment for the dump_* API.
5418         * optinfo-emit-json.cc
5419         (selftest::test_building_json_from_dump_calls): Update for new
5420         param for temp_dump_context ctor.
5421         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
5422         and "m_owned" field.
5423         (optinfo_item::~optinfo_item): Likewise.
5424         (optinfo::add_item): New member function.
5425         (optinfo::emit): Update comment.
5426         (optinfo::add_string): Delete.
5427         (optinfo::add_printf): Delete.
5428         (optinfo::add_printf_va): Delete.
5429         (optinfo::add_gimple_stmt): Delete.
5430         (optinfo::add_gimple_expr): Delete.
5431         (optinfo::add_tree): Delete.
5432         (optinfo::add_symtab_node): Delete.
5433         (optinfo::add_dec): Delete.
5434         * optinfo.h (class dump_context): New forward decl.
5435         (optinfo::add_item): New decl.
5436         (optinfo::add_string): Delete.
5437         (optinfo::add_printf): Delete.
5438         (optinfo::add_printf_va): Delete.
5439         (optinfo::add_gimple_stmt): Delete.
5440         (optinfo::add_gimple_expr): Delete.
5441         (optinfo::add_tree): Delete.
5442         (optinfo::add_symtab_node): Delete.
5443         (optinfo::add_dec): Delete.
5444         (optinfo::add_poly_int): Delete.
5445         (optinfo_item::optinfo_item): Remove "owned" param.
5446         (class optinfo_item): Remove field "m_owned".
5448 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5450         PR middle-end/86705
5451         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
5452         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
5453         requested variable alignment.
5454         (expand_one_ssa_partition): Likewise.
5455         (expand_one_var): Likewise.
5457 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5459         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5460         to speculation_safe_value_not_needed.
5462 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5464         * targhooks.h (speculation_safe_value_not_needed): New prototype.
5465         * targhooks.c (speculation_safe_value_not_needed): New function.
5466         * target.def (have_speculation_safe_value): Update documentation.
5467         * doc/tm.texi: Regenerated.
5469 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5471         * config/aarch64/iterators.md (ALLI_TI): New iterator.
5472         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
5473         expand.
5474         (despeculate_copy<ALLI:mode>_insn): New insn.
5475         (despeculate_copyti_insn): New insn.
5476         (despeculate_simple<ALLI:mode>): New insn
5477         (despeculate_simpleti): New insn.
5478         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
5479         function.
5480         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
5481         aarch64_speculation_safe_value.
5482         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
5484 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5486         * config/aarch64/aarch64-speculation.cc: New file.
5487         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
5488         before pass_reorder_blocks.
5489         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
5490         prototype.
5491         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
5492         X14 and X15 when tracking speculation.
5493         * config/aarch64/aarch64.md (register name constants): Add
5494         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
5495         (unspec): Add UNSPEC_SPECULATION_TRACKER.
5496         (speculation_barrier): New insn attribute.
5497         (cmp<mode>): Allow SP in comparisons.
5498         (speculation_tracker): New insn.
5499         (speculation_barrier): Add speculation_barrier attribute.
5500         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
5501         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
5502         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
5504 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5506         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
5507         aarch64_track_speculation is true.
5508         (tb<optab><mode>1): Likewise.
5509         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
5510         generate CB[N]Z when tracking speculation.
5511         (aarch64_split_compare_and_swap): Likewise.
5512         (aarch64_split_atomic_op): Likewise.
5514 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5516         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
5518 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5520         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
5521         (speculation_barrier): New insn.
5523 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5525         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
5526         * config/arm/arm.md (speculation_barrier): New expand.
5527         (speculation_barrier_insn): New pattern.
5529 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5531         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
5532         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
5533         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
5534         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
5535         list.
5536         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
5537         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
5538         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
5539         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
5540         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
5541         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
5542         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
5543         * builtins.c (expand_speculation_safe_value): New function.
5544         (expand_builtin): Call it.
5545         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
5546         * doc/extend.texi: Document __builtin_speculation_safe_value.
5547         * doc/md.texi: Document "speculation_barrier" pattern.
5548         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
5549         TARGET_HAVE_SPECULATION_SAFE_VALUE.
5550         * doc/tm.texi: Regenerated.
5551         * target.def (have_speculation_safe_value, speculation_safe_value): New
5552         hooks.
5553         * targhooks.c (default_have_speculation_safe_value): New function.
5554         (default_speculation_safe_value): New function.
5555         * targhooks.h (default_have_speculation_safe_value): Add prototype.
5556         (default_speculation_safe_value): Add prototype.
5558 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5560         * dump-context.h (dump_context::dump_loc): New decl.
5561         * dumpfile.c (dump_context::dump_loc): New member function.
5562         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
5563         and dump_gimple_stmt.
5564         (dump_context::dump_gimple_expr_loc): Likewise, using
5565         dump_gimple_expr.
5566         (dump_context::dump_generic_expr_loc): Likewise, using
5567         dump_generic_expr.
5568         (dump_context::dump_printf_loc_va): Likewise, using
5569         dump_printf_va.
5570         (dump_context::begin_scope): Explicitly using the global function
5571         "dump_loc", rather than the member function.
5573 2018-07-31  Martin Sebor  <msebor@redhat.com>
5575         PR tree-optimization/86741
5576         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
5578 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
5580         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
5581         depend on whether prefetch instructions will be emitted or not.
5582         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
5583         will be emitted or not.
5584         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
5585         (TARGET_SETMEM_PFD): New macros.
5587 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5589         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
5590         (NULL_STMT_VEC_INFO): Delete.
5591         (stmt_vec_info::operator*): Likewise.
5592         (stmt_vec_info::operator gimple *): Likewise.
5593         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
5594         of NULL_STMT_VEC_INFO.
5595         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5596         (vect_reassociating_reduction_p): Likewise.
5597         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5598         (vectorizable_store): Likewise.
5599         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
5600         (vec_info::free_stmt_vec_infos): Likewise.
5602 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5604         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
5605         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
5607 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5609         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
5610         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5611         (vec_info::free_stmt_vec_info): New private member functions.
5612         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
5613         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
5614         * tree-parloops.c (gather_scalar_reductions): Remove calls to
5615         set_stmt_vec_info_vec and free_stmt_vec_infos.
5616         * tree-vect-loop.c (_loop_vec_info): Remove call to
5617         set_stmt_vec_info_vec.
5618         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
5619         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
5620         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
5621         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5622         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
5623         assignments in {vec_info::,}new_stmt_vec_info that are redundant
5624         with the clearing in the xcalloc.
5625         (stmt_vec_info_vec): Delete.
5626         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
5627         (vectorize_loops): Likewise.
5628         (vec_info::~vec_info): Remove argument from call to
5629         free_stmt_vec_infos.
5630         (vec_info::add_stmt): Remove vinfo argument from call to
5631         new_stmt_vec_info.
5633 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5635         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
5636         rather than a gimple stmt.
5637         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
5638         information for pattern statements when passed the original
5639         statement; instead wait to be passed the pattern statement itself.
5640         Don't call set_vinfo_for_stmt here.
5641         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
5642         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
5643         stmt_vec_infos here.
5644         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
5645         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
5646         stmt_vec_infos entry.
5648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5650         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
5651         * tree-vectorizer.c (vec_info::replace_stmt): New function.
5652         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
5653         * tree-vect-stmts.c (vectorizable_call): Likewise.
5654         (vectorizable_simd_clone_call): Likewise.
5656 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5658         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
5659         * tree-vectorizer.c (vec_info::remove_stmt): New function.
5660         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
5661         * tree-vect-loop.c (vect_transform_loop): Likewise.
5662         * tree-vect-slp.c (vect_schedule_slp): Likewise.
5663         * tree-vect-stmts.c (vect_remove_stores): Likewise.
5665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5667         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
5668         (vect_dr_stmt): Delete.
5669         * tree-vectorizer.c (vec_info::lookup_dr): New function.
5670         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
5671         of DR_VECT_AUX.
5672         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
5673         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
5674         (vect_verify_datarefs_alignment, vect_peeling_supportable)
5675         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5676         (vect_analyze_data_refs): Likewise.
5677         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
5678         argument.
5679         (vect_find_same_alignment_drs): Likewise.
5680         (vect_slp_analyze_node_dependences): Update calls accordingly.
5681         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
5682         instead of DR_VECT_AUX.
5683         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
5684         of a vector data references.  Use vec_info::lookup_dr instead of
5685         DR_VECT_AUX.
5686         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
5687         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
5688         instead of DR_VECT_AUX.
5690 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5692         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
5693         dr_vec_info.
5694         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5695         accordingly.
5696         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5697         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5698         (vect_gen_prolog_loop_niters): Likewise.
5700 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5702         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
5703         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
5704         (vect_known_alignment_in_bytes, vect_dr_behavior)
5705         (vect_get_scalar_dr_size): Take references as dr_vec_infos
5706         instead of data_references.  Update calls to other routines for
5707         which the same change has been made.
5708         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
5709         dr_vec_infos instead of stmt_vec_infos.
5710         (vect_analyze_data_ref_dependence): Update call accordingly.
5711         (vect_slp_analyze_data_ref_dependence)
5712         (vect_record_base_alignments): Use DR_VECT_AUX.
5713         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
5714         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
5715         (vector_alignment_reachable_p, vect_get_data_access_cost)
5716         (vect_peeling_supportable, vect_analyze_group_access_1)
5717         (vect_analyze_group_access, vect_analyze_data_ref_access)
5718         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
5719         (vect_compile_time_alias, vect_small_gap_p)
5720         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
5721         (vect_supportable_dr_alignment): Take references as dr_vec_infos
5722         instead of data_references.  Update calls to other routines for
5723         which the same change has been made.
5724         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
5725         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5726         (vect_slp_analyze_and_verify_node_alignment)
5727         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5728         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5729         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
5730         above changes.
5731         (_vect_peel_info::dr): Replace with...
5732         (_vect_peel_info::dr_info): ...this new field.
5733         (vect_peeling_hash_get_most_frequent)
5734         (vect_peeling_hash_choose_best_peeling): Update accordingly.
5735         (vect_peeling_hash_get_lowest_cost):
5736         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
5737         routines for which the same change has been made.
5738         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
5739         data_reference.
5740         * tree-vect-loop-manip.c (get_misalign_in_elems)
5741         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
5742         above changes.
5743         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5744         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
5745         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
5746         (get_group_load_store_type, get_negative_load_store_type)
5747         (vect_get_data_ptr_increment, vectorizable_store)
5748         (vectorizable_load): Likewise.
5749         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
5750         Update calls to other routines for which the same change has been made.
5752 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5754         * tree-vectorizer.h (vec_info::move_dr): New member function.
5755         (dataref_aux): Rename to...
5756         (dr_vec_info): ...this and add "dr" and "stmt" fields.
5757         (_stmt_vec_info::dr_aux): Update accordingly.
5758         (_stmt_vec_info::data_ref_info): Delete.
5759         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
5760         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
5761         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
5762         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
5763         of data_ref.
5764         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
5765         (STMT_VINFO_DR_INFO): New macro.
5766         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
5767         (set_dr_misalignment): Update after rename of dataref_aux.
5768         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
5769         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
5770         initialization of STMT_VINFO_DATA_REF.
5771         * tree-vectorizer.c (vec_info::move_dr): New function.
5772         * tree-vect-patterns.c (vect_recog_bool_pattern)
5773         (vect_recog_mask_conversion_pattern)
5774         (vect_recog_gather_scatter_pattern): Use it.
5775         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
5776         the "dr" and "stmt" fields of dr_vec_info instead of
5777         STMT_VINFO_DATA_REF.
5779 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5781         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
5782         (is_pattern_stmt_p): Use it.
5783         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
5784         on pattern statements.
5786 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5788         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
5789         original stmt as a stmt_vec_info rather than a gimple stmt.
5790         (vect_pattern_recog_1): Take the statement directly as a
5791         stmt_vec_info, rather than via a gimple_stmt_iterator.
5792         Update call to vect_mark_pattern_stmts.
5793         (vect_pattern_recog): Update calls accordingly.
5795 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5797         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
5798         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
5799         a vect_def_type for the first argument.
5800         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
5801         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
5802         operand if it isn't defined by a vectorized statement.
5803         (vect_build_gather_load_calls): Remove the mask_dt argument and
5804         update calls to vect_get_vec_def_for_stmt_copy.
5805         (vectorizable_bswap): Likewise the dt argument.
5806         (vectorizable_call): Update calls to vectorizable_bswap and
5807         vect_get_vec_def_for_stmt_copy.
5808         (vectorizable_simd_clone_call, vectorizable_assignment)
5809         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
5810         (vectorizable_comparison): Update calls to
5811         vect_get_vec_def_for_stmt_copy.
5812         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
5813         vect_is_simple_use.
5814         (vect_get_loop_based_defs): Remove dt argument and update call
5815         to vect_get_vec_def_for_stmt_copy.
5816         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
5817         and vect_get_vec_def_for_stmt_copy.
5818         (vectorizable_load): Update calls to vect_build_gather_load_calls
5819         and vect_get_vec_def_for_stmt_copy.
5820         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5821         (vectorizable_reduction, vectorizable_live_operation): Update calls
5822         to vect_get_vec_def_for_stmt_copy.
5824 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5826         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
5827         and gimple stmt arguments with a stmt_vec_info.
5828         (vect_record_base_alignments): Update calls accordingly.
5829         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
5830         and gimple stmt arguments with a stmt_vec_info.
5831         (vect_build_slp_tree_1): Remove vinfo argument and update call
5832         to vect_record_max_nunits.
5833         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
5834         and vect_record_max_nunits.
5836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5838         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
5839         file and take a stmt_vec_info instead of a gimple stmt.
5840         (supportable_widening_operation, vect_finish_replace_stmt)
5841         (vect_finish_stmt_generation, vect_get_store_rhs)
5842         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
5843         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
5844         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
5845         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
5846         (vect_create_data_ref_ptr, bump_vector_ptr)
5847         (vect_permute_store_chain, vect_setup_realignment)
5848         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
5849         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
5850         (vectorizable_reduction, vectorizable_induction)
5851         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
5852         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
5853         than gimple stmts as arguments.
5854         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
5855         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
5856         (can_group_stmts_p, vect_check_gather_scatter)
5857         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5858         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
5859         (vect_permute_load_chain, vect_shift_permute_load_chain)
5860         (vect_transform_grouped_load)
5861         (vect_record_grouped_load_vectors): Likewise.
5862         * tree-vect-loop.c (vect_fixup_reduc_chain)
5863         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
5864         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
5865         (vectorizable_reduction, vectorizable_induction)
5866         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
5867         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
5868         (vect_get_load_store_mask): Likewise.
5869         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
5870         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
5871         * tree-vect-stmts.c (vect_mark_relevant)
5872         (is_simple_and_all_uses_invariant)
5873         (exist_non_indexing_operands_for_use_p, process_use)
5874         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
5875         (vect_get_vec_def_for_operand, vect_get_vec_defs)
5876         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
5877         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
5878         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
5879         (get_negative_load_store_type, get_load_store_type)
5880         (vect_check_load_store_mask, vect_check_store_rhs)
5881         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
5882         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5883         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5884         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5885         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
5886         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
5887         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
5888         (supportable_widening_operation): Likewise.
5890 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5892         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
5893         a stmt_vec_info instead of a gcall.
5894         (vect_check_gather_scatter): Update call accordingly.
5895         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
5896         of a gphi.
5897         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
5898         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
5899         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
5900         instead of a gimple stmt.
5901         (vect_transform_loop): Update calls accordingly.
5902         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
5903         stmt_vec_infos instead of gimple stmts.
5904         (vect_analyze_slp_instance): Update use accordingly.
5905         * tree-vect-stmts.c (read_vector_array, write_vector_array)
5906         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
5907         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
5908         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
5909         (vect_gen_widened_results_half, vect_get_loop_based_defs)
5910         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
5911         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
5912         down to subroutines.
5914 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5916         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
5917         of the worklist from a vector of gimple stmts to a vector of
5918         stmt_vec_infos.
5919         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5920         (vect_mark_stmts_to_be_vectorized): Likewise
5922 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5924         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
5925         statement before passing it to vect_analyze_stmt.
5926         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
5927         the chain of phi vector definitions.  Track the exit phi via its
5928         stmt_vec_info.
5929         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
5930         STMT_VINFO_REDUC_DEF.
5931         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
5932         stmt_vec_infos to handle the statement chains.
5933         (vect_get_slp_defs): Record the first statement in the node
5934         using a stmt_vec_info.
5935         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
5936         statements here and pass their stmt_vec_info down to subroutines.
5937         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
5938         down to vect_finish_stmt_generation.
5939         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
5940         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
5941         stmt_vec_infos to subroutines.
5942         (vect_remove_stores): Use stmt_vec_infos to handle the statement
5943         chains.
5945 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5947         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
5948         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
5949         (vect_permute_store_chain, vect_setup_realignment)
5950         (vect_permute_load_chain, vect_shift_permute_load_chain)
5951         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
5952         stmts internally, and when passing values to other vectorizer routines.
5953         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5954         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
5955         (vect_analyze_loop_operations, get_initial_def_for_reduction)
5956         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
5957         (vectorizable_reduction, vectorizable_induction)
5958         (vectorizable_live_operation, vect_transform_loop_stmt)
5959         (vect_transform_loop): Likewise.
5960         * tree-vect-patterns.c (vect_reassociating_reduction_p)
5961         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
5962         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
5963         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5964         (vect_slp_analyze_node_operations_1): Likewise.
5965         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5966         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
5967         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
5968         (vect_finish_stmt_generation_1, get_group_load_store_type)
5969         (get_load_store_type, vect_build_gather_load_calls)
5970         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5971         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5972         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5973         (vectorizable_store, vectorizable_load, vectorizable_condition)
5974         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
5975         (supportable_widening_operation): Likewise.
5976         (vect_get_vector_types_for_stmt): Likewise.
5977         * tree-vectorizer.h (vect_dr_behavior): Likewise.
5979 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5981         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5982         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
5983         (vect_permute_store_chain, vect_permute_load_chain)
5984         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
5985         repeated stmt_vec_info lookups.
5986         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5987         (vect_update_ivs_after_vectorizer): Likewise.
5988         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
5989         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5990         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
5991         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5992         (vect_bb_slp_scalar_cost): Likewise.
5993         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
5995 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5997         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5998         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5999         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6000         to get gassigns and gcalls, rather than operating on generc gimple
6001         stmts.
6002         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6003         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6004         (vectorizable_load, vect_analyze_stmt): Likewise.
6005         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6007 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6009         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6010         return stmt_vec_infos rather than gimple stmts.  Do not accept
6011         null arguments.
6012         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6013         of a gimple stmt.
6014         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6015         Update use of get_later_stmt.
6016         (vect_get_constant_vectors): Update call accordingly.
6017         (vect_schedule_slp_instance): Likewise
6018         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6019         (vect_slp_analyze_instance_dependence): Likewise.
6020         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6022 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6024         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6025         (stmt_info_for_cost::stmt_info): ...this new field.
6026         (add_stmt_costs): Update accordingly.
6027         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6028         (vect_get_known_peeling_cost): Likewise.
6029         (vect_estimate_min_profitable_iters): Likewise.
6030         * tree-vect-stmts.c (record_stmt_cost): Likewise.
6032 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6034         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6035         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6036         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6037         accordingly.
6038         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6042         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6043         a gimple stmt to a stmt_vec_info.
6044         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6048         * tree-vectorizer.h (vec_info::grouped_stores): Change from
6049         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6050         (_loop_vec_info::reduction_chains): Likewise.
6051         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6052         accordingly.
6053         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6057         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6058         a gimple stmt to a stmt_vec_info.
6059         (_stmt_vec_info::next_element): Likewise.
6060         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6061         (vect_slp_analyze_and_verify_node_alignment)
6062         (vect_analyze_group_access_1, vect_analyze_group_access)
6063         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6064         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6065         (vect_supportable_dr_alignment): Update accordingly.
6066         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6067         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6068         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6069         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6070         * tree-vect-slp.c (vect_build_slp_tree_1)
6071         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6072         (vect_split_slp_store_group, vect_analyze_slp_instance)
6073         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6074         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6075         (get_group_load_store_type, get_load_store_type)
6076         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6077         (vect_transform_stmt, vect_remove_stores): Likewise.
6079 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6081         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6082         than a gimple stmt.
6083         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6084         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6085         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6086         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6087         (vector_alignment_reachable_p, vect_get_data_access_cost)
6088         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6089         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6090         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6091         (vect_analyze_group_access_1, vect_analyze_group_access)
6092         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6093         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6094         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6095         result of vect_dr_stmt and use the stmt_vec_info instead of
6096         the associated gimple stmt.
6097         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6098         (vect_gen_prolog_loop_niters): Likewise.
6099         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6101 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6103         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6104         to a vec<stmt_vec_info>.
6105         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6106         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6107         vec<stmt_vec_info>.
6108         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6109         to a vec<stmt_vec_info>.
6110         (bst_traits::value_type, bst_traits::value_type): Likewise.
6111         (bst_traits::hash): Update accordingly.
6112         (vect_get_and_check_slp_defs): Change the stmts parameter from
6113         a vec<gimple *> to a vec<stmt_vec_info>.
6114         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6115         (vect_build_slp_tree): Likewise.
6116         (vect_build_slp_tree_2): Likewise.  Update uses of
6117         SLP_TREE_SCALAR_STMTS.
6118         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6119         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6120         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6121         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6122         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6123         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6124         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6125         (vect_get_constant_vectors, vect_get_slp_defs)
6126         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6127         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6128         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6129         instead of gimple stmts.
6130         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6131         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6132         (vect_slp_analyze_instance_dependence): Update uses of
6133         SLP_TREE_SCALAR_STMTS.
6134         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6135         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6136         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6137         (get_initial_defs_for_reduction): Likewise.
6138         (vect_create_epilog_for_reduction): Likewise.
6139         (vectorize_fold_left_reduction): Likewise.
6140         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6141         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6142         (can_vectorize_live_stmts): Likewise.
6144 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6146         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6147         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6148         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6149         than gimple stmts.
6150         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6151         of a gimple stmt.
6152         (gather_scalar_reductions): Update after above interface changes.
6153         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6154         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6155         than gimple stmts.
6156         (vect_force_simple_reduction): Likewise.
6157         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6158         LOOP_VINFO_REDUCTIONS.
6159         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6161 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6163         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6164         a gimple stmt to a stmt_vec_info.
6165         * tree-vect-loop.c (vect_active_double_reduction_p)
6166         (vect_force_simple_reduction, vectorizable_reduction): Update
6167         accordingly.
6169 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6171         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6172         vec<gimple *> to a vec<stmt_vec_info>.
6173         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6174         the reduction_phis argument from a vec<gimple *> to a
6175         vec<stmt_vec_info>.
6176         (vectorizable_reduction): Likewise the phis local variable that
6177         is passed to vect_create_epilog_for_reduction.  Update for new type
6178         of SLP_TREE_VEC_STMTS.
6179         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6180         (vectorizable_live_operation): Likewise.
6181         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6182         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6184 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6186         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6187         a gimple stmt to a stmt_vec_info.
6188         (vectorizable_condition, vectorizable_live_operation)
6189         (vectorizable_reduction, vectorizable_induction): Pass back the
6190         vectorized statement as a stmt_vec_info.
6191         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6192         use of STMT_VINFO_VEC_STMT.
6193         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6194         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6195         as stmt_vec_infos rather than gimple stmts.
6196         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6197         to a stmt_vec_info.
6198         (vectorizable_live_operation): Likewise.
6199         (vectorizable_reduction, vectorizable_induction): Likewise,
6200         updating use of STMT_VINFO_VEC_STMT.
6201         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6202         of STMT_VINFO_VEC_STMT.
6203         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6204         (vectorizable_simd_clone_call, vectorizable_conversion)
6205         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6206         (vectorizable_store, vectorizable_load, vectorizable_condition)
6207         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6208         from a gimple stmt to a stmt_vec_info.
6209         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
6210         pointer to a stmt_vec_info to the vectorizable_* routines.
6212 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6214         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6215         a gimple stmt to a stmt_vec_info.
6216         (is_pattern_stmt_p): Update accordingly.
6217         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6218         (vect_record_grouped_load_vectors): Likewise.
6219         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6220         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6221         (vect_model_reduction_cost): Likewise.
6222         (vect_create_epilog_for_reduction): Likewise.
6223         (vectorizable_reduction, vectorizable_induction): Likewise.
6224         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6225         Return the stmt_vec_info for the pattern statement.
6226         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6227         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6228         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6229         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6230         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6231         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6232         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6233         (free_stmt_vec_info, vect_is_simple_use): Likewise.
6235 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6237         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6238         (vect_finish_stmt_generation): Likewise.
6239         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6240         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6241         (vect_build_gather_load_calls): Use the return value of the above
6242         functions instead of a separate call to vinfo_for_stmt.  Use narrow
6243         scopes for the input gimple stmt and wider scopes for the associated
6244         stmt_vec_info.  Use vec_info::lookup_def when setting these
6245         stmt_vec_infos from an SSA_NAME definition.
6246         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6247         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6248         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6249         (vectorizable_store, vectorizable_load, vectorizable_condition)
6250         (vectorizable_comparison): Likewise.
6251         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6252         (vectorizable_reduction): Likewise.
6254 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6256         * tree-vectorizer.h (vect_is_simple_use): Add an optional
6257         stmt_vec_info * parameter before the optional gimple **.
6258         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6259         (process_use, vect_get_vec_def_for_operand_1): Update callers.
6260         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6261         * tree-vect-loop.c (vectorizable_reduction): Likewise.
6262         (vectorizable_live_operation): Likewise.
6263         * tree-vect-patterns.c (type_conversion_p): Likewise.
6264         (vect_look_through_possible_promotion): Likewise.
6265         (vect_recog_rotate_pattern): Likewise.
6266         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6268 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6270         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6271         a typedef to a wrapper class.
6272         (NULL_STMT_VEC_INFO): New macro.
6273         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6274         (stmt_vec_info::operator*): New function.
6275         (stmt_vec_info::operator gimple *): Likewise.
6276         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6277         (add_stmt_costs): Likewise.
6278         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6279         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6280         (vect_get_known_peeling_cost): Likewise.
6281         (vect_estimate_min_profitable_iters): Likewise.
6282         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6283         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6284         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6285         (vectorizable_store, free_stmt_vec_infos): Likewise.
6286         (new_stmt_vec_info): Change return type of xcalloc to
6287         _stmt_vec_info *.
6289 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6291         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6292         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6293         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6294         a single_imm_use-based sequence.
6295         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6297 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6299         * tree-vectorizer.h (vec_info::lookup_def): Declare.
6300         * tree-vectorizer.c (vec_info::lookup_def): New function.
6301         * tree-vect-patterns.c (vect_get_internal_def): Use it.
6302         (vect_widened_op_tree): Likewise.
6303         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6304         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6305         (vectorizable_reduction): Likewise.
6306         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6307         of a gimple *.
6308         (vect_is_slp_reduction): Update calls accordingly.  Use
6309         vec_info::lookup_def.
6310         (vect_is_simple_reduction): Likewise
6311         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6313 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6315         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6316         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6317         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6318         of vinfo_for_stmt.
6319         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6320         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6321         (vect_update_vf_for_slp, vect_analyze_loop_operations)
6322         (vect_is_slp_reduction, vectorizable_induction)
6323         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6324         * tree-vect-patterns.c (vect_init_pattern_stmt):
6325         (vect_determine_min_output_precision_1, vect_determine_precisions)
6326         (vect_pattern_recog): Likewise.
6327         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6328         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6329         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6330         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6331         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6332         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
6333         info field from a loop to a loop_vec_info.
6335 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6337         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6338         (vec_info::add_stmt): Declare.
6339         * tree-vectorizer.c (vec_info::add_stmt): New function.
6340         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6341         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6342         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6343         (vectorizable_induction): Likewise.
6344         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
6345         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6346         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
6347         (vectorizable_load): Likewise.
6348         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6349         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
6350         (vect_recog_gather_scatter_pattern): Likewise.
6351         (append_pattern_def_seq): Likewise.  Remove a check that is
6352         performed by add_stmt itself.
6354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6356         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
6357         which make_ssa_name was called with new_stmt before new_stmt
6358         had been created.
6360 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6362         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
6363         split out from...
6364         (vect_is_slp_reduction): ...here...
6365         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
6366         that are already known to be false.
6368 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6370         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
6371         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
6372         STMT_VINFO_NUM_SLP_USES when it's true.
6373         (vect_free_slp_instance): Add a final_p parameter and pass it to
6374         vect_free_slp_tree.
6375         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
6376         (vect_analyze_slp_instance): Likewise.
6377         (vect_slp_analyze_operations): Likewise.
6378         (vect_slp_analyze_bb_1): Likewise.
6379         * tree-vectorizer.c (vec_info): Likewise.
6380         * tree-vect-loop.c (vect_transform_loop): Likewise.
6382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6384         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6385         function is not called for second and subsequent members of
6386         a reduction group.
6388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6390         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
6391         cases for nested loops from here to ...
6392         (vect_create_epilog_for_reduction): ...here.  Only call
6393         vect_is_simple_use for inner-loop reductions.
6395 2018-07-31  Martin Liska  <mliska@suse.cz>
6397         PR gcov-profile/85338
6398         PR gcov-profile/85350
6399         PR gcov-profile/85372
6400         * profile.c (struct location_triplet): New.
6401         (struct location_triplet_hash): Likewise.
6402         (output_location): Do not output a BB that
6403         is already recorded for a line.
6404         (branch_prob): Use streamed_locations.
6406 2018-07-31  Martin Liska  <mliska@suse.cz>
6408         PR gcov-profile/85370
6409         * coverage.c (coverage_begin_function): Do not mark target
6410         clones as artificial functions.
6412 2018-07-31  Martin Liska  <mliska@suse.cz>
6414         PR gcov-profile/83813
6415         PR gcov-profile/84758
6416         PR gcov-profile/85217
6417         PR gcov-profile/85332
6418         * profile.c (branch_prob): Do not record GOTO expressions
6419         for GIMPLE statements which locations are already streamed.
6421 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6423         * gcc.c (handle_spec_function): Accept a soft_matched_part
6424         argument, as do_spec_1.  Pass it down to ...
6425         (eval_spec_function): Accept a soft_matched_part argument,
6426         and pass it down to ...
6427         (do_spec_2): Accept a soft_matched_part argument, and pass
6428         it down to do_spec_1.
6429         (do_spec_1): Pass soft_matched_part to handle_spec_function.
6430         (handle_braces): Update call to handle_spec_function.
6431         (driver::set_up_specs): Update calls to do_spec_2.
6432         (compare_debug_dump_opt_spec_function): Likewise.
6433         (compare_debug_self_opt_spec_function): Likewise.
6435 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6437         * common.opt (nolibc): New option.
6438         * doc/invoke.texi (Link Options): Document it.
6439         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
6440         * config/alpha/linux.h: Likewise.
6441         * config/arc/elf.h: Likewise.
6442         * config/arm/uclinux-elf.h: Likewise.
6443         * config/arm/unknown-elf.h: Likewise.
6444         * config/avr/avrlibc.h: Likewise.
6445         * config/bfin/bfin.h: Likewise.
6446         * config/bfin/linux.h: Likewise.
6447         * config/bfin/uclinux.h: Likewise.
6448         * config/darwin.h: Likewise.
6449         * config/darwin10.h: Likewise.
6450         * config/darwin12.h: Likewise.
6451         * config/gnu-user.h: Likewise.
6452         * config/lm32/uclinux-elf.h: Likewise.
6453         * config/pa/pa-hpux11.h: Likewise.
6454         * config/pa/pa64-hpux.h: Likewise.
6455         * config/sparc/sparc.h: Likewise.
6457 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6459         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
6460         undefined variables.
6462 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
6464         PR target/86640
6465         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
6466         instead of GEN_INT.
6468 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6470         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6471         terminated string literal.
6473 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
6475         PR rtl-optimization/85160
6476         * combine.c (is_just_move): New function.
6477         (try_combine): Allow combining two instructions into two if neither of
6478         the original instructions was a move.
6480 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
6482         PR target/86673
6483         * doc/extend.texi (Global Register Variables): Discourage use of type
6484         qualifiers.
6485         (Local Register Variables): Likewise.
6487 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
6489         PR tree-optimization/86506
6490         * hwint.h (ceil_log2): Resync with hwint.c implementation.
6492 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
6494         PR target/86547
6495         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
6496         hard_regno, make sure no insn between `from` and `to` clobbers it.
6498 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
6499             Tom de Vries  <tdevries@suse.de>
6501         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
6502         (PTX_DEFAULT_RUNTIME_DIM): ... this.
6503         (nvptx_goacc_validate_dims): Set default worker and gang dims to
6504         PTX_DEFAULT_RUNTIME_DIM.
6505         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
6507 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
6509         * config/pa/pa.c (pa_output_addr_vec): Align address table.
6510         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
6511         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
6513 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
6515         * config/rs6000/constraints.md (wG constraint): Delete, no longer
6516         used.
6517         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
6518         predicate to reflect toc fusion has been deleted.
6519         (toc_fusion_mem_raw): Delete, no longer used.
6520         (toc_fusion_mem_wrapped): Likewise.
6521         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
6522         fusion mask bit.
6523         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
6524         Delete, no longer used.
6525         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
6526         meant to be used for toc fusion.
6527         (rs6000_debug_print_mode): Delete toc fusion debugging.
6528         (rs6000_debug_reg_global): Likewise.
6529         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
6530         fusion and secondary reload support that were never used.
6531         (rs6000_option_override_internal): Delete TOC fusion, that was only
6532         partially defined, and it did not work unless you also used the
6533         -mcmodel= switch.
6534         (rs6000_legitimate_address_p): Delete TOC fusion support.
6535         (rs6000_opt_masks): Likewise.
6536         (fusion_wrap_memory_address): Delete function, no longer used.
6537         (fusion_split_address); Delete TOC fusion support.
6538         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
6539         longer used with toc fusion being deleted.
6540         (TARGET_TOC_FUSION_FP): Likewise.
6541         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
6542         UNSPEC.
6543         (toc fusion spliter): Delete TOC fusion support.
6544         (toc_fusionload_<mode>): Likewise.
6545         (toc_fusionload_di): Likewise.
6546         (fusion_gpr_load_<mode>): Delete generator function, this insn no
6547         longer needs to be named.  Rename predicate to delete TOC fusion.
6548         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6549         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
6550         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6551         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
6552         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
6554 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6556         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
6557         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
6558         __int128 in built-in function prototypes.
6559         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
6560         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
6562 2018-07-27  Martin Sebor  <msebor@redhat.com>
6564         PR tree-optimization/86696
6565         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
6566         types, including enums.
6567         (handle_char_store): Be prepared for the above function to fail.
6569 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
6571         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
6572         when optimization level is lower than 2 or optimize for size.
6574 2018-07-26  Martin Sebor  <msebor@redhat.com>
6576         PR tree-optimization/86043
6577         PR tree-optimization/86042
6578         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
6579         (get_string_cst_length): Rename...
6580         (get_min_string_length): ...to this.  Add argument.
6581         (handle_char_store): Extend to handle multi-character stores by
6582         MEM_REF.
6583         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
6584         * tree.h (initializer_zerop): Add argument.
6586 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
6588         PR middle-end/86660
6589         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
6590         declare target to variables if they have always,{to,from,tofrom} map
6591         kinds.
6593 2018-07-26  Martin Liska  <mliska@suse.cz>
6595         PR lto/86548
6596         * lto-wrapper.c: Add linker_output as prefix
6597         for ltrans_output_file.
6599 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
6601         PR rtl-optimization/85805
6602         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
6603         value for hard registers if that was written in the same mode.
6605 2018-07-26  Martin Liska  <mliska@suse.cz>
6607         PR gcov-profile/86536
6608         * gcov.c (format_gcov): Use printf format %.*f directly
6609         and do not handle special values.
6611 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6613         * common/config/arc/arc-common.c (arc_option_optimization_table):
6614         Update default optimizations for size.
6616 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6618         * config/arc/arc.md (movsf_insn): Add short instruction selection.
6619         * config/arc/constraints.md (CfZ): New constraint.
6620         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
6621         (subsf3_fpu): Likewise.
6622         (cmpsf_fpu): Likewise.
6623         (cmpsf_fpu_uneq): Likewise.
6625 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6627         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
6628         accesses as well.
6629         (arc_is_uncached_mem_p): uncached applies to both the variable and
6630         the pointer.
6632 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6634         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
6635         register names.
6637 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
6639         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
6640         field "m_scopes" from vec to auto_vec.
6642 2018-07-25  Martin Liska  <mliska@suse.cz>
6644         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
6645         return type.
6647 2018-07-25  Richard Biener  <rguenther@suse.de>
6649         PR debug/86654
6650         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
6651         special wrt context_die late.
6652         (gen_subprogram_die): Re-use DIEs in local scope.
6654 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
6656         PR tree-optimization/86644
6657         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
6659 2018-07-25  Martin Liska  <mliska@suse.cz>
6661         PR middle-end/86645
6662         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
6663         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
6665 2018-07-25  Martin Liska  <mliska@suse.cz>
6667         PR sanitizer/79635
6668         * params.def: Explain ASan abbreviation and provide
6669         a documentation link.
6671 2018-07-24  Martin Sebor  <msebor@redhat.com>
6673         PR tree-optimization/86622
6674         PR tree-optimization/86532
6675         * builtins.h (string_length): Declare.
6676         * builtins.c (c_strlen): Correct handling of non-constant offsets.
6677         (check_access): Be prepared for non-constant length ranges.
6678         (string_length): Make extern.
6679         * expr.c (string_constant): Only handle the minor non-constant
6680         array index.  Use string_constant to compute the length of
6681         a generic string constant.
6683 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
6685         PR tree-optimization/86618
6686         * tree-vect-stmts.c (vectorizable_call): Don't take the address
6687         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
6689 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
6691         PR tree-optimization/86636
6692         * json.cc (json::object::set): Fix comment.  Add assertions.
6693         (json::array::append): Move here from json.h.  Add comment and an
6694         assertion.
6695         (json::string::string): Likewise.
6696         * json.h (json::array::append): Move to json.cc.
6697         (json::string::string): Likewise.
6698         * optinfo-emit-json.cc
6699         (optrecord_json_writer::impl_location_to_json): Assert that we
6700         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
6701         wrapper around it.  Expand the location once, rather than three
6702         times.
6703         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
6704         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
6705         wrappers.
6706         (optrecord_json_writer::optinfo_to_json): Likewise, in four
6707         places.  Fix some overlong lines.
6709 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
6711         * config/aarch64/aarch64-simd.md
6712         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
6713         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
6714         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
6715         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
6716         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
6717         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
6718         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
6719         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
6720         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
6722 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
6724         PR middle-end/86627
6725         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
6726         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
6727         and abs_d == d, do the power of two handling if profitable.
6729 2018-07-24  Richard Biener  <rguenther@suse.de>
6731         * match.pd: Add BIT_FIELD_REF canonicalizations.
6733 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6735         PR c/86617
6736         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
6738 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6740         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
6741         terminated STRING_CST object.
6743 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6745         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
6747 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
6749         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
6750         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
6751         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
6752         the elements into a register.
6753         (rs6000_split_v4si_init_di_reg): Delete.
6754         (rs6000_split_v4si_init): Delete.
6755         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
6756         (vsx_init_v4si): Rewrite as a define_expand.
6758 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
6760         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
6761         zero_extend argument from memory): New.
6763 2018-07-22  Martin Sebor  <msebor@redhat.com>
6765         PR bootstrap/86621
6766         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
6767         diagnosing calls with unknown arguments unless -Walloca-larger-than
6768         is restricted to less than PTRDIFF_MAX bytes.
6770 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
6772         * doc/gcov.texi (Invoking Gcov): Editorial changes.
6774 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6776         * pretty-print.c (text_info::set_location): Remove redundant
6777         "line_table" parameter from call to rich_location::set_range.
6779 2018-07-20  Martin Sebor  <msebor@redhat.com>
6781         PR middle-end/82063
6782         * builtins.c (expand_builtin_alloca): Adjust.
6783         * calls.c (alloc_max_size): Simplify.
6784         * cgraphunit.c (cgraph_node::expand): Adjust.
6785         * common.opt (larger_than_size, warn_frame_larger_than): Remove
6786         variables.
6787         (frame_larger_than_size): Same.
6788         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
6789         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
6790         Initialize.
6791         * doc/invoke.texi (GCC Command Options): Document option arguments.
6792         Explain byte-size arguments and suffixes.
6793         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
6794         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
6795         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
6796         * doc/options.texi (UInteger): Expand.
6797         (Host_Wide_Int, ByteSize): Document new properties.
6798         * final.c (final_start_function_1): Include sizes in an error message.
6799         * function.c (frame_offset_overflow): Same.
6800         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
6801         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
6802         Diagnose unbounded alloca calls only for limits of less than
6803         PTRDIFF_MAX.
6804         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
6805         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
6806         for alloca(0).
6807         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
6808         only for limits of less than PTRDIFF_MAX.
6809         * langhooks-def.h (lhd_handle_option): Change function argument
6810         to HOST_WIDE_INT.
6811         * langhooks.c (lhd_handle_option): Same.
6812         * langhooks.h (handle_option): Same.
6813         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
6814         ByteSize flags.
6815         (var_type, var_type_struct): Same.
6816         (var_set): Handle ByteSize flag.
6817         * optc-gen.awk: Add comments to output to ease debugging.  Make
6818         use of HOST_WIDE_INT where appropriate.
6819         * opts-gen-save.awk:  Use %lx to format unsigned long.
6820         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
6821         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
6822         arguments.  Parse bytes-size suffixes.
6823         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
6824         (enum_value_to_arg): Same.
6825         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
6826         (handle_option): Adjust.
6827         (generate_option): Change function argument to HOST_WIDE_INT.
6828         (cmdline_handle_error): Adjust.
6829         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
6830         (set_option): Change function argument to HOST_WIDE_INT.
6831         (option_enabled): Handle cl_host_wide_int.
6832         (get_option_state): Handle CLVC_SIZE.
6833         (control_warning_option): Same.
6834         * opts.c (common_handle_option): Change function argument to
6835         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
6836         OPT_Wvla_larger_than_.
6837         * opts.h (enum cl_var_type): Add an enumerator.
6838         * stor-layout.c (layout_decl): Print a more meaningful warning.
6839         * toplev.c (output_stack_usage): Adjust.
6841 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
6843         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
6844         call to inline_expand_builtin_string_cmp.
6845         (expand_builtin_strcmp): Likewise.
6846         (expand_builtin_strncmp): Likewise.
6847         (inline_string_cmp): Delete the last parameter, change char_type_node
6848         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
6849         two operands.
6850         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
6851         the inlining expansion on target where the type of the call has same or
6852         narrower precision than unsigned char.
6854 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6856         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
6857         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
6858         * common.opt (fsave-optimization-record): New option.
6859         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
6860         * doc/invoke.texi (-fsave-optimization-record): New option.
6861         * dumpfile.c: Include "optinfo-emit-json.h".
6862         (struct kv_pair): Move to coretypes.h.
6863         (optgroup_options): Make non-static.
6864         (dump_context::end_scope): Call
6865         optimization_records_maybe_pop_dump_scope.
6866         * dumpfile.h (optgroup_options): New decl.
6867         * json.cc: New file.
6868         * json.h: New file.
6869         * optinfo-emit-json.cc: New file.
6870         * optinfo-emit-json.h: New file.
6871         * optinfo.cc: Include "optinfo-emit-json.h".
6872         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
6873         (optinfo_enabled_p): Check optimization_records_enabled_p.
6874         (optinfo_wants_inlining_info_p): Likewise.
6875         * optinfo.h: Update comment.
6876         * profile-count.c (profile_quality_as_string): New function.
6877         * profile-count.h (profile_quality_as_string): New decl.
6878         (profile_count::quality): New accessor.
6879         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
6880         and optinfo_emit_json_cc_tests.
6881         * selftest.h (selftest::json_cc_tests): New decl.
6882         (selftest::optinfo_emit_json_cc_tests): New decl.
6883         * toplev.c: Include "optinfo-emit-json.h".
6884         (compile_file): Call optimization_records_finish.
6885         (do_compile): Call optimization_records_start.
6886         * tree-ssa-live.c: Include optinfo.h.
6887         (remove_unused_scope_block_p): Retain inlining information if
6888         optinfo_wants_inlining_info_p returns true.
6890 2018-07-20  Richard Biener  <rguenther@suse.de>
6892         PR debug/86585
6893         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
6894         to cover -flto-partition=none.
6896 2018-07-20  Martin Liska  <mliska@suse.cz>
6898         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
6899         (get_decl_source_range): Remove unused function.
6901 2018-07-20  Richard Biener  <rguenther@suse.de>
6903         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
6904         (struct vn_phi_s): Likewise.
6905         (struct vn_reference_s): Likewise.
6906         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
6907         for searching the slot of an entry known to be in the hash itself.
6908         (vn_phi_hasher::equal): Likewise.
6909         (vn_reference_hasher::equal): Likewise.
6910         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
6911         globals.
6912         (optimistic_info, current_info): Remove, keeping only valid_info.
6913         (vn_reference_lookup_1): Remove fallback lookup.
6914         (vn_reference_lookup_2): Likewise.
6915         (vn_nary_op_lookup_1): Likewise.
6916         (vn_phi_lookup): Likewise.
6917         (vn_nary_build_or_lookup_1): Make sure to not chain the built
6918         hash element.
6919         (vn_reference_insert): Adjust, chain the inserted hash element
6920         at last_inserted_ref.
6921         (vn_reference_insert_pieces): Likewise.
6922         (visit_reference_op_call): Likewise.
6923         (vn_nary_op_insert_into): Chain the inserted hash element at
6924         last_inserted_nary.
6925         (vn_nary_op_insert_pieces): Adjust.
6926         (vn_nary_op_insert): Likewise.
6927         (vn_nary_op_insert_stmt): Likewise.
6928         (vn_phi_insert): Adjust, chain the inserted hash element at
6929         last_inserted_phi.
6930         (process_scc): Remove clearing and copying the optimistic
6931         table.  Instead remove elements inserted during an optimistic
6932         iteration from the single table we maintain.
6933         (init_scc_vn): Adjust.
6934         (free_scc_vn): Likewise.
6935         (sccvn_dom_walker::record_cond): Likewise.
6936         (sccvn_dom_walker::after_dom_children): Likewise.
6938 2018-07-19  Martin Sebor  <msebor@redhat.com>
6940         PR tree-optimization/84047
6941         PR tree-optimization/83776
6942         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
6943         (check_array_bounds): Call it.
6945 2018-07-19  Martin Sebor  <msebor@redhat.com>
6947         * align.h (align_flags): Use member initialization.
6949 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
6951         * Makefile.in (OBJS): Add optinfo.o.
6952         * coretypes.h (class symtab_node): New forward decl.
6953         (struct cgraph_node): New forward decl.
6954         (class varpool_node): New forward decl.
6955         * dump-context.h: New file.
6956         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
6957         "tree-pass.h".
6958         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
6959         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
6960         (set_alt_dump_file): Likewise.
6961         (dump_context::~dump_context): New dtor.
6962         (dump_gimple_stmt): Move implementation to...
6963         (dump_context::dump_gimple_stmt): ...this new member function.
6964         Add the stmt to any pending optinfo, creating one if need be.
6965         (dump_gimple_stmt_loc): Move implementation to...
6966         (dump_context::dump_gimple_stmt_loc): ...this new member function.
6967         Start a new optinfo and add the stmt to it.
6968         (dump_gimple_expr): Move implementation to...
6969         (dump_context::dump_gimple_expr): ...this new member function.
6970         Add the stmt to any pending optinfo, creating one if need be.
6971         (dump_gimple_expr_loc): Move implementation to...
6972         (dump_context::dump_gimple_expr_loc): ...this new member function.
6973         Start a new optinfo and add the stmt to it.
6974         (dump_generic_expr): Move implementation to...
6975         (dump_context::dump_generic_expr): ...this new member function.
6976         Add the tree to any pending optinfo, creating one if need be.
6977         (dump_generic_expr_loc): Move implementation to...
6978         (dump_context::dump_generic_expr_loc): ...this new member
6979         function.  Add the tree to any pending optinfo, creating one if
6980         need be.
6981         (dump_printf): Move implementation to...
6982         (dump_context::dump_printf_va): ...this new member function.  Add
6983         the text to any pending optinfo, creating one if need be.
6984         (dump_printf_loc): Move implementation to...
6985         (dump_context::dump_printf_loc_va): ...this new member function.
6986         Start a new optinfo and add the stmt to it.
6987         (dump_dec): Move implementation to...
6988         (dump_context::dump_dec): ...this new member function.  Add the
6989         value to any pending optinfo, creating one if need be.
6990         (dump_context::dump_symtab_node): New member function.
6991         (dump_context::get_scope_depth): New member function.
6992         (dump_context::begin_scope): New member function.
6993         (dump_context::end_scope): New member function.
6994         (dump_context::ensure_pending_optinfo): New member function.
6995         (dump_context::begin_next_optinfo): New member function.
6996         (dump_context::end_any_optinfo): New member function.
6997         (dump_context::s_current): New global.
6998         (dump_context::s_default): New global.
6999         (dump_scope_depth): Delete global.
7000         (dumpfile_ensure_any_optinfo_are_flushed): New function.
7001         (dump_symtab_node): New function.
7002         (get_dump_scope_depth): Reimplement in terms of dump_context.
7003         (dump_begin_scope): Likewise.
7004         (dump_end_scope): Likewise.
7005         (selftest::temp_dump_context::temp_dump_context): New ctor.
7006         (selftest::temp_dump_context::~temp_dump_context): New dtor.
7007         (selftest::verify_item): New function.
7008         (ASSERT_IS_TEXT): New macro.
7009         (ASSERT_IS_TREE): New macro.
7010         (ASSERT_IS_GIMPLE): New macro.
7011         (selftest::test_capture_of_dump_calls): New test.
7012         (selftest::dumpfile_c_tests): Call it.
7013         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7014         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7015         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7016         descriptive comment.
7017         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7018         (dump_node, dump_bb): Move these unrelated decls.
7019         (class dump_manager): Add leading comment.
7020         * optinfo.cc: New file.
7021         * optinfo.h: New file.
7023 2018-07-19  Michael Collison  <michael.collison@arm.com>
7024             Richard Henderson <rth@redhat.com>
7026         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7027         (subti): Handle op1 zero.
7028         (subvti4, usub4ti4): New.
7029         (*sub<GPI>3_compare1_imm): New.
7030         (sub<GPI>3_carryinCV): New.
7031         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7032         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7034 2018-07-19  Michael Collison  <michael.collison@arm.com>
7035             Richard Henderson <rth@redhat.com>
7037         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7038         (addti3): Create simpler code if low part is already known to be 0.
7039         (addvti4, uaddvti4): New.
7040         (*add<GPI>3_compareC_cconly_imm): New.
7041         (*add<GPI>3_compareC_cconly): New.
7042         (*add<GPI>3_compareC_imm): New.
7043         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7044         handle constants within this pattern..
7045         (*add<GPI>3_compareV_cconly_imm): New.
7046         (*add<GPI>3_compareV_cconly): New.
7047         (*add<GPI>3_compareV_imm): New.
7048         (add<GPI>3_compareV): New.
7049         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7050         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7051         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7052         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7053         with 'comparison' operator.
7054         (*add<GPI>3_compareV_cconly_imm): Ditto.
7055         (*add<GPI>3_compareV_cconly): Ditto.
7056         (*add<GPI>3_compareV_imm): Ditto.
7057         (add<GPI>3_compareV): Ditto.
7058         (add<mode>3_carryinC): Ditto.
7059         (*add<mode>3_carryinC_zero): Ditto.
7060         (*add<mode>3_carryinC): Ditto.
7061         (add<mode>3_carryinV): Ditto.
7062         (*add<mode>3_carryinV_zero): Ditto.
7063         (*add<mode>3_carryinV): Ditto.
7065 2018-07-19  Michael Collison  <michael.collison@arm.com>
7066             Richard Henderson <rth@redhat.com>
7068         * config/aarch64/aarch64-modes.def (CC_V): New.
7069         * config/aarch64/aarch64-protos.h
7070         (aarch64_addti_scratch_regs): Declare
7071         (aarch64_subvti_scratch_regs): Declare.
7072         (aarch64_expand_subvti): Declare.
7073         (aarch64_gen_unlikely_cbranch): Declare
7074         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7075         for signed overflow using CC_Vmode.
7076         (aarch64_get_condition_code_1): Handle CC_Vmode.
7077         (aarch64_gen_unlikely_cbranch): New function.
7078         (aarch64_addti_scratch_regs): New function.
7079         (aarch64_subvti_scratch_regs): New function.
7080         (aarch64_expand_subvti): New function.
7082 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7084         * config/aarch64/aarch64-option-extensions.def: New entry for profile
7085         extension.
7086         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7087         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7088         extension.
7090 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7092         PR target/83009
7093         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7094         address check not strict.
7096 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7098         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7099         Umq with Umn.
7100         (store_pair_lanes<mode>): Likewise.
7101         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7102         enum value 'ADDR_QUERY_LDP_STP_N'.
7103         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7104         (aarch64_print_address_internal): Add declaration.
7105         (aarch64_print_ldpstp_address): Remove.
7106         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7107         (aarch64_print_operand): Change printing of 'y'.
7108         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7109         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7110         'true' rather than '1'.
7111         * config/aarch64/constraints.md (Uml): Likewise.
7112         (Uml): Rename to Umn.
7113         (Umq): Remove.
7115 2018-07-19  Richard Biener  <rguenther@suse.de>
7117         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7118         a trailing array.
7119         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7120         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7121         (vn_reference_hasher): Likewise.
7122         (struct vn_tables_s): Remove obstack and alloc-pool members.
7123         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7124         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7125         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7126         (vn_reference_insert_pieces): Likewise.
7127         (alloc_vn_nary_op_noinit): Adjust.
7128         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7129         (vn_phi_eq): Adjust.
7130         (shared_lookup_phiargs): Remove.
7131         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7132         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7133         (visit_reference_op_call): Likewise.
7134         (copy_nary, copy_phi, copy_reference): Remove.
7135         (process_scc): Rewind the obstack when iterating.  Do not
7136         copy the elements to valid_info but just move them from one
7137         hashtable to the other.
7138         (allocate_vn_table): Adjust.
7139         (free_vn_table): Likewise.
7140         (init_scc_vn): Likewise.
7141         (free_scc_vn): Likewise.
7143 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
7145         PR target/86560
7146         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7147         indirect_return as function type attribute.
7148         (ix86_attribute_table): Change indirect_return to function
7149         type attribute.
7150         * doc/extend.texi: Update indirect_return attribute.
7152 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
7154         * wide-int.h (widest2_int): New.
7155         * gimple-fold.c (arith_overflowed_p): Use it.
7156         * tree.h (widest2_int_cst): New.
7157         * tree-vrp.c (wide_int_binop_overflow): Rename from
7158         vrp_int_const_binop.
7159         Rewrite to work on trees.
7160         (extract_range_from_multiplicative_op_1): Abstract code to...
7161         (wide_int_range_min_max): ...here.
7162         (wide_int_range_cross_product): ...and here.
7163         (extract_range_from_binary_expr_1): Abstract overflow code to...
7164         (wide_int_range_mult_wrapping): ...here.
7165         * tree-vrp.h (wide_int_range_cross_product): New.
7166         (wide_int_range_mult_wrapping): New.
7168 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
7169             Julia Koval  <julia.koval@intel.com>
7171         * config/i386/x86-tune-costs.h (skylake_memcpy,
7172         skylake_memset): Replace rep_prefix with unrolling for size 512.
7174 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
7176         PR middle-end/86544
7177         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7178         comparision with EQ_EXPR in last stmt.
7180 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7182         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7183         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7184         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7185         previously known as "PowerPC AltiVec Built-in Functions".  Move
7186         some material to new subsubsections "PowerPC AltiVec Built-in
7187         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7188         ISA 2.07".
7189         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7190         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7191         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7192         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7194 2018-07-18  Richard Biener  <rguenther@suse.de>
7196         PR tree-optimization/86557
7197         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7198         EXACT_DIV_EXPR.
7200 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
7202         * config/s390/s390.c (s390_function_profiler): Generate CFI.
7204 2018-07-17  Jeff Law  <law@redhat.com>
7206         * config/arm/arm.c (get_label_padding): Update for recent
7207         changes to label_to_alignment.
7209         PR tree-optimization/86010
7210         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7212         * config/mips/mips.c (vr4130_align_insns): Update for recent
7213         changes to label_to_alignment.
7215         * config/frv/frv.c (frv_label_align): Update for recent changes
7216         to label_to_alignment.
7218         * config/nios2/nios2.c (nios2_label_align): Update for recent
7219         changes which dropped ALIGN_LABELS_LOG.
7221 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
7223         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7224         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7226 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
7228         * config/arc/arc.c (arc_label_align): Use align_labels instead of
7229         deprecated align_labels_log.
7231 2018-07-17  Richard Biener  <rguenther@suse.de>
7233         PR lto/86456
7234         * dwarf2out.c (init_sections_and_labels): Always generate
7235         a debug_line_str_section for early LTO debug.
7236         (dwarf2out_finish): Reset debug_line_str_hash output early.
7237         Bump counter for extra dwarf5 .debug_loc labels to not conflict
7238         with fat LTO part.
7239         (dwarf2out_early_finish): Output debug_line_str.
7241 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7243         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7244         index register on z196 or later.
7246 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7248         * config/s390/s390.c (s390_default_align): Set default function
7249         alignment to 16.
7250         (s390_override_options_after_change): Call s390_default align.
7251         (s390_option_override_internal): Call s390_default_align.
7252         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7254 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7256         PR middle-end/86542
7257         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7258         to _looptemp_ clauses, other than the first two.
7260 2018-07-17  Martin Liska  <mliska@suse.cz>
7262         * opts.c: Do not enable OPT_falign_* for -Os.
7264 2018-07-17  Martin Liska  <mliska@suse.cz>
7266         * align.h (MAX_CODE_ALIGN): New.
7267         (MAX_CODE_ALIGN_VALUE): New.
7268         * common/config/i386/i386-common.c (ix86_handle_option):
7269         (MAX_CODE_ALIGN): Moved to align.h.
7270         * final.c (MAX_CODE_ALIGN): Likewise.
7271         * opts.c (parse_and_check_align_values):
7272         (MAX_CODE_ALIGN): Likewise.
7273         (MAX_CODE_ALIGN_VALUE): Likewise.
7275 2018-07-17  Martin Liska  <mliska@suse.cz>
7277         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7278         in order to fulfil coding style.
7279         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7280         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7281         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7282         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7283         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7284         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7285         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7286         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7287         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7289 2018-07-17  Martin Liska  <mliska@suse.cz>
7291         * align.h: New file.
7292         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7293         directly.
7294         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7295         align_flags of label_to_alignment.
7296         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7297         align_flags class.
7298         * config/m68k/m68k.c: Do not use removed align_labels_value and
7299         align_loops_value.
7300         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7301         (LOOP_ALIGN): Likewise.
7302         (LABEL_ALIGN): Likewise.
7303         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7304         Remove not used macro.
7305         (rs6000_loop_align): Change return type to align_flags.
7306         (rs6000_loop_align_max_skip): Remove.
7307         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7308         Change return type to align_flags.
7309         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7310         Remove not used macro.
7311         (rs6000_loop_align):  Change return type to align_flags.
7312         (rs6000_loop_align_max_skip): Remove.
7313         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7314         * config/rx/rx-protos.h (rx_align_for_label): Make it
7315         static function.
7316         * config/rx/rx.c (rx_align_for_label): Change return type
7317         to align_flags.
7318         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7319         macro definitions.
7320         into align_flags class.
7321         (LABEL_ALIGN): Likewise.
7322         (LOOP_ALIGN): Likewise.
7323         * config/s390/s390.c (s390_label_align): Use align_flags
7324         class member.
7325         (s390_asm_output_function_label): Likewise.
7326         * config/sh/sh.c (sh_override_options_after_change):
7327         Use align_flags class directly without macros.
7328         (find_barrier): Likewise.
7329         (barrier_align): Likewise.
7330         (sh_loop_align): Likewise.
7331         * config/spu/spu.c (spu_option_override):
7332         Use align_flags_tuple::get_value instead of removed macros.
7333         (spu_sched_init): Likewise.
7334         * config/spu/spu.h (GTY): Likewise.
7335         * config/visium/visium.c (visium_option_override):
7336         Set "8" as default secondary alignment.
7337         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7338         in order to guarantee secondary alignment of 8.
7339         * coretypes.h: Include align.h header file.
7340         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7341         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7342         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
7343         * doc/tm.texi.in: Likewise.
7344         * final.c (struct label_alignment): Remove not used structure.
7345         (LABEL_ALIGN): Change type to align_flags.
7346         (LOOP_ALIGN): Likewise.
7347         (JUMP_ALIGN): Likewise.
7348         (default_loop_align_max_skip): Remove.
7349         (default_label_align_max_skip): Likewise.
7350         (default_jump_align_max_skip): Likewise.
7351         (default_label_align_after_barrier_max_skip):
7352         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
7353         (LABEL_TO_MAX_SKIP): Remove.
7354         (label_to_alignment): Return align_flags type instead of integer.
7355         (label_to_max_skip): Remove.
7356         (align_fuzz): Use align_flags type.
7357         (compute_alignments): Use align_flags type and use align_flags::max
7358         to combine multiple alignments.
7359         (grow_label_align): Grow vec instead of C array.
7360         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
7361         (shorten_branches):  Use align_flags type and use align_flags::max
7362         to combine multiple alignments.
7363         (final_scan_insn_1): Remove usage of secondary alignment that comes
7364         from label alignment, but instead use proper secondary alignment
7365         which is computed in grow_label_align.
7366         * flags.h (struct align_flags_tuple): Move to align.h.
7367         (struct align_flags): Likewise.
7368         (state_align_loops): Rename to align_loops.
7369         (state_align_jumps): Rename to align_jumps.
7370         (state_align_labels): Rename to align_labels.
7371         (state_align_functions): Rename to align_functions.
7372         (align_loops_log): Remove.
7373         (align_jumps_log): Remove.
7374         (align_labels_log): Remove.
7375         (align_functions_log): Remove.
7376         (align_loops_max_skip): Remove.
7377         (align_jumps_max_skip): Remove.
7378         (align_labels_max_skip): Remove.
7379         (align_functions_max_skip): Remove.
7380         (align_loops_value): Remove.
7381         (align_jumps_value): Remove.
7382         (align_labels_value): Remove.
7383         (align_functions_value): Remove.
7384         * output.h (label_to_alignment): Change return type to align_flags.
7385         (label_to_max_skip): Remove.
7386         * target.def: Remove loop_align_max_skip, label_align_max_skip,
7387         jump_align_max_skip macros.
7388         * targhooks.h (default_loop_align_max_skip): Remove.
7389         (default_label_align_max_skip): Likewise.
7390         (default_jump_align_max_skip): Likewise.
7391         (default_label_align_after_barrier_max_skip): Remove.
7392         * toplev.c (read_log_maxskip): Use ::normalize function.
7393         (parse_N_M): Remove not used argument and also call ::normalize.
7394         (parse_alignment_opts): Do not pass unused arguments.
7395         * varasm.c (assemble_start_function): Use directly align_functions
7396         instead of removed macros.
7397         * system.h: Do not poison removed macros.
7399 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7401         PR middle-end/86539
7402         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
7403         and cond temporaries don't have reference type if iterator has
7404         pointer type.  For init use &for_pre_body instead of pre_p if
7405         for_pre_body is non-empty.
7407 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7409         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
7410         double-double modes to SFmode directly directly.
7411         (trunc<mode>sf2_fprs): Delete.
7413 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7415         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
7416         for conversions between IFmode and the decimal floating point modes.
7417         (init_float128_ieee): Use the correct names for conversions between
7418         KFmode and the decimal floating point modes.
7420 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7422         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
7423         for the conversions between TDmode and IFmode.
7424         (init_float128_ieee): Use more correct names for the conversions
7425         between TDmode and KFmode.
7427 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
7429         PR tree-optimization/86526
7430         * builtins.c (expand_builtin_memcmp): Formatting fixes.
7431         (inline_expand_builtin_string_cmp): Likewise.
7432         (inline_string_cmp): Likewise.  Use c_readstr instead of
7433         builtin_memcpy_read_str.  Add unit_mode temporary.
7435 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7437         PR middle-end/86528
7438         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
7439         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
7441 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7443         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
7444         Alphabetize prototypes of built-in functions, separating out
7445         built-in functions that are listed in this section but should be
7446         described elsewhere.
7448 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
7450         PR target/86511
7451         * expmed.c (emit_store_flag): Do not emit setcc followed by a
7452         conditional move when trapping comparison was split to a
7453         non-trapping one (and vice versa).
7455 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7457         * config/s390/s390.c (s390_function_profiler): Generate nops
7458         instead of profiler call sequences.
7459         * config/s390/s390.opt: Add the new option.
7461 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7463         * config/s390/s390.c (s390_function_profiler): Generate
7464         __mcount_loc section.
7465         * config/s390/s390.opt: Add the new option.
7467 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7469         * common.opt: Add the new warning.
7470         * config/s390/s390.c (s390_function_profiler): Emit "brasl
7471         %r0,__fentry__" when -mfentry is specified.
7472         (s390_option_override_internal): Disallow -mfentry for 31-bit
7473         CPUs.
7474         * config/s390/s390.opt: Add the new option.
7476 2018-07-16  Richard Biener  <rguenther@suse.de>
7478         PR lto/86523
7479         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
7480         for function-local FUNCTION_DECL and RESULT_DECL immediately.
7482 2018-07-16  Martin Liska  <mliska@suse.cz>
7484         PR ipa/86529
7485         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
7486         to ::get_create.
7488 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
7490         * config/arc/arcHS.md: Update ARCHS scheduling rules.
7492 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
7494         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
7495         for ARCHS4x.
7496         * config/arc/arc-cpus.def (hs4x): New cpu.
7497         (hs4xd): Likewise.
7498         * config/arc/arc-tables.opt: Regenerate.
7499         * config/arc/arc.c (arc_sched_issue_rate): New function.
7500         (TARGET_SCHED_ISSUE_RATE): Define.
7501         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
7502         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
7503         fpu_cvt.
7504         (attr tune): Add ARCHS4x tune values.
7505         (attr tune_dspmpy): Define.
7506         (*tst): Correct instruction type.
7507         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
7508         * config/arc/arcHS4x.md: New file.
7509         * config/arc/fpu.md: Update instruction type attributes.
7510         * config/arc/t-multilib: Regenerate.
7512 2018-07-16  Tom de Vries  <tdevries@suse.de>
7514         PR debug/86455
7515         * var-tracking.c (vt_initialize): Fix pre_dec handling.
7517 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7519         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
7520         early clobber.
7522 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
7524         PR tree-optimization/86514
7525         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
7526         conversion to a boolean type from a type with greater precision.
7528 2018-07-16  Tom de Vries  <tdevries@suse.de>
7530         * var-tracking.c (vt_initialize): Print adjusted insn slim if
7531         dump_flags request TDF_SLIM.
7533 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
7535         * fold-const.c (int_const_binop_1): Abstract...
7536         (wide_int_binop): ...wide int code here.
7537         (poly_int_binop): ...poly int code here.
7538         Abstract the rest of int_const_binop_1 into int_const_binop.
7539         * fold-const.h (wide_int_binop): New.
7540         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
7541         Remove useless PLUS/MINUS_EXPR case.
7542         (zero_nonzero_bits_from_vr): Move wide int code...
7543         (zero_nonzero_bits_from_bounds): ...here.
7544         (extract_range_from_binary_expr_1): Move mask optimization code...
7545         (range_easy_mask_min_max): ...here.
7546         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
7547         (range_easy_mask_min_max): New.
7549 2018-07-15  Jeff Law  <law@redhat.com>
7551         PR target/85993
7552         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
7553         block.
7555 2018-07-14  Jim Wilson  <jimw@sifive.com>
7557         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
7559 2018-07-14  Paul Koning  <ni1d@arrl.net>
7561         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
7563 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
7565         * lto-streamer-out.c (copy_function_or_variable): Dump info about
7566         copying section.
7568 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
7569             Steve Munroe  <munroesj52@gmail.com>
7571         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
7572         (_mm_andnot_si128): Likewise.
7573         (_mm_or_si128): Likewise.
7574         (_mm_xor_si128): Likewise.
7576 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
7578         PR middle-end/78809
7579         * builtins.c (expand_builtin_memcmp): Inline the calls first
7580         when result_eq is false.
7581         (expand_builtin_strcmp): Inline the calls first.
7582         (expand_builtin_strncmp): Likewise.
7583         (inline_string_cmp): New routine. Expand a string compare
7584         call by using a sequence of char comparison.
7585         (inline_expand_builtin_string_cmp): New routine. Inline expansion
7586         a call to str(n)cmp/memcmp.
7587         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
7588         New option.
7589         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
7591 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
7593         * config/arm/driver-arm.c: Include arm-native.h.
7594         (host_detect_local_cpu): Use auto-generated data tables.
7595         (vendors, arm_cpu_table): Delete.  Move part information to ...
7596         * config/arm/arm-cpus.in: ... here.
7597         * config/arm/parsecpu.awk (gen_native): New function.
7598         (vendor, part): New CPU fields.
7599         (END): Add support for building the native CPU detection tables.
7600         * config/arm/t-arm (arm-native.h): Add build rule.
7601         (driver-arm.o): Add dependency on arm-native.h.
7603 2018-07-13  Richard Biener  <rguenther@suse.de>
7605         PR middle-end/85974
7606         * match.pd (addr1 - addr2): Allow either of the operand to
7607         have a conversion.
7609 2018-07-13  Tom de Vries  <tdevries@suse.de>
7611         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
7612         in remap_ssa_name.
7614 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
7616         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
7617         arrays instead of numbered variables.
7619 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7621         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
7622         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
7624 2018-07-13  Richard Biener  <rguenther@suse.de>
7626         PR debug/86452
7627         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
7628         instead of get_context_die.
7630 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
7631             Richard Biener  <rguenther@suse.de>
7633         PR middle-end/86489
7634         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
7635         that the loop latch destination where phi is defined.
7637 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
7639         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
7640         (riscv_expand_epilogue): Add assertion to check interrupt mode.
7641         (riscv_set_current_function): Extract getting interrupt type to new
7642         function.
7643         (riscv_get_interrupt_type): New function.
7644         (riscv_merge_decl_attributes): New function, checking interrupt type is
7645         same.
7646         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
7648 2018-07-12  Paul Koning  <ni1d@arrl.net>
7650         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
7651         directive.
7653 2018-07-12  Paul Koning  <ni1d@arrl.net>
7655         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
7656         zero reference, add doloop_end instead.
7657         * doc/md.texi (decrement_and_branch_until_zero): Remove.
7658         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
7659         detail for doloop_end.
7661 2018-07-12  Martin Sebor  <msebor@redhat.com>
7663         PR c/86453
7664         * attribs.c (decl_attributes): Reject conflicting attributes before
7665         calling attribute handlers.
7667 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
7669         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
7670          parameter.
7671         (gcc::dump_manager::get_dump_file_name): likewise.
7672         (dump_begin): Likewise.
7673         * dumpfile.h (dump_begin): Update prototype.
7674         (gcc::dump_manager::get_dump_file_name,
7675         gcc::dump_manager::get_dump_file_name): Update prototype.
7677 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7679         * internal-fn.h (vectorizable_internal_fn_p): New function.
7680         * tree-vect-slp.c (compatible_calls_p): Likewise.
7681         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
7682         to internal functions.
7683         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
7685 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7687         * fold-const.h (inverse_conditions_p): Declare.
7688         * fold-const.c (inverse_conditions_p): New function.
7689         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
7690         that test the inverse condition of a conditional internal function.
7691         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
7692         * internal-fn.c (internal_fn_mask_index): Handle conditional
7693         internal functions.
7694         (vectorized_internal_fn_supported_p): New function.
7695         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
7696         (any_pred_load_store): Replace with...
7697         (need_to_predicate): ...this new variable.
7698         (redundant_ssa_names): New variable.
7699         (ifcvt_can_use_mask_load_store): Move initial checks to...
7700         (ifcvt_can_predicate): ...this new function.  Handle tree codes
7701         for which a conditional internal function exists.
7702         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
7703         instead of ifcvt_can_use_mask_load_store.  Update after variable
7704         name change.
7705         (predicate_load_or_store): New function, split out from
7706         predicate_mem_writes.
7707         (check_redundant_cond_expr): New function.
7708         (value_available_p): Likewise.
7709         (predicate_rhs_code): Likewise.
7710         (predicate_mem_writes): Rename to...
7711         (predicate_statements): ...this.  Use predicate_load_or_store
7712         and predicate_rhs_code.
7713         (combine_blocks, tree_if_conversion): Update after above name changes.
7714         (ifcvt_local_dce): Handle redundant_ssa_names.
7715         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
7716         general conditional functions.
7717         * tree-vect-stmts.c (vectorizable_call): Likewise.
7719 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7720             Alan Hayward  <alan.hayward@arm.com>
7721             David Sherwood  <david.sherwood@arm.com>
7723         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
7724         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
7725         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
7726         plus and minus and convert them into IFN_COND_FMA-based sequences.
7727         (convert_mult_to_fma): Handle conditional plus and minus.
7729 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7731         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
7732         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
7733         (cond_fnms_optab): New optabs.
7734         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
7735         internal functions.
7736         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
7737         * internal-fn.h (get_conditional_internal_fn): Declare.
7738         (get_unconditional_internal_fn): Likewise.
7739         * internal-fn.c (cond_ternary_direct): New macro.
7740         (expand_cond_ternary_optab_fn): Likewise.
7741         (direct_cond_ternary_optab_supported_p): Likewise.
7742         (FOR_EACH_COND_FN_PAIR): Likewise.
7743         (get_conditional_internal_fn): New function.
7744         (get_unconditional_internal_fn): Likewise.
7745         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
7746         (gimple_match_op::gimple_match_op): Add a new overload for 5
7747         operands.
7748         (gimple_match_op::set_op): Likewise.
7749         (gimple_resimplify5): Declare.
7750         * genmatch.c (decision_tree::gen): Generate simplifications for
7751         5 operands.
7752         * gimple-match-head.c (gimple_simplify): Define an overload for
7753         5 operands.  Handle calls with 5 arguments in the top-level overload.
7754         (convert_conditional_op): Handle conversions from unconditional
7755         internal functions to conditional ones.
7756         (gimple_resimplify5): New function.
7757         (build_call_internal): Pass a fifth operand.
7758         (maybe_push_res_to_seq): Likewise.
7759         (try_conditional_simplification): Try converting conditional
7760         internal functions to unconditional internal functions.
7761         Handle 3-operand unconditional forms.
7762         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
7763         Define ternary equivalents of the current rules for binary conditional
7764         internal functions.
7765         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
7766         ternary operations.
7767         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
7768         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
7769         (optab): Handle them.
7770         (SVE_COND_FP_TERNARY): New int iterator.
7771         (sve_fmla_op, sve_fmad_op): New int attributes.
7772         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
7773         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
7774         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
7776 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7778         * target.def (preferred_else_value): New target hook.
7779         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
7780         * doc/tm.texi: Regenerate.
7781         * targhooks.h (default_preferred_else_value): Declare.
7782         * targhooks.c (default_preferred_else_value): New function.
7783         * internal-fn.h (conditional_internal_fn_code): Declare.
7784         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
7785         (get_conditional_internal_fn): Use it.
7786         (conditional_internal_fn_code): New function.
7787         * gimple-match.h (gimple_match_cond): New struct.
7788         (gimple_match_op): Add a cond member function.
7789         (gimple_match_op::gimple_match_op): Update all forms to take a
7790         gimple_match_cond.
7791         * genmatch.c (expr::gen_transform): Use the same condition as res_op
7792         for the suboperation, but don't specify a particular else_value.
7793         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
7794         (visit_nary_op, visit_reference_op_load): Pass
7795         gimple_match_cond::UNCOND to the gimple_match_op constructor.
7796         * gimple-match-head.c: Include tree-eh.h
7797         (convert_conditional_op): New function.
7798         (maybe_resimplify_conditional_op): Likewise.
7799         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
7800         (gimple_resimplify2): Likewise.
7801         (gimple_resimplify3): Likewise.
7802         (gimple_resimplify4): Likewise.
7803         (maybe_push_res_to_seq): Return null for conditional operations.
7804         (try_conditional_simplification): New function.
7805         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
7806         constructor.
7807         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
7808         IFN_COND_* call.
7809         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
7810         function.
7811         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
7813 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
7815         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7816         DECL_FCONTEXT
7817         (hash_tree): Do not hash DECL_FCONTEXT
7818         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
7819         Do not stream DECL_FCONTEXT.
7820         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
7821         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
7823 2018-07-12  Richard Biener  <rguenther@suse.de>
7825         PR debug/86462
7826         * dwarf2out.c (gen_block_die): Only output blocks when they have
7827         at least one !DECL_IGNORED_P variable.
7829 2018-07-12  Richard Biener  <rguenther@suse.de>
7831         PR target/84829
7832         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
7833         Remove -mieee-fp handling.
7835 2018-07-12  Richard Biener  <rguenther@suse.de>
7837         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
7838         left-over from last patch.
7840 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
7842         PR tree-optimization/86492
7843         * gimple-ssa-store-merging.c
7844         (imm_store_chain_info::coalesce_immediate_stores): Call
7845         check_no_overlap even for the merge_overlapping case.  Formatting fix.
7847 2018-07-12  Richard Biener  <rguenther@suse.de>
7849         PR middle-end/86479
7850         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
7851         move possibly trapping operations into the conditional.
7853 2018-07-12  Richard Biener  <rguenther@suse.de>
7855         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
7856         (vn_lookup_simplify_result): Remove recursion limit applied
7857         here.
7858         (vn_nary_build_or_lookup_1): Adjust.
7859         (try_to_simplify): Likewise.
7860         * gimple-match-head.c (gimple_resimplify1): Instead apply one
7861         here.
7862         (gimple_resimplify2): Likewise.
7863         (gimple_resimplify3): Likewise.
7864         (gimple_resimplify4): Likewise.
7866 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
7868         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
7869         Use __mmask64 type instead of __mmask8 for __M argument.
7870         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
7871         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
7872         __U argument.
7873         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
7874         __mmask16 for __M argument.
7875         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
7876         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
7877         to __mmask16 instead of __mmask8.
7878         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
7879         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
7880         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
7881         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
7882         instead of __mmask16 for __U argument.
7883         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
7884         __mmask16 instead of __mmask8 for __U argument.
7885         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
7886         __U argument.
7887         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
7888         __mmask16.
7889         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
7890         argument.
7891         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
7892         __U argument.
7893         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
7894         __mmask16.
7895         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
7896         of __mmask16.
7897         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
7898         __U argument.
7899         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
7900         __U argument.
7901         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
7902         __U argument.
7903         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
7904         __U argument.
7905         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
7906         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
7907         return type as well as __M argument type and all casts from __mmask8
7908         to __mmask32.
7909         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
7910         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
7911         return type as well as __M argument type and all casts from __mmask8
7912         to __mmask16.
7913         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
7914         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
7915         return type as well as __M argument type and all casts from __mmask8
7916         to __mmask32.
7917         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
7918         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
7919         return type as well as __M argument type and all casts from __mmask8
7920         to __mmask16.
7921         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
7922         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
7923         __mmask16.
7925 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
7927         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
7928         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
7929         for __U argument.
7931 2018-07-11  Paul Koning  <ni1d@arrl.net>
7933         * doc/md.texi (define_subst): Document how multiple occurrences of
7934         the same argument in the replacement pattern are handled.
7936 2018-07-11  Paul Koning  <ni1d@arrl.net>
7938         * doc/extend.texi (Common Variable Attributes): Move "mode" into
7939         alphabetical order.
7940         (Common Type Attributes): Add "mode" attribute.
7942 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
7944         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
7945         stream DECL_ORIGINAL_TYPE.
7946         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
7947         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
7948         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
7949         Do not walk original type.
7950         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
7951         external decls.
7952         (write_ts_decl_non_common_tree_pointers): Do not stream
7953         DECL_ORIGINAL_TYPE
7954         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
7955         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
7957 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7959         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
7960         thread twice from the same starting edge.
7962 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7964         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
7965         * gimple.c (gimple_call_nonnull_result_p): ...here...
7966         (gimple_call_nonnull_arg): ...and here.
7967         * gimple.h (gimple_call_nonnull_result_p): New.
7968         (gimple_call_nonnull_arg): New.
7970 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
7972         * config/arm/arm-cpus.in: Move information from fpu field of each
7973         cpu definition to the isa field.
7974         * config/arm/parsecpu.awk (fpu): Delete match rule.
7975         (gen_comm_data): Don't add bits from the CPU's FPU entry.
7977 2018-07-11  Richard Biener  <rguenther@suse.de>
7979         PR debug/86457
7980         * dwarf2out.c (init_sections_and_labels): Use
7981         output_asm_line_debug_info consistently.
7982         (dwarf2out_early_finish): Likewise.
7983         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
7984         type units.
7986 2018-07-11  Richard Biener  <rguenther@suse.de>
7988         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
7989         Rework father_bb setting in a way to avoid propagating constants
7990         multiple times on a loop body.
7992 2018-07-10  Mark Wielaard  <mark@klomp.org>
7994         PR debug/86459
7995         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
7997 2018-07-10  Richard Biener  <rguenther@suse.de>
7999         * hash-map.h (hash_map::iterator::operator*): Return
8000         references to key and value.
8002 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
8004         PR c++/86443
8005         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8006         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8007         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8008         (gimplify_omp_for): For composite loops, move outer
8009         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8010         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
8011         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
8012         TREE_LIST for both the original class iterator and the "last" helper
8013         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
8014         loop, remember has_decl_expr from outer composite loops for the
8015         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8017 2018-07-09  Martin Sebor  <msebor@redhat.com>
8019         PR middle-end/77357
8020         PR middle-end/86428
8021         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8022         accessing implicitly initialized array elements.
8023         * expr.c (string_constant): Handle string initializers of
8024         character arrays within aggregates.
8025         * gimple-fold.c (fold_array_ctor_reference): Add argument.
8026         Store element offset.  As a special case, handle zero size.
8027         (fold_nonarray_ctor_reference): Same.
8028         (fold_ctor_reference): Add argument.  Store subobject offset.
8029         * gimple-fold.h (fold_ctor_reference): Add argument.
8031 2018-07-09  Paul Koning  <ni1d@arrl.net>
8033         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8034         (pdp11_insn_cost): New function.
8035         (pdp11_md_asm_adjust): New function.
8036         (TARGET_INVALID_WITHIN_DOLOOP): Define.
8037         (pdp11_rtx_costs): Update to match machine better.
8038         (output_addr_const_pdp11): Correct format mismatch warnings.
8039         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8040         * config/pdp11/pdp11.md: General change to add base_cost and/or
8041         length attributes for use by new pdp11_insn_cost function.
8042         (MIN_BRANCH): Correct definition.
8043         (MIN_SOB): Ditto.
8044         (doloop_end): Use standard pattern name for looping pattern.
8045         (doloop_end_nocc): New.
8046         (movsf): Add another constraint alternative.
8047         (zero_extendqihi2): Add constraint alternatives for not in place
8048         extend.
8049         (zero_extendhisi2): Remove.
8050         (shift patterns): Add CC handling variants.
8051         (bswaphi2): New.
8052         (bswapsi2): New.
8053         (rothi3): New.
8054         (define_peephole2): New peephole to recognize mov that sets CC for
8055         subsequent test.
8057 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8059         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8060         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8061         wi::add.
8063 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
8065         PR c/86420
8066         * real.c (real_nextafter): Return true if result is denormal.
8068 2018-07-09  Martin Liska  <mliska@suse.cz>
8070         * common.opt: Add back wrongly removed attribute.
8072 2018-07-09  Richard Biener  <rguenther@suse.de>
8074         PR debug/86413
8075         * dwarf2out.c (gen_block_die): For an early generated DIE
8076         always output high/low PC attributes.
8078 2018-07-09  Tom de Vries  <tdevries@suse.de>
8080         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8081         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8082         onto VAR_DECL with abstract origin.
8084 2018-07-07  Jim Wilson  <jimw@sifive.com>
8086         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8088 2018-07-07  Tom de Vries  <tdevries@suse.de>
8090         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8092 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
8094         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8095         overflow_type.
8096         (combine_bound): Use wide-int overflow calculation instead of
8097         rolling our own.
8098         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8099         overflow_type.
8100         * fold-const.c (int_const_binop_2): Same.
8101         (extract_muldiv_1): Same.
8102         (fold_div_compare): Same.
8103         (fold_abs_const): Same.
8104         * match.pd: Same.
8105         * poly-int.h (add): Same.
8106         (sub): Same.
8107         (neg): Same.
8108         (mul): Same.
8109         * predict.c (predict_iv_comparison): Same.
8110         * profile-count.c (slow_safe_scale_64bit): Same.
8111         * simplify-rtx.c (simplify_const_binary_operation): Same.
8112         * tree-chrec.c (tree_fold_binomial): Same.
8113         * tree-data-ref.c (split_constant_offset_1): Same.
8114         * tree-if-conv.c (idx_within_array_bound): Same.
8115         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8116         * tree-ssa-phiopt.c (minmax_replacement): Same.
8117         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8118         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8119         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8120         * wide-int.cc (wi::add_large): Same.
8121         (wi::mul_internal): Same.
8122         (wi::sub_large): Same.
8123         (wi::divmod_internal): Same.
8124         * wide-int.h: Change overflow type to overflow_type for neg, add,
8125         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8126         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8127         mul_internal, divmod_internal.
8128         (overflow_type): New enum.
8129         (accumulate_overflow): New.
8131 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8133         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8134         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8136 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8138         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8139         argument is checked for zero before entering loop, avoid checking again.
8141 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8143         * gimplify.h (generic_expr_could_trap_p): Set as global function.
8144         * gimplify.h (generic_expr_could_trap_p): Likwise.
8145         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8147 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
8149         PR tree-optimization/86401
8150         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8151         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8152         (fold_bit_and_mask): ... here.  New helper function for match.pd.
8153         * fold-const.h (fold_bit_and_mask): Declare.
8154         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8156 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
8158         PR target/86324
8159         * target.def (translate_mode_attribute): New hook.
8160         * targhooks.h (default_translate_mode_attribute): Declare.
8161         * targhooks.c (default_translate_mode_attribute): New function.
8162         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8163         * doc/tm.texi: Regenerate.
8164         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8165         (rs6000_translate_mode_attribute): New function.
8167 2018-07-06  Paul Koning  <ni1d@arrl.net>
8169         * doc/md.texi (define_split): Document DONE and FAIL.
8170         (define_peephole2): Ditto.
8172 2018-07-05  Jeff Law  <law@redhat.com>
8174         PR tree-optimization/86010
8175         * tree-ssa-dse.c (compute_trims): More aggressively trim at
8176         both the head and tail of mem* and str* calls.
8178 2018-07-05  Jim Wilson  <jimw@sifive.com>
8180         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8182 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
8184         * config/aarch64/aarch64-simd.md: correct flags text for
8185         MIN_EXPR replacement.
8187 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
8189         * configure: Regenerated.
8191 2018-07-05  Carl Love  <cel@us.ibm.com>
8193         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8194         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8195         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8196         VSX_BUILTIN_DOUBLEL_V4SF.
8198 2018-07-05  Martin Sebor  <msebor@redhat.com>
8200         PR c++/86400
8201         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8202         than its domain to compute its the upper bound of a char array.
8204 2018-07-05  Nathan Sidwell  <nathan@acm.org>
8206         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8207         * doc/cpp.texi: Update comment.
8208         * doc/tm.texi: Rebuilt.
8209         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8210         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8211         * doc/extend.texi (Backwards Compatibility): Clarify it is system
8212         headers affected by extern "C".
8213         * system.h: Poison NO_IMPLICIT_EXTERN_C.
8214         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8215         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8216         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8217         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8218         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8219         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8220         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8221         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8222         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8223         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8224         config/sparc/sp64-elf.h, config/spu/spu.h,
8225         config/stormy16/stormy16.h, config/v850/v850.h,
8226         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8227         define NO_IMPLICIT_EXTERN_C.
8228         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8230 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8232         PR target/84711
8233         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8234         instead of GET_MODE_SIZE when comparing Units.
8236 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8238         PR target/84711
8239         * rtlanal.c (set_noop_p): Constrain on mode change,
8240         include hard-reg-set.h
8242 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8244         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8246 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
8248         Revert
8249         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8251         PR sanitizer/84250
8252         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8253         libasan.
8254         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8256 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8258         PR sanitizer/84250
8259         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8260         libasan.
8261         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8263 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
8265         PR middle-end/86380
8266         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8268 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
8270         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8271         neg_*_op* variables.
8273 2018-07-04  Martin Liska  <mliska@suse.cz>
8275         * tree-switch-conversion.c: Define
8276         max_ratio_for_speed and max_ratio_for_size constants.
8278 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8279             Martin Liska  <mliska@suse.cz>
8281         PR middle-end/66240
8282         PR target/45996
8283         PR c/84100
8284         * common.opt: Rename align options with 'str_' prefix.
8285         * common/config/i386/i386-common.c (set_malign_value): New
8286         function.
8287         (ix86_handle_option): Use it to set -falign-* options/
8288         * config/aarch64/aarch64-protos.h (struct tune_params): Change
8289         type from int to string.
8290         * config/aarch64/aarch64.c: Update default values from int
8291         to string.
8292         * config/alpha/alpha.c (alpha_override_options_after_change):
8293         Likewise.
8294         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8295         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8296         max skip conditionally.
8297         * config/i386/freebsd.h (SUBALIGN_LOG): New.
8298         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8299         max skip conditionally.
8300         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8301         max skip conditionally.
8302         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8303         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8304         max skip conditionally.
8305         * config/i386/i386.c (struct ptt): Change type from int to
8306         string.
8307         (ix86_default_align): Set default values.
8308         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8309         max skip conditionally.
8310         * config/i386/iamcu.h (SUBALIGN_LOG): New.
8311         (ASM_OUTPUT_MAX_SKIP_ALIGN):
8312         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8313         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8314         max skip conditionally.
8315         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8316         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8317         * config/i386/x86-64.h (SUBALIGN_LOG): New.
8318         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8319         max skip conditionally.
8320         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8321         * config/ia64/ia64.c (ia64_option_override): Set default values
8322         for alignment options.
8323         * config/m68k/m68k.c: Handle new str_align_* options.
8324         * config/mips/mips.c (mips_set_compression_mode): Change
8325         type of constants.
8326         (mips_option_override): Set default values for options.
8327         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8328         Likewise.
8329         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8330         Likewise.
8331         * config/rx/rx.c (rx_option_override): Likewise.
8332         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8333         (LABEL_ALIGN): Use align_labels_log.
8334         (LOOP_ALIGN): Use align_loops_align.
8335         * config/s390/s390.c (s390_asm_output_function_label): Use new
8336         macros.
8337         * config/sh/sh.c (sh_override_options_after_change):
8338         Change type of constants.
8339         * config/spu/spu.c (spu_sched_init): Likewise.
8340         * config/sparc/sparc.c (sparc_option_override): Set default
8341         values for options.
8342         * config/visium/visium.c (visium_option_override): Likewise.
8343         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
8344         emit p2align format with last argument if it's not needed.
8345         * doc/invoke.texi: Document extended format of -falign-*.
8346         * final.c: Use align_labels alignment.
8347         * flags.h (struct target_flag_state): Change type to use
8348         align_flags.
8349         (struct align_flags_tuple): New.
8350         (struct align_flags): Likewise.
8351         (align_loops_log): Redefine macro to use new types.
8352         (align_loops_max_skip): Redefine macro to use new types.
8353         (align_jumps_log): Redefine macro to use new types.
8354         (align_jumps_max_skip): Redefine macro to use new types.
8355         (align_labels_log): Redefine macro to use new types.
8356         (align_labels_max_skip): Redefine macro to use new types.
8357         (align_functions_log): Redefine macro to use new types.
8358         (align_loops): Redefine macro to use new types.
8359         (align_jumps): Redefine macro to use new types.
8360         (align_labels): Redefine macro to use new types.
8361         (align_functions): Redefine macro to use new types.
8362         (align_functions_max_skip): Redefine macro to use new types.
8363         (align_loops_value): New macro.
8364         (align_jumps_value): New macro.
8365         (align_labels_value): New macro.
8366         (align_functions_value): New macro.
8367         * function.c (invoke_set_current_function_hook): Propagate
8368         alignment values from flags to global variables default in
8369         topleev.h.
8370         * ipa-icf.c (sem_function::equals_wpa): Use
8371         cl_optimization_option_eq instead of memcmp.
8372         * lto-streamer.h (cl_optimization_stream_out): Support streaming
8373         of string types.
8374         (cl_optimization_stream_in): Likewise.
8375         * optc-save-gen.awk: Support strings in cl_optimization.
8376         * opth-gen.awk: Likewise.
8377         * opts.c (finish_options): Remove error checking of invalid
8378         value ranges.
8379         (MAX_CODE_ALIGN): Remove.
8380         (MAX_CODE_ALIGN_VALUE): Likewise.
8381         (parse_and_check_align_values): New function.
8382         (check_alignment_argument): Likewise.
8383         (common_handle_option): Use check_alignment_argument.
8384         * opts.h (parse_and_check_align_values): Declare.
8385         * toplev.c (init_alignments): Remove.
8386         (read_log_maxskip): New.
8387         (parse_N_M): Likewise.
8388         (parse_alignment_opts): Likewise.
8389         (backend_init_target): Remove usage of init_alignments.
8390         * toplev.h (parse_alignment_opts): Declare.
8391         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
8392         argument.
8393         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
8394         * tree.c (cl_option_hasher::equal): New.
8395         * varasm.c: Use new global macros.
8397 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8399         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
8400         Use a simpler align directive also if MAXSKIP = ALIGN-1.
8401         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8402         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8403         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8404         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8405         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
8406         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
8407         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
8408         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8409         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8410         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8411         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8413 2018-07-04  Martin Liska  <mliska@suse.cz>
8414             Jonathan Wakely  <jwakely@redhat.com>
8416         * coverage.c: Use correct type.
8417         * doc/invoke.texi: Language correction.
8419 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
8421         PR target/85620
8422         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
8423         ENDBRANCH for non-tail call which may return via indirect branch.
8424         * doc/extend.texi: Document indirect_return attribute.
8426 2018-07-03  Martin Sebor  <msebor@redhat.com>
8428         PR tree-optimization/86274
8429         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
8430         precondition.
8431         (format_floating): Correct handling of infinities and NaNs.
8433 2018-07-03  Martin Sebor  <msebor@redhat.com>
8435         * print-tree.c (print_real_cst): New function.
8436         (print_node_brief): Call it.
8437         (print_node): Ditto.
8439 2018-07-03  Jeff Law  <law@redhat.com>
8441         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
8442         into a single pattern.
8444         * config/h8300/h8300.md (ors code_iterator): New.
8445         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
8446         a single pattern and single splitter.
8447         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
8448         (iorqi3_1, xorqi3_1): Likewise.
8449         (iorqi3, xorqi3 expanders): Similarly.
8451         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
8452         (movmd_internal) into a single pattern using the P mode iterator.
8453         (movmd splitters): Similarly.
8454         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
8455         (movsd splitters): Similarly.
8457         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
8458         ADDB, ADDW and ADDL into a single ADD attribute which selects the
8459         right table based on the size of the operand.
8460         * config/h8300/h8300.md (length_table): Corresponding changes. All
8461         references to "addb", "addw" and "addl" changed to "add".
8462         (btst patterns): Merge two variants into a single pattern.
8463         (tstqi, tsthi): Likewise.
8464         (addhi3_incdec, addsi3_incdec): Likewise.
8465         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
8466         (mulhi3, mulsi3): Likewise.
8467         (udivhi3, udivsi3): Likewise.
8468         (divhi3, divsi3): Likewise.
8469         (andorqi3, andorhi3, andorsi3): Likewise.
8471 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
8473         PR target/85694
8474         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
8475         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
8477 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8479         PR tree-optimization/85694
8480         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
8481         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
8482         UNSPEC_URHADD.
8483         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
8484         (<u>avg<mode>3_ceil): New patterns.
8486 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
8488         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
8489         scan-tree-dump directive.
8490         * gcc.dg/vect/slp-perm-2.c: Likewise.
8491         * gcc.dg/vect/slp-perm-3.c: Likewise.
8492         * gcc.dg/vect/slp-perm-5.c: Likewise.
8493         * gcc.dg/vect/slp-perm-6.c: Likewise.
8494         * gcc.dg/vect/slp-perm-7.c: Likewise.
8495         * gcc.dg/vect/slp-perm-8.c: Likewise.
8497 2018-07-03  Marek Polacek  <polacek@redhat.com>
8499         PR middle-end/86202
8500         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
8502 2018-07-03  Richard Biener  <rguenther@suse.de>
8504         PR ipa/86389
8505         * tree-ssa-structalias.c (find_func_clobbers): Properly
8506         handle indirect calls.
8508 2018-07-03  Jeff Law  <law@redhat.com>
8510         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
8511         (shifts): New code iterator.
8512         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
8513         expander.  Fix HImode handling on H8/SX.
8514         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
8515         (subqi3, subhi3, subsi3 expanders): Likewise.
8516         (andqi3, andhi3, andsi3 expanders): Likewise.
8517         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
8518         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
8519         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
8520         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
8521         (zero_extendqihi2, zero_extendqisi2): Likewise.
8522         (extendqihi2, extendqisi2): Likewise.
8523         (rotlqi3, rotlhi3, rotlsi3): Likewise.
8524         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
8525         (rotlqi3_1, rotlhi3_1): Likewise.
8526         (logicalhi3_sn, logicalsi3_sn): Likewise.
8527         (logicalhi3, logicalsi3): Likewise.
8529 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8531         * tree-vect-patterns.c (vect_recog_rotate_pattern)
8532         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8533         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
8534         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
8535         type to append_pattern_def_seq instead of creating a stmt_vec_info
8536         directly.
8537         (build_mask_conversion): Likewise.  Remove vinfo argument.
8538         (vect_add_conversion_to_patterm): Likewise, renaming to...
8539         (vect_add_conversion_to_pattern): ...this.
8540         (vect_recog_mask_conversion_pattern): Update call to
8541         build_mask_conversion.  Pass the vector type to
8542         append_pattern_def_seq here too.
8543         (vect_recog_gather_scatter_pattern): Update call to
8544         vect_add_conversion_to_pattern.
8546 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8548         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
8549         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8550         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
8551         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
8552         STMT_VINFO_PATTERN_DEF_SEQ to null here.
8553         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
8554         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
8555         append_pattern_def_seq instead of new_pattern_def_seq.
8556         (vect_recog_divmod_pattern): Do both of the above.
8557         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
8558         is null.
8560 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8562         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
8563         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
8564         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
8565         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
8566         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
8567         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8568         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
8569         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8570         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8571         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
8572         parameter with a single stmt_vec_info.
8573         (vect_recog_func_ptr): Likewise.
8574         (vect_recog_gather_scatter_pattern): Likewise, folding in...
8575         (vect_try_gather_scatter_pattern): ...this.
8576         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
8577         the stmt_vec_info of the statement to be matched.  Don't clear
8578         STMT_VINFO_RELATED_STMT.
8579         (vect_pattern_recog): Update call accordingly.
8581 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8583         PR tree-optimization/85694
8584         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
8585         (uavgM3_ceil): Document new optabs.
8586         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
8587         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
8588         functions.
8589         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
8590         (savg_ceil_optab): New optabs.
8591         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
8592         (vect_vect_recog_func_ptrs): Add it.
8593         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
8594         constant directly from the associated lhs.
8596 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8598         * tree-vect-patterns.c (vect_split_statement): New function.
8599         (vect_convert_input): Use it to try to split an existing cast.
8601 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8603         * poly-int.h (print_hex): New function.
8604         * dumpfile.h (dump_dec, dump_hex): Declare.
8605         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
8606         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
8607         min_input_precision, operation_precision and operation_sign.
8608         * tree-vect-patterns.c (vect_get_range_info): New function.
8609         (vect_same_loop_or_bb_p, vect_single_imm_use)
8610         (vect_operation_fits_smaller_type): Delete.
8611         (vect_look_through_possible_promotion): Add an optional
8612         single_use_p parameter.
8613         (vect_recog_over_widening_pattern): Rewrite to use new
8614         stmt_vec_info infomration.  Handle one operation at a time.
8615         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
8616         (vect_truncatable_operation_p, vect_set_operation_type)
8617         (vect_set_min_input_precision): New functions.
8618         (vect_determine_min_output_precision_1): Likewise.
8619         (vect_determine_min_output_precision): Likewise.
8620         (vect_determine_precisions_from_range): Likewise.
8621         (vect_determine_precisions_from_users): Likewise.
8622         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
8623         (vect_vect_recog_func_ptrs): Put over_widening first.
8624         Add cast_forwprop.
8625         (vect_pattern_recog): Call vect_determine_precisions.
8627 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8629         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
8630         statements that have been replaced by further pattern statements.
8631         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
8633 2018-07-03  Richard Biener  <rguenther@suse.de>
8635         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
8636         always set *dt.  Dump vectype in vectype overload.
8637         * dumpfile.h (dump_gimple_expr): New function.
8638         (dump_gimple_expr_loc): Likewise.
8639         * dumpfile.c (dump_gimple_expr): New function.
8640         (dump_gimple_expr_loc): Likewise.
8642 2018-07-02  Jeff Law  <law@redhat.com>
8644         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
8645         the H8/300, H8/300H and H8/S variants into a single pattern.
8646         (movhi_h8300, movqi_h8300hs): Similarly.
8647         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
8648         (QHI mode iterator): New.
8650         * config/h8300/h8300.md: Remove trailing whitespace.
8652 2018-07-02  Jim Wilson  <jimw@sifive.com>
8654         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
8655         instead of emit_insn for interrupt returns.
8656         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
8657         (riscv_sret, riscv_uret): Likewise.
8659 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
8661         * pretty-print.c (selftest::test_pp_format): Move save and restore
8662         of quotes to class auto_fix_quotes, and add an instance.
8663         * selftest.c: Include "intl.h".
8664         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
8665         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
8666         * selftest.h (selftest::auto_fix_quotes): New class.
8668 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
8670         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
8671         (aarch64_sve_prepare_conditional_op): Remove.
8672         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
8673         Allow aarch64_simd_reg_or_zero as select operand; remove
8674         the aarch64_sve_prepare_conditional_op call.
8675         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
8676         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8677         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
8678         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
8679         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
8680         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
8681         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
8682         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
8683         and a splitters to match all of the *_any patterns.
8684         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
8686         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
8687         (SVE_COND_FP_BINARY_REV): Remove.
8688         (sve_int_op_rev, sve_fp_op_rev): New.
8689         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
8690         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
8691         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
8692         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
8693         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
8694         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
8695         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
8696         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
8697         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
8699         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
8700         Remove match_dup 1 from the inner unspec.
8701         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8703         * config/aarch64/aarch64.md (movprfx): New attr.
8704         (length): Default movprfx to 8.
8705         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
8706         (*madd<SVE_I>, *msub<SVE_I): Likewise.
8707         (*<su>mul<SVE_I>3_highpart): Likewise.
8708         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
8709         (*v<ASHIFT><SVE_I>3): Likewise.
8710         (*<su><MAXMIN><SVE_I>3): Likewise.
8711         (*<su><MAXMIN><SVE_F>3): Likewise.
8712         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
8713         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
8714         (*div<SVE_F>4): Likewise.
8716 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
8718         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
8719         in dump string.
8721 2018-07-02  Richard Biener  <rguenther@suse.de>
8723         PR tree-optimization/86363
8724         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
8725         memset argument refers to a non-variable address.
8727 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
8729         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
8730         {PLUS,MINUS}_EXPR code to...
8731         (adjust_symbolic_bound): ...here,
8732         (combine_bound): ...here,
8733         (set_value_range_with_overflow): ...and here.
8735 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
8737         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
8738         code...
8739         (extract_range_from_abs_expr): ...here.
8741 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8743         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
8744         -fno-omit-frame-pointer when not optimizing.
8746 2018-07-02  Martin Liska  <mliska@suse.cz>
8748         PR ipa/86279
8749         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
8750         (propagate_nothrow): Likewise.
8752 2018-07-02  Martin Liska  <mliska@suse.cz>
8754         PR ipa/86323
8755         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
8757 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
8759         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
8760         function in r262149, changing "loc" param from source_location to
8761         const dump_location_t &.
8762         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
8763         declaration, as above.
8765 2018-07-01  Paul Koning  <ni1d@arrl.net>
8767         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8768         -munit-asm, -mgnu-asm, -mdec-asm.
8769         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
8770         (pdp11_output_labelref): New.
8771         (pdp11_output_def): New.
8772         (pdp11_output_addr_vec_elt): New.
8773         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
8774         %# and %@ format codes.
8775         (pdp11_option_override): New.
8776         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
8777         (pdp11_output_ident): New.
8778         (pdp11_asm_named_section): New.
8779         (pdp11_asm_init_sections): New.
8780         (pdp11_file_start): New.
8781         (pdp11_file_end): New.
8782         (output_ascii): Use .ascii/.asciz for -mdec-asm.
8783         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
8784         %o, like %c but octal.
8785         (pdp11_option_override): New.
8786         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
8787         -mdec-asm.
8788         (DATA_SECTION_ASM_OP): Ditto.
8789         (READONLY_DATA_SECTION_ASM_OP): New.
8790         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
8791         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
8792         (ASM_OUTPUT_LABELREF): Ditto.
8793         (ASM_OUTPUT_DEF): Ditto.
8794         (ASM_OUTPUT_EXTERNAL): New.
8795         (ASM_OUTPUT_SOURCE_FILENAME): New.
8796         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
8797         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
8798         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
8799         %# and %@ format codes.
8800         * config/pdp11/pdp11.opt (mgnu-asm): New.
8801         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
8802         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
8803         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
8805 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
8807         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
8808         dereferencing path[] beyond its length.
8809         (debug_path): New.
8810         (debug_all_paths): New.
8811         (rewire_first_differing_edge): New.
8812         (adjust_paths_after_duplication): New.
8813         (duplicate_thread_path): Call adjust_paths_after_duplication.
8814         Add new argument.
8815         (thread_through_all_blocks): Add new argument to
8816         duplicate_thread_path.
8818 2018-06-30  Jim Wilson  <jimw@sifive.com>
8820         * config/riscv/predicates.md (p2m1_shift_operand): New.
8821         (high_mask_shift_operand): New.
8822         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
8823         pattern using p2m1_shift_operand.
8824         (lshsi3_zero_extend_3+2): New combiner pattern using
8825         high_mask_shift_operand.
8827 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8829         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
8830         split out from...
8831         (vect_recog_rotate_pattern): ...here.
8832         (vect_convert_input): Try to insert casts of invariants in the
8833         preheader.
8834         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
8835         preheader to be empty.
8837 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8839         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
8840         vector type.  If given, install it in the new statement's
8841         STMT_VINFO_VECTYPE.
8842         (vect_element_precision): New function.
8843         (vect_unpromoted_value): New struct.
8844         (vect_unpromoted_value::vect_unpromoted_value): New function.
8845         (vect_unpromoted_value::set_op): Likewise.
8846         (vect_look_through_possible_promotion): Likewise.
8847         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
8848         (vect_widened_op_tree, vect_convert_input): Likewise.
8849         (vect_convert_inputs, vect_convert_output): Likewise.
8850         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
8851         to handle the optional cast of the multiplication result and
8852         vect_widened_op_tree to detect the widened multiplication itself.
8853         Do not require the input and output of promotion casts to have
8854         the same sign, but base the signedness of the operation on the
8855         input rather than the result.  If the pattern includes two
8856         promotions, check that those promotions have the same sign.
8857         Do not restrict the MULT_EXPR handling to a double-width result;
8858         handle quadruple-width results and wider.  Use vect_convert_inputs
8859         to convert the inputs to the common type.
8860         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
8861         to handle the optional cast of the ABS result.  Also allow a sign
8862         change or a sign extension between the ABS and MINUS.
8863         Use vect_widened_op_tree to detect the widened subtraction and use
8864         vect_convert_inputs to convert the inputs to the common type.
8865         (vect_handle_widen_op_by_const): Delete.
8866         (vect_recog_widen_op_pattern): New function.
8867         (vect_recog_widen_mult_pattern): Use it.
8868         (vect_recog_widen_shift_pattern): Likewise.
8869         (vect_recog_widen_sum_pattern): Use
8870         vect_look_through_possible_promotion to handle the promoted
8871         PLUS_EXPR operand.
8873 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8875         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
8876         the containing gimple_seq *.
8877         * gimple-iterator.h (gsi_for_stmt): Declare it.
8878         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
8879         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
8880         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8881         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8882         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
8883         checks.
8884         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
8885         split out from...
8886         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
8887         statement being replaced is part of an existing pattern
8888         definition sequence, inserting the new pattern statements before
8889         the original one.
8890         (vect_pattern_recog_1): Don't return a bool.  If the statement
8891         is already part of a pattern, instead apply pattern matching
8892         to the pattern definition statements.  Don't clear the
8893         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
8894         (vect_pattern_recog): Don't break after the first match;
8895         continue processing the pattern definition statements instead.
8896         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
8898 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8900         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8901         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8902         (vect_recog_widen_sum_pattern): Use it.
8904 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8906         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8907         phi is not a pattern statement and has not been replaced by
8908         a pattern statement.
8909         * tree-vect-patterns.c (type_conversion_p): Don't check
8910         STMT_VINFO_IN_PATTERN_P.
8911         (vect_recog_vector_vector_shift_pattern): Likewise.
8912         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
8913         the pattern statement rather than the original statement; check
8914         directly for a WIDEN_MULT_EXPR here.
8915         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
8916         vect_is_simple_use to return the pattern statement rather
8917         than the original statement; use is_pattern_stmt_p to check
8918         for such a pattern statement.
8919         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
8920         to return the pattern statement rather than the original statement;
8921         don't do the same transformation here.
8922         (vect_is_simple_use): If the defining statement has been replaced
8923         by a pattern statement, return the pattern statement instead.
8924         Remove the corresponding (local) transformation from the vectype
8925         overload.
8927 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8929         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
8930         end and default to null.
8931         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8932         (vectorizable_reduction): Update calls accordingly, dropping the
8933         gimple ** argument if the passed-back statement isn't needed.
8934         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
8935         (vect_recog_rotate_pattern): Likewise.
8936         (vect_recog_mask_conversion_pattern): Likewise.
8937         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8938         (vect_mask_constant_operand_p): Likewise.
8939         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
8940         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
8941         (get_group_load_store_type, get_load_store_type): Likewise.
8942         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
8943         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
8944         (vectorizable_conversion, vectorizable_assignment): Likewise.
8945         (vectorizable_shift, vectorizable_operation): Likewise.
8946         (vectorizable_store, vect_is_simple_cond): Likewise.
8947         (vectorizable_condition, vectorizable_comparison): Likewise.
8948         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
8949         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
8950         and move it to the end.  Cope with null def_stmt_outs.
8952 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8954         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
8956 2018-06-29  Jeff Law  <law@redhat.com>
8958         * config/v850/v850.c (v850_legitimate_address_p): Handle large
8959         displacements for TARGET_V850E2V3 and newer.
8960         (TARGET_LRA_P): Remove.  Defaults to LRA now.
8961         * config/v850/v850.md (sign23byte_load): Remove.
8962         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
8963         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
8965 2018-06-29  Martin Liska  <mliska@suse.cz>
8967         PR lto/85759
8968         * coverage.c (coverage_init): Mangle full path name.
8969         * doc/invoke.texi: Document the change.
8970         * gcov-io.c (mangle_path): New.
8971         * gcov-io.h (mangle_path): Likewise.
8972         * gcov.c (mangle_name): Use mangle_path for path mangling.
8974 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8976         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
8977         if starting source register is not even.
8979 2018-06-29  Martin Liska  <mliska@suse.cz>
8981         PR tree-optimization/86263
8982         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
8983         Make edge redirection.
8985 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
8987         * dumpfile.c (dump_loc): Add indentation based on scope depth.
8988         (dump_scope_depth): New variable.
8989         (get_dump_scope_depth): New function.
8990         (dump_begin_scope): New function.
8991         (dump_end_scope): New function.
8992         * dumpfile.h (get_dump_scope_depth): New declaration.
8993         (dump_begin_scope): New declaration.
8994         (dump_end_scope): New declaration.
8995         (class auto_dump_scope): New class.
8996         (AUTO_DUMP_SCOPE): New macro.
8997         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8998         AUTO_DUMP_SCOPE.
9000 2018-06-29  Richard Biener  <rguenther@suse.de>
9002         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9003         compute_all_dependences succeeds.
9004         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9005         exceed --param loop-max-datarefs-for-datadeps.
9007 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
9009         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9011 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
9013         PR target/86348
9014         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9015         alternative 0 in preferred_for_speed attribute.
9017 2018-06-28  Paul Koning  <ni1d@arrl.net>
9019         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9020         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9021         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9022         * config/pdp11/pdp11.md: Correct "length" attribute calculation
9023         for shift insn patterns.
9025 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
9027         * cgraph.c (cgraph_node::get_body): Replace assignments to
9028         "dump_file" with calls to set_dump_file.
9029         * dumpfile.c (alt_dump_file): Make static, and group with...
9030         (alt_flags): ...this definition.
9031         (dumps_are_enabled): New variable.
9032         (refresh_dumps_are_enabled): New function.
9033         (set_dump_file): New function.
9034         (set_alt_dump_file): New function.
9035         (gcc::dump_manager::dump_start): Replace assignments to
9036         "dump_file" and "alt_dump_file" with calls to set_dump_file and
9037         set_alt_dump_file.
9038         (gcc::dump_manager::dump_finish): Likewise.
9039         * dumpfile.h (alt_dump_file): Delete decl.
9040         (dumps_are_enabled): New variable decl.
9041         (set_dump_file): New function decl.
9042         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9043         global.
9044         * tree-nested.c (lower_nested_functions): Replace assignments to
9045         "dump_file" with calls to set_dump_file.
9047 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9049         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9050         goto_locus of each outgoing edge of each basic block.
9052 2018-06-28  Richard Biener  <rguenther@suse.de>
9054         * dwarf2out.c (decl_scope_table): Remove.
9055         (push_decl_scope): Likewise.
9056         (pop_decl_scope): Likewise.
9057         (gen_type_die_for_member): Do not call push/pop_decl_scope.
9058         (gen_struct_or_union_type_die): Likewise.
9059         (gen_tagged_type_die): Likewise.
9060         (dwarf2out_init): Do not initialize decl_scope_table.
9061         (dwarf2out_c_finalize): Do not free it.
9063 2018-06-28  Richard Biener  <rguenther@suse.de>
9065         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9066         deciding whether to not re-use a DIE.
9068 2018-06-28  Richard Biener  <rguenther@suse.de>
9070         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9071         DW_AT_abstract_origin attribute.
9073 2018-06-28  Martin Liska  <mliska@suse.cz>
9075         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9076         Use newly introduced constants.
9077         * tree-switch-conversion.h (struct jump_table_cluster):
9078         Define max_ratio_for_size and max_ratio_for_speed.
9080 2018-06-28  Martin Liska  <mliska@suse.cz>
9082         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9083         Add new checking assert to catch invalid state.
9084         (jump_table_cluster::can_be_handled): Handle single case
9085         clusters.
9086         (jump_table_cluster::is_beneficial): Bail out for such case.
9087         (bit_test_cluster::find_bit_tests):
9088         Add new checking assert to catch invalid state.
9089         (bit_test_cluster::can_be_handled): Handle single case
9090         clusters.
9091         (bit_test_cluster::is_beneficial): Bail out for such case.
9092         (switch_decision_tree::analyze_switch_statement):
9093         Fix comment.
9095 2018-06-28  Martin Liska  <mliska@suse.cz>
9097         * common.opt: Introduce -completion option.
9098         * gcc.c (driver_handle_option): Handle it.
9099         (driver::main): Print completions if completion
9100         is set.
9101         * opt-suggestions.c (option_proposer::get_completions):
9102         New function.
9103         (option_proposer::suggest_completion): Likewise.
9104         (option_proposer::find_param_completions): Likewise.
9105         (verify_autocompletions): Likewise.
9106         (test_completion_valid_options): Likewise.
9107         (test_completion_valid_params): Likewise.
9108         (in_completion_p): Likewise.
9109         (empty_completion_p): Likewise.
9110         (test_completion_partial_match): Likewise.
9111         (test_completion_garbage): Likewise.
9112         (opt_proposer_c_tests): Likewise.
9113         * opt-suggestions.h: Declare new functions.
9114         * opts.c (common_handle_option): Handle OPT__completion_.
9115         * selftest-run-tests.c (selftest::run_tests): Add
9116         opt_proposer_c_tests.
9117         * selftest.c (assert_str_startswith): New.
9118         * selftest.h (assert_str_startswith): Likewise.
9119         (opt_proposer_c_tests): New.
9120         (ASSERT_STR_STARTSWITH): Likewise.
9122 2018-06-28  Martin Liska  <mliska@suse.cz>
9124         * Makefile.in: Add opt-suggestions.o.
9125         * gcc-main.c: Include opt-suggestions.h.
9126         * gcc.c (driver::driver): Likewise.
9127         (driver::~driver): Remove m_option_suggestions.
9128         (driver::build_option_suggestions): Moved to option_proposer.
9129         (driver::suggest_option): Likewise.
9130         (driver::handle_unrecognized_options): Use option_proposer.
9131         * gcc.h (class driver): Add new memver m_option_proposer.
9132         * opt-suggestions.c: New file.
9133         * opt-suggestions.h: New file.
9135 2018-06-28  Martin Liska  <mliska@suse.cz>
9137         * vec.h (class auto_string_vec): New (moved from auto_argvec).
9138         (auto_string_vec::~auto_string_vec): Likewise.
9140 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9142         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9143         prevent_decl_creation_for_types fields up and add reset_location field.
9144         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9145         statement if id->reset_location is true.
9146         (copy_edges_for_bb): Do not set goto_locus on the new edges if
9147         id->reset_location is true.
9148         (copy_phis_for_bb): Force input_location on the arguments if
9149         id->reset_location is true.
9150         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9151         is set on the function to be inlined.
9153 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
9155         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9157 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
9159         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9160         registers for Pmode.
9161         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9162         hard registers for the clobbered pseudo.
9164 2018-06-27  Paul Koning  <ni1d@arrl.net>
9166         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9167         mutually exclusive options.
9168         * config/pdp11/constraints.md (h): New constraint.
9169         (O): Update definition to match shift code generation.
9170         (D): New constraint.
9171         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9172         (CCFP): Remove.
9173         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9174         function.
9175         (output_jump): Change arguments.
9176         (pdp11_fixed_cc_regs): New function.
9177         (pdp11_cc_mode): Ditto.
9178         (pdp11_expand_shift): Ditto.
9179         (pdp11_assemble_shift): Ditto.
9180         (pdp11_small_shift): Ditto.
9181         (pdp11_branch_cost): Remove.
9182         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9183         from output.
9184         (pdp11_register_move_cost): Update for CC registers.
9185         (pdp11_rtx_costs): Add case for LSHIFTRT.
9186         (pdp11_output_jump): Add CCNZ mode conditional branches.
9187         (notice_update_cc_on_set): Remove.
9188         (pdp11_cc_mode): New function.
9189         (simple_memory_operand): Correct pre/post decrement case.
9190         (no_side_effect_operand): New function.
9191         (pdp11_regno_reg_class): Add CC_REGS class.
9192         (pdp11_fixed_cc_regs): New function.
9193         (pdp11_small_shift): New function.
9194         (pdp11_expand_shift): New function to expand shift insns.
9195         (pdp11_assemble_shift): New function to output shifts.
9196         (pdp11_branch_cost): Remove.
9197         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9198         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9199         (WCHAR_TYPE): Ditto.
9200         (PTRDIFF_TYPE): Ditto.
9201         (ADJUST_INSN_LENGTH): New macro.
9202         (FIXED_REGISTERS): Add CC registers.
9203         (CALL_USED_REGISTERS): Ditto.
9204         (reg_class): Ditto.
9205         (REG_CLASS_NAMES): Ditto.
9206         (REG_CLASS_CONTENTS): Ditto.
9207         (SELECT_CC_MODE): Use new function.
9208         (TARGET_FLAGS_REGNUM): New macro.
9209         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9210         (cc0_reg_rtx): Remove.
9211         (CC_STATUS_MDEP): Remove.
9212         (CC_STATUS_MDEFP_INIT): Remove.
9213         (CC_IN_FPU): Remove.
9214         (NOTICE_UPDATE_CC): Remove.
9215         (REGISTER_NAMES): Add CC registers.
9216         (BRANCH_COST): Change to constant 1.
9217         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9218         handling.
9219         * config/pdp11/pdp11.opt (mbcopy): Remove.
9220         (mbcopy-builtin): Remove.
9221         (mbranch-cheap): Remove.
9222         (mbranch-expensive): Remove.
9223         * config/pdp11/predicates.md (expand_shift_operand): Update to
9224         match shift code generation.
9225         (ccnz_operator): New predicate.
9226         * doc/invoke.texi (PDP-11 Options): Remove deleted options
9227         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9228         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
9229         exclusive options.
9230         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
9231         description of O constraint.
9233 2018-06-27  Jeff Law  <law@redhat.com>
9234             Austin Law  <austinklaw@gmail.com>
9236         * config/v850/v850.md (addsi3_set_flags): New pattern.
9237         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9238         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9239         (zero_extendhisi2_v850_set_flags): Likewise.
9240         (zero_extendqisi2_v850_set_flags): Likewise.
9241         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9242         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9243         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9245         * config/v850/v850-protos.h (notice_update_cc): Remove.
9246         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9247         (v850_print_operand): Handle 'D' and "d".
9248         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9249         Add handling of arithmetic/logical operations compared against zero.
9250         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9251         Do not look at v850_compare_op, instead get mode from last argument.
9252         (v850_gen_compare): Remove
9253         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9254         after reload for prologue insns.
9255         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9256         patterns.
9257         (construct_save_jarl): Likewise.
9258         (TARGET_FLAGS_REGNUM): Define.
9259         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9260         (NOTICE_UPDATE_CC): Remove.
9261         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9262         than cc0.  Conditionalize on reload_completed.
9263         (cmpsi_insn, setfcc_insn): Likewise.
9264         (tst1 splitter): Turn into define_and_split which sets the flags
9265         after reload.
9266         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9267         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9268         (cstoresf4, cstoredf4): Clobber the flags.
9269         (cmpsi, cmpsf, cmpdf): Remove expanders.
9270         (setf_insn): Remove pattern.
9271         (addsi3): Turn into define_and_split which clobbers the flags after
9272         reload and a suitable pattern (addsi3_clobber_flags) for use after
9273         reload.
9274         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9275         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9276         (ashrsi3, ashrsi3_v850e2): Likewise.
9277         (bins): Clobber the flags.
9278         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9279         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9280         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9281         (call_value_internal_short, call_value_internal_long): Likewise.
9282         (callt_save_interrupt, callt_return_interrupt): Likewise.
9283         (save_interrupt, return_interrupt): Likewise.
9284         (callt_save_all_interrupt, save_all_interrupt): Likewise.
9285         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9286         (restore_all_interrupt, _restore_all_interrupt): Likewise.
9287         (All FP comparisons): Only allow after reload has completed.
9288         (trfsr): Likewise.
9289         (divh, divhu): Tweak output template.
9290         (branch_z_normal, branch_z_invert): Remove
9291         (branch_nz_normal, branch_nz_invert): Likewise.
9292         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9294         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9295         * config/v850/v850.c (notice_update_cc): Remove.
9296         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
9297         (CC_NO_CARRY): Likewise.
9298         (NOTICE_UPDATE_CC): Define to nothing.
9299         * config/v850/v850.md: Remove block comment on cc0 handling
9300         Remove "cc" attribute from all patterns.  Remove cc_status handling
9301         from all patterns.  Minor formatting fixes.
9303 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9305         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9306         (cortex-a76.cortex-a55): Likewise.
9307         * config/aarch64/aarch64-tune.md: Regenerate.
9308         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9309         cortex-a76.cortex-a55.
9311 2018-06-27  Jeff Law  <law@redhat.com>
9313         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9314         (MULTILIB_DIRNAMES): Similarly.
9316 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
9318         * gimple.h (gimple_return_retbnd): Delete.
9319         (gimple_return_set_retbnd): Likewise.
9320         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9321         gimple_return_set_retbnd.
9322         * gimple-pretty-print.c (dump_gimple_return): Remove call to
9323         gimple_return_retbnd and adjust.
9324         * tree-inline.h (struct copy_body_data): Remove retbnd field.
9325         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9326         Explicitly return NULL in a couple more cases.  Move assertion
9327         on debug statements and remove unreachable code.
9328         (reset_debug_binding): Do not test id->retbnd.
9329         (expand_call_inline): Do not set it.
9331 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9333         * configure.ac: Add --disable-gcov option.
9334         * configure: Regenerate.
9335         * Makefile.in: Honour @enable_gcov@.
9336         * doc/install.texi: Document --disable-gcov.
9338 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9340         * config/arm/arm-cpus.in (cortex-a76): New entry.
9341         (cortex-a76.cortex-a55): Likewise.
9342         * config/arm/arm-tables.opt: Regenerate.
9343         * config/arm/arm-tune.md: Likewise.
9344         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
9345         * doc/invoke.texi (ARM Options): Document cortex-a76 and
9346         cortex-a76.cortex-a55.
9348 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
9350         PR target/85769
9351         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
9353 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9355         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
9356         comment.
9357         (EPILOGUE_USES): Likewise.
9359 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
9361         * tree-inline.c (remap_location): New function extracted from...
9362         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
9363         (copy_phis_for_bb): ...here.  Call remap_location.
9364         (copy_cfg_body): Adjust call to copy_edges_for_bb.
9366 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
9368         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
9369         unaligned vsx for 16B memset.
9371 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
9373         PR target/86285
9374         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
9375         ieee128_float_type_node to long_double_type_node unless
9376         TARGET_LONG_DOUBLE_128 is set.
9378 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
9380         * cfgloop.c (get_loop_location): Convert return type from
9381         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
9382         by implicit construction from rtx_insn *, and using
9383         dump_user_location_t::from_function_decl for the fallback case.
9384         * cfgloop.h (get_loop_location): Convert return type from
9385         location_t to dump_user_location_t.
9386         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
9387         dump_printf_loc to pass in a dump_location_t rather than a
9388         location_t, via the gimple stmt.
9389         * coverage.c (get_coverage_counts): Update calls to
9390         dump_printf_loc to pass in dump_location_t rather than a
9391         location_t.
9392         * doc/optinfo.texi (Dump types): Convert example of
9393         dump_printf_loc from taking "locus" to taking "insn".  Update
9394         description of the "_loc" calls to cover dump_location_t.
9395         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
9396         "selftest.h".
9397         (dump_user_location_t::dump_user_location_t): New constructors,
9398         from gimple *stmt and rtx_insn *.
9399         (dump_user_location_t::from_function_decl): New function.
9400         (dump_loc): Make static.
9401         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
9402         const dump_location_t &.
9403         (dump_generic_expr_loc): Delete.
9404         (dump_printf_loc): Convert param "loc" from location_t to
9405         const dump_location_t &.
9406         (selftest::test_impl_location): New function.
9407         (selftest::dumpfile_c_tests): New function.
9408         * dumpfile.h: Include "profile-count.h".
9409         (class dump_user_location_t): New class.
9410         (struct dump_impl_location_t): New struct.
9411         (class dump_location_t): New class.
9412         (dump_printf_loc): Convert 2nd param from source_location to
9413         const dump_location_t &.
9414         (dump_generic_expr_loc): Delete.
9415         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
9416         const dump_location_t &.
9417         * gimple-fold.c (fold_gimple_assign): Update call to
9418         dump_printf_loc to pass in a dump_location_t rather than a
9419         location_t, via the gimple stmt.
9420         (gimple_fold_call): Likewise.
9421         * gimple-loop-interchange.cc
9422         (loop_cand::analyze_iloop_reduction_var): Update for change to
9423         check_reduction_path.
9424         (tree_loop_interchange::interchange): Update for change to
9425         find_loop_location.
9426         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
9427         change in return-type of find_loop_location.
9428         (graphite_regenerate_ast_isl): Likewise.
9429         * graphite-optimize-isl.c (optimize_isl): Likewise.
9430         * graphite.c (graphite_transform_loops): Likewise.
9431         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
9432         pass in a dump_location_t rather than a location_t, via the
9433         gimple stmt.
9434         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9435         * ipa.c (walk_polymorphic_call_targets): Likewise.
9436         * loop-unroll.c (report_unroll): Convert "locus" param from
9437         location_t to dump_location_t.
9438         (decide_unrolling): Update for change to get_loop_location's
9439         return type.
9440         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
9441         location_t to dump_user_location_t.
9442         (grid_find_single_omp_among_assignments_1): Updates calls to
9443         dump_printf_loc to pass in a dump_location_t rather than a
9444         location_t, via the gimple stmt.
9445         (grid_parallel_clauses_gridifiable): Convert "tloc" from
9446         location_t to dump_location_t.  Updates calls to dump_printf_loc
9447         to pass in a dump_location_t rather than a location_t, via the
9448         gimple stmt.
9449         (grid_inner_loop_gridifiable_p): Likewise.
9450         (grid_dist_follows_simple_pattern): Likewise.
9451         (grid_gfor_follows_tiling_pattern): Likewise.
9452         (grid_target_follows_gridifiable_pattern): Likewise.
9453         (grid_attempt_target_gridification): Convert initialization
9454         of local "grid" from memset to zero-initialization; FIXME: does
9455         this require C++11?  Update call to dump_printf_loc to pass in a
9456         optinfo_location rather than a location_t, via the gimple stmt.
9457         * profile.c (read_profile_edge_counts): Updates call to
9458         dump_printf_loc to pass in a dump_location_t rather than a
9459         location_t
9460         (compute_branch_probabilities): Likewise.
9461         * selftest-run-tests.c (selftest::run_tests): Call
9462         dumpfile_c_tests.
9463         * selftest.h (dumpfile_c_tests): New decl.
9464         * tree-loop-distribution.c (pass_loop_distribution::execute):
9465         Update for change in return type of find_loop_location.
9466         * tree-parloops.c (parallelize_loops): Likewise.
9467         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
9468         "locus" from location_t to dump_user_location_t.
9469         (canonicalize_loop_induction_variables): Likewise.
9470         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
9471         for change in return type of find_loop_location.
9472         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
9473         to dump_printf_loc to pass in a dump_location_t rather than a
9474         location_t, via the stmt.
9475         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
9476         Likewise.
9477         * tree-vect-loop-manip.c (find_loop_location): Convert return
9478         type from source_location to dump_user_location_t.
9479         (vect_do_peeling): Update for above change.
9480         (vect_loop_versioning): Update for change in type of
9481         vect_location.
9482         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
9483         from location_t to dump_user_location_t.
9484         (vect_estimate_min_profitable_iters): Update for change in type
9485         of vect_location.
9486         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
9487         location_t to dump_location_t.
9488         (vect_slp_bb): Update for change in type of vect_location.
9489         * tree-vectorizer.c (vect_location): Convert from source_location
9490         to dump_user_location_t.
9491         (try_vectorize_loop_1): Update for change in vect_location's type.
9492         (vectorize_loops): Likewise.
9493         (increase_alignment): Likewise.
9494         * tree-vectorizer.h (vect_location): Convert from source_location
9495         to dump_user_location_t.
9496         (find_loop_location): Convert return type from source_location to
9497         dump_user_location_t.
9498         (check_reduction_path): Convert 1st param from location_t to
9499         dump_user_location_t.
9500         * value-prof.c (check_counter): Update call to dump_printf_loc to
9501         pass in a dump_user_location_t rather than a location_t; update
9502         call to error_at for change in type of "locus".
9503         (check_ic_target): Update call to dump_printf_loc to
9504         pass in a dump_user_location_t rather than a location_t, via the
9505         call_stmt.
9507 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
9509         * config/s390/s390.h (enum processor_flags): Do not use
9510         default tune parameter when -march was specified.
9512 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
9514         PR target/86314
9515         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
9516         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
9517         operands.
9519 2018-06-26  Richard Biener  <rguenther@suse.de>
9521         PR tree-optimization/86287
9522         PR bootstrap/86316
9523         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
9524         (vect_analyze_loop): Initialize n_stmts.
9526 2018-06-26  Richard Biener  <rguenther@suse.de>
9528         PR middle-end/86271
9529         * fold-const.c (fold_convertible_p): Pointer extension
9530         isn't valid.
9532 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
9534         PR debug/86064
9535         * dwarf2out.c (loc_list_has_views): Adjust comments.
9536         (dw_loc_list): Split single cross-partition range with
9537         nonzero locview.
9539 2018-06-25  Jeff Law  <law@redhat.com>
9541         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
9542         on -mbig-switch by default.
9544         * config/v850/predicates.md (const_float_1_operand): Fix match_code
9545         test.
9546         (const_float_0_operand): Remove unused predicate.
9547         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
9548         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
9549         (recipsf2): New expander.  Original pattern now called
9550         (recipsf2_insn).
9551         (recipdf2, recipdf2_insn): Similarly.
9552         (rsqrtsf2, rsqrtsf2_insn): Similarly
9553         (rsqrtdf2, rsqrtdf2_insn): Similarly
9555 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
9557         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
9558         Simplify logic for FreeBSD (twice).
9560 2018-06-25  Martin Sebor  <msebor@redhat.com>
9562         PR tree-optimization/86204
9563         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
9564         a strnlen result if it's less than the length of the string.
9566 2018-06-25  Martin Sebor  <msebor@redhat.com>
9568         PR tree-optimization/85700
9569         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
9570         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
9571         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
9573 2018-06-25  Martin Sebor  <msebor@redhat.com>
9575         * doc/extend.texi (Zero-length arrays): Update and clarify.
9577 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
9579         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
9580         added IEEE/IBM long double multilib support on PowerPC little
9581         endian Linux systems.
9582         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
9583         (MULTILIB_DEFAULTS): Likewise.
9584         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9585         Likewise.
9586         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
9587         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
9588         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
9590 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
9592         PR middle-end/86311
9593         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
9594         (REORDER_45): Likewise.
9596 2018-06-25  Jeff Law  <law@redhat.com>
9598         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
9599         dividend to 32 bits.  Adjust length.
9600         (udivmodhi4): Cleanup output template.  Fix length.
9602 2018-06-25  Carl Love  <cel@us.ibm.com>
9604         * config/rs6000/vsx.md: Change word selector to prefered location.
9606 2018-06-25  Richard Biener  <rguenther@suse.de>
9608         PR tree-optimization/86304
9609         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
9610         epilogue-if-converted loops as well.
9612 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
9614         * lto-section-out.c (lto_begin_section): Do not print section
9615         name for noaddr and unnumbered dumps.
9617 2018-06-25  Richard Biener  <rguenther@suse.de>
9619         * tree-vectorizer.h (struct vec_info_shared): New structure
9620         with parts split out from struct vec_info and loop_nest from
9621         struct _loop_vec_info.
9622         (struct vec_info): Adjust accordingly.
9623         (struct _loop_vec_info): Likewise.
9624         (LOOP_VINFO_LOOP_NEST): Adjust.
9625         (LOOP_VINFO_DATAREFS): Likewise.
9626         (LOOP_VINFO_DDRS): Likewise.
9627         (struct _bb_vec_info): Likewise.
9628         (BB_VINFO_DATAREFS): Likewise.
9629         (BB_VINFO_DDRS): Likewise.
9630         (struct _stmt_vec_info): Add dr_aux member.
9631         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
9632         (DR_MISALIGNMENT_UNINITIALIZED): New.
9633         (set_dr_misalignment): Adjust.
9634         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
9635         (vect_analyze_loop): Adjust prototype.
9636         (vect_analyze_loop_form): Likewise.
9637         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9638         Compute dependences lazily.
9639         (vect_record_base_alignments): Use shared datarefs/ddrs.
9640         (vect_verify_datarefs_alignment): Likewise.
9641         (vect_analyze_data_refs_alignment): Likewise.
9642         (vect_analyze_data_ref_accesses): Likewise.
9643         (vect_analyze_data_refs): Likewise.
9644         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
9645         constructor parameter for shared part.
9646         (vect_analyze_loop_form): Pass in shared part and adjust.
9647         (vect_analyze_loop_2): Pass in storage for the number of
9648         stmts.  Move loop nest finding to the caller.  Compute
9649         datarefs lazily.
9650         (vect_analyze_loop): Pass in shared part.
9651         (vect_transform_loop): Verify shared datarefs are unchanged.
9652         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
9653         constructor parameter for shared part.
9654         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
9655         (vect_slp_bb): Verify shared datarefs are unchanged before
9656         transform.
9657         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
9658         change.
9659         (new_stmt_vec_info): Initialize DR_AUX misalignment to
9660         DR_MISALIGNMENT_UNINITIALIZED.
9661         * tree-vectorizer.c (vec_info::vec_info): Add constructor
9662         parameter for shared part.
9663         (vec_info::~vec_info): Adjust.
9664         (vec_info_shared::vec_info_shared): New.
9665         (vec_info_shared::~vec_info_shared): Likewise.
9666         (vec_info_shared::save_datarefs): Likewise.
9667         (vec_info_shared::check_datarefs): Likewise.
9668         (try_vectorize_loop_1): Construct shared part live for analyses
9669         of a single loop for multiple vector sizes.
9670         * tree-parloops.c (gather_scalar_reductions): Adjust.
9672 2018-06-25  Richard Biener  <rguenther@suse.de>
9674         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
9675         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
9676         (vect_analyze_data_refs): Remove similar code from here and
9677         simplify accordingly.
9679 2018-06-25  Richard Biener  <rguenther@suse.de>
9681         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
9682         for reverse storage order accesses rather than asserting
9683         they cannot happen here.
9685 2018-06-25  Tom de Vries  <tdevries@suse.de>
9687         PR debug/86257
9688         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
9689         Use data16 instead of .byte for insn prefix.
9691 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
9693         PR C++/86082
9694         * parser.c (make_char_string_pack): Pass this literal chars
9695         through cpp_interpret_string.
9696         (cp_parser_userdef_numeric_literal): Check the result of
9697         make_char_string_pack.
9699 2018-06-24  Maya Rashish  <coypu@sdf.org>
9701         * ginclude/stddef.h: Simplify conditions around avoiding
9702         re-definition of __size_t.
9704 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9706         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
9707         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
9709 2018-06-22  Maya Rashish  <coypu@sdf.org>
9711         * doc/invoke.texi (mno-fancy-math-387): Update for changes
9712         made to OpenBSD and NetBSD through the years.
9714 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9716         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9717         behavior of vec_pack (vector double, vector double) to match
9718         behavior of vec_float2 (vector double, vector double).
9720 2018-06-22  Olivier Hainque  <hainque@adacore.com>
9722         * gimplify.c (gimplify_function_tree): Prevent creation
9723         of a trampoline for the address of the current function
9724         passed to entry/exit instrumentation hooks.
9726 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
9728         PR target/86222
9729         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
9730         correctly.
9732 2018-06-22  Martin Liska  <mliska@suse.cz>
9734         PR tree-optimization/86263
9735         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9736         Bail out if is_enabled is false.
9737         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
9738         New declaration.
9739         (jump_table_cluster::is_enabled): New function.
9741 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9743         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9744         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
9745         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
9746         (lto_input_ts_binfo_tree_pointers): Likewise.
9747         * tree-streamer-out.c (streamer_write_tree_bitfields,
9748         write_ts_binfo_tree_pointers): Likewise.
9749         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
9751 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9753         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
9755 2018-06-22  Martin Liska  <mliska@suse.cz>
9757         * symbol-summary.h (get): Make it pure and inline move
9758         functionality from ::get function.
9759         (get): Remove and inline into ::get and ::get_create.
9760         (get_create): Move code from ::get function.
9762 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9764         PR target/85994
9765         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
9766         -x assembler-with-cpp.
9768 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9770         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
9771         _FILE_OFFSET_BITS=64 for C++.
9773 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
9775         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
9776         conversion insn that shows up when pr85657-3.c is compiled using
9777         IEEE 128-bit long double.
9778         (neg<mode>2_internal): Use the correct mode to check whether the
9779         mode is IBM extended.
9780         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
9781         multiply and divide external functions from being created more
9782         than once.
9784 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9786         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
9787         functions.
9788         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
9789         the edge can be forwarded.
9790         (cfg_layout_merge_blocks): Likewise.
9792 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9794         * except.c (finish_eh_generation): Commit edge insertions only after
9795         the EH edges have been redirected from post-landing to landing pads.
9797 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9799         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
9800         create_tmp_var_for to create the FRAME decl.
9801         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
9803 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9805         * tree-inline.c (copy_edges_for_bb): Minor tweak.
9806         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
9807         debug statement when resetting its value.
9808         (expand_call_inline): Copy the locus of the call onto the assignment
9809         of the return value, if any.  Use local variable in more cases.
9811 2018-06-21  Martin Liska  <mliska@suse.cz>
9813         * ipa-pure-const.c (propagate_nothrow): Use
9814         funct_state_summaries->get.
9815         (dump_malloc_lattice): Likewise.
9816         (propagate_malloc): Likewise.
9818 2018-06-21  Richard Biener  <rguenther@suse.de>
9820         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
9821         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
9822         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
9823         comment.
9824         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
9825         BLOCK_ABSTRACT_ORIGIN unconditionally.
9827 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
9829         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
9830         deleting it.
9831         * ipa-reference.c (ipa_reference_c_finalize): Delete
9832         ipa_ref_opt_sum_summaries and set it to NULL.
9834 2018-06-21  Tom de Vries  <tdevries@suse.de>
9836         PR tree-optimization/85859
9837         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
9838         test with comment from bb_no_side_effects_p.
9840 2018-06-21  Richard Biener  <rguenther@suse.de>
9842         PR tree-optimization/86232
9843         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
9844         max for constant niter.
9846 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9848         * config/aarch64/aarch64-simd.md
9849         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
9851 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9853         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
9854         Make opernads of the unspec commutative.
9856 2018-06-21  Richard Biener  <rguenther@suse.de>
9858         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
9859         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
9860         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
9861         (vect_analyze_data_ref_dependence): Re-order checks to deal with
9862         NULL DR_STEP.
9863         (vect_record_base_alignments): Do not record base alignment
9864         for gathers or scatters.
9865         (vect_compute_data_ref_alignment): Drop return value that is always
9866         true.  Bail out early for gathers or scatters.
9867         (vect_enhance_data_refs_alignment): Bail out early for gathers
9868         or scatters.
9869         (vect_find_same_alignment_drs): Likewise.
9870         (vect_analyze_data_refs_alignment): Remove dead code.
9871         (vect_slp_analyze_and_verify_node_alignment): Likewise.
9872         (vect_analyze_data_refs): For possible gathers or scatters do
9873         not create an alternate DR, just check their possible validity
9874         and mark them.  Adjust DECL_NONALIASED handling to not rely
9875         on DR_BASE_ADDRESS.
9876         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
9877         update inits of gathers or scatters.
9878         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
9879         Also copy gather/scatter flag to pattern vinfo.
9881 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9883         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9884         behavior of vec_packsu (vector unsigned long long, vector unsigned
9885         long long) to match behavior of vec_packs with same signature.
9887 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
9888             Thomas Schwinge <thomas@codesourcery.com>
9889             Cesar Philippidis  <cesar@codesourcery.com>
9891         * gimplify.c (gimplify_scan_omp_clauses): Add support for
9892         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9893         (gimplify_adjust_omp_clauses): Likewise.
9894         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
9895         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
9896         (gimplify_omp_target_update): Update handling of acc update and
9897         enter/exit data.
9898         * omp-low.c (install_var_field): Remove unused parameter
9899         base_pointers_restrict.
9900         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
9901         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
9902         FINALIZE}
9903         (omp_target_base_pointers_restrict_p): Delete.
9904         (scan_omp_target): Update call to scan_sharing_clauses.
9905         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
9906         FINALIZE}.
9907         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
9908         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9909         (convert_local_omp_clauses): Likewise.
9910         * tree-pretty-print.c (dump_omp_clause): Likewise.
9911         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
9912         FINALIZE}.
9913         (omp_clause_code_name): Likewise.
9915 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9917         PR debug/86194
9918         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
9919         be narrowed.
9921         PR tree-optimization/86231
9922         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
9923         anti-range don't overwrite *vr0min before using it to compute *vr0max.
9925 2018-06-20  Tom de Vries  <tdevries@suse.de>
9927         PR tree-optimization/86097
9928         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
9929         iv type if signedness of iv type is not the same as that of *nit.
9931 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9933         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
9934         EDGE_EH edges, verify they are all EDGE_EH.
9936 2018-06-20  Maya Rashish  <coypu@sdf.org>
9938         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
9940 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9942         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
9943         * config/aarch64/aarch64.c (xgene1_tunings): Add
9944         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
9945         (aarch64_mode_valid_for_sched_fusion_p):
9946         Allow 16-byte modes.
9947         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
9948         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
9949         128-bit modes.
9950         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
9951         New pattern.
9952         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
9953         * config/aarch64/iterators.md (VQ2): New mode iterator.
9955 2018-06-20  Martin Liska  <mliska@suse.cz>
9957         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9958         Change default ratio from 10 to 8.
9960 2018-06-20  Martin Liska  <mliska@suse.cz>
9962         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9963         New.
9964         (bit_test_cluster::find_bit_tests): Likewise.
9965         (switch_decision_tree::analyze_switch_statement): Find clusters.
9966         * tree-switch-conversion.h (struct jump_table_cluster): Document
9967         hierarchy.
9969 2018-06-20  Martin Liska  <mliska@suse.cz>
9971         * tree-switch-conversion.c (switch_conversion::collect):
9972         Record m_uniq property.
9973         (switch_conversion::expand): Bail out for special conditions.
9974         (group_cluster::~group_cluster): New.
9975         (group_cluster::group_cluster): Likewise.
9976         (group_cluster::dump): Likewise.
9977         (jump_table_cluster::emit): New.
9978         (switch_decision_tree::fix_phi_operands_for_edges): New.
9979         (struct case_node): Remove struct.
9980         (jump_table_cluster::can_be_handled): New.
9981         (case_values_threshold): Moved to header.
9982         (reset_out_edges_aux): Likewise.
9983         (jump_table_cluster::is_beneficial): New.
9984         (bit_test_cluster::can_be_handled): Likewise.
9985         (add_case_node): Remove.
9986         (bit_test_cluster::is_beneficial): New.
9987         (case_bit_test::cmp): New.
9988         (bit_test_cluster::emit): New.
9989         (expand_switch_as_decision_tree_p): Remove.
9990         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
9991         (fix_phi_operands_for_edge): Likewise.
9992         (switch_decision_tree::analyze_switch_statement): New.
9993         (compute_cases_per_edge): Move ...
9994         (switch_decision_tree::compute_cases_per_edge): ... here.
9995         (try_switch_expansion): Likewise.
9996         (switch_decision_tree::try_switch_expansion): Likewise.
9997         (record_phi_operand_mapping): Likewise.
9998         (switch_decision_tree::record_phi_operand_mapping): Likewise.
9999         (emit_case_decision_tree): Likewise.
10000         (switch_decision_tree::emit): Likewise.
10001         (balance_case_nodes): Likewise.
10002         (switch_decision_tree::balance_case_nodes): Likewise.
10003         (dump_case_nodes): Likewise.
10004         (switch_decision_tree::dump_case_nodes): Likewise.
10005         (emit_jump): Likewise.
10006         (switch_decision_tree::emit_jump): Likewise.
10007         (emit_cmp_and_jump_insns): Likewise.
10008         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10009         (emit_case_nodes): Likewise.
10010         (switch_decision_tree::emit_case_nodes): Likewise.
10011         (conditional_probability): Remove.
10012         * tree-switch-conversion.h (enum cluster_type): New.
10013         (PRINT_CASE): New.
10014         (struct cluster): Likewise.
10015         (cluster::cluster): Likewise.
10016         (struct simple_cluster): Likewise.
10017         (simple_cluster::simple_cluster): Likewise.
10018         (struct group_cluster): Likewise.
10019         (struct jump_table_cluster): Likewise.
10020         (struct bit_test_cluster): Likewise.
10021         (struct min_cluster_item): Likewise.
10022         (struct case_tree_node): Likewise.
10023         (case_tree_node::case_tree_node): Likewise.
10024         (jump_table_cluster::case_values_threshold): Likewise.
10025         (struct case_bit_test): Likewise.
10026         (struct switch_decision_tree): Likewise.
10027         (struct switch_conversion): Likewise.
10028         (switch_decision_tree::reset_out_edges_aux): Likewise.
10030 2018-06-20  Martin Liska  <mliska@suse.cz>
10032         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10033         (hoist_edge_and_branch_if_true): Likewise.
10034         (expand_switch_using_bit_tests_p): Likewise.
10035         (struct case_bit_test): Likewise.
10036         (case_bit_test_cmp): Likewise.
10037         (emit_case_bit_tests): Likewise.
10038         (switch_conversion::switch_conversion): New class.
10039         (struct switch_conv_info): Remove old struct.
10040         (collect_switch_conv_info): More to ...
10041         (switch_conversion::collect): ... this.
10042         (check_range): Likewise.
10043         (switch_conversion::check_range): Likewise.
10044         (check_all_empty_except_final): Likewise.
10045         (switch_conversion::check_all_empty_except_final): Likewise.
10046         (check_final_bb): Likewise.
10047         (switch_conversion::check_final_bb): Likewise.
10048         (create_temp_arrays): Likewise.
10049         (switch_conversion::create_temp_arrays): Likewise.
10050         (free_temp_arrays): Likewise.
10051         (gather_default_values): Likewise.
10052         (switch_conversion::gather_default_values): Likewise.
10053         (build_constructors): Likewise.
10054         (switch_conversion::build_constructors): Likewise.
10055         (constructor_contains_same_values_p): Likewise.
10056         (switch_conversion::contains_same_values_p): Likewise.
10057         (array_value_type): Likewise.
10058         (switch_conversion::array_value_type): Likewise.
10059         (build_one_array): Likewise.
10060         (switch_conversion::build_one_array): Likewise.
10061         (build_arrays): Likewise.
10062         (switch_conversion::build_arrays): Likewise.
10063         (gen_def_assigns): Likewise.
10064         (switch_conversion::gen_def_assigns): Likewise.
10065         (prune_bbs): Likewise.
10066         (switch_conversion::prune_bbs): Likewise.
10067         (fix_phi_nodes): Likewise.
10068         (switch_conversion::fix_phi_nodes): Likewise.
10069         (gen_inbound_check): Likewise.
10070         (switch_conversion::gen_inbound_check): Likewise.
10071         (process_switch): Use the newly created class.
10072         (switch_conversion::expand): New.
10073         (switch_conversion::~switch_conversion): New.
10074         * tree-switch-conversion.h: New file.
10076 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10078         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10079         tree-vect-patterns.c.
10080         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10081         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
10082         (vect_recog_sad_pattern): Likewise.
10083         (vect_recog_widen_sum_pattern): Likewise.
10084         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
10085         (vect_recog_widen_shift_pattern): Remove the type_in argument.
10086         (vect_recog_rotate_pattern): Likewise.
10087         (vect_recog_mult_pattern): Likewise.
10088         (vect_recog_vector_vector_shift_pattern): Likewise.
10089         (vect_recog_divmod_pattern): Likewise.
10090         (vect_recog_mixed_size_cond_pattern): Likewise.
10091         (vect_recog_bool_pattern): Likewise.
10092         (vect_recog_mask_conversion_pattern): Likewise.
10093         (vect_try_gather_scatter_pattern): Likewise.
10094         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
10095         (vect_recog_over_widening_pattern): Likewise.
10096         (vect_recog_gather_scatter_pattern): Likewise.
10097         (vect_recog_func_ptr): Move from tree-vectorizer.h
10098         (vect_vect_recog_func_ptrs): Move further down the file.
10099         (vect_recog_func): Likewise.  Remove the third argument.
10100         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10101         (vect_pattern_recog_1): Expect the pattern function to do any
10102         necessary target tests.  Also expect it to provide a vector type.
10103         Remove the type_in handling.
10105 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10107         * tree-vect-patterns.c (vect_pattern_detected): New function.
10108         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10109         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10110         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10111         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10112         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10113         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10114         (vect_recog_mask_conversion_pattern)
10115         (vect_try_gather_scatter_pattern): Likewise.
10117 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10119         * tree-vect-patterns.c (vect_get_internal_def): New function.
10120         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10121         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10122         (search_type_for_mask_1): Use it.
10124 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10126         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10127         redundant WIDEN_SUM_EXPR handling.
10128         (vect_recog_sad_pattern): Likewise.
10130 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10132         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10133         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10134         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10135         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10136         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10138 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10140         * tree-vect-stmts.c (vectorizable_call): Make sure that we
10141         use the stmt_vec_info of the original bb statement for the
10142         new zero assignment, even if the call is part of a pattern.
10144 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10146         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10147         that the sequence is attached to the original statement rather
10148         than the pattern statement.
10149         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10150         PATTERN_DEF_SEQ from the original statement rather than
10151         the main pattern statement.
10152         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10153         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10154         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10156 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10158         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10159         definition statements before the early exit for statements that aren't
10160         live or relevant.
10161         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10162         split out from...
10163         (vect_transform_loop): ...here.  Process pattern definition
10164         statements without first checking whether the main pattern
10165         statement is live or relevant.
10167 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10169         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10170         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10172 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
10174         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10175         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10176         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10177         (expand_block_compare): Change select_block_compare_mode call.
10178         (expand_strncmp_align_check): Use new functions, fix comment.
10179         (emit_final_str_compare_gpr): New function.
10180         (expand_strn_compare): Refactor and clean up code.
10181         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10183 2018-06-19  Tony Reix  <tony.reix@atos.com>
10184             Damien Bergamini  <damien.bergamini@atos.com>
10185             David Edelsohn  <dje.gcc@gmail.com>
10187         * collect2.c (static_obj): New variable.
10188         (static_libs): New variable.
10189         (is_in_list): Uncomment declaration.
10190         (main): Track AIX libraries linked statically.
10191         (is_in_list): Uncomment definition.
10192         (scan_prog_file): Don't add AIX shared libraries initializer
10193         to constructor list if linking statically.
10195 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
10197         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10198         constant.
10199         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10201 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
10203         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10204         blocks.
10206 2018-06-19  Martin Liska  <mliska@suse.cz>
10208         * config/i386/i386.c (ix86_can_inline_p): Do not use
10209         ipa_fn_summaries::get_create.
10210         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10211         get.
10212         (devirtualization_time_bonus): Likewise.
10213         (ipcp_propagate_stage): Likewise.
10214         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10215         (edge_set_predicate): Likewise.
10216         (evaluate_conditions_for_known_args): Likewise.
10217         (evaluate_properties_for_edge): Likewise.
10218         (ipa_call_summary::reset): Tranform to ...
10219         (ipa_call_summary::~ipa_call_summary): ... this.
10220         (ipa_fn_summary::reset): Transform to ...
10221         (ipa_fn_summary::~ipa_fn_summary): ... this.
10222         (ipa_fn_summary_t::remove): Rename to ...
10223         (ipa_fn_summary_t::remove_callees): ... this.
10224         (ipa_fn_summary_t::duplicate): Use placement new
10225         instead of memory copy.
10226         (ipa_call_summary_t::duplicate): Likewise.
10227         (ipa_call_summary_t::remove): Remove.
10228         (dump_ipa_call_summary): Change get_create to get.
10229         (ipa_dump_fn_summary): Dump only when summary exists.
10230         (analyze_function_body): Use symbol_summary::get instead
10231         of get_create.
10232         (compute_fn_summary): Likewise.
10233         (estimate_edge_devirt_benefit): Likewise.
10234         (estimate_edge_size_and_time): Likewise.
10235         (inline_update_callee_summaries): Likewise.
10236         (remap_edge_change_prob): Likewise.
10237         (remap_edge_summaries): Likewise.
10238         (ipa_merge_fn_summary_after_inlining): Likewise.
10239         (write_ipa_call_summary): Likewise.
10240         (ipa_fn_summary_write): Likewise.
10241         (ipa_free_fn_summary): Likewise.
10242         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10243         (struct ipa_call_summary): Likewise.
10244         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10245         of get_create.
10246         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10247         (estimate_size_after_inlining): Likewise.
10248         (estimate_growth): Likewise.
10249         (growth_likely_positive): Likewise.
10250         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10251         (inline_call): Likewise.
10252         * ipa-inline.c (caller_growth_limits): Likewise.
10253         (can_inline_edge_p): Likewise.
10254         (can_inline_edge_by_limits_p): Likewise.
10255         (compute_uninlined_call_time): Likewise.
10256         (compute_inlined_call_time): Likewise.
10257         (want_inline_small_function_p): Likewise.
10258         (edge_badness): Likewise.
10259         (update_caller_keys): Likewise.
10260         (update_callee_keys): Likewise.
10261         (inline_small_functions): Likewise.
10262         (inline_to_all_callers_1): Likewise.
10263         (dump_overall_stats): Likewise.
10264         (early_inline_small_functions): Likewise.
10265         (early_inliner): Likewise.
10266         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10267         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10268         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10269         * ipa-split.c (execute_split_functions): Likewise.
10270         * symbol-summary.h: Likewise.
10271         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10273 2018-06-19  Richard Biener  <rguenther@suse.de>
10275         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10276         (vectorize_loops): ... here.  Fix dbgcnt handling.
10277         (try_vectorize_loop): Wrap try_vectorize_loop_1.
10279 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
10281         PR target/86197
10282         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10283         ieee128 argument takes up only one (vector) register, not two (floating
10284         point) registers.
10286 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10288         * gimplify.c (gimplify_init_constructor): Really never clear for an
10289         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10291 2018-06-19  Richard Biener  <rguenther@suse.de>
10293         PR tree-optimization/86179
10294         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10295         after failed recognition.
10297 2018-06-18  Martin Sebor  <msebor@redhat.com>
10299         PR middle-end/85602
10300         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10301         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10302         Handle integer subtraction.
10303         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10304         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10306 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10308         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10309         param from rtx to rtx_insn *.
10310         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10311         param.
10312         (frv_ifcvt_modify_insn): Likwise.
10313         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10314         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
10315         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10316         as_a <rtx_insn *> cast to local "unprotected_region" once
10317         it's been established that it's not NULL or pc_rtx.
10318         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10319         param "sethi" from rtx to rtx_insn *.
10320         (nds32_group_float_insns): Likewise for param "insn".
10321         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10322         param.
10323         (vax_output_int_subtract): Likewise.
10324         * config/vax/vax.c (vax_output_int_add): Likewise for param
10325         "insn".
10326         (vax_output_int_subtract): Likewise.
10327         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10328         (emit_pattern_after): Likewise for param "after".
10329         (emit_insn_after): Likewise.
10330         (emit_jump_insn_after): Likewise.
10331         (emit_call_insn_after): Likewise.
10332         (emit_debug_insn_after): Likewise.
10333         (emit_pattern_before): Likewise for param "before".
10334         (emit_insn_before): Likewise.
10335         (emit_jump_insn_before): Likewise.
10336         * final.c (get_insn_template): Likewise for param "insn", removing
10337         a cast.
10338         * output.h (get_insn_template): Likewise for 2nd param.
10339         * rtl.h (emit_insn_before): Likewise.
10340         (emit_jump_insn_before): Likewise.
10341         (emit_debug_insn_before_noloc): Likewise.
10342         (emit_insn_after): Likewise.
10343         (emit_jump_insn_after): Likewise.
10344         (emit_call_insn_after): Likewise.
10345         (emit_debug_insn_after): Likewise.
10346         (set_insn_deleted): Likewise for param.
10348 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
10350         PR target/85358
10351         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
10352         floating point modes, so that IFmode is numerically greater than
10353         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
10354         to declare the ordering.  This prevents IFmode from being
10355         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
10356         machine.  Include rs6000-modes.h to share the fractional values
10357         between genmodes* and the rest of the compiler.
10358         (IFmode): Likewise.
10359         (KFmode): Likewise.
10360         (TFmode): Likewise.
10361         * config/rs6000/rs6000-modes.h: New file.
10362         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
10363         meaning of rs6000_long_double_size so that 126..128 selects an
10364         appropriate 128-bit floating point type.
10365         (rs6000_option_override_internal): Likewise.
10366         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
10367         (TARGET_LONG_DOUBLE_128): Change the meaning of
10368         rs6000_long_double_size so that 126..128 selects an appropriate
10369         128-bit floating point type.
10370         (LONG_DOUBLE_TYPE_SIZE): Update comment.
10371         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
10372         source and destination to match the standard usage.
10373         (truncifkf2): Likewise.
10374         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
10375         ISA 2.07 to use an explicit clobber, instead of passing in a
10376         temporary.
10377         (copysign<mode>3_soft): Likewise.
10379 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10381         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10382         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
10383         (vect_slp_analyze_instance_dependence): Likewise.
10384         (vect_enhance_data_refs_alignment): Likewise.
10385         (vect_analyze_data_refs_alignment): Likewise.
10386         (vect_slp_analyze_and_verify_instance_alignment
10387         (vect_analyze_data_ref_accesses): Likewise.
10388         (vect_prune_runtime_alias_test_list): Likewise.
10389         (vect_analyze_data_refs): Likewise.
10390         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
10391         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
10392         (vect_analyze_scalar_cycles_1): Likewise.
10393         (vect_get_loop_niters): Likewise.
10394         (vect_analyze_loop_form_1): Likewise.
10395         (vect_update_vf_for_slp): Likewise.
10396         (vect_analyze_loop_operations): Likewise.
10397         (vect_analyze_loop): Likewise.
10398         (vectorizable_induction): Likewise.
10399         (vect_transform_loop): Likewise.
10400         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
10401         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10402         (vect_make_slp_decision): Likewise.
10403         (vect_detect_hybrid_slp): Likewise.
10404         (vect_slp_analyze_operations): Likewise.
10405         (vect_slp_bb): Likewise.
10406         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
10407         (vectorizable_bswap): Likewise.
10408         (vectorizable_call): Likewise.
10409         (vectorizable_simd_clone_call): Likewise.
10410         (vectorizable_conversion): Likewise.
10411         (vectorizable_assignment): Likewise.
10412         (vectorizable_shift): Likewise.
10413         (vectorizable_operation): Likewise.
10414         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
10416 2018-06-18  Martin Sebor  <msebor@redhat.com>
10418         PR tree-optimization/81384
10419         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
10420         * builtins.c (expand_builtin_strnlen): New function.
10421         (expand_builtin): Call it.
10422         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
10423         * builtins.def (BUILT_IN_STRNLEN): New.
10424         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
10425         Warn for bounds in excess of maximum object size.
10426         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
10427         single-value ranges.  Handle strnlen.
10428         (handle_builtin_strlen): Handle strnlen.
10429         (strlen_check_and_optimize_stmt): Same.
10430         * doc/extend.texi (Other Builtins): Document strnlen.
10432 2018-06-18  Maya Rashish  <coypu@sdf.org>
10434         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
10435         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
10436         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
10438         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
10439         here to ...
10440         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
10442 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10444         * tree.c (escaped_string::escape): Replace cast to char * by
10445         const_cast<char *> (unescaped).
10447 2018-06-18  Nick Clifton  <nickc@redhat.com>
10449         PR 84195
10450         * tree.c (escaped_string): New class.  Converts an unescaped
10451         string into its escaped equivalent.
10452         (warn_deprecated_use): Use the new class to convert the
10453         deprecation message, if present.
10454         (test_escaped_strings): New self test.
10455         (test_c_tests): Add test_escaped_strings.
10456         * doc/extend.texi (deprecated): Add a note that the
10457         deprecation message is affected by the -fmessage-length
10458         option, and that control characters will be escaped.
10459         (#pragma GCC error): Document this pragma.
10460         (#pragma GCC warning): Likewise.
10461         * doc/invoke.texi (-fmessage-length): Document this option's
10462         effect on the #warning and #error preprocessor directives and
10463         the deprecated attribute.
10465 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10467         * tree.c (decl_value_expr_lookup): Revert latest change.
10468         (decl_value_expr_insert): Likewise.
10470 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
10472         * gimplify.c (nonlocal_vlas): Delete.
10473         (nonlocal_vla_vars): Likewise.
10474         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
10475         referenced VLAs.
10476         (gimplify_body): Do not create and destroy nonlocal_vlas.
10477         * tree-nested.c: Include diagnostic.h.
10478         (use_pointer_in_frame): Tweak.
10479         (lookup_field_for_decl): Add assertion and declare the transformation.
10480         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
10481         internal error when the reference is in a wrong context.  Do not
10482         create a debug decl by default.
10483         (note_nonlocal_block_vlas): Delete.
10484         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
10485         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
10486         create a debug decl by default.
10487         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
10488         call is in a wrong context.
10489         (fixup_vla_decls): New function.
10490         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
10491         debug variables were created.
10492         * tree.c (decl_value_expr_lookup): Add checking assertion.
10493         (decl_value_expr_insert): Likewise.
10495 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
10497         PR middle-end/82479
10498         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
10499         * tree-scalar-evolution.c (interpret_expr): Likewise.
10500         (expression_expensive_p): Likewise.
10501         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
10502         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
10503         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
10504         (ssa_defined_by_minus_one_stmt_p): New.
10506 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
10508         PR middle-end/64946
10509         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
10510         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
10511         * dojump.c (do_jump): Likewise.
10512         * expr.c (expand_expr_real_2): Check operand type's sign.
10513         * fold-const.c (const_unop): Handle ABSU_EXPR.
10514         (fold_abs_const): Likewise.
10515         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
10516         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
10517         (strip_sign_op_1): Likesise.
10518         * match.pd: Add new pattern to generate ABSU_EXPR.
10519         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
10520         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10521         * tree-eh.c (operation_could_trap_helper_p): Likewise.
10522         * tree-inline.c (estimate_operator_cost): Likewise.
10523         * tree-pretty-print.c (dump_generic_node): Likewise.
10524         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
10525         * tree.def (ABSU_EXPR): New.
10527 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
10529         PR middle-end/86095
10530         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
10531         documented as preserved for backward compatibility only.
10532         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
10534         PR rtl-optimization/86108
10535         * bb-reorder.c (create_forwarder_block): Renamed to ...
10536         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
10537         jump from new landing pad to the second part.
10538         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
10539         Adjust callers.
10541 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
10543         PR middle-end/85878
10544         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
10545         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
10546         Only call store_expr for halves if the mode is the same.
10548         PR middle-end/86123
10549         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
10550         Fix up comment formatting.
10552 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10554         * typed-splay-tree.h (typed_splay_tree::remove): New function.
10555         (typed_splay_tree::closure,
10556         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
10557         (typed_splay_tree::typed_splay_tree,
10558         typed_splay_tree::operator =): Declared private.
10559         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
10560         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
10561         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
10562         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
10563         typed_splay_tree::splay_tree_splay,
10564         typed_splay_tree::splay_tree_foreach_helper,
10565         typed_splay_tree::splay_tree_insert,
10566         typed_splay_tree::splay_tree_remove,
10567         typed_splay_tree::splay_tree_lookup,
10568         typed_splay_tree::splay_tree_predecessor,
10569         typed_splay_tree::splay_tree_successor,
10570         typed_splay_tree::splay_tree_min,
10571         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
10572         (typed_splay_tree::root, typed_splay_tree::comp,
10573         typed_splay_tree::delete_key,
10574         typed_splay_tree::delete_value): New data members.
10575         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
10576         typed_splay_tree::remove.
10578 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
10580         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
10581         -mginv and -mno-ginv to the assembler.
10582         * config/mips/mips.opt (-mcrc): New option.
10583         (-mginv): Likewise.
10584         * doc/invoke.text (-mcrc): Document.
10585         (-mginv): Likewise.
10587 2018-06-15  Nick Clifton  <nickc@redhat.com>
10589         PR 84195
10590         * tree.c (escaped_string): New class.  Converts an unescaped
10591         string into its escaped equivalent.
10592         (warn_deprecated_use): Use the new class to convert the
10593         deprecation message, if present.
10594         (test_escaped_strings): New self test.
10595         (test_c_tests): Add test_escaped_strings.
10596         * doc/extend.texi (deprecated): Add a note that the
10597         deprecation message is affected by the -fmessage-length
10598         option, and that control characters will be escaped.
10599         (#pragma GCC error): Document this pragma.
10600         (#pragma GCC warning): Likewise.
10601         * doc/invoke.texi (-fmessage-length): Document this option's
10602         effect on the #warning and #error preprocessor directives and
10603         the deprecated attribute.
10605 2018-06-15  Richard Biener  <rguenther@suse.de>
10607         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
10608         here, also noting vector size used.
10609         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
10610         size used in MSG_OPTIMIZED_LOCATIONS dump.
10611         (pass_slp_vectorize::execute): Adjust.
10613 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
10615         PR target/85968
10616         * config/arc/arc.c (arc_return_address_register): Fix
10617         if-condition.
10619 2018-06-15  Richard Biener  <rguenther@suse.de>
10621         PR middle-end/86159
10622         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
10623         leave useless conversion stripping to force_gimple_operand_gsi.
10624         (gimplify_build2): Likewise.
10625         (gimplify_build1): Likewise.
10627 2018-06-15  Richard Biener  <rguenther@suse.de>
10629         PR middle-end/86076
10630         * tree-cfg.c (move_stmt_op): unshare invariant addresses
10631         before adjusting their block.
10633 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10635         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
10636         multilibs for *-*-rtems*.
10637         * config/riscv/t-rtems: New file.
10639 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
10641         PR middle-end/86122
10642         * match.pd ((A +- CST1) +- CST2): Punt if last resort
10643         unsigned_type_for returns NULL.
10645         PR target/85945
10646         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
10647         subregs of multi-word pseudos unless the float mode has word size.
10649 2018-06-14  Richard Biener  <rguenther@suse.de>
10651         PR middle-end/86139
10652         * tree-vect-generic.c (build_word_mode_vector_type): Remove
10653         duplicate and harmful type_hash_canon.
10654         * tree.c (type_hash_canon): Assert we didn't find ourselves.
10656 2018-06-14  Richard Biener  <rguenther@suse.de>
10658         PR ipa/86124
10659         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
10660         NULL cgraph_node.
10662 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10664         * config/rtems.h (STDINT_LONG32): Define.
10666 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
10667             Prachi Godbole  <prachi.godbole@imgtec.com>
10669         * config/mips/mips-cpus.def: Define P6600.
10670         * config/mips/mips-tables.opt: Regenerate.
10671         * config/mips/mips.c (mips_ucbranch_type): New enum.
10672         (mips_rtx_cost_data): Add support for P6600.
10673         (mips_issue_rate): Likewise.
10674         (mips_multipass_dfa_lookahead): Likewise.
10675         (mips_avoid_hazard): Likewise.
10676         (mips_reorg_process_insns): Likewise.
10677         (mips_classify_branch_p6600): New function.
10678         * config/mips/mips.h (TUNE_P6600): New define.
10679         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
10680         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
10681         * config/mips/mips.md: Include p6600.md.
10682         (processor): Add p6600.
10683         * config/mips/p6600.md: New file.
10684         * doc/invoke.texi: Add p6600 to supported architectures.
10686 2018-06-13  Martin Sebor  <msebor@redhat.com>
10688         PR tree-optimization/86114
10689         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
10690         of integer types.
10691         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
10693 2018-06-13  Richard Biener  <rguenther@suse.de>
10695         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
10696         Properly set vector type of the intermediate stmt.
10697         * tree-vect-stmts.c (vectorizable_operation): The destination
10698         var always has vectype_out type.
10700 2018-06-13  Jeff Law  <law@redhat.com>
10702         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
10703         integer 0 for argument to print_rtl_with_bb.
10704         (rl78_reorg): Likewise.
10706 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
10708         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
10709         from rtx to rtx_insn *.
10710         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
10711         "label".
10712         (add_sched_insns_for_speculation): Likewise for local "target",
10713         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10714         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
10715         from rtx_insn ** to rtx_code_label **.
10716         (reorg_emit_nops): Likewise.
10717         (c6x_reorg): Likewise for local "call_labels".
10718         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
10719         rtx to rtx_insn *.
10720         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
10721         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
10722         the loops over LABEL_REFS.
10723         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
10724         braf_label.
10725         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10726         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
10727         (split_branches): Strengthen local "olabel" from rtx to
10728         rtx_insn *, adding a safe_as_a cast.
10729         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
10730         to "rtx_insn *".
10731         (add_insn_after): Likewise for first two params.
10732         (add_insn_before): Likewise.
10733         (remove_insn): Likewise for param.
10734         (emit_pattern_before_noloc): Likewise for second and third params.
10735         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
10736         (emit_call_insn_before_noloc): Likewise.
10737         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
10738         to "rtx_insn *".
10739         (emit_barrier_before): Likewise.
10740         (emit_label_before): Strengthen "label" param from "rtx" to
10741         "rtx_code_label *".  Strengthen "before" param from "rtx" to
10742         "rtx_insn *".
10743         (emit_insn_after_1): Strengthen "after" param from "rtx" to
10744         "rtx_insn *".
10745         (emit_pattern_after_noloc): Likewise.
10746         (emit_insn_after_noloc): Likewise.
10747         (emit_jump_insn_after_noloc): Likewise.
10748         (emit_call_insn_after_noloc): Likewise.
10749         (emit_debug_insn_after_noloc): Likewise.
10750         (emit_barrier_after): Likewise.
10751         (emit_label_after): Likewise for both params.
10752         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
10753         "loc" param from "int" to "location_t".
10754         (emit_insn_after_setloc): Likewise.
10755         (emit_jump_insn_after_setloc): Likewise.
10756         (emit_call_insn_after_setloc): Likewise.
10757         (emit_debug_insn_after_setloc): Likewise.
10758         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
10759         "loc" param from "int" to "location_t".
10760         (emit_pattern_before): Convert NULL_RTX to NULL.
10761         (emit_insn_before_setloc): Convert "loc" param from "int" to
10762         "location_t".
10763         (emit_jump_insn_before_setloc): Likewise.
10764         (emit_call_insn_before_setloc): Likewise.
10765         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
10766         rtx_insn *.  Convert "loc" param from "int" to "location_t".
10767         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
10768         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
10769         Convert 3rd param from "int" to "location_t".
10770         (emit_barrier_before, emit_barrier_after, next_real_insn):
10771         Strengthen param from rtx to rtx_insn *.
10772         (emit_label_before): Strengthen 1st param from "rtx" to
10773         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
10774         "rtx_insn *".
10775         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
10776         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
10777         Strengthen 2nd param from "rtx" to "rtx_insn *".
10778         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
10779         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
10780         Likewise. Convert 3rd param from "int" to "location_t".
10781         (emit_label_after): Strengthen 1st param from "rtx" to
10782         "rtx_code_label *".
10783         (next_real_insn, remove_insn): Strengthen param from "rtx" to
10784         "rtx_insn *".
10785         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
10786         from "rtx" to "rtx_insn *".
10788 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
10790         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
10791         bodies streamed in with -Q.
10792         * dumpfile.c (dump_files): Add lto-stream-out dump file.
10793         * dumpfile.h (tree_dump_index): Add lto_stream_out.
10794         * gimple-streamer-out.c: Include gimple-pretty-print.h
10795         (output_bb): Dump stmts streamed.
10796         * lto-section-out.c: Include print-tree.h
10797         (lto_begin_section): Dump sections created.
10798         (lto_output_decl_index): Dump decl encoded.
10799         * lto-streamer-out.c: Include print-tree.h
10800         (create_output_block): Dump output block created.
10801         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
10802         (output_function): Dump function output.
10803         (output_constructor): Dump constructor streamed.
10804         (write_global_stream): Output indexes encoded.
10805         (produce_asm_for_decls): Dump streams encoded.
10806         * lto-streamer.c (streamer_dump_file): New global var.
10807         * lto-streamer.h (streamer_dump_file): Declare.
10808         * passes.c (ipa_write_summaries): Initialize streamer dump.
10809         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
10810         in.
10812 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
10814         PR target/86048
10815         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
10816         offsets for register save directives.  Emit a second batch of save
10817         directives, if need be, when the function accesses prior frames.
10819 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10821         * config/arc/fpu.md (fmasf4): Force operand to register.
10822         (fnmasf4): Likewise.
10824 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10826         * config/arc/arc-protos.h (arc_pad_return): Remove.
10827         * config/arc/arc.c (machine_function): Remove force_short_suffix
10828         and size_reason.
10829         (arc_print_operand): Adjust printing of '&'.
10830         (arc_verify_short): Remove conditional printing of short suffix.
10831         (arc_final_prescan_insn): Remove reference to size_reason.
10832         (pad_return): New function.
10833         (arc_reorg): Call pad_return.
10834         (arc_pad_return): Remove.
10835         (arc_init_machine_status): Remove reference to force_short_suffix.
10836         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
10837         (attr length): When attribute iscompact is true force to 2
10838         regardless; in the case of maybe check if we want to force the
10839         instruction to have 4 bytes length.
10840         (nopv): Change it to generate 4 byte long nop as well.
10841         (blockage): New pattern.
10842         (simple_return): Remove call to arc_pad_return.
10843         (p_return_i): Likewise.
10845 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10847         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
10849 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10851         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
10852         ARC cores.
10854 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10856         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
10857         for ARC700 and ARCv2.
10859 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
10861         PR target/86076
10862         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
10863         operands[2] instead of operands[1].
10866 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10868         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
10869         case, check whether the outer register overlaps an unallocatable
10870         register, not just whether it fits the required class.
10872 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10874         * poly-int.h (can_div_trunc_p): Add new overload in which all values
10875         are poly_ints.
10876         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
10877         (memrefs_conflict_p): Likewise.
10878         (init_alias_analysis): Likewise.
10879         * cfgexpand.c (expand_debug_expr): Likewise.
10880         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
10881         * cse.c (fold_rtx): Likewise.
10882         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
10883         * expr.c (emit_block_move_hints): Likewise.
10884         (clear_storage_hints, push_block, emit_push_insn): Likewise.
10885         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
10886         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
10887         (emit_group_store): Likewise.
10888         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
10889         to read the PRE/POST_MODIFY increment.
10890         * calls.c (store_one_arg): Use strip_offset.
10891         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
10892         poly_int_rtx_p.
10893         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
10894         by a VEC_SELECT.
10895         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
10896         (simplify_binary_operation_1): Extend CONST_INT handling to
10897         poly_int_rtx_p.
10898         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
10899         than a HOST_WIDE_INT.
10900         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
10901         poly_int64.
10902         (adjust_mems, add_stores): Update accodingly.
10903         (vt_canonicalize_addr): Track polynomial offsets.
10904         (emit_note_insn_var_location): Likewise.
10905         (vt_add_function_parameter): Likewise.
10906         (vt_initialize): Likewise.
10908 2018-06-12  Jeff Law  <law@redhat.com>
10910         * config.gcc (alpha*-*-freebsd*): Remove.
10911         * config/alpha/freebsd.h: Remove.
10913 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
10915         PR other/69968
10916         * spellcheck-tree.c (levenshtein_distance): Rename to...
10917         (get_edit_distance): ...this, and update for underlying renaming.
10918         * spellcheck-tree.h (levenshtein_distance): Rename to...
10919         (get_edit_distance): ...this.
10920         * spellcheck.c (levenshtein_distance): Rename to...
10921         (get_edit_distance): ...this.  Convert from Levenshtein distance
10922         to Damerau-Levenshtein distance by supporting transpositions of
10923         adjacent characters.  Rename "v1" to "v_next" and "v0" to
10924         "v_one_ago".
10925         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
10926         (selftest::test_edit_distance_unit_test_oneway): ...this, and
10927         update for underlying renaming.
10928         (selftest::levenshtein_distance_unit_test): Rename to...
10929         (selftest::test_get_edit_distance_unit): ...this, and update for
10930         underlying renaming.
10931         (selftest::test_find_closest_string): Add example from PR 69968
10932         where transposition helps
10933         (selftest::test_metric_conditions): Update for renaming.
10934         (selftest::test_metric_conditions): Likewise.
10935         (selftest::spellcheck_c_tests): Likewise.
10936         * spellcheck.h (levenshtein_distance): Rename both overloads to...
10937         (get_edit_distance): ...this.
10938         (best_match::consider): Update for renaming.
10940 2018-06-12  Martin Sebor  <msebor@redhat.com>
10942         PR tree-optimization/85259
10943         * builtins.c (compute_objsize): Handle constant offsets.
10944         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
10945         true iff a warning has been issued.
10946         * gimple.h (gimple_nonartificial_location): New function.
10947         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
10948         gimple_nonartificial_location and handle -Wno-system-headers.
10949         (handle_builtin_stxncpy): Same.
10951 2018-06-12  Martin Sebor  <msebor@redhat.com>
10953         PR c/85931
10954         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
10956 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
10958         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
10959         BUILTIN_VEC_XST entries for pointer to double and long long.
10961 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
10963         PR target/85990
10964         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10965         Update comments.
10966         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10967         Likewise.
10969 2018-06-12  Martin Liska  <mliska@suse.cz>
10971         * doc/options.texi: Document IntegerRange.
10973 2018-06-12  Martin Liska  <mliska@suse.cz>
10975         * config/i386/i386.opt: Make MPX-related options as Deprecated.
10976         * opt-functions.awk: Handle Deprecated flag.
10977         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
10978         and report error.
10979         (read_cmdline_option): Report warning for a deprecated option.
10980         * opts.h (struct cl_option): Add new field cl_deprecated.
10981         (CL_ERR_DEPRECATED): New.
10983 2018-06-12  Martin Liska  <mliska@suse.cz>
10985         * doc/options.texi: Document Deprecated option flag.
10987 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10989         * config/arc/arc-arch.h (arc_extras): New enum.
10990         (arc_cpu_t):Add field extra.
10991         (arc_cpu_types): Consider the extras.
10992         * config/arc/arc-cpus.def: Add extras info.
10993         * config/arc/arc-opts.h (processor_type): Consider extra field.
10994         * config/arc/arc.c (arc_override_options): Handle extra field.
10996 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10998         * config/arc/arc-arch.h: Update ARC_OPTX macro.
10999         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11000         field.
11001         * config/arc/arc.c (arc_init): Update pic warning.
11002         (irq_range): Update irq range parsing warnings.
11003         (arc_override_options): Update various warning messages.
11004         (arc_handle_aux_attribute): Likewise.
11006 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
11008         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11010 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11012         * doc/sourcebuild.texi: Document usage of line number 0 in verify
11013         compiler messages directives.
11015 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
11017         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11018         * config/mips/mips-tables.opt: Regenerate.
11019         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11020         mips64r6.
11021         * doc/invoke.texi: Document -march=i6500.
11023 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
11025         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11026         (i6400_gpmul): Add cpu_unit.
11027         (i6400_gpdiv): Likewise.
11028         (i6400_msa_add_d): Update reservations.
11029         (i6400_msa_int_add) Likewise.
11030         (i6400_msa_short_logic3) Likewise.
11031         (i6400_msa_short_logic2) Likewise.
11032         (i6400_msa_short_logic) Likewise.
11033         (i6400_msa_move) Likewise.
11034         (i6400_msa_cmp) Likewise.
11035         (i6400_msa_short_float2) Likewise.
11036         (i6400_msa_div_d) Likewise.
11037         (i6400_msa_long_logic1) Likewise.
11038         (i6400_msa_long_logic2) Likewise.
11039         (i6400_msa_mult) Likewise.
11040         (i6400_msa_long_float2) Likewise.
11041         (i6400_msa_long_float4) Likewise.
11042         (i6400_msa_long_float5) Likewise.
11043         (i6400_msa_long_float8) Likewise.
11044         (i6400_fpu_fadd): Include frint type.
11045         (i6400_fpu_store): New define_insn_reservation.
11046         (i6400_fpu_load): Likewise.
11047         (i6400_fpu_move): Likewise.
11048         (i6400_fpu_fcmp): Likewise.
11049         (i6400_fpu_fmadd): Likewise.
11050         (i6400_int_mult): Include imul3nc type and update reservation.
11051         (i6400_int_div): Include idiv3 type and update reservation.
11052         (i6400_int_load): Update to check type not move_type.
11053         (i6400_int_store): Likewise.
11054         (i6400_int_prefetch): Set zero latency.
11056 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
11058         * gcc.c: Document new %@{...} sequence.
11059         (LINK_COMMAND_SPEC): Use it for the -L switches.
11060         (cpp_unique_options): Use it for the -I switches.
11061         (at_file_argbuf): New global variable.
11062         (in_at_file): Likewise.
11063         (alloc_args): Create at_file_argbuf.
11064         (clear_args): Truncate at_file_argbuf.
11065         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11066         (open_at_file): New function.
11067         (close_at_file): Likewise.
11068         (create_at_file): Delete.
11069         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11070         <'o'>: Likewise.
11071         <'@'>: New case.
11072         (validate_switches_from_spec): Deal with %@{...} sequence.
11073         (validate_switches): Likewise.
11074         (driver::finalize): Call clear_args.
11076 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
11078         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11080 2018-06-11  Martin Sebor  <msebor@redhat.com>
11082         * doc/invoke.texi (-Wall): List -Wc++17-compat.
11083         (Wno-class-memaccess): Add @opindex.
11084         (Wno-templates, Wno-multiple-inheritance): Same.
11085         (Wno-virtual-inheritance, Wno-namespaces): Same.
11086         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11087         (Wno-format-overflow, Wno-format-truncation): Same.
11088         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11089         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11090         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11091         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11092         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11093         (Wno-misspelled-isr): Same.
11095 2018-06-11  Martin Sebor  <msebor@redhat.com>
11097         * PR tree-optimization/86083
11098         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11100 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11102         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11104 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11106         PR target/85755
11107         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11108         on the correct operand.
11109         (*movdi_internal64): Ditto.
11111 2018-06-11  Martin Liska  <mliska@suse.cz>
11113         PR tree-optimization/86089
11114         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11116 2018-06-11  Julia Koval  <julia.koval@intel.com>
11118         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11119         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11120         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11122 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11124         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11125         for Ada with strict dwarf2.
11127 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11129         PR target/85755
11130         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11131         addresses.
11133 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11135         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11137 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
11139         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11140         TARGET_ELF.
11142 2018-06-08  Martin Liska  <mliska@suse.cz>
11144         * tree-cfg.h (debug_function): Fix argument type to match
11145         implementation.
11147 2018-06-08  Martin Liska  <mliska@suse.cz>
11149         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11150         Remove usage of MPX-related (and removed) fields.
11151         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11153 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
11155         * cfg.c (debug): Use TDF_NONE rather than 0.
11156         * cfghooks.c (debug): Likewise.
11157         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11158         (struct dump_option_value_info): Convert to...
11159         (struct kv_pair): ...this template type.
11160         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11161         rather than 0.
11162         (optinfo_verbosity_options): Likewise.
11163         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11164         OPTGROUP_NONE.
11165         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11166         than int for "optgroup_flags" param.
11167         (dump_generic_expr_loc): Use dump_flags_t rather than int for
11168         "dump_kind" param.
11169         (dump_dec): Likewise.
11170         (dump_finish): Use TDF_NONE rather than 0.
11171         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11172         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
11173         than 0.  Update for change to option_ptr.
11174         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11175         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
11176         0.  Update for changes to optinfo_verbosity_options and
11177         optgroup_options.
11178         (opt_info_switch_p): Convert optgroup_flags from int to
11179         optgroup_flags_t.
11180         (dump_basic_block): Use dump_flags_t rather than int
11181         for "dump_kind" param.
11182         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11183         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11184         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11185         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11186         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11187         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11188         TDF_NONE): Convert from macros to...
11189         (enum dump_flag): ...this new enum.
11190         (dump_flags_t): Update to use enum.
11191         (operator|, operator&, operator~, operator|=, operator&=):
11192         Implement for dump_flags_t.
11193         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11194         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11195         Convert from macros to...
11196         (enum optgroup_flag): ...this new enum.
11197         (optgroup_flags_t): New typedef.
11198         (operator|, operator|=): Implement for optgroup_flags_t.
11199         (struct dump_file_info): Convert field "alt_flags" to
11200         dump_flags_t.  Convert field "optgroup_flags" to
11201         optgroup_flags_t.
11202         (dump_basic_block): Use dump_flags_t rather than int for param.
11203         (dump_generic_expr_loc): Likewise.
11204         (dump_dec): Likewise.
11205         (dump_register): Convert param "optgroup_flags" to
11206         optgroup_flags_t.
11207         (opt_info_enable_passes): Likewise.
11208         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11209         than 0.
11210         * gimple-pretty-print.c (debug): Likewise.
11211         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11212         (merged_store_group::apply_stores): Likewise.
11213         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11214         * gimple.c (verify_gimple_pp): Likewise.
11215         * graphite-poly.c (print_pbb_body): Likewise.
11216         * passes.c (pass_manager::register_one_dump_file): Convert
11217         local "optgroup_flags" to optgroup_flags_t.
11218         * print-tree.c (print_node): Use TDF_NONE rather than 0.
11219         (debug): Likewise.
11220         (debug_body): Likewise.
11221         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11222         to optgroup_flags_t.
11223         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11224         than 0.
11225         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11226         (convert_mult_to_fma): Likewise.
11227         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11228         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11229         * tree-vect-data-refs.c (dump_lower_bound): Convert param
11230         "dump_kind" to dump_flags_t.
11232 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11234         * config/rs6000/rs6000.c (min, max): Delete.
11236 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11238         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11239         -mabi=spe and -mabi=no-spe.
11241 2018-06-08  Martin Liska  <mliska@suse.cz>
11243         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11244         where we expect an existing summary.
11246 2018-06-08  Martin Liska  <mliska@suse.cz>
11248         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11249         * ipa-inline.h (estimate_edge_growth): Likewise.
11251 2018-06-08  Martin Liska  <mliska@suse.cz>
11253         * cgraph.c (function_version_hasher::hash): Use
11254         cgraph_node::get_uid ().
11255         (function_version_hasher::equal):
11256         * cgraph.h (cgraph_node::get_uid): New method.
11257         * ipa-inline.c (update_caller_keys): Use
11258         cgraph_node::get_uid ().
11259         (update_callee_keys): Likewise.
11260         * ipa-utils.c (searchc): Likewise.
11261         (ipa_reduced_postorder): Likewise.
11262         * lto-cgraph.c (input_node): Likewise.
11263         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11264         * symbol-summary.h (symtab_insertion): Likewise.
11265         (symtab_removal): Likewise.
11266         (symtab_duplication): Likewise.
11267         * tree-pretty-print.c (dump_function_header): Likewise.
11268         * tree-sra.c (convert_callers_for_node): Likewise.
11270 2018-06-08  Martin Liska  <mliska@suse.cz>
11272         * cgraph.c (symbol_table::create_edge): Always assign a new
11273         unique number.
11274         (symbol_table::free_edge): Do not recycle numbers.
11275         * cgraph.h (cgraph_edge::get): New method.
11276         * symbol-summary.h (symtab_removal): Use it.
11277         (symtab_duplication): Likewise.
11278         (call_summary::hashable_uid): Remove.
11280 2018-06-08  Martin Liska  <mliska@suse.cz>
11282         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11283         (initialize_growth_caches): Remove.
11284         (free_growth_caches): Likewise.
11285         (do_estimate_edge_time): Use edge_growth_cache.
11286         (do_estimate_edge_size): Likewise.
11287         (do_estimate_edge_hints): Likewise.
11288         * ipa-inline.c (reset_edge_caches): Likewise.
11289         (recursive_inlining): Likewise.
11290         (inline_small_functions): Likewise.
11291         * ipa-inline.h (initialize_growth_caches): Remove.
11292         (estimate_edge_size): Likewise.
11293         (estimate_edge_time): Likewise.
11294         (estimate_edge_hints): Likewise.
11295         (reset_edge_growth_cache): Likewise.
11296         * symbol-summary.h (call_summary::remove): New method.
11298 2018-06-08  Martin Liska  <mliska@suse.cz>
11300         * ipa-cp.c (class edge_clone_summary): New summary.
11301         (grow_edge_clone_vectors): Remove.
11302         (ipcp_edge_duplication_hook): Remove.
11303         (class edge_clone_summary_t): New call_summary class.
11304         (ipcp_edge_removal_hook): Remove.
11305         (edge_clone_summary_t::duplicate): New function.
11306         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11307         (create_specialized_node): Likewise.
11308         (ipcp_driver): Initialize edge_clone_summaries and do not
11309         register hooks.
11311 2018-06-08  Martin Liska  <mliska@suse.cz>
11313         * symbol-summary.h (get): New function.
11314         (call_summary::m_initialize_when_cloning): New class member.
11316 2018-06-08  Martin Liska  <mliska@suse.cz>
11318         * cgraph.c (cgraph_node::remove): Do not recycle uid.
11319         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11320         (symbol_table::allocate_cgraph_symbol): Do not set uid.
11321         * passes.c (uid_hash_t): Record removed_nodes by their uids.
11322         (remove_cgraph_node_from_order): Use the removed_nodes set.
11323         (do_per_function_toporder): Likwise.
11324         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11325         instead of summary_uid.
11326         (symtab_removal): Likewise.
11327         (symtab_duplication): Likewise.
11329 2018-06-08  Martin Liska  <mliska@suse.cz>
11331         * ipa-cp.c (ipcp_store_bits_results): Use
11332         ipcp_transformation_sum.
11333         (ipcp_store_vr_results): Likewise.
11334         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11335         to ...
11336         (ipcp_transformation_initialize): ... this.
11337         (ipa_set_node_agg_value_chain):
11338         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11339         (write_ipcp_transformation_info): Likewise.
11340         (read_ipcp_transformation_info): Likewise.
11341         (ipcp_update_bits): Likewise.
11342         (ipcp_update_vr): Likewise.
11343         (ipcp_transform_function): Likewise.
11344         * ipa-prop.h: Rename ipcp_transformation_summary to
11345         ipcp_transformation.
11346         (class ipcp_transformation_t): New function summary.
11347         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
11348         (ipa_get_agg_replacements_for_node): Likewise.
11350 2018-06-08  Martin Liska  <mliska@suse.cz>
11352         * ipa-pure-const.c (struct funct_state_d): Do it class instead
11353         of struct.
11354         (class funct_state_summary_t): New function_summary class.
11355         (has_function_state): Remove.
11356         (get_function_state): Likewise.
11357         (set_function_state): Likewise.
11358         (add_new_function): Likewise.
11359         (funct_state_summary_t::insert): New function.
11360         (duplicate_node_data): Remove.
11361         (remove_node_data): Remove.
11362         (funct_state_summary_t::duplicate): New function.
11363         (register_hooks): Create new funct_state_summaries.
11364         (pure_const_generate_summary): Use it.
11365         (pure_const_write_summary): Likewise.
11366         (pure_const_read_summary): Likewise.
11367         (propagate_pure_const): Likewise.
11368         (propagate_nothrow): Likewise.
11369         (dump_malloc_lattice): Likewise.
11370         (propagate_malloc): Likewise.
11371         (execute): Do not register hooks, just remove summary
11372         instead.
11373         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
11374         constructor.
11376 2018-06-08  Martin Liska  <mliska@suse.cz>
11378         * ipa-reference.c (remove_node_data): Remove.
11379         (duplicate_node_data): Likewise.
11380         (class ipa_ref_var_info_summary_t): New class.
11381         (class ipa_ref_opt_summary_t): Likewise.
11382         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
11383         (get_reference_optimization_summary): Use
11384         ipa_ref_opt_sum_summaries.
11385         (set_reference_vars_info): Remove.
11386         (set_reference_optimization_summary): Likewise.
11387         (ipa_init): Create summaries.
11388         (init_function_info): Use function summary.
11389         (ipa_ref_opt_summary_t::duplicate): New function.
11390         (ipa_ref_opt_summary_t::remove): New function.
11391         (get_read_write_all_from_node): Fix GNU coding style.
11392         (propagate): Use function summary.
11393         (write_node_summary_p): Fix GNU coding style.
11394         (stream_out_bitmap): Likewise.
11395         (ipa_reference_read_optimization_summary): Use function summary.
11396         (ipa_reference_c_finalize): Do not release hooks.
11398 2018-06-08  Martin Liska  <mliska@suse.cz>
11400         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
11401         (analyze_function_body): Extract multiple calls of get_create.
11402         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11403         * ipa-inline.c (recursive_inlining): Use ::get method.
11404         * ipa-inline.h (estimate_edge_growth): Likewise.
11406 2018-06-08  Martin Liska  <mliska@suse.cz>
11408         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
11409         HSA_INVALID.
11410         (hsa_function_summary::hsa_function_summary): Use the new enum
11411         value.
11412         (hsa_gpu_implementation_p): Use hsa_summaries::get.
11413         * hsa-gen.c (hsa_get_host_function): Likewise.
11414         (get_brig_function_name): Likewise.
11415         * ipa-hsa.c (process_hsa_functions): Likewise.
11416         (ipa_hsa_write_summary): Likewise.
11417         * symbol-summary.h (symtab_duplication): Use ::get function/
11418         (get): New function.
11420 2018-06-08  Martin Liska  <mliska@suse.cz>
11422         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
11423         of get.
11424         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
11425         (hsa_register_kernel): Likewise.
11426         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
11427         * hsa-gen.c (hsa_get_host_function): Likewise.
11428         (get_brig_function_name): Likewise.
11429         (generate_hsa): Likewise.
11430         (pass_gen_hsail::execute): Likewise.
11431         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
11432         (devirtualization_time_bonus): Likewise.
11433         (ipcp_propagate_stage): Likewise.
11434         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11435         (edge_set_predicate): Likewise.
11436         (evaluate_conditions_for_known_args): Likewise.
11437         (evaluate_properties_for_edge): Likewise.
11438         (ipa_fn_summary::reset): Likewise.
11439         (ipa_fn_summary_t::duplicate): Likewise.
11440         (dump_ipa_call_summary): Likewise.
11441         (ipa_dump_fn_summary): Likewise.
11442         (analyze_function_body): Likewise.
11443         (compute_fn_summary): Likewise.
11444         (estimate_edge_devirt_benefit): Likewise.
11445         (estimate_edge_size_and_time): Likewise.
11446         (estimate_calls_size_and_time): Likewise.
11447         (estimate_node_size_and_time): Likewise.
11448         (inline_update_callee_summaries): Likewise.
11449         (remap_edge_change_prob): Likewise.
11450         (remap_edge_summaries): Likewise.
11451         (ipa_merge_fn_summary_after_inlining): Likewise.
11452         (ipa_update_overall_fn_summary): Likewise.
11453         (read_ipa_call_summary): Likewise.
11454         (inline_read_section): Likewise.
11455         (write_ipa_call_summary): Likewise.
11456         (ipa_fn_summary_write): Likewise.
11457         (ipa_free_fn_summary): Likewise.
11458         * ipa-hsa.c (process_hsa_functions): Likewise.
11459         (ipa_hsa_write_summary): Likewise.
11460         (ipa_hsa_read_section): Likewise.
11461         * ipa-icf.c (sem_function::merge): Likewise.
11462         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11463         (do_estimate_edge_time): Likewise.
11464         (estimate_size_after_inlining): Likewise.
11465         (estimate_growth): Likewise.
11466         (growth_likely_positive): Likewise.
11467         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11468         (inline_call): Likewise.
11469         * ipa-inline.c (caller_growth_limits): Likewise.
11470         (can_inline_edge_p): Likewise.
11471         (can_inline_edge_by_limits_p): Likewise.
11472         (compute_uninlined_call_time): Likewise.
11473         (compute_inlined_call_time): Likewise.
11474         (want_inline_small_function_p): Likewise.
11475         (edge_badness): Likewise.
11476         (update_caller_keys): Likewise.
11477         (update_callee_keys): Likewise.
11478         (recursive_inlining): Likewise.
11479         (inline_small_functions): Likewise.
11480         (inline_to_all_callers_1): Likewise.
11481         (dump_overall_stats): Likewise.
11482         (early_inline_small_functions): Likewise.
11483         (early_inliner): Likewise.
11484         * ipa-inline.h (estimate_edge_growth): Likewise.
11485         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11486         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11487         * ipa-prop.h (IPA_NODE_REF): Likewise.
11488         (IPA_EDGE_REF): Likewise.
11489         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11490         (propagate_malloc): Likewise.
11491         * ipa-split.c (execute_split_functions): Likewise.
11492         * symbol-summary.h: Rename get to get_create.
11493         (get): Likewise.
11494         (get_create): Likewise.
11495         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11497 2018-06-08  Martin Liska  <mliska@suse.cz>
11499         * symbol-summary.h (release): Move definition out of class
11500         declaration.
11501         (symtab_removal): Likewise.
11502         (symtab_duplication): Likewise.
11504 2018-06-08  Martin Liska  <mliska@suse.cz>
11506         * symbol-summary.h (function_summary): Move constructor
11507         implementation out of class declaration.
11508         (release): Likewise.
11509         (symtab_insertion): Likewise.
11510         (symtab_removal): Likewise.
11511         (symtab_duplication): Likewise.
11512         (get): Likewise.
11514 2018-06-08  Martin Liska  <mliska@suse.cz>
11516         * Makefile.in: Remove support for MPX (macros, related functions,
11517         fields in cgraph_node, ...).
11518         * builtin-types.def (BT_BND): Likewise.
11519         (BT_FN_BND_CONST_PTR): Likewise.
11520         (BT_FN_CONST_PTR_BND): Likewise.
11521         (BT_FN_VOID_PTR_BND): Likewise.
11522         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
11523         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
11524         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
11525         (expand_builtin_mempcpy_with_bounds): Likewise.
11526         (expand_builtin_memset_with_bounds): Likewise.
11527         (expand_builtin_memset_args): Likewise.
11528         (std_expand_builtin_va_start): Likewise.
11529         (expand_builtin): Likewise.
11530         (expand_builtin_with_bounds): Likewise.
11531         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
11532         (DEF_LIB_BUILTIN_CHKP): Likewise.
11533         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
11534         (DEF_CHKP_BUILTIN): Likewise.
11535         (BUILT_IN_MEMCPY): Likewise.
11536         (BUILT_IN_MEMMOVE): Likewise.
11537         (BUILT_IN_MEMPCPY): Likewise.
11538         (BUILT_IN_MEMSET): Likewise.
11539         (BUILT_IN_STPCPY): Likewise.
11540         (BUILT_IN_STRCAT): Likewise.
11541         (BUILT_IN_STRCHR): Likewise.
11542         (BUILT_IN_STRCPY): Likewise.
11543         (BUILT_IN_STRLEN): Likewise.
11544         (BUILT_IN_MEMCPY_CHK): Likewise.
11545         (BUILT_IN_MEMMOVE_CHK): Likewise.
11546         (BUILT_IN_MEMPCPY_CHK): Likewise.
11547         (BUILT_IN_MEMSET_CHK): Likewise.
11548         (BUILT_IN_STPCPY_CHK): Likewise.
11549         (BUILT_IN_STRCAT_CHK): Likewise.
11550         (BUILT_IN_STRCPY_CHK): Likewise.
11551         * calls.c (store_bounds): Likewise.
11552         (emit_call_1): Likewise.
11553         (special_function_p): Likewise.
11554         (maybe_warn_nonstring_arg): Likewise.
11555         (initialize_argument_information): Likewise.
11556         (finalize_must_preallocate): Likewise.
11557         (compute_argument_addresses): Likewise.
11558         (expand_call): Likewise.
11559         * cfgexpand.c (expand_call_stmt): Likewise.
11560         (expand_return): Likewise.
11561         (expand_gimple_stmt_1): Likewise.
11562         (pass_expand::execute): Likewise.
11563         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
11564         (cgraph_node::remove): Likewise.
11565         (cgraph_node::dump): Likewise.
11566         (cgraph_node::verify_node): Likewise.
11567         * cgraph.h (chkp_function_instrumented_p): Likewise.
11568         (symtab_node::get_alias_target): Likewise.
11569         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
11570         (cgraph_local_p): Likewise.
11571         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
11572         (cgraph_edge::rebuild_references): Likewise.
11573         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
11574         (walk_polymorphic_call_targets): Likewise.
11575         (cgraph_node::expand_thunk): Likewise.
11576         (symbol_table::output_weakrefs): Likewise.
11577         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
11578         (ix86_handle_option): Likewise.
11579         * config/i386/constraints.md: Likewise.
11580         * config/i386/i386-builtin-types.def (BND): Likewise.
11581         (VOID): Likewise.
11582         (PVOID): Likewise.
11583         (ULONG): Likewise.
11584         * config/i386/i386-builtin.def (BDESC_END): Likewise.
11585         (BDESC_FIRST): Likewise.
11586         (BDESC): Likewise.
11587         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
11588         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
11589         * config/i386/i386.c (enum reg_class): Likewise.
11590         (ix86_target_string): Likewise.
11591         (ix86_option_override_internal): Likewise.
11592         (ix86_conditional_register_usage): Likewise.
11593         (ix86_valid_target_attribute_inner_p): Likewise.
11594         (ix86_set_indirect_branch_type): Likewise.
11595         (ix86_set_current_function): Likewise.
11596         (ix86_function_arg_regno_p): Likewise.
11597         (init_cumulative_args): Likewise.
11598         (ix86_function_arg_advance): Likewise.
11599         (ix86_function_arg): Likewise.
11600         (ix86_pass_by_reference): Likewise.
11601         (ix86_function_value_regno_p): Likewise.
11602         (ix86_function_value_1): Likewise.
11603         (ix86_function_value_bounds): Likewise.
11604         (ix86_return_in_memory): Likewise.
11605         (ix86_setup_incoming_vararg_bounds): Likewise.
11606         (ix86_va_start): Likewise.
11607         (indirect_thunk_need_prefix): Likewise.
11608         (print_reg): Likewise.
11609         (ix86_print_operand): Likewise.
11610         (ix86_expand_call): Likewise.
11611         (ix86_output_function_return): Likewise.
11612         (reg_encoded_number): Likewise.
11613         (BDESC_VERIFYS): Likewise.
11614         (ix86_init_mpx_builtins): Likewise.
11615         (ix86_init_builtins): Likewise.
11616         (ix86_emit_cmove): Likewise.
11617         (ix86_emit_move_max): Likewise.
11618         (ix86_expand_builtin): Likewise.
11619         (ix86_builtin_mpx_function): Likewise.
11620         (ix86_get_arg_address_for_bt): Likewise.
11621         (ix86_load_bounds): Likewise.
11622         (ix86_store_bounds): Likewise.
11623         (ix86_load_returned_bounds): Likewise.
11624         (ix86_store_returned_bounds): Likewise.
11625         (ix86_class_likely_spilled_p): Likewise.
11626         (ix86_hard_regno_mode_ok): Likewise.
11627         (x86_order_regs_for_local_alloc): Likewise.
11628         (ix86_mitigate_rop): Likewise.
11629         (ix86_bnd_prefixed_insn_p): Likewise.
11630         (ix86_mpx_bound_mode): Likewise.
11631         (ix86_make_bounds_constant): Likewise.
11632         (ix86_initialize_bounds): Likewise.
11633         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
11634         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
11635         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
11636         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
11637         (TARGET_CHKP_BOUND_MODE): Likewise.
11638         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
11639         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
11640         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
11641         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
11642         * config/i386/i386.h (TARGET_MPX): Likewise.
11643         (TARGET_MPX_P): Likewise.
11644         (VALID_BND_REG_MODE): Likewise.
11645         (FIRST_BND_REG): Likewise.
11646         (LAST_BND_REG): Likewise.
11647         (enum reg_class): Likewise.
11648         (BND_REG_P): Likewise.
11649         (BND_REGNO_P): Likewise.
11650         (BNDmode): Likewise.
11651         (ADJUST_INSN_LENGTH): Likewise.
11652         * config/i386/i386.md: Likewise.
11653         * config/i386/i386.opt: Likewise.
11654         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
11655         (defined): Likewise.
11656         (LINK_MPX): Likewise.
11657         (MPX_SPEC): Likewise.
11658         (LIBMPX_SPEC): Likewise.
11659         (LIBMPXWRAPPERS_SPEC): Likewise.
11660         (CHKP_SPEC): Likewise.
11661         * config/i386/predicates.md: Likewise.
11662         * dbxout.c (dbxout_type): Likewise.
11663         * doc/extend.texi: Likewise.
11664         * doc/invoke.texi: Likewise.
11665         * doc/md.texi: Likewise.
11666         * doc/tm.texi: Likewise.
11667         * doc/tm.texi.in: Likewise.
11668         * dwarf2out.c (is_base_type): Likewise.
11669         (gen_formal_types_die): Likewise.
11670         (gen_subprogram_die): Likewise.
11671         (gen_type_die_with_usage): Likewise.
11672         (gen_decl_die): Likewise.
11673         (dwarf2out_late_global_decl): Likewise.
11674         * expr.c (expand_assignment): Likewise.
11675         (emit_storent_insn): Likewise.
11676         (store_expr_with_bounds): Likewise.
11677         (store_expr): Likewise.
11678         (expand_expr_real_1): Likewise.
11679         * expr.h (store_expr_with_bounds): Likewise.
11680         * function.c (use_register_for_decl): Likewise.
11681         (struct bounds_parm_data): Likewise.
11682         (assign_parms_augmented_arg_list): Likewise.
11683         (assign_parm_find_entry_rtl): Likewise.
11684         (assign_parm_is_stack_parm): Likewise.
11685         (assign_parm_load_bounds): Likewise.
11686         (assign_bounds): Likewise.
11687         (assign_parms): Likewise.
11688         (expand_function_start): Likewise.
11689         * gcc.c (CHKP_SPEC): Likewise.
11690         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
11691         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
11692         (wrestrict_dom_walker::check_call): Likewise.
11693         * gimple.c (gimple_build_call_from_tree): Likewise.
11694         * gimple.h (enum gf_mask): Likewise.
11695         (gimple_call_with_bounds_p): Likewise.
11696         (gimple_call_set_with_bounds): Likewise.
11697         * gimplify.c (gimplify_init_constructor): Likewise.
11698         * ipa-cp.c (initialize_node_lattices): Likewise.
11699         (propagate_constants_across_call): Likewise.
11700         (find_more_scalar_values_for_callers_subset): Likewise.
11701         * ipa-hsa.c (process_hsa_functions): Likewise.
11702         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
11703         * ipa-icf.c (sem_function::merge): Likewise.
11704         * ipa-inline.c (early_inliner): Likewise.
11705         * ipa-pure-const.c (warn_function_noreturn): Likewise.
11706         (warn_function_cold): Likewise.
11707         (propagate_pure_const): Likewise.
11708         * ipa-ref.h (enum GTY): Likewise.
11709         * ipa-split.c (find_retbnd): Likewise.
11710         (consider_split): Likewise.
11711         (split_function): Likewise.
11712         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11713         * ipa.c (walk_polymorphic_call_targets): Likewise.
11714         (symbol_table::remove_unreachable_nodes): Likewise.
11715         (process_references): Likewise.
11716         (cgraph_build_static_cdtor_1): Likewise.
11717         * lto-cgraph.c (lto_output_node): Likewise.
11718         (output_refs): Likewise.
11719         (compute_ltrans_boundary): Likewise.
11720         (input_overwrite_node): Likewise.
11721         (input_node): Likewise.
11722         (input_cgraph_1): Likewise.
11723         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
11724         * passes.c (pass_manager::execute_early_local_passes): Likewise.
11725         (class pass_chkp_instrumentation_passes): Likewise.
11726         (make_pass_chkp_instrumentation_passes): Likewise.
11727         * passes.def: Likewise.
11728         * rtl.h (struct GTY): Likewise.
11729         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
11730         * stor-layout.c (layout_type): Likewise.
11731         * symtab.c: Likewise.
11732         * target.def: Likewise.
11733         * targhooks.c (default_chkp_bound_type): Likewise.
11734         (default_chkp_bound_mode): Likewise.
11735         (default_builtin_chkp_function): Likewise.
11736         (default_chkp_function_value_bounds): Likewise.
11737         (default_chkp_make_bounds_constant): Likewise.
11738         (default_chkp_initialize_bounds): Likewise.
11739         * targhooks.h (default_chkp_bound_type): Likewise.
11740         (default_chkp_bound_mode): Likewise.
11741         (default_builtin_chkp_function): Likewise.
11742         (default_chkp_function_value_bounds): Likewise.
11743         (default_chkp_make_bounds_constant): Likewise.
11744         (default_chkp_initialize_bounds): Likewise.
11745         * toplev.c (compile_file): Likewise.
11746         (process_options): Likewise.
11747         * tree-core.h (DEF_BUILTIN): Likewise.
11748         (DEF_BUILTIN_CHKP): Likewise.
11749         * tree-inline.c (declare_return_variable): Likewise.
11750         (remap_gimple_stmt): Likewise.
11751         (copy_bb): Likewise.
11752         (initialize_inlined_parameters): Likewise.
11753         (expand_call_inline): Likewise.
11754         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
11755         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
11756         (make_pass_ipa_chkp_produce_thunks): Likewise.
11757         (make_pass_chkp): Likewise.
11758         (make_pass_chkp_opt): Likewise.
11759         (make_pass_chkp_instrumentation_passes): Likewise.
11760         * tree-pretty-print.c (dump_generic_node): Likewise.
11761         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
11762         * tree-ssa-dce.c (propagate_necessity): Likewise.
11763         (eliminate_unnecessary_stmts): Likewise.
11764         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
11765         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
11766         * tree-ssa-sccvn.h: Likewise.
11767         * tree-ssa-strlen.c (get_string_length): Likewise.
11768         (valid_builtin_call): Likewise.
11769         (adjust_last_stmt): Likewise.
11770         (handle_builtin_strchr): Likewise.
11771         (handle_builtin_strcpy): Likewise.
11772         (handle_builtin_stxncpy): Likewise.
11773         (handle_builtin_memcpy): Likewise.
11774         (handle_builtin_strcat): Likewise.
11775         (strlen_check_and_optimize_stmt): Likewise.
11776         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
11777         * tree-streamer-in.c: Likewise.
11778         * tree-streamer.c (record_common_node): Likewise.
11779         * tree.c (tree_code_size): Likewise.
11780         (wide_int_to_tree_1): Likewise.
11781         (type_contains_placeholder_1): Likewise.
11782         (build_common_tree_nodes): Likewise.
11783         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
11784         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
11785         (POINTER_BOUNDS_P): Likewise.
11786         (BOUNDED_TYPE_P): Likewise.
11787         (BOUNDED_P): Likewise.
11788         (CALL_WITH_BOUNDS_P): Likewise.
11789         (pointer_bounds_type_node): Likewise.
11790         * value-prof.c (gimple_ic): Likewise.
11791         * var-tracking.c (vt_add_function_parameters): Likewise.
11792         * varasm.c (make_decl_rtl): Likewise.
11793         (assemble_start_function): Likewise.
11794         (output_constant): Likewise.
11795         (maybe_assemble_visibility): Likewise.
11796         * varpool.c (ctor_for_folding): Likewise.
11797         * chkp-builtins.def: Remove.
11798         * ipa-chkp.c: Remove.
11799         * ipa-chkp.h: Remove.
11800         * rtl-chkp.c: Remove.
11801         * rtl-chkp.h: Remove.
11802         * tree-chkp-opt.c: Remove.
11803         * tree-chkp.c: Remove.
11804         * tree-chkp.h: Remove.
11806 2018-06-07  Carl Love  <cel@us.ibm.com>
11808         * config/rs6000/vsx.md (vextract_fp_from_shorth,
11809         vextract_fp_from_shortl): Add BE support.
11811 2018-06-07  Paul Koning  <ni1d@arrl.net>
11813         * compare-elim.c (try_merge_compare): Don't merge compare if
11814         address contains a side effect.
11815         (try_eliminate_compare): Likewise.
11817 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
11819         * config.gcc: Support "tremont".
11820         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
11821         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11822         PROCESSOR_TREMONT.
11823         * config/i386/i386.c (m_TREMONT): Define.
11824         (processor_target_table): Add "tremont".
11825         (PTA_TREMONT): Define.
11826         (ix86_lea_outperforms): Add TARGET_TREMONT.
11827         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
11828         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
11829         and M_INTEL_GOLDMONT_PLUS.
11830         (fold_builtin_cpu): Add "tremont".
11831         (ix86_add_stmt_cost): Add TARGET_TREMONT.
11832         (ix86_option_override_internal): Add "tremont".
11833         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
11834         (processor_type): Add PROCESSOR_TREMONT.
11835         * config/i386/x86-tune.def: Add m_TREMONT.
11836         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
11838 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11840         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
11841         symbol defined for msp430i* devices to be lower case.
11843 2018-06-07  Richard Biener  <rguenther@suse.de>
11845         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
11846         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
11847         Properly wrap signed arithmetic if overflow wraps.
11849 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
11851         PR tree-optimization/69615
11852         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
11853         of a cast from a same precision integral SSA_NAME in a bb dominated
11854         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
11855         cast to utype if rhs2 has already a compatible type.
11857 2018-06-07  Richard Biener  <rguenther@suse.de>
11859         PR tree-optimization/85935
11860         * graphite-scop-detection.c (find_params_in_bb): Analyze
11861         condition operands with respect to the correct loop.  Assert
11862         the analysis doesn't fail.
11864 2018-06-04  Carl Love  <cel@us.ibm.com>
11866         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
11867         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
11868         as it is slightly cheaper.
11869         (first_match_or_eos_index_<mode>):
11870         Calculate index using natural element order.
11871         (first_match_index_<mode>):
11872         Calculate index using natural element order.
11873         (first_match_or_eos_index_<mode>):
11874         Calculate index using natural order.
11875         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
11876         for BE and LE modes.
11877         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
11878         P9V_BUILTIN_VCLZLSBB_V16QI.
11879         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
11880         specific.
11882 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11884         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
11885         indentation and line wrap for many prototypes.  Add missing
11886         @smallexample directives around block of prototypes for vec_xl and
11887         vec_xst.
11889 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
11891         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
11892         track if we pass or return IEEE 128-bit floating point.
11893         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
11894         C++ mangling that is compatible with GCC 8.1.
11895         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
11896         (init_cumulative_args): Note if we pass or return IEEE 128-bit
11897         floating point types.
11898         (rs6000_function_arg_advance_1): Likewise.
11899         (rs6000_mangle_type): Optionally generate mangled names that match
11900         what GCC 8.1 generated for IEEE 128-bit floating point types.
11901         (rs6000_globalize_decl_name): If we have an external function that
11902         passes or returns IEEE 128-bit types, generate a weak reference
11903         from the mangled name used in GCC 8.1 to the current mangled
11904         name.
11905         (rs6000_init_builtins): Make __ibm128 use the long double type if
11906         long double is IBM extended double.  Make __float128 use the long
11907         double type if long double is IEEE 128-bit.
11909         PR target/85657
11910         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
11911         macro for __ibm128 built-in functions.
11912         (PACK_IF): Add __ibm128 pack/unpack functions.
11913         (UNPACK_IF): Likewise.
11914         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
11915         enable long double built-in functions if long double is IEEE
11916         128-bit floating point.
11917         (rs6000_invalid_builtin): Update long double built-in function
11918         error message.
11919         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
11920         functions, adjust the built-in function to use the long double
11921         built-in function if __ibm128 and long double are the same type.
11922         * doc/extend.texi (PowerPC builtins): Update documention for
11923         __builtin_{,un}pack_longdouble.  Add documentation for
11924         __builtin_{,un}pack_ibm128.
11926 2018-06-06  Jim Wilson  <jimw@sifive.com>
11928         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
11929         (struct machine_function): New field interrupt_mode.
11930         (riscv_handle_type_attribute): New function.  Add forward declaration.
11931         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
11932         (riscv_expand_epilogue): Check interrupt_mode field.
11933         (riscv_set_current_function): Check interrupt attribute args and
11934         set interrupt_mode field.
11935         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
11936         (riscv_sret, riscv_uret): New.
11937         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
11938         new arguments to interrupt attribute.
11940 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
11942         PR target/63177
11943         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
11944         Don't handle -mcpu=power8 if -mpower9-vector is also used.
11946 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11948         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
11949         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
11950         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11951         several redundant entries.
11953 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
11955         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
11956         type from "rtx" to "rtx_insn *".
11957         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
11958         for local "call_insn", removing cast.
11959         (ix86_expand_call): Likewise, introducing a "call_insn" local.
11961 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11963         PR tree-optimization/86066
11964         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
11965         for BIT_INSERT_EXPR stores.
11967 2018-06-06  Richard Biener  <rguenther@suse.de>
11969         PR tree-optimization/86062
11970         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11971         component refs ontop
11972         of to be offsetted base.
11974 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11976         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
11977         to be static and remove check on interrupt attribute name.
11979 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11981         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11982         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
11984 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
11986         PR target/79924
11987         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
11988         second argument.
11989         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
11990         Remove second argument, change how error is called.
11991         (aarch64_layout_arg): Remove second argument from
11992         aarch64_err_no_fpadvsimd call.
11993         (aarch64_init_cumulative_args): Ditto.
11994         (aarch64_gimplify_va_arg_expr): Ditto.
11995         * config/aarch64/aarch64.md (mov<mode>): Ditto.
11997 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
11999         * config/i386/i386.md (simple_return_indirect_internal): New expander.
12000         (*simple_return_indirect_internal<mode>): Rename from
12001         simple_return_indirect_internal.  Use W mode iterator.
12002         (rstorssp): New expander.
12003         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
12004         (clrssbsy): New expander.
12005         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
12007 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12009         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12010         __typeof__.
12011         (cmse_check_pointed_object): Likewise.
12013 2018-06-05  Martin Liska  <mliska@suse.cz>
12015         PR gcov-profile/47618
12016         * doc/invoke.texi: Document how -fprofile-dir format
12017         is extended.
12019 2018-06-05  Richard Biener  <rguenther@suse.de>
12021         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12022         removal pretend DOM info isn't available so we do not update
12023         it and only remove edges, not dominated blocks.  Actually free
12024         DOM info in case we removed something.  Remove unreachable blocks.
12025         (mfb_keep_latches): Work with either DOM info or marked backedges.
12026         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12027         first.  Mark backedges if DOM info isn't available.
12028         (Re-)compute DOM info after cleanup_control_flow_pre.
12030 2018-06-05  Richard Biener  <rguenther@suse.de>
12032         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12033         (locus_discrim_hasher::hash): Adjust.
12034         (locus_discrim_hasher::equal): Likewise.
12035         (next_discriminator_for_locus): Work on line directly.
12036         (same_line_p): Pass in expanded locus1 as well.
12037         (assign_discriminators): Avoid redundant location expansions.
12039 2018-06-05  Richard Biener  <rguenther@suse.de>
12041         PR tree-optimization/86046
12042         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12043         if required after clearing TREE_ADDRESSABLE.
12045 2018-06-05  Richard Biener  <rguenther@suse.de>
12047         PR tree-optimization/86047
12048         * tree-ssa-loop.c (for_each_index): Glob handling of all
12049         decls and constants and really handle all of them.
12051 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12053         PR target/81497
12054         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12055         qualifier_void_pointer and qualifier_const_void_pointer.
12056         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12057         (arm_init_builtins): Handle the above.
12058         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12059         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12060         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12061         void intrinsics.
12063 2018-06-05  Martin Liska  <mliska@suse.cz>
12065         * auto-profile.c (read_autofdo_file): Do not use
12066         gcov_ctr_summary struct.
12067         (afdo_callsite_hot_enough_for_early_inline): Likewise.
12068         * coverage.c (struct counts_entry): Likewise.
12069         (read_counts_file): Read just single summary entry.
12070         (get_coverage_counts): Use gcov_summary struct.
12071         * coverage.h (get_coverage_counts): Likewise.
12072         * gcov-dump.c (dump_working_sets): Likewise.
12073         (tag_summary): Dump just single summary.
12074         * gcov-io.c (gcov_write_summary): Write just histogram
12075         summary.
12076         (gcov_read_summary): Read just single summary.
12077         (compute_working_sets): Use gcov_summary struct.
12078         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12079         of GCOV_COUNTERS_SUMMABLE.
12080         (GCOV_COUNTERS_SUMMABLE): Remove.
12081         (GCOV_FIRST_VALUE_COUNTER): Replace with
12082         GCOV_COUNTER_V_INTERVAL.
12083         (struct gcov_ctr_summary): Remove.
12084         (struct gcov_summary): Directly use fields of former
12085         gcov_ctr_summary.
12086         (compute_working_sets): Use gcov_summary struct.
12087         * gcov.c (read_count_file): Do not use ctrs fields.
12088         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12089         struct.
12090         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12091         struct.
12092         * profile.c: Likewise.
12093         * profile.h: Likewise.
12095 2018-06-05  Martin Liska  <mliska@suse.cz>
12097         PR gcov-profile/84846
12098         * gcov.c (output_lines): Print working directory only
12099         in intermediate format.
12101 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12103         * config/s390/s390-builtin-types.def: Add void function type.
12104         * config/s390/s390-builtins.def: Use the function type for the
12105         tbeginc builtin.
12107 2018-06-04  Jim Wilson  <jimw@sifive.com>
12109         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12110         to int.
12111         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12112         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12113         handle EH_RETURN_DATA_REGNO registers properly.
12114         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12115         (riscv_expand_epilogue): Update comment.  Change argument name and
12116         type.  Update code to use new name and type.  Pass new args to
12117         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12118         EXCEPTION_RETURN.
12119         * config/riscv/riscv.md (NORMAL_RETURN): New.
12120         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12121         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12122         (eh_return): Call gen_eh_return_internal and emit barrier.
12123         (eh_return_internal): Call riscv_expand_epilogue.
12125 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12127         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12128         bit_insertion field and declare can_be_merged_into method.
12129         (merged_store_group::can_be_merged_into): New method.
12130         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12131         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12132         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12134 2018-06-04  Richard Biener  <rguenther@suse.de>
12136         PR tree-optimization/85955
12137         * builtins.c (fold_builtin_sincos): Convert pointers to
12138         destination to appropriate type before dereferencing.
12140 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
12142         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12144 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
12146         * expr.c (expand_expr_real_1): Force the operand into memory if
12147         its TYPE_MODE is BLKmode and if there is no integer mode for
12148         the number of bits being extracted.
12150 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12152         PR target/85832
12153         PR target/86036
12154         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12155         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12157 2018-06-04  Richard Biener  <rguenther@suse.de>
12159         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12160         (cleanup_tree_cfg_noloop): ... single caller.  Do
12161         start_recording_case_labels later.
12163 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
12165         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12166         to _IMMINTRIN_H_INCLUDED.
12167         * config/i386/pconfigintrin.h: Ditto.
12168         * config/i386/waitpkgintrin.h: Ditto.
12169         * config/i386/immintrin.h: Add includes for sgxintrin.h,
12170         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12171         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12172         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12173         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12174         waitpkgintrin.h and cldemoteintrin.h.
12176 2018-06-04  Richard Biener  <rguenther@suse.de>
12178         PR tree-optimization/86038
12179         * tracer.c (find_best_successor): Check probability for
12180         being initialized, bail out if not.
12182 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
12184         PR target/86003
12185         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12186         of bits to ignore when comparing architectures.
12188 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12190         PR tree-optimization/69615
12191         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12192         maximum or minimum of the type, try to merge it also as if
12193         range1 is + [-, x - 1] or + [x + 1, -].
12195         PR c++/86025
12196         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12198 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
12200         PR tree-optimization/86034
12201         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12202         the unsigned bitfield type in a bit insertion sequence if it does not
12203         have a larger precision than the bitfield size.
12204         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12206 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
12208         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12210 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12212         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12213         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12214         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12215         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12217 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12219         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12220         Disable -fdelete-null-pointer-checks for ELF toolchain.
12222 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12223             Kito Cheng  <kito.cheng@gmail.com>
12225         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12226         (nds32le-*-*, nds32be-*-*): Integrate checking process.
12227         (nds32*-*-*): Add glibc and uclibc conditions.
12228         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12229         (TARGET_EXCEPT_UNWIND_INFO): Define.
12230         * config/nds32/elf.h: New file.
12231         * config/nds32/linux.h: New file.
12232         * config/nds32/nds32-elf.opt: New file.
12233         * config/nds32/nds32-linux.opt: New file.
12234         * config/nds32/nds32-fp-as-gp.c
12235         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12236         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12237         TARGET_LINUX_ABI.
12238         (nds32_asm_file_end): Ditto.
12239         (nds32_print_operand): Ditto.
12240         (nds32_insert_attributes): Ditto.
12241         (nds32_init_libfuncs): New function.
12242         (TARGET_HAVE_TLS): Define.
12243         (TARGET_INIT_LIBFUNCS): Define.
12244         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12245         spec content.
12246         (TARGET_ELF): Apply different mcmodel setting.
12247         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12248         been migrated into elf.h and linux.h files.
12249         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12250         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12251         (mcmodel): The content has been migrated into nds32-elf.opt and
12252         nds32-linux.opt files.
12253         * config/nds32/t-elf: New file.
12254         * config/nds32/t-linux: New file.
12256 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12257             Shiva Chen  <shiva0217@gmail.com>
12259         * config/nds32/constants.md (unspec_volatile_element): Add
12260         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12261         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12262         optimization.
12263         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12264         (make_pass_nds32_fp_as_gp): Declare.
12265         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12266         optmization pass.
12267         (nds32_asm_function_end_prologue): Remove unused asm output.
12268         (nds32_asm_function_begin_epilogue): Remove unused asm output.
12269         (nds32_asm_file_start): Output necessary fp_as_gp information.
12270         (nds32_option_override): Adjust register usage.
12271         (nds32_expand_prologue): Consider fp_as_gp situation.
12272         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12273         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12274         (epilogue): Ditto.
12275         (return): Ditto.
12276         (simple_return): Ditto.
12277         (omit_fp_begin): Output special directive for fp_as_gp.
12278         (omit_fp_end): Output special directive for fp_as_gp.
12279         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12280         mforbid-fp-as-gp): New options.
12282 2018-06-01  Mark Wielaard  <mark@klomp.org>
12284         * dwarf2out.c (dwarf2out_finish): Remove generation of
12285         DW_AT_loclists_base.
12287 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
12289         * gimple-ssa-store-merging.c: Include gimple-fold.h.
12290         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12291         (struct merged_store_group): Add bit_insertion field.
12292         (dump_char_array): Use standard hexadecimal format.
12293         (merged_store_group::merged_store_group): Set bit_insertion to false.
12294         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
12295         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
12296         also print the mask in the dump file.
12297         (pass_store_merging::gate): Minor tweak.
12298         (imm_store_chain_info::coalesce_immediate): Fix wrong association
12299         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
12300         stores with INTEGER_CST stores.
12301         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12302         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12303         and use it throughout.  Generate bit insertion sequences if need be.
12304         (pass_store_merging::process_store): Remove redundant condition.
12305         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12307 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
12309         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12310         the 128-bit floating point types.  Fix function comment.
12312 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12314         * config/aarch64/aarch64-simd.md
12315         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12316         mnemonics.
12317         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12318         mnemonics.
12320 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12322         PR tree-optimization/85989
12323         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12324         variable.
12325         (backprop::intersect_uses): Check it when deciding whether this
12326         is a backedge reference.
12327         (backprop::process_block): Add each phi to m_visited_phis
12328         after visiting it, then clear it at the end.
12330 2018-06-01  Richard Biener  <rguenther@suse.de>
12332         * tree-vectorizer.h (vect_dr_stmt): New function.
12333         (vect_get_load_cost): Adjust.
12334         (vect_get_store_cost): Likewise.
12335         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12336         Use vect_dr_stmt instead of DR_SMTT.
12337         (vect_record_base_alignments): Likewise.
12338         (vect_calculate_target_alignment): Likewise.
12339         (vect_compute_data_ref_alignment): Likewise and make static.
12340         (vect_update_misalignment_for_peel): Likewise.
12341         (vect_verify_datarefs_alignment): Likewise.
12342         (vector_alignment_reachable_p): Likewise.
12343         (vect_get_data_access_cost): Likewise.  Pass down
12344         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
12345         (vect_get_peeling_costs_all_drs): Likewise.
12346         (vect_peeling_hash_get_lowest_cost): Likewise.
12347         (vect_enhance_data_refs_alignment): Likewise.
12348         (vect_find_same_alignment_drs): Likewise.
12349         (vect_analyze_data_refs_alignment): Likewise.
12350         (vect_analyze_group_access_1): Likewise.
12351         (vect_analyze_group_access): Likewise.
12352         (vect_analyze_data_ref_access): Likewise.
12353         (vect_analyze_data_ref_accesses): Likewise.
12354         (vect_vfa_segment_size): Likewise.
12355         (vect_small_gap_p): Likewise.
12356         (vectorizable_with_step_bound_p): Likewise.
12357         (vect_prune_runtime_alias_test_list): Likewise.
12358         (vect_analyze_data_refs): Likewise.
12359         (vect_supportable_dr_alignment): Likewise.
12360         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12361         (vect_gen_prolog_loop_niters): Likewise.
12362         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12363         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
12364         modify DR_STMT.
12365         (vect_recog_mask_conversion_pattern): Likewise.
12366         (vect_try_gather_scatter_pattern): Likewise.
12367         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
12368         to vect_get_store_cost.
12369         (vect_get_store_cost): Get stmt_info instead of DR.
12370         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
12371         (vect_get_load_cost): Get stmt_info instead of DR.
12373 2018-06-01  Richard Biener  <rguenther@suse.de>
12375         PR middle-end/86017
12376         * gimple-fold.c (var_decl_component_p): Also allow offsetted
12377         vars wrapped in MEM_REFs.
12379 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12381         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12382         Fix subreg tests so that we only return a choice between
12383         GENERAL_REGS and FP_REGS if the original classes included both.
12385 2018-06-01  Richard Biener  <rguenther@suse.de>
12387         PR ipa/85960
12388         * tree-ssa-structalias.c (get_function_part_constraint):
12389         Handle NULL fi->decl.
12390         (find_func_aliases_for_call): Properly handle indirect
12391         fi from direct call.
12392         (find_func_clobbers): Likewise.
12393         (ipa_pta_execute): Likewise.
12394         (create_variable_info_for): For functions that are ifunc_resolver
12395         resolve to a varinfo that contains the result of the resolver call.
12396         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
12397         aliases.
12399 2018-05-31  Michael Collison  <michael.collison@arm.com>
12401         * config/aarch64/aarch64.md:
12402         (*fix_to_zero_extenddfdi2): New pattern.
12403         * gcc.target/aarch64/fix_extend1.c: New testcase.
12405 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
12407         PR middle-end/78809
12408         PR middle-end/83026
12409         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
12410         and BUILT_IN_STRNCMP_EQ.
12411         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
12412         BUILT_IN_STRNCMP_EQ.
12413         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
12414         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12415         (gimple_fold_builtin): Likewise.
12416         * tree-ssa-strlen.c (compute_string_length): New function.
12417         (determine_min_obsize): New function.
12418         (handle_builtin_string_cmp): New function to handle calls to
12419         string compare functions.
12420         (strlen_optimize_stmt): Add handling to builtin string compare
12421         calls.
12422         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
12423         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12424         * tree.c (build_common_builtin_nodes): Add new defines of
12425         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
12427 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
12429         PR target/85984
12430         * bb-reorder.c (pass_partition_blocks::gate): Return false for
12431         functions with naked attribute.
12433 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
12435         * config/i386/sse.md (avx_vec_concat<mode>):
12436         Substitute concat_tg_mode mode attribute with xtg_mode.
12437         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
12438         (concat_tg_mode): Remove mode attribute.
12440 2018-05-31  Martin Sebor  <msebor@redhat.com>
12442         PR c/82063
12443         * calls.c (alloc_max_size): Correct a logic error/typo.
12444         Treat excessive arguments as infinite.  Warn for invalid arguments.
12445         * doc/invoke.texi (-Walloc-size-larger-than): Update.
12447 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
12449         PR target/85829
12450         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
12451         and movx for Haswell.
12453 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
12454             Cesar Philippidis  <cesar@codesourcery.com>
12456         PR middle-end/85879
12457         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
12458         when emitting error on private/firstprivate reductions.
12459         * omp-low.c (lower_omp_target): Avoid reference-type processing
12460         on pointers for firstprivate clause.
12462 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
12464         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
12465         (st1x2): Likewise.
12466         (st1x3): Likewise.
12467         * config/aarch64/aarch64-simd.md
12468         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
12469         (aarch64_ld1_x3_<mode>): Likewise
12470         (aarch64_st1x2<VALLDIF:mode>): Likewise
12471         (aarch64_st1_x2_<mode>): Likewise
12472         (aarch64_st1x3<VALLDIF:mode>): Likewise
12473         (aarch64_st1_x3_<mode>): Likewise
12474         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
12475         (vld1_s8_x3): Likewise.
12476         (vld1_u16_x3): Likewise.
12477         (vld1_s16_x3): Likewise.
12478         (vld1_u32_x3): Likewise.
12479         (vld1_s32_x3): Likewise.
12480         (vld1_u64_x3): Likewise.
12481         (vld1_s64_x3): Likewise.
12482         (vld1_f16_x3): Likewise.
12483         (vld1_f32_x3): Likewise.
12484         (vld1_f64_x3): Likewise.
12485         (vld1_p8_x3): Likewise.
12486         (vld1_p16_x3): Likewise.
12487         (vld1_p64_x3): Likewise.
12488         (vld1q_u8_x3): Likewise.
12489         (vld1q_s8_x3): Likewise.
12490         (vld1q_u16_x3): Likewise.
12491         (vld1q_s16_x3): Likewise.
12492         (vld1q_u32_x3): Likewise.
12493         (vld1q_s32_x3): Likewise.
12494         (vld1q_u64_x3): Likewise.
12495         (vld1q_s64_x3): Likewise.
12496         (vld1q_f16_x3): Likewise.
12497         (vld1q_f32_x3): Likewise.
12498         (vld1q_f64_x3): Likewise.
12499         (vld1q_p8_x3): Likewise.
12500         (vld1q_p16_x3): Likewise.
12501         (vld1q_p64_x3): Likewise.
12502         (vst1_s64_x2): Likewise.
12503         (vst1_u64_x2): Likewise.
12504         (vst1_f64_x2): Likewise.
12505         (vst1_s8_x2): Likewise.
12506         (vst1_p8_x2): Likewise.
12507         (vst1_s16_x2): Likewise.
12508         (vst1_p16_x2): Likewise.
12509         (vst1_s32_x2): Likewise.
12510         (vst1_u8_x2): Likewise.
12511         (vst1_u16_x2): Likewise.
12512         (vst1_u32_x2): Likewise.
12513         (vst1_f16_x2): Likewise.
12514         (vst1_f32_x2): Likewise.
12515         (vst1_p64_x2): Likewise.
12516         (vst1q_s8_x2): Likewise.
12517         (vst1q_p8_x2): Likewise.
12518         (vst1q_s16_x2): Likewise.
12519         (vst1q_p16_x2): Likewise.
12520         (vst1q_s32_x2): Likewise.
12521         (vst1q_s64_x2): Likewise.
12522         (vst1q_u8_x2): Likewise.
12523         (vst1q_u16_x2): Likewise.
12524         (vst1q_u32_x2): Likewise.
12525         (vst1q_u64_x2): Likewise.
12526         (vst1q_f16_x2): Likewise.
12527         (vst1q_f32_x2): Likewise.
12528         (vst1q_f64_x2): Likewise.
12529         (vst1q_p64_x2): Likewise.
12530         (vst1_s64_x3): Likewise.
12531         (vst1_u64_x3): Likewise.
12532         (vst1_f64_x3): Likewise.
12533         (vst1_s8_x3): Likewise.
12534         (vst1_p8_x3): Likewise.
12535         (vst1_s16_x3): Likewise.
12536         (vst1_p16_x3): Likewise.
12537         (vst1_s32_x3): Likewise.
12538         (vst1_u8_x3): Likewise.
12539         (vst1_u16_x3): Likewise.
12540         (vst1_u32_x3): Likewise.
12541         (vst1_f16_x3): Likewise.
12542         (vst1_f32_x3): Likewise.
12543         (vst1_p64_x3): Likewise.
12544         (vst1q_s8_x3): Likewise.
12545         (vst1q_p8_x3): Likewise.
12546         (vst1q_s16_x3): Likewise.
12547         (vst1q_p16_x3): Likewise.
12548         (vst1q_s32_x3): Likewise.
12549         (vst1q_s64_x3): Likewise.
12550         (vst1q_u8_x3): Likewise.
12551         (vst1q_u16_x3): Likewise.
12552         (vst1q_u32_x3): Likewise.
12553         (vst1q_u64_x3): Likewise.
12554         (vst1q_f16_x3): Likewise.
12555         (vst1q_f32_x3): Likewise.
12556         (vst1q_f64_x3): Likewise.
12557         (vst1q_p64_x3): Likewise.
12559 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12561         * config/msp430/msp430.c (msp430_output_labelref): Prepend
12562         user_label_prefix to name.
12564         * tree-core.h: Update comment about the format of NAME string
12565         passed to handler in attribute_spec.
12567         * config/msp430/msp430.md: Remove erroneous subreg expression from
12568         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
12569         zero_extend{q,h}isi2.
12571 2018-05-30  Borislav Petkov  <bp@suse.de>
12573         * doc/extend.texi: Document some architecture specific
12574         constraints and sort entries.
12576 2018-05-30  Martin Sebor  <msebor@redhat.com>
12578         PR middle-end/85369
12579         * builtins.c (expand_builtin_stpcpy_1): New function.
12580         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
12581         only if the former succeeds.
12583 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
12585         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
12586         in saphira.
12588 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12590         * doc/invoke.texi (-flinker-output): Document
12592 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12594         * passes.c (ipa_write_summaries): Only modify statements if body
12595         is in memory.
12596         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
12597         incrementally linking.
12598         (ipa_passes): Likewise.
12599         * lto-cgraph.c (lto_output_node): When incrementally linking do not
12600         pass down resolution info.
12601         * common.opt (flag_incremental_link): Update info.
12602         * gcc.c (plugin specs): Turn flinker-output=* to
12603         -plugin-opt=-linker-output-known
12604         * toplev.c (compile_file): Also cut compilation when doing incremental
12605         link.
12606         * flag-types. (enum lto_partition_model): Add
12607         LTO_LINKER_OUTPUT_NOLTOREL.
12608         (invoke.texi): Add -flinker-output docs.
12609         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
12610         link same way as WPA; do not stream in dead initializers.
12612         * dwarf2out.c (dwarf2out_die_ref_for_decl,
12613         darf2out_register_external_decl): Support incremental link.
12615 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12617         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
12619 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12621         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
12622         it down to simple_object_copy_lto_debug_sections.
12623         (run_gcc): Determine incremental LTO link time and configure
12624         lto1 into non-wpa mode, disable renaming of debug sections.
12626 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12628         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12629         descriptions of various incorrectly documented functions.
12631 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12633         Revert:
12634         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12635         address check not strict.
12637 2018-05-30  Richard Biener  <rguenther@suse.de>
12639         PR tree-optimization/85964
12640         * tracer.c (better_p): Drop initialized count check, we only
12641         call the function with initialized counts now.
12642         (find_best_successor): Do find a best edge if one
12643         has uninitialized count.
12644         (find_best_predecessor): Likewise.  Do BB frequency check only
12645         if count is initialized.
12647 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
12649         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
12650         (aarch64_ldrstr_offset_compare): New.
12651         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
12652         load/store orderings.
12653         (aarch64_gen_adjusted_ldpstp): Likewise.
12655 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
12657         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12658         Check for subset of GENERAL_REGS and FP_REGS.
12659         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
12660         r=w alternative.
12662 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
12664         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
12665         and wi::to_poly_offset.  Add the current offset and then check
12666         whether the sum fits, rather than using an unchecked addition of
12667         a checked term.  Check for a shwi rather than a uhwi.
12668         * expr.c (get_bit_range): Use tree_to_poly_uint64.
12669         (store_constructor): Use poly_int_tree_p.
12670         (expand_expr_real_1): Likewise.
12671         * function.c (assign_temp): Likewise.
12672         * fold-const.c (const_binop): Use poly_int_tree_p and
12673         wi::to_poly_offset.
12674         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
12675         division.
12676         * ipa-icf-gimple.c (func_checker::compare_operand): Use
12677         to_poly_offset for MEM offsets.
12678         * ipa-icf.c (sem_variable::equals): Likewise.
12679         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
12680         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
12681         wi::to_poly_offset for BIT_FIELD_REF offsets.
12682         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
12683         wi::to_poly_offset.
12684         * var-tracking.c (emit_note_insn_var_location): Use
12685         tree_to_poly_uint64.
12687 2018-05-29  Jim Wilson  <jimw@sifive.com>
12689         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
12691 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
12693         PR target/85950
12694         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
12695         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
12696         sequence.
12697         (sse4_1_round<mode>2): Use nonimmediate_operand
12698         for operand 1 predicate.
12700 2018-05-29  Martin Sebor  <msebor@redhat.com>
12701             Richard Biener  <rguenther@suse.de>
12703         PR testsuite/85888
12704         * calls.c (get_size_range): Call determine_value_range instead
12705         of get_value_range..
12706         * tree-vrp.h (determine_value_range): Declared new function.
12707         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
12709 2018-05-29  Richard Biener  <rguenther@suse.de>
12711         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
12712         sure to use non-pattern stmts for get_earlier_stmt arguments.
12713         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
12714         called on pattern stmts.
12715         (get_later_stmt): Likewise.
12717 2018-05-29  Martin Liska  <mliska@suse.cz>
12719         PR gcov-profile/85759
12720         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
12721         env variables.
12723 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
12725         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
12726         VEC_UNPACK_*_EXPR.
12727         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
12728         VEC_PACK_*_EXPR.
12730         PR target/85918
12731         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12732         VEC_PACK_FLOAT_EXPR): New tree codes.
12733         * tree-pretty-print.c (op_code_prio): Handle
12734         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12735         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12736         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12737         * tree-inline.c (estimate_operator_cost): Likewise.
12738         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
12739         * fold-const.c (const_binop): Likewise.
12740         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
12741         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12742         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12743         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
12744         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12745         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12746         * expr.c (expand_expr_real_2): Likewise.
12747         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
12748         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
12749         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
12750         optabs.
12751         * optabs.c (expand_widen_pattern_expr): For
12752         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
12753         sign from result type rather than operand's type.
12754         (expand_binop_directly): For vec_packu_float_optab and
12755         vec_packs_float_optab allow result type to be different from operand's
12756         type.
12757         * optabs-tree.c (optab_for_tree_code): Handle
12758         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12759         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
12760         * tree-vect-generic.c (expand_vector_operations_1):  Handle
12761         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12762         VEC_PACK_FLOAT_EXPR.
12763         * tree-vect-stmts.c (supportable_widening_operation): Handle
12764         FIX_TRUNC_EXPR.
12765         (supportable_narrowing_operation): Handle FLOAT_EXPR.
12766         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
12767         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
12768         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
12769         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
12770         mode attributes.
12771         (vec_pack<floatprefix>_float_<mode>): New expander.
12772         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
12773         attributes.
12774         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
12775         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
12776         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
12777         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
12778         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
12779         Document.
12780         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
12781         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
12782         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12783         VEC_PACK_FLOAT_EXPR): Document.
12785 2018-05-29  Richard Biener  <rguenther@suse.de>
12787         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
12788         member.
12789         (stmt_vec_info_vec): Make pointer.
12790         (init_stmt_vec_info_vec): Remove.
12791         (free_stmt_vec_info_vec): Likewise.
12792         (set_stmt_vec_info_vec): New function.
12793         (free_stmt_vec_infos): Likewise.
12794         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
12795         (set_vinfo_for_stmt): Likewise.
12796         (get_earlier_stmt): Likewise.
12797         (get_later_stmt): Likewise.
12798         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
12799         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
12800         (vec_info::~vec_info): Free stmt_vec_infos.
12801         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
12802         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
12803         (pass_slp_vectorize::execute): Likewise.
12804         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
12805         (free_stmt_vec_info_vec): Likewise.
12806         (set_stmt_vec_info_vec): New function.
12807         (free_stmt_vec_infos): Likewise.
12808         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
12809         the global stmt_vec_info_vec.
12810         * tree-parloops.c (gather_scalar_reductions): Use
12811         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
12812         vector.
12814 2018-05-29  Richard Biener  <rguenther@suse.de>
12816         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
12818 2018-05-29  Martin Liska  <mliska@suse.cz>
12819             David Malcolm  <dmalcolm@redhat.com>
12821         * vec.c (test_reverse): New.
12822         (vec_c_tests): Add new test.
12823         * vec.h (vl_ptr>::reverse): New function.
12825 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
12827         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
12829         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
12830         and later.
12832 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12834         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
12836 2018-05-28  Richard Biener  <rguenther@suse.de>
12838         PR tree-optimization/85933
12839         * tree-vect-data-refs.c (vect_record_base_alignments): Only
12840         look at stmts marked as vectorizable.
12842 2018-05-28  Richard Biener  <rguenther@suse.de>
12844         PR tree-optimization/85934
12845         * tree-vect-generic.c (expand_vector_operations_1): Hoist
12846         vector boolean check before scalar optimization.
12848 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
12850         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
12851         for armv5te.
12853 2018-05-28  Mark Wielaard  <mark@klomp.org>
12855         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
12856         if it is an expression containing a minus sign.
12858 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
12860         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
12862 2018-05-27  Paul Koning  <ni1d@arrl.net>
12864         * config/pdp11/pdp11.md (truncsihi2): Remove.
12866 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
12867             Chung-Ju Wu  <jasonwucj@gmail.com>
12869         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
12870         implementation.
12871         (unaligned_store_dw): Ditto.
12872         * config/nds32/nds32-memory-manipulation.c
12873         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
12874         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
12875         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
12876         (emit_setmem_word_loop): Rename to ...
12877         (emit_setmem_doubleword_loop): ... this.
12878         (nds32_gen_dup_4_byte_to_word_value): New function.
12879         (nds32_gen_dup_8_byte_to_double_word_value): New function.
12880         (nds32_expand_setmem_loop): Refine implementation.
12881         (nds32_expand_setmem_loop_v3m): Ditto.
12882         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
12883         pattern.
12885 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12887         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
12889 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12891         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
12892         (nds32_init_machine_status): Initialize machine->attr_naked_p and
12893         machine->attr_no_prologue_p.
12894         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
12895         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
12896         (nds32_expand_epilogue): Consider attr_naked_p.
12897         (nds32_expand_epilogue_v3pop): Likewise.
12898         (nds32_can_use_return_insn): Likewise.
12899         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
12900         attr_no_prologue_p fields.
12901         * config/nds32/nds32.opt (mret-in-naked-func): New option.
12903 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
12905         PR target/85918
12906         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
12907         attributes.
12908         * config/i386/sse.md
12909         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
12910         Rename to ...
12911         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
12912         ... this.
12913         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
12914         Rename to ...
12915         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
12916         ... this.
12917         (*<floatsuffix>floatv2div2sf2): Rename to ...
12918         (*float<floatunssuffix>v2div2sf2): ... this.
12919         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
12920         (float<floatunssuffix>v2div2sf2_mask): ... this.
12921         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
12922         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
12923         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
12924         to ...
12925         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
12926         ... this.
12927         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12928         Rename to ...
12929         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12930         ... this.
12931         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12932         Rename to ...
12933         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12934         ... this.
12935         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
12936         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
12937         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
12938         gen_ufix_truncv8dfv8si2.
12939         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
12940         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
12941         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
12942         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
12943         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
12944         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
12945         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
12946         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
12948 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
12950         PR target/85900
12951         PR target/85345
12952         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
12954 2018-05-25  Jim Wilson  <jimw@sifive.com>
12956         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
12957         * config/riscv/riscv.c (struct machine_function): Add
12958         interrupt_handler_p and attribute_checked_p fields.
12959         (riscv_attribute_table): Add interrupt.
12960         (riscv_interrupt_type_p): New.
12961         (riscv_save_reg_p): Save extra regs for interrupt handler.
12962         (riscv_use_save_libcall): Return false  for interrupt handler.
12963         (riscv_first_stack_step): Add forward declaration.
12964         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
12965         for interrupt handler with large frame.  Use it for saved reg list.
12966         (riscv_expand_prologue): Move flag_stack_usage_info support to
12967         eliminate duplication.
12968         (riscv_expand_epilogue): Generate mret for interrupt handler.
12969         (riscv_epilogue_uses): New.
12970         (riscv_can_use_return_insn): Return false for interrupt handler.
12971         (riscv_function_ok_for_sibcall): Likewise.
12972         (riscv_set_current_function): Add interrupt handler support.
12973         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
12974         * config/riscv/riscv.md (UNSPECV_MRET): New.
12975         (GP_REGNUM): New.
12976         (riscv_frflags, riscv_fsflags): Use tab after opcode.
12977         (riscv_mret): New.
12978         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
12980 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
12982         PR tree-optimization/85712
12983         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
12984         this candidate has already been replaced in-situ by a copy.
12986 2018-05-25  Jason Merrill  <jason@redhat.com>
12988         PR c++/80485 - inline function non-zero address.
12989         * symtab.c (nonzero_address): Check DECL_COMDAT.
12991 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
12993         PR target/83628
12994         * config/alpha/alpha.md (ashlsi3): New insn pattern.
12995         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
12996         extension of SImode operation.  Use const123_operand predicate.
12997         (*saddsi_1): Remove.
12998         (*saddl_se_1): Ditto.
12999         (*ssubsi_1): Ditto.
13000         (*ssubl_se_1): Ditto.
13001         * config/alpha/predicates.md (const123_operand): New predicate.
13002         * config/alpha/constraints.md (P): Use IN_RANGE.
13004 2018-05-25  Richard Biener  <rguenther@suse.de>
13006         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13007         defaulted to true.
13008         (ref_maybe_used_by_stmt_p): Likewise.
13009         (stmt_may_clobber_ref_p): Likewise.
13010         (stmt_may_clobber_ref_p_1): Likewise.
13011         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13012         and pass it along.
13013         (ref_maybe_used_by_stmt_p): Likewise.
13014         (stmt_may_clobber_ref_p): Likewise.
13015         (stmt_may_clobber_ref_p_1): Likewise.
13016         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13017         the alias oracle to disambiguate DRs with stmts DR analysis
13018         couldn't handle.
13019         (vect_analyze_data_refs): Do not give up on not analyzable
13020         DRs for BB vectorization.  Remove code truncating the dataref
13021         vector.
13023 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
13025         PR target/85832
13026         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13027         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
13028         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13030 2018-05-25  Richard Biener  <rguenther@suse.de>
13032         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13033         function, combining stmt data ref gathering and fatal analysis
13034         parts.
13035         (vect_analyze_data_refs): Remove now redudnant code and simplify.
13036         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13037         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13038         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13039         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13041 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13043         PR tree-optimization/85720
13044         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13045         SCC if all partitions are builtins.
13046         (version_loop_by_alias_check): New parameter.  Generate cancelable
13047         runtime alias check if all partitions are builtins.
13048         (distribute_loop): Update call to above function.
13050 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13052         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13053         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13054         (parm_default_def_partition_arg): Ditto.
13055         (set_parm_default_def_partition): Ditto.
13056         (get_parm_default_def_partitions): Ditto and make it static.
13057         (get_undefined_value_partitions): Ditto and make it static.
13058         (remove_ssa_form): Refactor call to init_var_map here.
13059         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13060         computation for loop region.
13061         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13062         (register_default_def): Delete.
13063         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13064         (parm_default_def_partition_arg): Ditto.
13065         (set_parm_default_def_partition): Ditto.
13066         (get_parm_default_def_partitions): Ditto and make it static.
13067         (get_undefined_value_partitions): Ditto and make it static.
13068         (coalesce_with_default, coalesce_with_default): Update comment.
13069         (create_coalesce_list_for_region): New func factored out from
13070         create_outofssa_var_map.
13071         (populate_coalesce_list_for_outofssa): New func factored out from
13072         create_outofssa_var_map and coalesce_ssa_name.
13073         (create_outofssa_var_map): Delete.
13074         (coalesce_ssa_name): Refactor to support live range computation.
13075         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13076         (get_parm_default_def_partitions): Delete.
13077         (get_undefined_value_partitions): Ditto.
13078         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13079         computation for loop region.
13080         (new_tree_live_info, loe_visit_block): Ditto.
13081         (live_worklist, set_var_live_on_entry): Ditto.
13082         (calculate_live_on_exit, verify_live_on_entry): Ditto.
13083         * tree-ssa-live.h (struct _var_map): New fields.
13084         (init_var_map): Change decl.
13085         (region_contains_p): New.
13087 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
13089         * tree-ssa-live.h (live_merge_and_clear): Delete.
13091 2018-05-25  Richard Biener  <rguenther@suse.de>
13093         PR c++/85912
13094         * tree-dump.c (dequeue_and_dump): Remove access to removed
13095         operand 2 of a SWITCH_EXPR.
13097 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13099         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13100         multiplication and division.
13101         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13102         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13103         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13104         (cond_udiv_optab, cond_umod_optab): New optabs.
13105         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13106         (IFN_COND_RDIV): New internal functions.
13107         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13108         TRUNC_MOD_EXPR and RDIV_EXPR.
13109         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13110         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13111         New unspecs.
13112         (SVE_INT_BINARY): Include mult.
13113         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13114         (optab, sve_int_op): Handle mult.
13115         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13116         UNSPEC_COND_DIV.
13117         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13118         for SVE_INT_BINARY_SD.
13120 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13122         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13123         (optab, sve_int_op): Handle div and udiv.
13124         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13125         for SVE_INT_BINARY_SD.
13126         (*<optab><mode>3): New insn for the same.
13128 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13130         * tree-vect-patterns.c: Include predict.h.
13131         (vect_recog_divmod_pattern): Restrict check for division support
13132         to when optimizing for size.
13134 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13136         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13137         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13138         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13139         (gimple_match_op::set_op): Likewise.
13140         (gimple_resimplify4): Declare.
13141         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13142         (expr::gen_transform): Likewise.
13143         (decision_tree::gen): Generate a simplification routine for 4 operands.
13144         * gimple-match-head.c (gimple_simplify): Add an overload for
13145         4 operands.  In the top-level function, handle up to 4 call
13146         arguments and call gimple_resimplify4.
13147         (gimple_resimplify4): New function.
13148         (build_call_internal): Pass a fourth operand.
13149         (maybe_push_to_seq): Likewise.
13150         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13151         Fold VEC_COND_EXPRs of an operation and a default value into
13152         an IFN_COND_* function if possible.
13153         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13154         New unspecs.
13155         (SVE_COND_FP_BINARY): Include them.
13156         (optab, sve_fp_op): Handle them.
13157         (SVE_INT_BINARY_REV): New code iterator.
13158         (SVE_COND_FP_BINARY_REV): New int iterator.
13159         (commutative): New int attribute.
13160         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13161         Declare.
13162         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13163         function.
13164         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13165         (*cond_<optab><mode>): New patterns for reversed operands.
13167 2018-05-25  Richard Biener  <rguenther@suse.de>
13169         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13170         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13171         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13172         (STMT_VINFO_GROUPED_ACCESS): Adjust.
13173         * tree-vect-data-refs.c (everywhere): Adjust users.
13174         * tree-vect-loop.c (everywhere): Likewise.
13175         * tree-vect-slp.c (everywhere): Likewise.
13176         * tree-vect-stmts.c (everywhere): Likewise.
13177         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13179 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13181         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13182         Rename to...
13183         (gcc_cv_as_section_exclude): ... this.
13184         Try Solaris as #exclude syntax.
13185         * configure: Regenerate.
13186         * config.in: Regenerate.
13187         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13188         SECTION_EXCLUDE.
13189         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13190         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13192         * varasm.c (default_elf_asm_named_section): Don't check if
13193         HAVE_GAS_SECTION_EXCLUDE is defined.
13195 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13197         * doc/md.texi: Update the documentation of the cond_* optabs
13198         to mention the new final operand.  Fix GET_MODE_NUNITS call.
13199         Describe the scalar case too.
13200         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13201         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13202         instead of 2.
13203         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13204         (get_conditional_internal_fn): Update comment.
13205         * tree-vect-loop.c (vectorizable_reduction): Pass the original
13206         accumulator value as a final argument to conditional functions.
13207         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13208         a define_expand and add an "else" operand.  Assert for now that
13209         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
13210         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13211         (*cond_<optab><mode>): New patterns.
13212         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13213         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13214         (UNSPEC_COND_EOR): Delete.
13215         (optab): Remove associated mappings.
13216         (SVE_INT_BINARY): New code iterator.
13217         (sve_int_op): Remove int attribute and add "minus" to the code
13218         attribute.
13219         (SVE_COND_INT_OP): Delete.
13220         (SVE_COND_FP_OP): Rename to...
13221         (SVE_COND_FP_BINARY): ...this.
13223 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13225         * optabs.c (can_reuse_operands_p): New function.
13226         (maybe_legitimize_operands): Try to reuse the results for
13227         earlier operands.
13229 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13231         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13232         Add {q} suffix to insn mnemonic.
13234 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13236         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13237         (msp430_warn_func_return): New.
13239 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
13241         * fold-const.c (tree_nonzero_bits): New function.
13242         * fold-const.h (tree_nonzero_bits): Likewise.
13243         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13244         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13246 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13248         PR target/85900
13249         PR target/85345
13250         * varasm.c (assemble_alias): Check ifunc_resolver only on
13251         FUNCTION_DECL.
13253 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13255         PR target/85903
13256         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13257         when memory input operand is handled.
13259 2018-05-24  Luis Machado  <luis.machado@linaro.org>
13261         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13262         global.
13263         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13265 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13267         * match.pd: Delay FMA folds until after vectorization.
13269 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13271         PR target/83009
13272         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13273         address check not strict.
13275 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13277         * gimple-match.h (gimple_match_op): New class.
13278         (mprts_hook): Replace parameters with a gimple_match_op *.
13279         (maybe_build_generic_op): Likewise.
13280         (gimple_simplified_result_is_gimple_val): Replace parameters with
13281         a const gimple_match_op *.
13282         (gimple_simplify): Replace code_helper * and tree * parameters with
13283         a gimple_match_op * parameter.
13284         (gimple_resimplify1): Replace code_helper *, tree and tree *
13285         parameters with a gimple_match_op * parameter.
13286         (gimple_resimplify2): Likewise.
13287         (gimple_resimplify3): Likewise.
13288         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13289         parameters with a gimple_match_op * parameter.
13290         * gimple-match-head.c (gimple_simplify): Change prototypes of
13291         auto-generated functions to take a gimple_match_op * instead of
13292         separate code_helper * and tree * parameters.  Make the same
13293         change in the top-level overload and update calls to the
13294         gimple_resimplify routines.  Update calls to the auto-generated
13295         functions and to maybe_push_res_to_seq in the publicly-facing
13296         operation-specific gimple_simplify overloads.
13297         (gimple_match_op::MAX_NUM_OPS): Define.
13298         (gimple_resimplify1): Replace rcode and ops with a single res_op
13299         parameter.  Update call to gimple_simplify.
13300         (gimple_resimplify2): Likewise.
13301         (gimple_resimplify3): Likewise.
13302         (mprts_hook): Replace parameters with a gimple_match_op *.
13303         (maybe_build_generic_op): Likewise.
13304         (build_call_internal): Replace type, nargs and ops with
13305         a gimple_match_op *.
13306         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13307         with a single gimple_match_op *.  Update calls to mprts_hook,
13308         build_call_internal and gimple_simplified_result_is_gimple_val.
13309         Factor out code that is common to the tree_code and combined_fn cases.
13310         * genmatch.c (expr::gen_transform): Replace tem_code and
13311         tem_ops with a gimple_match_op called tem_op.  Update calls
13312         to the gimple_resimplify functions and maybe_push_res_to_seq.
13313         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13314         res_ops.  Update call to the gimple_resimplify functions.
13315         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13316         (decision_tree::gen): Make the functions take a gimple_match_op *
13317         called res_op instead of separate res_code and res_ops parameters.
13318         Update call accordingly.
13319         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13320         and ops with a single res_op parameter.  Update calls to
13321         maybe_build_generic_op and maybe_push_res_to_seq.
13322         (fold_stmt_1): Update calls to gimple_simplify and
13323         replace_stmt_with_simplification.
13324         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13325         and gimple_simplified_result_is_gimple_val.
13326         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13327         gimple_simplify.
13328         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13329         with a gimple_match_op *.
13330         (vn_nary_build_or_lookup): Likewise.  Update call to
13331         vn_nary_build_or_lookup_1.
13332         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13333         gimple_match_op *.  Update calls to the gimple_resimplify routines
13334         and to gimple_simplified_result_is_gimple_val.
13335         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13336         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13337         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13338         (visit_nary_op): Likewise.
13339         (visit_reference_op_load): Likewise.
13341 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13343         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
13344         modifier for printing the step amount.
13346 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
13348         PR target/78849
13349         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
13350         types.
13352 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
13354         * doc/sourcebuild.texi (Endianness): New subsubsection.
13356 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13358         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13359         <prefetch_dynamic_strides>: New const bool field.
13360         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13361         prefetch_dynamic_strides.
13362         (exynosm1_prefetch_tune): Likewise.
13363         (thunderxt88_prefetch_tune): Likewise.
13364         (thunderx_prefetch_tune): Likewise.
13365         (thunderx2t99_prefetch_tune): Likewise.
13366         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
13367         false.
13368         (aarch64_override_options_internal): Update to set
13369         PARAM_PREFETCH_DYNAMIC_STRIDES.
13370         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13371         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13372         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13373         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13374         prefetch-dynamic-strides setting.
13376 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13378         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13379         <minimum_stride>: New const int field.
13380         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13381         minimum_stride field defaulting to -1.
13382         (exynosm1_prefetch_tune): Likewise.
13383         (thunderxt88_prefetch_tune): Likewise.
13384         (thunderx_prefetch_tune): Likewise.
13385         (thunderx2t99_prefetch_tune): Likewise.
13386         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
13387         <default_opt_level>: Set to 3.
13388         (aarch64_override_options_internal): Update to set
13389         PARAM_PREFETCH_MINIMUM_STRIDE.
13390         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13391         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13392         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13393         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13394         stride is constant and is below the minimum stride threshold.
13396 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13398         * config/arm/arm-cpus.in (mode26): Delete.
13399         (armv4): Delete mode26 reference.
13400         * config/arm/arm.c (arm_configure_build_target): Delete use of
13401         isa_bit_mode26.
13403 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
13405         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
13406         New insn pattern.
13407         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
13408         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
13409         for non-SSE modes.
13410         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
13411         (floatunsdidf2): Ditto.
13413 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
13415         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
13416         (fixuns_trunc<mode>si2_avx512f): Ditto.
13417         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
13418         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
13419         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
13421 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
13423         PR rtl-optimization/79985
13424         * df-scan.c (df_insn_refs_collect): Remove special case for
13425         global registers and asm statements.
13427 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
13429         * extend.texi (Global Register Variables): Rewrite the bullet list.
13430         Note that the register is available for allocation. Note that access
13431         via inline asm must use constraints. Add note about async-signal
13432         handlers. Remove paragraph about automagic register selection.
13434 2018-05-23  Richard Biener  <rguenther@suse.de>
13436         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
13437         of fixed offset from memset VN.
13439 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
13441         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
13442         first_interp field.
13443         (alloc_cand_and_find_basis): Initialize first_interp field.
13444         (slsr_process_mul): Modify first_interp field.
13445         (slsr_process_add): Likewise.
13446         (slsr_process_cast): Modify first_interp field for each new
13447         interpretation.
13448         (slsr_process_copy): Likewise.
13449         (dump_candidate): Dump first_interp field.
13450         (replace_mult_candidate): Process all interpretations, not just
13451         subsequent ones.
13452         (replace_rhs_if_not_dup): Likewise.
13453         (replace_one_candidate): Likewise.
13455 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
13457         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
13458         Add new boolean.
13459         (aarch64_needs_frame_chain): New function.
13460         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
13462 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
13464         PR target/84882
13465         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
13466         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
13467         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
13468         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
13469         as true for strict-align.
13470         (aarch64_can_inline_p): Perform checks even when callee has no
13471         attributes to check for strict alignment.
13472         * doc/extend.texi (AArch64 Function Attributes): Document
13473         no-strict-align.
13474         * doc/invoke.texi: (AArch64 Options): Likewise.
13476 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
13478         PR tree-optimization/85853
13479         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
13480         the handling of the root of the node to...
13481         (vect_slp_analyze_node_operations_1): ...this new function,
13482         and run the whole thing with the child nodes' def types
13483         set according to their SLP node's def type.
13485 2018-05-23  Richard Biener  <rguenther@suse.de>
13487         PR middle-end/85874
13488         * tree-data-ref.c (create_runtime_alias_checks): Defer
13489         and ignore overflow warnings.
13491 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
13493         PR tree-optimization/85822
13494         * tree-vrp.c (is_masked_range_test): Fix handling of negative
13495         constants.
13497 2018-05-23  Richard Biener  <rguenther@suse.de>
13499         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13500         memset constants via native_interpret_expr.
13502 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
13504         PR target/85345
13505         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
13506         attribute.
13507         (cgraph_node::create_alias): Likewise.
13508         (cgraph_node::get_availability): Check ifunc_resolver instead
13509         of looking up ifunc attribute.
13510         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
13511         * varasm.c (do_assemble_alias): Likewise.
13512         (assemble_alias): Likewise.
13513         (default_binds_local_p_3): Likewise.
13514         * cgraph.h (cgraph_node): Add ifunc_resolver.
13515         (cgraph_node::only_called_directly_or_aliased_p): Return false
13516         for IFUNC resolver.
13517         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
13518         attribute.
13519         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
13520         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
13521         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
13522         instead of looking up ifunc attribute.
13524 2018-05-22  Luis Machado  <luis.machado@linaro.org>
13526         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
13528 2018-05-22  Martin Sebor  <msebor@redhat.com>
13530         PR middle-end/85359
13531         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
13532         only when expasion succeeds.
13533         (expand_builtin_strcmp): Same.
13534         (expand_builtin_strncmp): Same.
13536 2018-05-22  Martin Sebor  <msebor@redhat.com>
13538         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
13540 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
13541             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13543         * config/aarch64/aarch64-ldpstp.md: Replace uses of
13544         aarch64_mem_pair_operand with memory_operand and delete operand swapping
13545         code.
13546         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
13547         Add check for legitimate_address.
13548         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
13549         (aarch64_swap_ldrstr_operands): New.
13550         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
13551         Define prototype.
13553 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
13554             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13556         * config/aarch64/aarch64.md: New patterns to generate stp
13557         and ldp.
13558         (store_pair_sw, store_pair_dw): New patterns to generate stp for
13559         single words and double words.
13560         (load_pair_sw, load_pair_dw): Likewise.
13561         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
13562         Delete.
13563         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
13564         Delete.
13565         * config/aarch64/aarch64-ldpstp.md: Modify peephole
13566         for different mode ldpstp and add peephole for merged zero stores.
13567         Likewise for loads.
13568         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
13569         Add size check.
13570         (aarch64_gen_store_pair): Rename calls to match new patterns.
13571         (aarch64_gen_load_pair): Rename calls to match new patterns.
13572         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
13573         (load_pair<DREG:mode><DREG2:mode>): ... This.
13574         (store_pair<mode>): Rename to...
13575         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
13576         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
13577         New mode iterators.
13578         (V_INT_EQUIV): Handle SImode.
13579         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
13580         New predicate.
13582 2018-05-22  Martin Sebor  <msebor@redhat.com>
13584         PR c/85623
13585         * calls.c (maybe_warn_nonstring_arg): Use string length to set
13586         or ajust the presumed bound on an operation to avoid unnecessary
13587         warnings.
13589 2018-05-22  Martin Sebor  <msebor@redhat.com>
13591         PR tree-optimization/85826
13592         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
13593         assuming that a DECL necesarily has a constant size.
13595 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
13597         PR middle-end/85862
13598         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
13600 2018-05-22  Richard Biener  <rguenther@suse.de>
13602         PR tree-optimization/85834
13603         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
13604         non-constant and non-zero memset arguments.
13606 2018-05-22  Martin Liska  <mliska@suse.cz>
13608         PR ipa/85607
13609         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
13611 2018-05-22  Richard Biener  <rguenther@suse.de>
13613         PR tree-optimization/85863
13614         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
13615         comparisons when vectype is specified.
13616         (vectorizable_condition): Do not specify vectype for
13617         vect_is_simple_cond when SLP vectorizing.
13619 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
13621         PR target/85657
13622         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
13623         define __ibm128 as long double.
13624         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
13625         as a distinct type when IEEE 128-bit support is enabled.
13626         (init_float128_ieee): Fix up conversions between IFmode and IEEE
13627         128-bit types to use the correct functions.
13628         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
13629         convert between 128-bit floating point types that have different
13630         modes but the same representation, instead of using gen_lowpart to
13631         makean alias.
13632         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
13633         KFmode.
13634         (IFKF_reg): New attributes to give the register constraints for
13635         IFmode and KFmode.
13636         (extend<mode>tf2_internal): New insns to mark an explicit
13637         conversion between 128-bit floating point types that have a
13638         different mode but share the same representation.
13640 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
13642         PR tree-optimization/85814
13643         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
13644         a null return from get_strinfo when unsharing the next
13645         strinfo in the chain.
13647 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13649         PR gcc/84923
13650         * varasm.c (weak_finish): Clean up weak_decls.
13652 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13654         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
13655         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
13656         UNSPEC_UADALP values.
13657         * config/aarch64/iterators.md (ABAL): New int iterator.
13658         (ABDL2): Likewise.
13659         (ADALP): Likewise.
13660         (sur): Add mappings for the above.
13661         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
13662         New define_insn.
13663         (aarch64_<sur>abal<mode>_4): Likewise.
13664         (aarch64_<sur>adalp<mode>_3): Likewise.
13665         (<sur>sadv16qi): New define_expand.
13667 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
13669         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
13670         (*movdf_internal): Ditto.
13671         (*rcpsf2_sse): Ditto.
13672         (*rsqrtsf2_sse): Ditto.
13673         (*sqrt<mode>2_sse): Ditto.
13675 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
13677         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
13678         eor3q<mode>4.
13679         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
13680         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
13681         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
13682         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
13683         vbcaxq_s64): New.
13684         * config/aarch64/arm_neon.h: Likewise.
13685         * config/aarch64/iterators.md (VQ_I): New.
13687 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
13689         * config.gcc: Add arc/t-multilib-linux to tmake_file for
13690         arc*-*-linux*.
13691         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
13692         MULTILIB_DIRNAMES
13694 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
13696         * config/nds32/constraints.md (S): New constraint.
13697         * config/nds32/nds32.md (call_internal): Use constraint S.
13698         (call_value_internal): Likewise.
13699         (sibcall_internal): Likewise.
13700         (sibcall_value_internal): Likewise.
13702 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
13703             Chung-Ju Wu  <jasonwucj@gmail.com>
13705         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
13706         into consideration.
13708 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
13709             Chung-Ju Wu  <jasonwucj@gmail.com>
13711         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
13712         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
13713         (nds32_rtx_costs_impl): Simplify.
13714         (nds32_address_cost_impl): Simplify.
13715         (nds32_init_rtx_costs): New function.
13716         (nds32_rtx_costs_speed_prefer): Likewise.
13717         (nds32_rtx_costs_size_prefer): Likewise.
13718         (nds32_address_cost_speed_prefer): Likewise.
13719         (nds32_address_cost_speed_fwprop): Likewise.
13720         (nds32_address_cost_size_prefer): Likewise.
13721         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
13722         * config/nds32/nds32.c (nds32_option_override): Use
13723         nds32_init_rtx_costs function.
13725 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
13727         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
13728         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
13729         (TARGET_PIPELINE_N8): Likewise.
13730         (TARGET_PIPELINE_N10): Likewise.
13731         (TARGET_PIPELINE_N13): Likewise.
13732         (TARGET_PIPELINE_GRAYWOLF): Likewise.
13734 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
13736         * config/nds32/nds32-fpu.md: Update copyright year.
13738 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13740         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
13742 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13744         * config/nds32/nds32.c
13745         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
13746         * config/nds32/nds32.opt (minline-asm-r15): New option.
13748 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13750         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
13751         MASK_HW_ABS.
13752         * config/nds32/nds32.md (abssi2): New pattern.
13754 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
13756         * config/i386/i386.md (rex64namesuffix): New mode attribute.
13757         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
13758         Merge insn pattern from sse_cvtsi2ss<round_name> and
13759         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
13760         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
13761         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
13762         using SWI48 mode iterator.
13763         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
13764         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
13765         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
13766         pattern from sse_cvttss2si<round_saeonly_name>
13767         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
13768         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
13769         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
13770         using SWI48 mode iterator.
13771         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
13772         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
13773         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
13774         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
13775         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
13776         using SWI48 mode iterator.
13777         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
13778         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
13779         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
13780         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
13781         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
13782         SWI48 mode iterator.
13783         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
13784         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
13785         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
13786         pattern from sse_cvttsd2si<round_saeonly_name>
13787         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
13789 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13791         * config/nds32/nds32-md-auxiliary.c
13792         (nds32_valid_smw_lwm_base_p): Refine.
13793         (nds32_output_smw_single_word): Refine.
13794         (nds32_output_smw_double_word): New.
13795         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
13797 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13799         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
13800         (nds32_output_stack_pop): Refine.
13801         (nds32_expand_unaligned_load): Refine.
13802         (nds32_expand_unaligned_store): Refine.
13804 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13805             Chung-Ju Wu  <jasonwucj@gmail.com>
13807         * config/nds32/constants.md: Add TP_REGNUM constant.
13808         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
13809         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
13810         UNSPEC_ADD32.
13811         * config/nds32/nds32-doubleword.md: Consider flag_pic.
13812         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
13813         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
13814         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
13815         and PIC code generation.
13816         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
13817         code generation.
13818         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
13819         optimization.
13820         * config/nds32/nds32.md: Support TLS and PIC.
13821         * config/nds32/nds32.c: Support TLS and PIC.
13822         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
13823         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
13824         predicate.
13826 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13828         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
13829         mode with E_ prefix.
13831 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13832             Chung-Ju Wu  <jasonwucj@gmail.com>
13834         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
13835         * config/nds32/nds32-md-auxiliary.c
13836         (symbolic_reference_mentioned_p): New.
13837         (nds32_legitimize_ict_address): New.
13838         (nds32_expand_ict_move): New.
13839         (nds32_indirect_call_referenced_p): New.
13840         (nds32_symbol_binds_local_p): Delete.
13841         (nds32_long_call_p): Modify.
13842         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
13843         * config/nds32/nds32-protos.h
13844         (symbolic_reference_mentioned_p): Declare.
13845         (nds32_legitimize_ict_address): Declare.
13846         (nds32_expand_ict_move): Declare.
13847         (nds32_indirect_call_referenced_p): Declare.
13848         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
13849         (nds32_relax_group): Use nds32_ict_const_p as condition.
13850         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
13851         (nds32_asm_file_start): Output ict_model directive in asm code.
13852         (nds32_legitimate_address_p): Consider indirect call.
13853         (nds32_print_operand): Consider indirect call.
13854         (nds32_print_operand_address): Consider indirect call.
13855         (nds32_insert_attributes): Handle "indirect_call" attribute.
13856         (TARGET_LEGITIMATE_ADDRESS_P): Define.
13857         (TARGET_LEGITIMATE_CONSTANT_P): Define.
13858         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
13859         (TARGET_DELEGITIMIZE_ADDRESS): Define.
13860         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
13861         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
13862         (TARGET_ICT_MODEL_SMALL): Define.
13863         (TARGET_ICT_MODEL_LARGE): Define.
13864         * config/nds32/nds32.md (movsi): Consider ict model.
13865         (call, call_value): Consider ict model.
13866         (sibcall, sibcall_value): Consider ict model.
13867         * config/nds32/nds32.opt (mict-model): New option.
13868         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
13869         model.
13871 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
13872             Monk Chiang  <sh.chiang04@gmail.com>
13873             Jim Wilson <jimw@sifive.com>
13875         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
13876         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
13877         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
13878         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
13879         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
13880         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
13881         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
13882         compute save_libcall_adjustment properly.
13883         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
13884         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
13885         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
13886         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
13887         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
13888         (ABI_SPEC): Handle mabi=ilp32e.
13889         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
13890         (RVE): Add RVE mask.
13891         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
13892         <-march>: Add rv32e as an example.
13894 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
13896         PR c++/82899
13897         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
13898         (intra_create_variable_infos): Handle C++ constructors.
13900 2018-05-18  Martin Liska  <mliska@suse.cz>
13902         * passes.def: Remove a redundant pass.
13904 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
13906         PR bootstrap/85838
13907         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
13909 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13911         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
13912         (ARMv4): Update.
13913         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
13914         (ARMv6m): Update.
13915         (armv2, armv2a, armv3, armv3m): Delete architectures.
13916         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
13917         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
13918         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
13919         Delete cpus.
13920         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
13921         (*mulsidi3adddi): Likewise.
13922         (mulsidi3): Likewise.
13923         (*mulsidi3_nov6): Likewise.
13924         (umulsidi3): Likewise.
13925         (umulsidi3_nov6): Likewise.
13926         (umaddsidi4): Likewise.
13927         (*umulsidi3adddi): Likewise.
13928         (smulsi3_highpart): Likewise.
13929         (*smulsi3_highpart_nov6): Likewise.
13930         (umulsi3_highpart): Likewise.
13931         (*umulsi3_highpart_nov6): Likewise.
13932         * config/arm/arm.h (arm_arch3m): Delete.
13933         * config/arm/arm.c (arm_arch3m): Delete.
13934         (arm_option_override_internal): Update armv3-related comment.
13935         (arm_configure_build_target): Delete use of isa_bit_mode32.
13936         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
13937         (arm_rtx_costs_internal): Delete check of arm_arch3m.
13938         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
13939         (mulsa3): Likewise.
13940         (mulusa3): Likewise.
13941         * config/arm/arm-protos.h (arm_arch3m): Delete.
13942         * config/arm/arm-tables.opt: Regenerate.
13943         * config/arm/arm-tune.md: Likewise.
13944         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
13945         deleted architectures.
13947 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13949         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
13950         (armv5t, armv5te): New features.
13951         (ARMv5, ARMv5e): Delete fgroups.
13952         (ARMv5t, ARMv5te): Adjust for above changes.
13953         (ARMv6m): Likewise.
13954         (armv5, armv5e): Delete arches.
13955         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
13956         arm_arch5.
13957         (*call_reg_arm): Likewise.
13958         (*call_value_reg_armv5): Likewise.
13959         (*call_value_reg_arm): Likewise.
13960         (*call_symbol): Likewise.
13961         (*call_value_symbol): Likewise.
13962         (*sibcall_insn): Likewise.
13963         (*sibcall_value_insn): Likewise.
13964         (clzsi2): Likewise.
13965         (prefetch): Likewise.
13966         (define_split and define_peephole2 dependent on arm_arch5):
13967         Likewise.
13968         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
13969         arm_arch5e.
13970         (TARGET_ARM_QBIT): Likewise.
13971         (TARGET_DSP_MULTIPLY): Likewise.
13972         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
13973         (arm_arch5, arm_arch5e): Delete.
13974         (arm_arch5t, arm_arch5te): Declare.
13975         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
13976         (arm_arch5t): Declare.
13977         (arm_option_reconfigure_globals): Update for the above.
13978         (arm_options_perform_arch_sanity_checks): Update comment, replace
13979         use of arm_arch5 with arm_arch5t.
13980         (use_return_insn): Likewise.
13981         (arm_emit_call_insn): Likewise.
13982         (output_return_instruction): Likewise.
13983         (arm_final_prescan_insn): Likewise.
13984         (arm_coproc_builtin_available): Likewise.
13985         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
13986         arm_arch5e with arm_arch5t and arm_arch5te.
13987         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
13988         (arm_arch5t, arm_arch5te): Declare.
13989         * config/arm/arm-tables.opt: Regenerate.
13990         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
13991         * config/arm/t-multilib: Likewise.
13992         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
13993         instead of arm_arch5.
13994         (*call_reg_thumb1): Likewise.
13995         (*call_value_reg_thumb1_v5): Likewise.
13996         (*call_value_reg_thumb1): Likewise.
13997         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13998         unreachable path.
13999         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14001 2018-05-18  Martin Liska  <mliska@suse.cz>
14003         PR gcov-profile/84846
14004         * doc/gcov.texi: Document -t option of gcov tool.
14006 2018-05-18  Martin Liska  <mliska@suse.cz>
14008         PR gcov-profile/84846
14009         * gcov.c (print_usage): Add new -t option.
14010         (process_args): Handle the option.
14011         (generate_results): Use stdout as output when requested by
14012         the option.
14014 2018-05-18  Martin Liska  <mliska@suse.cz>
14016         PR gcov-profile/84846
14017         * coverage.c (coverage_init): Write PWD to .gcno file.
14018         * doc/gcov.texi: Document how working directory is printed.
14019         * gcov-dump.c (dump_gcov_file): Print PWD.
14020         * gcov.c (output_intermediate_file): Likewise.
14021         (read_graph_file): Read PWD string.
14022         (output_lines): Print PWD.
14024 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14026         PR middle-end/85817
14027         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14028         for retval and return false if all args to phi are zero.
14030 2018-05-18  Richard Biener  <rguenther@suse.de>
14032         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14033         method.
14034         (evrp_dom_walker::before_dom_children): Call it.
14036 2018-05-18  Richard Biener  <rguenther@suse.de>
14038         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14039         results when processing array refs with variable index.
14041 2018-05-18  Toon Moene  <toon@moene.org>
14043         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14044         directly after that of -floop-interchange. Indicate that both
14045         options are enabled by default when specifying -O3.
14047 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14049         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14050         iterator.  Delete separate integer-mode vec_set<mode> expander.
14051         (aarch64_simd_vec_setv2di): Delete.
14052         (vec_setv2di): Delete.
14053         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14054         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
14055         the "w, r" alternative.
14057 2018-05-18  Martin Liska  <mliska@suse.cz>
14059         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14060         * tree-pass.h (make_pass_lower_switch_O0): New function.
14061         * tree-switch-conversion.c (node_has_low_bound): Remove.
14062         (node_has_high_bound): Likewise.
14063         (node_is_bounded): Likewise.
14064         (class pass_lower_switch): Make it a template type and create
14065         two instances.
14066         (pass_lower_switch::execute): Add template argument.
14067         (make_pass_lower_switch): New function.
14068         (make_pass_lower_switch_O0): New function.
14069         (do_jump_if_equal): Remove.
14070         (emit_case_nodes): Simplify to just handle all 3 cases and leave
14071         all the hard work to tree optimization passes.
14073 2018-05-18  Martin Liska  <mliska@suse.cz>
14075         * dbgcnt.c (limit_low): Renamed from limit.
14076         (limit_high): New variable.
14077         (dbg_cnt_is_enabled): Check for upper limit.
14078         (dbg_cnt): Adjust dumping.
14079         (dbg_cnt_set_limit_by_index): Add new argument for high
14080         value.
14081         (dbg_cnt_set_limit_by_name): Likewise.
14082         (dbg_cnt_process_single_pair): Parse new format.
14083         (dbg_cnt_process_opt): Use strtok.
14084         (dbg_cnt_list_all_counters): Remove 'value' and add
14085         'limit_high'.
14086         * doc/invoke.texi: Document changes.
14088 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
14090         * doc/sourcebuild.texi (scalar_all_fma): Document.
14091         * tree.def (FMA_EXPR): Delete.
14092         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14093         * internal-fn.c (ternary_direct): New macro.
14094         (expand_ternary_optab_fn): Likewise.
14095         (direct_ternary_optab_supported_p): Likewise.
14096         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14097         * builtins.c (fold_builtin_fma): Delete.
14098         (fold_builtin_3): Don't call it.
14099         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14100         * expr.c (expand_expr_real_2): Likewise.
14101         * fold-const.c (operand_equal_p): Likewise.
14102         (fold_ternary_loc): Likewise.
14103         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14104         * gimple.c (DEFTREECODE): Likewise.
14105         * gimplify.c (gimplify_expr): Likewise.
14106         * optabs-tree.c (optab_for_tree_code): Likewise.
14107         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14108         * tree-eh.c (operation_could_trap_p): Likewise.
14109         (stmt_could_throw_1_p): Likewise.
14110         * tree-inline.c (estimate_operator_cost): Likewise.
14111         * tree-pretty-print.c (dump_generic_node): Likewise.
14112         (op_code_prio): Likewise.
14113         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14114         * tree-ssa-operands.c (get_expr_operands): Likewise.
14115         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14116         * fold-const-call.h (fold_fma): Delete.
14117         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14118         CFN_FNMA and CFN_FNMS.
14119         (fold_fma): Delete.
14120         * genmatch.c (combined_fn): New enum.
14121         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14122         (commutative_op): New function.
14123         (commutate): Use it.  Handle more than 2 operands.
14124         (dt_operand::gen_gimple_expr): Use commutative_op.
14125         (parser::parse_expr): Allow :c to be used with non-binary
14126         operators if the commutative operand is known.
14127         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14128         CFN_FMS, CFN_FNMA and CFN_FNMS.
14129         (backprop::process_assign_use): Remove FMA_EXPR handling.
14130         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14131         (gen_hsa_fma): New function.
14132         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14133         IFN_FNMA and IFN_FNMS.
14134         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14135         * gimple-fold.h (follow_all_ssa_edges): Declare.
14136         * gimple-fold.c (follow_all_ssa_edges): New function.
14137         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14138         gimple_build interface and use follow_all_ssa_edges to fold the result.
14139         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14140         instead of checking for optabs directly.
14141         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14142         rather than FMA_EXPRs.
14143         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14144         call to IFN_FMA instead of an FMA_EXPR.
14146 2018-05-17  Jim Wilson  <jimw@sifive.com>
14148         * expr.c (do_tablejump): When converting index to Pmode, if we have a
14149         sign extended promoted subreg, and the range does not have the sign bit
14150         set, then do a sign extend.
14152         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14153         test, check for sign extended subreg and/or constant operands, and
14154         do a sign extend in that case.
14156 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
14158         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14159         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14160         Add untyped.
14161         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14162         Change logics_shift_reg to logics_shift_imm.
14163         (thunderx2t99_fp_loadpair_basic): Delete.
14164         (thunderx2t99_fp_storepair_basic): Delete.
14165         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14166         (thunderx2t99_asimd_polynomial): Delete.
14167         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14168         and neon_fp_mul_d_scalar_q.
14169         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14170         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14171         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14172         (thunderx2t99_asimd_lut): Add missing tbl types.
14173         (thunderx2t99_asimd_ext): Delete.
14174         (thunderx2t99_asimd_load1_1_mult): Delete.
14175         (thunderx2t99_asimd_load1_2_mult): Delete.
14176         (thunderx2t99_asimd_load1_ldp): New.
14177         (thunderx2t99_asimd_load1): New.
14178         (thunderx2t99_asimd_load2): Add missing *load2* types.
14179         (thunderx2t99_asimd_load3): New.
14180         (thunderx2t99_asimd_load4): New.
14181         (thunderx2t99_asimd_store1_1_mult): Delete.
14182         (thunderx2t99_asimd_store1_2_mult): Delete.
14183         (thunderx2t99_asimd_store2_mult): Delete.
14184         (thunderx2t99_asimd_store2_onelane): Delete.
14185         (thunderx2t99_asimd_store_stp): New.
14186         (thunderx2t99_asimd_store1): New.
14187         (thunderx2t99_asimd_store2): New.
14188         (thunderx2t99_asimd_store3): New.
14189         (thunderx2t99_asimd_store4): New.
14191 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
14193         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14194         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
14196 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
14197             Segher Boessenkool  <segher@kernel.crashing.org>
14199         PR target/85698
14200         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14201         operand.
14203 2018-05-17  Richard Biener  <rguenther@suse.de>
14205         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14206         for pruning loop and prune defs feeding only already visited PHIs.
14208 2018-05-17  Richard Biener  <rguenther@suse.de>
14210         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14212 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
14213             Richard Biener  <rguenther@suse.de>
14215         PR tree-optimization/85793
14216         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14217         for VMAT_ELEMENTWISE.
14219 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14221         * internal-fn.h (lookup_internal_fn): Declare
14222         * internal-fn.c (lookup_internal_fn): New function.
14223         * gimple.c (gimple_build_call_from_tree): Handle calls to
14224         internal functions.
14225         * gimple-pretty-print.c (dump_gimple_call): Print "." before
14226         internal function names.
14227         * tree-pretty-print.c (dump_generic_node): Likewise.
14228         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14230 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14232         * gimple-fold.h (gimple_build): Make the function forms take
14233         combined_fn rather than built_in_function.
14234         (gimple_simplify): Likewise.
14235         * gimple-match-head.c (gimple_simplify): Likewise.
14236         * gimple-fold.c (gimple_build): Likewise.
14237         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14238         rather than gimple_build_call_internal.
14239         (get_initial_defs_for_reduction): Likewise.
14240         (vect_create_epilog_for_reduction): Likewise.
14241         (vectorizable_live_operation): Likewise.
14243 2018-05-17  Martin Liska  <mliska@suse.cz>
14245         * gimple-ssa-sprintf.c (format_directive): Do not use
14246         space in between 'G_' and '('.
14248 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
14250         PR target/85323
14251         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14252         even if the mask is not all ones.
14254         PR target/85323
14255         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14256         vector.
14257         (ix86_gimple_fold_builtin): Likewise.
14259         PR target/85323
14260         * config/i386/i386.c: Include tree-vector-builder.h.
14261         (ix86_vector_shift_count): New function.
14262         (ix86_fold_builtin): Fold shift builtins by scalar count.
14263         (ix86_gimple_fold_builtin): Likewise.
14265         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14266         _mm512_setzero): New intrinsics.
14268 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
14269             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14271         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14272         code generation for cases where splatting a value is not useful.
14273         * simplify-rtx.c (simplify_ternary_operation): Simplify
14274         vec_merge across a vec_duplicate and a paradoxical subreg forming
14275         a vector mode to a vec_concat.
14277 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
14279         * config.gcc: Support "goldmont-plus".
14280         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14281         "goldmont-plus".
14282         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14283         PROCESSOR_GOLDMONT_PLUS.
14284         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14285         (processor_target_table): Add "goldmont-plus".
14286         (PTA_GOLDMONT_PLUS): Define.
14287         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14288         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14289         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14290         (fold_builtin_cpu): Add "goldmont-plus".
14291         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14292         (ix86_option_override_internal): Add "goldmont-plus".
14293         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14294         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14295         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14296         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14298 2018-05-17  Richard Biener  <rguenther@suse.de>
14300         PR tree-optimization/85757
14301         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14302         remove defs that only feed that PHI from further processing.
14304 2018-05-16  Jim Wilson  <jimw@sifive.com>
14306         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14307         asterisk to name.
14308         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14310 2018-05-16  Mark Wielaard  <mark@klomp.org>
14312         * dwarf2out.c (count_index_strings): New function.
14313         (output_indirect_strings): Call count_index_strings and generate
14314         header for dwarf_version >= 5.
14316 2018-05-16  Mark Wielaard  <mark@klomp.org>
14318         * dwarf2out.c (dwarf_FORM): New function.
14319         (set_indirect_string): Use dwarf_FORM.
14320         (reset_indirect_string): Likewise.
14321         (size_of_die): Likewise.
14322         (value_format): Likewise.
14323         (output_die): Likewise.
14324         (add_skeleton_AT_string): Likewise.
14325         (output_macinfo_op): Likewise.
14326         (index_string): Likewise.
14327         (output_index_string_offset): Likewise.
14328         (output_index_string): Likewise.
14329         (count_index_strings): Likewise.
14331 2018-05-16  Carl Love  <cel@us.ibm.com>
14333         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14334         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14336 2018-05-16  Martin Jambor  <mjambor@suse.cz>
14338         * ipa-prop.c (ipa_free_all_edge_args): Remove.
14339         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14341 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
14343         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
14344         (fnma<mode>4): Likewise.
14345         (fms<mode>4): Likewise.
14346         (fnms<mode>4): Likewise.
14347         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
14348         (aarch64_fnma<mode>4): Likewise.
14349         (aarch64_fms<mode>4): Likewise.
14350         (aarch64_fnms<mode>4): Likewise.
14351         (aarch64_fnmadd<mode>4): Likewise.
14353 2018-05-16  Jason Merrill  <jason@redhat.com>
14355         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
14357 2018-05-16  Richard Biener  <rguenther@suse.de>
14359         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
14360         (dump_stmt_cost): Declare.
14361         (add_stmt_cost): Dump cost we add.
14362         (add_stmt_costs): New function.
14363         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
14364         No longer exported.
14365         (vect_analyze_stmt): Adjust prototype.
14366         (vectorizable_condition): Likewise.
14367         (vectorizable_live_operation): Likewise.
14368         (vectorizable_reduction): Likewise.
14369         (vectorizable_induction): Likewise.
14370         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
14371         cost vector to pass to vectorizable_ and record afterwards.
14372         (vect_model_reduction_cost): Take cost vector argument and adjust.
14373         (vect_model_induction_cost): Likewise.
14374         (vectorizable_reduction): Likewise.
14375         (vectorizable_induction): Likewise.
14376         (vectorizable_live_operation): Likewise.
14377         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
14378         SLP_TREE_NUMBER_OF_VEC_STMTS.
14379         (vect_analyze_slp_cost_1): Remove.
14380         (vect_analyze_slp_cost): Likewise.
14381         (vect_slp_analyze_node_operations): Take visited args and
14382         a target cost vector.  Avoid processing already visited stmt sets.
14383         (vect_slp_analyze_operations): Use a local cost vector to gather
14384         costs and register those of non-discarded instances.
14385         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
14386         (vect_schedule_slp_instance): Remove copying of
14387         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
14388         zero.
14389         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
14390         adding cost.  Record cost entry location.
14391         (vect_prologue_cost_for_slp_op): Function to compute cost of
14392         a constant or invariant generated for SLP vect in the prologue,
14393         split out from vect_analyze_slp_cost_1.
14394         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
14395         (vect_model_promotion_demotion_cost): Likewise.
14396         (vect_model_store_cost): Likewise, make static.
14397         (vect_model_load_cost): Likewise.
14398         (vectorizable_bswap): Add cost vector arg and adjust.
14399         (vectorizable_call): Likewise.
14400         (vectorizable_simd_clone_call): Likewise.
14401         (vectorizable_conversion): Likewise.
14402         (vectorizable_assignment): Likewise.
14403         (vectorizable_shift): Likewise.
14404         (vectorizable_operation): Likewise.
14405         (vectorizable_store): Likewise.
14406         (vectorizable_load): Likewise.
14407         (vectorizable_condition): Likewise.
14408         (vectorizable_comparison): Likewise.
14409         (can_vectorize_live_stmts): Likewise.
14410         (vect_analyze_stmt): Likewise.
14411         (vect_transform_stmt): Adjust calls to vectorizable_*.
14412         * tree-vectorizer.c: Include gimple-pretty-print.h.
14413         (dump_stmt_cost): New function.
14415 2018-05-16  Richard Biener  <rguenther@suse.de>
14417         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
14418         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
14419         * tree-ssa-dse.c: Include tree-ssa-loop.h.
14420         (check_name): New callback.
14421         (dse_classify_store): Track cycles via a visited bitmap of PHI
14422         defs and simplify handling of in-loop and across loop dead stores
14423         and properly fail for loop-variant refs.  Handle byte-tracking with
14424         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
14425         limiting the walk.
14427 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
14429         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
14430         (vect_get_mask_type_for_stmt): Likewise.
14431         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
14432         split out from...
14433         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
14434         to determine the statement's vector type and the vector type that
14435         should be used for calculating nunits.  Deal with cases in which
14436         the type has to be deferred.
14437         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
14438         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
14439         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
14440         (vect_determine_vf_for_stmt): New functions, split out from...
14441         (vect_determine_vectorization_factor): ...here.
14442         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
14443         (vect_get_mask_type_for_stmt): New functions, split out from
14444         vect_determine_vectorization_factor.
14446 2018-05-16  Richard Biener  <rguenther@suse.de>
14448         * tree-cfg.c (verify_gimple_assign_ternary): Properly
14449         verify the [VEC_]COND_EXPR embedded comparison.
14451 2018-05-15  Martin Sebor  <msebor@redhat.com>
14453         PR tree-optimization/85753
14454         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
14455         RECORD_TYPE in addition to ARRAY_TYPE.
14457 2018-05-15  Martin Sebor  <msebor@redhat.com>
14459         PR middle-end/85643
14460         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
14462 2018-05-15  Richard Biener  <rguenther@suse.de>
14464         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
14465         add by_clobber_p one.  Change algorithm to collect all defs
14466         representing uses we need to walk and try reducing them to
14467         a single one before failing.
14468         (dse_dom_walker::dse_optimize_stmt): Adjust.
14470 2018-05-13  Mark Wielaard  <mark@klomp.org>
14472         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
14473         (size_of_loc_descr): Likewise.
14474         (output_loc_operands): Likewise.
14475         (output_loc_operands_raw): Likewise.
14476         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
14477         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
14478         (hash_loc_operands): Likewise.
14479         (compare_loc_operands): Likewise.
14481 2018-05-14  Mark Wielaard  <mark@klomp.org>
14483         * dwarf2out.c (count_index_addrs): New function.
14484         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
14486 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14488         PR tree-optimization/83648
14489         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
14490         return value as malloc candidate.
14492 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14494         PR ipa/85734
14495         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
14496         param as true in call to suggest_attribute.
14498 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
14500         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
14501         -mreadonly-in-sdata.
14503 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14505         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
14506         New pattern.
14507         (aarch64_crypto_aesd_fused): Likewise.
14509 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
14511         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
14512         (movsi_aarch64): Likewise.
14513         (load_pairsi): Likewise.
14514         (load_pairdi): Likewise.
14515         (store_pairsi): Likewise.
14516         (store_pairdi): Likewise.
14517         (load_pairsf): Likewise.
14518         (load_pairdf): Likewise.
14519         (store_pairsf): Likewise.
14520         (store_pairdf): Likewise.
14521         (zero_extend): Likewise.
14522         (trunc): Swap alternatives.
14523         (fcvt_target): Add '?' to prefer w over r.
14525 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
14527         PR target/85756
14528         * config/i386/i386.md: Disallow non-commutative arithmetics in
14529         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
14530         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
14531         in the peephole2 before it.
14533 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
14535         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
14536         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
14537         (ix86_handle_option): Handle -mcldemote.
14538         * config.gcc: New header.
14539         * config/i386/cldemoteintrin.h: New file.
14540         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
14541         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14542         -mcldemote.
14543         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14544         OPTION_MASK_ISA_CLDEMOTE.
14545         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
14546         (ix86_valid_target_attribute_inner_p): Ditto.
14547         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
14548         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
14549         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
14550         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
14551         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
14552         (cldemote): New.
14553         * config/i386/i386.opt: Add -mcldemote.
14554         * config/i386/x86intrin.h: New header.
14555         * doc/invoke.texi: Add -mcldemote.
14557 2018-05-14  Richard Biener  <rguenther@suse.de>
14559         * doc/match-and-simplify.texi: Adjust :s documentation.
14561 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
14563         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
14564         intended memcpy size.
14565         (REORDER_45): Likewise.
14567 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
14569         * sort.cc: New file.
14570         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
14571         * vec.c (qsort_chk): Use gcc_qsort.
14572         * Makefile.in (OBJS-libcommon): Add sort.o.
14573         (build/sort.o): New target.  Use it...
14574         (BUILD_RTL): ... here, and...
14575         (build/gencfn-macros): ... here, and...
14576         (build/genmatch): ... here.
14578 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14579             Chung-Ju Wu  <jasonwucj@gmail.com>
14581         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
14582         * config/nds32/nds32-graywolf.md: New file.
14583         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
14584         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
14585         pipeline.
14586         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
14587         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
14588         * config/nds32/nds32.md (pipeline_model): Add graywolf.
14589         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
14590         * config/nds32/pipelines.md: Include n15 settings.
14592 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14593             Chung-Ju Wu  <jasonwucj@gmail.com>
14595         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
14596         * config/nds32/nds32-n13.md: New file.
14597         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
14598         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
14599         pipeline.
14600         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
14601         * config/nds32/nds32.md (pipeline_model): Add n13.
14602         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
14603         * config/nds32/pipelines.md: Include n13 settings.
14605 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14606             Chung-Ju Wu  <jasonwucj@gmail.com>
14608         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
14609         * config/nds32/nds32-n10.md: New file.
14610         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
14611         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
14612         pipeline.
14613         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
14614         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
14615         * config/nds32/nds32.md (pipeline_model): Add n10.
14616         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
14617         * config/nds32/pipelines.md: Include n10 settings.
14619 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
14620             Kito Cheng  <kito.cheng@gmail.com>
14621             Chung-Ju Wu  <jasonwucj@gmail.com>
14623         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
14624         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14625         Add enum values for DSP extension instructions.
14626         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
14627         New constraints.
14628         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
14629         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
14630         New code iterators.
14631         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
14632         * config/nds32/nds32-dspext.md: New file for DSP implementation.
14633         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
14634         * config/nds32/nds32-intrinsic.md: Likewise.
14635         * config/nds32/nds32_intrinsic.h: Likewise.
14636         * config/nds32/nds32-md-auxiliary.c: Likewise.
14637         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
14638         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
14639         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
14640         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
14641         * config/nds32/nds32-protos.h: New declarations for DSP extension.
14642         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
14643         TYPE_DMAC in switch statement.
14644         * config/nds32/nds32.c: New checking and implementation for DSP
14645         extension instructions.
14646         * config/nds32/nds32.h: Likewise.
14647         * config/nds32/nds32.md: Likewise.
14648         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
14649         * config/nds32/predicates.md: Implement new predicates for DSP
14650         extension.
14652 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14654         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
14655         Reformat alternatives and attributes so it is easier to identify
14656         which constraints/attributes go with which instruction.
14657         (mov<mode>_hardfloat32, FMOVE64): Likewise.
14658         (mov<mode>_softfloat32, FMOVE64): Likewise.
14659         (mov<mode>_hardfloat64, FMOVE64): Likewise.
14660         (mov<mode>_softfloat64, FMOVE64): Likewise.
14662 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14664         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14665         subsection.
14666         (Basic PowerPC Built-in Functions): The new name of the
14667         subsection previously known as "PowerPC Built-in Functions".
14668         (Basic PowerPC Built-in Functions Available on all Configurations):
14669         New subsubsection.
14670         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
14671         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
14672         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
14673         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
14675 2018-05-11  Martin Jambor  <mjambor@suse.cz>
14677         PR ipa/85655
14678         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
14679         single const.
14681 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
14683         PR target/85733
14684         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
14686 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
14688         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
14689         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
14690         (ix86_handle_option): Handle -mwaitpkg.
14691         * config.gcc: New header.
14692         * config/i386/cpuid.h (bit_WAITPKG): New bit.
14693         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
14694         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
14695         function type.
14696         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14697         OPTION_MASK_ISA_WAITPKG.
14698         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
14699         (ix86_option_override_internal): Add PTA_WAITPKG.
14700         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
14701         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
14702         IX86_BUILTIN_TPAUSE.
14703         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
14704         __builtin_ia32_umwait and __builtin_ia32_tpause.
14705         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
14706         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
14707         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
14708         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
14709         UNSPECV_TPAUSE): New.
14710         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
14711         * config/i386/i386.opt: Add -mwaitpkg.
14712         * config/i386/waitpkgintrin.h: New file.
14713         * config/i386/x86intrin.h: New header.
14714         * doc/invoke.texi: Add -mwaitpkg.
14716 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
14718         PR target/85606
14719         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
14720         equivalent.
14721         (cortex-m0): Use armv6s-m isa.
14722         (cortex-m0plus): Likewise.
14723         (cortex-m1): Likewise.
14724         (cortex-m0.small-multiply): Likewise.
14725         (cortex-m0plus.small-multiply): Likewise.
14726         (cortex-m1.small-multiply): Likewise.
14728 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
14729             Jakub Jelinek  <jakub@redhat.com>
14731         PR tree-optimization/85692
14732         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
14733         source permute as well.
14735 2018-05-11  Martin Liska  <mliska@suse.cz>
14737         PR sanitizer/85556
14738         * doc/extend.texi: Document LLVM style format for no_sanitize
14739         attribute.
14741 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
14743         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
14744         mode_supports_vsx_dform_quad to mode_supports_dq_form.
14745         (mode_supports_vsx_dform_quad): Likewise.
14746         (mode_supports_vmx_dform): Move these functions to be next to the
14747         other mode_supports functions.
14748         (mode_supports_dq_form): Likewise.
14749         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
14750         mode_supports_dq_form.
14751         (reg_offset_addressing_ok_p): Likewise.
14752         (offsettable_ok_by_alignment): Likewise.
14753         (rs6000_legitimate_offset_address_p): Likewise.
14754         (legitimate_lo_sum_address_p): Likewise.
14755         (rs6000_legitimize_address): Likewise.
14756         (rs6000_legitimize_reload_address): Likewise.
14757         (rs6000_secondary_reload_inner): Likewise.
14758         (rs6000_preferred_reload_class): Likewise.
14759         (rs6000_output_move_128bit): Likewise.
14761 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14763         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
14764         Generate SImode target register for null target.
14765         <case IX86_BUILTIN_XGETBV>: Ditto.
14766         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
14767         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
14769 2018-05-10  Carl Love  <cel@us.ibm.com>
14771         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14772         dcbtt and dcbtstt if operands[2] is 0.
14774 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14776         PR target/85693
14777         * config/i386/sse.md (usadv64qi): New expander.
14779 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
14781         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
14782         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
14783         -maltivec=be support.
14784         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
14785         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
14786         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
14787         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
14788         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
14789         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
14790         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
14791         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
14792         altivec_vsumsws): Adjust.
14793         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
14794         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
14795         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
14796         support.
14797         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
14798         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
14799         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
14800         (altivec_lve<VI_char>x): Delete expand.
14801         (*altivec_lve<VI_char>x_internal): Rename to...
14802         (altivec_lve<VI_char>x): ... this.
14803         (altivec_lvxl_<mode>): Delete expand.
14804         (*altivec_lvxl_<mode>_internal): Rename to ...
14805         (altivec_lvxl_<mode>): ... this.
14806         (altivec_stvxl_<mode>): Delete expand.
14807         (*altivec_stvxl_<mode>_internal): Rename to ...
14808         (altivec_stvxl_<mode>): ... this.
14809         (altivec_stve<VI_char>x): Delete expand.
14810         (*altivec_stve<VI_char>x_internal): Rename to ...
14811         (altivec_stve<VI_char>x): ... this.
14812         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
14813         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
14814         reduc_plus_scal_<mode>): Adjust.
14815         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
14816         comment.
14817         (rs6000_cpu_cpp_builtins): Adjust.
14818         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
14819         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
14820         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
14821         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
14822         -maltivec=be support.
14823         (rs6000_split_vec_extract_var): Adjust.
14824         (rs6000_split_v4si_init): Adjust.
14825         (swap_selector_for_mode): Delete.
14826         (altivec_expand_lvx_be, altivec_expand_stvx_be,
14827         altivec_expand_stvex_be): Delete.
14828         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
14829         -maltivec=be support.
14830         (rs6000_gimple_fold_builtin): Ditto.
14831         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
14832         Adjust.
14833         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
14834         (TARGET_DIRECT_MOVE_64BIT): Adjust.
14835         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
14836         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
14837         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
14838         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
14839         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
14840         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
14841         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
14842         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
14843         anonymous split): Adjust.
14844         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
14845         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
14847 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
14849         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
14850         when --with-gxx-include-dir is also specified.
14851         * configure: Regenerate.
14853 2018-05-09  Jim Wilson  <jimw@sifive.com>
14855         PR target/84797
14856         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
14857         * config/riscv/t-withmultilib: New.
14858         * config/riscv/withmultilib.h: New.
14859         * doc/install.texi: Document RISC-V --with-multilib-list support.
14861 2018-05-09  Richard Biener  <rguenther@suse.de>
14863         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
14864         vector.
14865         (vect_bb_vectorization_profitable_p): Adjust.  Compute
14866         actual scalar cost using the cost vector and the add_stmt_cost
14867         machinery.
14869 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14871         PR rtl-optimization/85645
14872         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
14873         in the REG_CFA_REGISTER note for LR, don't leave it empty.
14875 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14877         PR rtl-optimization/85645
14878         * shrink-wrap.c (spread_components): Return a boolean saying if
14879         anything was changed.
14880         (try_shrink_wrapping_separate): Iterate spread_components until
14881         nothing changes anymore.
14883 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14885         PR rtl-optimization/85645
14886         * regrename.c (build_def_use): Also kill the chains that include the
14887         destination of a REG_CFA_REGISTER note.
14889 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14891         PR rtl-optimization/85645
14892         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
14893         insn that has a REG_CFA_REGISTER note.
14895 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
14897         * cfgexpand.c (expand_clobber): New function.
14898         (expand_gimple_stmt_1): Use it.
14899         * tree-vect-stmts.c (vect_clobber_variable): New function,
14900         split out from...
14901         (vectorizable_simd_clone_call): ...here.
14902         (vectorizable_store): Emit a clobber either side of an
14903         IFN_STORE_LANES sequence.
14904         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
14906 2018-05-09  Tom de Vries  <tom@codesourcery.com>
14908         PR target/85626
14909         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
14910         (define_insn "trap_if_false"): Add exit after trap.
14912 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
14914         PR rtl-optimization/85638
14915         * bb-reorder.c: Include common/common-target.h.
14916         (create_forwarder_block): New function extracted from...
14917         (fix_up_crossing_landing_pad): ...here.  Rename into...
14918         (dw2_fix_up_crossing_landing_pad): ...this.
14919         (sjlj_fix_up_crossing_landing_pad): New function.
14920         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
14921         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
14922         from both partitions and exit the loop after one iteration.
14924 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14926         Revert:
14927         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14928         subsection.
14929         (Basic PowerPC Built-in Functions): The new name of the
14930         subsection previously known as "PowerPC Built-in Functions".
14931         (Basic PowerPC Built-in Functions Available on all Configurations):
14932         New subsubsection.
14933         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14934         subsubsection.
14935         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14936         subsubsection.
14937         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14938         subsubsection.
14939         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14940         subsubsection.
14942 2018-05-08  Jim Wilson  <jimw@sifive.com>
14944         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
14945         (LD_EMUL_SUFFIX): New.
14946         (LINK_SPEC): Use it.
14948 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14950         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14951         subsection.
14952         (Basic PowerPC Built-in Functions): The new name of the
14953         subsection previously known as "PowerPC Built-in Functions".
14954         (Basic PowerPC Built-in Functions Available on all Configurations):
14955         New subsubsection.
14956         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14957         subsubsection.
14958         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14959         subsubsection.
14960         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14961         subsubsection.
14962         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14963         subsubsection.
14965 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14967         PR target/85683
14968         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
14969         after cmpelim optimization.
14971 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
14973         * config.gcc: Support "goldmont".
14974         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
14975         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14976         PROCESSOR_GOLDMONT.
14977         * config/i386/i386.c (m_GOLDMONT): Define.
14978         (processor_target_table): Add "goldmont".
14979         (PTA_GOLDMONT): Define.
14980         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
14981         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
14982         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
14983         (fold_builtin_cpu): Add "goldmont".
14984         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
14985         (ix86_option_override_internal): Add "goldmont".
14986         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
14987         (processor_type): Add PROCESSOR_GOLDMONT.
14988         * config/i386/i386.md: Add CPU "glm".
14989         * config/i386/glm.md: New file.
14990         * config/i386/x86-tune.def: Add m_GOLDMONT.
14991         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
14993 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14995         PR target/85572
14996         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14997         E_V4DImode.
14998         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14999         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
15000         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
15002         PR target/85317
15003         * config/i386/i386.c (ix86_fold_builtin): Handle
15004         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15006         PR target/85480
15007         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15008         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15010 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
15012         PR target/85658
15013         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15014         (check_arch): Likewise.
15015         (check_fpu): Return the result rather than printing it.
15016         (end arch): Fix operator precedence.
15017         (end cpu): Likewise.
15018         (END): Print the result from check_fpu.
15020 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15021             Alan Hayward  <alan.hayward@arm.com>
15022             David Sherwood  <david.sherwood@arm.com>
15024         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15025         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15026         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15027         (*fcmuo<mode>_and): New patterns.
15029 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
15031         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15032         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15033         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15034         (cmp_op, sve_imm_con): New code attributes.
15035         (SVE_COND_INT_CMP, imm_con): Delete.
15036         (cmp_op): Remove above unspecs from int attribute.
15037         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15038         to...
15039         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
15040         comparison-specific unspecs.
15041         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15042         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15043         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15044         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15045         (*vec_fcm<cmp_op><mode>): Rename to...
15046         (*fcm<cmp_op><mode>): ...this and adjust likewise.
15047         (*vec_fcmuo<mode>): Rename to...
15048         (*fcmuo<mode>): ...this and adjust likewise.
15049         (*pred_fcm<cmp_op><mode>): New pattern.
15050         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15051         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15052         functions.
15053         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15054         and UNORDERED.
15055         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15056         (aarch64_emit_sve_predicated_cond): New function.
15057         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15058         (aarch64_emit_unspec_cond_or): Replace with...
15059         (aarch64_emit_sve_or_conds): ...this new function.  Use
15060         aarch64_emit_sve_ptrue_op for the individual comparisons and
15061         aarch64_emit_binop to OR them together.
15062         (aarch64_emit_inverted_unspec_cond): Replace with...
15063         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
15064         aarch64_emit_sve_ptrue_op for the comparison and
15065         aarch64_emit_unop to invert the result.
15066         (aarch64_expand_sve_vec_cmp_float): Update after the above
15067         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
15069 2018-05-07  Nathan Sidwell  <nathan@acm.org>
15071         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15072         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15073         (Backwards Compatibility): Likewise.
15075 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15077         PR bootstrap/85681
15078         Revert:
15079         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15081         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15082         <prefetch_dynamic_strides>: New const bool field.
15083         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15084         prefetch_dynamic_strides.
15085         (exynosm1_prefetch_tune): Likewise.
15086         (thunderxt88_prefetch_tune): Likewise.
15087         (thunderx_prefetch_tune): Likewise.
15088         (thunderx2t99_prefetch_tune): Likewise.
15089         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15090         to false.
15091         (aarch64_override_options_internal): Update to set
15092         PARAM_PREFETCH_DYNAMIC_STRIDES.
15093         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15094         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15095         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15096         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15097         prefetch-dynamic-strides setting.
15099         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15101         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15102         <minimum_stride>: New const int field.
15103         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15104         minimum_stride field.
15105         (exynosm1_prefetch_tune): Likewise.
15106         (thunderxt88_prefetch_tune): Likewise.
15107         (thunderx_prefetch_tune): Likewise.
15108         (thunderx2t99_prefetch_tune): Likewise.
15109         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15110         (aarch64_override_options_internal): Update to set
15111         PARAM_PREFETCH_MINIMUM_STRIDE.
15112         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15113         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15114         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15115         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15116         stride is constant and is below the minimum stride threshold.
15118 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15120         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15121         to 512.
15123 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15125         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15126         <prefetch_dynamic_strides>: New const bool field.
15127         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15128         prefetch_dynamic_strides.
15129         (exynosm1_prefetch_tune): Likewise.
15130         (thunderxt88_prefetch_tune): Likewise.
15131         (thunderx_prefetch_tune): Likewise.
15132         (thunderx2t99_prefetch_tune): Likewise.
15133         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15134         to false.
15135         (aarch64_override_options_internal): Update to set
15136         PARAM_PREFETCH_DYNAMIC_STRIDES.
15137         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15138         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15139         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15140         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15141         prefetch-dynamic-strides setting.
15143 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15145         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15146         <minimum_stride>: New const int field.
15147         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15148         minimum_stride field.
15149         (exynosm1_prefetch_tune): Likewise.
15150         (thunderxt88_prefetch_tune): Likewise.
15151         (thunderx_prefetch_tune): Likewise.
15152         (thunderx2t99_prefetch_tune): Likewise.
15153         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15154         (aarch64_override_options_internal): Update to set
15155         PARAM_PREFETCH_MINIMUM_STRIDE.
15156         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15157         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15158         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15159         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15160         stride is constant and is below the minimum stride threshold.
15162 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
15164         PR c++/85659
15165         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15166         the type is addressable.  Don't force op into register if it has
15167         BLKmode.
15169 2018-05-05  Roland McGrath  <mcgrathr@google.com>
15171         PR other/77609
15172         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15173         any section for which we don't know a specific type it should have,
15174         regardless of name.  Previously this was done only for the exact
15175         names ".init_array", ".fini_array", and ".preinit_array".
15176         (default_elf_asm_named_section): Add comment about
15177         relationship with default_section_type_flags and SECTION_NOTYPE.
15178         (get_section): Don't consider it a type conflict if one side has
15179         SECTION_NOTYPE and the other doesn't, as long as neither has the
15180         SECTION_BSS et al used in the default_section_type_flags logic.
15182 2018-05-05  Tom de Vries  <tom@codesourcery.com>
15184         PR target/85653
15185         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15186         (workaround_barsyncs): New function.
15187         (nvptx_reorg): Use workaround_barsyncs.
15188         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15189         (define_expand "nvptx_membar_cta"): New define_expand.
15190         (define_insn "*nvptx_membar_cta"): New insn.
15192 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
15194         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15195         To improve optimization opportunities.
15196         * builtin-types.def: The new needed builtin types for the above.
15198 2018-05-04  Richard Biener  <rguenther@suse.de>
15200         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15201         * gimple-ssa-store-merging.c
15202         (imm_store_chain_info::output_merged_store): Remove redundant create,
15203         release split_store vector contents on failure.
15204         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15205         scalar stmt vector on cache hit.
15207 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
15209         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15210         Xilinx FP support.
15211         * config.gcc (powerpc-xilinx-eabi*): Remove.
15212         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15213         support.
15214         (fusion_addis_mem_combo_load): Ditto.
15215         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15216         FP support.
15217         (rs6000_cpu_cpp_builtins): Ditto.
15218         * config/rs6000/rs6000-linux.c
15219         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15220         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15221         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15222         support.
15223         (rs6000_setup_reg_addr_masks): Ditto.
15224         (rs6000_init_hard_regno_mode_ok): Ditto.
15225         (rs6000_option_override_internal): Ditto.
15226         (legitimate_lo_sum_address_p): Ditto.
15227         (rs6000_legitimize_address): Ditto.
15228         (rs6000_legitimize_reload_address): Ditto.
15229         (rs6000_legitimate_address_p): Ditto.
15230         (abi_v4_pass_in_fpr): Ditto.
15231         (setup_incoming_varargs): Ditto.
15232         (rs6000_gimplify_va_arg): Ditto.
15233         (rs6000_split_multireg_move): Ditto.
15234         (rs6000_savres_strategy): Ditto.
15235         (rs6000_emit_prologue_components): Ditto.
15236         (rs6000_emit_epilogue_components): Ditto.
15237         (rs6000_emit_prologue): Ditto.
15238         (rs6000_emit_epilogue): Ditto.
15239         (rs6000_elf_file_end): Ditto.
15240         (rs6000_function_value): Ditto.
15241         (rs6000_libcall_value): Ditto.
15242         * config/rs6000/rs6000.h: Ditto.
15243         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15244         (TARGET_MINMAX): ... this.  New.
15245         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15246         * config/rs6000/rs6000.md: Remove Xilinx FP support.
15247         (*movsi_internal1_single): Delete.
15248         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15249         mfpu=, mxilinx-fpu): Delete.
15250         * config/rs6000/singlefp.h: Delete.
15251         * config/rs6000/sysv4.h: Remove Xilinx FP support.
15252         * config/rs6000/t-rs6000: Ditto.
15253         * config/rs6000/t-xilinx: Delete.
15254         * config/rs6000/titan.md: Adjust for fp_type removal.
15255         * config/rs6000/vsx.md: Remove Xilinx FP support.
15256         (VStype_simple): Delete.
15257         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15258         * config/rs6000/xfpu.h: Delete.
15259         * config/rs6000/xfpu.md: Delete.
15260         * config/rs6000/xilinx.h: Delete.
15261         * config/rs6000/xilinx.opt: Delete.
15262         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15263         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15265 2018-05-04  Tom de Vries  <tom@codesourcery.com>
15267         PR libgomp/85639
15268         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15269         if ignore == 0.
15271 2018-05-04  Richard Biener  <rguenther@suse.de>
15273         PR middle-end/85627
15274         * tree-complex.c (update_complex_assignment): We are always in SSA form.
15275         (expand_complex_div_wide): Likewise.
15276         (expand_complex_operations_1): Likewise.
15277         (expand_complex_libcall): Preserve EH info of the original stmt.
15278         (tree_lower_complex): Handle removed blocks.
15279         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15280         on complex multiplication and division libcall builtins.
15282 2018-05-04  Richard Biener  <rguenther@suse.de>
15284         PR middle-end/85574
15285         * fold-const.c (negate_expr_p): Restrict negation of operand
15286         zero of a division to when we know that can happen without
15287         overflow.
15288         (fold_negate_expr_1): Likewise.
15290 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
15292         PR libstdc++/85466
15293         * real.h (real_nextafter): Declare.
15294         * real.c (real_nextafter): New function.
15295         * fold-const-call.c (fold_const_nextafter): New function.
15296         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15297         CASE_CFN_NEXTTOWARD.
15298         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15299         even when arg1_mode is different from arg0_mode.
15301 2018-05-03  Nathan Sidwell  <nathan@acm.org>
15303         * doc/extend.texi (Deprecated Features): Remove
15304         -ffriend-injection.
15305         (Backwards Compatibility): Likewise.
15306         * doc/invoke.texi (C++ Language Options): Likewise.
15307         (C++ Dialect Options): Likewise.
15309 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
15311         PR target/85530
15312         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15313         _mm512_mask_mullox_epi64): New intrinsics.
15315 2018-05-03  Tom de Vries  <tom@codesourcery.com>
15317         PR testsuite/85106
15318         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15319         dump files): Add offload-tree.
15321 2018-05-03  Richard Biener  <rguenther@suse.de>
15323         PR tree-optimization/85615
15324         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15325         to loops not nested in BBs loop father to avoid creating multi-entry
15326         loops.
15328 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15330         PR tree-optimization/70291
15331         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15332         arguments.  Change return type to tree.  Emit libcall as a new
15333         statement rather than replacing existing one when inplace_p is true.
15334         (expand_complex_multiplication_components): New function.
15335         (expand_complex_multiplication): Expand floating-point complex
15336         multiplication using the above.
15337         (expand_complex_division): Rename inner_type parameter to type.
15338         Update expand_complex_libcall call-site.
15339         (expand_complex_operations_1): Update expand_complex_multiplication
15340         and expand_complex_division call-sites.
15342 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
15344         PR target/85582
15345         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15346         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15347         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
15348         the highest significant bit of the shift count mask is clear.  In
15349         check whether and[sq]i3 is needed verify that all significant bits
15350         of the shift count other than the highest are set.
15352 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15354         PR libgomp/82428
15355         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
15356         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
15357         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
15358         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
15359         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
15360         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
15361         __builtin_goacc_parlevel_size.
15363 2018-05-02  Richard Biener  <rguenther@suse.de>
15365         PR tree-optimization/85597
15366         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
15367         do not use split vect_get_vec_defs call but call vect_get_slp_defs
15368         directly.
15370 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15372         PR testsuite/85106
15373         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15374         dump files): Add ltrans-tree.
15376 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15378         PR testsuite/85106
15379         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15380         dump files): Add wpa-ipa.
15382 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
15384         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
15385         powerpc*-*-linux*paired* target.
15386         * config/rs6000/750cl.h: Delete.
15387         * config/rs6000/paired.h: Delete.
15388         * config/rs6000/paired.md: Delete.
15389         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
15390         float support.
15391         * config/rs6000/rs6000-builtin.def: Remove paired float support.
15392         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15393         comment.  Remove paired float support.
15394         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
15395         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
15396         VECTOR_PAIRED.
15397         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
15398         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
15399         declarations.
15400         * config/rs6000/rs6000.c: Remove paired float support.
15401         (paired_expand_vector_init, paired_expand_vector_move,
15402         paired_emit_vector_compare, paired_emit_vector_cond_expr,
15403         (paired_expand_lv_builtin, paired_expand_stv_builtin,
15404         paired_expand_builtin, paired_expand_predicate_builtin,
15405         paired_init_builtins): Delete.
15406         * config/rs6000/rs6000.h: Remove paired float support.
15407         * config/rs6000/rs6000.md: Remove paired float support.
15408         (move_from_CR_ov_bit): Delete.
15409         * config/rs6000/rs6000.opt (mpaired): Delete.
15410         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
15411         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
15413 2018-05-02  Richard Biener  <rguenther@suse.de>
15415         PR middle-end/85567
15416         * gimplify.c (gimplify_save_expr): When in SSA form allow
15417         SAVE_EXPRs to compute to SSA vars.
15419 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
15421         PR target/85582
15422         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15423         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15424         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
15425         clobber operands[2], instead use a new pseudo.  Formatting fixes.
15427 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
15429         PR tree-optimization/85586
15430         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
15431         exit early for statements in the same group if the accesses are
15432         not strided.
15434 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15436         PR lto/85451
15437         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
15438         error message.
15440 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
15442         PR tree-optimization/85143
15443         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
15445 2018-05-01  Tom de Vries  <tom@codesourcery.com>
15447         PR lto/85451
15448         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
15449         not found" error message.
15451 2018-05-01  Tom de Vries  <tom@codesourcery.com>
15453         PR other/83786
15454         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
15455         * vec.c (test_ordered_remove_if): New function.
15456         (vec_c_tests): Call test_ordered_remove_if.
15457         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
15458         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
15459         * tree-vect-patterns.c (vect_pattern_recog_1): Use
15460         VEC_ORDERED_REMOVE_IF.
15462 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15464         PR tree-optimization/82665
15465         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
15466         pointer subtraction where arguments come from a memchr call.
15468 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
15470         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
15471         --push-state --as-needed and --pop-state instead of --as-needed and
15472         --no-as-needed if ld supports it.
15473         * configure: Regenerated.
15475         PR web/85578
15476         * doc/install.texi2html: Replace _002d with - and _002a with * in
15477         generated html files using sed.
15479 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15481         PR c++/85523
15482         * gcc-rich-location.c (blank_line_before_p): New function.
15483         (use_new_line): New function.
15484         (gcc_rich_location::add_fixit_insert_formatted): New function.
15485         * gcc-rich-location.h
15486         (gcc_rich_location::add_fixit_insert_formatted): New function.
15488 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15490         * selftest.c (assert_streq): Rename "expected" and "actual" to
15491         "val1" and "val2".  Extend NULL-handling to cover both inputs
15492         symmetrically, while still requiring both to be non-NULL for a pass.
15493         * selftest.h (assert_streq): Rename "expected" and "actual" to
15494         "val1" and "val2".
15495         (ASSERT_EQ): Likewise.
15496         (ASSERT_EQ_AT): Likewise.
15497         (ASSERT_KNOWN_EQ): Likewise.
15498         (ASSERT_KNOWN_EQ_AT): Likewise.
15499         (ASSERT_NE): Likewise.
15500         (ASSERT_MAYBE_NE): Likewise.
15501         (ASSERT_MAYBE_NE_AT): Likewise.
15502         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
15503         the assertion to pass.
15504         (ASSERT_STREQ_AT): Likewise.
15506 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
15508         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
15509         interaction with -pie.
15511 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15513         * selftest.h: Fix alphabetization of per-source-file selftest
15514         declarations.
15516 2018-04-30  Jason Merrill  <jason@redhat.com>
15518         PR c++/61982 - dead stores to destroyed objects.
15519         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
15520         of clobber.
15522 2018-04-30  Jason Merrill  <jason@redhat.com>
15524         * tree.c (build_clobber): New.
15525         * tree.h: Declare it.
15526         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
15528 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15530         * diagnostic-show-locus.c (layout::layout): Update for
15531         location_get_source_line returning a char_span.
15532         (struct char_span): Move to input.h.
15533         (struct correction): Update for fields in char_span becoming
15534         private.
15535         (struct source_line): Update for location_get_source_line
15536         returning a char_span.
15537         (layout::print_line): Likewise.
15538         * edit-context.c (edited_file::print_content): Likewise.
15539         (edited_file::print_diff_hunk): Likewise.
15540         (edited_file::print_run_of_changed_lines): Likewise.
15541         (edited_file::get_num_lines): Likewise.
15542         (edited_line::edited_line): Likewise.
15543         * final.c (asm_show_source): Likewise.
15544         * input.c (location_get_source_line): Convert return type
15545         from const char * to char_span, losing the final "line_len"
15546         param.
15547         (dump_location_info): Update for the above.
15548         (get_substring_ranges_for_loc): Likewise.  Use a char_span
15549         when handling the literal within the line.
15550         (test_reading_source_line): Update for location_get_source_line
15551         returning a char_span.
15552         * input.h (class char_span): Move here from
15553         diagnostic-show-locus.c, converting from a struct to a class.
15554         Make data members private.
15555         (char_span::operator bool): New.
15556         (char_span::length): New.
15557         (char_span::get_buffer): New.
15558         (char_span::operator[]): New.
15559         (char_span::subspan): Make const.
15560         (char_span::xstrdup): New.
15561         (location_get_source_line): Convert return type from const char *
15562         to char_span, losing the final "line_size" param.
15564 2018-04-30  Jan Hubicka  <jh@suse.cz>
15566         * lto-wrapper.c (ltrans_priorities): New static var.
15567         (cmp_priority): New.
15568         (run_gcc): Read priorities and if doing parallel build order
15569         the Makefile by them.
15571 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15573         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
15575 2018-04-30  Richard Biener  <rguenther@suse.de>
15577         * tree-cfg.c (verify_address): Remove base argument, add
15578         flag whether to check TREE_ADDRESSABLE and do that.
15579         (verify_expr): Remove.
15580         (verify_types_in_gimple_reference): Add pieces from verify_expr.
15581         (verify_gimple_assign_single): Likewise.
15582         (verify_gimple_switch): Likewise.
15583         (verify_expr_location_1): Dereference tp once.  Add (disabled)
15584         piece from verify_expr.
15585         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
15587 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15589         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
15591 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15593         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
15594         (small_data_pattern): Likewise.
15595         (arc_rewrite_small_data): Likewise.
15596         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
15597         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
15598         (get_symbol_alignment): New function.
15599         (legitimate_small_data_address_p): Likewise.
15600         (legitimate_scaled_address): Update, call
15601         legitimate_small_data_address_p.
15602         (output_sdata): New static variable.
15603         (arc_print_operand): Update how we handle small data operands.
15604         (arc_print_operand_address): Likewise.
15605         (arc_legitimate_address_p): Update, use
15606         legitimate_small_data_address_p.
15607         (arc_rewrite_small_data_p): Remove.
15608         (arc_rewrite_small_data_1): Likewise.
15609         (arc_rewrite_small_data): Likewise.
15610         (small_data_pattern): Likewise.
15611         (compact_sda_memory_operand): Update to use
15612         legitimate_small_data_address_p and get_symbol_alignment.
15613         (prepare_move_operands): Don't rewite sdata pattern.
15614         (prepare_extend_operands): Remove.
15615         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
15616         pattern.
15617         (zero_extendqisi2): Likewise.
15618         (zero_extendhisi2): Likewise.
15619         (extendqihi2): Likewise.
15620         (extendqisi2): Likewise.
15621         (extendhisi2): Likewise.
15622         (addsi3): Likewise.
15623         (subsi3): Likewise.
15624         (andsi3): Likewise.
15625         * config/arc/constraints.md (Usd): Change it to memory constraint.
15627 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15629         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
15630         as source of std instructions.
15631         * config/arc/arc.md (movsi_insn): Update pattern predicate to
15632         allow 6-bit constants as source for store instructions.
15633         (movdi_insn): Update instruction pattern to allow 6-bit constants
15634         as source for store instructions.
15636 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
15638         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
15640 2018-04-30  Nathan Sidwell  <nathan@acm.org>
15641             Sandra Loosemore <sandra@codesourcery.com>
15643         * dumpfile.c (dump_open): Allow '-' for stdout.
15644         * doc/invoke.texi (Developer Options): Document dump filename
15645         determination early.  Document stdin/stdout selection.
15647 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
15649         Microblaze Target: PIC data text relative
15651         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
15652         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
15653         Add declaration.
15654         * config/microblaze/microblaze.h (microblaze_constant_address_p):
15655         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
15656         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
15657         New addressing mode for data-text relative position indepenedent code.
15658         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
15659         'ADDRESS_SYMBOLIC_TXT_REL'.
15660         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
15661         (microblaze_legitimate_pic_operand): Exclude function calls from
15662         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
15663         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
15664         addresses cases.
15665         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15666         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15667         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
15668         for 'address + offset'.
15669         (microblaze_expand_prologue): Add new function prologue call for
15670         'r20' assignation.
15671         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
15672         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
15673         table in case of TARGET_PIC_DATA_TEXT_REL.
15674         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
15675         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
15676         Add new macros 'UNSPEC_TEXT',
15677         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
15678         + exclude function calls from 'UNSPEC_PLT' in case of data text
15679         relative mode.
15680         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15681         new target hook for generating address diff vector tables in case of
15682         flag_pic.
15683         * doc/tm.texi : Regenerate.
15684         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
15685         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
15686         of addr diff vector generation.
15687         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15688         target hook definition.
15689         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
15690         Add default function for generate_pic_addr_diff_vec -> flag_pic.
15691         * doc/invoke.texi (Add new pic option): Add new microblaze pic
15692         option for data text relative.
15694 2018-04-30  Richard Biener  <rguenther@suse.de>
15696         * tree-chrec.h (evolution_function_is_constant_p): Remove
15697         redundant check.
15698         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
15700 2018-04-30  Richard Biener  <rguenther@suse.de>
15702         PR bootstrap/85571
15703         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
15705 2018-04-30  Richard Biener  <rguenther@suse.de>
15707         PR tree-optimization/28364
15708         PR tree-optimization/85275
15709         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
15710         copying first exit test.
15712 2018-04-28  Mark Wielaard  <mark@klomp.org>
15714         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
15715         dwarf_version >= 5.
15716         (dwarf_AT): Handle DW_AT_addr_base.
15717         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
15719 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
15721         PR target/84431
15722         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
15723         (*ashl<dwi>3_doubleword_mask_1): Ditto.
15724         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
15725         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
15727 2018-04-28  Richard Biener  <rguenther@suse.de>
15729         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
15730         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
15731         to reflect use.  Only add interesting stmts.
15733 2018-04-27  Martin Jambor  <mjambor@suse.cz>
15735         PR ipa/85549
15736         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
15737         the jump function allows for passing through aggregate values.
15739 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
15741         * input.h (in_system_header_at): Convert from macro to inline
15742         function.
15743         (from_macro_expansion_at): Likewise.
15744         (from_macro_definition_at): Likewise.
15746 2018-04-27  Jeff Law  <law@redhat.com>
15748         * config.gcc: Mark tile* targets as deprecated/obsolete.
15750 2018-04-27  Richard Biener  <rguenther@suse.de>
15752         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
15753         fix for ILP32.
15755 2018-04-27  Richard Biener  <rguenther@suse.de>
15757         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
15759 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
15761         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
15762         with Yd constraint. Set "preferred_for_speed" attribute from
15763         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
15764         with Yd constraint.
15765         (*movdi_internal): Ditto.
15766         (movti_interunit splitters): Remove
15767         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
15768         (movdi_interunit splitters): Ditto.
15769         * config/i386/constraints.md (Ye): Remove.
15770         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
15772 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15774         PR target/85512
15775         * config/aarch64/constraints.md (Usg): Limit to 31.
15776         (Usj): Limit to 63.
15778 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
15780         PR tree-optimization/85529
15781         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
15782         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
15783         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
15784         zero extension or masking of the MSB bit.
15785         (optimize_range_tests): Add FIRST_BB argument, pass it through
15786         to optimize_range_tests_var_bound.
15787         (maybe_optimize_range_tests, reassociate_bb): Adjust
15788         optimize_range_tests callers.
15790 2018-04-26  Richard Biener  <rguenther@suse.de>
15791             Jakub Jelinek  <jakub@redhat.com>
15793         * cgraph.h (symbol_table): Just declare debug method here.
15794         * symtab.c (symbol_table::debug): Define.
15796 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
15798         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
15800 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
15802         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
15803         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
15804         (*movdi_internal): Substitute Yi and Yj constraint with x
15805         and Ym and Yn constraint with y constraint.  Update "isa"
15806         attribute and set "preferred_for_speed" attribute from
15807         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
15808         (*movsi_internal): Ditto.
15809         (*movdf_internal): Ditto.
15810         (*movsf_internal): Ditto.
15811         (*zero_extendsidi2): Ditto.
15812         * config/i386/sse.md (vec_set<mode>_0): Ditto.
15813         (sse2_loadld): Ditto.
15814         (*vec_extract<ssevecmodelower>_0): Ditto.
15815         (*vec_extractv4si_0_zext_sse4): Ditto.
15816         (vec_concatv2di): Ditto.
15817         (*vec_dup<mode>): Ditto.
15818         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
15819         * config/i386/constraints.md (Yi): Remove.
15820         (Yj): Remove.
15821         (Ym): Remove.
15822         (Yn): Remove.
15824 2018-04-26  Nathan Sidwell  <nathan@acm.org>
15826         * dumpfile.c (dump_open): New.
15827         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
15828         (dump_finish): Detect stdio/stderr by value not name.
15830 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
15832         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
15834 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15836         PR target/84952
15837         * config/nvptx/nvptx.c (verify_neutering_jumps)
15838         (verify_neutering_labels): New function
15839         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
15841 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15843         PR target/84025
15844         * config/nvptx/nvptx.c (needs_neutering_p): New function.
15845         (nvptx_single): Use needs_neutering_p to skip over insns that do not
15846         need neutering.
15848 2018-04-26  Richard Biener <rguenther@suse.de>
15849             Tom de Vries  <tom@codesourcery.com>
15851         PR lto/85422
15852         * lto-streamer-out.c (output_function): Fixup loops if required to match
15853         discovery done in the reader.
15855 2018-04-26  Richard Biener  <rguenther@suse.de>
15857         PR tree-optimization/85116
15858         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
15859         have a loop exit from the single latch predecessor.  Remove
15860         case of header with just condition.
15861         (ch_base::copy_headers): Exclude infinite loops from any
15862         processing.
15863         (pass_ch::execute): Record exits.
15865 2018-04-26  Richard Biener  <rguenther@suse.de>
15867         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
15868         prologue cost vector and pass it to vect_get_load_cost.
15869         (vect_get_peeling_costs_all_drs): Likewise.
15870         (vect_peeling_hash_get_lowest_cost): Likewise.
15871         (vect_enhance_data_refs_alignment): Likewise.
15873 2018-04-26  Richard Biener  <rguenther@suse.de>
15875         PR middle-end/85450
15876         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
15877         checking of integer<->pointer conversions.
15878         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
15879         sign-/zero-extending pointer types.
15880         (expand_omp_for_static_chunk): Likewise.
15882 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
15883             Jean Lee  <xiaoyur347@gmail.com>
15885         * config/mips/mips.c (mips_asan_shadow_offset): New function.
15886         (TARGET_ASAN_SHADOW_OFFSET): Define.
15887         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
15888         true for -fsanitize=address.
15890 2018-04-25  Mark Wielaard  <mark@klomp.org>
15892         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
15893         shorter ones.
15895 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15897         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
15898         than "alu", remove explicit "memory" and "imm_disp" attributes.
15899         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
15901         PR middle-end/85414
15902         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
15903         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
15904         gen_lowpart_no_emit.
15906 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
15908         PR target/85473
15909         * config/i386/i386.c (ix86_expand_builtin): Change memory
15910         operand to XI, extend p0 to Pmode.
15911         * config/i386/i386.md: Change unspec volatile and operand
15912         1 mode to XI, change operand 0 mode to P.
15914 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15916         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
15917         GET_MODE_MASK before any checking.
15918         (nds32_can_use_bset_p): Likewise.
15919         (nds32_can_use_btgl_p): Likewise.
15921 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15923         * config/nds32/nds32-doubleword.md: New define_split pattern for
15924         illegal register number.
15926 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15928         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
15930 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15932         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
15934 2018-04-25  Richard Biener  <rguenther@suse.de>
15936         * lto-streamer.h (LTO_major_version): Bump to 8.
15938 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15940         * BASE-VER: Set to 9.0.0.
15942 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
15944         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
15945         in __abskf2 and __powikf2.
15947 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15949         PR target/85512
15950         * config/aarch64/constraints.md (Usg, Usj): New constraints.
15951         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
15952         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
15953         Use the above on operand 2.  Reindent.
15954         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
15956 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15958         PR target/85485
15959         * common/config/i386/i386-common.c (ix86_handle_option): Don't
15960         handle OPT_mcet.
15961         * config/i386/i386.opt (mcet): Removed.
15962         * doc/install.texi: Remove -mcet documentation.
15963         * doc/invoke.texi: Likewise.
15965 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15967         PR target/85485
15968         * doc/install.texi: Remove -mcet from bootstrap-cet.
15970 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15972         PR target/85511
15973         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
15974         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
15975         if TARGET_64BIT.
15977         PR target/85503
15978         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
15979         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
15980         containing a CONST_VECTOR.
15982 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
15984         * doc/install.texi: Update newlib dependency for nvptx.
15986 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15988         PR target/85508
15989         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
15990         instead of INTVAL when shifting x left.
15992 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
15994         PR tree-optimization/85478
15995         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
15996         vect_grouped_store_supported for single element vectors.
15998 2018-04-24  Richard Biener  <rguenther@suse.de>
16000         PR target/85491
16001         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16002         load cost increase to the case of non-constant step.
16004 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
16006         PR target/84828
16007         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16008         destination if any_malformed_asm.
16010 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
16012         PR middle-end/85496
16013         * expr.c (store_field): In the bitfield case, if the value comes from
16014         a function call and is returned in registers by means of a PARALLEL,
16015         do not change the mode of the temporary unless BLKmode and VOIDmode.
16017 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
16019         PR rtl-optimization/85423
16020         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16021         dependencies to debug insns when the previous insn is non-debug.
16023 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16025         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16026         enums into a single definition.
16027         (fls): Fix predicates and printing.
16028         (seti): Likewise.
16030 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
16032         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16033         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16034         and short u6 immediate.
16035         (check_if_valid_sleep_operand): Remove.
16036         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16038 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16040         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16041         flag_always_save_lp condition.
16042         * config/nds32/nds32.opt (malways-save-lp): New option.
16044 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16046         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16047         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16048         * config/nds32/nds32.h
16049         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16050         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16052 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16054         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16055         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16057 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
16058             Chung-Ju Wu  <jasonwucj@gmail.com>
16060         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16061         Declare.
16062         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16063         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16065 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16067         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16069 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16071         * config/nds32/nds32-protos.h (nds32_data_alignment,
16072         nds32_local_alignment): Declare.
16073         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16074         nds32_local_alignment): New functions.
16075         (TARGET_CONSTANT_ALIGNMENT): Define.
16076         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16078 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16080         * config/nds32/nds32.c
16081         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16082         (TARGET_MODES_TIEABLE_P): Likewise.
16084 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
16086         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16087         level Ofast and Og.
16089 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
16090             Chung-Ju Wu  <jasonwucj@gmail.com>
16092         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16093         for unaligned access.
16094         * config/nds32/nds32-intrinsic.c: Implementation of expanding
16095         unaligned access.
16096         * config/nds32/nds32-intrinsic.md: Likewise.
16097         * config/nds32/nds32_intrinsic.h: Likewise.
16098         * config/nds32/nds32.h (nds32_builtins): Likewise.
16099         * config/nds32/nds32.opt (munaligned-access): New option.
16100         * config/nds32/nds32.c (nds32_asm_file_start): Display
16101         flag_unaligned_access status.
16103 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16105         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16106         -mno-relax is present.
16107         * config/riscv/linux.h (LINK_SPEC): Ditto.
16109 2018-04-20  Martin Sebor  <msebor@redhat.com>
16111         PR c/85365
16112         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16113         for null pointers.
16114         (gimple_fold_builtin_stxcpy_chk): Same.
16115         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16117 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16119         PR target/85456
16120         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16121         __powikf2 when long double is IEEE 128-bit.
16123 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16125         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16126         step to make sure stack always aligned.
16128 2018-04-20  Carl Love  <cel@us.ibm.com>
16130         PR target/83402
16131         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16132         size check for arg0.
16134 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16135             Tom de Vries  <tom@codesourcery.com>
16137         PR target/85445
16138         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16139         Emit insns for calls too.
16140         (nvptx_find_par): Always look for worker-level predecessor insn.
16141         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
16142         calls.
16143         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16144         (nvptx_process_pars): Propagate frames for calls.
16146 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
16148         PR target/85469
16149         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16150         Removed.
16151         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16152         (ix86_handle_option): Don't handle OPT_mibt.
16153         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16154         __SHSTK__.
16155         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16156         has_ibt and ibt.
16157         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16158         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16159         (ix86_target_macros): Define __CET__ with flag_cf_protection
16160         for -fcf-protection.
16161         * config/i386/i386.c (isa2_opts): Remove -mibt.
16162         * config/i386/i386.h (TARGET_IBT): Removed.
16163         (TARGET_IBT_P): Likewise.
16164         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16165         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16166         * config/i386/i386.opt (mcet): Update help message.
16167         (mshstk): Likewise.
16168         (mibt): Removed.
16169         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
16170         -mcet as an alias for -mshstk.
16172 2018-04-20  Richard Biener <rguenther@suse.de>
16174         PR middle-end/85475
16175         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16176         complexity by forcing a single use of the multiply operand.
16178 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16180         ipa/85449
16181         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16182         recursion dependency to only apply to non-clones.
16184 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16186         ipa/85447
16187         * ipa-cp.c (create_specialized_node): Check that clones of
16188         self-recursive edges exist during IPA-CP.
16190 2018-04-19  Toon Moene  <toon@moene.org>
16192         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16193         by -O3.
16195 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16197         PR tree-optimization/85467
16198         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16199         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
16200         VECTOR_CST element to type.
16202 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16204         PR target/85397
16205         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16206         * config/i386/i386.md (builtin_setjmp_setup): Removed.
16207         (builtin_longjmp): Likewise.
16208         (save_stack_nonlocal): New pattern.
16209         (restore_stack_nonlocal): Likewise.
16211 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16213         PR target/85404
16214         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16215         Replace ASM_OUTPUT_LABEL with fprintf.
16217 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16219         PR target/85417
16220         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16221         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16222         * config/i386/i386-c.c (ix86_target_macros_internal): Also
16223         define __IBT__ and __SHSTK__ for -fcf-protection.
16224         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16225         TARGET_IBT.
16226         (ix86_trampoline_init): Likewise.
16227         (x86_output_mi_thunk): Likewise.
16228         (ix86_notrack_prefixed_insn_p): Likewise.
16229         (ix86_option_override_internal): Don't disallow -fcf-protection.
16230         * config/i386/i386.md (rdssp<mode>): Also enable for
16231         -fcf-protection.
16232         (incssp<mode>): Likewise.
16233         (nop_endbr): Likewise.
16234         * config/i386/i386.opt (mcet): Change help message to built-in
16235         functions only.
16236         (mibt): Likewise.
16237         (mshstk): Likewise.
16238         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16239         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
16240         enable CET built-in functions.
16242 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
16244         * common/config/i386/i386-common.c
16245         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16246         OPTION_MASK_ISA_MOVDIRI_UNSET,
16247         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16248         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16249         * config.gcc (movdirintrin.h): New header.
16250         * config/i386/cpuid.h (bit_MOVDIRI,
16251         bit_MOVDIR64B): New bits.
16252         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16253         and -mmvodir64b.
16254         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16255         (VOID, PVOID, PCVOID)): New function types.
16256         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16257         __builtin_ia32_directstoreu_u64,
16258         __builtin_ia32_movdir64b): New builtins.
16259         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16260         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16261         and -mmovdiri.
16262         (ix86_valid_target_attribute_inner_p): Ditto.
16263         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16264         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16265         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16266         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16267         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16268         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16269         (movdiri<mode>, movdir64b_<mode>): New.
16270         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16271         * config/i386/immintrin.h: Include movdirintrin.h.
16272         * config/i386/movdirintrin.h: New file.
16273         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16275 2018-04-19  Richard Biener  <rguenther@suse.de>
16277         PR middle-end/85455
16278         * cfg.c (clear_bb_flags): When loop state says we have
16279         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16281 2018-04-19  Richard Biener  <rguenther@suse.de>
16283         PR tree-optimization/84737
16284         * tree-vect-data-refs.c (vect_copy_ref_info): New function
16285         copying restrict info.
16286         (vect_setup_realignment): Use it.
16287         * tree-vectorizer.h (vect_copy_ref_info): Declare.
16288         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16289         the first DR to all generated stores.
16290         (vectorizable_load): Likewise for loads.
16292 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16294         PR tree-optimization/85446
16295         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16296         the integral and pointer types to have the same precision.
16298         * doc/install.texi: Document --disable-cet being the default and
16299         --enable-cet=auto.
16301 2018-04-18  Martin Liska  <mliska@suse.cz>
16303         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16304         style.
16306 2018-04-18  Martin Liska  <mliska@suse.cz>
16308         Revert
16309         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16311         PR ipa/83983
16312         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16313         arguments if they are comparable.
16315 2018-04-18  Martin Liska  <mliska@suse.cz>
16317         Revert
16318         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16320         PR lto/84805
16321         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16322         incomplete types.
16324 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
16326         PR target/85388
16327         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16328         ENDBR after calling __morestack.
16330 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
16332         PR jit/85384
16333         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16334         by using gcc_base_ver to generate a gcc_driver_version, and use
16335         it when generating GCC_DRIVER_NAME.
16336         * configure: Regenerate.
16338 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
16340         PR target/81084
16341         * config.gcc: Obsolete powerpc*-*-*spe*.
16343 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16345         PR debug/84637
16346         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
16347         (stabstr_D): Change type of unum from unsigned int to
16348         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
16349         type.
16351 2018-04-17  Jim Wilson  <jimw@sifive.com>
16353         PR 84856
16354         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
16355         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
16356         Set arg_pointer_offset after using pretend_args_size.
16358 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16360         PR rtl-optimization/85431
16361         * dse.c (record_store): Ignore zero width stores.
16363         PR sanitizer/85230
16364         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
16365         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
16366         __builtin_stack_restore rather than after it.
16367         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
16368         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
16369         argument instead of virtual_dynamic_stack_rtx.
16371 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16373         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
16374         New prototype.
16375         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16376         Add note to error message to explain internal mapping of overloaded
16377         built-in function name to non-overloaded built-in function name.
16378         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
16379         function.
16381 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16383         PR target/85424
16384         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
16385         where the inputs overlap with the output.
16387 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16389         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
16390         (=v, v) alternative and explicit "memory" attribute.
16391         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
16392         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16393         attributes.
16394         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
16395         "sselog1" type instead of "sselog".
16396         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
16397         "sselog".  Remove explicit "memory" attribute.
16398         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
16399         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16400         attributes.
16401         (vec_extract_hi_v32hi): Merge all alternatives into one, use
16402         "sselog1" type instead of "sselog".  Remove explicit "memory"
16403         attribute.
16404         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
16405         use "sselog1" type instead of "sselog".  Remove explicit "memory"
16406         attribute.
16407         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
16408         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16409         attributes.
16410         (vec_extract_hi_v64qi): Merge all alternatives into one, use
16411         "sselog1" type instead of "sselog".  Remove explicit "memory"
16412         attribute.
16413         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
16414         use "sselog1" type instead of "sselog".  Remove explicit "memory"
16415         attribute.
16417         PR target/85430
16418         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
16420         PR middle-end/85414
16421         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
16422         on a SUBREG.
16424 2018-04-17  Martin Jambor  <mjambor@suse.cz>
16426         PR ipa/85421
16427         * ipa-cp.c (create_specialized_node): Call
16428         expand_all_artificial_thunks if necessary.
16430 2018-04-17  Martin Liska  <mliska@suse.cz>
16432         PR lto/85405
16433         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
16434         in message, remote space in between '_G' and '('.
16436 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16438         PR target/85281
16439         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
16440         avx512f_vmcmp<mode>3<round_saeonly_name>,
16441         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
16442         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
16443         avx512f_rndscale<mode><round_saeonly_name>,
16444         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
16445         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
16446         Use %<iptr>2 instead of %2 for -masm=intel.
16447         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
16448         avx512f_vcvttss2usi<round_saeonly_name>,
16449         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
16450         -masm=intel.
16451         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
16452         avx512f_vcvttsd2usi<round_saeonly_name>,
16453         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
16454         Use %q1 instead of %1 for -masm=intel.
16455         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
16456         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
16457         of %3 for -masm=intel.
16458         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
16459         -masm=intel.
16460         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
16461         -masm=intel.
16462         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
16463         -masm=intel.
16464         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
16465         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
16466         %g1.
16467         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
16468         -masm=intel.
16469         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
16470         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
16471         %g1 and one with %0 and %1.
16472         (avx512er_vmrcp28<mode><round_saeonly_name>,
16473         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
16474         %1 for -masm=intel.
16475         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
16476         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
16477         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
16478         of %0 and %{%4%} for -masm=intel.
16479         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
16480         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
16481         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
16482         order of %0 and %{%5%}%{z%} for -masm=intel.
16484 2018-04-17  Jan Hubicka  <jh@suse.cz>
16486         PR lto/85405
16487         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
16489 2018-04-17  Martin Liska  <mliska@suse.cz>
16491         PR ipa/85329
16492         * multiple_target.c (create_dispatcher_calls): Set apostrophes
16493         for target_clone error message.  Make default implementation
16494         clone to be a local declaration.
16495         (separate_attrs): Add new argument and check for an empty
16496         string.
16497         (expand_target_clones): Handle it.
16498         (ipa_target_clone): Make redirection just for target_clones
16499         functions.
16501 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
16502             Tom de Vries  <tom@codesourcery.com>
16504         PR middle-end/84955
16505         * omp-expand.c (expand_oacc_for): Add dummy false branch for
16506         tiled basic blocks without omp continue statements.
16508 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
16510         PR target/83660
16511         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
16512         vec_extract expression as having side effects to make sure it gets
16513         a cleanup point.
16515 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
16517         PR target/85403
16518         * config/i386/i386.c (get_builtin_code_for_version): Check
16519         error_mark_node.
16521 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
16523         PR target/84331
16524         * config.gcc: Support "skylake".
16525         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16526         PROCESSOR_SKYLAKE.
16527         * config/i386/i386.c (m_SKYLAKE): Define.
16528         (processor_target_table): Add "skylake".
16529         (ix86_option_override_internal): Add "skylake".
16530         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
16531         PROCESSOR_CANNONLAKE.
16532         (get_builtin_code_for_version): Fix priority for
16533         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
16534         PROCESSOR_SKYLAKE-AVX512.
16535         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
16536         (processor_type): Add PROCESSOR_SKYLAKE.
16538 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
16539             Jason Merrill  <jason@redhat.com>
16541         PR c++/85112
16542         * convert.c (convert_to_integer_1): Use direct recursion for
16543         enumeral types and types with a precision less than the number
16544         of bits in their mode.
16546 2018-04-16  Julia Koval  <julia.koval@intel.com>
16548         PR target/84413
16549         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
16550         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
16552 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
16554         PR target/85293
16555         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
16556         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
16557         and -mno-direct-move.
16559 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
16561         PR target/83402
16562         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
16563         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
16564         Ensure negative shifts result in {0}.
16566 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
16568         PR rtl-optimization/79916
16569         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
16570         regs (if any) to define how to gnerate SD moves when LRA is in
16571         progress.
16573 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
16575         PR rtl-optimization/85393
16576         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
16577         * except.c (expand_dw2_landing_pad_for_region): Make static.
16578         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
16579         a label and unconditional jump to old_bb, rather than
16580         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
16581         basic block.
16583         PR rtl-optimization/85376
16584         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
16585         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
16586         instead of a specific value.
16588 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
16589             Bin Cheng  <bin.cheng@arm.com>
16591         PR tree-optimization/82965
16592         PR tree-optimization/83991
16593         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
16594         by_profile_only parameter.
16595         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
16596         information if the loop was predicted to iterate too many times.
16597         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
16599 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
16601         PR lto/71991
16602         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
16603         always inline.
16605 2018-04-13  Martin Liska  <mliska@suse.cz>
16606             Jakub Jelinek  <jakub@redhat.com>
16608         PR middle-end/81657
16609         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
16610         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
16611         * builtins.c (expand_builtin_memory_copy_args): Use
16612         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
16613         handle dest_addr == pc_rtx.
16615 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
16617         PR target/85291
16618         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
16619         asked to not generate direct moves.
16620         (fix_trunc<mode>si2_stfiwx): Similar.
16621         (fix_trunc<mode>si2_internal): Similar.
16623 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16625         PR debug/83157
16626         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
16627         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
16628         lookup if dest in some wider mode is known to be const0_rtx and
16629         if so, record permanent equivalence for it to be ZERO_EXTEND of
16630         the narrower mode destination.
16632 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
16634         * lto-streamer-out.c (output_function): Revert 259346.
16635         * omp-expand.c (expand_oacc_for): Likewise.
16637 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
16639         PR rtl-optimization/85354
16640         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
16641         * sel-sched.c (sel_global_init): ... here.
16643 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
16645         PR target/85238
16646         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
16647         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
16648         mode for PE-COFF targets.
16649         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
16650         (i386_pe_asm_lto_end): Likewise.
16651         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
16652         (TARGET_ASM_LTO_END): Likewise.
16653         * config/i386/winnt.c (saved_debug_info_level): New static variable.
16654         (i386_pe_asm_lto_start): New function.
16655         (i386_pe_asm_lto_end): Likewise.
16657 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
16658             Richard Biener  <rguenther@suse.de>
16660         PR middle-end/84955
16661         * lto-streamer-out.c (output_function): Fix CFG loop state before
16662         streaming out.
16663         * omp-expand.c (expand_oacc_for): Handle calls to internal
16664         functions like regular functions.
16666 2018-04-12  Richard Biener  <rguenther@suse.de>
16668         PR lto/85371
16669         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
16670         for the early LTO debug to properly generate references to it
16671         during DIE emission.  Do not re-use that for the skeleton for
16672         split-dwarf.
16673         (dwarf2out_early_finish): Likewise.
16675 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16677         PR target/85328
16678         * config/i386/sse.md
16679         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
16680         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
16681         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
16682         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
16683         and output is a reg, avoid creating invalid lowpart subreg, but
16684         instead split into a 512-bit move.  Don't split if not AVX512VL,
16685         input is xmm16+ reg and output is a mem.
16686         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
16687         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
16688         xmm16+ reg and output is a mem.
16690 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16692         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
16693         also for flag_dwarf2_cfi_asm.
16695 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16697         PR rtl-optimization/85342
16698         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
16699         a bool scalar var inside of the loop instead.  Don't try to update
16700         recog_data.operand after failed apply_change_group.
16702 2018-04-12  Tom de Vries  <tom@codesourcery.com>
16704         PR target/85296
16705         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
16706         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
16707         array with flexible array member as array without given dimension.
16708         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
16709         argument for undefined param to true.
16711 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
16713         PR target/85321
16714         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16715         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
16716         from PowerPC section.
16717         * config/rs6000/sysv4.opt (mcall-): Improve help text.
16718         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
16719         help text that is too long.
16720         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
16721         help text that is too long.
16722         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
16723         help text that is too long.
16725 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
16727         * config/alpha/alpha.md (stack_probe_internal): Rename
16728         from "probe_stack".  Update all callers.
16730 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16732         PR rtl-optimization/84566
16733         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
16734         sched_macro_fuse_insns.
16736 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16738         PR target/84301
16739         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
16740         (compute_block_dependences): ... from here.
16742 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16744         PR tree-optimization/85331
16745         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
16746         from int to HOST_WIDE_INT.
16748 2018-04-11  Martin Jambor  <mjambor@suse.cz>
16750         PR ipa/84149
16751         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
16752         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
16753         not the same as the source val.
16754         (cgraph_edge_brings_value_p): New parameter.
16755         (gather_edges_for_value): Pass destination value to
16756         cgraph_edge_brings_value_p.
16757         (perhaps_add_new_callers): Likewise.
16758         (get_info_about_necessary_edges): Likewise and exclude values brought
16759         only by self-recursive edges.
16760         (create_specialized_node): Redirect only clones of self-calling edges.
16761         (+self_recursive_pass_through_p): New function.
16762         (find_more_scalar_values_for_callers_subset): Use it.
16763         (find_aggregate_values_for_callers_subset): Likewise.
16764         (known_aggs_to_agg_replacement_list): Removed.
16765         (decide_whether_version_node): Re-calculate known constants for all
16766         remaining context clones.
16768 2018-04-11  Richard Biener  <rguenther@suse.de>
16770         PR lto/85339
16771         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
16772         from early DWARF output.
16773         (dwarf2out_early_finish): Output line info unconditionally into
16774         early DWARF and add reference to it.
16776 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16778         PR target/85281
16779         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
16780         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
16781         other than V2DFmode using iptr mode attribute.
16782         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
16784 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16786         PR rtl-optimization/84659
16787         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
16789 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16791         PR debug/85302
16792         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
16793         SIZEP is NULL.
16794         (output_loc_list): Pass address of a dummy size variable even in the
16795         locview handling loop.
16796         (index_location_lists): Add comment on why skip_loc_list_entry can't
16797         call size_of_locs.
16799 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16801         PR target/85261
16802         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
16803         into register.
16805 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
16807         PR target/85321
16808         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16809         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
16810         and -mstring-compare-inline-limit.
16812 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16814         PR target/85287
16815         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
16816         for stack clash protection in a register whenever we need it to be in
16817         a register.
16819 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16821         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
16822         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
16824 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16826         PR target/85321
16827         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
16828         the help text.
16829         (mlong-double-): Ditto.
16830         * config/rs6000/sysv4.opt (msdata=): Ditto.
16831         (mtls-size=): Ditto.
16833 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16835         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16836         erroneous entries for
16837         "vector int vec_ldl (int, long int *)", and
16838         "vector unsigned int vec_ldl (int, unsigned long int *)".
16839         Add comments and entries for
16840         "vector bool char vec_ldl (int, bool char *)",
16841         "vector bool short vec_ldl (int, bool short *)",
16842         "vector bool int vec_ldl (int, bool int *)",
16843         "vector bool long long vec_ldl (int, bool long long *)",
16844         "vector pixel vec_ldl (int, pixel *)",
16845         "vector long long vec_ldl (int, long long *)",
16846         "vector unsigned long long vec_ldl (int, unsigned long long *)".
16847         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
16848         type tree bool_long_long_type_node and correct definition of
16849         bool_V2DI_type_node to make reference to this new type tree.
16850         (rs6000_mangle_type): Replace erroneous reference to
16851         bool_long_type_node with bool_long_long_type_node.
16852         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
16853         comments to emphasize sign distinctions for char and int types and
16854         replace RS6000_BTI_bool_long constant with
16855         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
16856         use of RS6000_BTI_pixel.
16857         (bool_long_type_node): Remove this macro definition.
16858         (bool_long_long_type_node): New macro definition
16860 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16862         PR rtl-optimization/85300
16863         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
16864         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
16865         simplify_unary_operation fails.
16867 2018-04-10  Martin Liska  <mliska@suse.cz>
16869         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
16870         cgraph_edge and ipa_ref.
16872 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16874         PR target/85177
16875         PR target/85255
16876         * config/i386/sse.md
16877         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
16878         computation of the VEC_MERGE selector from mask.
16879         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
16880         Fix decoding of the VEC_MERGE selector into mask.
16882 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16884         PR tree-optimization/85286
16885         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
16887 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16889         * final.c (final_1): Set insn_last_address as well as
16890         insn_current_address.
16892 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16894         PR target/85173
16895         * explow.c (emit_stack_probe): Call validize_mem on memory location
16896         before passing it to gen_probe_stack.  Create address operand and
16897         legitimize it for the probe_stack_address case.
16899 2018-04-09  Jan Hubicka  <jh@suse.cz>
16901         PR lto/85078
16902         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
16903         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
16904         * tree.c (free_lang_data_in_type): Fix handling of binfos;
16905         walk basetypes.
16906         (free_lang_data): Rebuild type inheritance graph.
16908 2018-04-09  Martin Sebor  <msebor@redhat.com>
16910         * invoke.texi (-finline-small-functions): Mention other optimization
16911         options.
16912         (-findirect-inlining, -fpartial-inlining): Same.
16913         (-finline-functions-called-once): Same.
16914         (-freorder-blocks-and-partition): Same.
16916 2018-04-09  Jan Hubicka  <jh@suse.cz>
16918         PR rtl/84058
16919         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
16920         jumps; choose last target that matches the criteria (i.e.
16921         no partition changes for non-crossing jumps).
16922         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
16923         support for redirecting crossing jumps to non-crossing.
16925 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
16927         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
16928         also for naked functions.
16930 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
16932         * config/arc/arc.md (add_shift): New pattern.
16933         (add_shift2): Likewise.
16934         (sub_shift): Likewise.
16935         (sub_shift_cmp0_noout): Likewise.
16936         (compare_si_ashiftsi): Likewise.
16937         (xbfu_cmp0_noout): New combine pattern.
16938         (xbfu_cmp0"): Likewise.
16939         (movsi_set_cc_insn): Place the predicable variant first.
16940         (commutative_binary_cmp0_noout): Remove clobber.
16941         (commutative_binary_cmp0): New pattern.
16942         (noncommutative_binary_cmp0): Likewise.
16943         (noncommutative_binary_cmp0_noout): Likewise.
16944         (noncommutative_binary_comparison_result_used): Removed.
16945         (rsub_cmp0): New pattern.
16946         (rsub_cmp0_noout): Likewise.
16947         (extzvsi): Changed, keep only meaningful variants.
16948         (SQH, SEZ): New iterators.
16949         (SQH_postfix): New mode attribute.
16950         (SEZ_prefix): New code attribute.
16951         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
16952         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
16953         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
16954         of numerical value.
16955         (noncommutative_operator): Check the availability of barrel
16956         shifter option.
16958 2018-04-09  Richard Biener  <rguenther@suse.de>
16960         PR tree-optimization/85284
16961         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
16962         Only use the niter constraining form of simple_iv when the exit
16963         is always executed.
16965 2018-04-09  Tom de Vries  <tom@codesourcery.com>
16967         PR target/84041
16968         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16969         (define_expand "*memory_barrier"): New define_expand.
16970         (define_insn "memory_barrier"): New insn.
16972 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16974         PR rtl-optimization/80463
16975         PR rtl-optimization/83972
16976         PR rtl-optimization/83480
16978         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
16979         correct producer for the insn.
16980         (tidy_control_flow): Fixup seqnos in case of debug insns.
16982 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16984         PR rtl-optimization/83913
16986         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
16987         different sched-times when merging exprs.
16989 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16991         PR rtl-optimization/83962
16993         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
16994         tidy_fallthru_edge and tidy_control_flow.
16996 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16998         PR rtl-optimization/83530
17000         * sel-sched.c (force_next_insn): New global variable.
17001         (remove_insn_for_debug): When force_next_insn is true, also leave only
17002         next insn in the ready list.
17003         (sel_sched_region): When the region wasn't scheduled, make another pass
17004         over it with force_next_insn set to 1.
17006 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17008         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17009         into tm_file.
17010         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17011         for interrupt control.
17012         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17013         functions for interrupt control.
17014         * config/nds32/nds32-intrinsic.md: Likewise.
17015         * config/nds32/nds32_intrinsic.h: Likewise.
17016         * config/nds32/nds32.h (nds32_builtins): Likewise.
17018 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17020         * config/nds32/nds32.c (nds32_init_machine_status,
17021         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17022         strict_aligned_p field.
17023         (nds32_expand_to_rtl_hook): New function.
17024         (TARGET_EXPAND_TO_RTL_HOOK): Define.
17025         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17027 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17028             Chung-Ju Wu  <jasonwucj@gmail.com>
17030         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17031         * config/nds32/nds32-n7.md: New file.
17032         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17033         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17034         pipeline.
17035         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17036         * config/nds32/nds32.md (pipeline_model): Add n7.
17037         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17038         * config/nds32/pipelines.md: Include n7 settings.
17040 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17041             Chung-Ju Wu  <jasonwucj@gmail.com>
17043         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17044         * config/nds32/nds32-e8.md: New file.
17045         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17046         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17047         pipeline.
17048         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17049         * config/nds32/nds32.md (pipeline_model): Add e8.
17050         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17051         * config/nds32/pipelines.md: Include e8 settings.
17053 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17054             Chung-Ju Wu  <jasonwucj@gmail.com>
17056         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17057         * config/nds32/nds32-n8.md: New file.
17058         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17059         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17060         pipeline.
17061         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17062         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17063         * config/nds32/nds32.md (pipeline_model): Add n8.
17064         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17065         * config/nds32/pipelines.md: Include n8 settings.
17067 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
17068             Chung-Ju Wu  <jasonwucj@gmail.com>
17070         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17071         * config/nds32/nds32-n9-2r1w.md: New file.
17072         * config/nds32/nds32-n9-3r2w.md: New file.
17073         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17074         nds32_register_ports): New or modify for cpu n9.
17075         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17076         pipeline.
17077         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17078         * config/nds32/nds32-utils.c: New file.
17079         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17080         TARGET_MUL_SLOW): Define.
17081         * config/nds32/nds32.md (pipeline_model): New attribute.
17082         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17083         New options that support cpu n9.
17084         * config/nds32/pipelines.md: Include n9 settings.
17085         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17087 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
17089         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17090         information if necessary.
17091         (output_cond_branch_compare_zero): Likewise.
17092         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17093         (nds32_target_alignment): Refine for alignment.
17094         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17095         (FUNCTION_BOUNDARY): Modify.
17096         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17097         align case.
17098         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17100 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17102         * config/nds32/constants.md (unspec_volatile_element): Add values for
17103         TLB operation and data prefetch.
17104         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17105         functions for TLB operation and data prefetch.
17106         * config/nds32/nds32-intrinsic.md: Likewise.
17107         * config/nds32/nds32_intrinsic.h: Likewise.
17108         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17109         (nds32_print_operand): Likewise.
17110         * config/nds32/nds32.h (nds32_builtins): Likewise.
17112 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17113         Andrew Pinski <pinsika@gcc.gnu.org>
17115         PR middle-end/82976
17116         * match.pd: Use constant_boolean_node of correct type instead of
17117         boolean_true_node or boolean_false_node for simplifying
17118         pointer comparisons to zero.
17120 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17122         PR tree-optimization/80021
17123         * tree.c (verify_type_variant): Make error call in verify_variant_match
17124         translatable and remove final full stop.
17126 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17128         * config/nds32/constants.md (unspec_volatile_element): Add
17129         UNSPEC_VOLATILE_EH_RETURN.
17130         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17131         nds32_output_stack_pop): Support dwarf exception handling process.
17132         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17133         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17134         exception handling process.
17135         (nds32_compute_stack_frame): Likewise.
17136         (nds32_return_addr_rtx): Likewise.
17137         (nds32_initial_elimination_offset): Likewise.
17138         (nds32_expand_prologue): Likewise.
17139         (nds32_expand_epilogue): Likewise.
17140         (nds32_dynamic_chain_address): New function.
17141         * config/nds32/nds32.h (machine_function): Add fields for dwarf
17142         exception handling.
17143         (DYNAMIC_CHAIN_ADDRESS): Define.
17144         (EH_RETURN_DATA_REGNO): Define.
17145         (EH_RETURN_STACKADJ_RTX): Define.
17146         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17147         patterns for dwarf exception handling.
17149 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17151         * config/nds32/nds32.h: Clean up obsolete macros.
17153 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17155         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17156         Add enum values for particular instructions.
17157         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17158         particular intrinsic functions.
17159         * config/nds32/nds32-intrinsic.md: Likewise.
17160         * config/nds32/nds32_intrinsic.h: Likewise.
17161         * config/nds32/nds32.h (nds32_builtins): Likewise.
17162         * config/nds32/nds32.md (type): Add pbsad and pbsada.
17163         (btst, ave): New patterns for particular instructions.
17165 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17167         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17168         Add enum values for atomic load/store and memory sync.
17169         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17170         and memory sync.
17171         * config/nds32/nds32-intrinsic.md: Likewise.
17172         * config/nds32/nds32_intrinsic.h: Likewise.
17173         * config/nds32/nds32.h (nds32_builtins): Likewise.
17175 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17177         PR tree-optimization/85257
17178         * fold-const.c (native_encode_vector): If not all elts could fit
17179         and off is -1, return 0 rather than offset.
17180         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17181         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17182         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
17183         adjust buffer in native_interpret_expr call.
17185 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17187         * config/nds32/constants.md (unspec_volatile_element): Add cache
17188         control enum values.
17189         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17190         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17191         * config/nds32/nds32.c (nds32_cctl_names): New.
17192         (nds32_print_operand): Handle cache control register names.
17193         * config/nds32/nds32.h (nds32_builtins): New enum values.
17194         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17195         macros.
17196         * config/nds32/nds32.md (type): Add mmu.
17197         * config/nds32/pipelines.md (simple_insn): Add mmu.
17199 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17201         * config/nds32/nds32.md (type): Remove call.
17202         * config/nds32/pipelines.md (simple_insn): Likewise.
17204 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17206         * config/nds32/constants.md (unspec_volatile_element): Add
17207         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17208         UNSPEC_VOLATILE_FMFCFG.
17209         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17210         description for fmfcfg and fmfcsr.
17211         (bdesc_1arg): Add fmtcsr.
17212         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17213         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17214         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17215         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17216         unspec_fmfcfg): New patterns.
17217         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17218         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17219         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17220         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17221         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17222         __nds32__fmfcfg): Define.
17224 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17226         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17227         intrinsic register names.
17228         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17229         intrinsic register enum values and macros.
17231 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17233         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17234         for load/store addressing form.
17235         (nds32_print_operand_address): Likewise.
17237 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
17239         PR target/85196
17240         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17241         based on LABEL_REF.  Remove useless assertion.
17242         (pic_address_needs_scratch): Fix formatting.
17243         (sparc_legitimize_pic_address): Minor tweaks.
17244         (sparc_delegitimize_address): Adjust assertion accordingly.
17245         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17246         into symbolic_operand.
17247         (movsi_high_pic_label_ref): Likewise.
17248         (movsi_lo_sum_pic_label_ref): Likewise.
17249         (movdi_pic_label_ref): Likewise.
17250         (movdi_high_pic_label_ref): Likewise.
17251         (movdi_lo_sum_pic_label_ref): Likewise.
17253 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
17255         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17256         custom LIB_SPEC setup.
17258 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
17259             Kito Cheng  <kito.cheng@gmail.com>
17261         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17262         * config/riscv/freebsd.h: New.
17264 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17266         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17267         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17268         file.
17270 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17271             Kito Cheng  <kito.cheng@gmail.com>
17273         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17274         nds32_output_call, nds32_symbol_binds_local_p): New functions.
17275         * config/nds32/nds32-protos.h (nds32_output_call,
17276         nds32_output_return): Declare.
17277         * config/nds32/nds32.md: Refine all the call and return patterns.
17279 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17281         PR debug/85252
17282         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17283         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17285         PR rtl-optimization/84872
17286         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17287         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17288         EDGE_CROSSING edge.
17290 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
17292         * expr.c (copy_blkmode_to_reg): Revert 254862.
17293         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17295 2018-04-06  Richard Biener  <rguenther@suse.de>
17297         PR middle-end/85244
17298         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17299         after seeing a component reference with an adjacent field.  Treat
17300         refs to arrays at struct end of external decls similar to
17301         refs to unconstrained commons.
17303 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17305         PR sanitizer/85213
17306         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17307         look through SAVE_EXPRs with non-side-effects argument.  Adjust
17308         recursive calls.
17309         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17310         save_p here.
17312 2018-04-06  Richard Biener  <rguenther@suse.de>
17314         PR middle-end/85180
17315         * alias.c (find_base_term): New wrapper around find_base_term
17316         unwinding CSELIB_VAL_PTR changes.
17317         (find_base_term): Do not restore CSELIB_VAL_PTR during the
17318         recursion.
17320 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17322         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17323         instructions.
17324         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17325         constant definitions.
17326         ("nop"): lr 0,0 -> nopr r0
17327         ("nop_lr0", "nop_lr1"): New insn definitions.
17329 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17331         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17332         NDS32_V3PUSH_AVAILABLE_P macro.
17334 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
17335             Chung-Ju Wu  <jasonwucj@gmail.com>
17337         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17338         (nds32*-*-*): Add float and fpu_config into supported_defaults.
17339         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17340         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17341         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17342         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
17343         * config/nds32/constraints.md: New constraints and checking for hard
17344         float configuration.
17345         * config/nds32/iterators.md: New mode iterator and attribute for hard
17346         float configuration.
17347         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
17348         patterns.
17349         * config/nds32/nds32-fpu.md: New file.
17350         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
17351         deal with hard float code generation.
17352         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
17353         ARCH_V3S.
17354         (abi_type, float_reg_number): New enum type.
17355         * config/nds32/nds32-predicates.c: New predicates for hard float.
17356         * config/nds32/nds32-protos.h: Declare functions for hard float.
17357         * config/nds32/nds32.c: Implementation for hard float configuration.
17358         * config/nds32/nds32.h: Definitions for hard float configuration.
17359         * config/nds32/nds32.md: Include hard float machine description and
17360         modify patterns for hard float configuration.
17361         * config/nds32/nds32.opt: New options for hard float configuration.
17362         * config/nds32/predicates.md: New predicates for hard float
17363         configuration.
17365 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
17367         * common/config/nds32/nds32-common.c
17368         (nds32_option_optimization_table): Enable -mreleax-hint by default.
17370 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
17372         PR middle-end/85195
17373         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
17374         CONSTRUCTOR_ELT (ctor, ...)->value.
17376 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
17378         PR target/85193
17379         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
17381 2018-04-05  Tom de Vries  <tom@codesourcery.com>
17383         PR target/85204
17384         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
17385         cond jump.
17387 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
17388             Kito Cheng  <kito.cheng@gmail.com>
17390         * config/nds32/constraints.md (U33): Fine-tune checking condition.
17391         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
17392         * config/nds32/nds32.h (nds32_16bit_address_type): Add
17393         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
17395 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
17396             Kito Cheng  <kito.cheng@gmail.com>
17398         * config/nds32/constraints.md (Ufe): New memory constraint.
17399         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
17400         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
17401         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
17402         operands.
17403         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
17404         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
17406 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17408         * config/nds32/nds32.md: Use optimize_size in the condition for
17409         alu-shift instructions.
17411 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17413         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
17415 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17417         * config/nds32/nds32.md (negsi2): Refine pattern.
17419 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
17420             Chung-Ju Wu  <jasonwucj@gmail.com>
17422         * config/nds32/iterators.md (shift_rotate): New code iterator.
17423         (shift): New code attribute.
17424         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
17425         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
17426         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
17427         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
17428         bit-wise operations.
17429         (andsi3, *andsi3): Ditto.
17430         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
17431         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
17432         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
17433         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
17434         nds32_ior_operand, nds32_xor_operand): New predicates.
17436 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17438         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
17439         (addsi3, subsi3): ... this.
17441 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17443         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
17445 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17447         * config/nds32/nds32.md: Adjust indention.
17449 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
17451         * config/nds32/nds32.md (feature): New attribute.
17453 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17455         * config/nds32/nds32.md (subtype): New attribute.
17457 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17459         PR target/85203
17460         * config/arm/arm-builtins.c (arm_expand_builtin): Change
17461         expansion to perform a bitwise AND of the argument followed by a
17462         boolean negation of the result.
17464 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
17466         PR rtl-optimization/84878
17467         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
17468         the basic block.  Assert the use reference is not artificial and that
17469         it has an associated insn.
17471 2018-04-04  Michael Matz  <matz@suse.de>
17473         * builtins.c (compute_objsize): Pass correct operand
17474         to array_at_struct_end_p.
17476 2018-04-04  Richard Biener  <rguenther@suse.de>
17478         PR lto/85176
17479         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
17480         from contexts for DINFO_LEVEL_TERSE and below.
17482 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17484         * config/nds32/nds32-doubleword.md (move_<mode>): Require
17485         resiter_operand condition.
17486         * config/nds32/nds32.md (*move<mode>): Ditto.
17488 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17489             Monk Chiang  <sh.chiang04@gmail.com>
17491         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
17493 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17495         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
17497 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17498             Kito Cheng  <kito.cheng@gmail.com>
17500         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
17501         nds32_cond_code_str, output_cond_branch,
17502         output_cond_branch_compare_zero, nds32_expand_cbranch,
17503         nds32_expand_cstore, nds32_expand_movcc,
17504         nds32_output_cbranchsi4_equality_zero,
17505         nds32_output_cbranchsi4_equality_reg,
17506         nds32_output_cbranchsi4_equality_reg_or_const_int,
17507         nds32_output_cbranchsi4_greater_less_zero: New functions.
17508         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
17509         nds32_expand_cstore, nds32_expand_movcc,
17510         nds32_output_cbranchsi4_equality_zero,
17511         nds32_output_cbranchsi4_equality_reg,
17512         nds32_output_cbranchsi4_equality_reg_or_const_int,
17513         nds32_output_cbranchsi4_greater_less_zero): Declare.
17514         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
17515         nds32_rimm11s_operand): New predicates.
17516         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
17517         * config/nds32/nds32.md: Rewrite all the branch and conditional move
17518         patterns.
17520 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17522         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
17523         * config/nds32/nds32.md: Ditto.
17524         * config/nds32/pipelines.md: Ditto.
17526 2018-04-04  Richard Biener  <rguenther@suse.de>
17528         PR tree-optimization/85168
17529         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
17530         propagating abnormals.
17532 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17534         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
17536 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17537             Kito Cheng  <kito.cheng@gmail.com>
17539         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
17540         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
17541         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
17542         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
17543         * config/nds32/nds32.md (sibcall_internal): New.
17544         (sibcall_register): Remove.
17545         (sibcall_immediate): Remove.
17546         (sibcall_value_internal): New.
17547         (sibcall_value_register): Remove.
17548         (sibcall_value_immediate): Remove.
17549         * config/nds32/predicates.md (nds32_general_register_operand): New.
17550         (nds32_call_address_operand): New.
17552 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
17554         PR rtl-optimization/85167
17555         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
17556         bb_defs if *split_p, instead preinitialize it to NULL.
17558         PR tree-optimization/85156
17559         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
17560         evaluating the argument multiple times.
17562 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
17564         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
17565         than vector.
17566         (_mm_cvtpd_ps): Likewise.
17567         (_mm_cvttpd_epi32): Likewise.
17568         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
17569         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
17570         vector, pixel, and bool following altivec.h include.
17572 2018-04-03  Martin Sebor  <msebor@redhat.com>
17574         * doc/extend.texi (Common Function Attributes): Clarify.
17575         (const attribute): Likewise.
17576         (pure attribute): Likewise.
17578 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
17580         PR target/85169
17581         * config/i386/i386.c (ix86_expand_vector_set): Use
17582         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
17584 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
17586         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
17587         instructions when changing rounding bits to preserve precision bits
17588         in the x87 control word.
17590 2018-04-03  Martin Liska  <mliska@suse.cz>
17592         PR tree-optimization/82491
17593         * rtl.h (strip_offset_and_add): Replace += suboffset with
17594         poly_uint64 () + suboffset.
17596 2018-03-29  Martin Liska  <mliska@suse.cz>
17597             Martin Jambor  <mjambor@suse.cz>
17599         PR ipa/84947
17600         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
17601         param_type is not an integral or pointer type.
17603 2018-04-03  Richard Biener  <rguenther@suse.de>
17605         * sese.h (recompute_all_dominators): Remove.
17607 2018-04-02  Martin Sebor  <msebor@redhat.com>
17609         * doc/invoke.texi (-Wrestrict): Fix typos.
17611 2018-04-02  Jim Wilson  <jimw@sifive.com>
17613         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
17614         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
17615         (<optab>di3, <optab>si3_extend): Likewise.
17616         (<optab>si3_mask, <optab>si3_mask_1): New.
17617         (<optab>di3_mask, <optab>di3_mask_1): New.
17618         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
17619         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
17620         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
17622 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
17624         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
17625         example.
17627 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17629         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
17630         (nds32_canonicalize_comparison): New function.
17632 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17633             Kito Cheng  <kito.cheng@gmail.com>
17634             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
17636         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
17637         * config/nds32/constants.md (unspec_volatile_element): Add
17638         UNSPEC_VOLATILE_RELAX_GROUP.
17639         * config/nds32/nds32-relax-opt.c: New file.
17640         * config/nds32/nds32-predicates.c
17641         (nds32_symbol_load_store_p): New function.
17642         * config/nds32/nds32-protos.h
17643         (nds32_symbol_load_store_p): Declare function.
17644         (make_pass_nds32_relax_opt): Declare new rtl pass function.
17645         * config/nds32/nds32.c
17646         (nds32_register_pass): New function to register pass.
17647         (nds32_register_passes): New function to register passes.
17648         * config/nds32/nds32.md (relax_group): New pattern.
17649         * config/nds32/nds32.opt (mrelax-hint): New option.
17650         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
17652 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
17654         * config/nds32/t-nds32: Modify files dependency.
17656 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17658         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
17659         (PROFILE_HOOK): Define its implementation.
17661 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17663         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
17664         type and 32-bit size.
17666 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
17668         PR middle-end/85090
17669         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
17670         (V_128_256): New mode iterator.
17671         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
17672         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
17673         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
17674         of V.
17675         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
17676         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
17678 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
17680         PR target/83315
17681         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
17682         NaN inputs correctly.
17684 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
17686         PR target/80546
17687         * config/rs6000/vsx.md (??r): New mode attribute.
17688         (*vsx_mov<mode>_64bit): Use it.
17689         (*vsx_mov<mode>_32bit): Likewise.
17691 2018-03-30  Martin Sebor  <msebor@redhat.com>
17693         PR tree-optimization/84818
17694         * builtins.c (check_access): Use warning_n.
17696 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17698         PR target/83822
17699         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
17700         condition.
17701         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
17702         condition.
17704 2018-03-30  Julia Koval  <julia.koval@intel.com>
17706         PR target/84413
17707         * x86-tune.def (movx, partial_reg_dependency): Enable for
17708         m_SKYLAKE_AVX512.
17710 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
17712         PR inline-asm/84985
17713         * lra-constraints.c (process_alt_operands): Move setting
17714         this_alternative_matches below.
17716 2018-03-29  Martin Liska  <mliska@suse.cz>
17718         PR lto/84995.
17719         * doc/invoke.texi: Document how LTO works with debug info.
17720         Describe auto-load support of binutils.  Mention 'x86-64'
17721         as valid option value of -march option.
17723 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
17725         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
17727         PR c/85094
17728         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
17729         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
17730         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
17731         checking.
17733 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
17735         PR target/84912
17736         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
17737         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
17738         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
17739         for RS6000_BTM_POWERPC64.
17740         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
17741         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
17742         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
17743         definition.
17744         (DIVDE): Use it.
17745         (DIVDEU): Likewise.
17747 2018-03-28  Carl Love  <cel@us.ibm.com>
17749         Revert
17750         2017-09-27  Carl Love  <cel@us.ibm.com>
17752         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
17753         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
17754         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
17755         fctiw instruction.
17757 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17759         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
17760         instead of __vector bool.
17761         (_mm_max_pu8): Likewise.
17762         (_mm_min_pi16): Likewise.
17764 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
17766         PR target/84912
17767         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
17768         (DIVWEUO): Likewise.
17769         (DIVDEO): Likewise.
17770         (DIVDEUO): Likewise.
17771         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
17772         DIVWEUO and DIVDEUO.
17773         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
17774         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
17775         (div_extend): Likewise.
17776         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
17777         builtin function.
17778         (__builtin_divweuo): Likewise.
17779         (__builtin_divdeo): Likewise.
17780         (__builtin_divdeuo): Likewise.
17782 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17784         PR target/85095
17785         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
17786         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
17788         PR tree-optimization/82004
17789         * gimple-match-head.c (optimize_pow_to_exp): New function.
17790         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
17791         Don't fold to exp if optimize_pow_to_exp is false.
17793 2018-03-28  Martin Liska  <mliska@suse.cz>
17795         PR other/84819
17796         * calls.c (initialize_argument_information): Fix trailing space.
17797         * common.opt: Fix typo and provide better explanation for
17798         -fsanitize-coverage option.
17799         * config/i386/i386.opt: Fix typo.
17801 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17802             Martin Liska  <mliska@suse.cz>
17804         PR sanitizer/85081
17805         * gimplify.c (asan_poison_variable): Don't do the check for
17806         gimplify_omp_ctxp here.
17807         (gimplify_decl_expr): Do it here.
17808         (gimplify_target_expr): Likewise.
17810 2018-03-28  Martin Liska  <mliska@suse.cz>
17812         PR target/84988
17813         * config/i386/i386.c (ix86_function_arg_advance): Do not call
17814         chkp_type_bounds_count if MPX is not enabled.
17816 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17818         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
17820 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
17822         PR target/84914
17823         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
17824         function to create the function decl for complex long double
17825         multiply and divide for -mabi=ieeelongdouble.
17826         (init_float128_ieee): Call it.
17828 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
17830         PR target/85044
17831         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
17832         -fcf-protection=branch -mibt.
17833         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
17835 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17837         PR target/81863
17838         * config/arm/arm.c (arm_valid_symbolic_address): Handle
17839         arm_word_relocations.
17841 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
17843         PR target/85056
17844         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
17845         extern array declarations.
17847 2018-03-27  Richard Biener  <rguenther@suse.de>
17849         PR middle-end/84067
17850         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
17851         explicit single_use checks.
17853 2018-03-27  Richard Biener  <rguenther@suse.de>
17855         PR tree-optimization/85082
17856         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
17857         Valueize the VUSE.
17859 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17861         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
17862         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
17863         Turn on fasynchronous-unwind-tables and funwind-tables.
17865 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
17867         PR target/85073
17868         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
17869         (*bmi_blsr_<mode>_ccz): Ditto.
17871 2018-03-26  Tom de Vries  <tom@codesourcery.com>
17873         PR tree-optimization/85063
17874         * omp-general.c (offloading_function_p): New function.  Factor out
17875         of ...
17876         * omp-offload.c (pass_omp_target_link::gate): ... here.
17877         * omp-general.h (offloading_function_p): Declare.
17878         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
17879         with attribute omp declare target for offloading functions.
17881 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
17883         PR tree-optimization/84005
17884         * tree-data-ref.h (get_base_for_alignment): Declare.
17885         * tree-data-ref.c (get_base_for_alignment_1): New function.
17886         (get_base_for_alignment): Likewise.
17887         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
17888         get_base_for_alignment to find a suitable base object, instead
17889         of always using drb->base_address.
17891 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17893         PR inline-asm/85022
17894         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
17895         known size by default.
17897 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
17899         PR inline-asm/85030
17900         * lra-constraints.c (process_alt_operands): Don't match BLKmode
17901         and non BLKmode operands.
17903 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17905         PR target/85026
17906         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
17907         Clean up attributes.
17909 2018-03-23  Richard Biener  <rguenther@suse.de>
17911         PR debug/85020
17912         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
17913         we are going to emit early debug for LTO.
17915 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17917         PR inline-asm/85034
17918         * function.c (match_asm_constraints_1): Don't optimize if input
17919         doesn't satisfy general_operand predicate for output's mode.
17921         PR inline-asm/85022
17922         * alias.c (write_dependence_p): Don't require for x_canonicalized
17923         non-VOIDmode if x has VOIDmode.
17925         PR sanitizer/85029
17926         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
17927         just don't try to optimize it rather than assert it never happens.
17929 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17931         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
17932         macro expansions for definition of ST_INTERNAL_<mode> and
17933         LD_INTERNAL_<mode> builtins.
17934         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
17935         Remove prototype.
17936         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
17937         function.
17938         (altivec_expand_st_builtin): Likewise.
17939         (altivec_expand_builtin): Remove calls to deleted functions.
17940         (rs6000_address_for_altivec): Delete this function.
17941         * config/rs6000/vector.md: Remove expands for
17942         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
17944 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
17946         PR target/84826
17947         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
17948         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
17949         re-computing once computed.
17950         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
17951         (arm_init_machine_status): Initialize
17952         machine->static_chain_stack_bytes.
17954 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17956         PR target/84760
17957         * doc/extend.texi: Add four new prototypes for vec_ld.
17958         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
17959         definitions for more logical presentation.
17960         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
17961         entries for V1TI variants of __builtin_altivec_ld builtin.
17962         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
17963         handling of V1TI variant of LVX icode pattern.
17964         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
17965         (rs6000_gimple_fold_builtin): Likewise.
17966         (altivec_init_builtins): Add code to define
17967         __builtin_altivec_lvx_v1ti function.
17969 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17971         PR inline-asm/84941
17972         * function.c (match_asm_constraints_1): Don't do the optimization
17973         if input isn't a REG, SUBREG, MEM or constant.
17975 2018-03-22  Tom de Vries  <tom@codesourcery.com>
17977         PR tree-optimization/84956
17978         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
17979         bb_has_abnormal_pred.
17981 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17983         PR sanitizer/85018
17984         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
17985         DECL_INITIAL (decl) to decl at the end.
17986         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
17987         adjust the comment.
17989 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
17991         * doc/extend.texi (__builtin_tgmath): Document when complex
17992         integer types are treated as _Complex _Float64.
17994 2018-03-21  Tom de Vries  <tom@codesourcery.com>
17996         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17998 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18000         PR tree-optimization/84960
18001         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18002         if it is ENTRY block, move them into single succ of ENTRY in that case.
18004 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
18006         PR tree-optimization/84811
18007         * poly-int.h (poly_span_traits): Remove the T3 parameter and
18008         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18009         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18010         (known_subrange_p): Update accordingly.  Cast each value involved
18011         in the size comparison, rather than casting the result of the
18012         subtraction.
18014 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18016         PR tree-optimization/84982
18017         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18018         by flipping the least significant bit rather than all bits from
18019         bitpos to bitpos + bitsize - 1.
18021 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18023         * doc/extend.texi (Deprecated Features): Remove mention of
18024         long-deleted deprecations.
18026 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18028         PR jit/84288
18029         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18030         * configure: Regenerate.
18032 2018-03-21  Tom de Vries  <tom@codesourcery.com>
18034         PR tree-optimization/83126
18035         * tree-parloops.c (num_phis): New function.
18036         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18038 2018-03-21  Nathan Sidwell  <nathan@acm.org>
18040         * doc/extend.texi (Deprecated Features): Update deprecated flags,
18041         mention anon-struct/union members and trailing attributes.
18043 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
18045         PR tree-optimization/84969
18046         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18047         builtin memset partitions if they set different rhs values.
18049 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
18051         PR rtl-optimization/84989
18052         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18053         VEC_DUPLICATE with scalar result mode.
18055 2018-03-21  Martin Liska  <mliska@suse.cz>
18057         PR ipa/84963
18058         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18059         not intended return statement.
18061 2018-03-21  Martin Liska  <mliska@suse.cz>
18063         PR target/84988
18064         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18065         (chkp_find_bound_slots_1): Limit number of iterations.
18067 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
18069         PR target/84838
18070         * Minor grammar fixes for x86 options.
18072 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18074         PR debug/84875
18075         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18076         holding REG_CFA_RESTORE notes, instead turn them into a USE.
18078 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
18080         PR target/83789
18081         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18082         (altivec_lvx_<mode>_1op): Likewise.
18083         (altivec_stvx_<mode>_2op): Likewise.
18084         (altivec_stvx_<mode>_1op): Likewise.
18085         (altivec_lvx_<VM2:mode>): New define_expand.
18086         (altivec_stvx_<VM2:mode>): Likewise.
18087         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18088         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18089         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18090         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18091         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18092         (rs6000_gen_lvx): Likewise.
18093         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18094         (altivec_expand_stv_builtin): Likewise.
18095         (altivec_expand_builtin): Likewise.
18096         * config/rs6000/vector.md: Likewise.
18098 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18100         PR target/82518
18101         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18102         BYTES_BIG_ENDIAN.
18104 2018-03-20  Richard Biener  <rguenther@suse.de>
18106         PR target/84986
18107         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18108         sign-conversions as zero, fall back to standard scalar_stmt
18109         cost for the rest.
18111 2018-03-20  Martin Liska  <mliska@suse.cz>
18113         PR ipa/84825
18114         * predict.c (rebuild_frequencies): Handle case when we have
18115         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18117 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18119         PR target/84990
18120         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18121         flag_section_anchors.
18122         * varasm.c (use_blocks_for_decl_p): Remove hack for
18123         dw2_force_const_mem.
18125         PR target/84845
18126         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18127         to ...
18128         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18129         be created, use lowpart_subreg of operands[0] rather than operands[0]
18130         itself.
18131         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18132         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18133         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18134         and n constraint instead of aarch64_shift_imm_di and Usd.
18135         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18136         (*aarch64_<optab>_reg_minus<mode>3): ... this.
18138 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
18140         PR target/82989
18141         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18142         to favor GPR over NEON registers.
18143         (<shift>di3_neon): Likewise.
18145 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18147         PR target/84952
18148         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18149         (nvptx_process_pars): Emit bar.sync asap and alap.
18151 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18153         PR target/84954
18154         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18155         seen_label if seen_label is already set.
18157 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18159         PR target/84945
18160         * config/i386/i386.c (fold_builtin_cpu): For features above 31
18161         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18162         Use 1U instead of 1.  Formatting fixes.
18164         PR c/84953
18165         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18166         instead of TREE_TYPE (s1) for the return value.
18168 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
18170         PR tree-optimization/84946
18171         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18172         bitsize + bitsize in poly_uint64 rather than poly_int64.
18174         PR sanitizer/78651
18175         * dwarf2asm.c: Include fold-const.c.
18176         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18177         of decl rather than decl itself.
18179         PR rtl-optimization/84643
18180         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18182 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
18184         PR sanitizer/78651
18185         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18186         calling assemble_variable.
18188 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
18190         PR target/81647
18191         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18192         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18194 2018-03-19  Jim Wilson  <jimw@sifive.com>
18196         PR bootstrap/84856
18197         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18198         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18199         (riscv_first_stack_step): Likewise.
18200         (riscv_option_override): Use STACK_BOUNDARY instead of
18201         MIN_STACK_BOUNDARY.
18202         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18203         MIN_STACK_BOUNDARY.
18204         (BIGGEST_ALIGNMENT): Set to 128.
18205         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18206         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18207         STACK_BOUNDARY.
18209 2018-03-19  Richard Biener  <rguenther@suse.de>
18211         PR tree-optimization/84933
18212         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18213         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18215 2018-03-19  Richard Biener  <rguenther@suse.de>
18217         PR tree-optimization/84859
18218         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18219         (cond_if_else_store_replacement): Perform sinking operation on
18220         single-store BBs regardless of MAX_STORES_TO_SINK setting.
18221         Generalize what a BB with a single eligible store is.
18223 2018-03-19  Richard Biener  <rguenther@suse.de>
18225         PR tree-optimization/84929
18226         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18227         chrec_is_positive against non-chrec arg.
18229 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
18231         PR target/84711
18232         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18234 2018-03-18  Martin Liska  <mliska@suse.cz>
18236         PR rtl-optimization/84635
18237         * regrename.c (build_def_use): Use matches_mode only when
18238         matches >= 0.
18240 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
18242         PR tree-optimization/84913
18243         * tree-vect-loop.c (vectorizable_reduction): Don't try to
18244         vectorize chains of COND_EXPRs.
18246 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18248         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18250 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18252         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18254 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18256         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18258 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18259             Kito Cheng  <kito.cheng@gmail.com>
18261         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18262         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18263         (nds32_adjust_reg_alloc_order): New function.
18264         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18266 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
18268         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18269         nds32_print_operand, nds32_print_operand_address): Use
18270         HOST_WIDE_INT_PRINT_DEC instead.
18272 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18274         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18276 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
18278         PR target/84902
18279         * config/i386/i386.c (initial_ix86_tune_features,
18280         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18281         unsigned long long.
18282         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18283         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18284         rather than 1u << ix86_tune.  Formatting fix.
18285         (ix86_option_override_internal): Change ix86_arch_mask from
18286         unsigned int to unsigned HOST_WIDE_INT, initialize to
18287         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18288         (ix86_function_specific_restore): Likewise.
18290 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18292         PR target/84899
18293         * postreload.c (reload_combine_recognize_pattern): Perform
18294         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18295         truncate_int_for_mode the result for the destination's mode.
18297         PR c/84909
18298         * hsa-gen.c (mem_type_for_type): Fix comment typo.
18299         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18300         Likewise.
18301         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18302         Likewise.
18304 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
18306         PR target/84876
18307         * lra-assigns.c (lra_split_hard_reg_for): Don't use
18308         regno_allocno_class_array and sorted_pseudos.
18309         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18310         insns where regno is used.
18312 2018-03-16  Martin Liska  <mliska@suse.cz>
18314         PR ipa/84833
18315         * multiple_target.c (create_dispatcher_calls): Redirect
18316         reference in the symbol table.
18318 2018-03-16  Martin Liska  <mliska@suse.cz>
18320         PR ipa/84722
18321         * multiple_target.c (create_dispatcher_calls): Redirect also
18322         an alias.
18324 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18326         PR c++/79937
18327         PR c++/82410
18328         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18329         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18330         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18332 2018-03-16  Julia Koval  <julia.koval@intel.com>
18334         * doc/invoke.texi (Skylake Server): Add CLWB.
18335         Cannonlake): Remove CLWB.
18337 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18339         PR tree-optimization/84841
18340         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18341         1 << 3.
18342         (FLOAT_ONE_CONST_TYPE): Define.
18343         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
18344         (sort_by_operand_rank): Put entries with higher constant_type last
18345         rather than first to match comments.
18347 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
18349         * config/nios2/nios2.md (movsi_internal): Fix thinko in
18350         split predicate.
18352 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
18354         PR c++/79085
18355         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
18356         check and use address of target always.
18358 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
18360         PR target/84574
18361         * config/i386/i386.c (indirect_thunk_needed): Update comments.
18362         (indirect_thunk_bnd_needed): Likewise.
18363         (indirect_thunks_used): Likewise.
18364         (indirect_thunks_bnd_used): Likewise.
18365         (indirect_return_needed): New.
18366         (indirect_return_bnd_needed): Likewise.
18367         (output_indirect_thunk_function): Add a bool argument for
18368         function return.
18369         (output_indirect_thunk_function): Don't generate alias for
18370         function return thunk.
18371         (ix86_code_end): Call output_indirect_thunk_function to generate
18372         function return thunks.
18373         (ix86_output_function_return): Set indirect_return_bnd_needed
18374         and indirect_return_needed instead of indirect_thunk_bnd_needed
18375         and indirect_thunk_needed.
18377 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
18379         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
18380         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
18381         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
18383 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
18384             Paul Hua <paul.hua.gm@gmail.com>
18386         PR c/84852
18387         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
18389 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
18391         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
18392         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
18393         resp. SFmode cases.
18395 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
18397         PR target/84711
18398         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
18399         instead of GET_MODE_SIZE when comparing Units.
18401 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18403         PR target/68256
18404         * varasm.c (hash_section): Return an unchangeble hash value
18405         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
18406         Return !aarch64_can_use_per_function_literal_pools_p ().
18408 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
18410         PR target/84860
18411         * optabs.c (emit_conditional_move): Pass address of cmode's copy
18412         rather than address of cmode as last argument to prepare_cmp_insn.
18414 2018-03-15  Julia Koval  <julia.koval@intel.com>
18416         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
18417         F_AVX512VNNI, F_AVX512BITALG): New.
18419 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
18421         PR target/83451
18422         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
18423         insn for floating-point loads and stores.
18425 2018-03-14  Carl Love  <cel@us.ibm.com>
18427         * config/rs6000/rs6000-c.c: Add macro definitions for
18428         ALTIVEC_BUILTIN_VEC_PERMXOR.
18429         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
18430         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
18431         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
18432         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
18433         UNSPEC_VPERMXOR.
18434         * config/doc/extend.texi: Add prototypes for vec_permxor.
18436 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
18438         PR c/84852
18439         * diagnostic-show-locus.c (class layout_point): Convert m_line
18440         from int to linenum_type.
18441         (line_span::comparator): Use linenum "compare" function when
18442         comparing line numbers.
18443         (test_line_span): New function.
18444         (layout_range::contains_point): Convert param "row" from int to
18445         linenum_type.
18446         (layout_range::intersects_line_p): Likewise.
18447         (layout::will_show_line_p): Likewise.
18448         (layout::print_source_line): Likewise.
18449         (layout::should_print_annotation_line_p): Likewise.
18450         (layout::print_annotation_line): Likewise.
18451         (layout::print_leading_fixits): Likewise.
18452         (layout::annotation_line_showed_range_p): Likewise.
18453         (struct line_corrections): Likewise for field m_row.
18454         (line_corrections::line_corrections): Likewise for param "row".
18455         (layout::print_trailing_fixits): Likewise.
18456         (layout::get_state_at_point): Likewise.
18457         (layout::get_x_bound_for_row): Likewise.
18458         (layout::print_line): Likewise.
18459         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
18460         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
18461         * input.c (selftest::test_linenum_comparisons): New function.
18462         (selftest::input_c_tests): Call it.
18463         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
18464         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
18465         * selftest.h (ASSERT_GT): New macro.
18466         (ASSERT_GT_AT): New macro.
18467         (ASSERT_LT): New macro.
18468         (ASSERT_LT_AT): New macro.
18470 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
18472         PR rtl-optimization/84780
18473         * combine.c (distribute_links): Don't make a link based on pc_rtx.
18475 2018-03-14  Martin Liska  <mliska@suse.cz>
18477         * tree.c (record_node_allocation_statistics): Use
18478         get_stats_node_kind.
18479         (get_stats_node_kind): New function extracted from
18480         record_node_allocation_statistics.
18481         (free_node): Use get_stats_node_kind.
18483 2018-03-14  Richard Biener  <rguenther@suse.de>
18485         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
18486         that the value-set of ANTIC_IN doesn't grow.
18488         Revert
18489         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18490         member.
18491         (BB_VISITED_WITH_VISITED_SUCCS): New define.
18492         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18494 2018-03-14  Julia Koval  <julia.koval@intel.com>
18496         * config.gcc (icelake-client, icelake-server): New.
18497         (icelake): Remove.
18498         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
18499         (initial_ix86_arch_features): Ditto.
18500         (PTA_SKYLAKE): Add SGX.
18501         (PTA_ICELAKE): Remove.
18502         (PTA_ICELAKE_CLIENT): New.
18503         (PTA_ICELAKE_SERVER): New.
18504         (ix86_option_override_internal): Split up icelake on icelake client and
18505         icelake server.
18506         (get_builtin_code_for_version): Ditto.
18507         (fold_builtin_cpu): Ditto.
18508         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
18509         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
18510         * config/i386/i386.h (processor_type): Ditto.
18511         * doc/invoke.texi: Ditto.
18513 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
18515         PR sanitizer/83392
18516         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
18517         INTEGER_CST offset, add it together with bitpos / 8 and
18518         sign extend based on POINTER_SIZE.
18520         PR target/84844
18521         Revert
18522         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
18524         PR target/78090
18525         * config/i386/constraints.md (Yc): New register constraint.
18526         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
18527         Use Yc constraint for alternative 2 of operand 0.  Remove
18528         preferred_for_speed attribute.
18530 2018-03-14  Richard Biener  <rguenther@suse.de>
18532         PR tree-optimization/84830
18533         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
18534         with the old one to avoid oscillations.
18536 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
18538         PR target/83712
18539         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
18540         pseudos.
18541         (assign_by_spills): Return a flag of reload assignment failure.
18542         Do not process the reload assignment failures.  Do not spill other
18543         reload pseudos if they has the same reg class.  Update n if
18544         necessary.
18545         (lra_assign): Add a return arg.  Set up from the result of
18546         assign_by_spills call.
18547         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18548         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18549         usage_insns if it is not NULL.
18550         (spill_hard_reg_in_range): New function.
18551         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18552         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18553         function prototypes.
18554         (lra_assign): Change prototype.
18555         * lra.c (lra): Add code to deal with fails by splitting hard reg
18556         live ranges.
18558 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
18560         * config/riscv/riscv.opt (mrelax): New option.
18561         * config/riscv/riscv.c (riscv_file_start): Emit ".option
18562         "norelax" when riscv_mrelax is disabled.
18563         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
18565 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18567         PR target/84743
18568         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
18569         reassociation for int modes.
18571 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18573         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
18574         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
18575         for big-endian.
18576         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
18577         * config/aarch64/aarch64-sve.md
18578         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
18579         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
18580         (*extend<mode><Vwide>2): Rename to...
18581         (aarch64_sve_extend<mode><Vwide>2): ...this.
18582         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
18583         renaming the old pattern to...
18584         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
18585         unsigned packs.
18586         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
18587         define_expand, renaming the old pattern to...
18588         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
18589         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
18590         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
18591         account when deciding which SVE instruction the optab should use.
18592         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
18594 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18596         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
18597         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
18598         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
18599         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
18600         (tlsdesc_small_<mode>): Turn a define_expand and use
18601         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
18602         (tlsdesc_small_advsimd_<mode>): ...this.
18603         (tlsdesc_small_sve_<mode>): New pattern.
18605 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18607         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
18608         (UNSPEC_UMUL_HIGHPART): New constants.
18609         (MUL_HIGHPART): New int iteraor.
18610         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
18611         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
18612         define_expand.
18613         (*<su>mul<mode>3_highpart): New define_insn.
18615 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18617         PR lto/84805
18618         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18619         incomplete types.
18621 2018-03-13  Martin Liska  <mliska@suse.cz>
18623         PR ipa/84658.
18624         * (sem_item_optimizer::sem_item_optimizer): Initialize new
18625         vector.
18626         (sem_item_optimizer::~sem_item_optimizer): Release it.
18627         (sem_item_optimizer::merge_classes): Register variable aliases.
18628         (sem_item_optimizer::fixup_pt_set): New function.
18629         (sem_item_optimizer::fixup_points_to_sets): Likewise.
18630         * ipa-icf.h: Declare new variables and functions.
18632 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
18634         PR middle-end/84834
18635         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
18636         integer_pow2p@2 and test integer_pow2p in condition.
18637         (A < 0 ? C : 0): Similarly for @1.
18639         PR middle-end/84831
18640         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
18641         characters starting at p contain '\0' character, don't look beyond
18642         that.
18644         PR target/84827
18645         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
18646         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
18648         PR target/84828
18649         * reg-stack.c (change_stack): Change update_end var from int to
18650         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
18651         also call set_block_for_insn on the newly added insns and rescan.
18653         PR target/84786
18654         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
18655         on the last operand.
18657         PR c++/84704
18658         * tree.c (stabilize_reference_1): Return save_expr (e) for
18659         STATEMENT_LIST even if it doesn't have side-effects.
18661 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
18663         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
18665 2018-03-12  Renlin Li  <renlin.li@arm.com>
18667         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
18668         aarch64_output_scalar_simd_mov_immediate.
18670 2018-03-12  Martin Sebor  <msebor@redhat.com>
18672         PR tree-optimization/83456
18673         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
18674         for perfectly overlapping calls to memcpy.
18675         (gimple_fold_builtin_memory_chk): Same.
18676         (gimple_fold_builtin_strcpy): Handle no-warning.
18677         (gimple_fold_builtin_stxcpy_chk): Same.
18678         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
18680 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
18682         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
18683         parameter.  Use it for SFmode.
18684         (rs6000_function_arg_advance_1): Adjust.
18685         (rs6000_function_arg): Adjust.
18686         (rs6000_gimplify_va_arg): Pass false for that new parameter.
18688 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
18690         PR rtl-optimization/84169
18691         PR rtl-optimization/84780
18692         * combine.c (can_combine_p): Check for a 2-insn combination whether
18693         the destination register is used between the two insns, too.
18695 2018-03-12  Richard Biener  <rguenther@suse.de>
18697         PR tree-optimization/84803
18698         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
18699         for refs DR analysis didn't process.
18701 2018-03-12  Richard Biener  <rguenther@suse.de>
18703         PR tree-optimization/84777
18704         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
18705         force-vectorize loops ignore whether we are optimizing for size.
18707 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18709         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
18710         (TARGET_MD_ASM_ADJUST): Define.
18712 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
18713             Kito Cheng  <kito.cheng@gmail.com>
18714             Chung-Ju Wu  <jasonwucj@gmail.com>
18716         * config/nds32/nds32.c (nds32_compute_stack_frame,
18717         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
18718         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
18719         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
18720         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
18721         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
18722         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
18723         * config/nds32/nds32.md (prologue, epilogue): Use macro
18724         NDS32_V3PUSH_AVAILABLE_P to do checking.
18726 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
18728         PR debug/58150
18729         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
18730         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
18731         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
18732         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
18733         addition of most attributes on !orig_type_die or the attribute not
18734         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
18736 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18737             Chung-Ju Wu  <jasonwucj@gmail.com>
18739         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
18740         __NDS32_VH__ macro.
18741         * config/nds32/nds32.opt (mvh): New option.
18743 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18744             Chung-Ju Wu  <jasonwucj@gmail.com>
18746         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
18747         function.
18748         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
18749         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
18750         definition.
18752 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18753             Chung-Ju Wu  <jasonwucj@gmail.com>
18755         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
18756         function.
18757         * config/nds32/nds32-multiple.md (strlensi): New pattern.
18758         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
18760 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
18761             Kito Cheng  <kito.cheng@gmail.com>
18762             Chung-Ju Wu  <jasonwucj@gmail.com>
18764         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
18765         UNSPEC_FFMISM and UNSPEC_FLMISM.
18766         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
18767         for ffb, ffmism and flmism.
18768         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
18769         (unspec_ffmism): Ditto.
18770         (unspec_flmism): Ditto.
18771         (nds32_expand_builtin_impl): Check if string extension is available.
18772         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
18773         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
18775 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
18777         Reverting patch:
18778         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18780         PR target/83712
18781         * lra-assigns.c (assign_by_spills): Return a flag of reload
18782         assignment failure.  Do not process the reload assignment
18783         failures.  Do not spill other reload pseudos if they has the same
18784         reg class.
18785         (lra_assign): Add a return arg.  Set up from the result of
18786         assign_by_spills call.
18787         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18788         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18789         usage_insns if it is not NULL.
18790         (spill_hard_reg_in_range): New function.
18791         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18792         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18793         function prototypes.
18794         (lra_assign): Change prototype.
18795         * lra.c (lra): Add code to deal with fails by splitting hard reg
18796         live ranges.
18798 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
18800         PR target/84807
18801         * config/i386/i386.opt: Replace Enforcment with Enforcement.
18803 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
18805         PR debug/84620
18806         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
18807         (dw_val_node): Add val_symbolic_view.
18808         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
18809         (symview_upper_bound): New.
18810         (new_line_info_table): Initialize symviews_since_reset.
18811         (dwarf2out_source_line): Count symviews_since_reset and set
18812         symview_upper_bound.
18813         (dw_val_equal_p): Handle symview.
18814         (add_AT_symview): New.
18815         (print_dw_val): Handle symview.
18816         (attr_checksum, attr_checksum_ordered): Likewise.
18817         (same_dw_val_p, size_of_die): Likewise.
18818         (value_format, output_die): Likewise.
18819         (add_high_low_attributes): Use add_AT_symview for entry_view.
18820         (dwarf2out_finish): Reset symview_upper_bound, clear
18821         zero_view_p.
18823 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
18825         PR target/83969
18826         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
18827         Add strict argument and use it.
18828         (rs6000_split_multireg_move): Update for new strict argument.
18829         (mem_operand_gpr): Disallow all non-offsettable addresses.
18830         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
18832 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
18834         PR target/84772
18835         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
18836         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
18837         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
18839         PR c++/84767
18840         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
18841         decl, use remap_type if we want to use the type.
18843 2018-03-09  Martin Sebor  <msebor@redhat.com>
18845         PR tree-optimization/84526
18846         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18847         Remove dead code.
18848         (builtin_access::generic_overlap): Be prepared to handle non-array
18849         base objects.
18851 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
18853         PR rtl-optimization/84682
18854         * lra-constraints.c (process_address_1): Check is_address flag
18855         for address constraints.
18856         (process_alt_operands): Likewise.
18857         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
18858         preprocess_constraints.
18859         * recog.h (preprocess_constraints): Add oploc parameter.
18860         Adjust callers.
18861         * recog.c (preprocess_constraints): Test address_operand for
18862         CT_ADDRESS constraints.
18864 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18866         PR target/83712
18867         * lra-assigns.c (assign_by_spills): Return a flag of reload
18868         assignment failure.  Do not process the reload assignment
18869         failures.  Do not spill other reload pseudos if they has the same
18870         reg class.
18871         (lra_assign): Add a return arg.  Set up from the result of
18872         assign_by_spills call.
18873         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18874         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18875         usage_insns if it is not NULL.
18876         (spill_hard_reg_in_range): New function.
18877         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18878         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18879         function prototypes.
18880         (lra_assign): Change prototype.
18881         * lra.c (lra): Add code to deal with fails by splitting hard reg
18882         live ranges.
18884 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18886         PR target/83193
18887         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
18888         Accept complain bool parameter.  Only emit errors if it is true.
18889         (arm_parse_cpu_option_name): Likewise.
18890         (arm_target_thumb_only): Adjust callers of the above.
18891         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
18892         prototype to take a default true bool parameter.
18893         (arm_parse_arch_option_name): Likewise.
18895 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
18896             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
18898         PR jit/64089
18899         PR jit/84288
18900         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
18901         * configure: Regenerate.
18902         * configure.ac ("linker --version-script option"): New.
18903         ("linker soname option"): New.
18905 2018-03-09  Richard Biener  <rguenther@suse.de>
18907         PR tree-optimization/84775
18908         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
18909         immediate uses of predicate stmts and mark them modified.
18911         Revert
18912         PR tree-optimization/84178
18913         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18914         to caller.
18915         (version_loop_for_if_conversion): Delay update_ssa call.
18916         (tree_if_conversion): Delay update_ssa until after predicate
18917         insertion.
18919 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
18921         PR target/84763
18922         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
18923         when the function accesses prior frames.
18925 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
18927         PR debug/84456
18928         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
18929         gen_llsym, otherwise call maybe_gen_llsym.
18931         PR inline-asm/84742
18932         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
18933         has ',' character inside of it.
18935 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18937         PR target/84748
18938         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
18939         as clobbering CC_REGNUM.
18941 2018-03-08  Richard Biener  <rguenther@suse.de>
18943         PR middle-end/84552
18944         * tree-scalar-evolution.c: Include tree-into-ssa.h.
18945         (follow_copies_to_constant): Do not follow SSA names registered
18946         for update.
18948 2018-03-08  Richard Biener  <rguenther@suse.de>
18950         PR tree-optimization/84178
18951         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18952         to caller.
18953         (version_loop_for_if_conversion): Delay update_ssa call.
18954         (tree_if_conversion): Delay update_ssa until after predicate
18955         insertion.
18957 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
18959         PR tree-optimization/84178
18960         * tree-if-conv.c (release_bb_predicate): Remove the
18961         the assertion that the stmts have NULL use_ops.
18962         Discard the statements, asserting that they haven't
18963         yet been added to a BB.
18965 2018-03-08  Richard Biener  <rguenther@suse.de>
18967         PR tree-optimization/84746
18968         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
18969         (phi_translate): Pass in destination ANTIC_OUT set.
18970         (phi_translate_1): Likewise.  For a simplified result lookup
18971         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
18972         (phi_translate_set): Adjust.
18973         (do_pre_regular_insertion): Likewise.
18974         (do_pre_partial_partial_insertion): Likewise.
18976 2018-03-08  Martin Liska  <mliska@suse.cz>
18978         PR gcov-profile/84735
18979         * doc/gcov.texi: Document usage of profile files.
18980         * gcov-io.h: Document changes in the format.
18982 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
18984         PR debug/84404
18985         PR debug/84408
18986         * dwarf2out.c (struct dw_line_info_table): Update comments for
18987         view == -1.
18988         (FORCE_RESET_NEXT_VIEW): New.
18989         (FORCE_RESETTING_VIEW_P): New.
18990         (RESETTING_VIEW_P): Check for -1 too.
18991         (ZERO_VIEW_P): Likewise.
18992         (new_line_info_table): Force-reset next view.
18993         (dwarf2out_begin_function): Likewise.
18994         (dwarf2out_source_line): Simplify zero_view_p initialization.
18995         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
18996         view directly.  Omit view when omitting .loc at line 0.
18998 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
19000         PR tree-optimization/84740
19001         * tree-switch-conversion.c (process_switch): Call build_constructors
19002         only if info.phi_count is non-zero.
19004         PR tree-optimization/84739
19005         * tree-tailcall.c (find_tail_calls): Check call arguments against
19006         DECL_ARGUMENTS (current_function_decl) rather than
19007         DECL_ARGUMENTS (func) when checking for tail recursion.
19009 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19011         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19012         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19013         Volker Reichelt's entry and add entries for people that perform
19014         GCC fuzzy testing and report numerous bugs.
19016 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
19018         PR target/82411
19019         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19020         readonly data in sdata, if that is disabled.
19021         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19022         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19023         -mreadonly-in-sdata option.
19025 2018-03-07  Martin Sebor  <msebor@redhat.com>
19027         PR tree-optimization/84468
19028         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19029         basic block when looking for nul assignment.
19031 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
19033         PR target/84277
19034         * except.h (output_function_exception_table): Adjust prototype.
19035         * except.c (output_function_exception_table): Remove FNNAME parameter
19036         and add SECTION parameter.  Ouput one part of the table at a time.
19037         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19038         the first part of the exception table and emit unwind directives.
19039         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19040         (i386_pe_seh_cold_init): Likewise.
19041         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19042         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19043         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19044         (ix86_output_call_insn): Emit a nop in one more case for SEH.
19045         * config/i386/winnt.c: Include except.h.
19046         (struct seh_frame_state): Add reg_offset, after_prologue and
19047         in_cold_section fields.
19048         (i386_pe_seh_end_prologue): Set seh->after_prologue.
19049         (i386_pe_seh_cold_init): New function.
19050         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19051         to seh->in_cold_section.
19052         (seh_emit_push): Record the offset of the push.
19053         (seh_emit_save): Record the offet of the save.
19054         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19055         Test seh->after_prologue to disregard the epilogue.
19056         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19057         (i386_pe_end_cold_function): New function.
19059 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
19061         PR fortran/84565
19062         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19063         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19065         PR c++/84704
19066         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19067         on tmp_var.
19068         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19069         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19071         PR middle-end/84723
19072         * multiple_target.c: Include tree-inline.h and intl.h.
19073         (expand_target_clones): Diagnose and fail if node->definition and
19074         !tree_versionable_function_p (node->decl).
19076 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
19078         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19079         sprint_ul.
19080         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19081         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19082         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19084 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19086         PR target/84710
19087         * combine.c (try_combine): Use reg_or_subregno instead of handling
19088         just paradoxical SUBREGs and REGs.
19090 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
19092         * config/arc/arc.c (arc_finalize_pic): Remove function.
19093         (arc_must_save_register): We use single base PIC register, remove
19094         checks to save/restore the PIC register.
19095         (arc_expand_prologue): Likewise.
19096         * config/arc/arc-protos.h (arc_set_default_type_attributes):
19097         Remove.
19098         (arc_verify_short): Likewise.
19099         (arc_attr_type): Likewise.
19100         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19101         (walk_stores): Likewise.
19102         (arc_address_cost): Make it static.
19103         (arc_verify_short): Likewise.
19104         (branch_dest): Likewise.
19105         (arc_attr_type): Likewise.
19106         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19107         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19108         (arc_final_prescan_insn): Remove inserting the nops due to
19109         hardware hazards.  It is done in reorg step.
19110         (insn_length_variant_t): Remove.
19111         (insn_length_parameters_t): Likewise.
19112         (arc_insn_length_parameters): Likewise.
19113         (arc_get_insn_variants): Likewise.
19114         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19116 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19118         PR inline-asm/84683
19119         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19120         assertion failure.
19122         PR tree-optimization/84687
19123         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19124         on new_node->decl.
19125         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19127 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19129         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19130         Rename to ppc_speculation_barrier.
19131         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19132         __builtin_ppc_speculation_barrier.
19134 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19136         PR target/84700
19137         * combine.c (combine_simplify_rtx): Don't try to simplify if
19138         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19139         are equal to x.
19141 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
19143         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19144         to 32 bytes when compiling for POWER9.
19146 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19148         PR target/84564
19149         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19150         regparm >= 3 with no arg reg available also for calls with
19151         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
19153         PR target/84524
19154         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19155         orig,vex.
19156         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
19158 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
19160         PR target/84264
19161         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19163 2018-03-05  Richard Biener  <rguenther@suse.de>
19165         PR tree-optimization/84486
19166         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19167         When inserting a __builtin_assume_aligned call set the LHS
19168         SSA name alignment info accordingly.
19170 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
19172         PR tree-optimization/84114
19173         * config/aarch64/aarch64.c (aarch64_reassociation_width)
19174         Avoid reassociation of FLOAT_MODE addition.
19176 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
19178         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19179         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19180         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19181         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19182         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19183         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19184         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19185         and -mwbnoinvd.
19186         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19187         __builtin_ia32_wbinvd): New builtins.
19188         (SPECIAL_ARGS2): New.
19189         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19190         (SPECIAL_ARGS2): New.
19191         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19192         (ix86_valid_target_attribute_inner_p): Ditto.
19193         (ix86_init_mmx_sse_builtins): Add special_args2.
19194         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19195         TARGET_WBNOINVD_P): New.
19196         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19197         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19198         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19199         * config/i386/immintrin.h (_wbinvd): New intrinsic.
19200         * config/i386/pconfigintrin.h: New file.
19201         * config/i386/wbnoinvdintrin.h: Ditto.
19202         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19203         wbnoinvdintrin.h.
19204         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19206 2018-03-05  Richard Biener  <rguenther@suse.de>
19208         PR tree-optimization/84670
19209         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19210         member.
19211         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19212         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19213         (compute_antic_aux): Only assert the number of values in ANTIC_IN
19214         doesn't grow if all successors (recursively) were visited at least
19215         once.
19217 2018-03-05  Richard Biener  <rguenther@suse.de>
19219         PR tree-optimization/84650
19220         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19221         if executed in the loop pipeline.
19223 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
19225         * doc/configfiles.texi (Configuration Files): Move info about
19226         conditionalizing $target-protos.h to...
19227         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
19228         differs from $target-protos.h.
19230 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
19231             Chung-Ju Wu  <jasonwucj@gmail.com>
19233         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19234         * config/nds32/nds32-multiple.md (setmemsi): Define.
19235         * config/nds32/nds32-memory-manipulation.c
19236         (nds32_gen_dup_4_byte_to_word_value): New.
19237         (emit_setmem_word_loop): New.
19238         (emit_setmem_byte_loop): New.
19239         (nds32_expand_setmem_loop): New.
19240         (nds32_expand_setmem_loop_v3m): New.
19241         (nds32_expand_setmem_unroll): New.
19242         (nds32_expand_setmem): New.
19244 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19245             Chung-Ju Wu  <jasonwucj@gmail.com>
19247         * config/nds32/nds32-memory-manipulation.c
19248         (nds32_emit_load_store): New.
19249         (nds32_emit_post_inc_load_store): New.
19250         (nds32_emit_mem_move): New.
19251         (nds32_emit_mem_move_block): New.
19252         (nds32_expand_movmemsi_loop_unknown_size): New.
19253         (nds32_expand_movmemsi_loop_known_size): New.
19254         (nds32_expand_movmemsi_loop): New.
19255         (nds32_expand_movmemsi_unroll): New.
19256         (nds32_expand_movmemqi): Rename ...
19257         (nds32_expand_movmemsi): ... to this.
19258         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19259         (movmemsi): ... to this.
19260         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19261         (nds32_expand_movmemsi): ... to this.
19263 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19264             Monk Chiang  <sh.chiang04@gmail.com>
19265             Chung-Ju Wu  <jasonwucj@gmail.com>
19267         * config/nds32/nds32-protos.h
19268         (nds32_expand_load_multiple): New arguments.
19269         (nds32_expand_store_multiple): Ditto.
19270         (nds32_valid_multiple_load_store): Rename ...
19271         (nds32_valid_multiple_load_store_p): ... to this.
19272         * config/nds32/nds32-memory-manipulation.c
19273         (nds32_expand_load_multiple): Refine implementation.
19274         (nds32_expand_store_multiple): Ditto.
19275         * config/nds32/nds32-multiple.md
19276         (load_multiple): Update nds32_expand_load_multiple interface.
19277         (store_multiple): Update nds32_expand_store_multiple interface.
19278         * config/nds32/nds32-predicates.c
19279         (nds32_valid_multiple_load_store): Rename ...
19280         (nds32_valid_multiple_load_store_p): ... to this and refine
19281         implementation.
19282         * config/nds32/predicates.md
19283         (nds32_load_multiple_and_update_address_operation): New predicate.
19284         (nds32_store_multiple_and_update_address_operation): New predicate.
19286 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19287             Chung-Ju Wu  <jasonwucj@gmail.com>
19289         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19290         (combo): New attribute.
19291         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19293 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19295         * config/nds32/nds32.opt: Change -mcmodel= default value.
19297 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
19298             Monk Chiang  <sh.chiang04@gmail.com>
19299             Chung-Ju Wu  <jasonwucj@gmail.com>
19301         * config/nds32/constants.md (unspec_element): New enum.
19302         * config/nds32/constraints.md (Umw): New constraint.
19303         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19304         * config/nds32/nds32-intrinsic.md: Likewise.
19305         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19306         (nds32_valid_smw_lwm_base_p): New.
19307         (nds32_output_smw_single_word): New.
19308         (nds32_output_lmw_single_word): New.
19309         (nds32_expand_unaligned_load): New.
19310         (nds32_expand_unaligned_store): New.
19311         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19312         (nds32_output_smw_single_word): Declare.
19313         (nds32_output_lmw_single_word): Declare.
19314         (nds32_expand_unaligned_load): Declare.
19315         (nds32_expand_unaligned_store): Declare.
19316         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19317         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19318         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19319         NDS32_BUILTIN_UASTORE_DW.
19320         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19321         predicate.
19323 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
19324             Kito Cheng  <kito.cheng@gmail.com>
19325             Chung-Ju Wu  <jasonwucj@gmail.com>
19327         * config/nds32/nds32-intrinsic.c
19328         (nds32_expand_builtin_null_ftype_reg): Delete.
19329         (nds32_expand_builtin_reg_ftype_imm): Ditto.
19330         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19331         (nds32_read_argument): New.
19332         (nds32_legitimize_target): Ditto.
19333         (nds32_legitimize_argument): Ditto.
19334         (nds32_check_constant_argument): Ditto.
19335         (nds32_expand_unop_builtin): Ditto.
19336         (nds32_expand_unopimm_builtin): Ditto.
19337         (nds32_expand_binop_builtin): Ditto.
19338         (nds32_builtin_decl_impl): Ditto.
19339         (builtin_description): Ditto.
19340         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19341         (nds32_init_builtins_impl): Ditto.
19342         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
19343         (nds32_builtin_decl): New.
19344         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
19345         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
19347 2018-03-02  Jeff Law  <law@redhat.com>
19349         * reorg.c (stop_search_p): Handle DEBUG_INSN.
19350         (redundant_insn, fill_simple_delay_slots): Likewise.
19351         (fill_slots_from_thread): Likewise.
19352         * resource.c (mark_referenced_resources): Likewise.
19353         (mark_set_resources, find_dead_or_set_registers): Likewise.
19355 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19357         * substring-locations.h (format_warning_va): Formatting fix for
19358         ATTRIBUTE_GCC_DIAG.
19359         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
19360         argument.
19361         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
19362         * substring-locations.c: Include intl.h.
19363         (format_warning_va): Turned into small wrapper around
19364         format_warning_n_va, renamed to ...
19365         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
19366         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
19367         use ngettext.
19368         (format_warning_at_substring_n): New function.
19369         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
19370         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
19371         format_warning_at_substring with just a shorter name instead of
19372         const function pointer.
19373         (fmtwarn_n): New function.
19374         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
19375         appropriate, get rid of all the fmtstr temporaries, move conditionals
19376         with G_() wrapped string literals directly into fmtwarn arguments,
19377         cast dir.len to (int), formatting fixes.
19379 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
19381         * doc/invoke.texi: Remove "Cilk Plus" references.
19383 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19384             Richard Biener  <rguenther@suse.de>
19386         PR ipa/84628
19387         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
19388         for error or warning attributes if CALL_FROM_THUNK_P is set.
19389         Formatting fixes.
19391 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19393         PR target/56540
19394         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
19395         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
19397         PR target/56540
19398         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
19399         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
19401         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
19402         instead of -1U in last predictors element's probability member.
19404 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
19406         PR ipa/83983
19407         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19408         arguments if they are comparable.
19410 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
19412         PR tree-optimization/84634
19413         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
19414         masks and masked_loop_p with a single loop_masks, making sure it's
19415         null for bb vectorization.
19417 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
19419         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
19420         (vect_analyze_data_ref_access): Use loop->safe_len rather than
19421         loop->force_vectorize to check whether there is no alias.
19423 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19425         PR target/84614
19426         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
19427         prototypes.
19428         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
19429         comments.
19430         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
19431         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
19432         instead of a loop around prev_real_insn.
19433         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
19434         prev_real_insn.
19436         PR inline-asm/84625
19437         * config/i386/i386.c (ix86_print_operand): Use conditional
19438         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
19439         zero vector.
19441 2018-03-02  Richard Biener  <rguenther@suse.de>
19443         PR tree-optimization/84427
19444         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
19445         (bitmap_set_subtract_values): Rewrite to handle multiple
19446         exprs per value.
19447         (clean): Likewise.
19448         (prune_clobbered_mems): Likewise.
19449         (phi_translate): Take edge instead of pred/phiblock.
19450         (phi_translate_1): Likewise.
19451         (phi_translate_set): Likewise.  Insert all translated
19452         exprs for a value into the set, keeping possibly multiple
19453         expressions per value.
19454         (compute_antic_aux): Adjust for phi_translate changes.
19455         When intersecting union the expressions and prune those
19456         not in the final value set, keeping possibly multiple
19457         expressions per value.  Do not use value-insertion
19458         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
19459         all expressions.  Add verification that the value-sets
19460         only shrink during iteration.
19461         (compute_partial_antic_aux): Adjust for the phi_translate changes.
19462         (do_pre_regular_insertion): Likewise.
19463         (do_pre_partial_partial_insertion): Likewise.
19465 2018-03-02  Richard Biener  <rguenther@suse.de>
19467         PR target/82005
19468         * config/darwin.c (saved_debug_info_level): New static global.
19469         (darwin_asm_lto_start): Disable debug info generation for LTO out.
19470         (darwin_asm_lto_end): Restore debug info generation settings.
19472 2018-03-01  Martin Liska  <mliska@suse.cz>
19474         PR sanitizer/82484
19475         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
19476         volatile arguments.
19478 2018-03-01  Richard Biener  <rguenther@suse.de>
19480         PR debug/84645
19481         * dwarf2out.c (gen_variable_die): Properly handle late VLA
19482         type annotation with LTO when debug was disabled at compile-time.
19484 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
19486         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
19487         XINT with INTVAL.
19488         (mips_final_postscan_insn): Likewise.
19490 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
19492         PR rtl-optimization/84528
19493         * alias.c (init_alias_target): Add commentary.
19494         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
19495         a unique base value if the frame pointer is not eliminated
19496         to the stack pointer.
19498 2018-03-01  Tom de Vries  <tom@codesourcery.com>
19500         PR rtl-optimization/83327
19501         * lra-int.h (hard_regs_spilled_into): Declare.
19502         * lra.c (hard_regs_spilled_into): Define.
19503         (init_reg_info): Init hard_regs_spilled_into.
19504         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
19505         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
19506         (process_bb_lives): Handle hard_regs_spilled_into.
19507         (lra_create_live_ranges_1): Before doing liveness propagation, clear
19508         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
19510 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
19512         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
19513         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
19514         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
19515         * config/rs6000/aix72.h: New file.
19517 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
19519         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
19520         instead of warning_at with conditional singular and plural messages
19521         where possible.
19523         PR target/52991
19524         * stor-layout.c (update_alignment_for_field): For
19525         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
19526         && !DECL_PACKED (field), do the alignment update, just use
19527         only desired_align instead of MAX (type_align, desired_align)
19528         as the alignment.
19529         (place_field): Don't do known_align < desired_align handling
19530         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
19531         is non-NULL, instead do it after rli->prev_field handling and
19532         only if not within a bitfield word.  For DECL_PACKED (field)
19533         use type_align of BITS_PER_UNIT.
19535 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
19537         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
19538         superfluous parentheses and trailing spaces.
19540 2018-02-28  Richard Biener  <rguenther@suse.de>
19542         PR tree-optimization/84584
19543         * graphite-scop-detection.c (scop_detection::add_scop): Discard
19544         SCoPs with fake exit edge.
19546 2018-02-28  Martin Liska  <mliska@suse.cz>
19548         PR testsuite/84597
19549         * timevar.c (timer::print): Fix format to properly print 100%
19550         values.
19552 2018-02-28  Richard Biener  <rguenther@suse.de>
19554         PR middle-end/84607
19555         * genmatch.c (capture_info::walk_match): Do not mark
19556         captured expressions without operands as expr_p given
19557         they act more like predicates and should be subject to
19558         "lost tail" side-effect preserving.
19560 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
19562         PR rtl-optimization/81611
19563         * auto-inc-dec.c (attempt_change): Move dead note from
19564         mem_insn if it's the next use of regno
19565         (find_address): Take address use of reg holding
19566         non-incremented value.  Add parm to limit search to the named
19567         reg only.
19568         (merge_in_block): Attempt to use a mem insn that is the next
19569         use of the original regno.
19571 2018-02-27  Martin Sebor  <msebor@redhat.com>
19573         PR c++/83871
19574         * doc/invoke.texi (-Wmissing-attributes): New option.
19575         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
19577 2018-02-27  Martin Sebor  <msebor@redhat.com>
19579         PR translation/84207
19580         * diagnostic-core.h (warning_n, error_n, inform_n): Change
19581         n argument to unsigned HOST_WIDE_INT.
19582         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
19583         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
19584         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
19585         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
19587 2018-02-27  Richard Biener  <rguenther@suse.de>
19589         PR tree-optimization/84512
19590         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
19591         Do not use the estimate returned from record_stmt_cost for
19592         the scalar iteration cost but sum properly using add_stmt_cost.
19594 2018-02-27  Richard Biener  <rguenther@suse.de>
19596         PR tree-optimization/84466
19597         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19598         Adjust last change to less strictly validate use operands.
19600 2018-02-27  Martin Liska  <mliska@suse.cz>
19602         PR gcov-profile/84548
19603         * gcov.c (process_file): Allow partial overlap and consider it
19604         also as group functions.
19605         (output_lines): Properly calculate range of lines for a group.
19607 2018-02-27  Martin Liska  <mliska@suse.cz>
19609         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
19610         'ggc' suffixes.  Change first column width.
19611         (timer::print): Fix formatting of the column.
19613 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
19615         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
19616         preserve inline entry blocks for the sake of debug inline
19617         entry point markers alone.
19618         (remove_unused_locals): Suggest in comments a better place to
19619         force the preservation of inline entry blocks that are
19620         otherwise unused, but do not preserve them.
19622 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19624         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
19626 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19628         PR target/84039
19629         * config/i386/constraints.md (Bs): Replace
19630         ix86_indirect_branch_register with
19631         TARGET_INDIRECT_BRANCH_REGISTER.
19632         (Bw): Likewise.
19633         * config/i386/i386.md (indirect_jump): Likewise.
19634         (tablejump): Likewise.
19635         (*sibcall_memory): Likewise.
19636         (*sibcall_value_memory): Likewise.
19637         Peepholes of indirect call and jump via memory: Likewise.
19638         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
19639         (*sibcall_value_GOT_32): Likewise.
19640         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19641         (GOT_memory_operand): Likewise.
19642         (call_insn_operand): Likewise.
19643         (sibcall_insn_operand): Likewise.
19644         (GOT32_symbol_operand): Likewise.
19645         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
19647 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
19649         PR rtl-optimization/83496
19650         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
19651         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
19652         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
19653         redundant insn, if any.
19654         (relax_delay_slots): Likewise.
19655         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
19657 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
19659         PR tree-optimization/83965
19660         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
19661         that grouped statements are part of a reduction chain.  Return
19662         true if the statement is not marked as a reduction itself but
19663         is part of a group.
19664         (vect_recog_dot_prod_pattern): Don't check whether the statement
19665         is part of a group here.
19666         (vect_recog_sad_pattern): Likewise.
19667         (vect_recog_widen_sum_pattern): Likewise.
19669 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
19671         PR debug/84545
19672         * final.c (rest_of_clean_state): Also look for calls inside sequences.
19674 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19676         PR target/84530
19677         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
19678         the bool argument.
19679         (ix86_output_indirect_function_return): New prototype.
19680         (ix86_split_simple_return_pop_internal): Likewise.
19681         * config/i386/i386.c (indirect_return_via_cx): New.
19682         (indirect_return_via_cx_bnd): Likewise.
19683         (indirect_thunk_name): Handle return va CX_REG.
19684         (output_indirect_thunk_function): Create alias for
19685         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
19686         (ix86_output_indirect_jmp): Remove the bool argument.
19687         (ix86_output_indirect_function_return): New function.
19688         (ix86_split_simple_return_pop_internal): Likewise.
19689         * config/i386/i386.md (*indirect_jump): Don't pass false
19690         to ix86_output_indirect_jmp.
19691         (*tablejump_1): Likewise.
19692         (simple_return_pop_internal): Change it to define_insn_and_split.
19693         Call ix86_split_simple_return_pop_internal to split it for
19694         -mfunction-return=.
19695         (simple_return_indirect_internal): Call
19696         ix86_output_indirect_function_return instead of
19697         ix86_output_indirect_jmp.
19699 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
19701         PR bootstrap/84405
19702         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
19703         memset and value initialization afterwards.
19705 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
19707         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
19709 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19711         PR target/84521
19712         * common/config/aarch64/aarch64-common.c
19713         (aarch_option_optimization_table[]): Switch
19714         off fomit-frame-pointer
19716 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
19717             Chung-Ju Wu  <jasonwucj@gmail.com>
19719         * config/nds32/nds32-multiple.md (load_multiple): Disallow
19720         volatile memory.
19721         (store_multiple): Ditto.
19723 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
19725         * config.gcc: Add --with-cpu support for nds32 target.
19726         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
19727         * config/nds32/nds32.opt: Add -mcpu= option.
19729 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
19731         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
19732         isel=yes): Warn for these deprecated options.
19734 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
19736         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
19737         ISA_2_5_MASKS_EMBEDDED.
19739 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
19741         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
19742         p->max as pointers rather than using iterative_hash_expr.
19744 2018-02-23  Carl Love  <cel@us.ibm.com>
19746         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
19747         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
19748         BU_P8V_OVERLOAD_2.
19749         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
19750         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
19751         P8V_BUILTIN_VEC_VUNSIGNED2.
19753 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
19755         PR target/81572
19756         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
19757         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
19758         LRA_UNKNOWN_ALT.
19759         * lra-constraints.c (curr_insn_transform): Set up
19760         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
19761         LRA_UNKNOWN_ALT.
19762         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
19763         * lra-eliminations.c (spill_pseudos): Ditto.
19764         (process_insn_for_elimination): Ditto.
19765         * lra-lives.c (reg_early_clobber_p): Use the new macros.
19766         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
19767         LRA_NON_CLOBBERED_ALT.
19769 2018-02-22  Martin Sebor  <msebor@redhat.com>
19771         PR tree-optimization/84480
19772         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
19773         to maybe_diag_stxncpy_trunc.  Call it.
19774         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
19775         from gimple_fold_builtin_strcpy.  Print inlining stack.
19776         (handle_builtin_stxncpy): Print inlining stack.
19777         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
19779 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
19781         PR target/84176
19782         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
19783         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
19784         and -fcheck-pointer-bounds are used together.
19785         (indirect_thunk_prefix): New enum.
19786         (indirect_thunk_need_prefix): New function.
19787         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
19788         "_nt" instead of "_bnd" for NOTRACK prefix.
19789         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
19790         (output_indirect_thunk_function): Likewise.
19791         (): Likewise.
19792         (ix86_code_end): Update output_indirect_thunk_function calls.
19793         (ix86_output_indirect_branch_via_reg): Replace
19794         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
19795         (ix86_output_indirect_branch_via_push): Likewise.
19796         (ix86_output_function_return): Likewise.
19797         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
19798         incompatible with -fcf-protection=branch and
19799         -fcheck-pointer-bounds.
19801 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19803         PR target/83335
19804         * config/aarch64/aarch64.c (aarch64_print_address_internal):
19805         Change gcc_assert call to output_operand_lossage.
19807 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19809         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
19811 2018-02-22  DJ Delorie  <dj@redhat.com>
19812             Sebastian Perta  <sebastian.perta@renesas.com>
19813             Oleg Endo  <olegendo@gcc.gnu.org>
19815         * config/rx/rx.c (rx_rtx_costs): New function.
19816         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
19818 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19820         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
19822 2018-02-22  Martin Liska  <mliska@suse.cz>
19824         PR driver/83193
19825         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
19826         Add "native" as a possible value.
19828 2018-02-22  Martin Liska  <mliska@suse.cz>
19830         PR driver/83193
19831         * config/i386/i386.c (ix86_option_override_internal):
19832         Add "native" as a possible value for -march and -mtune.
19834 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
19836         PR target/84502
19837         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
19838         to all type variants.
19840         PR tree-optimization/84503
19841         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
19842         width as info->bitpos + info->bitsize - start.
19843         (merged_store_group::merge_overlapping): Simplify width computation.
19844         (check_no_overlap): New function.
19845         (imm_store_chain_info::try_coalesce_bswap): Compute expected
19846         start + width and last_order of the group, fail if check_no_overlap
19847         fails.
19848         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
19849         to group if check_no_overlap fails.
19851 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19853         * config/rs6000/altivec.md: Delete contraint arguments to
19854         define_expand, define_split, and define_peephole2, and in
19855         define_insn_and_split if always unused.
19856         * config/rs6000/darwin.md: Ditto.
19857         * config/rs6000/dfp.md: Ditto.
19858         * config/rs6000/rs6000.md: Ditto.
19859         * config/rs6000/sync.md: Ditto.
19860         * config/rs6000/vector.md: Ditto.
19861         * config/rs6000/vsx.md: Ditto.
19863 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19865         * config/rs6000/altivec.md: Write output control strings as braced
19866         blocks instead of double-quoted strings.
19867         * config/rs6000/darwin.md: Ditto.
19868         * config/rs6000/rs6000.md: Ditto.
19869         * config/rs6000/vector.md: Ditto.
19870         * config/rs6000/vsx.md: Ditto.
19872 2018-02-21  Jason Merrill  <jason@redhat.com>
19874         PR c++/84314 - ICE with templates and fastcall attribute.
19875         * attribs.c (build_type_attribute_qual_variant): Remove assert.
19877 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19879         * ipa-cp.c (determine_versionability): Fix comment typos.
19881 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19883         PR c/84229
19884         * ipa-cp.c (determine_versionability): Do not version functions caling
19885         va_arg_pack.
19887 2018-02-21  Martin Liska  <mliska@suse.cz>
19889         PR driver/83193
19890         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
19891         Add "native" as a possible value.
19892         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
19893         the macro when native cpu detection is available.
19895 2018-02-21  Martin Liska  <mliska@suse.cz>
19897         PR driver/83193
19898         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
19899         Add "native" as a possible value.
19900         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
19901         when native cpu detection is available.
19903 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
19904             Martin Sebor  <msebor@redhat.com>
19906         PR tree-optimization/84478
19907         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
19908         false.
19909         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
19910         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
19911         support which is conservatively correct, for 2 only stay conservative
19912         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
19913         argument to the 2 argument get_range_strlen, adjust 6 arg
19914         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
19915         false.
19916         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
19917         (gimple_fold_builtin_strlen): Pass true as last argument to
19918         get_range_strlen.
19920 2018-02-20  Martin Sebor  <msebor@redhat.com>
19922         PR middle-end/84095
19923         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
19924         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
19925         (builtin_memref::builtin_memref): Factor out parts into
19926         set_base_and_offset and call it.
19928 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19930         PR middle-end/84406
19931         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
19932         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
19933         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
19934         search at the associated MODE_INT.
19936 2018-02-20  Jeff Law  <law@redhat.com>
19938         PR middle-end/82123
19939         PR tree-optimization/81592
19940         PR middle-end/79257
19941         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
19942         for range data rather than using global data.
19943         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
19944         range data rather than using global data.
19945         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
19946         pass it to children as needed.
19947         (struct directive::fmtresult): Similarly.
19948         (struct directive::set_width): Similarly.
19949         (struct directive::set_precision): Similarly.
19950         (format_integer, format_directive, parse_directive): Similarly.
19951         (format_none): Accept unnamed vr_values parameter.
19952         (format_percent, format_floating, format_character): Similarly.
19953         (format_string, format_plain): Similarly.
19954         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
19955         the EVRP range analyzer for range data rather than using global data.
19956         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
19957         gimple-ssa-evrp-analyze.h
19958         (class sprintf_dom_walker): Add after_dom_children member function.
19959         Add evrp_range_analyzer member.
19960         (sprintf_dom_walker::before_dom_children): Call into the EVRP
19961         range analyzer as needed.
19962         (sprintf_dom_walker::after_dom_children): New member function.
19963         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
19964         if not optimizing.
19965         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
19966         (evrp_range_analyzer::pop_to_marker): Likewise.
19968 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19970         PR tree-optimization/84419
19971         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
19972         with the required type if its current type is compatible but
19973         different.
19975 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
19977         PR middle-end/82004
19978         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
19979         after vectorization.
19981 2018-02-20  Martin Liska  <mliska@suse.cz>
19983         PR driver/83193
19984         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
19985         possible values if we don't have a hint.
19987 2018-02-20  Martin Liska  <mliska@suse.cz>
19989         PR c/84310
19990         PR target/79747
19991         * final.c (shorten_branches): Build align_tab array with one
19992         more element.
19993         * opts.c (finish_options): Add alignment option limit check.
19994         (MAX_CODE_ALIGN): Likewise.
19995         (MAX_CODE_ALIGN_VALUE): Likewise.
19996         * doc/invoke.texi: Document maximum allowed option value for
19997         all -falign-* options.
19999 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
20001         PR target/84146
20002         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20003         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20004         * var-tracking.c (emit_note_insn_var_location): Remove all references
20005         to NOTE_INSN_CALL_ARG_LOCATION.
20006         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20007         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20008         Use copy_rtx_if_shared.
20009         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20010         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20011         (dwarf2out_var_location): Remove handling of
20012         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20013         on call_insn.
20014         * final.c (final_scan_insn): Remove all references to
20015         NOTE_INSN_CALL_ARG_LOCATION.
20016         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
20017         before dumping final insns.
20018         * except.c (emit_note_eh_region_end): Remove all references to
20019         NOTE_INSN_CALL_ARG_LOCATION.
20020         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20021         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20022         * config/arc/arc.c (hwloop_optimize): Likewise.
20023         * config/arm/arm.c (create_fix_barrier): Likewise.
20024         * config/s390/s390.c (s390_chunkify_start): Likewise.
20025         * config/sh/sh.c (find_barrier): Likewise.
20026         * config/i386/i386.c (rest_of_insert_endbranch,
20027         ix86_seh_fixup_eh_fallthru): Likewise.
20028         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20029         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20030         * config/frv/frv.c (frv_function_prologue): Likewise.
20031         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
20032         reg note.
20033         (note_outside_basic_block_p): Remove all references to
20034         NOTE_INSN_CALL_ARG_LOCATION.
20035         * gengtype.c (adjust_field_rtx_def): Likewise.
20036         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20037         Likewise.
20038         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20039         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20041         PR c++/84444
20042         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20043         is ADDR_EXPR.
20045         PR tree-optimization/84452
20046         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20047         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20048         is NULL.
20050 2018-02-19  Martin Liska  <mliska@suse.cz>
20052         PR sanitizer/82183
20053         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20055 2018-02-19  Martin Liska  <mliska@suse.cz>
20056             Richard Sandiford  <richard.sandiford@linaro.org>
20058         PR tree-optimization/82491
20059         * gimple-fold.c (get_base_constructor): Make earlier bail out
20060         to prevent ubsan.
20062 2018-02-19  Carl Love  <cel@us.ibm.com>
20064         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20065         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20066         BU_P8V_OVERLOAD_1.
20067         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20068         P8V_BUILTIN_VEC_NEG.
20070 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
20072         * config/rl78/rl78.md (movdf): New define expand.
20074 2018-02-19  Martin Liska  <mliska@suse.cz>
20076         PR other/80589
20077         * doc/invoke.texi: Fix typo.
20078         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20080 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
20082         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20083         handle rs6000_single_float and rs6000_double_float specially for
20084         e500 family CPUs.
20086 2018-02-16  Jeff Law  <law@redhat.com>
20088         * config/rx/rx.c (add_pop_cfi_notes): New function.;
20089         (pop_regs): Use it.
20091 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20093         PR ipa/84425
20094         * ipa-inline.c (inline_small_functions): Fix a typo.
20096 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20098         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20100 2018-02-16  Carl Love  <cel@us.ibm.com>
20102         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20103         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20104         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20105         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20106         expansion to P8V_BUILTIN_VEC_FLOAT2.
20108 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20110         PR rtl-optimization/70023
20111         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20112         src_regno into account.
20114 2018-02-16  Carl Love  <cel@us.ibm.com>
20116         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20117         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20118         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20119         * config/rs6000/rs6000.c: Remove case statements for
20120         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20121         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20122         and P9V_BUILTIN_VEC_VINSERT4B.
20123         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20124         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20125         * config/rs6000/vsx.md:
20126         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20127         vec_insert4b.
20129 2018-02-16  Carl Love  <cel@us.ibm.com>
20131         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20132         vec_insert4b.
20133         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20134         definitions.
20135         * config/rs6000/rs6000-c.c: Add the definitions for
20136         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20137         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20138         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20139         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
20140         definition for insert4b and define insn *insert3b_internal.
20141         * doc/extend.texi: Add documentation for vec_extract4b.
20143 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20145         * doc/extend.texi (Backwards Compatibility): Mention friend
20146         injection.  Note for-scope is deprecated.
20147         * doc/invoke.texi (-ffriend-injection): Deprecate.
20149 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
20151         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20152         that moved to I2, also allow destinations that are a paradoxical
20153         subreg (instead of a normal reg).
20155 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
20157         PR target/83831
20158         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20159         to QImode.
20161 2018-02-16  Richard Biener  <rguenther@suse.de>
20163         PR tree-optimization/84037
20164         PR tree-optimization/84016
20165         PR target/82862
20166         * config/i386/i386.c (ix86_builtin_vectorization_cost):
20167         Adjust vec_construct for the fact we need additional higher latency
20168         128bit inserts for AVX256 and AVX512 vector builds.
20169         (ix86_add_stmt_cost): Scale vector construction cost for
20170         elementwise loads.
20172 2018-02-16  Richard Biener  <rguenther@suse.de>
20174         PR tree-optimization/84417
20175         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20176         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20177         (non_rewritable_lvalue_p): Likewise, use poly-ints.
20179 2018-02-16  Martin Liska  <mliska@suse.cz>
20181         PR sanitizer/84307
20182         * internal-fn.def (ASAN_CHECK): Set proper flags.
20183         (ASAN_MARK): Likewise.
20185 2018-02-16  Julia Koval  <julia.koval@intel.com>
20187         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20188         from PTA_CANNONLAKE.
20190 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20192         PR target/84272
20193         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20194         Use ++iter rather than iter++ for std::list iterators.
20195         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
20196         defer deleting them until all nodes in the forest are processed.  Do
20197         free even leaf nodes.  Change to_process into auto_vec.
20199         PR bootstrap/84405
20200         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20201         * vec.h (vec_default_construct): Use memset instead of placement new
20202         if BROKEN_VALUE_INITIALIZATION is defined.
20203         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20204         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20205         is defined.
20207         PR rtl-optimization/83723
20208         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20209         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
20210         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
20211         recursive calls.
20212         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20213         callers.
20214         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20216 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
20218         PR rtl-optimization/81443
20219         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20220         from inner REGs to paradoxical SUBREGs.
20222 2018-02-16  Richard Biener  <rguenther@suse.de>
20224         PR tree-optimization/84399
20225         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20226         For operands we can analyze at their definition make sure we can
20227         analyze them at each use as well.
20229 2018-02-16  Richard Biener  <rguenther@suse.de>
20231         PR tree-optimization/84190
20232         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20233         volatile accesses if the decl isn't volatile.
20235 2018-02-15  Jason Merrill  <jason@redhat.com>
20237         PR c++/84314 - ICE with templates and fastcall attribute.
20238         * attribs.c (build_type_attribute_qual_variant): Don't clobber
20239         TYPE_CANONICAL on an existing type.
20241 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
20243         PR tree-optimization/84383
20244         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20245         dstoff nor call operand_equal_p if dstbase is NULL.
20247         PR tree-optimization/84334
20248         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20249         also a CONSTANT_CLASS_P, punt.
20251 2018-02-14  Jim Wilson  <jimw@sifive.com>
20253         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20254         first SMALL_OPERAND check.  New local min_second_step.  Move assert
20255         to where locals are set.  Add TARGET_RVC support.
20256         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20258 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
20260         * doc/invoke.texi: Correct -Wformat-overflow code sample.
20262 2018-02-14  Martin Sebor  <msebor@redhat.com>
20264         PR tree-optimization/83698
20265         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20266         arrays constrain the offset range to their bounds.
20267         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20268         (builtin_access::overlap): Avoid setting the size of overlap if it's
20269         already been set.
20270         (maybe_diag_overlap): Also consider arrays when deciding what values
20271         of offsets to include in diagnostics.
20273 2018-02-14  Martin Sebor  <msebor@redhat.com>
20275         PR c/84108
20276         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20277         that correspond to the kind of a declaration.
20279 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
20281         PR target/83984
20282         * config/pa/pa.md: Load address of PIC label using the linkage table
20283         if the label is nonlocal.
20285 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20287         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20288         warning message if user requests -maltivec=be.
20289         * doc/invoke.texi: Document deprecation of -maltivec=be.
20291 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
20293         PR target/84220
20294         * config/rs6000/rs6000-c.c: Update definitions for
20295         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20296         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20298 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20300         PR target/84239
20301         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20302         add _get_ssp intrinsics. Remove argument from
20303         __builtin_ia32_rdssp[d|q].
20304         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20305         * config/i386/i386-builtin.def: Remove argument from
20306         __builtin_ia32_rdssp[d|q].
20307         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20308         ix86_expand_special_args_builtin for _rdssp[d|q].
20309         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20310         Clear register before usage.
20311         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20312         Add documentation for new _get_ssp and _inc_ssp intrinsics.
20314 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
20316         PR tree-optimization/84357
20317         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20318         operand 1 of an ARRAY_REF too.
20320 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
20322         PR target/83831
20323         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20324         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20325         declarations.
20326         (set_of_reg): New struct.
20327         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20328         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20329         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20330         functions.
20331         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20332         Split into bitclr, bitset, bitinvert patterns if appropriate.
20333         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20334         use rx_fuse_in_memory_bitop.
20335         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20336         to named insn, correct maximum insn length.
20338 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
20340         PR target/79242
20341         * machmode.def: Define a complex mode for PARTIAL_INT.
20342         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
20343         MODE_PARTIAL_INT.
20344         * doc/rtl.texi: Document CSPImode.
20345         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
20346         handling.
20347         (msp430_hard_regno_nregs_with_padding): Likewise.
20349 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
20351         PR target/84279
20352         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
20354 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
20356         PR rtl-optimization/84169
20357         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
20358         we generated a parallel as new i3 and we split that to new i2 and i3
20359         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
20360         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
20361         those to i2, not i1.  Partially rewrite this scan code.
20363 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
20365         PR c/82210
20366         * stor-layout.c (place_field): For variable length fields, adjust
20367         offset_align afterwards not just based on the field's alignment,
20368         but also on the size.
20370         PR middle-end/84309
20371         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
20372         of exps and logs in the use_exp2 case.
20374 2018-02-13  Jeff Law  <law@redhat.com>
20376         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
20377         entry for "vector".
20379         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
20380         ARGS as unused.
20382 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
20384         PR debug/84342
20385         PR debug/84319
20386         * common.opt (gas-loc-support, gas-locview-support): New.
20387         (ginline-points, ginternal-reset-location-views): New.
20388         * doc/invoke.texi: Document them.  Use @itemx where intended.
20389         (gvariable-location-views): Adjust.
20390         * target.def (reset_location_view): New.
20391         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
20392         (TARGET_RESET_LOCATION_VIEW): New.
20393         * doc/tm.texi: Rebuilt.
20394         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
20395         (dwarf2out_default_as_locview_support): New.
20396         (output_asm_line_debug_info): Use option variables.
20397         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
20398         (output_loc_list): Likewise.
20399         (add_high_low_attributes): Check option variables.
20400         Don't output entry view attribute in strict mode.
20401         (gen_inlined_subroutine_die): Check option variables.
20402         (dwarf2out_inline_entry): Likewise.
20403         (init_sections_and_labels): Likewise.
20404         (dwarf2out_early_finish): Likewise.
20405         (maybe_reset_location_view): New, from...
20406         (dwarf2out_var_location): ... here.  Call it.
20407         * debug.h (dwarf2out_default_as_loc_support): Declare.
20408         (dwarf2out_default_as_locview_support): Declare.
20409         * hooks.c (hook_int_rtx_insn_0): New.
20410         * hooks.h (hook_int_rtx_insn_0): Declare.
20411         * toplev.c (process_options): Take -gas-loc-support and
20412         -gas-locview-support from dwarf2out.  Enable
20413         -gvariable-location-views by default only with locview
20414         assembler support.  Enable -ginternal-reset-location-views by
20415         default only if the target defines the corresponding hook.
20416         Enable -ginline-points by default if location views are
20417         enabled; force it disabled if statement frontiers are
20418         disabled.
20419         * tree-inline.c (expand_call_inline): Check option variables.
20420         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
20422 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
20424         PR tree-optimization/84321
20425         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
20426         handling.  Also check whether the anti-range contains any values
20427         that satisfy the mask; switch to a VR_RANGE if not.
20429 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
20431         PR sanitizer/84340
20432         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
20434 2018-02-13  Martin Jambor  <mjambor@suse.cz>
20436         PR c++/83990
20437         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
20438         of call statements, also set location of a load to a temporary.
20440 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
20442         * config/rl78/rl78.c (add_vector_labels): New function.
20443         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
20444         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
20445         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
20446         which checks that no arguments are passed.
20447         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
20448         * doc/extend.texi: Documentation for the new attribute.
20450 2018-02-13  Andreas Schwab  <schwab@suse.de>
20452         * config/riscv/linux.h (CPP_SPEC): Define.
20454 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
20456         PR target/84335
20457         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
20458         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
20459         OPTION_MASK_ISA_AES as first argument to def_builtin_const
20460         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
20461         instead of OPTION_MASK_ISA_PCLMUL as first argument to
20462         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
20463         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
20464         temporarily for AES and PCLMUL builtins.
20466         PR tree-optimization/84339
20467         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
20468         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
20469         Formatting fixes.
20471         PR middle-end/84309
20472         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
20473         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
20474         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
20475         inline function.
20476         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
20477         inline function.
20478         * omp-simd-clone.h: New file.
20479         * omp-simd-clone.c: Include omp-simd-clone.h.
20480         (expand_simd_clones): No longer static.
20481         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
20482         cgraph.h and omp-simd-clone.h.
20483         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
20484         (vect_recog_widen_shift_pattern): Formatting fix.
20485         (vect_pattern_recog_1): Don't check optab for calls.
20487         PR target/84336
20488         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
20489         operands[2] into a REG before using gen_lowpart on it.
20491 2018-02-12  Jeff Law  <law@redhat.com>
20493         PR target/83760
20494         * config/sh/sh.c (find_barrier): Consider a sibling call
20495         a barrier as well.
20497         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
20498         successfully back substituting a reg.
20500 2018-02-12  Richard Biener  <rguenther@suse.de>
20502         PR tree-optimization/84037
20503         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
20504         parameter, move visited init to caller.
20505         (vect_slp_analyze_operations): Separate cost from validity
20506         check, initialize visited once for all instances.
20507         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
20508         for all instances.
20509         * tree-vect-stmts.c (vect_model_simple_cost): Make early
20510         out an assert.
20511         (vect_model_promotion_demotion_cost): Likewise.
20512         (vectorizable_bswap): Guard cost modeling with !slp_node
20513         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
20514         SLP stmts.
20515         (vectorizable_call): Likewise.
20516         (vectorizable_conversion): Likewise.
20517         (vectorizable_assignment): Likewise.
20518         (vectorizable_shift): Likewise.
20519         (vectorizable_operation): Likewise.
20520         (vectorizable_store): Likewise.
20521         (vectorizable_load): Likewise.
20522         (vectorizable_condition): Likewise.
20523         (vectorizable_comparison): Likewise.
20525 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
20527         PR sanitizer/84307
20528         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
20529         (ASAN_MARK): Fix fnspec to account for return value, change pointer
20530         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
20532 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
20534         PR middle-end/83665
20535         * params.def (inline-min-speedup): Increase from 8 to 15.
20536         (max-inline-insns-auto): Decrease from 40 to 30.
20537         * ipa-split.c (consider_split): Add some buffer for function to
20538         be considered inlining candidate.
20539         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
20540         default values.
20542 2018-02-12  Richard Biener  <rguenther@suse.de>
20544         PR tree-optimization/84037
20545         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
20546         matched stmts if we cannot swap the non-matched ones.
20548 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
20550         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
20551         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
20552         _mm_maskz_scalef_round_ss): New intrinsics.
20553         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
20554         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
20555         __builtin_ia32_scalefss_round): Remove.
20556         (__builtin_ia32_scalefsd_mask_round,
20557         __builtin_ia32_scalefss_mask_round): New intrinsics.
20558         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
20559         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
20560         ((match_operand:VF_128 2 "<round_nimm_predicate>"
20561         "<round_constraint>")): Changed to ...
20562         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
20563         "<round_scalar_constraint>")): ... this.
20564         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
20565         %0, %1, %2<round_op3>}"): Changed to ...
20566         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
20567         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
20568         %2<round_scalar_mask_op3>}"): ... this.
20569         * config/i386/subst.md (round_scalar_nimm_predicate): New.
20571 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
20573         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
20574         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
20575         (_mm_maskz_sqrt_round_ss): New intrinsics.
20576         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
20577         (__builtin_ia32_sqrtsd_mask_round)
20578         (__builtin_ia32_sqrtss_mask_round): New builtins.
20579         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
20580         (__builtin_ia32_sqrtss_round): Remove.
20581         (__builtin_ia32_sqrtsd_mask_round)
20582         (__builtin_ia32_sqrtss_mask_round): New builtins.
20583         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
20584         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
20585         ((match_operand:VF_128 1 "vector_operand"
20586         "xBm,<round_constraint>")): Changed to ...
20587         ((match_operand:VF_128 1 "vector_operand"
20588         "xBm,<round_scalar_constraint>")): ... this.
20589         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
20590         %0, %2, %<iptr>1<round_op3>}): Changed to ...
20591         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
20592         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
20593         %<iptr>1<round_scalar_mask_op3>}): ... this.
20594         ((set_attr "prefix" "<round_prefix>")): Changed to ...
20595         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
20597 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
20599         PR target/84266
20600         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
20601         Cast vec_cmpeq result to correct type.
20602         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
20603         Cast vec_cmpgt result to correct type.
20605 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
20607         * final.c (final_scan_insn_1): Renamed from...
20608         (final_scan_insn): ... this.  New wrapper, to recover
20609         seen from the outermost call in recursive ones.
20610         * config/sparc/sparc.c (output_return): Drop seen from call.
20611         (output_sibcall): Likewise.
20612         * config/visium/visium.c (output_branch): Likewise.
20614 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
20616         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
20617         function label.
20619 2018-02-10  Alan Modra  <amodra@gmail.com>
20621         PR target/84300
20622         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
20623         Specify LR as an input.
20625 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
20627         PR sanitizer/83987
20628         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
20629         remove_member_access_dummy_vars): New functions.
20630         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
20631         lower_omp_1, execute_lower_omp): Use them.
20633         PR rtl-optimization/84308
20634         * shrink-wrap.c (spread_components): Release todo vector.
20636 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
20638         PR rtl-optimization/57193
20639         * ira-color.c (struct allocno_color_data): Add member
20640         conflict_allocno_hard_prefs.
20641         (update_conflict_allocno_hard_prefs): New.
20642         (bucket_allocno_compare_func): Add a preference based on
20643         conflict_allocno_hard_prefs.
20644         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
20645         (color_allocnos): Remove a dead code.  Initiate
20646         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
20648 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
20650         PR target/84226
20651         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
20652         constraint from =wa to wa.  Avoid a subreg on the output operand,
20653         instead use a pseudo and subreg it in a move.
20654         (p9_xxbrd_<mode>): Changed to ...
20655         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
20656         (p9_xxbrd_v2df): New expander.
20657         (p9_xxbrw_<mode>): Changed to ...
20658         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
20659         (p9_xxbrw_v4sf): New expander.
20661 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
20663         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
20665 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
20667         PR target/83926
20668         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
20669         multiply in 32-bit mode.
20670         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
20671         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
20672         mode.
20674 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
20676         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
20677         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
20678         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
20679         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
20681 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
20683         PR lto/84213
20684         * dwarf2out.c (is_trivial_indirect_ref): New function.
20685         (dwarf2out_late_global_decl): Do not generate a location
20686         attribute for variables that have a non-trivial DECL_VALUE_EXPR
20687         and that are not defined in the current unit.
20689 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
20691         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
20692         instead of a libcall for UNORDERED.
20694 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
20696         PR target/82641
20697         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
20698         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
20700 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20702         PR target/PR84295
20703         * config/s390/s390.c (s390_set_current_function): Invoke
20704         s390_indirect_branch_settings also if fndecl didn't change.
20706 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
20708         * config/rs6000/rs6000.md (blockage): Set length to zero.
20710 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
20712         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
20714 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
20716         PR sanitizer/84285
20717         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
20718         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
20719         -static-lib*san.
20721         PR debug/84252
20722         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
20723         PARALLEL incoming that failed vt_get_decl_and_offset check.
20725         PR middle-end/84237
20726         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
20727         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
20728         TREE_READONLY bit.
20729         (get_variable_section): For decls in named .bss* sections pass true as
20730         second argument to bss_initializer_p.
20732 2018-02-09  Marek Polacek  <polacek@redhat.com>
20733             Jakub Jelinek  <jakub@redhat.com>
20735         PR c++/83659
20736         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
20737         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
20738         Sync some changes from cxx_fold_indirect_ref.
20740 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
20742         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
20743         markers.
20744         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
20745         (BLOCK_INLINE_ENTRY_LABEL): New.
20746         (dwarf2out_var_location): Disregard inline entry markers.
20747         (inline_entry_data): New struct.
20748         (inline_entry_data_hasher): New hashtable type.
20749         (inline_entry_data_hasher::hash): New.
20750         (inline_entry_data_hasher::equal): New.
20751         (inline_entry_data_table): New variable.
20752         (add_high_low_attributes): Add DW_AT_entry_pc and
20753         DW_AT_GNU_entry_view attributes if a pending entry is found
20754         in inline_entry_data_table.  Add old entry_pc attribute only
20755         if debug nonbinding markers are disabled.
20756         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
20757         markers are enabled.
20758         (block_within_block_p, dwarf2out_inline_entry): New.
20759         (dwarf2out_finish): Check that no entries remained in
20760         inline_entry_data_table.
20761         * final.c (reemit_insn_block_notes): Handle inline entry notes.
20762         (final_scan_insn, notice_source_line): Likewise.
20763         (rest_of_clean_state): Skip inline entry markers.
20764         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
20765         markers.
20766         * gimple.c (gimple_build_debug_inline_entry): New.
20767         * gimple.h (enum gimple_debug_subcode): Add
20768         GIMPLE_DEBUG_INLINE_ENTRY.
20769         (gimple_build_debug_inline_entry): Declare.
20770         (gimple_debug_inline_entry_p): New.
20771         (gimple_debug_nonbind_marker_p): Adjust.
20772         * insn-notes.def (INLINE_ENTRY): New.
20773         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
20774         inline entry marker notes.
20775         (print_insn): Likewise.
20776         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
20777         (INSN_DEBUG_MARKER_KIND): Likewise.
20778         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
20779         * tree-inline.c (expand_call_inline): Build and insert
20780         debug_inline_entry stmt.
20781         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
20782         inline entry blocks early, if nonbind markers are enabled.
20783         (dump_scope_block): Dump fragment info.
20784         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
20785         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
20786         (gimple_build_debug_inline_entry): New.
20787         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
20788         Enable/disable inline entry points too.
20789         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
20790         (DEBUG_INSN): Describe inline entry markers.
20792         * common.opt (gvariable-location-views): New.
20793         (gvariable-location-views=incompat5): New.
20794         * config.in: Rebuilt.
20795         * configure: Rebuilt.
20796         * configure.ac: Test assembler for view support.
20797         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
20798         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
20799         * dwarf2out.c (var_loc_view): New typedef.
20800         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
20801         (dwarf2out_locviews_in_attribute): New.
20802         (dwarf2out_locviews_in_loclist): New.
20803         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
20804         (enum dw_line_info_opcode): Add LI_adv_address.
20805         (struct dw_line_info_table): Add view.
20806         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
20807         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
20808         (zero_view_p): New variable.
20809         (ZERO_VIEW_P): New macro.
20810         (output_asm_line_debug_info): New.
20811         (struct var_loc_node): Add view.
20812         (add_AT_view_list, AT_loc_list): New.
20813         (add_var_loc_to_decl): Add view param.  Test it against last.
20814         (new_loc_list): Add view params.  Record them.
20815         (AT_loc_list_ptr): Handle loc and view lists.
20816         (view_list_to_loc_list_val_node): New.
20817         (print_dw_val): Handle dw_val_class_view_list.
20818         (size_of_die): Likewise.
20819         (value_format): Likewise.
20820         (loc_list_has_views): New.
20821         (gen_llsym): Set vl_symbol too.
20822         (maybe_gen_llsym, skip_loc_list_entry): New.
20823         (dwarf2out_maybe_output_loclist_view_pair): New.
20824         (output_loc_list): Output view list or entries too.
20825         (output_view_list_offset): New.
20826         (output_die): Handle dw_val_class_view_list.
20827         (output_dwarf_version): New.
20828         (output_compilation_unit_header): Use it.
20829         (output_skeleton_debug_sections): Likewise.
20830         (output_rnglists, output_line_info): Likewise.
20831         (output_pubnames, output_aranges): Update version comments.
20832         (output_one_line_info_table): Output view numbers in asm comments.
20833         (dw_loc_list): Determine current endview, pass it to new_loc_list.
20834         Call maybe_gen_llsym.
20835         (loc_list_from_tree_1): Adjust.
20836         (add_AT_location_description): Create view list attribute if
20837         needed, check it's absent otherwise.
20838         (convert_cfa_to_fb_loc_list): Adjust.
20839         (maybe_emit_file): Call output_asm_line_debug_info for test.
20840         (dwarf2out_var_location): Reset views as needed.  Precompute
20841         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
20842         attribute.  Set view.
20843         (new_line_info_table): Reset next view.
20844         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
20845         (dwarf2out_source_line): Likewise.  Output view resets and labels to
20846         the assembler, or select appropriate line info opcodes.
20847         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
20848         (optimize_string_length): Catch it.  Adjust.
20849         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
20850         dw_val_class_view_list, and remove it if no longer needed.
20851         (hash_loc_list): Hash view numbers.
20852         (loc_list_hasher::equal): Compare them.
20853         (optimize_location_lists): Check whether a view list symbol is
20854         needed, and whether the locview attribute is present, and
20855         whether they match.  Remove the locview attribute if no longer
20856         needed.
20857         (index_location_lists): Call skip_loc_list_entry for test.
20858         (dwarf2out_finish): Call output_asm_line_debug_info for test.
20859         Use output_dwarf_version.
20860         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
20861         (struct dw_val_node): Add val_view_list.
20862         * final.c (SEEN_NEXT_VIEW): New.
20863         (set_next_view_needed): New.
20864         (clear_next_view_needed): New.
20865         (maybe_output_next_view): New.
20866         (final_start_function): Rename to...
20867         (final_start_function_1): ... this.  Take pointer to FIRST,
20868         add SEEN parameter.  Emit param bindings in the initial view.
20869         (final_start_function): Reintroduce SEEN-less interface.
20870         (final): Rename to...
20871         (final_1): ... this.  Take SEEN parameter.  Output final pending
20872         next view at the end.
20873         (final): Reintroduce seen-less interface.
20874         (final_scan_insn): Output pending next view before switching
20875         sections or ending a block.  Mark the next view as needed when
20876         outputting variable locations.  Notify debug backend of section
20877         changes, and of location view changes.
20878         (rest_of_handle_final): Adjust.
20879         * toplev.c (process_options): Autodetect value for debug variable
20880         location views option.  Warn on incompat5 without -gdwarf-5.
20881         * doc/invoke.texi (gvariable-location-views): New.
20882         (gvariable-location-views=incompat5): New.
20883         (gno-variable-location-views): New.
20885 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
20887         PR tree-optimization/84136
20888         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
20889         that the result of find_edge is non-NULL.
20891 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20893         PR target/83008
20894         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
20895         storing integer register in SImode.  Fix cost of 256 and 512
20896         byte aligned SSE register store.
20898 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20900         * config/i386/i386.c (ix86_multiplication_cost): Fix
20901         multiplication cost for TARGET_AVX512DQ.
20903 2018-02-08  Marek Polacek  <polacek@redhat.com>
20905         PR tree-optimization/84238
20906         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
20907         get_range_strlen.
20909 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20911         PR tree-optimization/84265
20912         * tree-vect-stmts.c (vectorizable_store): Don't treat
20913         VMAT_CONTIGUOUS accesses as grouped.
20914         (vectorizable_load): Likewise.
20916 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20918         PR tree-optimization/81635
20919         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
20920         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
20921         (test_round_for_mask): New functions.
20922         (wide_int_cc_tests): Call test_round_for_mask.
20923         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
20924         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
20925         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
20926         range returned by get_range_info.
20928 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
20930         PR ipa/81360
20931         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
20932         * symtab.c: Include builtins.h
20933         (symtab_node::output_to_lto_symbol_table_p): Move here
20934         from lto-streamer-out.c:output_symbol_p.
20935         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
20936         (output_symbol_p): Move all logic to symtab.c
20937         (produce_symtab): Update.
20939 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20941         * config/s390/s390-opts.h (enum indirect_branch): Define.
20942         * config/s390/s390-protos.h (s390_return_addr_from_memory)
20943         (s390_indirect_branch_via_thunk)
20944         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
20945         (enum s390_indirect_branch_type): Define.
20946         * config/s390/s390.c (struct s390_frame_layout, struct
20947         machine_function): Remove.
20948         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
20949         (indirect_branch_table_label_no, indirect_branch_table_name):
20950         Define variables.
20951         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
20952         (enum s390_indirect_branch_option): Define.
20953         (s390_return_addr_from_memory): New function.
20954         (s390_handle_string_attribute): New function.
20955         (s390_attribute_table): Add new attribute handler.
20956         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
20957         (s390_indirect_branch_via_thunk): New function.
20958         (s390_indirect_branch_via_inline_thunk): New function.
20959         (s390_function_ok_for_sibcall): When jumping via thunk disallow
20960         sibling call optimization for non z10 compiles.
20961         (s390_emit_call): Force indirect branch target to be a single
20962         register.  Add r1 clobber for non-z10 compiles.
20963         (s390_emit_epilogue): Emit return jump via return_use expander.
20964         (s390_reorg): Handle JUMP_INSNs as execute targets.
20965         (s390_option_override_internal): Perform validity checks for the
20966         new command line options.
20967         (s390_indirect_branch_attrvalue): New function.
20968         (s390_indirect_branch_settings): New function.
20969         (s390_set_current_function): Invoke s390_indirect_branch_settings.
20970         (s390_output_indirect_thunk_function):  New function.
20971         (s390_code_end): Implement target hook.
20972         (s390_case_values_threshold): Implement target hook.
20973         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
20974         macros.
20975         * config/s390/s390.h (struct s390_frame_layout)
20976         (struct machine_function): Move here from s390.c.
20977         (TARGET_INDIRECT_BRANCH_NOBP_RET)
20978         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
20979         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
20980         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
20981         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
20982         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
20983         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
20984         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
20985         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
20986         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
20987         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
20988         (mnemonic attribute): Add values which aren't recognized
20989         automatically.
20990         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
20991         pattern for branch conversion.  Fix mnemonic attribute.
20992         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
20993         indirect branch via thunk if requested.
20994         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
20995         ("*indirect_jump"): Disable for branch conversion using out of
20996         line thunks.
20997         ("indirect_jump_via_thunk<mode>_z10")
20998         ("indirect_jump_via_thunk<mode>")
20999         ("indirect_jump_via_inlinethunk<mode>_z10")
21000         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21001         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21002         ("casesi_jump_via_inlinethunk<mode>_z10")
21003         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21004         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21005         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21006         ("*indirect2_jump"): Disable for branch conversion.
21007         ("casesi_jump"): Turn into expander and expand patterns for branch
21008         conversion.
21009         ("return_use"): New expander.
21010         ("*return"): Emit return via thunk and rename it to ...
21011         ("*return<mode>"): ... this one.
21012         * config/s390/s390.opt: Add new options and and enum for the
21013         option values.
21015 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
21017         * lra-constraints.c (match_reload): Unconditionally use
21018         gen_lowpart_SUBREG, rather than selecting between that
21019         and equivalent gen_rtx_SUBREG code.
21021 2018-02-08  Richard Biener  <rguenther@suse.de>
21023         PR tree-optimization/84233
21024         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21025         changed flag instead of boguously re-using phi_inserted.
21027 2018-02-08  Martin Jambor  <mjambor@suse.cz>
21029         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21030         static local variables.
21032 2018-02-08  Richard Biener  <rguenther@suse.de>
21034         PR tree-optimization/84278
21035         * tree-vect-stmts.c (vectorizable_store): When looking for
21036         smaller vector types to perform grouped strided loads/stores
21037         make sure the mode is supported by the target.
21038         (vectorizable_load): Likewise.
21040 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21042         * config/aarch64/aarch64.c (aarch64_components_for_bb):
21043         Increase LDP/STP opportunities by adding adjacent callee-saves.
21045 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
21047         PR rtl-optimization/84068
21048         PR rtl-optimization/83459
21049         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21051 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
21053         PR tree-optimization/84224
21054         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21055         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21056         non-zero arguments.
21058 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
21060         PR target/84113
21061         * config/rs6000/altivec.md (*restore_world): Remove LR use.
21062         * config/rs6000/predicates.md (restore_world_operation): Adjust op
21063         count, remove one USE.
21065 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21067         * doc/install.texi (Configuration): Document the
21068         --with-long-double-format={ibm,ieee} PowerPC configuration
21069         options.
21071         PR target/84154
21072         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21073         Convert from define_expand to be define_insn_and_split.  Rework
21074         float/double/_Float128 conversions to QI/HI/SImode to work with
21075         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
21076         conversions to QI/HImode types did a store and then a load to
21077         truncate the value.  For conversions to VSX registers, don't split
21078         the insn, instead emit the code directly.  Use the code iterator
21079         any_fix to combine signed and unsigned conversions.
21080         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21081         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21082         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21083         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21084         (fix_<mode>di2_hw): Likewise.
21085         (fixuns_<mode>di2_hw): Likewise.
21086         (fix_<mode>si2_hw): Likewise.
21087         (fixuns_<mode>si2_hw): Likewise.
21088         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21089         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21090         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21091         fix<uns>_trunc<SFDF:mode>si2_p8.
21092         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21093         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21094         (fix<uns>_<mode>_mem): Likewise.
21095         (fctiw<u>z_<mode>_mem): Likewise.
21096         (fix<uns>_<mode>_mem): Likewise.
21097         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21098         the register allocator from doing a direct move to the GPRs to do
21099         a store, and instead use the ISA 3.0 store byte/half-word from
21100         vector register instruction.  For IEEE 128-bit floating point,
21101         also optimize stores of 32-bit ints.
21102         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21104 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21106         * genextract.c (push_pathstr_operand): New function to support
21107         [a-zA-Z].
21108         (walk_rtx): Call push_pathstr_operand.
21109         (print_path): Support [a-zA-Z].
21111 2018-02-07  Richard Biener  <rguenther@suse.de>
21113         PR tree-optimization/84037
21114         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21115         (cse_and_gimplify_to_preheader): Declare.
21116         (vect_get_place_in_interleaving_chain): Likewise.
21117         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21118         ivexpr_map.
21119         (_loop_vec_info::~_loop_vec_info): Delete it.
21120         (cse_and_gimplify_to_preheader): New function.
21121         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21122         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21123         (vectorizable_load): Likewise.  For grouped stores always base
21124         the IV on the first element.
21125         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21126         condition before gimplifying.
21128 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21130         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21131         *DIV_EXPR and *MOD_EXPR.
21133 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21135         PR target/84248
21136         * config/i386/i386.c (ix86_option_override_internal): Mask out
21137         the CF_SET bit when checking -fcf-protection.
21139 2018-02-07  Tom de Vries  <tom@codesourcery.com>
21141         PR libgomp/84217
21142         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21143         enough.
21145 2018-02-07  Richard Biener  <rguenther@suse.de>
21147         PR tree-optimization/84204
21148         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21149         this place.
21151         PR tree-optimization/84205
21152         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21153         special-case isl_ast_op_zdiv_r.
21155         PR tree-optimization/84223
21156         * graphite-scop-detection.c (gather_bbs::before_dom_children):
21157         Only add conditions from within the region.
21158         (gather_bbs::after_dom_children): Adjust.
21160 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
21162         PR target/84209
21163         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21164         * config/avr/avr.md: Only post-reload split REG-REG moves if
21165         either register is GENERAL_REG_P.
21167 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21169         PR tree-optimization/84235
21170         * tree-ssa-scopedtables.c
21171         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21172         if the subtraction is performed in floating point type where NaNs are
21173         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21174         build 1.  Formatting fix.
21176 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
21178         PR target/84146
21179         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21180         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21181         and skip it regardless of bb boundaries.  Use CALL_P macro,
21182         don't test INSN_P (insn) together with CALL_P or JUMP_P check
21183         unnecessarily, formatting fix.
21185 2018-02-06  Michael Collison  <michael.collison@arm.com>
21187         * config/arm/thumb2.md:
21188         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21189         (*thumb_mov_notscc): Ditto.
21191 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
21193         PR target/84154
21194         * config/rs6000/rs6000.md (su code attribute): Use "u" for
21195         unsigned_fix, not "s".
21197 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21199         * configure.ac (gcc_fn_eh_frame_ro): New function.
21200         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21201         correct .eh_frame permissions.
21202         * configure: Regenerate.
21204 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
21206         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21207         irrelevant options.
21209 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21211         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21212         Display warning message for -mno-speculate-indirect-jumps.
21214 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
21216         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21217         Undocumented.
21218         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21220 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
21222         PR tree-optimization/84225
21223         * tree-eh.c (find_trapping_overflow): Only call
21224         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21226 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21228         PR target/84145
21229         * config/i386/i386.c: Reimplement the check of possible options
21230         -mibt/-mshstk conbination. Change error messages.
21231         * doc/invoke.texi: Fix a typo: remove extra '='.
21233 2018-02-06  Marek Polacek  <polacek@redhat.com>
21235         PR tree-optimization/84228
21236         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21238 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
21240         PR target/82641
21241         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21242         emitted arch directives.
21243         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21244         __ARM_FEATURE_COPROC before changing architectures.
21246 2018-02-06  Richard Biener  <rguenther@suse.de>
21248         * config/i386/i386.c (print_reg): Fix typo.
21249         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21251 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
21253         * configure: Regenerate.
21255 2018-02-05  Martin Sebor  <msebor@redhat.com>
21257         PR tree-optimization/83369
21258         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21259         inlining context.
21261 2018-02-05  Martin Liska  <mliska@suse.cz>
21263         * doc/invoke.texi: Cherry-pick upstream r323995.
21265 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
21267         * ira.c (ira_init_register_move_cost): Adjust comment.
21269 2018-02-05  Martin Liska  <mliska@suse.cz>
21271         PR gcov-profile/84137
21272         * doc/gcov.texi: Fix typo in documentation.
21274 2018-02-05  Martin Liska  <mliska@suse.cz>
21276         PR gcov-profile/83879
21277         * doc/gcov.texi: Document necessity of --dynamic-list-data when
21278         using dlopen functionality.
21280 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
21282         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21283         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21284         _mm_maskz_range_ss, _mm_mask_range_round_ss,
21285         _mm_maskz_range_round_ss): New intrinsics.
21286         (__builtin_ia32_rangesd128_round)
21287         (__builtin_ia32_rangess128_round): Remove.
21288         (__builtin_ia32_rangesd128_mask_round,
21289         __builtin_ia32_rangess128_mask_round): New builtins.
21290         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21291         __builtin_ia32_rangess128_round): Remove.
21292         (__builtin_ia32_rangesd128_mask_round,
21293         __builtin_ia32_rangess128_mask_round): New builtins.
21294         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21295         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21296         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21297         "<round_saeonly_constraint>")): Changed to ...
21298         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21299         "<round_saeonly_scalar_constraint>")): ... this.
21300         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21301         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21302         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21303         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21304         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21306 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
21308         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21309         options.
21310         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21311         Remove all values except native, 8540 and 8548.
21313 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
21315         * config/i386/i386.c (ix86_output_function_return): Pass
21316         INVALID_REGNUM, instead of -1, as invalid register number to
21317         indirect_thunk_name and output_indirect_thunk.
21319 2018-02-02  Julia Koval  <julia.koval@intel.com>
21321         * config.gcc: Add -march=icelake.
21322         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21323         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21324         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21325         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21326         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21327         (processor_target_table): Add icelake.
21328         (ix86_option_override_internal): Handle new PTAs.
21329         (get_builtin_code_for_version): Handle icelake.
21330         (M_INTEL_COREI7_ICELAKE): New.
21331         (fold_builtin_cpu): Handle icelake.
21332         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21333         * doc/invoke.texi: Add -march=icelake.
21335 2018-02-02  Julia Koval  <julia.koval@intel.com>
21337         * config/i386/i386.c (ix86_option_override_internal): Change flags type
21338         to wide_int_bitmask.
21339         * wide-int-bitmask.h: New.
21341 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21343         PR target/84066
21344         * config/i386/i386.md: Replace Pmode with word_mode in
21345         builtin_setjmp_setup and builtin_longjmp to support x32.
21347 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
21349         PR target/56010
21350         PR target/83743
21351         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
21352         #include "opts.h".
21353         (rs6000_supported_cpu_names): New static variable.
21354         (linux_cpu_translation_table): Likewise.
21355         (elf_platform) <cpu>: Define new static variable and use it.
21356         Translate kernel AT_PLATFORM name to canonical name if needed.
21357         Error if platform name is unknown.
21359 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
21361         PR target/84089
21362         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
21364 2018-02-01  Jeff Law  <law@redhat.com>
21366         PR target/84128
21367         * config/i386/i386.c (release_scratch_register_on_entry): Add new
21368         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
21369         the scratch if RELEASE_VIA_POP is false.
21370         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
21371         If we have to save a temporary register, decrement SIZE appropriately.
21372         Pass new arguments to release_scratch_register_on_entry.
21373         (ix86_adjust_stack_and_probe): Likewise.
21374         (ix86_emit_probe_stack_range): Pass new arguments to
21375         release_scratch_register_on_entry.
21377 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
21379         PR rtl-optimization/84157
21380         * combine.c (change_zero_ext): Use REG_P predicate in
21381         front of HARD_REGISTER_P predicate.
21383 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
21385         * config/avr/avr.c (avr_option_override): Move disabling of
21386         -fdelete-null-pointer-checks to...
21387         * common/config/avr/avr-common.c (avr_option_optimization_table):
21388         ...here.
21390 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21392         PR tree-optimization/81635
21393         * tree-data-ref.c (split_constant_offset_1): For types that
21394         wrap on overflow, try to use range info to prove that wrapping
21395         cannot occur.
21397 2018-02-01  Renlin Li  <renlin.li@arm.com>
21399         PR target/83370
21400         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
21401         TAILCALL_ADDR_REGS.
21402         (aarch64_register_move_cost): Likewise.
21403         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
21404         TAILCALL_ADDR_REGS.
21405         (REG_CLASS_NAMES): Likewise.
21406         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
21407         TAILCALL_ADDR_REGS. Remove IP registers.
21408         * config/aarch64/aarch64.md (Ucs): Update register constraint.
21410 2018-02-01  Richard Biener  <rguenther@suse.de>
21412         * domwalk.h (dom_walker::dom_walker): Add additional constructor
21413         for specifying RPO order and allow NULL for that.
21414         * domwalk.c (dom_walker::dom_walker): Likewise.
21415         (dom_walker::walk): Handle NULL RPO order.
21416         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
21417         in RPO order.
21418         (rewrite_update_dom_walker): Likewise.
21419         (mark_def_dom_walker): Likewise.
21421 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21423         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
21424         (aarch64_maybe_expand_sve_subreg_move): Declare.
21425         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
21426         * config/aarch64/predicates.md (aarch64_any_register_operand): New
21427         predicate.
21428         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
21429         that are semantically a reverse operation.
21430         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
21431         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
21432         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
21433         functions.
21434         (aarch64_can_change_mode_class): For big-endian, forbid changes
21435         between two SVE modes if they have different element sizes.
21437 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21439         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
21440         the TImode handling for big-endian targets.
21442 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21444         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
21445         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
21446         not just bytes.
21447         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
21448         Remove BSWAP handing for big-endian targets and use the form of
21449         LD1RQ appropariate for the mode.
21451 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21453         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
21454         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
21455         duplicated element.
21457 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21459         PR tearget/83845
21460         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
21461         check for operands that need to go through aarch64_sve_reload_be.
21463 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
21465         PR tree-optimization/81661
21466         PR tree-optimization/84117
21467         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
21468         * tree-eh.c: Include gimplify.h.
21469         (find_trapping_overflow, replace_trapping_overflow,
21470         rewrite_to_non_trapping_overflow): New functions.
21471         * tree-vect-loop.c: Include tree-eh.h.
21472         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
21473         * tree-data-ref.c: Include tree-eh.h.
21474         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
21476 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
21478         PR rtl-optimization/84123
21479         * combine.c (change_zero_ext): Check if hard register satisfies
21480         can_change_dest_mode before calling gen_lowpart_SUBREG.
21482 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
21484         PR target/82444
21485         * ira.c (ira_init_register_move_cost): Remove assert.
21487 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21489         PR rtl-optimization/84071
21490         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
21491         * doc/tm.texi: Regenerate.
21493 2018-01-31  Richard Biener  <rguenther@suse.de>
21495         PR tree-optimization/84132
21496         * tree-data-ref.c (analyze_miv_subscript): Properly
21497         check whether evolution_function_is_affine_multivariate_p
21498         before calling gcd_of_steps_may_divide_p.
21500 2018-01-31  Julia Koval  <julia.koval@intel.com>
21502         PR target/83618
21503         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
21504         * config/i386/i386.md (rdpid_rex64) New.
21505         (rdpid): Make 32bit only.
21507 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
21509         PR lto/84105
21510         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
21511         an IDENTIFIER_NODE for FUNCTION_TYPE's.
21513 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21515         Revert
21516         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21518         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21520 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21522         PR rtl-optimization/84071
21523         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
21524         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
21526 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
21528         * config/arc/arc.c (arc_handle_aux_attribute): New function.
21529         (arc_attribute_table): Add 'aux' attribute.
21530         (arc_in_small_data_p): Consider aux like variables.
21531         (arc_is_aux_reg_p): New function.
21532         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
21533         (arc_get_aux_arg): New function.
21534         (prepare_move_operands): Handle aux-register access.
21535         (arc_handle_aux_attribute): New function.
21536         * doc/extend.texi (ARC Variable attributes): Add subsection.
21538 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
21540         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
21541         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
21542         (arc_attribute_table): Add 'uncached' attribute.
21543         (arc_print_operand): Print '.di' flag for uncached memory
21544         accesses.
21545         (arc_in_small_data_p): Do not consider for small data the uncached
21546         types.
21547         (arc_is_uncached_mem_p): New function.
21548         * config/arc/predicates.md (compact_store_memory_operand): Check
21549         for uncached memory accesses.
21550         (nonvol_nonimm_operand): Likewise.
21551         * doc/extend.texi (ARC Type Attribute): New subsection.
21553 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
21555         PR c/84100
21556         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
21557         falign-loops=): Add Optimization flag.
21559 2018-01-30  Jeff Law  <law@redhat.com>
21561         PR target/84064
21562         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
21563         INT_REGISTERS_SAVED.  Check it prior to calling
21564         get_scratch_register_on_entry.
21565         (ix86_adjust_stack_and_probe): Similarly.
21566         (ix86_emit_probe_stack_range): Similarly.
21567         (ix86_expand_prologue): Corresponding changes.
21569 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21571         PR target/40411
21572         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
21573         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
21575 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
21577         PR target/84112
21578         * lra-constraints.c (curr_insn_transform): Process AND in the
21579         address.
21581 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
21583         PR rtl-optimization/83986
21584         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
21585         dependence against last_pending_memory_flush in addition to
21586         pending_jump_insns.
21588 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
21590         PR tree-optimization/81611
21591         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
21592         copies.
21594 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21596         PR target/83758
21597         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
21598         a reg rtx.
21600 2018-01-30  Richard Biener  <rguenther@suse.de>
21601             Jakub Jelinek  <jakub@redhat.com>
21603         PR tree-optimization/84111
21604         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
21605         inner loops added during recursion, as they don't have up-to-date
21606         SSA form.
21608 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
21610         PR ipa/81360
21611         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
21612         (can_inline_edge_by_limits_p): ... here.
21613         (can_early_inline_edge_p, check_callers,
21614         update_caller_keys, update_callee_keys, recursive_inlining,
21615         add_new_edges_to_heap, speculation_useful_p,
21616         inline_small_functions,
21617         inline_small_functions, flatten_function,
21618         inline_to_all_callers_1): Update.
21620 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
21622         * profile-count.c (profile_count::combine_with_ipa_count): Handle
21623         zeros correctly.
21625 2018-01-30  Richard Biener  <rguenther@suse.de>
21627         PR tree-optimization/83008
21628         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
21629         invariant and constant vector uses in stmts when they need
21630         more than one stmt.
21632 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21634         PR bootstrap/84017
21635         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
21636         * configure: Regenerate.
21638 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21640         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
21641         pattern.
21642         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
21643         Use gen_rtx_REG rather than gen_lowpart.
21645 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21647         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
21648         rather than 0 when creating partial subregs.
21650 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21652         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
21653         of usage.
21655 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
21657         PR target/81550
21658         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
21659         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
21660         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
21661         flags.  This restores the settings used before the 2017-07-24.
21662         Turning off pre increment/decrement/modify allows IVOPTS to
21663         optimize DF/SF loops where the index is an int.
21665 2018-01-29  Richard Biener  <rguenther@suse.de>
21666             Kelvin Nilsen  <kelvin@gcc.gnu.org>
21668         PR bootstrap/80867
21669         * tree-vect-stmts.c (vectorizable_call): Don't call
21670         targetm.vectorize_builtin_md_vectorized_function if callee is
21671         NULL.
21673 2018-01-22  Carl Love  <cel@us.ibm.com>
21675         * doc/extend.tex: Fix typo in second arg in
21676         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
21678 2018-01-29  Richard Biener  <rguenther@suse.de>
21680         PR tree-optimization/84086
21681         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
21682         (flush_ssaname_freelist): When SSA names were released reset
21683         the SCEV hash table.
21685 2018-01-29  Richard Biener  <rguenther@suse.de>
21687         PR tree-optimization/84057
21688         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
21689         removed paths when removing edges.
21691 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
21693         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
21694         -mfunction-return=@var{choice}.
21696 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21698         PR diagnostic/84034
21699         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
21700         Handle CR like TAB.
21701         (layout::print_source_line): Likewise.
21702         (test_get_line_width_without_trailing_whitespace): Add test cases.
21704 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
21706         PR middle-end/84040
21707         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
21708         debug insns.
21710 2018-01-26  Jim Wilson  <jimw@sifive.com>
21712         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
21714         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
21715         specified.
21717 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21719         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
21720         and CMP + SUB-immediate -> SUBS.
21722 2018-01-26  Martin Sebor  <msebor@redhat.com>
21724         PR tree-optimization/83896
21725         * tree-ssa-strlen.c (get_string_len): Rename...
21726         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
21727         Avoid assuming length is constant.
21728         (handle_char_store): Use HOST_WIDE_INT for string length.
21730 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
21732         PR target/81763
21733         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
21734         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
21736 2018-01-26  Richard Biener  <rguenther@suse.de>
21738         PR rtl-optimization/84003
21739         * dse.c (record_store): Only record redundant stores when
21740         the earlier store aliases at least all accesses the later one does.
21742 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
21744         PR rtl-optimization/83985
21745         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
21746         REG_CFA_RESTORE insns.
21747         (delete_unmarked_insns): Don't ignore separate shrink wrapping
21748         REG_CFA_RESTORE insns here.
21750         PR c/83989
21751         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
21752         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
21754 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21756         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
21757         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
21758         (arc_init): Likewise.
21759         (arc_override_options): Likewise.
21760         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
21761         value.
21762         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
21763         support.
21764         * config/arc/arc.h (TARGET_DBNZ): Define.
21765         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
21766         properly set the tune attribute.
21767         (dbnz): Use TARGET_DBNZ guard.
21768         * config/arc/arc.opt (mtune): Add core3 option.
21770 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21772         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
21773         recognize new pic like addresses.
21774         (arc_delegitimize_address): Clean up.
21776 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21778         * config/arc/arc-arches.def: Option mrf16 valid for all
21779         architectures.
21780         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
21781         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
21782         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
21783         * config/arc/arc-tables.opt: Regenerate.
21784         * config/arc/arc.c (arc_conditional_register_usage): Handle
21785         reduced register file case.
21786         (arc_file_start): Set must have build attributes.
21787         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
21788         mrf16 option value.
21789         * config/arc/arc.opt (mrf16): Add new option.
21790         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
21791         * config/arc/genmultilib.awk: Handle new mrf16 option.
21792         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
21793         * config/arc/t-multilib: Regenerate.
21794         * doc/invoke.texi (ARC Options): Document mrf16 option.
21796 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21798         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
21799         * config/arc/arc.c (arc_handle_secure_attribute): New function.
21800         (arc_attribute_table): Add 'secure_call' attribute.
21801         (arc_print_operand): Print secure call operand.
21802         (arc_function_ok_for_sibcall): Don't optimize tail calls when
21803         secure.
21804         (arc_is_secure_call_p): New function.  * config/arc/arc.md
21805         (call_i): Add support for sjli instruction.
21806         (call_value_i): Likewise.
21807         * config/arc/constraints.md (Csc): New constraint.
21809 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21810             John Eric Martin  <John.Martin@emmicro-us.com>
21812         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
21813         * config/arc/arc.c (_arc_jli_section): New struct.
21814         (arc_jli_section): New type.
21815         (rc_jli_sections): New static variable.
21816         (arc_handle_jli_attribute): New function.
21817         (arc_attribute_table): Add jli_always and jli_fixed attribute.
21818         (arc_file_end): New function.
21819         (TARGET_ASM_FILE_END): Define.
21820         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
21821         (arc_add_jli_section): New function.
21822         (jli_call_scan): Likewise.
21823         (arc_reorg): Call jli_call_scan.
21824         (arc_output_addsi): Remove 'S' from printing asm operand.
21825         (arc_is_jli_call_p): New function.
21826         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
21827         operand.
21828         (movhi_insn): Likewise.
21829         (movsi_insn): Likewise.
21830         (movsi_set_cc_insn): Likewise.
21831         (loadqi_update): Likewise.
21832         (load_zeroextendqisi_update): Likewise.
21833         (load_signextendqisi_update): Likewise.
21834         (loadhi_update): Likewise.
21835         (load_zeroextendhisi_update): Likewise.
21836         (load_signextendhisi_update): Likewise.
21837         (loadsi_update): Likewise.
21838         (loadsf_update): Likewise.
21839         (movsicc_insn): Likewise.
21840         (bset_insn): Likewise.
21841         (bxor_insn): Likewise.
21842         (bclr_insn): Likewise.
21843         (bmsk_insn): Likewise.
21844         (bicsi3_insn): Likewise.
21845         (cmpsi_cc_c_insn): Likewise.
21846         (movsi_ne): Likewise.
21847         (movsi_cond_exec): Likewise.
21848         (clrsbsi2): Likewise.
21849         (norm_f): Likewise.
21850         (normw): Likewise.
21851         (swap): Likewise.
21852         (divaw): Likewise.
21853         (flag): Likewise.
21854         (sr): Likewise.
21855         (kflag): Likewise.
21856         (ffs): Likewise.
21857         (ffs_f): Likewise.
21858         (fls): Likewise.
21859         (call_i): Remove 'S' asm letter, add jli instruction.
21860         (call_value_i): Likewise.
21861         * config/arc/arc.op (mjli-always): New option.
21862         * config/arc/constraints.md (Cji): New constraint.
21863         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
21864         operand.
21865         (subsf3_fpx): Likewise.
21866         (mulsf3_fpx): Likewise.
21867         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
21868         asm operand.
21869         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
21870         function attrbutes.
21871         * doc/invoke.texi (ARC): Document mjli-always option.
21873 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
21875         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
21876         avoid addition with 0 and use incw and decw where possible.
21878 2018-01-26  Richard Biener  <rguenther@suse.de>
21880         PR tree-optimization/81082
21881         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
21882         association if it requires casting to unsigned.
21883         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
21884         from fold_plusminus_mult_expr to catch important cases late when
21885         range info is available.
21887 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21889         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
21890         * configure.ac (hidden_linkonce): New test.
21891         * configure: Regenerate.
21892         * config.in: Regenerate.
21894 2018-01-26  Julia Koval  <julia.koval@intel.com>
21896         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
21897         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
21898         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
21899         _mm_mask_bitshuffle_epi64_mask): Fix type.
21900         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
21901         USI_FTYPE_V4DI_V4DI_USI): Remove.
21902         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
21903         __builtin_ia32_vpshufbitqmb256_mask,
21904         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
21905         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
21906         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
21908 2018-01-26  Alan Modra  <amodra@gmail.com>
21910         PR target/84033
21911         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
21912         UNSPEC_VBPERMQ.  Sort other unspecs.
21914 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
21916         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
21918 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
21920         PR middle-end/83055
21921         * predict.c (drop_profile): Do not push/pop cfun; update also
21922         node->count.
21923         (handle_missing_profiles): Fix logic looking for zero profiles.
21925 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
21927         PR middle-end/83977
21928         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
21929         on functions with #pragma omp declare simd or functions with simd
21930         attribute.
21931         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
21932         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
21933         Remove trailing \n from warning_at calls.
21935 2018-01-25  Tom de Vries  <tom@codesourcery.com>
21937         PR target/84028
21938         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21939         for neutered workers.
21941 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
21943         PR target/68467
21944         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
21945         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
21947 2018-01-24  Jeff Law  <law@redhat.com>
21949         PR target/83994
21950         * i386.c (get_probe_interval): Move to earlier point.
21951         (ix86_compute_frame_layout): If -fstack-clash-protection and
21952         the frame is larger than the probe interval, then use pushes
21953         to save registers rather than reg->mem moves.
21954         (ix86_expand_prologue): Remove conditional for int_registers_saved
21955         assertion.
21957 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
21959         PR target/84014
21960         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
21961         min/max for never referenced object.
21963 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
21965         PR middle-end/83977
21966         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
21967         here.
21968         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
21969         attributes from DECL_ATTRIBUTES (decl) without affecting
21970         DECL_ATTRIBUTES (current_function_decl).
21971         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
21972         functions with non-NULL DECL_ABSTRACT_ORIGIN.
21974 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
21976         PR tree-optimization/83979
21977         * fold-const.c (fold_comparison): Use constant_boolean_node
21978         instead of boolean_{true,false}_node.
21980 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
21982         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
21983         with zero counts.
21985 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21987         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21988         Simplify the clause that sets the length attribute.
21989         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21990         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
21991         clause that sets the length attribute.
21992         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21994 2018-01-24  Tom de Vries  <tom@codesourcery.com>
21996         PR target/83589
21997         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21998         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21999         Add strict parameter.
22000         (prevent_branch_around_nothing): Insert dummy insn between branch to
22001         label and label with no ptx insn inbetween.
22002         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22004 2018-01-24  Tom de Vries  <tom@codesourcery.com>
22006         PR target/81352
22007         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22008         for neutered threads in warp.
22009         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22011 2018-01-24  Richard Biener  <rguenther@suse.de>
22013         PR tree-optimization/83176
22014         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22015         operands.
22017 2018-01-24  Richard Biener  <rguenther@suse.de>
22019         PR tree-optimization/82819
22020         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22021         code generating pluses that are no-ops in the target precision.
22023 2018-01-24  Richard Biener  <rguenther@suse.de>
22025         PR middle-end/84000
22026         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22028 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22030         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22031         to merge probabilities.
22032         * predict.c (probably_never_executed): Also mark as cold functions
22033         with global 0 profile and guessed local profile.
22034         * profile-count.c (profile_probability::combine_with_count): New
22035         member function.
22036         * profile-count.h (profile_probability::operator*,
22037         profile_probability::operator*=, profile_probability::operator/,
22038         profile_probability::operator/=): Reduce precision to adjusted
22039         and set value to guessed on contradictory divisions.
22040         (profile_probability::combine_with_freq): Remove.
22041         (profile_probability::combine_wiht_count): Declare.
22042         (profile_count::force_nonzero):: Set to adjusted.
22043         (profile_count::probability_in):: Set quality to adjusted.
22044         * tree-ssa-tail-merge.c (replace_block_by): Use
22045         combine_with_count.
22047 2018-01-23  Andrew Waterman  <andrew@sifive.com>
22048             Jim Wilson  <jimw@sifive.com>
22050         * config/riscv/riscv.c (riscv_stack_boundary): New.
22051         (riscv_option_override): Set riscv_stack_boundary.  Handle
22052         riscv_preferred_stack_boundary_arg.
22053         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22054         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22055         (STACK_BOUNDARY): Set to riscv_stack_boundary.
22056         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22057         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22058         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22060 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
22062         PR target/83905
22063         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22064         of struct ix86_frame.
22065         (ix86_expand_epilogue): Likewise.  Add a local variable for
22066         the reg_save_offset field in struct ix86_frame.
22068 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
22070         PR tree-optimization/82604
22071         * tree-loop-distribution.c (enum partition_kind): New enum item
22072         PKIND_PARTIAL_MEMSET.
22073         (partition_builtin_p): Support above new enum item.
22074         (generate_code_for_partition): Ditto.
22075         (compute_access_range): Differentiate cases that equality can be
22076         proven at all loops, the innermost loops or no loops.
22077         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22078         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
22079         (finalize_partitions, distribute_loop): Don't fuse partition of
22080         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22081         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22082         parloop is enabled.
22084 2018-01-23  Martin Liska  <mliska@suse.cz>
22086         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22087         order to ignore the predictor.
22088         (PRED_POLYMORPHIC_CALL): Likewise.
22089         (PRED_RECURSIVE_CALL): Likewise.
22091 2018-01-23  Martin Liska  <mliska@suse.cz>
22093         * tree-profile.c (tree_profiling): Print function header to
22094         aware reader which function we are working on.
22095         * value-prof.c (gimple_find_values_to_profile): Do not print
22096         not interesting value histograms.
22098 2018-01-23  Martin Liska  <mliska@suse.cz>
22100         * profile-count.h (enum profile_quality): Add
22101         profile_uninitialized as the first value. Do not number values
22102         as they are zero based.
22103         (profile_count::verify): Update sanity check.
22104         (profile_probability::verify): Likewise.
22106 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22108         * doc/invoke.texi (ffor-scope): Deprecate.
22110 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22112         PR tree-optimization/83510
22113         * domwalk.c (set_all_edges_as_executable): New function.
22114         (dom_walker::dom_walker): Convert bool param
22115         "skip_unreachable_blocks" to enum reachability.  Move setup of
22116         edge flags to set_all_edges_as_executable and only do it when
22117         reachability is REACHABLE_BLOCKS.
22118         * domwalk.h (enum dom_walker::reachability): New enum.
22119         (dom_walker::dom_walker): Convert bool param
22120         "skip_unreachable_blocks" to enum reachability.
22121         (set_all_edges_as_executable): New decl.
22122         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22123         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22124         "reachability".
22125         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22126         but converting true to REACHABLE_BLOCKS.
22127         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22128         * tree-vrp.c
22129         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22130         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22131         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22132         REACHABLE_BLOCKS.
22133         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22134         if check_all_array_refs will be called.
22136 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22138         * tree.c (selftest::test_location_wrappers): Add more test
22139         coverage.
22141 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22143         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22144         (selftest::test_bit_in_range): Likewise.
22146 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22148         PR testsuite/83888
22149         * doc/sourcebuild.texi (vect_float): Say that the selector
22150         only describes the situation when -funsafe-math-optimizations is on.
22151         (vect_float_strict): Document.
22153 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22155         PR tree-optimization/83965
22156         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22157         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22158         instead of checking only for a reduction.
22159         (vect_recog_widen_sum_pattern): Likewise.
22161 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22163         * predict.c (probably_never_executed): Only use precise profile info.
22164         (compute_function_frequency): Skip after inlining hack since we now
22165         have quality checking.
22167 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22169         * profile-count.h (profile_probability::very_unlikely,
22170         profile_probability::unlikely, profile_probability::even): Set
22171         precision to guessed.
22173 2018-01-23  Richard Biener  <rguenther@suse.de>
22175         PR tree-optimization/83963
22176         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22177         Properly terminate dominator walk when crossing the exit edge not
22178         when visiting its source block.
22180 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
22182         PR c++/83918
22183         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22184         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22186 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
22188         PR tree-optimization/83957
22189         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
22190         semicolon after for body surrounded by braces.
22192         PR tree-optimization/83081
22193         * profile-count.h (profile_probability::split): New method.
22194         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22195         Use profile_probability::split.
22196         (do_compare_rtx_and_jump): Fix adjustment of probabilities
22197         when splitting a single conditional jump into 2.
22199 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
22201         PR tree-optimization/69452
22202         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22203         decl.
22205 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22207         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22208         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22209         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22211 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22213         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22214         declaration.
22215         * config/rl78/rl78.md (movdi): New define_expand.
22216         * config/rl78/rl78.c (rl78_split_movdi): New function.
22218 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
22220         PR target/83862
22221         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22222         no longer used.
22223         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22224         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22225         128-bit to produce an UNSPEC move to get the double word with the
22226         signbit and then a shift directly to do signbit.
22227         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22228         implementation with a new version that just does either a direct
22229         move or a regular move.  Move memory interface to separate insns.
22230         Move insns so they are next to the expander.
22231         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22232         with signbit move.  Split big and little endian case.
22233         (signbit<mode>2_dm_mem_le): Likewise.
22234         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22235         (signbit<mode>2_dm2): Likewise.
22237 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22239         * config/rl78/rl78.md (anddi3): New define_expand.
22241 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22243         * config/rl78/rl78.md (umindi3): New define_expand.
22245 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22247         * config/rl78/rl78.md (smindi3): New define_expand.
22249 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22251         * config/rl78/rl78.md (smaxdi3): New define_expand.
22253 2018-01-22  Carl Love  <cel@us.ibm.com>
22255         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22256         LVX_V1TI): Add macro expansion.
22257         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22258         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22259         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22260         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22261         Change check to determine if the instruction is a byte reversing
22262         entry.  Fix typo in comment.
22263         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22264         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22265         Add def_builtin calls for new builtins.
22266         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22267         Add define_insn expansion.
22269 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22271         * config/rl78/rl78.md (umaxdi3): New define_expand.
22273 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22275         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22276         for non-QImode registers.
22278 2018-01-22  Richard Biener  <rguenther@suse.de>
22280         PR tree-optimization/83963
22281         * graphite-scop-detection.c (scop_detection::get_sese): Delay
22282         including the loop exit block.
22283         (scop_detection::merge_sese): Likewise.
22284         (scop_detection::add_scop): Do it here instead.
22286 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22288         * doc/sourcebuild.texi (arm_softfloat): Document.
22290 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
22292         PR gcc/77734
22293         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22294         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22295         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22297 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22298             David Edelsohn  <dje.gcc@gmail.com>
22300         PR target/83946
22301         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22302         Change "crset eq" to "crset 2".
22303         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22304         (*call_indirect_aix<mode>_nospec): Likewise.
22305         (*call_value_indirect_aix<mode>_nospec): Likewise.
22306         (*call_indirect_elfv2<mode>_nospec): Likewise.
22307         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22308         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22309         change assembly output from . to $.
22310         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22311         (indirect_jump<mode>_nospec): Change assembly output from . to $.
22312         (*tablejump<mode>_internal1_nospec): Likewise.
22314 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
22316         PR target/80870
22317         * config/sh/sh_optimize_sett_clrt.cc:
22318         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22320 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
22322         PR tree-optimization/83940
22323         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22324         offset_dt to vect_constant_def rather than vect_unknown_def_type.
22325         (vect_check_load_store_mask): Add a mask_dt_out parameter and
22326         use it to pass back the definition type.
22327         (vect_check_store_rhs): Likewise rhs_dt_out.
22328         (vect_build_gather_load_calls): Add a mask_dt argument and use
22329         it instead of a call to vect_is_simple_use.
22330         (vectorizable_store): Update calls to vect_check_load_store_mask
22331         and vect_check_store_rhs.  Use the dt returned by the latter instead
22332         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
22333         instead of calls to vect_is_simple_use.  Pass the scalar rather
22334         than the vector operand to vect_is_simple_use when handling
22335         second and subsequent copies of an rhs value.
22336         (vectorizable_load): Update calls to vect_check_load_store_mask
22337         and vect_build_gather_load_calls.  Use the cached mask_dt and
22338         gs_info.offset_dt instead of calls to vect_is_simple_use.
22340 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
22342         PR middle-end/83945
22343         * tree-emutls.c: Include gimplify.h.
22344         (lower_emutls_2): New function.
22345         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
22346         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
22347         it before further processing.
22349         PR target/83930
22350         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
22351         UINTVAL (trueop1) instead of INTVAL (op1).
22353 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
22355         PR debug/81570
22356         PR debug/83728
22357         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
22358         INCOMING_FRAME_SP_OFFSET if not defined.
22359         (scan_trace): Add ENTRY argument.  If true and
22360         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
22361         emit a note to adjust the CFA offset.
22362         (create_cfi_notes): Adjust scan_trace callers.
22363         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
22364         INCOMING_FRAME_SP_OFFSET in the CIE.
22365         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
22366         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
22367         Likewise.
22368         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
22369         * doc/tm.texi: Regenerated.
22371 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22373         PR rtl-optimization/83147
22374         * lra-constraints.c (remove_inheritance_pseudos): Use
22375         lra_substitute_pseudo_within_insn.
22377 2018-01-19  Tom de Vries  <tom@codesourcery.com>
22378             Cesar Philippidis  <cesar@codesourcery.com>
22380         PR target/83920
22381         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
22383 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
22385         PR target/83790
22386         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
22387         spaces for function labels.
22389 2018-01-19  Martin Liska  <mliska@suse.cz>
22391         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
22392         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
22393         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
22394         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
22395         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
22396         (PRED_CONST_RETURN): Change from 69 to 65.
22397         (PRED_NULL_RETURN): Change from 91 to 71.
22398         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
22399         (PRED_LOOP_GUARD): Change from 66 to 73.
22401 2018-01-19  Martin Liska  <mliska@suse.cz>
22403         * predict.c (predict_insn_def): Add new assert.
22404         (struct branch_predictor): Change type to signed integer.
22405         (test_prediction_value_range): Amend test to cover
22406         PROB_UNINITIALIZED.
22407         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
22408         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
22409         (PRED_LOOP_ITERATIONS_MAX): Likewise.
22410         (PRED_LOOP_IV_COMPARE): Likewise.
22411         * predict.h (PROB_UNINITIALIZED): Define new constant.
22413 2018-01-19  Martin Liska  <mliska@suse.cz>
22415         * predict.c (dump_prediction): Add new format for
22416         analyze_brprob.py script which is enabled with -details
22417         suboption.
22418         * profile-count.h (precise_p): New function.
22420 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
22422         PR tree-optimization/83922
22423         * tree-vect-loop.c (vect_verify_full_masking): Return false if
22424         there are no statements that need masking.
22425         (vect_active_double_reduction_p): New function.
22426         (vect_analyze_loop_operations): Use it when handling phis that
22427         are not in the loop header.
22429 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
22431         PR tree-optimization/83914
22432         * tree-vect-loop.c (vectorizable_induction): Don't convert
22433         init_expr or apply the peeling adjustment for inductions
22434         that are nested within the vectorized loop.
22436 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22438         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
22439         instead of NEG.
22441 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
22443         PR sanitizer/81715
22444         PR testsuite/83882
22445         * function.h (gimplify_parameters): Add gimple_seq * argument.
22446         * function.c: Include gimple.h and options.h.
22447         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
22448         for the added local temporaries if needed.
22449         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
22450         if there are any parameter cleanups, wrap whole body into a
22451         try/finally with the cleanups.
22453 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
22455         PR target/82964
22456         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22457         Use GET_MODE_CLASS for scalar floating point.
22459 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
22461         PR ipa/82256
22462         patch by PaX Team
22463         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
22464         Fix call of call_cgraph_insertion_hooks.
22466 2018-01-18  Martin Sebor  <msebor@redhat.com>
22468         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
22470 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
22472         PR ipa/83619
22473         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
22474         frequencies.
22476 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
22478         PR other/70268
22479         * common.opt: (-ffile-prefix-map): New option.
22480         * opts.c (common_handle_option): Defer it.
22481         * opts-global.c (handle_common_deferred_options): Handle it.
22482         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
22483         * file-prefix-map.h: New file.
22484         (remap_debug_filename, add_debug_prefix_map): ...here.
22485         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
22486         * final.c (debug_prefix_map, add_debug_prefix_map
22487         remap_debug_filename): Move to...
22488         * file-prefix-map.c: New file.
22489         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
22490         generalize, get rid of alloca(), use strrchr() instead of strchr().
22491         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
22492         Implement in terms of add_prefix_map().
22493         (remap_macro_filename, remap_debug_filename): Implement in term of
22494         remap_filename().
22495         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
22496         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
22497         * dbxout.c: Include file-prefix-map.h.
22498         * varasm.c: Likewise.
22499         * vmsdbgout.c: Likewise.
22500         * xcoffout.c: Likewise.
22501         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
22502         * doc/cppopts.texi (-fmacro-prefix-map): Document.
22503         * doc/invoke.texi (-ffile-prefix-map): Document.
22504         (-fdebug-prefix-map): Update description.
22506 2018-01-18  Martin Liska  <mliska@suse.cz>
22508         * config/i386/i386.c (indirect_thunk_name): Document that also
22509         lfence is emitted.
22510         (output_indirect_thunk): Document why both instructions
22511         (pause and lfence) are generated.
22513 2018-01-18  Richard Biener  <rguenther@suse.de>
22515         PR tree-optimization/83887
22516         * graphite-scop-detection.c
22517         (scop_detection::get_nearest_dom_with_single_entry): Remove.
22518         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
22519         (scop_detection::merge_sese): Re-implement with a flood-fill
22520         algorithm that properly finds a SESE region if it exists.
22522 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
22524         PR c/61240
22525         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
22526         pointer_diff optimizations use view_convert instead of convert.
22528 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22530         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22531         Generate different code for -mno-speculate-indirect-jumps.
22532         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22533         (*call_indirect_aix<mode>): Disable for
22534         -mno-speculate-indirect-jumps.
22535         (*call_indirect_aix<mode>_nospec): New define_insn.
22536         (*call_value_indirect_aix<mode>): Disable for
22537         -mno-speculate-indirect-jumps.
22538         (*call_value_indirect_aix<mode>_nospec): New define_insn.
22539         (*sibcall_nonlocal_sysv<mode>): Generate different code for
22540         -mno-speculate-indirect-jumps.
22541         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22543 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
22545         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
22546         long double type, set the flags for noting the default long double
22547         type, even if we don't pass or return a long double type.
22549 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
22551         PR ipa/83051
22552         * ipa-inline.c (flatten_function): Do not overwrite final inlining
22553         failure.
22555 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
22557         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
22558         support for merge[hl].
22559         (fold_mergehl_helper): New helper function.
22560         (tree-vector-builder.h): New #include for tree_vector_builder usage.
22561         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
22562         (altivec_vmrglw_direct): Add xxmrglw insn.
22564 2018-01-17  Andrew Waterman  <andrew@sifive.com>
22566         * config/riscv/riscv.c (riscv_conditional_register_usage): If
22567         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
22569 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
22571         PR lto/83121
22572         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
22573         call the lto_location_cache before reading the
22574         DECL_SOURCE_LOCATION of the types.
22576 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
22577             Richard Sandiford  <richard.sandiford@linaro.org>
22579         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
22580         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
22581         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
22582         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
22583         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
22584         Add declaration.
22585         * config/aarch64/constraints.md (aarch64_movti_operand):
22586         Limit immediates.
22587         * config/aarch64/predicates.md (Uti): Add new constraint.
22589 2018-01-17  Carl Love  <cel@us.ibm.com>
22591         * config/rs6000/vsx.md (define_expand xl_len_r,
22592         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
22593         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
22594         lxvll.
22595         (define_expand, define_insn): Move the shift left from  the
22596         define_insn to the define_expand for lxvl and stxvl instructions.
22597         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
22598         and XL_LEN_R definitions to PURE.
22600 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
22602         * config/i386/i386.c (indirect_thunk_name): Declare regno
22603         as unsigned int.  Compare regno with INVALID_REGNUM.
22604         (output_indirect_thunk): Ditto.
22605         (output_indirect_thunk_function): Ditto.
22606         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
22607         in the call to output_indirect_thunk_function.
22609 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
22611         PR middle-end/83884
22612         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
22613         rather than the size of inner_type to determine the stack slot size
22614         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
22616 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
22618         PR target/83546
22619         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
22620         to PTA_SILVERMONT.
22622 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
22624         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
22625         endian Linux systems to optionally enable multilibs for selecting
22626         the long double type if the user configured an explicit type.
22627         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
22628         have no long double multilibs if not defined.
22629         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
22630         warn if the user used -mabi={ieee,ibm}longdouble and we built
22631         multilibs for long double.
22632         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
22633         appropriate multilib option.
22634         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
22635         multilib options.
22636         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
22637         for building long double multilibs.
22638         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
22640 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
22642         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
22643         copies.
22645         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
22646         64 bits.
22647         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
22648         128 bits.
22650         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
22651         variables.
22653         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
22654         return value.
22656 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
22658         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
22659         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
22661 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22663         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
22664         different rtl trees depending on TARGET_64BIT.
22665         (rs6000_gen_lvx): Likewise.
22667 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
22669         * config/visium/visium.md (nop): Tweak comment.
22670         (hazard_nop): Likewise.
22672 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22674         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
22675         -mspeculate-indirect-jumps.
22676         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
22677         for -mno-speculate-indirect-jumps.
22678         (*call_indirect_elfv2<mode>_nospec): New define_insn.
22679         (*call_value_indirect_elfv2<mode>): Disable for
22680         -mno-speculate-indirect-jumps.
22681         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
22682         (indirect_jump): Emit different RTL for
22683         -mno-speculate-indirect-jumps.
22684         (*indirect_jump<mode>): Disable for
22685         -mno-speculate-indirect-jumps.
22686         (*indirect_jump<mode>_nospec): New define_insn.
22687         (tablejump): Emit different RTL for
22688         -mno-speculate-indirect-jumps.
22689         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
22690         (tablejumpsi_nospec): New define_expand.
22691         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
22692         (tablejumpdi_nospec): New define_expand.
22693         (*tablejump<mode>_internal1): Disable for
22694         -mno-speculate-indirect-jumps.
22695         (*tablejump<mode>_internal1_nospec): New define_insn.
22696         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
22697         option.
22699 2018-01-16  Artyom Skrobov tyomitch@gmail.com
22701         * caller-save.c (insert_save): Drop unnecessary parameter.  All
22702         callers updated.
22704 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22705             Richard Biener  <rguenth@suse.de>
22707         PR libgomp/83590
22708         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
22709         return early, inline manually is_gimple_sizepos.  Make sure if we
22710         call gimplify_expr we don't end up with a gimple constant.
22711         * tree.c (variably_modified_type_p): Don't return true for
22712         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
22713         * gimplify.h (is_gimple_sizepos): Remove.
22715 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22717         PR tree-optimization/83857
22718         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
22719         vectorizable_live_operation for pure SLP statements.
22720         (vectorizable_live_operation): Handle PHIs.
22722 2018-01-16  Richard Biener  <rguenther@suse.de>
22724         PR tree-optimization/83867
22725         * tree-vect-stmts.c (vect_transform_stmt): Precompute
22726         nested_in_vect_loop_p since the scalar stmt may get invalidated.
22728 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22730         PR c/83844
22731         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
22732         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
22733         If off is not INTEGER_CST, issue a may not be aligned warning
22734         rather than isn't aligned.  Use isn%'t rather than isn't.
22735         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
22736         into MULT_EXPR.
22737         <case MULT_EXPR>: Improve the case when bottom and one of the
22738         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
22739         operand, in that case check if the other operand is multiple of
22740         bottom divided by the INTEGER_CST operand.
22742 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22744         PR target/83858
22745         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
22746         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
22747         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
22748         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
22749         * config/pa/pa.c (pa_function_arg_advance): Likewise.
22750         (pa_function_arg, pa_arg_partial_bytes): Likewise.
22751         (pa_function_arg_size): New function.
22753 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22755         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
22756         in a separate statement.
22758 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22760         PR tree-optimization/83847
22761         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
22762         group gathers and scatters.
22764 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22766         PR rtl-optimization/86620
22767         * params.def (max-sched-ready-insns): Bump minimum value to 1.
22769         PR rtl-optimization/83213
22770         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
22771         to last if both are JUMP_INSNs.
22773         PR tree-optimization/83843
22774         * gimple-ssa-store-merging.c
22775         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
22776         store_immediate_info for bswap/nop orig_stores.
22778 2018-01-15  Andrew Waterman  <andrew@sifive.com>
22780         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
22781         !TARGET_MUL.
22782         <UDIV>: Increase cost if !TARGET_DIV.
22784 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
22786         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
22787         (define_attr "cr_logical_3op"): New.
22788         (cceq_ior_compare): Adjust.
22789         (cceq_ior_compare_complement): Adjust.
22790         (*cceq_rev_compare): Adjust.
22791         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
22792         (is_cracked_insn): Adjust.
22793         (insn_must_be_first_in_group): Adjust.
22794         * config/rs6000/40x.md: Adjust.
22795         * config/rs6000/440.md: Adjust.
22796         * config/rs6000/476.md: Adjust.
22797         * config/rs6000/601.md: Adjust.
22798         * config/rs6000/603.md: Adjust.
22799         * config/rs6000/6xx.md: Adjust.
22800         * config/rs6000/7450.md: Adjust.
22801         * config/rs6000/7xx.md: Adjust.
22802         * config/rs6000/8540.md: Adjust.
22803         * config/rs6000/cell.md: Adjust.
22804         * config/rs6000/e300c2c3.md: Adjust.
22805         * config/rs6000/e500mc.md: Adjust.
22806         * config/rs6000/e500mc64.md: Adjust.
22807         * config/rs6000/e5500.md: Adjust.
22808         * config/rs6000/e6500.md: Adjust.
22809         * config/rs6000/mpc.md: Adjust.
22810         * config/rs6000/power4.md: Adjust.
22811         * config/rs6000/power5.md: Adjust.
22812         * config/rs6000/power6.md: Adjust.
22813         * config/rs6000/power7.md: Adjust.
22814         * config/rs6000/power8.md: Adjust.
22815         * config/rs6000/power9.md: Adjust.
22816         * config/rs6000/rs64.md: Adjust.
22817         * config/rs6000/titan.md: Adjust.
22819 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22821         * config/i386/predicates.md (indirect_branch_operand): Rewrite
22822         ix86_indirect_branch_register logic.
22824 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22826         * config/i386/constraints.md (Bs): Update
22827         ix86_indirect_branch_register check.  Don't check
22828         ix86_indirect_branch_register with GOT_memory_operand.
22829         (Bw): Likewise.
22830         * config/i386/predicates.md (GOT_memory_operand): Don't check
22831         ix86_indirect_branch_register here.
22832         (GOT32_symbol_operand): Likewise.
22834 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22836         * config/i386/predicates.md (constant_call_address_operand):
22837         Rewrite ix86_indirect_branch_register logic.
22838         (sibcall_insn_operand): Likewise.
22840 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22842         * config/i386/constraints.md (Bs): Replace
22843         ix86_indirect_branch_thunk_register with
22844         ix86_indirect_branch_register.
22845         (Bw): Likewise.
22846         * config/i386/i386.md (indirect_jump): Likewise.
22847         (tablejump): Likewise.
22848         (*sibcall_memory): Likewise.
22849         (*sibcall_value_memory): Likewise.
22850         Peepholes of indirect call and jump via memory: Likewise.
22851         * config/i386/i386.opt: Likewise.
22852         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22853         (GOT_memory_operand): Likewise.
22854         (call_insn_operand): Likewise.
22855         (sibcall_insn_operand): Likewise.
22856         (GOT32_symbol_operand): Likewise.
22858 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22860         PR middle-end/83837
22861         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
22862         type rather than type addr's type points to.
22863         (expand_omp_atomic_mutex): Likewise.
22864         (expand_omp_atomic): Likewise.
22866 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22868         PR target/83839
22869         * config/i386/i386.c (output_indirect_thunk_function): Use
22870         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
22871         for  __x86_return_thunk.
22873 2018-01-15  Richard Biener  <rguenther@suse.de>
22875         PR middle-end/83850
22876         * expmed.c (extract_bit_field_1): Fix typo.
22878 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22880         PR target/83687
22881         * config/arm/iterators.md (VF): New mode iterator.
22882         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
22883         Remove integer-related logic from pattern.
22884         (neon_vabd<mode>_3): Likewise.
22886 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22888         PR middle-end/82694
22889         * common.opt (fstrict-overflow): No longer an alias.
22890         (fwrapv-pointer): New option.
22891         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
22892         also for pointer types based on flag_wrapv_pointer.
22893         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
22894         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
22895         opts->x_flag_wrapv got set.
22896         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
22897         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
22898         POINTER_TYPE_OVERFLOW_UNDEFINED.
22899         * match.pd: Likewise in address comparison pattern.
22900         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
22902 2018-01-15  Richard Biener  <rguenther@suse.de>
22904         PR lto/83804
22905         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
22906         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
22907         Reset type names to their identifier if their TYPE_DECL doesn't
22908         have linkage (and thus is used for ODR and devirt).
22909         (save_debug_info_for_decl): Remove.
22910         (save_debug_info_for_type): Likewise.
22911         (add_tree_to_fld_list): Adjust.
22912         * tree-pretty-print.c (dump_generic_node): Make dumping of
22913         type names more robust.
22915 2018-01-15  Richard Biener  <rguenther@suse.de>
22917         * BASE-VER: Bump to 8.0.1.
22919 2018-01-14  Martin Sebor  <msebor@redhat.com>
22921         PR other/83508
22922         * builtins.c (check_access): Avoid warning when the no-warning bit
22923         is set.
22925 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
22927         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
22928         * ira-color (allocno_hard_regs_compare): Likewise.
22930 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
22932         PR target/83013
22933         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
22934         Use .pushsection/.popsection.
22936 2018-01-14  Martin Sebor  <msebor@redhat.com>
22938         PR c++/81327
22939         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
22941 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
22943         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
22944         entry from extra_headers.
22945         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
22946         extra_headers, make the list bitwise identical to the i?86-*-* one.
22948 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22950         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
22951         -mcmodel=large with -mindirect-branch=thunk,
22952         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
22953         -mfunction-return=thunk-extern.
22954         * doc/invoke.texi: Document -mcmodel=large is incompatible with
22955         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
22956         -mfunction-return=thunk and -mfunction-return=thunk-extern.
22958 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22960         * config/i386/i386.c (print_reg): Print the name of the full
22961         integer register without '%'.
22962         (ix86_print_operand): Handle 'V'.
22963         * doc/extend.texi: Document 'V' modifier.
22965 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22967         * config/i386/constraints.md (Bs): Disallow memory operand for
22968         -mindirect-branch-register.
22969         (Bw): Likewise.
22970         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22971         (GOT_memory_operand): Likewise.
22972         (call_insn_operand): Likewise.
22973         (sibcall_insn_operand): Likewise.
22974         (GOT32_symbol_operand): Likewise.
22975         * config/i386/i386.md (indirect_jump): Call convert_memory_address
22976         for -mindirect-branch-register.
22977         (tablejump): Likewise.
22978         (*sibcall_memory): Likewise.
22979         (*sibcall_value_memory): Likewise.
22980         Disallow peepholes of indirect call and jump via memory for
22981         -mindirect-branch-register.
22982         (*call_pop): Replace m with Bw.
22983         (*call_value_pop): Likewise.
22984         (*sibcall_pop_memory): Replace m with Bs.
22985         * config/i386/i386.opt (mindirect-branch-register): New option.
22986         * doc/invoke.texi: Document -mindirect-branch-register option.
22988 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22990         * config/i386/i386-protos.h (ix86_output_function_return): New.
22991         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
22992         set function_return_type.
22993         (indirect_thunk_name): Add ret_p to indicate thunk for function
22994         return.
22995         (output_indirect_thunk_function): Pass false to
22996         indirect_thunk_name.
22997         (ix86_output_indirect_branch_via_reg): Likewise.
22998         (ix86_output_indirect_branch_via_push): Likewise.
22999         (output_indirect_thunk_function): Create alias for function
23000         return thunk if regno < 0.
23001         (ix86_output_function_return): New function.
23002         (ix86_handle_fndecl_attribute): Handle function_return.
23003         (ix86_attribute_table): Add function_return.
23004         * config/i386/i386.h (machine_function): Add
23005         function_return_type.
23006         * config/i386/i386.md (simple_return_internal): Use
23007         ix86_output_function_return.
23008         (simple_return_internal_long): Likewise.
23009         * config/i386/i386.opt (mfunction-return=): New option.
23010         (indirect_branch): Mention -mfunction-return=.
23011         * doc/extend.texi: Document function_return function attribute.
23012         * doc/invoke.texi: Document -mfunction-return= option.
23014 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
23016         * config/i386/i386-opts.h (indirect_branch): New.
23017         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23018         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23019         with local indirect jump when converting indirect call and jump.
23020         (ix86_set_indirect_branch_type): New.
23021         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23022         (indirectlabelno): New.
23023         (indirect_thunk_needed): Likewise.
23024         (indirect_thunk_bnd_needed): Likewise.
23025         (indirect_thunks_used): Likewise.
23026         (indirect_thunks_bnd_used): Likewise.
23027         (INDIRECT_LABEL): Likewise.
23028         (indirect_thunk_name): Likewise.
23029         (output_indirect_thunk): Likewise.
23030         (output_indirect_thunk_function): Likewise.
23031         (ix86_output_indirect_branch_via_reg): Likewise.
23032         (ix86_output_indirect_branch_via_push): Likewise.
23033         (ix86_output_indirect_branch): Likewise.
23034         (ix86_output_indirect_jmp): Likewise.
23035         (ix86_code_end): Call output_indirect_thunk_function if needed.
23036         (ix86_output_call_insn): Call ix86_output_indirect_branch if
23037         needed.
23038         (ix86_handle_fndecl_attribute): Handle indirect_branch.
23039         (ix86_attribute_table): Add indirect_branch.
23040         * config/i386/i386.h (machine_function): Add indirect_branch_type
23041         and has_local_indirect_jump.
23042         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23043         to true.
23044         (tablejump): Likewise.
23045         (*indirect_jump): Use ix86_output_indirect_jmp.
23046         (*tablejump_1): Likewise.
23047         (simple_return_indirect_internal): Likewise.
23048         * config/i386/i386.opt (mindirect-branch=): New option.
23049         (indirect_branch): New.
23050         (keep): Likewise.
23051         (thunk): Likewise.
23052         (thunk-inline): Likewise.
23053         (thunk-extern): Likewise.
23054         * doc/extend.texi: Document indirect_branch function attribute.
23055         * doc/invoke.texi: Document -mindirect-branch= option.
23057 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
23059         PR ipa/83051
23060         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23062 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
23064         * ipa-inline.c (want_inline_small_function_p): Return false if
23065         inlining has already failed with CIF_FINAL_ERROR.
23066         (update_caller_keys): Call want_inline_small_function_p before
23067         can_inline_edge_p.
23068         (update_callee_keys): Likewise.
23070 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23072         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23073         New function.
23074         (rs6000_quadword_masked_address_p): Likewise.
23075         (quad_aligned_load_p): Likewise.
23076         (quad_aligned_store_p): Likewise.
23077         (const_load_sequence_p): Add comment to describe the outer-most loop.
23078         (mimic_memory_attributes_and_flags): New function.
23079         (rs6000_gen_stvx): Likewise.
23080         (replace_swapped_aligned_store): Likewise.
23081         (rs6000_gen_lvx): Likewise.
23082         (replace_swapped_aligned_load): Likewise.
23083         (replace_swapped_load_constant): Capitalize argument name in
23084         comment describing this function.
23085         (rs6000_analyze_swaps): Add a third pass to search for vector loads
23086         and stores that access quad-word aligned addresses and replace
23087         with stvx or lvx instructions when appropriate.
23088         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23089         New function prototype.
23090         (rs6000_quadword_masked_address_p): Likewise.
23091         (rs6000_gen_lvx): Likewise.
23092         (rs6000_gen_stvx): Likewise.
23093         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23094         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23095         when memory address is aligned.
23096         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23097         this split to select lvx instruction when memory address is aligned.
23098         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23099         instruction when memory address is aligned.
23100         (*vsx_le_perm_load_v16qi): Likewise.
23101         (four unnamed splitters): Modify to select the stvx instruction
23102         when memory is aligned.
23104 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23106         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23107         which appears in the queue multiple times.
23109 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23110             Alan Hayward  <alan.hayward@arm.com>
23111             David Sherwood  <david.sherwood@arm.com>
23113         * tree-vectorizer.h (vec_lower_bound): New structure.
23114         (_loop_vec_info): Add check_nonzero and lower_bounds.
23115         (LOOP_VINFO_CHECK_NONZERO): New macro.
23116         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23117         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23118         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23119         fields.  Make seg_len the distance travelled, not including the
23120         access size.
23121         (dr_direction_indicator): Declare.
23122         (dr_zero_step_indicator): Likewise.
23123         (dr_known_forward_stride_p): Likewise.
23124         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23125         tree-ssanames.h.
23126         (runtime_alias_check_p): Allow runtime alias checks with
23127         variable strides.
23128         (operator ==): Compare access_size and align.
23129         (prune_runtime_alias_test_list): Rework for new distinction between
23130         the access_size and seg_len.
23131         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23132         segment lengths.
23133         (get_segment_min_max): New function.
23134         (create_intersect_range_checks): Use it.
23135         (dr_step_indicator): New function.
23136         (dr_direction_indicator): Likewise.
23137         (dr_zero_step_indicator): Likewise.
23138         (dr_known_forward_stride_p): Likewise.
23139         * tree-loop-distribution.c (data_ref_segment_size): Return
23140         DR_STEP * (niters - 1).
23141         (compute_alias_check_pairs): Update call to the dr_with_seg_len
23142         constructor.
23143         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23144         (vect_preserves_scalar_order_p): New function, split out from...
23145         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
23146         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23147         (vect_vfa_access_size): New function.
23148         (vect_vfa_align): Likewise.
23149         (vect_compile_time_alias): Take access_size_a and access_b arguments.
23150         (dump_lower_bound): New function.
23151         (vect_check_lower_bound): Likewise.
23152         (vect_small_gap_p): Likewise.
23153         (vectorizable_with_step_bound_p): Likewise.
23154         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23155         depencies if the vectorization factor is 1.  Convert the checks
23156         for nonzero steps into checks on the bounds of DR_STEP.  Try using
23157         a bunds check for variable steps if the minimum required step is
23158         relatively small. Update calls to the dr_with_seg_len
23159         constructor and to vect_compile_time_alias.
23160         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23161         function.
23162         (vect_loop_versioning): Call it.
23163         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23164         when retrying.
23165         (vect_estimate_min_profitable_iters): Account for any bounds checks.
23167 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23168             Alan Hayward  <alan.hayward@arm.com>
23169             David Sherwood  <david.sherwood@arm.com>
23171         * doc/sourcebuild.texi (vect_scatter_store): Document.
23172         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23173         optabs.
23174         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23175         Document.
23176         * genopinit.c (main): Add supports_vec_scatter_store and
23177         supports_vec_scatter_store_cached to target_optabs.
23178         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23179         IFN_MASK_SCATTER_STORE.
23180         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23181         functions.
23182         * internal-fn.h (internal_store_fn_p): Declare.
23183         (internal_fn_stored_value_index): Likewise.
23184         * internal-fn.c (scatter_store_direct): New macro.
23185         (expand_scatter_store_optab_fn): New function.
23186         (direct_scatter_store_optab_supported_p): New macro.
23187         (internal_store_fn_p): New function.
23188         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23189         IFN_MASK_SCATTER_STORE.
23190         (internal_fn_mask_index): Likewise.
23191         (internal_fn_stored_value_index): New function.
23192         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23193         for scatter stores.
23194         * optabs-query.h (supports_vec_scatter_store_p): Declare.
23195         * optabs-query.c (supports_vec_scatter_store_p): New function.
23196         * tree-vectorizer.h (vect_get_store_rhs): Declare.
23197         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23198         true for scatter stores.
23199         (vect_gather_scatter_fn_p): Handle scatter stores too.
23200         (vect_check_gather_scatter): Consider using scatter stores if
23201         supports_vec_scatter_store_p.
23202         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23203         scatter stores too.
23204         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23205         internal_fn_stored_value_index.
23206         (check_load_store_masking): Handle scatter stores too.
23207         (vect_get_store_rhs): Make public.
23208         (vectorizable_call): Use internal_store_fn_p.
23209         (vectorizable_store): Handle scatter store internal functions.
23210         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23211         when deciding whether the end of the group has been reached.
23212         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23213         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23214         (mask_scatter_store<mode>): New insns.
23216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23217             Alan Hayward  <alan.hayward@arm.com>
23218             David Sherwood  <david.sherwood@arm.com>
23220         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23221         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23222         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23223         function.
23224         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23225         Use vect_truncate_gather_scatter_offset if we can't treat the
23226         operation as a normal gather load or scatter store.
23227         (get_group_load_store_type): Take the gather_scatter_info
23228         as argument.  Try using a gather load or scatter store for
23229         single-element groups.
23230         (get_load_store_type): Update calls to get_group_load_store_type
23231         and vect_use_strided_gather_scatters_p.
23233 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23234             Alan Hayward  <alan.hayward@arm.com>
23235             David Sherwood  <david.sherwood@arm.com>
23237         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23238         optional tree argument.
23239         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23240         null target hooks.
23241         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23242         but continue to use the current value as a fallback.
23243         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23244         to compare the updates.
23245         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23246         (get_load_store_type): Use it when handling a strided access.
23247         (vect_get_strided_load_store_ops): New function.
23248         (vect_get_data_ptr_increment): Likewise.
23249         (vectorizable_load): Handle strided gather loads.  Always pass
23250         a step to vect_create_data_ref_ptr and bump_vector_ptr.
23252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23253             Alan Hayward  <alan.hayward@arm.com>
23254             David Sherwood  <david.sherwood@arm.com>
23256         * doc/md.texi (gather_load@var{m}): Document.
23257         (mask_gather_load@var{m}): Likewise.
23258         * genopinit.c (main): Add supports_vec_gather_load and
23259         supports_vec_gather_load_cached to target_optabs.
23260         * optabs-tree.c (init_tree_optimization_optabs): Use
23261         ggc_cleared_alloc to allocate target_optabs.
23262         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23263         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23264         functions.
23265         * internal-fn.h (internal_load_fn_p): Declare.
23266         (internal_gather_scatter_fn_p): Likewise.
23267         (internal_fn_mask_index): Likewise.
23268         (internal_gather_scatter_fn_supported_p): Likewise.
23269         * internal-fn.c (gather_load_direct): New macro.
23270         (expand_gather_load_optab_fn): New function.
23271         (direct_gather_load_optab_supported_p): New macro.
23272         (direct_internal_fn_optab): New function.
23273         (internal_load_fn_p): Likewise.
23274         (internal_gather_scatter_fn_p): Likewise.
23275         (internal_fn_mask_index): Likewise.
23276         (internal_gather_scatter_fn_supported_p): Likewise.
23277         * optabs-query.c (supports_at_least_one_mode_p): New function.
23278         (supports_vec_gather_load_p): Likewise.
23279         * optabs-query.h (supports_vec_gather_load_p): Declare.
23280         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23281         and memory_type field.
23282         (NUM_PATTERNS): Bump to 15.
23283         * tree-vect-data-refs.c: Include internal-fn.h.
23284         (vect_gather_scatter_fn_p): New function.
23285         (vect_describe_gather_scatter_call): Likewise.
23286         (vect_check_gather_scatter): Try using internal functions for
23287         gather loads.  Recognize existing calls to a gather load function.
23288         (vect_analyze_data_refs): Consider using gather loads if
23289         supports_vec_gather_load_p.
23290         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23291         (vect_get_gather_scatter_offset_type): Likewise.
23292         (vect_convert_mask_for_vectype): Likewise.
23293         (vect_add_conversion_to_patterm): Likewise.
23294         (vect_try_gather_scatter_pattern): Likewise.
23295         (vect_recog_gather_scatter_pattern): New pattern recognizer.
23296         (vect_vect_recog_func_ptrs): Add it.
23297         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23298         internal_fn_mask_index and internal_gather_scatter_fn_p.
23299         (check_load_store_masking): Take the gather_scatter_info as an
23300         argument and handle gather loads.
23301         (vect_get_gather_scatter_ops): New function.
23302         (vectorizable_call): Check internal_load_fn_p.
23303         (vectorizable_load): Likewise.  Handle gather load internal
23304         functions.
23305         (vectorizable_store): Update call to check_load_store_masking.
23306         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23307         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23308         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23309         (aarch64_gather_scale_operand_d): New predicates.
23310         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23311         (mask_gather_load<mode>): New insns.
23313 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23314             Alan Hayward  <alan.hayward@arm.com>
23315             David Sherwood  <david.sherwood@arm.com>
23317         * optabs.def (fold_left_plus_optab): New optab.
23318         * doc/md.texi (fold_left_plus_@var{m}): Document.
23319         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23320         * internal-fn.c (fold_left_direct): Define.
23321         (expand_fold_left_optab_fn): Likewise.
23322         (direct_fold_left_optab_supported_p): Likewise.
23323         * fold-const-call.c (fold_const_fold_left): New function.
23324         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23325         * tree-parloops.c (valid_reduction_p): New function.
23326         (gather_scalar_reductions): Use it.
23327         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23328         (vect_finish_replace_stmt): Declare.
23329         * tree-vect-loop.c (fold_left_reduction_fn): New function.
23330         (needs_fold_left_reduction_p): New function, split out from...
23331         (vect_is_simple_reduction): ...here.  Accept reductions that
23332         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23333         (vect_force_simple_reduction): Also store the reduction type in
23334         the assignment's STMT_VINFO_REDUC_TYPE.
23335         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23336         (merge_with_identity): New function.
23337         (vect_expand_fold_left): Likewise.
23338         (vectorize_fold_left_reduction): Likewise.
23339         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
23340         scalar phi in place for it.  Check for target support and reject
23341         cases that would reassociate the operation.  Defer the transform
23342         phase to vectorize_fold_left_reduction.
23343         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
23344         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
23345         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
23347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23349         * tree-if-conv.c (predicate_mem_writes): Remove redundant
23350         call to ifc_temp_var.
23352 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23353             Alan Hayward  <alan.hayward@arm.com>
23354             David Sherwood  <david.sherwood@arm.com>
23356         * target.def (legitimize_address_displacement): Take the original
23357         offset as a poly_int.
23358         * targhooks.h (default_legitimize_address_displacement): Update
23359         accordingly.
23360         * targhooks.c (default_legitimize_address_displacement): Likewise.
23361         * doc/tm.texi: Regenerate.
23362         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
23363         as an argument, moving assert of ad->disp == ad->disp_term to...
23364         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
23365         Try calling targetm.legitimize_address_displacement before expanding
23366         the address rather than afterwards, and adjust for the new interface.
23367         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
23368         Match the new hook interface.  Handle SVE addresses.
23369         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
23370         new hook interface.
23372 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23374         * Makefile.in (OBJS): Add early-remat.o.
23375         * target.def (select_early_remat_modes): New hook.
23376         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
23377         * doc/tm.texi: Regenerate.
23378         * targhooks.h (default_select_early_remat_modes): Declare.
23379         * targhooks.c (default_select_early_remat_modes): New function.
23380         * timevar.def (TV_EARLY_REMAT): New timevar.
23381         * passes.def (pass_early_remat): New pass.
23382         * tree-pass.h (make_pass_early_remat): Declare.
23383         * early-remat.c: New file.
23384         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
23385         function.
23386         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
23388 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23389             Alan Hayward  <alan.hayward@arm.com>
23390             David Sherwood  <david.sherwood@arm.com>
23392         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
23393         vfm1 with a bound_epilog parameter.
23394         (vect_do_peeling): Update calls accordingly, and move the prologue
23395         call earlier in the function.  Treat the base bound_epilog as 0 for
23396         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
23397         this base when peeling for gaps.
23398         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
23399         with fully-masked loops.
23400         (vect_estimate_min_profitable_iters): Handle the single peeled
23401         iteration in that case.
23403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23404             Alan Hayward  <alan.hayward@arm.com>
23405             David Sherwood  <david.sherwood@arm.com>
23407         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
23408         single-element interleaving even if the size is not a power of 2.
23409         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
23410         accesses for single-element interleaving if the group size is
23411         not a power of 2.
23413 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23414             Alan Hayward  <alan.hayward@arm.com>
23415             David Sherwood  <david.sherwood@arm.com>
23417         * doc/md.texi (fold_extract_last_@var{m}): Document.
23418         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
23419         * optabs.def (fold_extract_last_optab): New optab.
23420         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
23421         * internal-fn.c (fold_extract_direct): New macro.
23422         (expand_fold_extract_optab_fn): Likewise.
23423         (direct_fold_extract_optab_supported_p): Likewise.
23424         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
23425         * tree-vect-loop.c (vect_model_reduction_cost): Handle
23426         EXTRACT_LAST_REDUCTION.
23427         (get_initial_def_for_reduction): Do not create an initial vector
23428         for EXTRACT_LAST_REDUCTION reductions.
23429         (vectorizable_reduction): Leave the scalar phi in place for
23430         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
23431         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
23432         epilogue code for EXTRACT_LAST_REDUCTION and defer the
23433         transform phase to vectorizable_condition.
23434         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
23435         split out from...
23436         (vect_finish_stmt_generation): ...here.
23437         (vect_finish_replace_stmt): New function.
23438         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
23439         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
23440         pattern.
23441         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
23443 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23444             Alan Hayward  <alan.hayward@arm.com>
23445             David Sherwood  <david.sherwood@arm.com>
23447         * doc/md.texi (extract_last_@var{m}): Document.
23448         * optabs.def (extract_last_optab): New optab.
23449         * internal-fn.def (EXTRACT_LAST): New internal function.
23450         * internal-fn.c (cond_unary_direct): New macro.
23451         (expand_cond_unary_optab_fn): Likewise.
23452         (direct_cond_unary_optab_supported_p): Likewise.
23453         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
23454         loops using EXTRACT_LAST.
23455         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
23456         (extract_last_<mode>): ...this optab.
23457         (vec_extract<mode><Vel>): Update accordingly.
23459 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23460             Alan Hayward  <alan.hayward@arm.com>
23461             David Sherwood  <david.sherwood@arm.com>
23463         * target.def (empty_mask_is_expensive): New hook.
23464         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
23465         * doc/tm.texi: Regenerate.
23466         * targhooks.h (default_empty_mask_is_expensive): Declare.
23467         * targhooks.c (default_empty_mask_is_expensive): New function.
23468         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
23469         if the target says that empty masks are expensive.
23470         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
23471         New function.
23472         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
23474 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23475             Alan Hayward  <alan.hayward@arm.com>
23476             David Sherwood  <david.sherwood@arm.com>
23478         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
23479         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
23480         (vect_use_loop_mask_for_alignment_p): New function.
23481         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
23482         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
23483         niters_skip argument.  Make sure that the first niters_skip elements
23484         of the first iteration are inactive.
23485         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
23486         Update call to vect_set_loop_masks_directly.
23487         (get_misalign_in_elems): New function, split out from...
23488         (vect_gen_prolog_loop_niters): ...here.
23489         (vect_update_init_of_dr): Take a code argument that specifies whether
23490         the adjustment should be added or subtracted.
23491         (vect_update_init_of_drs): Likewise.
23492         (vect_prepare_for_masked_peels): New function.
23493         (vect_do_peeling): Skip prologue peeling if we're using a mask
23494         instead.  Update call to vect_update_inits_of_drs.
23495         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23496         mask_skip_niters.
23497         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
23498         alignment.  Do not include the number of peeled iterations in
23499         the minimum threshold in that case.
23500         (vectorizable_induction): Adjust the start value down by
23501         LOOP_VINFO_MASK_SKIP_NITERS iterations.
23502         (vect_transform_loop): Call vect_prepare_for_masked_peels.
23503         Take the number of skipped iterations into account when calculating
23504         the loop bounds.
23505         * tree-vect-stmts.c (vect_gen_while_not): New function.
23507 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23508             Alan Hayward  <alan.hayward@arm.com>
23509             David Sherwood  <david.sherwood@arm.com>
23511         * doc/sourcebuild.texi (vect_fully_masked): Document.
23512         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
23513         default value to 0.
23514         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
23515         split out from...
23516         (vect_analyze_loop_2): ...here. Don't check the vectorization
23517         factor against the number of loop iterations if the loop is
23518         fully-masked.
23520 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23521             Alan Hayward  <alan.hayward@arm.com>
23522             David Sherwood  <david.sherwood@arm.com>
23524         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
23525         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
23526         (dump_groups): Update accordingly.
23527         (iv_use::mem_type): New member variable.
23528         (address_p): New function.
23529         (record_use): Add a mem_type argument and initialize the new
23530         mem_type field.
23531         (record_group_use): Add a mem_type argument.  Use address_p.
23532         Remove obsolete null checks of base_object.  Update call to record_use.
23533         (find_interesting_uses_op): Update call to record_group_use.
23534         (find_interesting_uses_cond): Likewise.
23535         (find_interesting_uses_address): Likewise.
23536         (get_mem_type_for_internal_fn): New function.
23537         (find_address_like_use): Likewise.
23538         (find_interesting_uses_stmt): Try find_address_like_use before
23539         calling find_interesting_uses_op.
23540         (addr_offset_valid_p): Use the iv mem_type field as the type
23541         of the addressed memory.
23542         (add_autoinc_candidates): Likewise.
23543         (get_address_cost): Likewise.
23544         (split_small_address_groups_p): Use address_p.
23545         (split_address_groups): Likewise.
23546         (add_iv_candidate_for_use): Likewise.
23547         (autoinc_possible_for_pair): Likewise.
23548         (rewrite_groups): Likewise.
23549         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
23550         (determine_group_iv_cost): Update after split of USE_ADDRESS.
23551         (get_alias_ptr_type_for_ptr_address): New function.
23552         (rewrite_use_address): Rewrite address uses in calls that were
23553         identified by find_address_like_use.
23555 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23556             Alan Hayward  <alan.hayward@arm.com>
23557             David Sherwood  <david.sherwood@arm.com>
23559         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
23560         TARGET_MEM_REFs.
23561         * gimple-expr.h (is_gimple_addressable: Likewise.
23562         * gimple-expr.c (is_gimple_address): Likewise.
23563         * internal-fn.c (expand_call_mem_ref): New function.
23564         (expand_mask_load_optab_fn): Use it.
23565         (expand_mask_store_optab_fn): Likewise.
23567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23568             Alan Hayward  <alan.hayward@arm.com>
23569             David Sherwood  <david.sherwood@arm.com>
23571         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
23572         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
23573         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
23574         (cond_umax@var{mode}): Document.
23575         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
23576         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
23577         (cond_umin_optab, cond_umax_optab): New optabs.
23578         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
23579         (COND_IOR, COND_XOR): New internal functions.
23580         * internal-fn.h (get_conditional_internal_fn): Declare.
23581         * internal-fn.c (cond_binary_direct): New macro.
23582         (expand_cond_binary_optab_fn): Likewise.
23583         (direct_cond_binary_optab_supported_p): Likewise.
23584         (get_conditional_internal_fn): New function.
23585         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
23586         Cope with reduction statements that are vectorized as calls rather
23587         than assignments.
23588         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
23589         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
23590         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
23591         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
23592         (UNSPEC_COND_EOR): New unspecs.
23593         (optab): Add mappings for them.
23594         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
23595         (sve_int_op, sve_fp_op): New int attributes.
23597 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23598             Alan Hayward  <alan.hayward@arm.com>
23599             David Sherwood  <david.sherwood@arm.com>
23601         * optabs.def (while_ult_optab): New optab.
23602         * doc/md.texi (while_ult@var{m}@var{n}): Document.
23603         * internal-fn.def (WHILE_ULT): New internal function.
23604         * internal-fn.h (direct_internal_fn_supported_p): New override
23605         that takes two types as argument.
23606         * internal-fn.c (while_direct): New macro.
23607         (expand_while_optab_fn): New function.
23608         (convert_optab_supported_p): Likewise.
23609         (direct_while_optab_supported_p): New macro.
23610         * wide-int.h (wi::udiv_ceil): New function.
23611         * tree-vectorizer.h (rgroup_masks): New structure.
23612         (vec_loop_masks): New typedef.
23613         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
23614         and fully_masked_p.
23615         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
23616         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
23617         (vect_max_vf): New function.
23618         (slpeel_make_loop_iterate_ntimes): Delete.
23619         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
23620         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
23621         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
23622         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
23623         internal-fn.h, stor-layout.h and optabs-query.h.
23624         (vect_set_loop_mask): New function.
23625         (add_preheader_seq): Likewise.
23626         (add_header_seq): Likewise.
23627         (interleave_supported_p): Likewise.
23628         (vect_maybe_permute_loop_masks): Likewise.
23629         (vect_set_loop_masks_directly): Likewise.
23630         (vect_set_loop_condition_masked): Likewise.
23631         (vect_set_loop_condition_unmasked): New function, split out from
23632         slpeel_make_loop_iterate_ntimes.
23633         (slpeel_make_loop_iterate_ntimes): Rename to..
23634         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
23635         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
23636         (vect_do_peeling): Update call accordingly.
23637         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
23638         loops.
23639         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23640         mask_compare_type, can_fully_mask_p and fully_masked_p.
23641         (release_vec_loop_masks): New function.
23642         (_loop_vec_info): Use it to free the loop masks.
23643         (can_produce_all_loop_masks_p): New function.
23644         (vect_get_max_nscalars_per_iter): Likewise.
23645         (vect_verify_full_masking): Likewise.
23646         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
23647         retries, and free the mask rgroups before retrying.  Check loop-wide
23648         reasons for disallowing fully-masked loops.  Make the final decision
23649         about whether use a fully-masked loop or not.
23650         (vect_estimate_min_profitable_iters): Do not assume that peeling
23651         for the number of iterations will be needed for fully-masked loops.
23652         (vectorizable_reduction): Disable fully-masked loops.
23653         (vectorizable_live_operation): Likewise.
23654         (vect_halve_mask_nunits): New function.
23655         (vect_double_mask_nunits): Likewise.
23656         (vect_record_loop_mask): Likewise.
23657         (vect_get_loop_mask): Likewise.
23658         (vect_transform_loop): Handle the case in which the final loop
23659         iteration might handle a partial vector.  Call vect_set_loop_condition
23660         instead of slpeel_make_loop_iterate_ntimes.
23661         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
23662         (check_load_store_masking): New function.
23663         (prepare_load_store_mask): Likewise.
23664         (vectorizable_store): Handle fully-masked loops.
23665         (vectorizable_load): Likewise.
23666         (supportable_widening_operation): Use vect_halve_mask_nunits for
23667         booleans.
23668         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
23669         (vect_gen_while): New function.
23670         * config/aarch64/aarch64.md (umax<mode>3): New expander.
23671         (aarch64_uqdec<mode>): New insn.
23673 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23674             Alan Hayward  <alan.hayward@arm.com>
23675             David Sherwood  <david.sherwood@arm.com>
23677         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
23678         (reduc_xor_scal_optab): New optabs.
23679         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
23680         (reduc_xor_scal_@var{m}): Document.
23681         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
23682         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
23683         internal functions.
23684         * fold-const-call.c (fold_const_call): Handle them.
23685         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
23686         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
23687         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
23688         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
23689         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
23690         (UNSPEC_XORV): New unspecs.
23691         (optab): Add entries for them.
23692         (BITWISEV): New int iterator.
23693         (bit_reduc_op): New int attributes.
23695 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23696             Alan Hayward  <alan.hayward@arm.com>
23697             David Sherwood  <david.sherwood@arm.com>
23699         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
23700         * internal-fn.def (VEC_SHL_INSERT): New internal function.
23701         * optabs.def (vec_shl_insert_optab): New optab.
23702         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
23703         (duplicate_and_interleave): Likewise.
23704         * tree-vect-loop.c: Include internal-fn.h.
23705         (neutral_op_for_slp_reduction): New function, split out from
23706         get_initial_defs_for_reduction.
23707         (get_initial_def_for_reduction): Handle option 2 for variable-length
23708         vectors by loading the neutral value into a vector and then shifting
23709         the initial value into element 0.
23710         (get_initial_defs_for_reduction): Replace the code argument with
23711         the neutral value calculated by neutral_op_for_slp_reduction.
23712         Use gimple_build_vector for constant-length vectors.
23713         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
23714         but the first group_size elements have a neutral value.
23715         Use duplicate_and_interleave otherwise.
23716         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
23717         Update call to get_initial_defs_for_reduction.  Handle SLP
23718         reductions for variable-length vectors by creating one vector
23719         result for each scalar result, with the elements associated
23720         with other scalar results stubbed out with the neutral value.
23721         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
23722         Require IFN_VEC_SHL_INSERT for double reductions on
23723         variable-length vectors, or SLP reductions that have
23724         a neutral value.  Require can_duplicate_and_interleave_p
23725         support for variable-length unchained SLP reductions if there
23726         is no neutral value, such as for MIN/MAX reductions.  Also require
23727         the number of vector elements to be a multiple of the number of
23728         SLP statements when doing variable-length unchained SLP reductions.
23729         Update call to vect_create_epilog_for_reduction.
23730         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
23731         and remove initial values.
23732         (duplicate_and_interleave): Make public.
23733         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
23734         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
23736 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23737             Alan Hayward  <alan.hayward@arm.com>
23738             David Sherwood  <david.sherwood@arm.com>
23740         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
23741         (can_duplicate_and_interleave_p): New function.
23742         (vect_get_and_check_slp_defs): Take the vector of statements
23743         rather than just the current one.  Remove excess parentheses.
23744         Restriction rejectinon of vect_constant_def and vect_external_def
23745         for variable-length vectors to boolean types, or types for which
23746         can_duplicate_and_interleave_p is false.
23747         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
23748         (duplicate_and_interleave): New function.
23749         (vect_get_constant_vectors): Use gimple_build_vector for
23750         constant-length vectors and suitable variable-length constant
23751         vectors.  Use duplicate_and_interleave for other variable-length
23752         vectors.  Don't defer the update when inserting new statements.
23754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23755             Alan Hayward  <alan.hayward@arm.com>
23756             David Sherwood  <david.sherwood@arm.com>
23758         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
23759         min_profitable_iters doesn't go negative.
23761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23762             Alan Hayward  <alan.hayward@arm.com>
23763             David Sherwood  <david.sherwood@arm.com>
23765         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
23766         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
23767         * optabs.def (vec_mask_load_lanes_optab): New optab.
23768         (vec_mask_store_lanes_optab): Likewise.
23769         * internal-fn.def (MASK_LOAD_LANES): New internal function.
23770         (MASK_STORE_LANES): Likewise.
23771         * internal-fn.c (mask_load_lanes_direct): New macro.
23772         (mask_store_lanes_direct): Likewise.
23773         (expand_mask_load_optab_fn): Handle masked operations.
23774         (expand_mask_load_lanes_optab_fn): New macro.
23775         (expand_mask_store_optab_fn): Handle masked operations.
23776         (expand_mask_store_lanes_optab_fn): New macro.
23777         (direct_mask_load_lanes_optab_supported_p): Likewise.
23778         (direct_mask_store_lanes_optab_supported_p): Likewise.
23779         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
23780         parameter.
23781         (vect_load_lanes_supported): Likewise.
23782         * tree-vect-data-refs.c (strip_conversion): New function.
23783         (can_group_stmts_p): Likewise.
23784         (vect_analyze_data_ref_accesses): Use it instead of checking
23785         for a pair of assignments.
23786         (vect_store_lanes_supported): Take a masked_p parameter.
23787         (vect_load_lanes_supported): Likewise.
23788         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
23789         vect_store_lanes_supported and vect_load_lanes_supported.
23790         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
23791         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
23792         parameter.  Don't allow gaps for masked accesses.
23793         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
23794         and vect_load_lanes_supported.
23795         (get_load_store_type): Take a masked_p parameter and update
23796         call to get_group_load_store_type.
23797         (vectorizable_store): Update call to get_load_store_type.
23798         Handle IFN_MASK_STORE_LANES.
23799         (vectorizable_load): Update call to get_load_store_type.
23800         Handle IFN_MASK_LOAD_LANES.
23802 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23803             Alan Hayward  <alan.hayward@arm.com>
23804             David Sherwood  <david.sherwood@arm.com>
23806         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
23807         modes for SVE.
23808         * config/aarch64/aarch64-protos.h
23809         (aarch64_sve_struct_memory_operand_p): Declare.
23810         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
23811         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
23812         (VPRED, vpred): Handle SVE structure modes.
23813         * config/aarch64/constraints.md (Utx): New constraint.
23814         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
23815         (aarch64_sve_struct_nonimmediate_operand): New predicates.
23816         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
23817         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
23818         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
23819         structure modes.  Split into pieces after RA.
23820         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
23821         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
23822         New patterns.
23823         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
23824         SVE structure modes.
23825         (aarch64_classify_address): Likewise.
23826         (sizetochar): Move earlier in file.
23827         (aarch64_print_operand): Handle SVE register lists.
23828         (aarch64_array_mode): New function.
23829         (aarch64_sve_struct_memory_operand_p): Likewise.
23830         (TARGET_ARRAY_MODE): Redefine.
23832 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23833             Alan Hayward  <alan.hayward@arm.com>
23834             David Sherwood  <david.sherwood@arm.com>
23836         * target.def (array_mode): New target hook.
23837         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
23838         * doc/tm.texi: Regenerate.
23839         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
23840         * hooks.c (hook_optmode_mode_uhwi_none): New function.
23841         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
23842         targetm.array_mode.
23843         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
23844         type sizes.
23846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23847             Alan Hayward  <alan.hayward@arm.com>
23848             David Sherwood  <david.sherwood@arm.com>
23850         * fold-const.c (fold_binary_loc): Check the argument types
23851         rather than the result type when testing for a vector operation.
23853 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23855         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
23856         * doc/tm.texi: Regenerate.
23858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23859             Alan Hayward  <alan.hayward@arm.com>
23860             David Sherwood  <david.sherwood@arm.com>
23862         * doc/invoke.texi (-msve-vector-bits=): Document new option.
23863         (sve): Document new AArch64 extension.
23864         * doc/md.texi (w): Extend the description of the AArch64
23865         constraint to include SVE vectors.
23866         (Upl, Upa): Document new AArch64 predicate constraints.
23867         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
23868         enum.
23869         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
23870         (msve-vector-bits=): New option.
23871         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
23872         SVE when these are disabled.
23873         (sve): New extension.
23874         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
23875         modes.  Adjust their number of units based on aarch64_sve_vg.
23876         (MAX_BITSIZE_MODE_ANY_MODE): Define.
23877         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
23878         aarch64_addr_query_type.
23879         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
23880         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
23881         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
23882         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
23883         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
23884         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
23885         (aarch64_simd_imm_zero_p): Delete.
23886         (aarch64_check_zero_based_sve_index_immediate): Declare.
23887         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23888         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23889         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23890         (aarch64_sve_float_mul_immediate_p): Likewise.
23891         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23892         rather than an rtx.
23893         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
23894         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
23895         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
23896         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
23897         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
23898         (aarch64_regmode_natural_size): Likewise.
23899         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
23900         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
23901         left one place.
23902         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
23903         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
23904         for VG and the SVE predicate registers.
23905         (V_ALIASES): Add a "z"-prefixed alias.
23906         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
23907         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
23908         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
23909         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
23910         (REG_CLASS_NAMES): Add entries for them.
23911         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
23912         and the predicate registers.
23913         (aarch64_sve_vg): Declare.
23914         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
23915         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
23916         (REGMODE_NATURAL_SIZE): Define.
23917         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
23918         SVE macros.
23919         * config/aarch64/aarch64.c: Include cfgrtl.h.
23920         (simd_immediate_info): Add a constructor for series vectors,
23921         and an associated step field.
23922         (aarch64_sve_vg): New variable.
23923         (aarch64_dbx_register_number): Handle VG and the predicate registers.
23924         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
23925         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
23926         (VEC_ANY_DATA, VEC_STRUCT): New constants.
23927         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
23928         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
23929         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
23930         (aarch64_get_mask_mode): New functions.
23931         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
23932         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
23933         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
23934         predicate modes and predicate registers.  Explicitly restrict
23935         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
23936         to store a vector mode if it is recognized by
23937         aarch64_classify_vector_mode.
23938         (aarch64_regmode_natural_size): New function.
23939         (aarch64_hard_regno_caller_save_mode): Return the original mode
23940         for predicates.
23941         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
23942         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
23943         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
23944         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
23945         functions.
23946         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
23947         does not overlap dest if the function is frame-related.  Handle
23948         SVE constants.
23949         (aarch64_split_add_offset): New function.
23950         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
23951         them aarch64_add_offset.
23952         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
23953         and update call to aarch64_sub_sp.
23954         (aarch64_add_cfa_expression): New function.
23955         (aarch64_expand_prologue): Pass extra temporary registers to the
23956         functions above.  Handle the case in which we need to emit new
23957         DW_CFA_expressions for registers that were originally saved
23958         relative to the stack pointer, but now have to be expressed
23959         relative to the frame pointer.
23960         (aarch64_output_mi_thunk): Pass extra temporary registers to the
23961         functions above.
23962         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
23963         IP0 and IP1 values for SVE frames.
23964         (aarch64_expand_vec_series): New function.
23965         (aarch64_expand_sve_widened_duplicate): Likewise.
23966         (aarch64_expand_sve_const_vector): Likewise.
23967         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
23968         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
23969         into the register, rather than emitting a SET directly.
23970         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
23971         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
23972         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
23973         (offset_9bit_signed_scaled_p): New functions.
23974         (aarch64_replicate_bitmask_imm): New function.
23975         (aarch64_bitmask_imm): Use it.
23976         (aarch64_cannot_force_const_mem): Reject expressions involving
23977         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
23978         (aarch64_classify_index): Handle SVE indices, by requiring
23979         a plain register index with a scale that matches the element size.
23980         (aarch64_classify_address): Handle SVE addresses.  Assert that
23981         the mode of the address is VOIDmode or an integer mode.
23982         Update call to aarch64_classify_symbol.
23983         (aarch64_classify_symbolic_expression): Update call to
23984         aarch64_classify_symbol.
23985         (aarch64_const_vec_all_in_range_p): New function.
23986         (aarch64_print_vector_float_operand): Likewise.
23987         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
23988         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
23989         and the FP immediates 1.0 and 0.5.
23990         (aarch64_print_address_internal): Handle SVE addresses.
23991         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
23992         (aarch64_regno_regclass): Handle predicate registers.
23993         (aarch64_secondary_reload): Handle big-endian reloads of SVE
23994         data modes.
23995         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
23996         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
23997         (aarch64_convert_sve_vector_bits): New function.
23998         (aarch64_override_options): Use it to handle -msve-vector-bits=.
23999         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24000         rather than an rtx.
24001         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24002         Handle SVE vector and predicate modes.  Accept VL-based constants
24003         that need only one temporary register, and VL offsets that require
24004         no temporary registers.
24005         (aarch64_conditional_register_usage): Mark the predicate registers
24006         as fixed if SVE isn't available.
24007         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24008         Return true for SVE vector and predicate modes.
24009         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24010         rather than an unsigned int.  Handle SVE modes.
24011         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
24012         SVE modes.
24013         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24014         if SVE is enabled.
24015         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24016         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24017         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24018         (aarch64_sve_float_mul_immediate_p): New functions.
24019         (aarch64_sve_valid_immediate): New function.
24020         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24021         Explicitly reject structure modes.  Check for INDEX constants.
24022         Handle PTRUE and PFALSE constants.
24023         (aarch64_check_zero_based_sve_index_immediate): New function.
24024         (aarch64_simd_imm_zero_p): Delete.
24025         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24026         vector modes.  Accept constants in the range of CNT[BHWD].
24027         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24028         ask for an Advanced SIMD mode.
24029         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24030         (aarch64_simd_vector_alignment): Handle SVE predicates.
24031         (aarch64_vectorize_preferred_vector_alignment): New function.
24032         (aarch64_simd_vector_alignment_reachable): Use it instead of
24033         the vector size.
24034         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24035         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24036         functions.
24037         (MAX_VECT_LEN): Delete.
24038         (expand_vec_perm_d): Add a vec_flags field.
24039         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24040         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24041         (aarch64_evpc_ext): Don't apply a big-endian lane correction
24042         for SVE modes.
24043         (aarch64_evpc_rev): Rename to...
24044         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
24045         (aarch64_evpc_rev_global): New function.
24046         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24047         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24048         MAX_VECT_LEN.
24049         (aarch64_evpc_sve_tbl): New function.
24050         (aarch64_expand_vec_perm_const_1): Update after rename of
24051         aarch64_evpc_rev.  Handle SVE permutes too, trying
24052         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24053         than aarch64_evpc_tbl.
24054         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24055         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24056         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24057         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24058         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24059         (aarch64_expand_sve_vcond): New functions.
24060         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24061         of aarch64_vector_mode_p.
24062         (aarch64_dwarf_poly_indeterminate_value): New function.
24063         (aarch64_compute_pressure_classes): Likewise.
24064         (aarch64_can_change_mode_class): Likewise.
24065         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24066         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24067         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24068         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24069         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24070         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24071         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24072         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24073         constraints.
24074         (Dn, Dl, Dr): Accept const as well as const_vector.
24075         (Dz): Likewise.  Compare against CONST0_RTX.
24076         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24077         of "vector" where appropriate.
24078         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24079         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24080         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24081         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24082         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24083         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24084         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24085         (v_int_equiv): Extend to SVE modes.
24086         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24087         mode attributes.
24088         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24089         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24090         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24091         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24092         (SVE_COND_FP_CMP): New int iterators.
24093         (perm_hilo): Handle the new unpack unspecs.
24094         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24095         attributes.
24096         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24097         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24098         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24099         (aarch64_equality_operator, aarch64_constant_vector_operand)
24100         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24101         (aarch64_sve_nonimmediate_operand): Likewise.
24102         (aarch64_sve_general_operand): Likewise.
24103         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24104         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24105         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24106         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24107         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24108         (aarch64_sve_float_arith_immediate): Likewise.
24109         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24110         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24111         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24112         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24113         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24114         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24115         (aarch64_sve_float_arith_operand): Likewise.
24116         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24117         (aarch64_sve_float_mul_operand): Likewise.
24118         (aarch64_sve_vec_perm_operand): Likewise.
24119         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24120         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24121         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24122         as well as const_vector.
24123         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24124         in file.  Use CONST0_RTX and CONSTM1_RTX.
24125         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24126         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24127         Use aarch64_simd_imm_zero.
24128         * config/aarch64/aarch64-sve.md: New file.
24129         * config/aarch64/aarch64.md: Include it.
24130         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24131         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24132         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24133         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24134         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24135         (sve): New attribute.
24136         (enabled): Disable instructions with the sve attribute unless
24137         TARGET_SVE.
24138         (movqi, movhi): Pass CONST_POLY_INT operaneds through
24139         aarch64_expand_mov_immediate.
24140         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24141         CNT[BHSD] immediates.
24142         (movti): Split CONST_POLY_INT moves into two halves.
24143         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24144         Split additions that need a temporary here if the destination
24145         is the stack pointer.
24146         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24147         (*add<mode>3_poly_1): New instruction.
24148         (set_clobber_cc): New expander.
24150 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24152         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24153         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
24154         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24155         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24156         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
24157         Change innermode from fixed_mode_size to machine_mode.
24158         (simplify_subreg): Update call accordingly.  Handle a constant-sized
24159         subreg of a variable-length CONST_VECTOR.
24161 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24162             Alan Hayward  <alan.hayward@arm.com>
24163             David Sherwood  <david.sherwood@arm.com>
24165         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24166         (add_offset_to_base): New function, split out from...
24167         (create_mem_ref): ...here.  When handling a scale other than 1,
24168         check first whether the address is valid without the offset.
24169         Add it into the base if so, leaving the index and scale as-is.
24171 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24173         PR c++/83778
24174         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24175         fold_for_warn before checking if arg2 is INTEGER_CST.
24177 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
24179         * config/rs6000/predicates.md (load_multiple_operation): Delete.
24180         (store_multiple_operation): Delete.
24181         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24182         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24183         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24184         guarded by TARGET_STRING.
24185         (rs6000_output_load_multiple): Delete.
24186         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24187         OPTION_MASK_STRING / TARGET_STRING handling.
24188         (print_operand) <'N', 'O'>: Add comment that these are unused now.
24189         (const rs6000_opt_masks) <"string">: Change mask to 0.
24190         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24191         (MASK_STRING): Delete.
24192         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24193         parts.  Simplify.
24194         (load_multiple): Delete.
24195         (*ldmsi8): Delete.
24196         (*ldmsi7): Delete.
24197         (*ldmsi6): Delete.
24198         (*ldmsi5): Delete.
24199         (*ldmsi4): Delete.
24200         (*ldmsi3): Delete.
24201         (store_multiple): Delete.
24202         (*stmsi8): Delete.
24203         (*stmsi7): Delete.
24204         (*stmsi6): Delete.
24205         (*stmsi5): Delete.
24206         (*stmsi4): Delete.
24207         (*stmsi3): Delete.
24208         (movmemsi_8reg): Delete.
24209         (corresponding unnamed define_insn): Delete.
24210         (movmemsi_6reg): Delete.
24211         (corresponding unnamed define_insn): Delete.
24212         (movmemsi_4reg): Delete.
24213         (corresponding unnamed define_insn): Delete.
24214         (movmemsi_2reg): Delete.
24215         (corresponding unnamed define_insn): Delete.
24216         (movmemsi_1reg): Delete.
24217         (corresponding unnamed define_insn): Delete.
24218         * config/rs6000/rs6000.opt (mno-string): New.
24219         (mstring): Replace by deprecation warning stub.
24220         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24222 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24224         * regrename.c (regrename_do_replace): If replacing the same
24225         reg multiple times, try to reuse last created gen_raw_REG.
24227         PR debug/81155
24228         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24229         main to workaround a bug in GDB.
24231 2018-01-12  Tom de Vries  <tom@codesourcery.com>
24233         PR target/83737
24234         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24236 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
24238         PR rtl-optimization/80481
24239         * ira-color.c (get_cap_member): New function.
24240         (allocnos_conflict_by_live_ranges_p): Use it.
24241         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24242         (setup_slot_coalesced_allocno_live_ranges): Ditto.
24244 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
24246         PR target/83628
24247         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24248         (*saddl_se_1): Ditto.
24249         (*ssubsi_1): Ditto.
24250         (*ssubl_se_1): Ditto.
24252 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24254         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24255         rather than wi::to_widest for DR_INITs.
24256         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24257         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24258         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24259         INTEGER_CSTs.
24260         (vect_analyze_group_access_1): Note that here.
24262 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24264         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24265         polynomial type sizes.
24267 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24269         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24270         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24271         (gimple_add_tmp_var): Likewise.
24273 2018-01-12  Martin Liska  <mliska@suse.cz>
24275         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24276         (gimple_alloc_sizes): Likewise.
24277         (dump_gimple_statistics): Use PRIu64 in printf format.
24278         * gimple.h: Change uint64_t to int.
24280 2018-01-12  Martin Liska  <mliska@suse.cz>
24282         * tree-core.h: Use uint64_t instead of int.
24283         * tree.c (tree_node_counts): Likewise.
24284         (tree_node_sizes): Likewise.
24285         (dump_tree_statistics): Use PRIu64 in printf format.
24287 2018-01-12  Martin Liska  <mliska@suse.cz>
24289         * Makefile.in: As qsort_chk is implemented in vec.c, add
24290         vec.o to linkage of gencfn-macros.
24291         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24292         passing the info to record_node_allocation_statistics.
24293         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24294         and pass the info.
24295         * ggc-common.c (struct ggc_usage): Add operator== and use
24296         it in operator< and compare function.
24297         * mem-stats.h (struct mem_usage): Likewise.
24298         * vec.c (struct vec_usage): Remove operator< and compare
24299         function. Can be simply inherited.
24301 2018-01-12  Martin Jambor  <mjambor@suse.cz>
24303         PR target/81616
24304         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24305         * tree-ssa-math-opts.c: Include domwalk.h.
24306         (convert_mult_to_fma_1): New function.
24307         (fma_transformation_info): New type.
24308         (fma_deferring_state): Likewise.
24309         (cancel_fma_deferring): New function.
24310         (result_of_phi): Likewise.
24311         (last_fma_candidate_feeds_initial_phi): Likewise.
24312         (convert_mult_to_fma): Added deferring logic, split actual
24313         transformation to convert_mult_to_fma_1.
24314         (math_opts_dom_walker): New type.
24315         (math_opts_dom_walker::after_dom_children): New method, body moved
24316         here from pass_optimize_widening_mul::execute, added deferring logic
24317         bits.
24318         (pass_optimize_widening_mul::execute): Moved most of code to
24319         math_opts_dom_walker::after_dom_children.
24320         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24321         * config/i386/i386.c (ix86_option_override_internal): Added
24322         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24324 2018-01-12  Richard Biener  <rguenther@suse.de>
24326         PR debug/83157
24327         * dwarf2out.c (gen_variable_die): Do not reset old_die for
24328         inline instance vars.
24330 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
24332         PR target/81819
24333         * config/rx/rx.c (rx_is_restricted_memory_address):
24334         Handle SUBREG case.
24336 2018-01-12  Richard Biener  <rguenther@suse.de>
24338         PR tree-optimization/80846
24339         * target.def (split_reduction): New target hook.
24340         * targhooks.c (default_split_reduction): New function.
24341         * targhooks.h (default_split_reduction): Declare.
24342         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
24343         target requests first reduce vectors by combining low and high
24344         parts.
24345         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
24346         (get_vectype_for_scalar_type_and_size): Export.
24347         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
24348         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
24349         * doc/tm.texi: Regenerate.
24350         * config/i386/i386.c (ix86_split_reduction): Implement
24351         TARGET_VECTORIZE_SPLIT_REDUCTION.
24353 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24355         PR target/83368
24356         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
24357         in PIC mode except for TARGET_VXWORKS_RTP.
24358         * config/sparc/sparc.c: Include cfgrtl.h.
24359         (TARGET_INIT_PIC_REG): Define.
24360         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
24361         (sparc_pic_register_p): New predicate.
24362         (sparc_legitimate_address_p): Use it.
24363         (sparc_legitimize_pic_address): Likewise.
24364         (sparc_delegitimize_address): Likewise.
24365         (sparc_mode_dependent_address_p): Likewise.
24366         (gen_load_pcrel_sym): Remove 4th parameter.
24367         (load_got_register): Adjust call to above.  Remove obsolete stuff.
24368         (sparc_expand_prologue): Do not call load_got_register here.
24369         (sparc_flat_expand_prologue): Likewise.
24370         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
24371         (sparc_use_pseudo_pic_reg): New function.
24372         (sparc_init_pic_reg): Likewise.
24373         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24374         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
24376 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
24378         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
24379         Add item for branch_cost.
24381 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24383         PR rtl-optimization/83565
24384         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
24385         not extend the result to a larger mode for rotate operations.
24386         (num_sign_bit_copies1): Likewise.
24388 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24390         PR target/40411
24391         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
24392         -symbolic.
24393         Use values-Xc.o for -pedantic.
24394         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
24396 2018-01-12  Martin Liska  <mliska@suse.cz>
24398         PR ipa/83054
24399         * ipa-devirt.c (final_warning_record::grow_type_warnings):
24400         New function.
24401         (possible_polymorphic_call_targets): Use it.
24402         (ipa_devirt): Likewise.
24404 2018-01-12  Martin Liska  <mliska@suse.cz>
24406         * profile-count.h (enum profile_quality): Use 0 as invalid
24407         enum value of profile_quality.
24409 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
24411         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
24412         -mext-string options.
24414 2018-01-12  Richard Biener  <rguenther@suse.de>
24416         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
24417         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
24418         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
24419         Likewise.
24420         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
24422 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
24424         * configure.ac (--with-long-double-format): Add support for the
24425         configuration option to change the default long double format on
24426         PowerPC systems.
24427         * config.gcc (powerpc*-linux*-*): Likewise.
24428         * configure: Regenerate.
24429         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
24430         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
24431         used without modification.
24433 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24435         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
24436         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
24437         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
24438         MISC_BUILTIN_SPEC_BARRIER.
24439         (rs6000_init_builtins): Likewise.
24440         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
24441         enum value.
24442         (speculation_barrier): New define_insn.
24443         * doc/extend.texi: Document __builtin_speculation_barrier.
24445 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
24447         PR target/83203
24448         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
24449         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
24450         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
24451         iterators.
24452         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
24453         integral modes instead of "ss" and "sd".
24454         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
24455         vectors with 32-bit and 64-bit elements.
24456         (vecdupssescalarmodesuffix): New mode attribute.
24457         (vec_dup<mode>): Use it.
24459 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
24461         PR target/83330
24462         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
24463         frame if argument is passed on stack.
24465 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
24467         PR target/82682
24468         * ree.c (combine_reaching_defs): Optimize also
24469         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
24470         reg2=any_extend(exp); reg1=reg2;, formatting fix.
24472 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
24474         PR middle-end/83189
24475         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
24477 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
24479         PR middle-end/83718
24480         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
24481         after they are computed.
24483 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
24485         PR tree-optimization/83695
24486         * gimple-loop-linterchange.cc
24487         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
24488         reset cached scev information after interchange.
24489         (pass_linterchange::execute): Remove call to scev_reset_htab.
24491 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24493         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
24494         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
24495         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
24496         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
24497         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
24498         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
24499         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
24500         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
24501         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
24502         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
24503         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
24504         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
24505         (V_lane_reg): Likewise.
24506         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
24507         New define_expand.
24508         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
24509         (vfmal_lane_low<mode>_intrinsic,
24510         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
24511         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
24512         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
24513         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
24514         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
24515         vfmsl_lane_high<mode>_intrinsic): New define_insns.
24517 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24519         * config/arm/arm-cpus.in (fp16fml): New feature.
24520         (ALL_SIMD): Add fp16fml.
24521         (armv8.2-a): Add fp16fml as an option.
24522         (armv8.3-a): Likewise.
24523         (armv8.4-a): Add fp16fml as part of fp16.
24524         * config/arm/arm.h (TARGET_FP16FML): Define.
24525         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
24526         when appropriate.
24527         * config/arm/arm-modes.def (V2HF): Define.
24528         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
24529         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
24530         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
24531         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
24532         vfmsl_low, vfmsl_high): New set of builtins.
24533         * config/arm/iterators.md (PLUSMINUS): New code iterator.
24534         (vfml_op): New code attribute.
24535         (VFMLHALVES): New int iterator.
24536         (VFML, VFMLSEL): New mode attributes.
24537         (V_reg): Define mapping for V2HF.
24538         (V_hi, V_lo): New mode attributes.
24539         (VF_constraint): Likewise.
24540         (vfml_half, vfml_half_selector): New int attributes.
24541         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
24542         define_expand.
24543         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
24544         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
24545         New define_insn.
24546         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
24547         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
24548         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
24549         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
24550         documentation.
24551         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
24552         Document new effective target and option set.
24554 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24556         * config/arm/arm-cpus.in (armv8_4): New feature.
24557         (ARMv8_4a): New fgroup.
24558         (armv8.4-a): New arch.
24559         * config/arm/arm-tables.opt: Regenerate.
24560         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
24561         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
24562         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
24563         Add matching rules for -march=armv8.4-a and extensions.
24564         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
24566 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
24568         PR target/81821
24569         * config/rx/rx.md (BW): New mode attribute.
24570         (sync_lock_test_and_setsi): Add mode suffix to insn output.
24572 2018-01-11  Richard Biener  <rguenther@suse.de>
24574         PR tree-optimization/83435
24575         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
24576         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
24577         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
24579 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24580             Alan Hayward  <alan.hayward@arm.com>
24581             David Sherwood  <david.sherwood@arm.com>
24583         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
24584         field.
24585         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
24586         (aarch64_print_address_internal): Use it to check for a zero offset.
24588 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24589             Alan Hayward  <alan.hayward@arm.com>
24590             David Sherwood  <david.sherwood@arm.com>
24592         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
24593         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
24594         Return a poly_int64 rather than a HOST_WIDE_INT.
24595         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
24596         rather than a HOST_WIDE_INT.
24597         * config/aarch64/aarch64.h (aarch64_frame): Protect with
24598         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
24599         hard_fp_offset, frame_size, initial_adjust, callee_offset and
24600         final_offset from HOST_WIDE_INT to poly_int64.
24601         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
24602         to_constant when getting the number of units in an Advanced SIMD
24603         mode.
24604         (aarch64_builtin_vectorized_function): Check for a constant number
24605         of units.
24606         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
24607         GET_MODE_SIZE.
24608         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
24609         attribute instead of GET_MODE_NUNITS.
24610         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
24611         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
24612         GET_MODE_SIZE for fixed-size registers.
24613         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
24614         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
24615         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
24616         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
24617         (aarch64_print_operand, aarch64_print_address_internal)
24618         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
24619         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
24620         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
24621         Handle polynomial GET_MODE_SIZE.
24622         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
24623         wider than SImode without modification.
24624         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
24625         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
24626         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
24627         passing and returning SVE modes.
24628         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
24629         rather than GEN_INT.
24630         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
24631         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
24632         (aarch64_allocate_and_probe_stack_space): Likewise.
24633         (aarch64_layout_frame): Cope with polynomial offsets.
24634         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
24635         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
24636         polynomial offsets.
24637         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
24638         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
24639         poly_int64 rather than a HOST_WIDE_INT.
24640         (aarch64_get_separate_components, aarch64_process_components)
24641         (aarch64_expand_prologue, aarch64_expand_epilogue)
24642         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
24643         (aarch64_anchor_offset): New function, split out from...
24644         (aarch64_legitimize_address): ...here.
24645         (aarch64_builtin_vectorization_cost): Handle polynomial
24646         TYPE_VECTOR_SUBPARTS.
24647         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
24648         GET_MODE_NUNITS.
24649         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
24650         number of elements from the PARALLEL rather than the mode.
24651         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
24652         rather than GET_MODE_BITSIZE.
24653         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
24654         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
24655         (aarch64_expand_vec_perm_const_1): Handle polynomial
24656         d->perm.length () and d->perm elements.
24657         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
24658         Apply to_constant to d->perm elements.
24659         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
24660         polynomial CONST_VECTOR_NUNITS.
24661         (aarch64_move_pointer): Take amount as a poly_int64 rather
24662         than an int.
24663         (aarch64_progress_pointer): Avoid temporary variable.
24664         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
24665         the mode attribute instead of GET_MODE.
24667 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24668             Alan Hayward  <alan.hayward@arm.com>
24669             David Sherwood  <david.sherwood@arm.com>
24671         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
24672         x exists before using it.
24673         (aarch64_add_constant_internal): Rename to...
24674         (aarch64_add_offset_1): ...this.  Replace regnum with separate
24675         src and dest rtxes.  Handle the case in which they're different,
24676         including when the offset is zero.  Replace scratchreg with an rtx.
24677         Use 2 additions if there is no spare register into which we can
24678         move a 16-bit constant.
24679         (aarch64_add_constant): Delete.
24680         (aarch64_add_offset): Replace reg with separate src and dest
24681         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
24682         Use aarch64_add_offset_1.
24683         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
24684         an rtx rather than an int.  Take the delta as a poly_int64
24685         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
24686         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
24687         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
24688         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
24689         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
24690         and aarch64_add_sp.
24691         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
24692         aarch64_add_constant.
24694 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24696         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
24697         Use scalar_float_mode.
24699 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24701         * config/aarch64/aarch64-simd.md
24702         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
24703         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
24704         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
24705         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
24706         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
24707         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
24708         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
24709         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
24710         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
24711         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
24713 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24715         PR target/83514
24716         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
24717         targ_options->x_arm_arch_string is non NULL.
24719 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
24721         * config/aarch64/aarch64.h
24722         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
24724 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
24726         PR target/82096
24727         * expmed.c (emit_store_flag_force): Swap if const op0
24728         and change VOIDmode to mode of op0.
24730 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24732         PR rtl-optimization/83761
24733         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
24734         than bytes to mode_for_size.
24736 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
24738         PR middle-end/83189
24739         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
24740         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
24741         profile.
24743 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
24745         PR middle-end/83575
24746         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
24747         when in layout mode.
24748         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
24749         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
24750         partition fixup.
24752 2018-01-10  Michael Collison  <michael.collison@arm.com>
24754         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
24755         * config/aarch64/aarch64-option-extension.def: Add
24756         AARCH64_OPT_EXTENSION of 'fp16fml'.
24757         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24758         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
24759         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
24760         * config/aarch64/constraints.md (Ui7): New constraint.
24761         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
24762         (VFMLA_SEL_W): Ditto.
24763         (f16quad): Ditto.
24764         (f16mac1): Ditto.
24765         (VFMLA16_LOW): New int iterator.
24766         (VFMLA16_HIGH): Ditto.
24767         (UNSPEC_FMLAL): New unspec.
24768         (UNSPEC_FMLSL): Ditto.
24769         (UNSPEC_FMLAL2): Ditto.
24770         (UNSPEC_FMLSL2): Ditto.
24771         (f16mac): New code attribute.
24772         * config/aarch64/aarch64-simd-builtins.def
24773         (aarch64_fmlal_lowv2sf): Ditto.
24774         (aarch64_fmlsl_lowv2sf): Ditto.
24775         (aarch64_fmlalq_lowv4sf): Ditto.
24776         (aarch64_fmlslq_lowv4sf): Ditto.
24777         (aarch64_fmlal_highv2sf): Ditto.
24778         (aarch64_fmlsl_highv2sf): Ditto.
24779         (aarch64_fmlalq_highv4sf): Ditto.
24780         (aarch64_fmlslq_highv4sf): Ditto.
24781         (aarch64_fmlal_lane_lowv2sf): Ditto.
24782         (aarch64_fmlsl_lane_lowv2sf): Ditto.
24783         (aarch64_fmlal_laneq_lowv2sf): Ditto.
24784         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
24785         (aarch64_fmlalq_lane_lowv4sf): Ditto.
24786         (aarch64_fmlsl_lane_lowv4sf): Ditto.
24787         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
24788         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
24789         (aarch64_fmlal_lane_highv2sf): Ditto.
24790         (aarch64_fmlsl_lane_highv2sf): Ditto.
24791         (aarch64_fmlal_laneq_highv2sf): Ditto.
24792         (aarch64_fmlsl_laneq_highv2sf): Ditto.
24793         (aarch64_fmlalq_lane_highv4sf): Ditto.
24794         (aarch64_fmlsl_lane_highv4sf): Ditto.
24795         (aarch64_fmlalq_laneq_highv4sf): Ditto.
24796         (aarch64_fmlsl_laneq_highv4sf): Ditto.
24797         * config/aarch64/aarch64-simd.md:
24798         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
24799         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24800         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
24801         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24802         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
24803         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
24804         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
24805         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
24806         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
24807         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
24808         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
24809         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
24810         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
24811         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
24812         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
24813         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
24814         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
24815         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
24816         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
24817         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
24818         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
24819         (vfmlsl_low_u32): Ditto.
24820         (vfmlalq_low_u32): Ditto.
24821         (vfmlslq_low_u32): Ditto.
24822         (vfmlal_high_u32): Ditto.
24823         (vfmlsl_high_u32): Ditto.
24824         (vfmlalq_high_u32): Ditto.
24825         (vfmlslq_high_u32): Ditto.
24826         (vfmlal_lane_low_u32): Ditto.
24827         (vfmlsl_lane_low_u32): Ditto.
24828         (vfmlal_laneq_low_u32): Ditto.
24829         (vfmlsl_laneq_low_u32): Ditto.
24830         (vfmlalq_lane_low_u32): Ditto.
24831         (vfmlslq_lane_low_u32): Ditto.
24832         (vfmlalq_laneq_low_u32): Ditto.
24833         (vfmlslq_laneq_low_u32): Ditto.
24834         (vfmlal_lane_high_u32): Ditto.
24835         (vfmlsl_lane_high_u32): Ditto.
24836         (vfmlal_laneq_high_u32): Ditto.
24837         (vfmlsl_laneq_high_u32): Ditto.
24838         (vfmlalq_lane_high_u32): Ditto.
24839         (vfmlslq_lane_high_u32): Ditto.
24840         (vfmlalq_laneq_high_u32): Ditto.
24841         (vfmlslq_laneq_high_u32): Ditto.
24842         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
24843         (AARCH64_FL_FOR_ARCH8_4): New.
24844         (AARCH64_ISA_F16FML): New ISA flag.
24845         (TARGET_F16FML): New feature flag for fp16fml.
24846         (doc/invoke.texi): Document new fp16fml option.
24848 2018-01-10  Michael Collison  <michael.collison@arm.com>
24850         * config/aarch64/aarch64-builtins.c:
24851         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
24852         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24853         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
24854         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
24855         (AARCH64_ISA_SHA3): New ISA flag.
24856         (TARGET_SHA3): New feature flag for sha3.
24857         * config/aarch64/iterators.md (sha512_op): New int attribute.
24858         (CRYPTO_SHA512): New int iterator.
24859         (UNSPEC_SHA512H): New unspec.
24860         (UNSPEC_SHA512H2): Ditto.
24861         (UNSPEC_SHA512SU0): Ditto.
24862         (UNSPEC_SHA512SU1): Ditto.
24863         * config/aarch64/aarch64-simd-builtins.def
24864         (aarch64_crypto_sha512hqv2di): New builtin.
24865         (aarch64_crypto_sha512h2qv2di): Ditto.
24866         (aarch64_crypto_sha512su0qv2di): Ditto.
24867         (aarch64_crypto_sha512su1qv2di): Ditto.
24868         (aarch64_eor3qv8hi): Ditto.
24869         (aarch64_rax1qv2di): Ditto.
24870         (aarch64_xarqv2di): Ditto.
24871         (aarch64_bcaxqv8hi): Ditto.
24872         * config/aarch64/aarch64-simd.md:
24873         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
24874         (aarch64_crypto_sha512su0qv2di): Ditto.
24875         (aarch64_crypto_sha512su1qv2di): Ditto.
24876         (aarch64_eor3qv8hi): Ditto.
24877         (aarch64_rax1qv2di): Ditto.
24878         (aarch64_xarqv2di): Ditto.
24879         (aarch64_bcaxqv8hi): Ditto.
24880         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
24881         (vsha512h2q_u64): Ditto.
24882         (vsha512su0q_u64): Ditto.
24883         (vsha512su1q_u64): Ditto.
24884         (veor3q_u16): Ditto.
24885         (vrax1q_u64): Ditto.
24886         (vxarq_u64): Ditto.
24887         (vbcaxq_u16): Ditto.
24888         * config/arm/types.md (crypto_sha512): New type attribute.
24889         (crypto_sha3): Ditto.
24890         (doc/invoke.texi): Document new sha3 option.
24892 2018-01-10  Michael Collison  <michael.collison@arm.com>
24894         * config/aarch64/aarch64-builtins.c:
24895         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
24896         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24897         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
24898         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
24899         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
24900         (AARCH64_ISA_SM4): New ISA flag.
24901         (TARGET_SM4): New feature flag for sm4.
24902         * config/aarch64/aarch64-simd-builtins.def
24903         (aarch64_sm3ss1qv4si): Ditto.
24904         (aarch64_sm3tt1aq4si): Ditto.
24905         (aarch64_sm3tt1bq4si): Ditto.
24906         (aarch64_sm3tt2aq4si): Ditto.
24907         (aarch64_sm3tt2bq4si): Ditto.
24908         (aarch64_sm3partw1qv4si): Ditto.
24909         (aarch64_sm3partw2qv4si): Ditto.
24910         (aarch64_sm4eqv4si): Ditto.
24911         (aarch64_sm4ekeyqv4si): Ditto.
24912         * config/aarch64/aarch64-simd.md:
24913         (aarch64_sm3ss1qv4si): Ditto.
24914         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
24915         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
24916         (aarch64_sm4eqv4si): Ditto.
24917         (aarch64_sm4ekeyqv4si): Ditto.
24918         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
24919         (sm3part_op): Ditto.
24920         (CRYPTO_SM3TT): Ditto.
24921         (CRYPTO_SM3PART): Ditto.
24922         (UNSPEC_SM3SS1): New unspec.
24923         (UNSPEC_SM3TT1A): Ditto.
24924         (UNSPEC_SM3TT1B): Ditto.
24925         (UNSPEC_SM3TT2A): Ditto.
24926         (UNSPEC_SM3TT2B): Ditto.
24927         (UNSPEC_SM3PARTW1): Ditto.
24928         (UNSPEC_SM3PARTW2): Ditto.
24929         (UNSPEC_SM4E): Ditto.
24930         (UNSPEC_SM4EKEY): Ditto.
24931         * config/aarch64/constraints.md (Ui2): New constraint.
24932         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
24933         * config/arm/types.md (crypto_sm3): New type attribute.
24934         (crypto_sm4): Ditto.
24935         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
24936         (vsm3tt1aq_u32): Ditto.
24937         (vsm3tt1bq_u32): Ditto.
24938         (vsm3tt2aq_u32): Ditto.
24939         (vsm3tt2bq_u32): Ditto.
24940         (vsm3partw1q_u32): Ditto.
24941         (vsm3partw2q_u32): Ditto.
24942         (vsm4eq_u32): Ditto.
24943         (vsm4ekeyq_u32): Ditto.
24944         (doc/invoke.texi): Document new sm4 option.
24946 2018-01-10  Michael Collison  <michael.collison@arm.com>
24948         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
24949         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
24950         (AARCH64_FL_FOR_ARCH8_4): New.
24951         (AARCH64_FL_V8_4): New flag.
24952         (doc/invoke.texi): Document new armv8.4-a option.
24954 2018-01-10  Michael Collison  <michael.collison@arm.com>
24956         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24957         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
24958         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
24959         * config/aarch64/aarch64-option-extension.def: Add
24960         AARCH64_OPT_EXTENSION of 'sha2'.
24961         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
24962         (crypto): Disable sha2 and aes if crypto disabled.
24963         (crypto): Enable aes and sha2 if enabled.
24964         (simd): Disable sha2 and aes if simd disabled.
24965         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
24966         New flags.
24967         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
24968         (TARGET_SHA2): New feature flag for sha2.
24969         (TARGET_AES): New feature flag for aes.
24970         * config/aarch64/aarch64-simd.md:
24971         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
24972         conditional on TARGET_AES.
24973         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
24974         (aarch64_crypto_sha1hsi): Make pattern conditional
24975         on TARGET_SHA2.
24976         (aarch64_crypto_sha1hv4si): Ditto.
24977         (aarch64_be_crypto_sha1hv4si): Ditto.
24978         (aarch64_crypto_sha1su1v4si): Ditto.
24979         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
24980         (aarch64_crypto_sha1su0v4si): Ditto.
24981         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
24982         (aarch64_crypto_sha256su0v4si): Ditto.
24983         (aarch64_crypto_sha256su1v4si): Ditto.
24984         (doc/invoke.texi): Document new aes and sha2 options.
24986 2018-01-10  Martin Sebor  <msebor@redhat.com>
24988         PR tree-optimization/83781
24989         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
24990         as string arrays.
24992 2018-01-11  Martin Sebor  <msebor@gmail.com>
24993             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24995         PR tree-optimization/83501
24996         PR tree-optimization/81703
24998         * tree-ssa-strlen.c (get_string_cst): Rename...
24999         (get_string_len): ...to this.  Handle global constants.
25000         (handle_char_store): Adjust.
25002 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
25003             Jim Wilson  <jimw@sifive.com>
25005         * config/riscv/riscv-protos.h (riscv_output_return): New.
25006         * config/riscv/riscv.c (struct machine_function): New naked_p field.
25007         (riscv_attribute_table, riscv_output_return),
25008         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25009         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25010         (riscv_compute_frame_info): Only compute frame->mask if not a naked
25011         function.
25012         (riscv_expand_prologue): Add early return for naked function.
25013         (riscv_expand_epilogue): Likewise.
25014         (riscv_function_ok_for_sibcall): Return false for naked function.
25015         (riscv_set_current_function): New.
25016         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25017         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25018         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25019         * doc/extend.texi (RISC-V Function Attributes): New.
25021 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
25023         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25024         check for 128-bit long double before checking TCmode.
25025         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25026         128-bit long doubles before checking TFmode or TCmode.
25027         (FLOAT128_IBM_P): Likewise.
25029 2018-01-10  Martin Sebor  <msebor@redhat.com>
25031         PR tree-optimization/83671
25032         * builtins.c (c_strlen): Unconditionally return zero for the empty
25033         string.
25034         Use -Warray-bounds for warnings.
25035         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25036         for non-constant array indices with COMPONENT_REF, arrays of
25037         arrays, and pointers to arrays.
25038         (gimple_fold_builtin_strlen): Determine and set length range for
25039         non-constant character arrays.
25041 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
25043         PR middle-end/81897
25044         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25045         empty blocks.
25047 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
25049         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25051 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25053         PR target/83399
25054         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25055         VECTOR_MEM_ALTIVEC_OR_VSX_P.
25056         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25057         indexed_or_indirect_operand predicate.
25058         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25059         (*vsx_le_perm_load_v8hi): Likewise.
25060         (*vsx_le_perm_load_v16qi): Likewise.
25061         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25062         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25063         (*vsx_le_perm_store_v8hi): Likewise.
25064         (*vsx_le_perm_store_v16qi): Likewise.
25065         (eight unnamed splitters): Likewise.
25067 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
25069         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25070         * config/rs6000/emmintrin.h: Likewise.
25071         * config/rs6000/mmintrin.h: Likewise.
25072         * config/rs6000/xmmintrin.h: Likewise.
25074 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
25076         PR c++/43486
25077         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25078         "public_flag".
25079         * tree.c (tree_nop_conversion): Return true for location wrapper
25080         nodes.
25081         (maybe_wrap_with_location): New function.
25082         (selftest::check_strip_nops): New function.
25083         (selftest::test_location_wrappers): New function.
25084         (selftest::tree_c_tests): Call it.
25085         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25086         (maybe_wrap_with_location): New decl.
25087         (EXPR_LOCATION_WRAPPER_P): New macro.
25088         (location_wrapper_p): New inline function.
25089         (tree_strip_any_location_wrapper): New inline function.
25091 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
25093         PR target/83735
25094         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25095         stack_realign_offset for the largest alignment of stack slot
25096         actually used.
25097         (ix86_find_max_used_stack_alignment): New function.
25098         (ix86_finalize_stack_frame_flags): Use it.  Set
25099         max_used_stack_alignment if we don't realign stack.
25100         * config/i386/i386.h (machine_function): Add
25101         max_used_stack_alignment.
25103 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25105         * config/arm/arm.opt (-mbranch-cost): New option.
25106         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25107         account.
25109 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25111         PR target/83629
25112         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25113         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25115 2018-01-10  Richard Biener  <rguenther@suse.de>
25117         PR debug/83765
25118         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25119         early out so it also covers the case where we have a non-NULL
25120         origin.
25122 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25124         PR tree-optimization/83753
25125         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25126         for non-strided grouped accesses if the number of elements is 1.
25128 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25130         PR target/81616
25131         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25132         * i386.h (TARGET_USE_GATHER): Define.
25133         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25135 2018-01-10  Martin Liska  <mliska@suse.cz>
25137         PR bootstrap/82831
25138         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25139         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25140         partitioning.
25141         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25142         CLEANUP_NO_PARTITIONING is not set.
25144 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25146         * doc/rtl.texi: Remove documentation of (const ...) wrappers
25147         for vectors, as a partial revert of r254296.
25148         * rtl.h (const_vec_p): Delete.
25149         (const_vec_duplicate_p): Don't test for vector CONSTs.
25150         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25151         * expmed.c (make_tree): Likewise.
25153         Revert:
25154         * common.md (E, F): Use CONSTANT_P instead of checking for
25155         CONST_VECTOR.
25156         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25157         checking for CONST_VECTOR.
25159 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25161         PR middle-end/83575
25162         * predict.c (force_edge_cold): Handle in more sane way edges
25163         with no prediction.
25165 2018-01-09  Carl Love  <cel@us.ibm.com>
25167         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25168         V4SI, V4SF types.
25169         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25170         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25171         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25172         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
25173         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25174         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
25175         * config/rs6000/rs6000-protos.h: Add extern defition for
25176         rs6000_generate_float2_double_code.
25177         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25178         function.
25179         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25180         (float2_v2df): Add define_expand.
25182 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
25184         PR target/83628
25185         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25186         op_mode in the force_to_mode call.
25188 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25190         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25191         instead of checking each element individually.
25192         (aarch64_evpc_uzp): Likewise.
25193         (aarch64_evpc_zip): Likewise.
25194         (aarch64_evpc_ext): Likewise.
25195         (aarch64_evpc_rev): Likewise.
25196         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25197         instead of checking each element individually.  Return true without
25198         generating rtl if
25199         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25200         whether all selected elements come from the same input, instead of
25201         checking each element individually.  Remove calls to gen_rtx_REG,
25202         start_sequence and end_sequence and instead assert that no rtl is
25203         generated.
25205 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25207         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25208         order of HIGH and CONST checks.
25210 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25212         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25213         if the destination isn't an SSA_NAME.
25215 2018-01-09  Richard Biener  <rguenther@suse.de>
25217         PR tree-optimization/83668
25218         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25219         move prologue...
25220         (canonicalize_loop_form): ... here, renamed from ...
25221         (canonicalize_loop_closed_ssa_form): ... this and amended to
25222         swap successor edges for loop exit blocks to make us use
25223         the RPO order we need for initial schedule generation.
25225 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
25227         PR tree-optimization/64811
25228         * match.pd: When optimizing comparisons with Inf, avoid
25229         introducing or losing exceptions from comparisons with NaN.
25231 2018-01-09  Martin Liska  <mliska@suse.cz>
25233         PR sanitizer/82517
25234         * asan.c (shadow_mem_size): Add gcc_assert.
25236 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
25238         Don't save registers in main().
25240         PR target/83738
25241         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25242         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25243         * config/avr/avr.c (avr_set_current_function): Don't error if
25244         naked, OS_task or OS_main are specified at the same time.
25245         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25246         OS_main.
25247         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25248         attribute.
25249         * common/config/avr/avr-common.c (avr_option_optimization_table):
25250         Switch on -mmain-is-OS_task for optimizing compilations.
25252 2018-01-09  Richard Biener  <rguenther@suse.de>
25254         PR tree-optimization/83572
25255         * graphite.c: Include cfganal.h.
25256         (graphite_transform_loops): Connect infinite loops to exit
25257         and remove fake edges at the end.
25259 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25261         * ipa-inline.c (edge_badness): Revert accidental checkin.
25263 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25265         PR ipa/80763
25266         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25267         symbols; not inline clones.
25269 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
25271         PR target/83507
25272         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25273         hard registers.  Formatting fixes.
25275         PR preprocessor/83722
25276         * gcc.c (try_generate_repro): Pass
25277         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25278         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25279         do_report_bug.
25281 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
25282             Kito Cheng  <kito.cheng@gmail.com>
25284         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25285         (riscv_leaf_function_p): Delete.
25286         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25288 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25290         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25291         function.
25292         (do_ifelse): New function.
25293         (do_isel): New function.
25294         (do_sub3): New function.
25295         (do_add3): New function.
25296         (do_load_mask_compare): New function.
25297         (do_overlap_load_compare): New function.
25298         (expand_compare_loop): New function.
25299         (expand_block_compare): Call expand_compare_loop() when appropriate.
25300         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25301         option description.
25302         (-mblock-compare-inline-loop-limit): New option.
25304 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25306         PR target/83677
25307         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25308         Reverse order of second and third operands in first alternative.
25309         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25310         of first and second elements in UNSPEC_VPERMR vector.
25311         (altivec_expand_vec_perm_le): Likewise.
25313 2018-01-08  Jeff Law  <law@redhat.com>
25315         PR rtl-optimizatin/81308
25316         * tree-switch-conversion.c (cfg_altered): New file scoped static.
25317         (process_switch): If group_case_labels makes a change, then set
25318         cfg_altered.
25319         (pass_convert_switch::execute): If a switch is converted, then
25320         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
25322         PR rtl-optimization/81308
25323         * recog.c (split_all_insns): Conditionally cleanup the CFG after
25324         splitting insns.
25326 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
25328         PR target/83663 - Revert r255946
25329         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25330         generation for cases where splatting a value is not useful.
25331         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25332         across a vec_duplicate and a paradoxical subreg forming a vector
25333         mode to a vec_concat.
25335 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25337         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25338         -march=armv8.3-a variants.
25339         * config/arm/t-multilib: Likewise.
25340         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
25342 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25344         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
25345         to generate rtl.
25346         (cceq_ior_compare_complement): Give it a name so I can use it, and
25347         change boolean_or_operator predicate to boolean_operator so it can
25348         be used to generate a crand.
25349         (eqne): New code iterator.
25350         (bd/bd_neg): New code_attrs.
25351         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
25352         a single define_insn.
25353         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
25354         decrement (bdnzt/bdnzf/bdzt/bdzf).
25355         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
25356         with the new names of the branch decrement patterns, and added the
25357         names of the branch decrement conditional patterns.
25359 2018-01-08  Richard Biener  <rguenther@suse.de>
25361         PR tree-optimization/83563
25362         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
25363         cache.
25365 2018-01-08  Richard Biener  <rguenther@suse.de>
25367         PR middle-end/83713
25368         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
25370 2018-01-08  Richard Biener  <rguenther@suse.de>
25372         PR tree-optimization/83685
25373         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
25374         references to abnormals.
25376 2018-01-08  Richard Biener  <rguenther@suse.de>
25378         PR lto/83719
25379         * dwarf2out.c (output_indirect_strings): Handle empty
25380         skeleton_debug_str_hash.
25381         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
25383 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
25385         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
25386         (emit_store_direct): Likewise.
25387         (arc_trampoline_adjust_address): Likewise.
25388         (arc_asm_trampoline_template): New function.
25389         (arc_initialize_trampoline): Use asm_trampoline_template.
25390         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
25391         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
25392         * config/arc/arc.md (flush_icache): Delete pattern.
25394 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
25396         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
25397         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
25398         munaligned-access.
25400 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25402         PR target/83681
25403         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
25404         by not USED_FOR_TARGET.
25405         (make_pass_resolve_sw_modes): Likewise.
25407 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25409         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
25410         USED_FOR_TARGET.
25412 2018-01-08  Richard Biener  <rguenther@suse.de>
25414         PR middle-end/83580
25415         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
25417 2018-01-08  Richard Biener  <rguenther@suse.de>
25419         PR middle-end/83517
25420         * match.pd ((t * 2) / 2) -> t): Add missing :c.
25422 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
25424         PR middle-end/81897
25425         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
25426         basic blocks with a small number of successors.
25427         (convert_control_dep_chain_into_preds): Improve handling of
25428         forwarder blocks.
25429         (dump_predicates): Split apart into...
25430         (dump_pred_chain): ...here...
25431         (dump_pred_info): ...and here.
25432         (can_one_predicate_be_invalidated_p): Add debugging printfs.
25433         (can_chain_union_be_invalidated_p): Improve check for invalidation
25434         of paths.
25435         (uninit_uses_cannot_happen): Avoid unnecessary if
25436         convert_control_dep_chain_into_preds yielded nothing.
25438 2018-01-06  Martin Sebor  <msebor@redhat.com>
25440         PR tree-optimization/83640
25441         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
25442         subtracting negative offset from size.
25443         (builtin_access::overlap): Adjust offset bounds of the access to fall
25444         within the size of the object if possible.
25446 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
25448         PR rtl-optimization/83699
25449         * expmed.c (extract_bit_field_1): Restrict the vector usage of
25450         extract_bit_field_as_subreg to cases in which the extracted
25451         value is also a vector.
25453         * lra-constraints.c (process_alt_operands): Test for the equivalence
25454         substitutions when detecting a possible reload cycle.
25456 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
25458         PR debug/83480
25459         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
25460         by default if flag_selective_schedling{,2}.  Formatting fixes.
25462         PR rtl-optimization/83682
25463         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
25464         if it has non-VECTOR_MODE element mode.
25465         (vec_duplicate_p): Likewise.
25467         PR middle-end/83694
25468         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
25469         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
25471 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
25473         PR target/83604
25474         * config/i386/i386-builtin.def
25475         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
25476         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
25477         Require also OPTION_MASK_ISA_AVX512F in addition to
25478         OPTION_MASK_ISA_GFNI.
25479         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
25480         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
25481         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
25482         to OPTION_MASK_ISA_GFNI.
25483         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
25484         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
25485         OPTION_MASK_ISA_AVX512BW.
25486         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
25487         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
25488         addition to OPTION_MASK_ISA_GFNI.
25489         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
25490         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
25491         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
25492         to OPTION_MASK_ISA_GFNI.
25493         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
25494         a requirement for all ISAs rather than any of them with a few
25495         exceptions.
25496         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
25497         processing.
25498         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
25499         bitmasks to be enabled with 3 exceptions, instead of requiring any
25500         enabled ISA with lots of exceptions.
25501         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
25502         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
25503         Change avx512bw in isa attribute to avx512f.
25504         * config/i386/sgxintrin.h: Add license boilerplate.
25505         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
25506         to __AVX512F__ and __AVX512VL to __AVX512VL__.
25507         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
25508         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
25509         defined.
25510         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
25511         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
25512         temporarily sse2 rather than sse if not enabled already.
25514         PR target/83604
25515         * config/i386/sse.md (VI248_VLBW): Rename to ...
25516         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
25517         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
25518         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
25519         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
25520         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
25521         mode iterator instead of VI248_VLBW.
25523 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
25525         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
25526         (record_modified): Skip clobbers; add debug output.
25527         (param_change_prob): Use sreal frequencies.
25529 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
25531         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
25532         punt for user-aligned variables.
25534 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
25536         * tree-chrec.c (chrec_contains_symbols): Return true for
25537         POLY_INT_CST.
25539 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
25541         PR target/82439
25542         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
25543         of (x|y) == x for BICS pattern.
25545 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
25547         PR tree-optimization/83605
25548         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
25549         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
25550         can throw.
25552 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25554         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
25555         * config/epiphany/rtems.h: New file.
25557 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25558             Uros Bizjak  <ubizjak@gmail.com>
25560         PR target/83554
25561         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
25562         QIreg_operand instead of register_operand predicate.
25563         * config/i386/i386.c (ix86_rop_should_change_byte_p,
25564         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
25565         comments instead of -fmitigate[-_]rop.
25567 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25569         PR bootstrap/81926
25570         * cgraphunit.c (symbol_table::compile): Switch to text_section
25571         before calling assembly_start debug hook.
25572         * run-rtl-passes.c (run_rtl_passes): Likewise.
25573         Include output.h.
25575 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25577         * tree-vrp.c (extract_range_from_binary_expr_1): Check
25578         range_int_cst_p rather than !symbolic_range_p before calling
25579         extract_range_from_multiplicative_op_1.
25581 2018-01-04  Jeff Law  <law@redhat.com>
25583         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
25584         redundant test in assertion.
25586 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25588         * doc/rtl.texi: Document machine_mode wrapper classes.
25590 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25592         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
25593         using tree_to_uhwi.
25595 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25597         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
25598         the VEC_PERM_EXPR fold to fail.
25600 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25602         PR debug/83585
25603         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
25604         to switched_sections.
25606 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25608         PR target/83680
25609         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
25610         test for d.testing.
25612 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
25614         PR target/83387
25615         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
25616         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
25618 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25620         PR debug/83666
25621         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
25622         is BLKmode and bitpos not zero or mode change is needed.
25624 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25626         PR target/83675
25627         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
25628         TARGET_VIS2.
25630 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
25632         PR target/83628
25633         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
25634         instead of MULT rtx.  Update all corresponding splitters.
25635         (*saddl_se): Ditto.
25636         (*ssub<modesuffix>): Ditto.
25637         (*ssubl_se): Ditto.
25638         (*cmp_sadd_di): Update split patterns.
25639         (*cmp_sadd_si): Ditto.
25640         (*cmp_sadd_sidi): Ditto.
25641         (*cmp_ssub_di): Ditto.
25642         (*cmp_ssub_si): Ditto.
25643         (*cmp_ssub_sidi): Ditto.
25644         * config/alpha/predicates.md (const23_operand): New predicate.
25645         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
25646         Look for ASHIFT, not MULT inner operand.
25647         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
25649 2018-01-04  Martin Liska  <mliska@suse.cz>
25651         PR gcov-profile/83669
25652         * gcov.c (output_intermediate_file): Add version to intermediate
25653         gcov file.
25654         * doc/gcov.texi: Document new field 'version' in intermediate
25655         file format. Fix location of '-k' option of gcov command.
25657 2018-01-04  Martin Liska  <mliska@suse.cz>
25659         PR ipa/82352
25660         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
25662 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25664         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
25666 2018-01-03  Martin Sebor  <msebor@redhat.com>
25668         PR tree-optimization/83655
25669         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
25670         checking calls with invalid arguments.
25672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25674         * tree-vect-stmts.c (vect_get_store_rhs): New function.
25675         (vectorizable_mask_load_store): Delete.
25676         (vectorizable_call): Return false for masked loads and stores.
25677         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
25678         instead of gimple_assign_rhs1.
25679         (vectorizable_load): Handle IFN_MASK_LOAD.
25680         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
25682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25684         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
25685         split out from..,
25686         (vectorizable_mask_load_store): ...here.
25687         (vectorizable_load): ...and here.
25689 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25691         * tree-vect-stmts.c (vect_build_all_ones_mask)
25692         (vect_build_zero_merge_argument): New functions, split out from...
25693         (vectorizable_load): ...here.
25695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25697         * tree-vect-stmts.c (vect_check_store_rhs): New function,
25698         split out from...
25699         (vectorizable_mask_load_store): ...here.
25700         (vectorizable_store): ...and here.
25702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25704         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
25705         split out from...
25706         (vectorizable_mask_load_store): ...here.
25708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25710         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
25711         (vect_model_store_cost): Take a vec_load_store_type instead of a
25712         vect_def_type.
25713         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
25714         (vect_model_store_cost): Take a vec_load_store_type instead of a
25715         vect_def_type.
25716         (vectorizable_mask_load_store): Update accordingly.
25717         (vectorizable_store): Likewise.
25718         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
25720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25722         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
25723         IFN_MASK_LOAD calls here rather than...
25724         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
25726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25727             Alan Hayward  <alan.hayward@arm.com>
25728             David Sherwood  <david.sherwood@arm.com>
25730         * expmed.c (extract_bit_field_1): For vector extracts,
25731         fall back to extract_bit_field_as_subreg if vec_extract
25732         isn't available.
25734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25735             Alan Hayward  <alan.hayward@arm.com>
25736             David Sherwood  <david.sherwood@arm.com>
25738         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
25739         they are variable or constant sized.
25740         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
25741         slots for constant-sized data.
25743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25744             Alan Hayward  <alan.hayward@arm.com>
25745             David Sherwood  <david.sherwood@arm.com>
25747         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
25748         handling COND_EXPRs with boolean comparisons, try to find a better
25749         basis for the mask type than the boolean itself.
25751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25753         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
25754         is calculated and how it can be overridden.
25755         * genmodes.c (max_bitsize_mode_any_mode): New variable.
25756         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
25757         if defined.
25758         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
25759         if nonzero.
25761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25762             Alan Hayward  <alan.hayward@arm.com>
25763             David Sherwood  <david.sherwood@arm.com>
25765         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
25766         Remove the mode argument.
25767         (aarch64_simd_valid_immediate): Remove the mode and inverse
25768         arguments.
25769         * config/aarch64/iterators.md (bitsize): New iterator.
25770         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
25771         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
25772         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
25773         aarch64_simd_valid_immediate.
25774         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
25775         (aarch64_reg_or_bic_imm): Likewise.
25776         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
25777         with an insn_type enum and msl with a modifier_type enum.
25778         Replace element_width with a scalar_mode.  Change the shift
25779         to unsigned int.  Add constructors for scalar_float_mode and
25780         scalar_int_mode elements.
25781         (aarch64_vect_float_const_representable_p): Delete.
25782         (aarch64_can_const_movi_rtx_p)
25783         (aarch64_simd_scalar_immediate_valid_for_move)
25784         (aarch64_simd_make_constant): Update call to
25785         aarch64_simd_valid_immediate.
25786         (aarch64_advsimd_valid_immediate_hs): New function.
25787         (aarch64_advsimd_valid_immediate): Likewise.
25788         (aarch64_simd_valid_immediate): Remove mode and inverse
25789         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
25790         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
25791         and aarch64_float_const_representable_p on the result.
25792         (aarch64_output_simd_mov_immediate): Remove mode argument.
25793         Update call to aarch64_simd_valid_immediate and use of
25794         simd_immediate_info.
25795         (aarch64_output_scalar_simd_mov_immediate): Update call
25796         accordingly.
25798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25799             Alan Hayward  <alan.hayward@arm.com>
25800             David Sherwood  <david.sherwood@arm.com>
25802         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
25803         (mode_nunits): Likewise CONST_MODE_NUNITS.
25804         * machmode.def (ADJUST_NUNITS): Document.
25805         * genmodes.c (mode_data::need_nunits_adj): New field.
25806         (blank_mode): Update accordingly.
25807         (adj_nunits): New variable.
25808         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
25809         parameter.
25810         (emit_mode_size_inline): Set need_bytesize_adj for all modes
25811         listed in adj_nunits.
25812         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
25813         listed in adj_nunits.  Don't emit case statements for such modes.
25814         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
25815         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
25816         nothing if adj_nunits is nonnull.
25817         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
25818         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
25819         (emit_mode_fbit): Update use of print_maybe_const_decl.
25820         (emit_move_size): Likewise.  Treat the array as non-const
25821         if adj_nunits.
25822         (emit_mode_adjustments): Handle adj_nunits.
25824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25826         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
25827         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
25828         (VECTOR_MODES): Use it.
25829         (make_vector_modes): Take the prefix as an argument.
25831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25832             Alan Hayward  <alan.hayward@arm.com>
25833             David Sherwood  <david.sherwood@arm.com>
25835         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
25836         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
25837         for MODE_VECTOR_BOOL.
25838         * machmode.def (VECTOR_BOOL_MODE): Document.
25839         * genmodes.c (VECTOR_BOOL_MODE): New macro.
25840         (make_vector_bool_mode): New function.
25841         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
25842         MODE_VECTOR_BOOL.
25843         * lto-streamer-in.c (lto_input_mode_table): Likewise.
25844         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
25845         Likewise.
25846         * stor-layout.c (int_mode_for_mode): Likewise.
25847         * tree.c (build_vector_type_for_mode): Likewise.
25848         * varasm.c (output_constant_pool_2): Likewise.
25849         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
25850         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
25851         for MODE_VECTOR_BOOL.
25852         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
25853         of mode class checks.
25854         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
25855         instead of a list of mode class checks.
25856         (expand_vector_scalar_condition): Likewise.
25857         (type_for_widest_vector_mode): Handle BImode as an inner mode.
25859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25860             Alan Hayward  <alan.hayward@arm.com>
25861             David Sherwood  <david.sherwood@arm.com>
25863         * machmode.h (mode_size): Change from unsigned short to
25864         poly_uint16_pod.
25865         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
25866         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25867         or if measurement_type is not polynomial.
25868         (fixed_size_mode::includes_p): Check for constant-sized modes.
25869         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
25870         return a poly_uint16 rather than an unsigned short.
25871         (emit_mode_size): Change the type of mode_size from unsigned short
25872         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
25873         (emit_mode_adjustments): Cope with polynomial vector sizes.
25874         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25875         for GET_MODE_SIZE.
25876         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25877         for GET_MODE_SIZE.
25878         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
25879         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
25880         * caller-save.c (setup_save_areas): Likewise.
25881         (replace_reg_with_saved_mem): Likewise.
25882         * calls.c (emit_library_call_value_1): Likewise.
25883         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
25884         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
25885         (gen_lowpart_for_combine): Likewise.
25886         * convert.c (convert_to_integer_1): Likewise.
25887         * cse.c (equiv_constant, cse_insn): Likewise.
25888         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
25889         (cselib_subst_to_values): Likewise.
25890         * dce.c (word_dce_process_block): Likewise.
25891         * df-problems.c (df_word_lr_mark_ref): Likewise.
25892         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
25893         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
25894         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
25895         (rtl_for_decl_location): Likewise.
25896         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
25897         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
25898         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
25899         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
25900         (expand_expr_real_1): Likewise.
25901         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
25902         (pad_below): Likewise.
25903         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25904         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
25905         * ira.c (get_subreg_tracking_sizes): Likewise.
25906         * ira-build.c (ira_create_allocno_objects): Likewise.
25907         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
25908         (ira_sort_regnos_for_alter_reg): Likewise.
25909         * ira-costs.c (record_operand_costs): Likewise.
25910         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
25911         (resolve_simple_move): Likewise.
25912         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
25913         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
25914         (lra_constraints): Likewise.
25915         (CONST_POOL_OK_P): Reject variable-sized modes.
25916         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
25917         (add_pseudo_to_slot, lra_spill): Likewise.
25918         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25919         * optabs-query.c (get_best_extraction_insn): Likewise.
25920         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25921         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
25922         (expand_mult_highpart, valid_multiword_target_p): Likewise.
25923         * recog.c (offsettable_address_addr_space_p): Likewise.
25924         * regcprop.c (maybe_mode_change): Likewise.
25925         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
25926         * regrename.c (build_def_use): Likewise.
25927         * regstat.c (dump_reg_info): Likewise.
25928         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
25929         (find_reloads, find_reloads_subreg_address): Likewise.
25930         * reload1.c (eliminate_regs_1): Likewise.
25931         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
25932         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
25933         (simplify_binary_operation_1, simplify_subreg): Likewise.
25934         * targhooks.c (default_function_arg_padding): Likewise.
25935         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
25936         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
25937         (verify_gimple_assign_ternary): Likewise.
25938         * tree-inline.c (estimate_move_cost): Likewise.
25939         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25940         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
25941         (get_address_cost_ainc): Likewise.
25942         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25943         (vect_supportable_dr_alignment): Likewise.
25944         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25945         (vectorizable_reduction): Likewise.
25946         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
25947         (vectorizable_operation, vectorizable_load): Likewise.
25948         * tree.c (build_same_sized_truth_vector_type): Likewise.
25949         * valtrack.c (cleanup_auto_inc_dec): Likewise.
25950         * var-tracking.c (emit_note_insn_var_location): Likewise.
25951         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
25952         (ADDR_VEC_ALIGN): Likewise.
25954 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25955             Alan Hayward  <alan.hayward@arm.com>
25956             David Sherwood  <david.sherwood@arm.com>
25958         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
25959         unsigned short.
25960         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25961         or if measurement_type is polynomial.
25962         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
25963         * combine.c (make_extraction): Likewise.
25964         * dse.c (find_shift_sequence): Likewise.
25965         * dwarf2out.c (mem_loc_descriptor): Likewise.
25966         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
25967         (extract_bit_field, extract_low_bits): Likewise.
25968         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
25969         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
25970         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
25971         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
25972         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25973         * reload.c (find_reloads): Likewise.
25974         * reload1.c (alter_reg): Likewise.
25975         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
25976         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
25977         * tree-if-conv.c (predicate_mem_writes): Likewise.
25978         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
25979         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
25980         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
25981         * valtrack.c (dead_debug_insert_temp): Likewise.
25982         * varasm.c (mergeable_constant_section): Likewise.
25983         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
25985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25986             Alan Hayward  <alan.hayward@arm.com>
25987             David Sherwood  <david.sherwood@arm.com>
25989         * expr.c (expand_assignment): Cope with polynomial mode sizes
25990         when assigning to a CONCAT.
25992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25993             Alan Hayward  <alan.hayward@arm.com>
25994             David Sherwood  <david.sherwood@arm.com>
25996         * machmode.h (mode_precision): Change from unsigned short to
25997         poly_uint16_pod.
25998         (mode_to_precision): Return a poly_uint16 rather than an unsigned
25999         short.
26000         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26001         or if measurement_type is not polynomial.
26002         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
26003         in which the mode is already known to be a scalar_int_mode.
26004         * genmodes.c (emit_mode_precision): Change the type of mode_precision
26005         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
26006         initializer.
26007         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26008         for GET_MODE_PRECISION.
26009         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26010         for GET_MODE_PRECISION.
26011         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26012         as polynomial.
26013         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26014         (expand_field_assignment, make_extraction): Likewise.
26015         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26016         (get_last_value): Likewise.
26017         * convert.c (convert_to_integer_1): Likewise.
26018         * cse.c (cse_insn): Likewise.
26019         * expr.c (expand_expr_real_1): Likewise.
26020         * lra-constraints.c (simplify_operand_subreg): Likewise.
26021         * optabs-query.c (can_atomic_load_p): Likewise.
26022         * optabs.c (expand_atomic_load): Likewise.
26023         (expand_atomic_store): Likewise.
26024         * ree.c (combine_reaching_defs): Likewise.
26025         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26026         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26027         * tree.h (type_has_mode_precision_p): Likewise.
26028         * ubsan.c (instrument_si_overflow): Likewise.
26030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26031             Alan Hayward  <alan.hayward@arm.com>
26032             David Sherwood  <david.sherwood@arm.com>
26034         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26035         polynomial numbers of units.
26036         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26037         (valid_vector_subparts_p): New function.
26038         (build_vector_type): Remove temporary shim and take the number
26039         of units as a poly_uint64 rather than an int.
26040         (build_opaque_vector_type): Take the number of units as a
26041         poly_uint64 rather than an int.
26042         * tree.c (build_vector_from_ctor): Handle polynomial
26043         TYPE_VECTOR_SUBPARTS.
26044         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26045         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26046         (build_vector_from_val): If the number of units is variable,
26047         use build_vec_duplicate_cst for constant operands and
26048         VEC_DUPLICATE_EXPR otherwise.
26049         (make_vector_type): Remove temporary is_constant ().
26050         (build_vector_type, build_opaque_vector_type): Take the number of
26051         units as a poly_uint64 rather than an int.
26052         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26053         VECTOR_CST_NELTS.
26054         * cfgexpand.c (expand_debug_expr): Likewise.
26055         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26056         (store_constructor, expand_expr_real_1): Likewise.
26057         (const_scalar_mask_from_tree): Likewise.
26058         * fold-const-call.c (fold_const_reduction): Likewise.
26059         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26060         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26061         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26062         (fold_relational_const): Likewise.
26063         (native_interpret_vector): Likewise.  Change the size from an
26064         int to an unsigned int.
26065         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26066         TYPE_VECTOR_SUBPARTS.
26067         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26068         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26069         duplicating a non-constant operand into a variable-length vector.
26070         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26071         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26072         * ipa-icf.c (sem_variable::equals): Likewise.
26073         * match.pd: Likewise.
26074         * omp-simd-clone.c (simd_clone_subparts): Likewise.
26075         * print-tree.c (print_node): Likewise.
26076         * stor-layout.c (layout_type): Likewise.
26077         * targhooks.c (default_builtin_vectorization_cost): Likewise.
26078         * tree-cfg.c (verify_gimple_comparison): Likewise.
26079         (verify_gimple_assign_binary): Likewise.
26080         (verify_gimple_assign_ternary): Likewise.
26081         (verify_gimple_assign_single): Likewise.
26082         * tree-pretty-print.c (dump_generic_node): Likewise.
26083         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26084         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26085         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26086         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26087         (vect_shift_permute_load_chain): Likewise.
26088         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26089         (expand_vector_condition, optimize_vector_constructor): Likewise.
26090         (lower_vec_perm, get_compute_type): Likewise.
26091         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26092         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26093         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26094         (vect_recog_mask_conversion_pattern): Likewise.
26095         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26096         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26097         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26098         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26099         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26100         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26101         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26102         (supportable_widening_operation): Likewise.
26103         (supportable_narrowing_operation): Likewise.
26104         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26105         Likewise.
26106         * varasm.c (output_constant): Likewise.
26108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26109             Alan Hayward  <alan.hayward@arm.com>
26110             David Sherwood  <david.sherwood@arm.com>
26112         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26113         so that both the length == 3 and length != 3 cases set up their
26114         own permute vectors.  Add comments explaining why we know the
26115         number of elements is constant.
26116         (vect_permute_load_chain): Likewise.
26118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26119             Alan Hayward  <alan.hayward@arm.com>
26120             David Sherwood  <david.sherwood@arm.com>
26122         * machmode.h (mode_nunits): Change from unsigned char to
26123         poly_uint16_pod.
26124         (ONLY_FIXED_SIZE_MODES): New macro.
26125         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26126         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26127         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26128         New typedefs.
26129         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26130         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26131         or if measurement_type is not polynomial.
26132         * genmodes.c (ZERO_COEFFS): New macro.
26133         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26134         poly_uint16.
26135         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26136         Use ZERO_COEFFS when emitting initializers.
26137         * data-streamer.h (bp_pack_poly_value): New function.
26138         (bp_unpack_poly_value): Likewise.
26139         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26140         for GET_MODE_NUNITS.
26141         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26142         for GET_MODE_NUNITS.
26143         * tree.c (make_vector_type): Remove temporary shim and make
26144         the real function take the number of units as a poly_uint64
26145         rather than an int.
26146         (build_vector_type_for_mode): Handle polynomial nunits.
26147         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26148         * emit-rtl.c (const_vec_series_p_1): Likewise.
26149         (gen_rtx_CONST_VECTOR): Likewise.
26150         * fold-const.c (test_vec_duplicate_folding): Likewise.
26151         * genrecog.c (validate_pattern): Likewise.
26152         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26153         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26154         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26155         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26156         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26157         * rtlanal.c (subreg_get_info): Likewise.
26158         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26159         (vect_grouped_load_supported): Likewise.
26160         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26161         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26162         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26163         (simplify_const_unary_operation, simplify_binary_operation_1)
26164         (simplify_const_binary_operation, simplify_ternary_operation)
26165         (test_vector_ops_duplicate, test_vector_ops): Likewise.
26166         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26167         instead of CONST_VECTOR_NUNITS.
26168         * varasm.c (output_constant_pool_2): Likewise.
26169         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26170         explicit-encoded elements in the XVEC for variable-length vectors.
26172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26174         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26177             Alan Hayward  <alan.hayward@arm.com>
26178             David Sherwood  <david.sherwood@arm.com>
26180         * coretypes.h (fixed_size_mode): Declare.
26181         (fixed_size_mode_pod): New typedef.
26182         * builtins.h (target_builtins::x_apply_args_mode)
26183         (target_builtins::x_apply_result_mode): Change type to
26184         fixed_size_mode_pod.
26185         * builtins.c (apply_args_size, apply_result_size, result_vector)
26186         (expand_builtin_apply_args_1, expand_builtin_apply)
26187         (expand_builtin_return): Update accordingly.
26189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26191         * cse.c (hash_rtx_cb): Hash only the encoded elements.
26192         * cselib.c (cselib_hash_rtx): Likewise.
26193         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26194         CONST_VECTOR encoding.
26196 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26197             Jeff Law  <law@redhat.com>
26199         PR target/83641
26200         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26201         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26202         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26203         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26205         PR target/83641
26206         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26207         explicitly probe *sp in a noreturn function if there were any callee
26208         register saves or frame pointer is needed.
26210 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26212         PR debug/83621
26213         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26214         BLKmode for ternary, binary or unary expressions.
26216         PR debug/83645
26217         * var-tracking.c (delete_vta_debug_insn): New inline function.
26218         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26219         insns from get_insns () to NULL instead of each bb separately.
26220         Use delete_vta_debug_insn.  No longer static.
26221         (vt_debug_insns_local, variable_tracking_main_1): Adjust
26222         delete_vta_debug_insns callers.
26223         * rtl.h (delete_vta_debug_insns): Declare.
26224         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26225         instead of variable_tracking_main.
26227 2018-01-03  Martin Sebor  <msebor@redhat.com>
26229         PR tree-optimization/83603
26230         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26231         arguments past the endof the argument list in functions declared
26232         without a prototype.
26233         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26234         Avoid checking when arguments are null.
26236 2018-01-03  Martin Sebor  <msebor@redhat.com>
26238         PR c/83559
26239         * doc/extend.texi (attribute const): Fix a typo.
26240         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26241         issuing -Wsuggest-attribute for void functions.
26243 2018-01-03  Martin Sebor  <msebor@redhat.com>
26245         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26246         offset_int::from instead of wide_int::to_shwi.
26247         (maybe_diag_overlap): Remove assertion.
26248         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26249         * gimple-ssa-sprintf.c (format_directive): Same.
26250         (parse_directive): Same.
26251         (sprintf_dom_walker::compute_format_length): Same.
26252         (try_substitute_return_value): Same.
26254 2018-01-03  Jeff Law  <law@redhat.com>
26256         PR middle-end/83654
26257         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26258         non-constant residual for zero at runtime and avoid probing in
26259         that case.  Reorganize code for trailing problem to mirror handling
26260         of the residual.
26262 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26264         PR tree-optimization/83501
26265         * tree-ssa-strlen.c (get_string_cst): New.
26266         (handle_char_store): Call get_string_cst.
26268 2018-01-03  Martin Liska  <mliska@suse.cz>
26270         PR tree-optimization/83593
26271         * tree-ssa-strlen.c: Include tree-cfg.h.
26272         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26273         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26274         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26275         to false.
26276         (strlen_dom_walker::before_dom_children): Call
26277         gimple_purge_dead_eh_edges. Dump tranformation with details
26278         dump flags.
26279         (strlen_dom_walker::before_dom_children): Update call by adding
26280         new argument cleanup_eh.
26281         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26283 2018-01-03  Martin Liska  <mliska@suse.cz>
26285         PR ipa/83549
26286         * cif-code.def (VARIADIC_THUNK): New enum value.
26287         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26288         thunks.
26290 2018-01-03  Jan Beulich  <jbeulich@suse.com>
26292         * sse.md (mov<mode>_internal): Tighten condition for when to use
26293         vmovdqu<ssescalarsize> for TI and OI modes.
26295 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26297         Update copyright years.
26299 2018-01-03  Martin Liska  <mliska@suse.cz>
26301         PR ipa/83594
26302         * ipa-visibility.c (function_and_variable_visibility): Skip
26303         functions with noipa attribure.
26305 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26307         * gcc.c (process_command): Update copyright notice dates.
26308         * gcov-dump.c (print_version): Ditto.
26309         * gcov.c (print_version): Ditto.
26310         * gcov-tool.c (print_version): Ditto.
26311         * gengtype.c (create_file): Ditto.
26312         * doc/cpp.texi: Bump @copying's copyright year.
26313         * doc/cppinternals.texi: Ditto.
26314         * doc/gcc.texi: Ditto.
26315         * doc/gccint.texi: Ditto.
26316         * doc/gcov.texi: Ditto.
26317         * doc/install.texi: Ditto.
26318         * doc/invoke.texi: Ditto.
26320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26322         * vector-builder.h (vector_builder::m_full_nelts): Change from
26323         unsigned int to poly_uint64.
26324         (vector_builder::full_nelts): Update prototype accordingly.
26325         (vector_builder::new_vector): Likewise.
26326         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26327         (vector_builder::operator ==): Likewise.
26328         (vector_builder::finalize): Likewise.
26329         * int-vector-builder.h (int_vector_builder::int_vector_builder):
26330         Take the number of elements as a poly_uint64 rather than an
26331         unsigned int.
26332         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26333         from unsigned int to poly_uint64.
26334         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26335         (vec_perm_indices::new_vector): Likewise.
26336         (vec_perm_indices::length): Likewise.
26337         (vec_perm_indices::nelts_per_input): Likewise.
26338         (vec_perm_indices::input_nelts): Likewise.
26339         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26340         number of elements per input as a poly_uint64 rather than an
26341         unsigned int.  Use the original encoding for variable-length
26342         vectors, rather than clamping each individual element.
26343         For the second and subsequent elements in each pattern,
26344         clamp the step and base before clamping their sum.
26345         (vec_perm_indices::series_p): Handle polynomial element counts.
26346         (vec_perm_indices::all_in_range_p): Likewise.
26347         (vec_perm_indices_to_tree): Likewise.
26348         (vec_perm_indices_to_rtx): Likewise.
26349         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
26350         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
26351         (tree_vector_builder::new_binary_operation): Handle polynomial
26352         element counts.  Return false if we need to know the number
26353         of elements at compile time.
26354         * fold-const.c (fold_vec_perm): Punt if the number of elements
26355         isn't known at compile time.
26357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26359         * vec-perm-indices.h (vec_perm_builder): Change element type
26360         from HOST_WIDE_INT to poly_int64.
26361         (vec_perm_indices::element_type): Update accordingly.
26362         (vec_perm_indices::clamp): Handle polynomial element_types.
26363         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26364         (vec_perm_indices::all_in_range_p): Likewise.
26365         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
26366         than shwi trees.
26367         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
26368         polynomial vec_perm_indices element types.
26369         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
26370         * fold-const.c (fold_vec_perm): Likewise.
26371         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
26372         * tree-vect-generic.c (lower_vec_perm): Likewise.
26373         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26374         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
26375         element type to HOST_WIDE_INT.
26377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26378             Alan Hayward  <alan.hayward@arm.com>
26379             David Sherwood  <david.sherwood@arm.com>
26381         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
26382         rather than an int.  Use plus_constant.
26383         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
26384         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
26386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26387             Alan Hayward  <alan.hayward@arm.com>
26388             David Sherwood  <david.sherwood@arm.com>
26390         * calls.c (emit_call_1, expand_call): Change struct_value_size from
26391         a HOST_WIDE_INT to a poly_int64.
26393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26394             Alan Hayward  <alan.hayward@arm.com>
26395             David Sherwood  <david.sherwood@arm.com>
26397         * calls.c (load_register_parameters): Cope with polynomial
26398         mode sizes.  Require a constant size for BLKmode parameters
26399         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
26400         forces a parameter to be padded at the lsb end in order to
26401         fill a complete number of words, require the parameter size
26402         to be ordered wrt UNITS_PER_WORD.
26404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26405             Alan Hayward  <alan.hayward@arm.com>
26406             David Sherwood  <david.sherwood@arm.com>
26408         * reload1.c (spill_stack_slot_width): Change element type
26409         from unsigned int to poly_uint64_pod.
26410         (alter_reg): Treat mode sizes as polynomial.
26412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26413             Alan Hayward  <alan.hayward@arm.com>
26414             David Sherwood  <david.sherwood@arm.com>
26416         * reload.c (complex_word_subreg_p): New function.
26417         (reload_inner_reg_of_subreg, push_reload): Use it.
26419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26420             Alan Hayward  <alan.hayward@arm.com>
26421             David Sherwood  <david.sherwood@arm.com>
26423         * lra-constraints.c (process_alt_operands): Reject matched
26424         operands whose sizes aren't ordered.
26425         (match_reload): Refer to this check here.
26427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26428             Alan Hayward  <alan.hayward@arm.com>
26429             David Sherwood  <david.sherwood@arm.com>
26431         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
26432         that the mode size is in the set {1, 2, 4, 8, 16}.
26434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26435             Alan Hayward  <alan.hayward@arm.com>
26436             David Sherwood  <david.sherwood@arm.com>
26438         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
26439         Use plus_constant instead of gen_rtx_PLUS.
26441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26442             Alan Hayward  <alan.hayward@arm.com>
26443             David Sherwood  <david.sherwood@arm.com>
26445         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
26446         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
26447         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
26448         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
26449         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
26450         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
26451         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
26452         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
26453         * config/i386/i386.c (ix86_push_rounding): ...this new function.
26454         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
26455         a poly_int64.
26456         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
26457         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
26458         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
26459         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
26460         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
26461         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
26462         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
26463         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
26464         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
26465         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
26466         function.
26467         * expr.c (emit_move_resolve_push): Treat the input and result
26468         of PUSH_ROUNDING as a poly_int64.
26469         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
26470         (emit_push_insn): Likewise.
26471         * lra-eliminations.c (mark_not_eliminable): Likewise.
26472         * recog.c (push_operand): Likewise.
26473         * reload1.c (elimination_effects): Likewise.
26474         * rtlanal.c (nonzero_bits1): Likewise.
26475         * calls.c (store_one_arg): Likewise.  Require the padding to be
26476         known at compile time.
26478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26479             Alan Hayward  <alan.hayward@arm.com>
26480             David Sherwood  <david.sherwood@arm.com>
26482         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
26483         Use plus_constant instead of gen_rtx_PLUS.
26485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26486             Alan Hayward  <alan.hayward@arm.com>
26487             David Sherwood  <david.sherwood@arm.com>
26489         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
26490         rather than an int.
26492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26493             Alan Hayward  <alan.hayward@arm.com>
26494             David Sherwood  <david.sherwood@arm.com>
26496         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
26497         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
26498         via stack temporaries.  Treat the mode size as polynomial too.
26500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26501             Alan Hayward  <alan.hayward@arm.com>
26502             David Sherwood  <david.sherwood@arm.com>
26504         * expr.c (expand_expr_real_2): When handling conversions involving
26505         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
26506         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
26507         as a poly_uint64 too.
26509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26510             Alan Hayward  <alan.hayward@arm.com>
26511             David Sherwood  <david.sherwood@arm.com>
26513         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
26515 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26516             Alan Hayward  <alan.hayward@arm.com>
26517             David Sherwood  <david.sherwood@arm.com>
26519         * combine.c (can_change_dest_mode): Handle polynomial
26520         REGMODE_NATURAL_SIZE.
26521         * expmed.c (store_bit_field_1): Likewise.
26522         * expr.c (store_constructor): Likewise.
26523         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
26524         and polynomial REGMODE_NATURAL_SIZE.
26525         (gen_lowpart_common): Likewise.
26526         * reginfo.c (record_subregs_of_mode): Likewise.
26527         * rtlanal.c (read_modify_subreg_p): Likewise.
26529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26530             Alan Hayward  <alan.hayward@arm.com>
26531             David Sherwood  <david.sherwood@arm.com>
26533         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
26534         numbers of elements.
26536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26537             Alan Hayward  <alan.hayward@arm.com>
26538             David Sherwood  <david.sherwood@arm.com>
26540         * match.pd: Cope with polynomial numbers of vector elements.
26542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26543             Alan Hayward  <alan.hayward@arm.com>
26544             David Sherwood  <david.sherwood@arm.com>
26546         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
26547         in a POINTER_PLUS_EXPR.
26549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26550             Alan Hayward  <alan.hayward@arm.com>
26551             David Sherwood  <david.sherwood@arm.com>
26553         * omp-simd-clone.c (simd_clone_subparts): New function.
26554         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
26555         (ipa_simd_modify_function_body): Likewise.
26557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26558             Alan Hayward  <alan.hayward@arm.com>
26559             David Sherwood  <david.sherwood@arm.com>
26561         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
26562         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
26563         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
26564         (expand_vector_condition, vector_element): Likewise.
26565         (subparts_gt): New function.
26566         (get_compute_type): Use subparts_gt.
26567         (count_type_subparts): Delete.
26568         (expand_vector_operations_1): Use subparts_gt instead of
26569         count_type_subparts.
26571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26572             Alan Hayward  <alan.hayward@arm.com>
26573             David Sherwood  <david.sherwood@arm.com>
26575         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
26576         (vect_compile_time_alias): ...this new function.  Do the calculation
26577         on poly_ints rather than trees.
26578         (vect_prune_runtime_alias_test_list): Update call accordingly.
26580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26581             Alan Hayward  <alan.hayward@arm.com>
26582             David Sherwood  <david.sherwood@arm.com>
26584         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
26585         numbers of units.
26586         (vect_schedule_slp_instance): Likewise.
26588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26589             Alan Hayward  <alan.hayward@arm.com>
26590             David Sherwood  <david.sherwood@arm.com>
26592         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
26593         constant and extern definitions for variable-length vectors.
26594         (vect_get_constant_vectors): Note that the number of units
26595         is known to be constant.
26597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26598             Alan Hayward  <alan.hayward@arm.com>
26599             David Sherwood  <david.sherwood@arm.com>
26601         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
26602         of units as polynomial.  Choose between WIDE and NARROW based
26603         on multiple_p.
26605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26606             Alan Hayward  <alan.hayward@arm.com>
26607             David Sherwood  <david.sherwood@arm.com>
26609         * tree-vect-stmts.c (simd_clone_subparts): New function.
26610         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
26612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26613             Alan Hayward  <alan.hayward@arm.com>
26614             David Sherwood  <david.sherwood@arm.com>
26616         * tree-vect-stmts.c (vectorizable_call): Treat the number of
26617         vectors as polynomial.  Use build_index_vector for
26618         IFN_GOMP_SIMD_LANE.
26620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26621             Alan Hayward  <alan.hayward@arm.com>
26622             David Sherwood  <david.sherwood@arm.com>
26624         * tree-vect-stmts.c (get_load_store_type): Treat the number of
26625         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
26626         for variable-length vectors.
26627         (vectorizable_mask_load_store): Treat the number of units as
26628         polynomial, asserting that it is constant if the condition has
26629         already been enforced.
26630         (vectorizable_store, vectorizable_load): Likewise.
26632 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26633             Alan Hayward  <alan.hayward@arm.com>
26634             David Sherwood  <david.sherwood@arm.com>
26636         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
26637         of units as polynomial.  Punt if we can't tell at compile time
26638         which vector contains the final result.
26640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26641             Alan Hayward  <alan.hayward@arm.com>
26642             David Sherwood  <david.sherwood@arm.com>
26644         * tree-vect-loop.c (vectorizable_induction): Treat the number
26645         of units as polynomial.  Punt on SLP inductions.  Use an integer
26646         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
26647         cast of such a series for variable-length floating-point
26648         reductions.
26650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26651             Alan Hayward  <alan.hayward@arm.com>
26652             David Sherwood  <david.sherwood@arm.com>
26654         * tree.h (build_index_vector): Declare.
26655         * tree.c (build_index_vector): New function.
26656         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
26657         of units as polynomial, forcibly converting it to a constant if
26658         vectorizable_reduction has already enforced the condition.
26659         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
26660         to create a {1,2,3,...} vector.
26661         (vectorizable_reduction): Treat the number of units as polynomial.
26662         Choose vectype_in based on the largest scalar element size rather
26663         than the smallest number of units.  Enforce the restrictions
26664         relied on above.
26666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26667             Alan Hayward  <alan.hayward@arm.com>
26668             David Sherwood  <david.sherwood@arm.com>
26670         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
26671         number of units as polynomial.
26673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26674             Alan Hayward  <alan.hayward@arm.com>
26675             David Sherwood  <david.sherwood@arm.com>
26677         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
26678         * target.def (autovectorize_vector_sizes): Return the vector sizes
26679         by pointer, using vector_sizes rather than a bitmask.
26680         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
26681         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
26682         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
26683         Likewise.
26684         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
26685         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
26686         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
26687         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
26688         * omp-general.c (omp_max_vf): Likewise.
26689         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26690         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
26691         * tree-vect-loop.c (vect_analyze_loop): Likewise.
26692         * tree-vect-slp.c (vect_slp_bb): Likewise.
26693         * doc/tm.texi: Regenerate.
26694         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
26695         to a poly_uint64.
26696         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
26697         the vector size as a poly_uint64 rather than an unsigned int.
26698         (current_vector_size): Change from an unsigned int to a poly_uint64.
26699         (get_vectype_for_scalar_type): Update accordingly.
26700         * tree.h (build_truth_vector_type): Take the size and number of
26701         units as a poly_uint64 rather than an unsigned int.
26702         (build_vector_type): Add a temporary overload that takes
26703         the number of units as a poly_uint64 rather than an unsigned int.
26704         * tree.c (make_vector_type): Likewise.
26705         (build_truth_vector_type): Take the number of units as a poly_uint64
26706         rather than an unsigned int.
26708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26709             Alan Hayward  <alan.hayward@arm.com>
26710             David Sherwood  <david.sherwood@arm.com>
26712         * target.def (get_mask_mode): Take the number of units and length
26713         as poly_uint64s rather than unsigned ints.
26714         * targhooks.h (default_get_mask_mode): Update accordingly.
26715         * targhooks.c (default_get_mask_mode): Likewise.
26716         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
26717         * doc/tm.texi: Regenerate.
26719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26720             Alan Hayward  <alan.hayward@arm.com>
26721             David Sherwood  <david.sherwood@arm.com>
26723         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
26724         * omp-general.c (omp_max_vf): Likewise.
26725         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
26726         (expand_omp_simd): Handle polynomial safelen.
26727         * omp-low.c (omplow_simd_context): Add a default constructor.
26728         (omplow_simd_context::max_vf): Change from int to poly_uint64.
26729         (lower_rec_simd_input_clauses): Update accordingly.
26730         (lower_rec_input_clauses): Likewise.
26732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26733             Alan Hayward  <alan.hayward@arm.com>
26734             David Sherwood  <david.sherwood@arm.com>
26736         * tree-vectorizer.h (vect_nunits_for_cost): New function.
26737         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
26738         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
26739         (vect_analyze_slp_cost): Likewise.
26740         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
26741         (vect_model_load_cost): Likewise.
26743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26744             Alan Hayward  <alan.hayward@arm.com>
26745             David Sherwood  <david.sherwood@arm.com>
26747         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
26748         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
26749         from an unsigned int * to a poly_uint64_pod *.
26750         (calculate_unrolling_factor): New function.
26751         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
26753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26754             Alan Hayward  <alan.hayward@arm.com>
26755             David Sherwood  <david.sherwood@arm.com>
26757         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
26758         from an unsigned int to a poly_uint64.
26759         (_loop_vec_info::slp_unrolling_factor): Likewise.
26760         (_loop_vec_info::vectorization_factor): Change from an int
26761         to a poly_uint64.
26762         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
26763         (vect_get_num_vectors): New function.
26764         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
26765         (vect_get_num_copies): Use vect_get_num_vectors.
26766         (vect_analyze_data_ref_dependences): Change max_vf from an int *
26767         to an unsigned int *.
26768         (vect_analyze_data_refs): Change min_vf from an int * to a
26769         poly_uint64 *.
26770         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26771         than an unsigned HOST_WIDE_INT.
26772         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
26773         (vect_analyze_data_ref_dependence): Change max_vf from an int *
26774         to an unsigned int *.
26775         (vect_analyze_data_ref_dependences): Likewise.
26776         (vect_compute_data_ref_alignment): Handle polynomial vf.
26777         (vect_enhance_data_refs_alignment): Likewise.
26778         (vect_prune_runtime_alias_test_list): Likewise.
26779         (vect_shift_permute_load_chain): Likewise.
26780         (vect_supportable_dr_alignment): Likewise.
26781         (dependence_distance_ge_vf): Take the vectorization factor as a
26782         poly_uint64 rather than an unsigned HOST_WIDE_INT.
26783         (vect_analyze_data_refs): Change min_vf from an int * to a
26784         poly_uint64 *.
26785         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
26786         vfm1 as a poly_uint64 rather than an int.  Make the same change
26787         for the returned bound_scalar.
26788         (vect_gen_vector_loop_niters): Handle polynomial vf.
26789         (vect_do_peeling): Likewise.  Update call to
26790         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
26791         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
26792         be constant.
26793         * tree-vect-loop.c (vect_determine_vectorization_factor)
26794         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
26795         (vect_get_known_peeling_cost): Likewise.
26796         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
26797         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
26798         (vect_transform_loop): Likewise.  Use the lowest possible VF when
26799         updating the upper bounds of the loop.
26800         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
26801         rather than an int.
26802         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
26803         polynomial unroll factors.
26804         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
26805         (vect_make_slp_decision): Likewise.
26806         (vect_supported_load_permutation_p): Likewise, and polynomial
26807         vf too.
26808         (vect_analyze_slp_cost): Handle polynomial vf.
26809         (vect_slp_analyze_node_operations): Likewise.
26810         (vect_slp_analyze_bb_1): Likewise.
26811         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26812         than an unsigned HOST_WIDE_INT.
26813         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
26814         (vectorizable_load): Handle polynomial vf.
26815         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
26816         a poly_uint64.
26817         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
26819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26820             Alan Hayward  <alan.hayward@arm.com>
26821             David Sherwood  <david.sherwood@arm.com>
26823         * match.pd: Handle bit operations involving three constants
26824         and try to fold one pair.
26826 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26828         * tree-vect-loop-manip.c: Include gimple-fold.h.
26829         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
26830         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
26831         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
26832         Add a path that uses a step of VF instead of 1, but disable it
26833         for now.
26834         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
26835         and niters_no_overflow parameters.  Update calls to
26836         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
26837         Create a new SSA name if the latter choses to use a ste other
26838         than zero, and return it via niters_vector_mult_vf_var.
26839         * tree-vect-loop.c (vect_transform_loop): Update calls to
26840         vect_do_peeling, vect_gen_vector_loop_niters and
26841         slpeel_make_loop_iterate_ntimes.
26842         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
26843         (vect_gen_vector_loop_niters): Update declarations after above changes.
26845 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
26847         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
26848         128-bit round to integer instructions.
26849         (ceil<mode>2): Likewise.
26850         (btrunc<mode>2): Likewise.
26851         (round<mode>2): Likewise.
26853 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26855         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
26856         unaligned VSX load/store on P8/P9.
26857         (expand_block_clear): Allow the use of unaligned VSX
26858         load/store on P8/P9.
26860 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26862         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
26863         New function.
26864         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
26865         swap associated with both a load and a store.
26867 2018-01-02  Andrew Waterman  <andrew@sifive.com>
26869         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
26870         * config/riscv/riscv.md (clear_cache): Use it.
26872 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
26874         * web.c: Remove out-of-date comment.
26876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26878         * expr.c (fixup_args_size_notes): Check that any existing
26879         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
26880         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
26881         (emit_single_push_insn): ...here.
26883 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26885         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
26886         (const_vector_encoded_nelts): New function.
26887         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
26888         (const_vector_int_elt, const_vector_elt): Declare.
26889         * emit-rtl.c (const_vector_int_elt_1): New function.
26890         (const_vector_elt): Likewise.
26891         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
26892         of CONST_VECTOR_ELT.
26894 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26896         * expr.c: Include rtx-vector-builder.h.
26897         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
26898         directly on the tree encoding.
26899         (const_vector_from_tree): Likewise.
26900         * optabs.c: Include rtx-vector-builder.h.
26901         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
26902         sequence of "u" values.
26903         * vec-perm-indices.c: Include rtx-vector-builder.h.
26904         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
26905         directly on the vec_perm_indices encoding.
26907 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26909         * doc/rtl.texi (const_vector): Describe new encoding scheme.
26910         * Makefile.in (OBJS): Add rtx-vector-builder.o.
26911         * rtx-vector-builder.h: New file.
26912         * rtx-vector-builder.c: Likewise.
26913         * rtl.h (rtx_def::u2): Add a const_vector field.
26914         (CONST_VECTOR_NPATTERNS): New macro.
26915         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
26916         (CONST_VECTOR_DUPLICATE_P): Likewise.
26917         (CONST_VECTOR_STEPPED_P): Likewise.
26918         (CONST_VECTOR_ENCODED_ELT): Likewise.
26919         (const_vec_duplicate_p): Check for a duplicated vector encoding.
26920         (unwrap_const_vec_duplicate): Likewise.
26921         (const_vec_series_p): Check for a non-duplicated vector encoding.
26922         Say that the function only returns true for integer vectors.
26923         * emit-rtl.c: Include rtx-vector-builder.h.
26924         (gen_const_vec_duplicate_1): Delete.
26925         (gen_const_vector): Call gen_const_vec_duplicate instead of
26926         gen_const_vec_duplicate_1.
26927         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
26928         (gen_const_vec_duplicate): Use rtx_vector_builder.
26929         (gen_const_vec_series): Likewise.
26930         (gen_rtx_CONST_VECTOR): Likewise.
26931         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
26932         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26933         Build a new vector rather than modifying a CONST_VECTOR in-place.
26934         (handle_special_swappables): Update call accordingly.
26935         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
26936         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26937         Build a new vector rather than modifying a CONST_VECTOR in-place.
26938         (handle_special_swappables): Update call accordingly.
26940 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26942         * simplify-rtx.c (simplify_const_binary_operation): Use
26943         CONST_VECTOR_ELT instead of XVECEXP.
26945 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26947         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
26948         the selector elements to be different from the data elements
26949         if the selector is a VECTOR_CST.
26950         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
26951         ssizetype for the selector.
26953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26955         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
26956         before testing each element individually.
26957         * tree-vect-generic.c (lower_vec_perm): Likewise.
26959 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26961         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
26962         * selftest-run-tests.c (selftest::run_tests): Call it.
26963         * vector-builder.h (vector_builder::operator ==): New function.
26964         (vector_builder::operator !=): Likewise.
26965         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
26966         (vec_perm_indices::all_from_input_p): New function.
26967         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26968         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
26969         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
26970         instead of reading the VECTOR_CST directly.  Detect whether both
26971         vector inputs are the same before constructing the vec_perm_indices,
26972         and update the number of inputs argument accordingly.  Use the
26973         utility functions added above.  Only construct sel2 if we need to.
26975 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26977         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
26978         the broadcast of the low byte.
26979         (expand_mult_highpart): Use an explicit encoding for the permutes.
26980         * optabs-query.c (can_mult_highpart_p): Likewise.
26981         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
26982         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26983         (vectorizable_bswap): Likewise.
26984         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
26985         explicit encoding for the power-of-2 permutes.
26986         (vect_permute_store_chain): Likewise.
26987         (vect_grouped_load_supported): Likewise.
26988         (vect_permute_load_chain): Likewise.
26990 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26992         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
26993         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
26994         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
26995         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26996         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
26997         (vect_gen_perm_mask_any): Likewise.
26999 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27001         * int-vector-builder.h: New file.
27002         * vec-perm-indices.h: Include int-vector-builder.h.
27003         (vec_perm_indices): Redefine as an int_vector_builder.
27004         (auto_vec_perm_indices): Delete.
27005         (vec_perm_builder): Redefine as a stand-alone class.
27006         (vec_perm_indices::vec_perm_indices): New function.
27007         (vec_perm_indices::clamp): Likewise.
27008         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27009         (vec_perm_indices::new_vector): New function.
27010         (vec_perm_indices::new_expanded_vector): Update for new
27011         vec_perm_indices class.
27012         (vec_perm_indices::rotate_inputs): New function.
27013         (vec_perm_indices::all_in_range_p): Operate directly on the
27014         encoded form, without computing elided elements.
27015         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27016         encoding.  Update for new vec_perm_indices class.
27017         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27018         the given vec_perm_builder.
27019         (expand_vec_perm_var): Update vec_perm_builder constructor.
27020         (expand_mult_highpart): Use vec_perm_builder instead of
27021         auto_vec_perm_indices.
27022         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27023         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
27024         or double series encoding as appropriate.
27025         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27026         vec_perm_indices instead of auto_vec_perm_indices.
27027         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27028         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27029         (vect_permute_store_chain): Likewise.
27030         (vect_grouped_load_supported): Likewise.
27031         (vect_permute_load_chain): Likewise.
27032         (vect_shift_permute_load_chain): Likewise.
27033         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27034         (vect_transform_slp_perm_load): Likewise.
27035         (vect_schedule_slp_instance): Likewise.
27036         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27037         (vectorizable_mask_load_store): Likewise.
27038         (vectorizable_bswap): Likewise.
27039         (vectorizable_store): Likewise.
27040         (vectorizable_load): Likewise.
27041         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27042         vec_perm_indices instead of auto_vec_perm_indices.  Use
27043         tree_to_vec_perm_builder to read the vector from a tree.
27044         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27045         vec_perm_builder instead of a vec_perm_indices.
27046         (have_whole_vector_shift): Use vec_perm_builder and
27047         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
27048         truncation to calc_vec_perm_mask_for_shift.
27049         (vect_create_epilog_for_reduction): Likewise.
27050         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27051         from auto_vec_perm_indices to vec_perm_indices.
27052         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27053         instead of changing individual elements.
27054         (aarch64_vectorize_vec_perm_const): Use new_vector to install
27055         the vector in d.perm.
27056         * config/arm/arm.c (expand_vec_perm_d::perm): Change
27057         from auto_vec_perm_indices to vec_perm_indices.
27058         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27059         instead of changing individual elements.
27060         (arm_vectorize_vec_perm_const): Use new_vector to install
27061         the vector in d.perm.
27062         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27063         Update vec_perm_builder constructor.
27064         (rs6000_expand_interleave): Likewise.
27065         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27066         (rs6000_expand_interleave): Likewise.
27068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27070         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27071         to qimode could truncate the indices.
27072         * optabs.c (expand_vec_perm_var): Likewise.
27074 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27076         * Makefile.in (OBJS): Add vec-perm-indices.o.
27077         * vec-perm-indices.h: New file.
27078         * vec-perm-indices.c: Likewise.
27079         * target.h (vec_perm_indices): Replace with a forward class
27080         declaration.
27081         (auto_vec_perm_indices): Move to vec-perm-indices.h.
27082         * optabs.h: Include vec-perm-indices.h.
27083         (expand_vec_perm): Delete.
27084         (selector_fits_mode_p, expand_vec_perm_var): Declare.
27085         (expand_vec_perm_const): Declare.
27086         * target.def (vec_perm_const_ok): Replace with...
27087         (vec_perm_const): ...this new hook.
27088         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27089         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27090         * doc/tm.texi: Regenerate.
27091         * optabs.def (vec_perm_const): Delete.
27092         * doc/md.texi (vec_perm_const): Likewise.
27093         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27094         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27095         expand_vec_perm for constant permutation vectors.  Assert that
27096         the mode of variable permutation vectors is the integer equivalent
27097         of the mode that is being permuted.
27098         * optabs-query.h (selector_fits_mode_p): Declare.
27099         * optabs-query.c: Include vec-perm-indices.h.
27100         (selector_fits_mode_p): New function.
27101         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27102         is defined, instead of checking whether the vec_perm_const_optab
27103         exists.  Use targetm.vectorize.vec_perm_const instead of
27104         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27105         fit in the vector mode before using a variable permute.
27106         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27107         vec_perm_indices instead of an rtx.
27108         (expand_vec_perm): Replace with...
27109         (expand_vec_perm_const): ...this new function.  Take the selector
27110         as a vec_perm_indices rather than an rtx.  Also take the mode of
27111         the selector.  Update call to shift_amt_for_vec_perm_mask.
27112         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27113         Use vec_perm_indices::new_expanded_vector to expand the original
27114         selector into bytes.  Check whether the indices fit in the vector
27115         mode before using a variable permute.
27116         (expand_vec_perm_var): Make global.
27117         (expand_mult_highpart): Use expand_vec_perm_const.
27118         * fold-const.c: Includes vec-perm-indices.h.
27119         * tree-ssa-forwprop.c: Likewise.
27120         * tree-vect-data-refs.c: Likewise.
27121         * tree-vect-generic.c: Likewise.
27122         * tree-vect-loop.c: Likewise.
27123         * tree-vect-slp.c: Likewise.
27124         * tree-vect-stmts.c: Likewise.
27125         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27126         Delete.
27127         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27128         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27129         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27130         (aarch64_vectorize_vec_perm_const): ...this new function.
27131         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27132         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27133         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27134         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27135         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27136         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27137         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27138         into...
27139         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
27140         check for NEON modes.
27141         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27142         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27143         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27144         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27145         into...
27146         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
27147         the old VEC_PERM_CONST conditions.
27148         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27149         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27150         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27151         (ia64_vectorize_vec_perm_const_ok): Merge into...
27152         (ia64_vectorize_vec_perm_const): ...this new function.
27153         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27154         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27155         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27156         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27157         * config/mips/mips.c (mips_expand_vec_perm_const)
27158         (mips_vectorize_vec_perm_const_ok): Merge into...
27159         (mips_vectorize_vec_perm_const): ...this new function.
27160         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27161         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27162         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27163         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27164         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27165         (rs6000_expand_vec_perm_const): Delete.
27166         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27167         Delete.
27168         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27169         (altivec_expand_vec_perm_const_le): Take each operand individually.
27170         Operate on constant selectors rather than rtxes.
27171         (altivec_expand_vec_perm_const): Likewise.  Update call to
27172         altivec_expand_vec_perm_const_le.
27173         (rs6000_expand_vec_perm_const): Delete.
27174         (rs6000_vectorize_vec_perm_const_ok): Delete.
27175         (rs6000_vectorize_vec_perm_const): New function.
27176         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27177         an element count and rtx array.
27178         (rs6000_expand_extract_even): Update call accordingly.
27179         (rs6000_expand_interleave): Likewise.
27180         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27181         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27182         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27183         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27184         (rs6000_expand_vec_perm_const): Delete.
27185         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27186         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27187         (altivec_expand_vec_perm_const_le): Take each operand individually.
27188         Operate on constant selectors rather than rtxes.
27189         (altivec_expand_vec_perm_const): Likewise.  Update call to
27190         altivec_expand_vec_perm_const_le.
27191         (rs6000_expand_vec_perm_const): Delete.
27192         (rs6000_vectorize_vec_perm_const_ok): Delete.
27193         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
27194         reference to the SPE evmerge intructions.
27195         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27196         an element count and rtx array.
27197         (rs6000_expand_extract_even): Update call accordingly.
27198         (rs6000_expand_interleave): Likewise.
27199         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27200         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27201         new function.
27202         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27204 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27206         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27207         vector mode and that that mode matches the mode of the data
27208         being permuted.
27209         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27210         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
27211         directly using expand_vec_perm_1 when forcing selectors into
27212         registers.
27213         (expand_vec_perm_var): New function, split out from expand_vec_perm.
27215 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27217         * optabs-query.h (can_vec_perm_p): Delete.
27218         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27219         * optabs-query.c (can_vec_perm_p): Split into...
27220         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27221         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27222         particular selector is valid.
27223         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27224         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27225         (vect_grouped_load_supported): Likewise.
27226         (vect_shift_permute_load_chain): Likewise.
27227         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27228         (vect_transform_slp_perm_load): Likewise.
27229         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27230         (vectorizable_bswap): Likewise.
27231         (vect_gen_perm_mask_checked): Likewise.
27232         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
27233         implementations of variable permutation vectors into account
27234         when deciding which selector to use.
27235         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27236         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27237         with a false third argument.
27238         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27239         to test whether the constant selector is valid and can_vec_perm_var_p
27240         to test whether a variable selector is valid.
27242 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27244         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27245         * optabs-query.c (can_vec_perm_p): Likewise.
27246         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27247         instead of vec_perm_indices.
27248         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27249         (vect_gen_perm_mask_checked): Likewise,
27250         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27251         (vect_gen_perm_mask_checked): Likewise,
27253 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27255         * optabs-query.h (qimode_for_vec_perm): Declare.
27256         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27257         (qimode_for_vec_perm): ...this new function.
27258         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27260 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27262         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27263         does not have a conditional at the top.
27265 2018-01-02  Richard Biener  <rguenther@suse.de>
27267         * ipa-inline.c (big_speedup_p): Fix expression.
27269 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27271         PR target/81616
27272         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27273         for generic 4->6.
27275 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27277         PR target/81616
27278         Generic tuning.
27279         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27280         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27281         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27282         cond_taken_branch_cost 3->4.
27284 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
27286         PR tree-optimization/83581
27287         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27288         TODO_cleanup_cfg if any changes have been made.
27290         PR middle-end/83608
27291         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27292         convert_modes if target mode has the right side, but different mode
27293         class.
27295         PR middle-end/83609
27296         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27297         last argument when extracting from CONCAT.  If either from_real or
27298         from_imag is NULL, use expansion through memory.  If result is not
27299         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27300         the parts directly to inner mode, if even that fails, use expansion
27301         through memory.
27303         PR middle-end/83623
27304         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27305         check for bswap in mode rather than HImode and use that in expand_unop
27306         too.
27308 Copyright (C) 2018 Free Software Foundation, Inc.
27310 Copying and distribution of this file, with or without modification,
27311 are permitted in any medium without royalty provided the copyright
27312 notice and this notice are preserved.