rs6000-builtin.def (VSX_BUILTIN_VEC_LD, [...]): Add comment to explain non-traditiona...
[gcc.git] / gcc / ChangeLog
1 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
2
3 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6 several redundant entries.
7
8 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9
10 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
11 type from "rtx" to "rtx_insn *".
12 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13 for local "call_insn", removing cast.
14 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15
16 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17
18 PR tree-optimization/86066
19 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
20 for BIT_INSERT_EXPR stores.
21
22 2018-06-06 Richard Biener <rguenther@suse.de>
23
24 PR tree-optimization/86062
25 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
26 component refs ontop
27 of to be offsetted base.
28
29 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
30
31 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
32 to be static and remove check on interrupt attribute name.
33
34 gcc/testsuite/gcc.target/msp430/
35 * function-attributes-4.c: New test.
36 * static-interrupts.c: New test.
37
38 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
39
40 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
41 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
42
43 2018-06-05 Steve Ellcey <sellcey@cavium.com>
44
45 PR target/79924
46 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
47 second argument.
48 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
49 Remove second argument, change how error is called.
50 (aarch64_layout_arg): Remove second argument from
51 aarch64_err_no_fpadvsimd call.
52 (aarch64_init_cumulative_args): Ditto.
53 (aarch64_gimplify_va_arg_expr): Ditto.
54 * config/aarch64/aarch64.md (mov<mode>): Ditto.
55
56 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
57
58 * config/i386/i386.md (simple_return_indirect_internal): New expander.
59 (*simple_return_indirect_internal<mode>): Rename from
60 simple_return_indirect_internal. Use W mode iterator.
61 (rstorssp): New expander.
62 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
63 (clrssbsy): New expander.
64 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
65
66 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
67
68 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
69 __typeof__.
70 (cmse_check_pointed_object): Likewise.
71
72 2018-06-05 Martin Liska <mliska@suse.cz>
73
74 PR gcov-profile/47618
75 * doc/invoke.texi: Document how -fprofile-dir format
76 is extended.
77
78 2018-06-05 Richard Biener <rguenther@suse.de>
79
80 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
81 removal pretend DOM info isn't available so we do not update
82 it and only remove edges, not dominated blocks. Actually free
83 DOM info in case we removed something. Remove unreachable blocks.
84 (mfb_keep_latches): Work with either DOM info or marked backedges.
85 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
86 first. Mark backedges if DOM info isn't available.
87 (Re-)compute DOM info after cleanup_control_flow_pre.
88
89 2018-06-05 Richard Biener <rguenther@suse.de>
90
91 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
92 (locus_discrim_hasher::hash): Adjust.
93 (locus_discrim_hasher::equal): Likewise.
94 (next_discriminator_for_locus): Work on line directly.
95 (same_line_p): Pass in expanded locus1 as well.
96 (assign_discriminators): Avoid redundant location expansions.
97
98 2018-06-05 Richard Biener <rguenther@suse.de>
99
100 PR tree-optimization/86046
101 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
102 if required after clearing TREE_ADDRESSABLE.
103
104 2018-06-05 Richard Biener <rguenther@suse.de>
105
106 PR tree-optimization/86047
107 * tree-ssa-loop.c (for_each_index): Glob handling of all
108 decls and constants and really handle all of them.
109
110 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
111
112 PR target/81497
113 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
114 qualifier_void_pointer and qualifier_const_void_pointer.
115 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
116 (arm_init_builtins): Handle the above.
117 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
118 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
119 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
120 void intrinsics.
121
122 2018-06-05 Martin Liska <mliska@suse.cz>
123
124 * auto-profile.c (read_autofdo_file): Do not use
125 gcov_ctr_summary struct.
126 (afdo_callsite_hot_enough_for_early_inline): Likewise.
127 * coverage.c (struct counts_entry): Likewise.
128 (read_counts_file): Read just single summary entry.
129 (get_coverage_counts): Use gcov_summary struct.
130 * coverage.h (get_coverage_counts): Likewise.
131 * gcov-dump.c (dump_working_sets): Likewise.
132 (tag_summary): Dump just single summary.
133 * gcov-io.c (gcov_write_summary): Write just histogram
134 summary.
135 (gcov_read_summary): Read just single summary.
136 (compute_working_sets): Use gcov_summary struct.
137 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
138 of GCOV_COUNTERS_SUMMABLE.
139 (GCOV_COUNTERS_SUMMABLE): Remove.
140 (GCOV_FIRST_VALUE_COUNTER): Replace with
141 GCOV_COUNTER_V_INTERVAL.
142 (struct gcov_ctr_summary): Remove.
143 (struct gcov_summary): Directly use fields of former
144 gcov_ctr_summary.
145 (compute_working_sets): Use gcov_summary struct.
146 * gcov.c (read_count_file): Do not use ctrs fields.
147 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
148 struct.
149 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
150 struct.
151 * profile.c: Likewise.
152 * profile.h: Likewise.
153
154 2018-06-05 Martin Liska <mliska@suse.cz>
155
156 PR gcov-profile/84846
157 * gcov.c (output_lines): Print working directory only
158 in intermediate format.
159
160 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
161
162 * config/s390/s390-builtin-types.def: Add void function type.
163 * config/s390/s390-builtins.def: Use the function type for the
164 tbeginc builtin.
165
166 2018-06-04 Jim Wilson <jimw@sifive.com>
167
168 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
169 to int.
170 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
171 and maybe_eh_return. Change regno to unsigned int. Use new args to
172 handle EH_RETURN_DATA_REGNO registers properly.
173 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
174 (riscv_expand_epilogue): Update comment. Change argument name and
175 type. Update code to use new name and type. Pass new args to
176 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
177 EXCEPTION_RETURN.
178 * config/riscv/riscv.md (NORMAL_RETURN): New.
179 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
180 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
181 (eh_return): Call gen_eh_return_internal and emit barrier.
182 (eh_return_internal): Call riscv_expand_epilogue.
183
184 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
185
186 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
187 bit_insertion field and declare can_be_merged_into method.
188 (merged_store_group::can_be_merged_into): New method.
189 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
190 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
191 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
192
193 2018-06-04 Richard Biener <rguenther@suse.de>
194
195 PR tree-optimization/85955
196 * builtins.c (fold_builtin_sincos): Convert pointers to
197 destination to appropriate type before dereferencing.
198
199 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
200
201 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
202
203 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
204
205 * expr.c (expand_expr_real_1): Force the operand into memory if
206 its TYPE_MODE is BLKmode and if there is no integer mode for
207 the number of bits being extracted.
208
209 2018-06-04 Jakub Jelinek <jakub@redhat.com>
210
211 PR target/85832
212 PR target/86036
213 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
214 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
215
216 2018-06-04 Richard Biener <rguenther@suse.de>
217
218 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
219 (cleanup_tree_cfg_noloop): ... single caller. Do
220 start_recording_case_labels later.
221
222 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
223
224 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
225 to _IMMINTRIN_H_INCLUDED.
226 * config/i386/pconfigintrin.h: Ditto.
227 * config/i386/waitpkgintrin.h: Ditto.
228 * config/i386/immintrin.h: Add includes for sgxintrin.h,
229 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
230 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
231 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
232 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
233 waitpkgintrin.h and cldemoteintrin.h.
234
235 2018-06-04 Richard Biener <rguenther@suse.de>
236
237 PR tree-optimization/86038
238 * tracer.c (find_best_successor): Check probability for
239 being initialized, bail out if not.
240
241 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
242
243 PR target/86003
244 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
245 of bits to ignore when comparing architectures.
246
247 2018-06-04 Jakub Jelinek <jakub@redhat.com>
248
249 PR tree-optimization/69615
250 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
251 maximum or minimum of the type, try to merge it also as if
252 range1 is + [-, x - 1] or + [x + 1, -].
253
254 PR c++/86025
255 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
256
257 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
258
259 PR tree-optimization/86034
260 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
261 the unsigned bitfield type in a bit insertion sequence if it does not
262 have a larger precision than the bitfield size.
263 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
264
265 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
266
267 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
268
269 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
270
271 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
272 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
273 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
274 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
275
276 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
277
278 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
279 Disable -fdelete-null-pointer-checks for ELF toolchain.
280
281 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
282 Kito Cheng <kito.cheng@gmail.com>
283
284 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
285 (nds32le-*-*, nds32be-*-*): Integrate checking process.
286 (nds32*-*-*): Add glibc and uclibc conditions.
287 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
288 (TARGET_EXCEPT_UNWIND_INFO): Define.
289 * config/nds32/elf.h: New file.
290 * config/nds32/linux.h: New file.
291 * config/nds32/nds32-elf.opt: New file.
292 * config/nds32/nds32-linux.opt: New file.
293 * config/nds32/nds32-fp-as-gp.c
294 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
295 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
296 TARGET_LINUX_ABI.
297 (nds32_asm_file_end): Ditto.
298 (nds32_print_operand): Ditto.
299 (nds32_insert_attributes): Ditto.
300 (nds32_init_libfuncs): New function.
301 (TARGET_HAVE_TLS): Define.
302 (TARGET_INIT_LIBFUNCS): Define.
303 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
304 spec content.
305 (TARGET_ELF): Apply different mcmodel setting.
306 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
307 been migrated into elf.h and linux.h files.
308 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
309 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
310 (mcmodel): The content has been migrated into nds32-elf.opt and
311 nds32-linux.opt files.
312 * config/nds32/t-elf: New file.
313 * config/nds32/t-linux: New file.
314
315 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
316 Shiva Chen <shiva0217@gmail.com>
317
318 * config/nds32/constants.md (unspec_volatile_element): Add
319 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
320 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
321 optimization.
322 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
323 (make_pass_nds32_fp_as_gp): Declare.
324 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
325 optmization pass.
326 (nds32_asm_function_end_prologue): Remove unused asm output.
327 (nds32_asm_function_begin_epilogue): Remove unused asm output.
328 (nds32_asm_file_start): Output necessary fp_as_gp information.
329 (nds32_option_override): Adjust register usage.
330 (nds32_expand_prologue): Consider fp_as_gp situation.
331 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
332 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
333 (epilogue): Ditto.
334 (return): Ditto.
335 (simple_return): Ditto.
336 (omit_fp_begin): Output special directive for fp_as_gp.
337 (omit_fp_end): Output special directive for fp_as_gp.
338 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
339 mforbid-fp-as-gp): New options.
340
341 2018-06-01 Mark Wielaard <mark@klomp.org>
342
343 * dwarf2out.c (dwarf2out_finish): Remove generation of
344 DW_AT_loclists_base.
345
346 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
347
348 * gimple-ssa-store-merging.c: Include gimple-fold.h.
349 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
350 (struct merged_store_group): Add bit_insertion field.
351 (dump_char_array): Use standard hexadecimal format.
352 (merged_store_group::merged_store_group): Set bit_insertion to false.
353 (merged_store_group::apply_stores): Use optimal buffer size. Deal
354 with BIT_INSERT_EXPR stores. Move up code updating the mask and
355 also print the mask in the dump file.
356 (pass_store_merging::gate): Minor tweak.
357 (imm_store_chain_info::coalesce_immediate): Fix wrong association
358 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
359 stores with INTEGER_CST stores.
360 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
361 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
362 and use it throughout. Generate bit insertion sequences if need be.
363 (pass_store_merging::process_store): Remove redundant condition.
364 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
365
366 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
367
368 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
369 the 128-bit floating point types. Fix function comment.
370
371 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
372
373 * config/aarch64/aarch64-simd.md
374 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
375 mnemonics.
376 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
377 mnemonics.
378
379 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
380
381 PR tree-optimization/85989
382 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
383 variable.
384 (backprop::intersect_uses): Check it when deciding whether this
385 is a backedge reference.
386 (backprop::process_block): Add each phi to m_visited_phis
387 after visiting it, then clear it at the end.
388
389 2018-06-01 Richard Biener <rguenther@suse.de>
390
391 * tree-vectorizer.h (vect_dr_stmt): New function.
392 (vect_get_load_cost): Adjust.
393 (vect_get_store_cost): Likewise.
394 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
395 Use vect_dr_stmt instead of DR_SMTT.
396 (vect_record_base_alignments): Likewise.
397 (vect_calculate_target_alignment): Likewise.
398 (vect_compute_data_ref_alignment): Likewise and make static.
399 (vect_update_misalignment_for_peel): Likewise.
400 (vect_verify_datarefs_alignment): Likewise.
401 (vector_alignment_reachable_p): Likewise.
402 (vect_get_data_access_cost): Likewise. Pass down
403 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
404 (vect_get_peeling_costs_all_drs): Likewise.
405 (vect_peeling_hash_get_lowest_cost): Likewise.
406 (vect_enhance_data_refs_alignment): Likewise.
407 (vect_find_same_alignment_drs): Likewise.
408 (vect_analyze_data_refs_alignment): Likewise.
409 (vect_analyze_group_access_1): Likewise.
410 (vect_analyze_group_access): Likewise.
411 (vect_analyze_data_ref_access): Likewise.
412 (vect_analyze_data_ref_accesses): Likewise.
413 (vect_vfa_segment_size): Likewise.
414 (vect_small_gap_p): Likewise.
415 (vectorizable_with_step_bound_p): Likewise.
416 (vect_prune_runtime_alias_test_list): Likewise.
417 (vect_analyze_data_refs): Likewise.
418 (vect_supportable_dr_alignment): Likewise.
419 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
420 (vect_gen_prolog_loop_niters): Likewise.
421 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
422 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
423 modify DR_STMT.
424 (vect_recog_mask_conversion_pattern): Likewise.
425 (vect_try_gather_scatter_pattern): Likewise.
426 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
427 to vect_get_store_cost.
428 (vect_get_store_cost): Get stmt_info instead of DR.
429 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
430 (vect_get_load_cost): Get stmt_info instead of DR.
431
432 2018-06-01 Richard Biener <rguenther@suse.de>
433
434 PR middle-end/86017
435 * gimple-fold.c (var_decl_component_p): Also allow offsetted
436 vars wrapped in MEM_REFs.
437
438 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
439
440 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
441 Fix subreg tests so that we only return a choice between
442 GENERAL_REGS and FP_REGS if the original classes included both.
443
444 2018-06-01 Richard Biener <rguenther@suse.de>
445
446 PR ipa/85960
447 * tree-ssa-structalias.c (get_function_part_constraint):
448 Handle NULL fi->decl.
449 (find_func_aliases_for_call): Properly handle indirect
450 fi from direct call.
451 (find_func_clobbers): Likewise.
452 (ipa_pta_execute): Likewise.
453 (create_variable_info_for): For functions that are ifunc_resolver
454 resolve to a varinfo that contains the result of the resolver call.
455 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
456 aliases.
457
458 2018-05-31 Michael Collison <michael.collison@arm.com>
459
460 * config/aarch64/aarch64.md:
461 (*fix_to_zero_extenddfdi2): New pattern.
462 * gcc.target/aarch64/fix_extend1.c: New testcase.
463
464 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
465
466 PR middle-end/78809
467 PR middle-end/83026
468 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
469 and BUILT_IN_STRNCMP_EQ.
470 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
471 BUILT_IN_STRNCMP_EQ.
472 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
473 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
474 (gimple_fold_builtin): Likewise.
475 * tree-ssa-strlen.c (compute_string_length): New function.
476 (determine_min_obsize): New function.
477 (handle_builtin_string_cmp): New function to handle calls to
478 string compare functions.
479 (strlen_optimize_stmt): Add handling to builtin string compare
480 calls.
481 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
482 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
483 * tree.c (build_common_builtin_nodes): Add new defines of
484 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
485
486 2018-05-31 Jakub Jelinek <jakub@redhat.com>
487
488 PR target/85984
489 * bb-reorder.c (pass_partition_blocks::gate): Return false for
490 functions with naked attribute.
491
492 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
493
494 * config/i386/sse.md (avx_vec_concat<mode>):
495 Substitute concat_tg_mode mode attribute with xtg_mode.
496 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
497 (concat_tg_mode): Remove mode attribute.
498
499 2018-05-31 Martin Sebor <msebor@redhat.com>
500
501 PR c/82063
502 * calls.c (alloc_max_size): Correct a logic error/typo.
503 Treat excessive arguments as infinite. Warn for invalid arguments.
504 * doc/invoke.texi (-Walloc-size-larger-than): Update.
505
506 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
507
508 PR target/85829
509 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
510 and movx for Haswell.
511
512 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
513 Cesar Philippidis <cesar@codesourcery.com>
514
515 PR middle-end/85879
516 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
517 when emitting error on private/firstprivate reductions.
518 * omp-low.c (lower_omp_target): Avoid reference-type processing
519 on pointers for firstprivate clause.
520
521 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
522
523 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
524 (st1x2): Likewise.
525 (st1x3): Likewise.
526 * config/aarch64/aarch64-simd.md
527 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
528 (aarch64_ld1_x3_<mode>): Likewise
529 (aarch64_st1x2<VALLDIF:mode>): Likewise
530 (aarch64_st1_x2_<mode>): Likewise
531 (aarch64_st1x3<VALLDIF:mode>): Likewise
532 (aarch64_st1_x3_<mode>): Likewise
533 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
534 (vld1_s8_x3): Likewise.
535 (vld1_u16_x3): Likewise.
536 (vld1_s16_x3): Likewise.
537 (vld1_u32_x3): Likewise.
538 (vld1_s32_x3): Likewise.
539 (vld1_u64_x3): Likewise.
540 (vld1_s64_x3): Likewise.
541 (vld1_f16_x3): Likewise.
542 (vld1_f32_x3): Likewise.
543 (vld1_f64_x3): Likewise.
544 (vld1_p8_x3): Likewise.
545 (vld1_p16_x3): Likewise.
546 (vld1_p64_x3): Likewise.
547 (vld1q_u8_x3): Likewise.
548 (vld1q_s8_x3): Likewise.
549 (vld1q_u16_x3): Likewise.
550 (vld1q_s16_x3): Likewise.
551 (vld1q_u32_x3): Likewise.
552 (vld1q_s32_x3): Likewise.
553 (vld1q_u64_x3): Likewise.
554 (vld1q_s64_x3): Likewise.
555 (vld1q_f16_x3): Likewise.
556 (vld1q_f32_x3): Likewise.
557 (vld1q_f64_x3): Likewise.
558 (vld1q_p8_x3): Likewise.
559 (vld1q_p16_x3): Likewise.
560 (vld1q_p64_x3): Likewise.
561 (vst1_s64_x2): Likewise.
562 (vst1_u64_x2): Likewise.
563 (vst1_f64_x2): Likewise.
564 (vst1_s8_x2): Likewise.
565 (vst1_p8_x2): Likewise.
566 (vst1_s16_x2): Likewise.
567 (vst1_p16_x2): Likewise.
568 (vst1_s32_x2): Likewise.
569 (vst1_u8_x2): Likewise.
570 (vst1_u16_x2): Likewise.
571 (vst1_u32_x2): Likewise.
572 (vst1_f16_x2): Likewise.
573 (vst1_f32_x2): Likewise.
574 (vst1_p64_x2): Likewise.
575 (vst1q_s8_x2): Likewise.
576 (vst1q_p8_x2): Likewise.
577 (vst1q_s16_x2): Likewise.
578 (vst1q_p16_x2): Likewise.
579 (vst1q_s32_x2): Likewise.
580 (vst1q_s64_x2): Likewise.
581 (vst1q_u8_x2): Likewise.
582 (vst1q_u16_x2): Likewise.
583 (vst1q_u32_x2): Likewise.
584 (vst1q_u64_x2): Likewise.
585 (vst1q_f16_x2): Likewise.
586 (vst1q_f32_x2): Likewise.
587 (vst1q_f64_x2): Likewise.
588 (vst1q_p64_x2): Likewise.
589 (vst1_s64_x3): Likewise.
590 (vst1_u64_x3): Likewise.
591 (vst1_f64_x3): Likewise.
592 (vst1_s8_x3): Likewise.
593 (vst1_p8_x3): Likewise.
594 (vst1_s16_x3): Likewise.
595 (vst1_p16_x3): Likewise.
596 (vst1_s32_x3): Likewise.
597 (vst1_u8_x3): Likewise.
598 (vst1_u16_x3): Likewise.
599 (vst1_u32_x3): Likewise.
600 (vst1_f16_x3): Likewise.
601 (vst1_f32_x3): Likewise.
602 (vst1_p64_x3): Likewise.
603 (vst1q_s8_x3): Likewise.
604 (vst1q_p8_x3): Likewise.
605 (vst1q_s16_x3): Likewise.
606 (vst1q_p16_x3): Likewise.
607 (vst1q_s32_x3): Likewise.
608 (vst1q_s64_x3): Likewise.
609 (vst1q_u8_x3): Likewise.
610 (vst1q_u16_x3): Likewise.
611 (vst1q_u32_x3): Likewise.
612 (vst1q_u64_x3): Likewise.
613 (vst1q_f16_x3): Likewise.
614 (vst1q_f32_x3): Likewise.
615 (vst1q_f64_x3): Likewise.
616 (vst1q_p64_x3): Likewise.
617
618 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
619
620 * config/msp430/msp430.c (msp430_output_labelref): Prepend
621 user_label_prefix to name.
622
623 * tree-core.h: Update comment about the format of NAME string
624 passed to handler in attribute_spec.
625
626 * config/msp430/msp430.md: Remove erroneous subreg expression from
627 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
628 zero_extend{q,h}isi2.
629
630 2018-05-30 Borislav Petkov <bp@suse.de>
631
632 * doc/extend.texi: Document some architecture specific
633 constraints and sort entries.
634
635 2018-05-30 Martin Sebor <msebor@redhat.com>
636
637 PR middle-end/85369
638 * builtins.c (expand_builtin_stpcpy_1): New function.
639 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
640 only if the former succeeds.
641
642 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
643
644 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
645 in saphira.
646
647 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
648
649 * doc/invoke.texi (-flinker-output): Document
650
651 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
652
653 * passes.c (ipa_write_summaries): Only modify statements if body
654 is in memory.
655 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
656 incrementally linking.
657 (ipa_passes): Likewise.
658 * lto-cgraph.c (lto_output_node): When incrementally linking do not
659 pass down resolution info.
660 * common.opt (flag_incremental_link): Update info.
661 * gcc.c (plugin specs): Turn flinker-output=* to
662 -plugin-opt=-linker-output-known
663 * toplev.c (compile_file): Also cut compilation when doing incremental
664 link.
665 * flag-types. (enum lto_partition_model): Add
666 LTO_LINKER_OUTPUT_NOLTOREL.
667 (invoke.texi): Add -flinker-output docs.
668 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
669 link same way as WPA; do not stream in dead initializers.
670
671 * dwarf2out.c (dwarf2out_die_ref_for_decl,
672 darf2out_register_external_decl): Support incremental link.
673
674 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
675
676 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
677
678 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
679
680 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
681 it down to simple_object_copy_lto_debug_sections.
682 (run_gcc): Determine incremental LTO link time and configure
683 lto1 into non-wpa mode, disable renaming of debug sections.
684
685 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
686
687 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
688 descriptions of various incorrectly documented functions.
689
690 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
691
692 Revert:
693 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
694 address check not strict.
695
696 2018-05-30 Richard Biener <rguenther@suse.de>
697
698 PR tree-optimization/85964
699 * tracer.c (better_p): Drop initialized count check, we only
700 call the function with initialized counts now.
701 (find_best_successor): Do find a best edge if one
702 has uninitialized count.
703 (find_best_predecessor): Likewise. Do BB frequency check only
704 if count is initialized.
705
706 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
707
708 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
709 (aarch64_ldrstr_offset_compare): New.
710 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
711 load/store orderings.
712 (aarch64_gen_adjusted_ldpstp): Likewise.
713
714 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
715
716 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
717 Check for subset of GENERAL_REGS and FP_REGS.
718 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
719 r=w alternative.
720
721 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
722
723 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
724 and wi::to_poly_offset. Add the current offset and then check
725 whether the sum fits, rather than using an unchecked addition of
726 a checked term. Check for a shwi rather than a uhwi.
727 * expr.c (get_bit_range): Use tree_to_poly_uint64.
728 (store_constructor): Use poly_int_tree_p.
729 (expand_expr_real_1): Likewise.
730 * function.c (assign_temp): Likewise.
731 * fold-const.c (const_binop): Use poly_int_tree_p and
732 wi::to_poly_offset.
733 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
734 division.
735 * ipa-icf-gimple.c (func_checker::compare_operand): Use
736 to_poly_offset for MEM offsets.
737 * ipa-icf.c (sem_variable::equals): Likewise.
738 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
739 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
740 wi::to_poly_offset for BIT_FIELD_REF offsets.
741 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
742 wi::to_poly_offset.
743 * var-tracking.c (emit_note_insn_var_location): Use
744 tree_to_poly_uint64.
745
746 2018-05-29 Jim Wilson <jimw@sifive.com>
747
748 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
749
750 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
751
752 PR target/85950
753 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
754 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
755 sequence.
756 (sse4_1_round<mode>2): Use nonimmediate_operand
757 for operand 1 predicate.
758
759 2018-05-29 Martin Sebor <msebor@redhat.com>
760 Richard Biener <rguenther@suse.de>
761
762 PR testsuite/85888
763 * calls.c (get_size_range): Call determine_value_range instead
764 of get_value_range..
765 * tree-vrp.h (determine_value_range): Declared new function.
766 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
767
768 2018-05-29 Richard Biener <rguenther@suse.de>
769
770 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
771 sure to use non-pattern stmts for get_earlier_stmt arguments.
772 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
773 called on pattern stmts.
774 (get_later_stmt): Likewise.
775
776 2018-05-29 Martin Liska <mliska@suse.cz>
777
778 PR gcov-profile/85759
779 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
780 env variables.
781
782 2018-05-29 Jakub Jelinek <jakub@redhat.com>
783
784 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
785 VEC_UNPACK_*_EXPR.
786 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
787 VEC_PACK_*_EXPR.
788
789 PR target/85918
790 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
791 VEC_PACK_FLOAT_EXPR): New tree codes.
792 * tree-pretty-print.c (op_code_prio): Handle
793 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
794 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
795 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
796 * tree-inline.c (estimate_operator_cost): Likewise.
797 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
798 * fold-const.c (const_binop): Likewise.
799 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
800 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
801 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
802 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
803 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
804 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
805 * expr.c (expand_expr_real_2): Likewise.
806 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
807 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
808 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
809 optabs.
810 * optabs.c (expand_widen_pattern_expr): For
811 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
812 sign from result type rather than operand's type.
813 (expand_binop_directly): For vec_packu_float_optab and
814 vec_packs_float_optab allow result type to be different from operand's
815 type.
816 * optabs-tree.c (optab_for_tree_code): Handle
817 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
818 VEC_PACK_FLOAT_EXPR. Formatting fixes.
819 * tree-vect-generic.c (expand_vector_operations_1): Handle
820 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
821 VEC_PACK_FLOAT_EXPR.
822 * tree-vect-stmts.c (supportable_widening_operation): Handle
823 FIX_TRUNC_EXPR.
824 (supportable_narrowing_operation): Handle FLOAT_EXPR.
825 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
826 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
827 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
828 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
829 mode attributes.
830 (vec_pack<floatprefix>_float_<mode>): New expander.
831 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
832 attributes.
833 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
834 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
835 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
836 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
837 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
838 Document.
839 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
840 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
841 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
842 VEC_PACK_FLOAT_EXPR): Document.
843
844 2018-05-29 Richard Biener <rguenther@suse.de>
845
846 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
847 member.
848 (stmt_vec_info_vec): Make pointer.
849 (init_stmt_vec_info_vec): Remove.
850 (free_stmt_vec_info_vec): Likewise.
851 (set_stmt_vec_info_vec): New function.
852 (free_stmt_vec_infos): Likewise.
853 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
854 (set_vinfo_for_stmt): Likewise.
855 (get_earlier_stmt): Likewise.
856 (get_later_stmt): Likewise.
857 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
858 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
859 (vec_info::~vec_info): Free stmt_vec_infos.
860 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
861 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
862 (pass_slp_vectorize::execute): Likewise.
863 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
864 (free_stmt_vec_info_vec): Likewise.
865 (set_stmt_vec_info_vec): New function.
866 (free_stmt_vec_infos): Likewise.
867 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
868 the global stmt_vec_info_vec.
869 * tree-parloops.c (gather_scalar_reductions): Use
870 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
871 vector.
872
873 2018-05-29 Richard Biener <rguenther@suse.de>
874
875 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
876
877 2018-05-29 Martin Liska <mliska@suse.cz>
878 David Malcolm <dmalcolm@redhat.com>
879
880 * vec.c (test_reverse): New.
881 (vec_c_tests): Add new test.
882 * vec.h (vl_ptr>::reverse): New function.
883
884 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
885
886 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
887
888 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
889 and later.
890
891 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
892
893 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
894
895 2018-05-28 Richard Biener <rguenther@suse.de>
896
897 PR tree-optimization/85933
898 * tree-vect-data-refs.c (vect_record_base_alignments): Only
899 look at stmts marked as vectorizable.
900
901 2018-05-28 Richard Biener <rguenther@suse.de>
902
903 PR tree-optimization/85934
904 * tree-vect-generic.c (expand_vector_operations_1): Hoist
905 vector boolean check before scalar optimization.
906
907 2018-05-28 Jakub Jelinek <jakub@redhat.com>
908
909 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
910 for armv5te.
911
912 2018-05-28 Mark Wielaard <mark@klomp.org>
913
914 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
915 if it is an expression containing a minus sign.
916
917 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
918
919 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
920
921 2018-05-27 Paul Koning <ni1d@arrl.net>
922
923 * config/pdp11/pdp11.md (truncsihi2): Remove.
924
925 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
926 Chung-Ju Wu <jasonwucj@gmail.com>
927
928 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
929 implementation.
930 (unaligned_store_dw): Ditto.
931 * config/nds32/nds32-memory-manipulation.c
932 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
933 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
934 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
935 (emit_setmem_word_loop): Rename to ...
936 (emit_setmem_doubleword_loop): ... this.
937 (nds32_gen_dup_4_byte_to_word_value): New function.
938 (nds32_gen_dup_8_byte_to_double_word_value): New function.
939 (nds32_expand_setmem_loop): Refine implementation.
940 (nds32_expand_setmem_loop_v3m): Ditto.
941 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
942 pattern.
943
944 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
945
946 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
947
948 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
949
950 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
951 (nds32_init_machine_status): Initialize machine->attr_naked_p and
952 machine->attr_no_prologue_p.
953 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
954 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
955 (nds32_expand_epilogue): Consider attr_naked_p.
956 (nds32_expand_epilogue_v3pop): Likewise.
957 (nds32_can_use_return_insn): Likewise.
958 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
959 attr_no_prologue_p fields.
960 * config/nds32/nds32.opt (mret-in-naked-func): New option.
961
962 2018-05-27 Jakub Jelinek <jakub@redhat.com>
963
964 PR target/85918
965 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
966 attributes.
967 * config/i386/sse.md
968 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
969 Rename to ...
970 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
971 ... this.
972 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
973 Rename to ...
974 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
975 ... this.
976 (*<floatsuffix>floatv2div2sf2): Rename to ...
977 (*float<floatunssuffix>v2div2sf2): ... this.
978 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
979 (float<floatunssuffix>v2div2sf2_mask): ... this.
980 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
981 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
982 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
983 to ...
984 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
985 ... this.
986 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
987 Rename to ...
988 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
989 ... this.
990 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
991 Rename to ...
992 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
993 ... this.
994 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
995 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
996 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
997 gen_ufix_truncv8dfv8si2.
998 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
999 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
1000 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
1001 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
1002 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
1003 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
1004 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
1005 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
1006
1007 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 PR target/85900
1010 PR target/85345
1011 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
1012
1013 2018-05-25 Jim Wilson <jimw@sifive.com>
1014
1015 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
1016 * config/riscv/riscv.c (struct machine_function): Add
1017 interrupt_handler_p and attribute_checked_p fields.
1018 (riscv_attribute_table): Add interrupt.
1019 (riscv_interrupt_type_p): New.
1020 (riscv_save_reg_p): Save extra regs for interrupt handler.
1021 (riscv_use_save_libcall): Return false for interrupt handler.
1022 (riscv_first_stack_step): Add forward declaration.
1023 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
1024 for interrupt handler with large frame. Use it for saved reg list.
1025 (riscv_expand_prologue): Move flag_stack_usage_info support to
1026 eliminate duplication.
1027 (riscv_expand_epilogue): Generate mret for interrupt handler.
1028 (riscv_epilogue_uses): New.
1029 (riscv_can_use_return_insn): Return false for interrupt handler.
1030 (riscv_function_ok_for_sibcall): Likewise.
1031 (riscv_set_current_function): Add interrupt handler support.
1032 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
1033 * config/riscv/riscv.md (UNSPECV_MRET): New.
1034 (GP_REGNUM): New.
1035 (riscv_frflags, riscv_fsflags): Use tab after opcode.
1036 (riscv_mret): New.
1037 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
1038
1039 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
1040
1041 PR tree-optimization/85712
1042 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
1043 this candidate has already been replaced in-situ by a copy.
1044
1045 2018-05-25 Jason Merrill <jason@redhat.com>
1046
1047 PR c++/80485 - inline function non-zero address.
1048 * symtab.c (nonzero_address): Check DECL_COMDAT.
1049
1050 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
1051
1052 PR target/83628
1053 * config/alpha/alpha.md (ashlsi3): New insn pattern.
1054 (*ashlsi_se): Rename from *ashldi_se. Define as sign
1055 extension of SImode operation. Use const123_operand predicate.
1056 (*saddsi_1): Remove.
1057 (*saddl_se_1): Ditto.
1058 (*ssubsi_1): Ditto.
1059 (*ssubl_se_1): Ditto.
1060 * config/alpha/predicates.md (const123_operand): New predicate.
1061 * config/alpha/constraints.md (P): Use IN_RANGE.
1062
1063 2018-05-25 Richard Biener <rguenther@suse.de>
1064
1065 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
1066 defaulted to true.
1067 (ref_maybe_used_by_stmt_p): Likewise.
1068 (stmt_may_clobber_ref_p): Likewise.
1069 (stmt_may_clobber_ref_p_1): Likewise.
1070 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
1071 and pass it along.
1072 (ref_maybe_used_by_stmt_p): Likewise.
1073 (stmt_may_clobber_ref_p): Likewise.
1074 (stmt_may_clobber_ref_p_1): Likewise.
1075 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
1076 the alias oracle to disambiguate DRs with stmts DR analysis
1077 couldn't handle.
1078 (vect_analyze_data_refs): Do not give up on not analyzable
1079 DRs for BB vectorization. Remove code truncating the dataref
1080 vector.
1081
1082 2018-05-25 Jakub Jelinek <jakub@redhat.com>
1083
1084 PR target/85832
1085 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
1086 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
1087 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
1088
1089 2018-05-25 Richard Biener <rguenther@suse.de>
1090
1091 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
1092 function, combining stmt data ref gathering and fatal analysis
1093 parts.
1094 (vect_analyze_data_refs): Remove now redudnant code and simplify.
1095 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
1096 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
1097 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
1098 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
1099
1100 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1101
1102 PR tree-optimization/85720
1103 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
1104 SCC if all partitions are builtins.
1105 (version_loop_by_alias_check): New parameter. Generate cancelable
1106 runtime alias check if all partitions are builtins.
1107 (distribute_loop): Update call to above function.
1108
1109 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1110
1111 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
1112 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
1113 (parm_default_def_partition_arg): Ditto.
1114 (set_parm_default_def_partition): Ditto.
1115 (get_parm_default_def_partitions): Ditto and make it static.
1116 (get_undefined_value_partitions): Ditto and make it static.
1117 (remove_ssa_form): Refactor call to init_var_map here.
1118 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
1119 computation for loop region.
1120 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
1121 (register_default_def): Delete.
1122 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
1123 (parm_default_def_partition_arg): Ditto.
1124 (set_parm_default_def_partition): Ditto.
1125 (get_parm_default_def_partitions): Ditto and make it static.
1126 (get_undefined_value_partitions): Ditto and make it static.
1127 (coalesce_with_default, coalesce_with_default): Update comment.
1128 (create_coalesce_list_for_region): New func factored out from
1129 create_outofssa_var_map.
1130 (populate_coalesce_list_for_outofssa): New func factored out from
1131 create_outofssa_var_map and coalesce_ssa_name.
1132 (create_outofssa_var_map): Delete.
1133 (coalesce_ssa_name): Refactor to support live range computation.
1134 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
1135 (get_parm_default_def_partitions): Delete.
1136 (get_undefined_value_partitions): Ditto.
1137 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
1138 computation for loop region.
1139 (new_tree_live_info, loe_visit_block): Ditto.
1140 (live_worklist, set_var_live_on_entry): Ditto.
1141 (calculate_live_on_exit, verify_live_on_entry): Ditto.
1142 * tree-ssa-live.h (struct _var_map): New fields.
1143 (init_var_map): Change decl.
1144 (region_contains_p): New.
1145
1146 2018-05-25 Bin Cheng <bin.cheng@arm.com>
1147
1148 * tree-ssa-live.h (live_merge_and_clear): Delete.
1149
1150 2018-05-25 Richard Biener <rguenther@suse.de>
1151
1152 PR c++/85912
1153 * tree-dump.c (dequeue_and_dump): Remove access to removed
1154 operand 2 of a SWITCH_EXPR.
1155
1156 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1157
1158 * doc/sourcebuild.texi (vect_double_cond_arith): Include
1159 multiplication and division.
1160 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
1161 (cond_udiv@var{m}, cond_umod@var{m}): Document.
1162 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
1163 (cond_udiv_optab, cond_umod_optab): New optabs.
1164 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
1165 (IFN_COND_RDIV): New internal functions.
1166 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
1167 TRUNC_MOD_EXPR and RDIV_EXPR.
1168 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
1169 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
1170 New unspecs.
1171 (SVE_INT_BINARY): Include mult.
1172 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
1173 (optab, sve_int_op): Handle mult.
1174 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
1175 UNSPEC_COND_DIV.
1176 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
1177 for SVE_INT_BINARY_SD.
1178
1179 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1180
1181 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
1182 (optab, sve_int_op): Handle div and udiv.
1183 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
1184 for SVE_INT_BINARY_SD.
1185 (*<optab><mode>3): New insn for the same.
1186
1187 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1188
1189 * tree-vect-patterns.c: Include predict.h.
1190 (vect_recog_divmod_pattern): Restrict check for division support
1191 to when optimizing for size.
1192
1193 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1194
1195 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
1196 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
1197 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
1198 (gimple_match_op::set_op): Likewise.
1199 (gimple_resimplify4): Declare.
1200 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
1201 (expr::gen_transform): Likewise.
1202 (decision_tree::gen): Generate a simplification routine for 4 operands.
1203 * gimple-match-head.c (gimple_simplify): Add an overload for
1204 4 operands. In the top-level function, handle up to 4 call
1205 arguments and call gimple_resimplify4.
1206 (gimple_resimplify4): New function.
1207 (build_call_internal): Pass a fourth operand.
1208 (maybe_push_to_seq): Likewise.
1209 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
1210 Fold VEC_COND_EXPRs of an operation and a default value into
1211 an IFN_COND_* function if possible.
1212 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
1213 New unspecs.
1214 (SVE_COND_FP_BINARY): Include them.
1215 (optab, sve_fp_op): Handle them.
1216 (SVE_INT_BINARY_REV): New code iterator.
1217 (SVE_COND_FP_BINARY_REV): New int iterator.
1218 (commutative): New int attribute.
1219 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
1220 Declare.
1221 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
1222 function.
1223 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
1224 (*cond_<optab><mode>): New patterns for reversed operands.
1225
1226 2018-05-25 Richard Biener <rguenther@suse.de>
1227
1228 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
1229 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
1230 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
1231 (STMT_VINFO_GROUPED_ACCESS): Adjust.
1232 * tree-vect-data-refs.c (everywhere): Adjust users.
1233 * tree-vect-loop.c (everywhere): Likewise.
1234 * tree-vect-slp.c (everywhere): Likewise.
1235 * tree-vect-stmts.c (everywhere): Likewise.
1236 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1237
1238 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1239
1240 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
1241 Rename to...
1242 (gcc_cv_as_section_exclude): ... this.
1243 Try Solaris as #exclude syntax.
1244 * configure: Regenerate.
1245 * config.in: Regenerate.
1246 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
1247 SECTION_EXCLUDE.
1248 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
1249 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
1250
1251 * varasm.c (default_elf_asm_named_section): Don't check if
1252 HAVE_GAS_SECTION_EXCLUDE is defined.
1253
1254 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1255
1256 * doc/md.texi: Update the documentation of the cond_* optabs
1257 to mention the new final operand. Fix GET_MODE_NUNITS call.
1258 Describe the scalar case too.
1259 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
1260 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
1261 instead of 2.
1262 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
1263 (get_conditional_internal_fn): Update comment.
1264 * tree-vect-loop.c (vectorizable_reduction): Pass the original
1265 accumulator value as a final argument to conditional functions.
1266 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
1267 a define_expand and add an "else" operand. Assert for now that
1268 the else operand is equal to operand 2. Use SVE_INT_BINARY and
1269 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
1270 (*cond_<optab><mode>): New patterns.
1271 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
1272 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
1273 (UNSPEC_COND_EOR): Delete.
1274 (optab): Remove associated mappings.
1275 (SVE_INT_BINARY): New code iterator.
1276 (sve_int_op): Remove int attribute and add "minus" to the code
1277 attribute.
1278 (SVE_COND_INT_OP): Delete.
1279 (SVE_COND_FP_OP): Rename to...
1280 (SVE_COND_FP_BINARY): ...this.
1281
1282 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
1283
1284 * optabs.c (can_reuse_operands_p): New function.
1285 (maybe_legitimize_operands): Try to reuse the results for
1286 earlier operands.
1287
1288 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
1289
1290 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
1291 Add {q} suffix to insn mnemonic.
1292
1293 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1294
1295 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
1296 (msp430_warn_func_return): New.
1297
1298 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
1299
1300 * fold-const.c (tree_nonzero_bits): New function.
1301 * fold-const.h (tree_nonzero_bits): Likewise.
1302 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
1303 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
1304
1305 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 PR target/85900
1308 PR target/85345
1309 * varasm.c (assemble_alias): Check ifunc_resolver only on
1310 FUNCTION_DECL.
1311
1312 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
1313
1314 PR target/85903
1315 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
1316 when memory input operand is handled.
1317
1318 2018-05-24 Luis Machado <luis.machado@linaro.org>
1319
1320 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
1321 global.
1322 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
1323
1324 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
1325
1326 * match.pd: Delay FMA folds until after vectorization.
1327
1328 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
1329
1330 PR target/83009
1331 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1332 address check not strict.
1333
1334 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
1335
1336 * gimple-match.h (gimple_match_op): New class.
1337 (mprts_hook): Replace parameters with a gimple_match_op *.
1338 (maybe_build_generic_op): Likewise.
1339 (gimple_simplified_result_is_gimple_val): Replace parameters with
1340 a const gimple_match_op *.
1341 (gimple_simplify): Replace code_helper * and tree * parameters with
1342 a gimple_match_op * parameter.
1343 (gimple_resimplify1): Replace code_helper *, tree and tree *
1344 parameters with a gimple_match_op * parameter.
1345 (gimple_resimplify2): Likewise.
1346 (gimple_resimplify3): Likewise.
1347 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
1348 parameters with a gimple_match_op * parameter.
1349 * gimple-match-head.c (gimple_simplify): Change prototypes of
1350 auto-generated functions to take a gimple_match_op * instead of
1351 separate code_helper * and tree * parameters. Make the same
1352 change in the top-level overload and update calls to the
1353 gimple_resimplify routines. Update calls to the auto-generated
1354 functions and to maybe_push_res_to_seq in the publicly-facing
1355 operation-specific gimple_simplify overloads.
1356 (gimple_match_op::MAX_NUM_OPS): Define.
1357 (gimple_resimplify1): Replace rcode and ops with a single res_op
1358 parameter. Update call to gimple_simplify.
1359 (gimple_resimplify2): Likewise.
1360 (gimple_resimplify3): Likewise.
1361 (mprts_hook): Replace parameters with a gimple_match_op *.
1362 (maybe_build_generic_op): Likewise.
1363 (build_call_internal): Replace type, nargs and ops with
1364 a gimple_match_op *.
1365 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
1366 with a single gimple_match_op *. Update calls to mprts_hook,
1367 build_call_internal and gimple_simplified_result_is_gimple_val.
1368 Factor out code that is common to the tree_code and combined_fn cases.
1369 * genmatch.c (expr::gen_transform): Replace tem_code and
1370 tem_ops with a gimple_match_op called tem_op. Update calls
1371 to the gimple_resimplify functions and maybe_push_res_to_seq.
1372 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
1373 res_ops. Update call to the gimple_resimplify functions.
1374 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
1375 (decision_tree::gen): Make the functions take a gimple_match_op *
1376 called res_op instead of separate res_code and res_ops parameters.
1377 Update call accordingly.
1378 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
1379 and ops with a single res_op parameter. Update calls to
1380 maybe_build_generic_op and maybe_push_res_to_seq.
1381 (fold_stmt_1): Update calls to gimple_simplify and
1382 replace_stmt_with_simplification.
1383 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
1384 and gimple_simplified_result_is_gimple_val.
1385 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
1386 gimple_simplify.
1387 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
1388 with a gimple_match_op *.
1389 (vn_nary_build_or_lookup): Likewise. Update call to
1390 vn_nary_build_or_lookup_1.
1391 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
1392 gimple_match_op *. Update calls to the gimple_resimplify routines
1393 and to gimple_simplified_result_is_gimple_val.
1394 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
1395 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
1396 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
1397 (visit_nary_op): Likewise.
1398 (visit_reference_op_load): Likewise.
1399
1400 2018-05-23 Luis Machado <luis.machado@linaro.org>
1401
1402 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
1403 modifier for printing the step amount.
1404
1405 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
1406
1407 PR target/78849
1408 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
1409 types.
1410
1411 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
1412
1413 * doc/sourcebuild.texi (Endianness): New subsubsection.
1414
1415 2018-05-23 Luis Machado <luis.machado@linaro.org>
1416
1417 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1418 <prefetch_dynamic_strides>: New const bool field.
1419 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1420 prefetch_dynamic_strides.
1421 (exynosm1_prefetch_tune): Likewise.
1422 (thunderxt88_prefetch_tune): Likewise.
1423 (thunderx_prefetch_tune): Likewise.
1424 (thunderx2t99_prefetch_tune): Likewise.
1425 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
1426 false.
1427 (aarch64_override_options_internal): Update to set
1428 PARAM_PREFETCH_DYNAMIC_STRIDES.
1429 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1430 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1431 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1432 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1433 prefetch-dynamic-strides setting.
1434
1435 2018-05-23 Luis Machado <luis.machado@linaro.org>
1436
1437 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1438 <minimum_stride>: New const int field.
1439 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1440 minimum_stride field defaulting to -1.
1441 (exynosm1_prefetch_tune): Likewise.
1442 (thunderxt88_prefetch_tune): Likewise.
1443 (thunderx_prefetch_tune): Likewise.
1444 (thunderx2t99_prefetch_tune): Likewise.
1445 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
1446 <default_opt_level>: Set to 3.
1447 (aarch64_override_options_internal): Update to set
1448 PARAM_PREFETCH_MINIMUM_STRIDE.
1449 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1450 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1451 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1452 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1453 stride is constant and is below the minimum stride threshold.
1454
1455 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1456
1457 * config/arm/arm-cpus.in (mode26): Delete.
1458 (armv4): Delete mode26 reference.
1459 * config/arm/arm.c (arm_configure_build_target): Delete use of
1460 isa_bit_mode26.
1461
1462 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
1463
1464 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
1465 New insn pattern.
1466 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
1467 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
1468 for non-SSE modes.
1469 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
1470 (floatunsdidf2): Ditto.
1471
1472 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
1473
1474 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
1475 (fixuns_trunc<mode>si2_avx512f): Ditto.
1476 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
1477 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
1478 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
1479
1480 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
1481
1482 PR rtl-optimization/79985
1483 * df-scan.c (df_insn_refs_collect): Remove special case for
1484 global registers and asm statements.
1485
1486 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
1487
1488 * extend.texi (Global Register Variables): Rewrite the bullet list.
1489 Note that the register is available for allocation. Note that access
1490 via inline asm must use constraints. Add note about async-signal
1491 handlers. Remove paragraph about automagic register selection.
1492
1493 2018-05-23 Richard Biener <rguenther@suse.de>
1494
1495 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
1496 of fixed offset from memset VN.
1497
1498 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
1499
1500 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
1501 first_interp field.
1502 (alloc_cand_and_find_basis): Initialize first_interp field.
1503 (slsr_process_mul): Modify first_interp field.
1504 (slsr_process_add): Likewise.
1505 (slsr_process_cast): Modify first_interp field for each new
1506 interpretation.
1507 (slsr_process_copy): Likewise.
1508 (dump_candidate): Dump first_interp field.
1509 (replace_mult_candidate): Process all interpretations, not just
1510 subsequent ones.
1511 (replace_rhs_if_not_dup): Likewise.
1512 (replace_one_candidate): Likewise.
1513
1514 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
1515
1516 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
1517 Add new boolean.
1518 (aarch64_needs_frame_chain): New function.
1519 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
1520
1521 2018-05-23 Sudakshina Das <sudi.das@arm.com>
1522
1523 PR target/84882
1524 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
1525 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
1526 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
1527 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
1528 as true for strict-align.
1529 (aarch64_can_inline_p): Perform checks even when callee has no
1530 attributes to check for strict alignment.
1531 * doc/extend.texi (AArch64 Function Attributes): Document
1532 no-strict-align.
1533 * doc/invoke.texi: (AArch64 Options): Likewise.
1534
1535 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
1536
1537 PR tree-optimization/85853
1538 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
1539 the handling of the root of the node to...
1540 (vect_slp_analyze_node_operations_1): ...this new function,
1541 and run the whole thing with the child nodes' def types
1542 set according to their SLP node's def type.
1543
1544 2018-05-23 Richard Biener <rguenther@suse.de>
1545
1546 PR middle-end/85874
1547 * tree-data-ref.c (create_runtime_alias_checks): Defer
1548 and ignore overflow warnings.
1549
1550 2018-05-23 Yury Gribov <tetra2005@gmail.com>
1551
1552 PR tree-optimization/85822
1553 * tree-vrp.c (is_masked_range_test): Fix handling of negative
1554 constants.
1555
1556 2018-05-23 Richard Biener <rguenther@suse.de>
1557
1558 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1559 memset constants via native_interpret_expr.
1560
1561 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 PR target/85345
1564 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
1565 attribute.
1566 (cgraph_node::create_alias): Likewise.
1567 (cgraph_node::get_availability): Check ifunc_resolver instead
1568 of looking up ifunc attribute.
1569 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1570 * varasm.c (do_assemble_alias): Likewise.
1571 (assemble_alias): Likewise.
1572 (default_binds_local_p_3): Likewise.
1573 * cgraph.h (cgraph_node): Add ifunc_resolver.
1574 (cgraph_node::only_called_directly_or_aliased_p): Return false
1575 for IFUNC resolver.
1576 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
1577 attribute.
1578 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
1579 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
1580 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
1581 instead of looking up ifunc attribute.
1582
1583 2018-05-22 Luis Machado <luis.machado@linaro.org>
1584
1585 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
1586
1587 2018-05-22 Martin Sebor <msebor@redhat.com>
1588
1589 PR middle-end/85359
1590 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
1591 only when expasion succeeds.
1592 (expand_builtin_strcmp): Same.
1593 (expand_builtin_strncmp): Same.
1594
1595 2018-05-22 Martin Sebor <msebor@redhat.com>
1596
1597 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
1598
1599 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
1600 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1601
1602 * config/aarch64/aarch64-ldpstp.md: Replace uses of
1603 aarch64_mem_pair_operand with memory_operand and delete operand swapping
1604 code.
1605 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1606 Add check for legitimate_address.
1607 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
1608 (aarch64_swap_ldrstr_operands): New.
1609 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
1610 Define prototype.
1611
1612 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
1613 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1614
1615 * config/aarch64/aarch64.md: New patterns to generate stp
1616 and ldp.
1617 (store_pair_sw, store_pair_dw): New patterns to generate stp for
1618 single words and double words.
1619 (load_pair_sw, load_pair_dw): Likewise.
1620 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
1621 Delete.
1622 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
1623 Delete.
1624 * config/aarch64/aarch64-ldpstp.md: Modify peephole
1625 for different mode ldpstp and add peephole for merged zero stores.
1626 Likewise for loads.
1627 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1628 Add size check.
1629 (aarch64_gen_store_pair): Rename calls to match new patterns.
1630 (aarch64_gen_load_pair): Rename calls to match new patterns.
1631 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
1632 (load_pair<DREG:mode><DREG2:mode>): ... This.
1633 (store_pair<mode>): Rename to...
1634 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
1635 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
1636 New mode iterators.
1637 (V_INT_EQUIV): Handle SImode.
1638 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
1639 New predicate.
1640
1641 2018-05-22 Martin Sebor <msebor@redhat.com>
1642
1643 PR c/85623
1644 * calls.c (maybe_warn_nonstring_arg): Use string length to set
1645 or ajust the presumed bound on an operation to avoid unnecessary
1646 warnings.
1647
1648 2018-05-22 Martin Sebor <msebor@redhat.com>
1649
1650 PR tree-optimization/85826
1651 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1652 assuming that a DECL necesarily has a constant size.
1653
1654 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
1655
1656 PR middle-end/85862
1657 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1658
1659 2018-05-22 Richard Biener <rguenther@suse.de>
1660
1661 PR tree-optimization/85834
1662 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1663 non-constant and non-zero memset arguments.
1664
1665 2018-05-22 Martin Liska <mliska@suse.cz>
1666
1667 PR ipa/85607
1668 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1669
1670 2018-05-22 Richard Biener <rguenther@suse.de>
1671
1672 PR tree-optimization/85863
1673 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1674 comparisons when vectype is specified.
1675 (vectorizable_condition): Do not specify vectype for
1676 vect_is_simple_cond when SLP vectorizing.
1677
1678 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
1679
1680 PR target/85657
1681 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1682 define __ibm128 as long double.
1683 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1684 as a distinct type when IEEE 128-bit support is enabled.
1685 (init_float128_ieee): Fix up conversions between IFmode and IEEE
1686 128-bit types to use the correct functions.
1687 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1688 convert between 128-bit floating point types that have different
1689 modes but the same representation, instead of using gen_lowpart to
1690 makean alias.
1691 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1692 KFmode.
1693 (IFKF_reg): New attributes to give the register constraints for
1694 IFmode and KFmode.
1695 (extend<mode>tf2_internal): New insns to mark an explicit
1696 conversion between 128-bit floating point types that have a
1697 different mode but share the same representation.
1698
1699 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
1700
1701 PR tree-optimization/85814
1702 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1703 a null return from get_strinfo when unsharing the next
1704 strinfo in the chain.
1705
1706 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1707
1708 PR gcc/84923
1709 * varasm.c (weak_finish): Clean up weak_decls.
1710
1711 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1712
1713 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1714 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1715 UNSPEC_UADALP values.
1716 * config/aarch64/iterators.md (ABAL): New int iterator.
1717 (ABDL2): Likewise.
1718 (ADALP): Likewise.
1719 (sur): Add mappings for the above.
1720 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1721 New define_insn.
1722 (aarch64_<sur>abal<mode>_4): Likewise.
1723 (aarch64_<sur>adalp<mode>_3): Likewise.
1724 (<sur>sadv16qi): New define_expand.
1725
1726 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
1727
1728 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1729 (*movdf_internal): Ditto.
1730 (*rcpsf2_sse): Ditto.
1731 (*rsqrtsf2_sse): Ditto.
1732 (*sqrt<mode>2_sse): Ditto.
1733
1734 2018-05-21 Tamar Christina <tamar.christina@arm.com>
1735
1736 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1737 eor3q<mode>4.
1738 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1739 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1740 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1741 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1742 vbcaxq_s64): New.
1743 * config/aarch64/arm_neon.h: Likewise.
1744 * config/aarch64/iterators.md (VQ_I): New.
1745
1746 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
1747
1748 * config.gcc: Add arc/t-multilib-linux to tmake_file for
1749 arc*-*-linux*.
1750 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1751 MULTILIB_DIRNAMES
1752
1753 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1754
1755 * config/nds32/constraints.md (S): New constraint.
1756 * config/nds32/nds32.md (call_internal): Use constraint S.
1757 (call_value_internal): Likewise.
1758 (sibcall_internal): Likewise.
1759 (sibcall_value_internal): Likewise.
1760
1761 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1762 Chung-Ju Wu <jasonwucj@gmail.com>
1763
1764 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1765 into consideration.
1766
1767 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1768 Chung-Ju Wu <jasonwucj@gmail.com>
1769
1770 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1771 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1772 (nds32_rtx_costs_impl): Simplify.
1773 (nds32_address_cost_impl): Simplify.
1774 (nds32_init_rtx_costs): New function.
1775 (nds32_rtx_costs_speed_prefer): Likewise.
1776 (nds32_rtx_costs_size_prefer): Likewise.
1777 (nds32_address_cost_speed_prefer): Likewise.
1778 (nds32_address_cost_speed_fwprop): Likewise.
1779 (nds32_address_cost_size_prefer): Likewise.
1780 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1781 * config/nds32/nds32.c (nds32_option_override): Use
1782 nds32_init_rtx_costs function.
1783
1784 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1785
1786 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1787 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1788 (TARGET_PIPELINE_N8): Likewise.
1789 (TARGET_PIPELINE_N10): Likewise.
1790 (TARGET_PIPELINE_N13): Likewise.
1791 (TARGET_PIPELINE_GRAYWOLF): Likewise.
1792
1793 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
1794
1795 * config/nds32/nds32-fpu.md: Update copyright year.
1796
1797 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1798
1799 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1800
1801 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1802
1803 * config/nds32/nds32.c
1804 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1805 * config/nds32/nds32.opt (minline-asm-r15): New option.
1806
1807 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1808
1809 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1810 MASK_HW_ABS.
1811 * config/nds32/nds32.md (abssi2): New pattern.
1812
1813 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
1814
1815 * config/i386/i386.md (rex64namesuffix): New mode attribute.
1816 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1817 Merge insn pattern from sse_cvtsi2ss<round_name> and
1818 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1819 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1820 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1821 using SWI48 mode iterator.
1822 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1823 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1824 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1825 pattern from sse_cvttss2si<round_saeonly_name>
1826 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1827 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1828 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1829 using SWI48 mode iterator.
1830 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1831 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1832 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1833 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1834 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1835 using SWI48 mode iterator.
1836 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1837 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1838 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1839 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1840 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1841 SWI48 mode iterator.
1842 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1843 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1844 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1845 pattern from sse_cvttsd2si<round_saeonly_name>
1846 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1847
1848 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1849
1850 * config/nds32/nds32-md-auxiliary.c
1851 (nds32_valid_smw_lwm_base_p): Refine.
1852 (nds32_output_smw_single_word): Refine.
1853 (nds32_output_smw_double_word): New.
1854 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1855
1856 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1857
1858 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1859 (nds32_output_stack_pop): Refine.
1860 (nds32_expand_unaligned_load): Refine.
1861 (nds32_expand_unaligned_store): Refine.
1862
1863 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1864 Chung-Ju Wu <jasonwucj@gmail.com>
1865
1866 * config/nds32/constants.md: Add TP_REGNUM constant.
1867 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1868 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1869 UNSPEC_ADD32.
1870 * config/nds32/nds32-doubleword.md: Consider flag_pic.
1871 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1872 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1873 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1874 and PIC code generation.
1875 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1876 code generation.
1877 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1878 optimization.
1879 * config/nds32/nds32.md: Support TLS and PIC.
1880 * config/nds32/nds32.c: Support TLS and PIC.
1881 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1882 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1883 predicate.
1884
1885 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1886
1887 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1888 mode with E_ prefix.
1889
1890 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1891 Chung-Ju Wu <jasonwucj@gmail.com>
1892
1893 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1894 * config/nds32/nds32-md-auxiliary.c
1895 (symbolic_reference_mentioned_p): New.
1896 (nds32_legitimize_ict_address): New.
1897 (nds32_expand_ict_move): New.
1898 (nds32_indirect_call_referenced_p): New.
1899 (nds32_symbol_binds_local_p): Delete.
1900 (nds32_long_call_p): Modify.
1901 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1902 * config/nds32/nds32-protos.h
1903 (symbolic_reference_mentioned_p): Declare.
1904 (nds32_legitimize_ict_address): Declare.
1905 (nds32_expand_ict_move): Declare.
1906 (nds32_indirect_call_referenced_p): Declare.
1907 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1908 (nds32_relax_group): Use nds32_ict_const_p as condition.
1909 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1910 (nds32_asm_file_start): Output ict_model directive in asm code.
1911 (nds32_legitimate_address_p): Consider indirect call.
1912 (nds32_print_operand): Consider indirect call.
1913 (nds32_print_operand_address): Consider indirect call.
1914 (nds32_insert_attributes): Handle "indirect_call" attribute.
1915 (TARGET_LEGITIMATE_ADDRESS_P): Define.
1916 (TARGET_LEGITIMATE_CONSTANT_P): Define.
1917 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1918 (TARGET_DELEGITIMIZE_ADDRESS): Define.
1919 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1920 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1921 (TARGET_ICT_MODEL_SMALL): Define.
1922 (TARGET_ICT_MODEL_LARGE): Define.
1923 * config/nds32/nds32.md (movsi): Consider ict model.
1924 (call, call_value): Consider ict model.
1925 (sibcall, sibcall_value): Consider ict model.
1926 * config/nds32/nds32.opt (mict-model): New option.
1927 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1928 model.
1929
1930 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1931 Monk Chiang <sh.chiang04@gmail.com>
1932 Jim Wilson <jimw@sifive.com>
1933
1934 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1935 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
1936 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1937 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1938 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
1939 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1940 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1941 compute save_libcall_adjustment properly.
1942 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1943 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1944 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1945 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1946 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1947 (ABI_SPEC): Handle mabi=ilp32e.
1948 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1949 (RVE): Add RVE mask.
1950 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1951 <-march>: Add rv32e as an example.
1952
1953 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
1954
1955 PR c++/82899
1956 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1957 (intra_create_variable_infos): Handle C++ constructors.
1958
1959 2018-05-18 Martin Liska <mliska@suse.cz>
1960
1961 * passes.def: Remove a redundant pass.
1962
1963 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
1964
1965 PR bootstrap/85838
1966 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1967
1968 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1969
1970 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1971 (ARMv4): Update.
1972 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1973 (ARMv6m): Update.
1974 (armv2, armv2a, armv3, armv3m): Delete architectures.
1975 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1976 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1977 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1978 Delete cpus.
1979 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1980 (*mulsidi3adddi): Likewise.
1981 (mulsidi3): Likewise.
1982 (*mulsidi3_nov6): Likewise.
1983 (umulsidi3): Likewise.
1984 (umulsidi3_nov6): Likewise.
1985 (umaddsidi4): Likewise.
1986 (*umulsidi3adddi): Likewise.
1987 (smulsi3_highpart): Likewise.
1988 (*smulsi3_highpart_nov6): Likewise.
1989 (umulsi3_highpart): Likewise.
1990 (*umulsi3_highpart_nov6): Likewise.
1991 * config/arm/arm.h (arm_arch3m): Delete.
1992 * config/arm/arm.c (arm_arch3m): Delete.
1993 (arm_option_override_internal): Update armv3-related comment.
1994 (arm_configure_build_target): Delete use of isa_bit_mode32.
1995 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1996 (arm_rtx_costs_internal): Delete check of arm_arch3m.
1997 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1998 (mulsa3): Likewise.
1999 (mulusa3): Likewise.
2000 * config/arm/arm-protos.h (arm_arch3m): Delete.
2001 * config/arm/arm-tables.opt: Regenerate.
2002 * config/arm/arm-tune.md: Likewise.
2003 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
2004 deleted architectures.
2005
2006 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2007
2008 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
2009 (armv5t, armv5te): New features.
2010 (ARMv5, ARMv5e): Delete fgroups.
2011 (ARMv5t, ARMv5te): Adjust for above changes.
2012 (ARMv6m): Likewise.
2013 (armv5, armv5e): Delete arches.
2014 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
2015 arm_arch5.
2016 (*call_reg_arm): Likewise.
2017 (*call_value_reg_armv5): Likewise.
2018 (*call_value_reg_arm): Likewise.
2019 (*call_symbol): Likewise.
2020 (*call_value_symbol): Likewise.
2021 (*sibcall_insn): Likewise.
2022 (*sibcall_value_insn): Likewise.
2023 (clzsi2): Likewise.
2024 (prefetch): Likewise.
2025 (define_split and define_peephole2 dependent on arm_arch5):
2026 Likewise.
2027 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
2028 arm_arch5e.
2029 (TARGET_ARM_QBIT): Likewise.
2030 (TARGET_DSP_MULTIPLY): Likewise.
2031 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
2032 (arm_arch5, arm_arch5e): Delete.
2033 (arm_arch5t, arm_arch5te): Declare.
2034 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
2035 (arm_arch5t): Declare.
2036 (arm_option_reconfigure_globals): Update for the above.
2037 (arm_options_perform_arch_sanity_checks): Update comment, replace
2038 use of arm_arch5 with arm_arch5t.
2039 (use_return_insn): Likewise.
2040 (arm_emit_call_insn): Likewise.
2041 (output_return_instruction): Likewise.
2042 (arm_final_prescan_insn): Likewise.
2043 (arm_coproc_builtin_available): Likewise.
2044 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
2045 arm_arch5e with arm_arch5t and arm_arch5te.
2046 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
2047 (arm_arch5t, arm_arch5te): Declare.
2048 * config/arm/arm-tables.opt: Regenerate.
2049 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
2050 * config/arm/t-multilib: Likewise.
2051 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
2052 instead of arm_arch5.
2053 (*call_reg_thumb1): Likewise.
2054 (*call_value_reg_thumb1_v5): Likewise.
2055 (*call_value_reg_thumb1): Likewise.
2056 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
2057 unreachable path.
2058 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
2059
2060 2018-05-18 Martin Liska <mliska@suse.cz>
2061
2062 PR gcov-profile/84846
2063 * doc/gcov.texi: Document -t option of gcov tool.
2064
2065 2018-05-18 Martin Liska <mliska@suse.cz>
2066
2067 PR gcov-profile/84846
2068 * gcov.c (print_usage): Add new -t option.
2069 (process_args): Handle the option.
2070 (generate_results): Use stdout as output when requested by
2071 the option.
2072
2073 2018-05-18 Martin Liska <mliska@suse.cz>
2074
2075 PR gcov-profile/84846
2076 * coverage.c (coverage_init): Write PWD to .gcno file.
2077 * doc/gcov.texi: Document how working directory is printed.
2078 * gcov-dump.c (dump_gcov_file): Print PWD.
2079 * gcov.c (output_intermediate_file): Likewise.
2080 (read_graph_file): Read PWD string.
2081 (output_lines): Print PWD.
2082
2083 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2084
2085 PR middle-end/85817
2086 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
2087 for retval and return false if all args to phi are zero.
2088
2089 2018-05-18 Richard Biener <rguenther@suse.de>
2090
2091 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
2092 method.
2093 (evrp_dom_walker::before_dom_children): Call it.
2094
2095 2018-05-18 Richard Biener <rguenther@suse.de>
2096
2097 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
2098 results when processing array refs with variable index.
2099
2100 2018-05-18 Toon Moene <toon@moene.org>
2101
2102 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
2103 directly after that of -floop-interchange. Indicate that both
2104 options are enabled by default when specifying -O3.
2105
2106 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2107
2108 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
2109 iterator. Delete separate integer-mode vec_set<mode> expander.
2110 (aarch64_simd_vec_setv2di): Delete.
2111 (vec_setv2di): Delete.
2112 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
2113 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
2114 the "w, r" alternative.
2115
2116 2018-05-18 Martin Liska <mliska@suse.cz>
2117
2118 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
2119 * tree-pass.h (make_pass_lower_switch_O0): New function.
2120 * tree-switch-conversion.c (node_has_low_bound): Remove.
2121 (node_has_high_bound): Likewise.
2122 (node_is_bounded): Likewise.
2123 (class pass_lower_switch): Make it a template type and create
2124 two instances.
2125 (pass_lower_switch::execute): Add template argument.
2126 (make_pass_lower_switch): New function.
2127 (make_pass_lower_switch_O0): New function.
2128 (do_jump_if_equal): Remove.
2129 (emit_case_nodes): Simplify to just handle all 3 cases and leave
2130 all the hard work to tree optimization passes.
2131
2132 2018-05-18 Martin Liska <mliska@suse.cz>
2133
2134 * dbgcnt.c (limit_low): Renamed from limit.
2135 (limit_high): New variable.
2136 (dbg_cnt_is_enabled): Check for upper limit.
2137 (dbg_cnt): Adjust dumping.
2138 (dbg_cnt_set_limit_by_index): Add new argument for high
2139 value.
2140 (dbg_cnt_set_limit_by_name): Likewise.
2141 (dbg_cnt_process_single_pair): Parse new format.
2142 (dbg_cnt_process_opt): Use strtok.
2143 (dbg_cnt_list_all_counters): Remove 'value' and add
2144 'limit_high'.
2145 * doc/invoke.texi: Document changes.
2146
2147 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2148
2149 * doc/sourcebuild.texi (scalar_all_fma): Document.
2150 * tree.def (FMA_EXPR): Delete.
2151 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
2152 * internal-fn.c (ternary_direct): New macro.
2153 (expand_ternary_optab_fn): Likewise.
2154 (direct_ternary_optab_supported_p): Likewise.
2155 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
2156 * builtins.c (fold_builtin_fma): Delete.
2157 (fold_builtin_3): Don't call it.
2158 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
2159 * expr.c (expand_expr_real_2): Likewise.
2160 * fold-const.c (operand_equal_p): Likewise.
2161 (fold_ternary_loc): Likewise.
2162 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
2163 * gimple.c (DEFTREECODE): Likewise.
2164 * gimplify.c (gimplify_expr): Likewise.
2165 * optabs-tree.c (optab_for_tree_code): Likewise.
2166 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
2167 * tree-eh.c (operation_could_trap_p): Likewise.
2168 (stmt_could_throw_1_p): Likewise.
2169 * tree-inline.c (estimate_operator_cost): Likewise.
2170 * tree-pretty-print.c (dump_generic_node): Likewise.
2171 (op_code_prio): Likewise.
2172 * tree-ssa-loop-im.c (stmt_cost): Likewise.
2173 * tree-ssa-operands.c (get_expr_operands): Likewise.
2174 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
2175 * fold-const-call.h (fold_fma): Delete.
2176 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
2177 CFN_FNMA and CFN_FNMS.
2178 (fold_fma): Delete.
2179 * genmatch.c (combined_fn): New enum.
2180 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
2181 (commutative_op): New function.
2182 (commutate): Use it. Handle more than 2 operands.
2183 (dt_operand::gen_gimple_expr): Use commutative_op.
2184 (parser::parse_expr): Allow :c to be used with non-binary
2185 operators if the commutative operand is known.
2186 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
2187 CFN_FMS, CFN_FNMA and CFN_FNMS.
2188 (backprop::process_assign_use): Remove FMA_EXPR handling.
2189 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
2190 (gen_hsa_fma): New function.
2191 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
2192 IFN_FNMA and IFN_FNMS.
2193 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
2194 * gimple-fold.h (follow_all_ssa_edges): Declare.
2195 * gimple-fold.c (follow_all_ssa_edges): New function.
2196 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
2197 gimple_build interface and use follow_all_ssa_edges to fold the result.
2198 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
2199 instead of checking for optabs directly.
2200 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
2201 rather than FMA_EXPRs.
2202 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
2203 call to IFN_FMA instead of an FMA_EXPR.
2204
2205 2018-05-17 Jim Wilson <jimw@sifive.com>
2206
2207 * expr.c (do_tablejump): When converting index to Pmode, if we have a
2208 sign extended promoted subreg, and the range does not have the sign bit
2209 set, then do a sign extend.
2210
2211 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
2212 test, check for sign extended subreg and/or constant operands, and
2213 do a sign extend in that case.
2214
2215 2018-05-17 Steve Ellcey <sellcey@cavium.com>
2216
2217 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
2218 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
2219 Add untyped.
2220 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
2221 Change logics_shift_reg to logics_shift_imm.
2222 (thunderx2t99_fp_loadpair_basic): Delete.
2223 (thunderx2t99_fp_storepair_basic): Delete.
2224 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
2225 (thunderx2t99_asimd_polynomial): Delete.
2226 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
2227 and neon_fp_mul_d_scalar_q.
2228 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
2229 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
2230 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
2231 (thunderx2t99_asimd_lut): Add missing tbl types.
2232 (thunderx2t99_asimd_ext): Delete.
2233 (thunderx2t99_asimd_load1_1_mult): Delete.
2234 (thunderx2t99_asimd_load1_2_mult): Delete.
2235 (thunderx2t99_asimd_load1_ldp): New.
2236 (thunderx2t99_asimd_load1): New.
2237 (thunderx2t99_asimd_load2): Add missing *load2* types.
2238 (thunderx2t99_asimd_load3): New.
2239 (thunderx2t99_asimd_load4): New.
2240 (thunderx2t99_asimd_store1_1_mult): Delete.
2241 (thunderx2t99_asimd_store1_2_mult): Delete.
2242 (thunderx2t99_asimd_store2_mult): Delete.
2243 (thunderx2t99_asimd_store2_onelane): Delete.
2244 (thunderx2t99_asimd_store_stp): New.
2245 (thunderx2t99_asimd_store1): New.
2246 (thunderx2t99_asimd_store2): New.
2247 (thunderx2t99_asimd_store3): New.
2248 (thunderx2t99_asimd_store4): New.
2249
2250 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
2251
2252 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
2253 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
2254
2255 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
2256 Segher Boessenkool <segher@kernel.crashing.org>
2257
2258 PR target/85698
2259 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
2260 operand.
2261
2262 2018-05-17 Richard Biener <rguenther@suse.de>
2263
2264 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
2265 for pruning loop and prune defs feeding only already visited PHIs.
2266
2267 2018-05-17 Richard Biener <rguenther@suse.de>
2268
2269 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
2270
2271 2018-05-17 Bin Cheng <bin.cheng@arm.com>
2272 Richard Biener <rguenther@suse.de>
2273
2274 PR tree-optimization/85793
2275 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
2276 for VMAT_ELEMENTWISE.
2277
2278 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2279
2280 * internal-fn.h (lookup_internal_fn): Declare
2281 * internal-fn.c (lookup_internal_fn): New function.
2282 * gimple.c (gimple_build_call_from_tree): Handle calls to
2283 internal functions.
2284 * gimple-pretty-print.c (dump_gimple_call): Print "." before
2285 internal function names.
2286 * tree-pretty-print.c (dump_generic_node): Likewise.
2287 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
2288
2289 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2290
2291 * gimple-fold.h (gimple_build): Make the function forms take
2292 combined_fn rather than built_in_function.
2293 (gimple_simplify): Likewise.
2294 * gimple-match-head.c (gimple_simplify): Likewise.
2295 * gimple-fold.c (gimple_build): Likewise.
2296 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
2297 rather than gimple_build_call_internal.
2298 (get_initial_defs_for_reduction): Likewise.
2299 (vect_create_epilog_for_reduction): Likewise.
2300 (vectorizable_live_operation): Likewise.
2301
2302 2018-05-17 Martin Liska <mliska@suse.cz>
2303
2304 * gimple-ssa-sprintf.c (format_directive): Do not use
2305 space in between 'G_' and '('.
2306
2307 2018-05-17 Jakub Jelinek <jakub@redhat.com>
2308
2309 PR target/85323
2310 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
2311 even if the mask is not all ones.
2312
2313 PR target/85323
2314 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
2315 vector.
2316 (ix86_gimple_fold_builtin): Likewise.
2317
2318 PR target/85323
2319 * config/i386/i386.c: Include tree-vector-builder.h.
2320 (ix86_vector_shift_count): New function.
2321 (ix86_fold_builtin): Fold shift builtins by scalar count.
2322 (ix86_gimple_fold_builtin): Likewise.
2323
2324 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
2325 _mm512_setzero): New intrinsics.
2326
2327 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2328 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2329
2330 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
2331 code generation for cases where splatting a value is not useful.
2332 * simplify-rtx.c (simplify_ternary_operation): Simplify
2333 vec_merge across a vec_duplicate and a paradoxical subreg forming
2334 a vector mode to a vec_concat.
2335
2336 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
2337
2338 * config.gcc: Support "goldmont-plus".
2339 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2340 "goldmont-plus".
2341 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2342 PROCESSOR_GOLDMONT_PLUS.
2343 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
2344 (processor_target_table): Add "goldmont-plus".
2345 (PTA_GOLDMONT_PLUS): Define.
2346 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
2347 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
2348 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
2349 (fold_builtin_cpu): Add "goldmont-plus".
2350 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
2351 (ix86_option_override_internal): Add "goldmont-plus".
2352 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
2353 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
2354 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
2355 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
2356
2357 2018-05-17 Richard Biener <rguenther@suse.de>
2358
2359 PR tree-optimization/85757
2360 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
2361 remove defs that only feed that PHI from further processing.
2362
2363 2018-05-16 Jim Wilson <jimw@sifive.com>
2364
2365 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
2366 asterisk to name.
2367 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
2368
2369 2018-05-16 Mark Wielaard <mark@klomp.org>
2370
2371 * dwarf2out.c (count_index_strings): New function.
2372 (output_indirect_strings): Call count_index_strings and generate
2373 header for dwarf_version >= 5.
2374
2375 2018-05-16 Mark Wielaard <mark@klomp.org>
2376
2377 * dwarf2out.c (dwarf_FORM): New function.
2378 (set_indirect_string): Use dwarf_FORM.
2379 (reset_indirect_string): Likewise.
2380 (size_of_die): Likewise.
2381 (value_format): Likewise.
2382 (output_die): Likewise.
2383 (add_skeleton_AT_string): Likewise.
2384 (output_macinfo_op): Likewise.
2385 (index_string): Likewise.
2386 (output_index_string_offset): Likewise.
2387 (output_index_string): Likewise.
2388 (count_index_strings): Likewise.
2389
2390 2018-05-16 Carl Love <cel@us.ibm.com>
2391
2392 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2393 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
2394
2395 2018-05-16 Martin Jambor <mjambor@suse.cz>
2396
2397 * ipa-prop.c (ipa_free_all_edge_args): Remove.
2398 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
2399
2400 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
2401
2402 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
2403 (fnma<mode>4): Likewise.
2404 (fms<mode>4): Likewise.
2405 (fnms<mode>4): Likewise.
2406 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
2407 (aarch64_fnma<mode>4): Likewise.
2408 (aarch64_fms<mode>4): Likewise.
2409 (aarch64_fnms<mode>4): Likewise.
2410 (aarch64_fnmadd<mode>4): Likewise.
2411
2412 2018-05-16 Jason Merrill <jason@redhat.com>
2413
2414 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
2415
2416 2018-05-16 Richard Biener <rguenther@suse.de>
2417
2418 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
2419 (dump_stmt_cost): Declare.
2420 (add_stmt_cost): Dump cost we add.
2421 (add_stmt_costs): New function.
2422 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
2423 No longer exported.
2424 (vect_analyze_stmt): Adjust prototype.
2425 (vectorizable_condition): Likewise.
2426 (vectorizable_live_operation): Likewise.
2427 (vectorizable_reduction): Likewise.
2428 (vectorizable_induction): Likewise.
2429 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
2430 cost vector to pass to vectorizable_ and record afterwards.
2431 (vect_model_reduction_cost): Take cost vector argument and adjust.
2432 (vect_model_induction_cost): Likewise.
2433 (vectorizable_reduction): Likewise.
2434 (vectorizable_induction): Likewise.
2435 (vectorizable_live_operation): Likewise.
2436 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
2437 SLP_TREE_NUMBER_OF_VEC_STMTS.
2438 (vect_analyze_slp_cost_1): Remove.
2439 (vect_analyze_slp_cost): Likewise.
2440 (vect_slp_analyze_node_operations): Take visited args and
2441 a target cost vector. Avoid processing already visited stmt sets.
2442 (vect_slp_analyze_operations): Use a local cost vector to gather
2443 costs and register those of non-discarded instances.
2444 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
2445 (vect_schedule_slp_instance): Remove copying of
2446 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
2447 zero.
2448 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
2449 adding cost. Record cost entry location.
2450 (vect_prologue_cost_for_slp_op): Function to compute cost of
2451 a constant or invariant generated for SLP vect in the prologue,
2452 split out from vect_analyze_slp_cost_1.
2453 (vect_model_simple_cost): Make static. Adjust for SLP costing.
2454 (vect_model_promotion_demotion_cost): Likewise.
2455 (vect_model_store_cost): Likewise, make static.
2456 (vect_model_load_cost): Likewise.
2457 (vectorizable_bswap): Add cost vector arg and adjust.
2458 (vectorizable_call): Likewise.
2459 (vectorizable_simd_clone_call): Likewise.
2460 (vectorizable_conversion): Likewise.
2461 (vectorizable_assignment): Likewise.
2462 (vectorizable_shift): Likewise.
2463 (vectorizable_operation): Likewise.
2464 (vectorizable_store): Likewise.
2465 (vectorizable_load): Likewise.
2466 (vectorizable_condition): Likewise.
2467 (vectorizable_comparison): Likewise.
2468 (can_vectorize_live_stmts): Likewise.
2469 (vect_analyze_stmt): Likewise.
2470 (vect_transform_stmt): Adjust calls to vectorizable_*.
2471 * tree-vectorizer.c: Include gimple-pretty-print.h.
2472 (dump_stmt_cost): New function.
2473
2474 2018-05-16 Richard Biener <rguenther@suse.de>
2475
2476 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
2477 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
2478 * tree-ssa-dse.c: Include tree-ssa-loop.h.
2479 (check_name): New callback.
2480 (dse_classify_store): Track cycles via a visited bitmap of PHI
2481 defs and simplify handling of in-loop and across loop dead stores
2482 and properly fail for loop-variant refs. Handle byte-tracking with
2483 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
2484 limiting the walk.
2485
2486 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
2487
2488 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
2489 (vect_get_mask_type_for_stmt): Likewise.
2490 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
2491 split out from...
2492 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
2493 to determine the statement's vector type and the vector type that
2494 should be used for calculating nunits. Deal with cases in which
2495 the type has to be deferred.
2496 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
2497 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
2498 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
2499 (vect_determine_vf_for_stmt): New functions, split out from...
2500 (vect_determine_vectorization_factor): ...here.
2501 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
2502 (vect_get_mask_type_for_stmt): New functions, split out from
2503 vect_determine_vectorization_factor.
2504
2505 2018-05-16 Richard Biener <rguenther@suse.de>
2506
2507 * tree-cfg.c (verify_gimple_assign_ternary): Properly
2508 verify the [VEC_]COND_EXPR embedded comparison.
2509
2510 2018-05-15 Martin Sebor <msebor@redhat.com>
2511
2512 PR tree-optimization/85753
2513 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
2514 RECORD_TYPE in addition to ARRAY_TYPE.
2515
2516 2018-05-15 Martin Sebor <msebor@redhat.com>
2517
2518 PR middle-end/85643
2519 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2520
2521 2018-05-15 Richard Biener <rguenther@suse.de>
2522
2523 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
2524 add by_clobber_p one. Change algorithm to collect all defs
2525 representing uses we need to walk and try reducing them to
2526 a single one before failing.
2527 (dse_dom_walker::dse_optimize_stmt): Adjust.
2528
2529 2018-05-13 Mark Wielaard <mark@klomp.org>
2530
2531 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
2532 (size_of_loc_descr): Likewise.
2533 (output_loc_operands): Likewise.
2534 (output_loc_operands_raw): Likewise.
2535 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
2536 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
2537 (hash_loc_operands): Likewise.
2538 (compare_loc_operands): Likewise.
2539
2540 2018-05-14 Mark Wielaard <mark@klomp.org>
2541
2542 * dwarf2out.c (count_index_addrs): New function.
2543 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2544
2545 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2546
2547 PR tree-optimization/83648
2548 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
2549 return value as malloc candidate.
2550
2551 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2552
2553 PR ipa/85734
2554 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
2555 param as true in call to suggest_attribute.
2556
2557 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
2558
2559 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
2560 -mreadonly-in-sdata.
2561
2562 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2563
2564 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
2565 New pattern.
2566 (aarch64_crypto_aesd_fused): Likewise.
2567
2568 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
2569
2570 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
2571 (movsi_aarch64): Likewise.
2572 (load_pairsi): Likewise.
2573 (load_pairdi): Likewise.
2574 (store_pairsi): Likewise.
2575 (store_pairdi): Likewise.
2576 (load_pairsf): Likewise.
2577 (load_pairdf): Likewise.
2578 (store_pairsf): Likewise.
2579 (store_pairdf): Likewise.
2580 (zero_extend): Likewise.
2581 (trunc): Swap alternatives.
2582 (fcvt_target): Add '?' to prefer w over r.
2583
2584 2018-05-14 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR target/85756
2587 * config/i386/i386.md: Disallow non-commutative arithmetics in
2588 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
2589 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
2590 in the peephole2 before it.
2591
2592 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
2593
2594 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
2595 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
2596 (ix86_handle_option): Handle -mcldemote.
2597 * config.gcc: New header.
2598 * config/i386/cldemoteintrin.h: New file.
2599 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
2600 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2601 -mcldemote.
2602 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2603 OPTION_MASK_ISA_CLDEMOTE.
2604 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
2605 (ix86_valid_target_attribute_inner_p): Ditto.
2606 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
2607 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
2608 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
2609 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
2610 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
2611 (cldemote): New.
2612 * config/i386/i386.opt: Add -mcldemote.
2613 * config/i386/x86intrin.h: New header.
2614 * doc/invoke.texi: Add -mcldemote.
2615
2616 2018-05-14 Richard Biener <rguenther@suse.de>
2617
2618 * doc/match-and-simplify.texi: Adjust :s documentation.
2619
2620 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
2621
2622 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
2623 intended memcpy size.
2624 (REORDER_45): Likewise.
2625
2626 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
2627
2628 * sort.cc: New file.
2629 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
2630 * vec.c (qsort_chk): Use gcc_qsort.
2631 * Makefile.in (OBJS-libcommon): Add sort.o.
2632 (build/sort.o): New target. Use it...
2633 (BUILD_RTL): ... here, and...
2634 (build/gencfn-macros): ... here, and...
2635 (build/genmatch): ... here.
2636
2637 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2638 Chung-Ju Wu <jasonwucj@gmail.com>
2639
2640 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
2641 * config/nds32/nds32-graywolf.md: New file.
2642 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
2643 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
2644 pipeline.
2645 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2646 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2647 * config/nds32/nds32.md (pipeline_model): Add graywolf.
2648 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2649 * config/nds32/pipelines.md: Include n15 settings.
2650
2651 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2652 Chung-Ju Wu <jasonwucj@gmail.com>
2653
2654 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2655 * config/nds32/nds32-n13.md: New file.
2656 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2657 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2658 pipeline.
2659 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2660 * config/nds32/nds32.md (pipeline_model): Add n13.
2661 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2662 * config/nds32/pipelines.md: Include n13 settings.
2663
2664 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2665 Chung-Ju Wu <jasonwucj@gmail.com>
2666
2667 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2668 * config/nds32/nds32-n10.md: New file.
2669 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2670 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2671 pipeline.
2672 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2673 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2674 * config/nds32/nds32.md (pipeline_model): Add n10.
2675 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2676 * config/nds32/pipelines.md: Include n10 settings.
2677
2678 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
2679 Kito Cheng <kito.cheng@gmail.com>
2680 Chung-Ju Wu <jasonwucj@gmail.com>
2681
2682 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2683 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2684 Add enum values for DSP extension instructions.
2685 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2686 New constraints.
2687 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2688 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2689 New code iterators.
2690 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2691 * config/nds32/nds32-dspext.md: New file for DSP implementation.
2692 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2693 * config/nds32/nds32-intrinsic.md: Likewise.
2694 * config/nds32/nds32_intrinsic.h: Likewise.
2695 * config/nds32/nds32-md-auxiliary.c: Likewise.
2696 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2697 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2698 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2699 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2700 * config/nds32/nds32-protos.h: New declarations for DSP extension.
2701 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2702 TYPE_DMAC in switch statement.
2703 * config/nds32/nds32.c: New checking and implementation for DSP
2704 extension instructions.
2705 * config/nds32/nds32.h: Likewise.
2706 * config/nds32/nds32.md: Likewise.
2707 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2708 * config/nds32/predicates.md: Implement new predicates for DSP
2709 extension.
2710
2711 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2712
2713 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2714 Reformat alternatives and attributes so it is easier to identify
2715 which constraints/attributes go with which instruction.
2716 (mov<mode>_hardfloat32, FMOVE64): Likewise.
2717 (mov<mode>_softfloat32, FMOVE64): Likewise.
2718 (mov<mode>_hardfloat64, FMOVE64): Likewise.
2719 (mov<mode>_softfloat64, FMOVE64): Likewise.
2720
2721 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
2722
2723 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2724 subsection.
2725 (Basic PowerPC Built-in Functions): The new name of the
2726 subsection previously known as "PowerPC Built-in Functions".
2727 (Basic PowerPC Built-in Functions Available on all Configurations):
2728 New subsubsection.
2729 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2730 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2731 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2732 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2733
2734 2018-05-11 Martin Jambor <mjambor@suse.cz>
2735
2736 PR ipa/85655
2737 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2738 single const.
2739
2740 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2741
2742 PR target/85733
2743 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2744
2745 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
2746
2747 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2748 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2749 (ix86_handle_option): Handle -mwaitpkg.
2750 * config.gcc: New header.
2751 * config/i386/cpuid.h (bit_WAITPKG): New bit.
2752 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2753 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2754 function type.
2755 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2756 OPTION_MASK_ISA_WAITPKG.
2757 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2758 (ix86_option_override_internal): Add PTA_WAITPKG.
2759 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2760 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2761 IX86_BUILTIN_TPAUSE.
2762 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2763 __builtin_ia32_umwait and __builtin_ia32_tpause.
2764 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2765 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2766 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2767 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2768 UNSPECV_TPAUSE): New.
2769 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2770 * config/i386/i386.opt: Add -mwaitpkg.
2771 * config/i386/waitpkgintrin.h: New file.
2772 * config/i386/x86intrin.h: New header.
2773 * doc/invoke.texi: Add -mwaitpkg.
2774
2775 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2776
2777 PR target/85606
2778 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2779 equivalent.
2780 (cortex-m0): Use armv6s-m isa.
2781 (cortex-m0plus): Likewise.
2782 (cortex-m1): Likewise.
2783 (cortex-m0.small-multiply): Likewise.
2784 (cortex-m0plus.small-multiply): Likewise.
2785 (cortex-m1.small-multiply): Likewise.
2786
2787 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
2788 Jakub Jelinek <jakub@redhat.com>
2789
2790 PR tree-optimization/85692
2791 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2792 source permute as well.
2793
2794 2018-05-11 Martin Liska <mliska@suse.cz>
2795
2796 PR sanitizer/85556
2797 * doc/extend.texi: Document LLVM style format for no_sanitize
2798 attribute.
2799
2800 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2801
2802 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2803 mode_supports_vsx_dform_quad to mode_supports_dq_form.
2804 (mode_supports_vsx_dform_quad): Likewise.
2805 (mode_supports_vmx_dform): Move these functions to be next to the
2806 other mode_supports functions.
2807 (mode_supports_dq_form): Likewise.
2808 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2809 mode_supports_dq_form.
2810 (reg_offset_addressing_ok_p): Likewise.
2811 (offsettable_ok_by_alignment): Likewise.
2812 (rs6000_legitimate_offset_address_p): Likewise.
2813 (legitimate_lo_sum_address_p): Likewise.
2814 (rs6000_legitimize_address): Likewise.
2815 (rs6000_legitimize_reload_address): Likewise.
2816 (rs6000_secondary_reload_inner): Likewise.
2817 (rs6000_preferred_reload_class): Likewise.
2818 (rs6000_output_move_128bit): Likewise.
2819
2820 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2821
2822 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2823 Generate SImode target register for null target.
2824 <case IX86_BUILTIN_XGETBV>: Ditto.
2825 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2826 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2827
2828 2018-05-10 Carl Love <cel@us.ibm.com>
2829
2830 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2831 dcbtt and dcbtstt if operands[2] is 0.
2832
2833 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2834
2835 PR target/85693
2836 * config/i386/sse.md (usadv64qi): New expander.
2837
2838 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
2839
2840 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2841 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2842 -maltivec=be support.
2843 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2844 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2845 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2846 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2847 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2848 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2849 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2850 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2851 altivec_vsumsws): Adjust.
2852 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2853 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2854 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2855 support.
2856 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2857 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2858 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2859 (altivec_lve<VI_char>x): Delete expand.
2860 (*altivec_lve<VI_char>x_internal): Rename to...
2861 (altivec_lve<VI_char>x): ... this.
2862 (altivec_lvxl_<mode>): Delete expand.
2863 (*altivec_lvxl_<mode>_internal): Rename to ...
2864 (altivec_lvxl_<mode>): ... this.
2865 (altivec_stvxl_<mode>): Delete expand.
2866 (*altivec_stvxl_<mode>_internal): Rename to ...
2867 (altivec_stvxl_<mode>): ... this.
2868 (altivec_stve<VI_char>x): Delete expand.
2869 (*altivec_stve<VI_char>x_internal): Rename to ...
2870 (altivec_stve<VI_char>x): ... this.
2871 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2872 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2873 reduc_plus_scal_<mode>): Adjust.
2874 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2875 comment.
2876 (rs6000_cpu_cpp_builtins): Adjust.
2877 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2878 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2879 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2880 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2881 -maltivec=be support.
2882 (rs6000_split_vec_extract_var): Adjust.
2883 (rs6000_split_v4si_init): Adjust.
2884 (swap_selector_for_mode): Delete.
2885 (altivec_expand_lvx_be, altivec_expand_stvx_be,
2886 altivec_expand_stvex_be): Delete.
2887 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2888 -maltivec=be support.
2889 (rs6000_gimple_fold_builtin): Ditto.
2890 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2891 Adjust.
2892 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2893 (TARGET_DIRECT_MOVE_64BIT): Adjust.
2894 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2895 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2896 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2897 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2898 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2899 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2900 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2901 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2902 anonymous split): Adjust.
2903 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2904 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2905
2906 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2907
2908 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2909 when --with-gxx-include-dir is also specified.
2910 * configure: Regenerate.
2911
2912 2018-05-09 Jim Wilson <jimw@sifive.com>
2913
2914 PR target/84797
2915 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2916 * config/riscv/t-withmultilib: New.
2917 * config/riscv/withmultilib.h: New.
2918 * doc/install.texi: Document RISC-V --with-multilib-list support.
2919
2920 2018-05-09 Richard Biener <rguenther@suse.de>
2921
2922 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2923 vector.
2924 (vect_bb_vectorization_profitable_p): Adjust. Compute
2925 actual scalar cost using the cost vector and the add_stmt_cost
2926 machinery.
2927
2928 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2929
2930 PR rtl-optimization/85645
2931 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2932 in the REG_CFA_REGISTER note for LR, don't leave it empty.
2933
2934 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2935
2936 PR rtl-optimization/85645
2937 * shrink-wrap.c (spread_components): Return a boolean saying if
2938 anything was changed.
2939 (try_shrink_wrapping_separate): Iterate spread_components until
2940 nothing changes anymore.
2941
2942 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2943
2944 PR rtl-optimization/85645
2945 * regrename.c (build_def_use): Also kill the chains that include the
2946 destination of a REG_CFA_REGISTER note.
2947
2948 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2949
2950 PR rtl-optimization/85645
2951 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2952 insn that has a REG_CFA_REGISTER note.
2953
2954 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
2955
2956 * cfgexpand.c (expand_clobber): New function.
2957 (expand_gimple_stmt_1): Use it.
2958 * tree-vect-stmts.c (vect_clobber_variable): New function,
2959 split out from...
2960 (vectorizable_simd_clone_call): ...here.
2961 (vectorizable_store): Emit a clobber either side of an
2962 IFN_STORE_LANES sequence.
2963 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2964
2965 2018-05-09 Tom de Vries <tom@codesourcery.com>
2966
2967 PR target/85626
2968 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2969 (define_insn "trap_if_false"): Add exit after trap.
2970
2971 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
2972
2973 PR rtl-optimization/85638
2974 * bb-reorder.c: Include common/common-target.h.
2975 (create_forwarder_block): New function extracted from...
2976 (fix_up_crossing_landing_pad): ...here. Rename into...
2977 (dw2_fix_up_crossing_landing_pad): ...this.
2978 (sjlj_fix_up_crossing_landing_pad): New function.
2979 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2980 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2981 from both partitions and exit the loop after one iteration.
2982
2983 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
2984
2985 Revert:
2986 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2987 subsection.
2988 (Basic PowerPC Built-in Functions): The new name of the
2989 subsection previously known as "PowerPC Built-in Functions".
2990 (Basic PowerPC Built-in Functions Available on all Configurations):
2991 New subsubsection.
2992 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2993 subsubsection.
2994 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2995 subsubsection.
2996 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2997 subsubsection.
2998 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2999 subsubsection.
3000
3001 2018-05-08 Jim Wilson <jimw@sifive.com>
3002
3003 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
3004 (LD_EMUL_SUFFIX): New.
3005 (LINK_SPEC): Use it.
3006
3007 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
3008
3009 * doc/extend.texi (PowerPC Built-in Functions): Rename this
3010 subsection.
3011 (Basic PowerPC Built-in Functions): The new name of the
3012 subsection previously known as "PowerPC Built-in Functions".
3013 (Basic PowerPC Built-in Functions Available on all Configurations):
3014 New subsubsection.
3015 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
3016 subsubsection.
3017 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
3018 subsubsection.
3019 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
3020 subsubsection.
3021 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
3022 subsubsection.
3023
3024 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3025
3026 PR target/85683
3027 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
3028 after cmpelim optimization.
3029
3030 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
3031
3032 * config.gcc: Support "goldmont".
3033 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
3034 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3035 PROCESSOR_GOLDMONT.
3036 * config/i386/i386.c (m_GOLDMONT): Define.
3037 (processor_target_table): Add "goldmont".
3038 (PTA_GOLDMONT): Define.
3039 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
3040 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
3041 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
3042 (fold_builtin_cpu): Add "goldmont".
3043 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
3044 (ix86_option_override_internal): Add "goldmont".
3045 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
3046 (processor_type): Add PROCESSOR_GOLDMONT.
3047 * config/i386/i386.md: Add CPU "glm".
3048 * config/i386/glm.md: New file.
3049 * config/i386/x86-tune.def: Add m_GOLDMONT.
3050 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
3051
3052 2018-05-08 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR target/85572
3055 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
3056 E_V4DImode.
3057 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
3058 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
3059 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
3060
3061 PR target/85317
3062 * config/i386/i386.c (ix86_fold_builtin): Handle
3063 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
3064
3065 PR target/85480
3066 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
3067 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
3068
3069 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
3070
3071 PR target/85658
3072 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
3073 (check_arch): Likewise.
3074 (check_fpu): Return the result rather than printing it.
3075 (end arch): Fix operator precedence.
3076 (end cpu): Likewise.
3077 (END): Print the result from check_fpu.
3078
3079 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3080 Alan Hayward <alan.hayward@arm.com>
3081 David Sherwood <david.sherwood@arm.com>
3082
3083 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
3084 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
3085 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
3086 (*fcmuo<mode>_and): New patterns.
3087
3088 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
3089
3090 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
3091 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
3092 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
3093 (cmp_op, sve_imm_con): New code attributes.
3094 (SVE_COND_INT_CMP, imm_con): Delete.
3095 (cmp_op): Remove above unspecs from int attribute.
3096 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
3097 to...
3098 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
3099 comparison-specific unspecs.
3100 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
3101 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
3102 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
3103 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
3104 (*vec_fcm<cmp_op><mode>): Rename to...
3105 (*fcm<cmp_op><mode>): ...this and adjust likewise.
3106 (*vec_fcmuo<mode>): Rename to...
3107 (*fcmuo<mode>): ...this and adjust likewise.
3108 (*pred_fcm<cmp_op><mode>): New pattern.
3109 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
3110 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
3111 functions.
3112 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
3113 and UNORDERED.
3114 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
3115 (aarch64_emit_sve_predicated_cond): New function.
3116 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
3117 (aarch64_emit_unspec_cond_or): Replace with...
3118 (aarch64_emit_sve_or_conds): ...this new function. Use
3119 aarch64_emit_sve_ptrue_op for the individual comparisons and
3120 aarch64_emit_binop to OR them together.
3121 (aarch64_emit_inverted_unspec_cond): Replace with...
3122 (aarch64_emit_sve_inverted_cond): ...this new function. Use
3123 aarch64_emit_sve_ptrue_op for the comparison and
3124 aarch64_emit_unop to invert the result.
3125 (aarch64_expand_sve_vec_cmp_float): Update after the above
3126 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
3127
3128 2018-05-07 Nathan Sidwell <nathan@acm.org>
3129
3130 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
3131 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
3132 (Backwards Compatibility): Likewise.
3133
3134 2018-05-07 Luis Machado <luis.machado@linaro.org>
3135
3136 PR bootstrap/85681
3137 Revert:
3138 2018-05-07 Luis Machado <luis.machado@linaro.org>
3139
3140 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3141 <prefetch_dynamic_strides>: New const bool field.
3142 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3143 prefetch_dynamic_strides.
3144 (exynosm1_prefetch_tune): Likewise.
3145 (thunderxt88_prefetch_tune): Likewise.
3146 (thunderx_prefetch_tune): Likewise.
3147 (thunderx2t99_prefetch_tune): Likewise.
3148 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3149 to false.
3150 (aarch64_override_options_internal): Update to set
3151 PARAM_PREFETCH_DYNAMIC_STRIDES.
3152 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3153 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3154 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3155 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3156 prefetch-dynamic-strides setting.
3157
3158 2018-05-07 Luis Machado <luis.machado@linaro.org>
3159
3160 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3161 <minimum_stride>: New const int field.
3162 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3163 minimum_stride field.
3164 (exynosm1_prefetch_tune): Likewise.
3165 (thunderxt88_prefetch_tune): Likewise.
3166 (thunderx_prefetch_tune): Likewise.
3167 (thunderx2t99_prefetch_tune): Likewise.
3168 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3169 (aarch64_override_options_internal): Update to set
3170 PARAM_PREFETCH_MINIMUM_STRIDE.
3171 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3172 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3173 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3174 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3175 stride is constant and is below the minimum stride threshold.
3176
3177 2018-05-07 Luis Machado <luis.machado@linaro.org>
3178
3179 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
3180 to 512.
3181
3182 2018-05-07 Luis Machado <luis.machado@linaro.org>
3183
3184 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3185 <prefetch_dynamic_strides>: New const bool field.
3186 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3187 prefetch_dynamic_strides.
3188 (exynosm1_prefetch_tune): Likewise.
3189 (thunderxt88_prefetch_tune): Likewise.
3190 (thunderx_prefetch_tune): Likewise.
3191 (thunderx2t99_prefetch_tune): Likewise.
3192 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
3193 to false.
3194 (aarch64_override_options_internal): Update to set
3195 PARAM_PREFETCH_DYNAMIC_STRIDES.
3196 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3197 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3198 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3199 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3200 prefetch-dynamic-strides setting.
3201
3202 2018-05-07 Luis Machado <luis.machado@linaro.org>
3203
3204 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3205 <minimum_stride>: New const int field.
3206 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3207 minimum_stride field.
3208 (exynosm1_prefetch_tune): Likewise.
3209 (thunderxt88_prefetch_tune): Likewise.
3210 (thunderx_prefetch_tune): Likewise.
3211 (thunderx2t99_prefetch_tune): Likewise.
3212 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
3213 (aarch64_override_options_internal): Update to set
3214 PARAM_PREFETCH_MINIMUM_STRIDE.
3215 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3216 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3217 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3218 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3219 stride is constant and is below the minimum stride threshold.
3220
3221 2018-05-06 Jakub Jelinek <jakub@redhat.com>
3222
3223 PR c++/85659
3224 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
3225 the type is addressable. Don't force op into register if it has
3226 BLKmode.
3227
3228 2018-05-05 Roland McGrath <mcgrathr@google.com>
3229
3230 PR other/77609
3231 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
3232 any section for which we don't know a specific type it should have,
3233 regardless of name. Previously this was done only for the exact
3234 names ".init_array", ".fini_array", and ".preinit_array".
3235 (default_elf_asm_named_section): Add comment about
3236 relationship with default_section_type_flags and SECTION_NOTYPE.
3237 (get_section): Don't consider it a type conflict if one side has
3238 SECTION_NOTYPE and the other doesn't, as long as neither has the
3239 SECTION_BSS et al used in the default_section_type_flags logic.
3240
3241 2018-05-05 Tom de Vries <tom@codesourcery.com>
3242
3243 PR target/85653
3244 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
3245 (workaround_barsyncs): New function.
3246 (nvptx_reorg): Use workaround_barsyncs.
3247 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3248 (define_expand "nvptx_membar_cta"): New define_expand.
3249 (define_insn "*nvptx_membar_cta"): New insn.
3250
3251 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
3252
3253 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
3254 To improve optimization opportunities.
3255 * builtin-types.def: The new needed builtin types for the above.
3256
3257 2018-05-04 Richard Biener <rguenther@suse.de>
3258
3259 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
3260 * gimple-ssa-store-merging.c
3261 (imm_store_chain_info::output_merged_store): Remove redundant create,
3262 release split_store vector contents on failure.
3263 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
3264 scalar stmt vector on cache hit.
3265
3266 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
3267
3268 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
3269 Xilinx FP support.
3270 * config.gcc (powerpc-xilinx-eabi*): Remove.
3271 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
3272 support.
3273 (fusion_addis_mem_combo_load): Ditto.
3274 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
3275 FP support.
3276 (rs6000_cpu_cpp_builtins): Ditto.
3277 * config/rs6000/rs6000-linux.c
3278 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
3279 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
3280 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
3281 support.
3282 (rs6000_setup_reg_addr_masks): Ditto.
3283 (rs6000_init_hard_regno_mode_ok): Ditto.
3284 (rs6000_option_override_internal): Ditto.
3285 (legitimate_lo_sum_address_p): Ditto.
3286 (rs6000_legitimize_address): Ditto.
3287 (rs6000_legitimize_reload_address): Ditto.
3288 (rs6000_legitimate_address_p): Ditto.
3289 (abi_v4_pass_in_fpr): Ditto.
3290 (setup_incoming_varargs): Ditto.
3291 (rs6000_gimplify_va_arg): Ditto.
3292 (rs6000_split_multireg_move): Ditto.
3293 (rs6000_savres_strategy): Ditto.
3294 (rs6000_emit_prologue_components): Ditto.
3295 (rs6000_emit_epilogue_components): Ditto.
3296 (rs6000_emit_prologue): Ditto.
3297 (rs6000_emit_epilogue): Ditto.
3298 (rs6000_elf_file_end): Ditto.
3299 (rs6000_function_value): Ditto.
3300 (rs6000_libcall_value): Ditto.
3301 * config/rs6000/rs6000.h: Ditto.
3302 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
3303 (TARGET_MINMAX): ... this. New.
3304 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
3305 * config/rs6000/rs6000.md: Remove Xilinx FP support.
3306 (*movsi_internal1_single): Delete.
3307 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
3308 mfpu=, mxilinx-fpu): Delete.
3309 * config/rs6000/singlefp.h: Delete.
3310 * config/rs6000/sysv4.h: Remove Xilinx FP support.
3311 * config/rs6000/t-rs6000: Ditto.
3312 * config/rs6000/t-xilinx: Delete.
3313 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
3314 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
3315 (VStype_simple): Delete.
3316 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
3317 * config/rs6000/xfpu.h: Delete.
3318 * config/rs6000/xfpu.md: Delete.
3319 * config/rs6000/xilinx.h: Delete.
3320 * config/rs6000/xilinx.opt: Delete.
3321 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
3322 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
3323
3324 2018-05-04 Tom de Vries <tom@codesourcery.com>
3325
3326 PR libgomp/85639
3327 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
3328 if ignore == 0.
3329
3330 2018-05-04 Richard Biener <rguenther@suse.de>
3331
3332 PR middle-end/85627
3333 * tree-complex.c (update_complex_assignment): We are always in SSA form.
3334 (expand_complex_div_wide): Likewise.
3335 (expand_complex_operations_1): Likewise.
3336 (expand_complex_libcall): Preserve EH info of the original stmt.
3337 (tree_lower_complex): Handle removed blocks.
3338 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
3339 on complex multiplication and division libcall builtins.
3340
3341 2018-05-04 Richard Biener <rguenther@suse.de>
3342
3343 PR middle-end/85574
3344 * fold-const.c (negate_expr_p): Restrict negation of operand
3345 zero of a division to when we know that can happen without
3346 overflow.
3347 (fold_negate_expr_1): Likewise.
3348
3349 2018-05-04 Jakub Jelinek <jakub@redhat.com>
3350
3351 PR libstdc++/85466
3352 * real.h (real_nextafter): Declare.
3353 * real.c (real_nextafter): New function.
3354 * fold-const-call.c (fold_const_nextafter): New function.
3355 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
3356 CASE_CFN_NEXTTOWARD.
3357 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
3358 even when arg1_mode is different from arg0_mode.
3359
3360 2018-05-03 Nathan Sidwell <nathan@acm.org>
3361
3362 * doc/extend.texi (Deprecated Features): Remove
3363 -ffriend-injection.
3364 (Backwards Compatibility): Likewise.
3365 * doc/invoke.texi (C++ Language Options): Likewise.
3366 (C++ Dialect Options): Likewise.
3367
3368 2018-05-03 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR target/85530
3371 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
3372 _mm512_mask_mullox_epi64): New intrinsics.
3373
3374 2018-05-03 Tom de Vries <tom@codesourcery.com>
3375
3376 PR testsuite/85106
3377 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
3378 dump files): Add offload-tree.
3379
3380 2018-05-03 Richard Biener <rguenther@suse.de>
3381
3382 PR tree-optimization/85615
3383 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
3384 to loops not nested in BBs loop father to avoid creating multi-entry
3385 loops.
3386
3387 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3388
3389 PR tree-optimization/70291
3390 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
3391 arguments. Change return type to tree. Emit libcall as a new
3392 statement rather than replacing existing one when inplace_p is true.
3393 (expand_complex_multiplication_components): New function.
3394 (expand_complex_multiplication): Expand floating-point complex
3395 multiplication using the above.
3396 (expand_complex_division): Rename inner_type parameter to type.
3397 Update expand_complex_libcall call-site.
3398 (expand_complex_operations_1): Update expand_complex_multiplication
3399 and expand_complex_division call-sites.
3400
3401 2018-05-02 Jakub Jelinek <jakub@redhat.com>
3402
3403 PR target/85582
3404 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
3405 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
3406 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
3407 the highest significant bit of the shift count mask is clear. In
3408 check whether and[sq]i3 is needed verify that all significant bits
3409 of the shift count other than the highest are set.
3410
3411 2018-05-02 Tom de Vries <tom@codesourcery.com>
3412
3413 PR libgomp/82428
3414 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
3415 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
3416 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
3417 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
3418 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
3419 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
3420 __builtin_goacc_parlevel_size.
3421
3422 2018-05-02 Richard Biener <rguenther@suse.de>
3423
3424 PR tree-optimization/85597
3425 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
3426 do not use split vect_get_vec_defs call but call vect_get_slp_defs
3427 directly.
3428
3429 2018-05-02 Tom de Vries <tom@codesourcery.com>
3430
3431 PR testsuite/85106
3432 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
3433 dump files): Add ltrans-tree.
3434
3435 2018-05-02 Tom de Vries <tom@codesourcery.com>
3436
3437 PR testsuite/85106
3438 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
3439 dump files): Add wpa-ipa.
3440
3441 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
3442
3443 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
3444 powerpc*-*-linux*paired* target.
3445 * config/rs6000/750cl.h: Delete.
3446 * config/rs6000/paired.h: Delete.
3447 * config/rs6000/paired.md: Delete.
3448 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
3449 float support.
3450 * config/rs6000/rs6000-builtin.def: Remove paired float support.
3451 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
3452 comment. Remove paired float support.
3453 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
3454 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3455 VECTOR_PAIRED.
3456 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
3457 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
3458 declarations.
3459 * config/rs6000/rs6000.c: Remove paired float support.
3460 (paired_expand_vector_init, paired_expand_vector_move,
3461 paired_emit_vector_compare, paired_emit_vector_cond_expr,
3462 (paired_expand_lv_builtin, paired_expand_stv_builtin,
3463 paired_expand_builtin, paired_expand_predicate_builtin,
3464 paired_init_builtins): Delete.
3465 * config/rs6000/rs6000.h: Remove paired float support.
3466 * config/rs6000/rs6000.md: Remove paired float support.
3467 (move_from_CR_ov_bit): Delete.
3468 * config/rs6000/rs6000.opt (mpaired): Delete.
3469 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
3470 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
3471
3472 2018-05-02 Richard Biener <rguenther@suse.de>
3473
3474 PR middle-end/85567
3475 * gimplify.c (gimplify_save_expr): When in SSA form allow
3476 SAVE_EXPRs to compute to SSA vars.
3477
3478 2018-05-02 Jakub Jelinek <jakub@redhat.com>
3479
3480 PR target/85582
3481 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
3482 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
3483 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
3484 clobber operands[2], instead use a new pseudo. Formatting fixes.
3485
3486 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
3487
3488 PR tree-optimization/85586
3489 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
3490 exit early for statements in the same group if the accesses are
3491 not strided.
3492
3493 2018-05-02 Tom de Vries <tom@codesourcery.com>
3494
3495 PR lto/85451
3496 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
3497 error message.
3498
3499 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
3500
3501 PR tree-optimization/85143
3502 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
3503
3504 2018-05-01 Tom de Vries <tom@codesourcery.com>
3505
3506 PR lto/85451
3507 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
3508 not found" error message.
3509
3510 2018-05-01 Tom de Vries <tom@codesourcery.com>
3511
3512 PR other/83786
3513 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
3514 * vec.c (test_ordered_remove_if): New function.
3515 (vec_c_tests): Call test_ordered_remove_if.
3516 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
3517 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
3518 * tree-vect-patterns.c (vect_pattern_recog_1): Use
3519 VEC_ORDERED_REMOVE_IF.
3520
3521 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3522
3523 PR tree-optimization/82665
3524 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
3525 pointer subtraction where arguments come from a memchr call.
3526
3527 2018-05-01 Jakub Jelinek <jakub@redhat.com>
3528
3529 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
3530 --push-state --as-needed and --pop-state instead of --as-needed and
3531 --no-as-needed if ld supports it.
3532 * configure: Regenerated.
3533
3534 PR web/85578
3535 * doc/install.texi2html: Replace _002d with - and _002a with * in
3536 generated html files using sed.
3537
3538 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3539
3540 PR c++/85523
3541 * gcc-rich-location.c (blank_line_before_p): New function.
3542 (use_new_line): New function.
3543 (gcc_rich_location::add_fixit_insert_formatted): New function.
3544 * gcc-rich-location.h
3545 (gcc_rich_location::add_fixit_insert_formatted): New function.
3546
3547 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3548
3549 * selftest.c (assert_streq): Rename "expected" and "actual" to
3550 "val1" and "val2". Extend NULL-handling to cover both inputs
3551 symmetrically, while still requiring both to be non-NULL for a pass.
3552 * selftest.h (assert_streq): Rename "expected" and "actual" to
3553 "val1" and "val2".
3554 (ASSERT_EQ): Likewise.
3555 (ASSERT_EQ_AT): Likewise.
3556 (ASSERT_KNOWN_EQ): Likewise.
3557 (ASSERT_KNOWN_EQ_AT): Likewise.
3558 (ASSERT_NE): Likewise.
3559 (ASSERT_MAYBE_NE): Likewise.
3560 (ASSERT_MAYBE_NE_AT): Likewise.
3561 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
3562 the assertion to pass.
3563 (ASSERT_STREQ_AT): Likewise.
3564
3565 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
3566
3567 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
3568 interaction with -pie.
3569
3570 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3571
3572 * selftest.h: Fix alphabetization of per-source-file selftest
3573 declarations.
3574
3575 2018-04-30 Jason Merrill <jason@redhat.com>
3576
3577 PR c++/61982 - dead stores to destroyed objects.
3578 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
3579 of clobber.
3580
3581 2018-04-30 Jason Merrill <jason@redhat.com>
3582
3583 * tree.c (build_clobber): New.
3584 * tree.h: Declare it.
3585 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
3586
3587 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3588
3589 * diagnostic-show-locus.c (layout::layout): Update for
3590 location_get_source_line returning a char_span.
3591 (struct char_span): Move to input.h.
3592 (struct correction): Update for fields in char_span becoming
3593 private.
3594 (struct source_line): Update for location_get_source_line
3595 returning a char_span.
3596 (layout::print_line): Likewise.
3597 * edit-context.c (edited_file::print_content): Likewise.
3598 (edited_file::print_diff_hunk): Likewise.
3599 (edited_file::print_run_of_changed_lines): Likewise.
3600 (edited_file::get_num_lines): Likewise.
3601 (edited_line::edited_line): Likewise.
3602 * final.c (asm_show_source): Likewise.
3603 * input.c (location_get_source_line): Convert return type
3604 from const char * to char_span, losing the final "line_len"
3605 param.
3606 (dump_location_info): Update for the above.
3607 (get_substring_ranges_for_loc): Likewise. Use a char_span
3608 when handling the literal within the line.
3609 (test_reading_source_line): Update for location_get_source_line
3610 returning a char_span.
3611 * input.h (class char_span): Move here from
3612 diagnostic-show-locus.c, converting from a struct to a class.
3613 Make data members private.
3614 (char_span::operator bool): New.
3615 (char_span::length): New.
3616 (char_span::get_buffer): New.
3617 (char_span::operator[]): New.
3618 (char_span::subspan): Make const.
3619 (char_span::xstrdup): New.
3620 (location_get_source_line): Convert return type from const char *
3621 to char_span, losing the final "line_size" param.
3622
3623 2018-04-30 Jan Hubicka <jh@suse.cz>
3624
3625 * lto-wrapper.c (ltrans_priorities): New static var.
3626 (cmp_priority): New.
3627 (run_gcc): Read priorities and if doing parallel build order
3628 the Makefile by them.
3629
3630 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3631
3632 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
3633
3634 2018-04-30 Richard Biener <rguenther@suse.de>
3635
3636 * tree-cfg.c (verify_address): Remove base argument, add
3637 flag whether to check TREE_ADDRESSABLE and do that.
3638 (verify_expr): Remove.
3639 (verify_types_in_gimple_reference): Add pieces from verify_expr.
3640 (verify_gimple_assign_single): Likewise.
3641 (verify_gimple_switch): Likewise.
3642 (verify_expr_location_1): Dereference tp once. Add (disabled)
3643 piece from verify_expr.
3644 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
3645
3646 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3647
3648 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3649
3650 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3651
3652 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3653 (small_data_pattern): Likewise.
3654 (arc_rewrite_small_data): Likewise.
3655 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3656 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3657 (get_symbol_alignment): New function.
3658 (legitimate_small_data_address_p): Likewise.
3659 (legitimate_scaled_address): Update, call
3660 legitimate_small_data_address_p.
3661 (output_sdata): New static variable.
3662 (arc_print_operand): Update how we handle small data operands.
3663 (arc_print_operand_address): Likewise.
3664 (arc_legitimate_address_p): Update, use
3665 legitimate_small_data_address_p.
3666 (arc_rewrite_small_data_p): Remove.
3667 (arc_rewrite_small_data_1): Likewise.
3668 (arc_rewrite_small_data): Likewise.
3669 (small_data_pattern): Likewise.
3670 (compact_sda_memory_operand): Update to use
3671 legitimate_small_data_address_p and get_symbol_alignment.
3672 (prepare_move_operands): Don't rewite sdata pattern.
3673 (prepare_extend_operands): Remove.
3674 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3675 pattern.
3676 (zero_extendqisi2): Likewise.
3677 (zero_extendhisi2): Likewise.
3678 (extendqihi2): Likewise.
3679 (extendqisi2): Likewise.
3680 (extendhisi2): Likewise.
3681 (addsi3): Likewise.
3682 (subsi3): Likewise.
3683 (andsi3): Likewise.
3684 * config/arc/constraints.md (Usd): Change it to memory constraint.
3685
3686 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3687
3688 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3689 as source of std instructions.
3690 * config/arc/arc.md (movsi_insn): Update pattern predicate to
3691 allow 6-bit constants as source for store instructions.
3692 (movdi_insn): Update instruction pattern to allow 6-bit constants
3693 as source for store instructions.
3694
3695 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
3696
3697 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3698
3699 2018-04-30 Nathan Sidwell <nathan@acm.org>
3700 Sandra Loosemore <sandra@codesourcery.com>
3701
3702 * dumpfile.c (dump_open): Allow '-' for stdout.
3703 * doc/invoke.texi (Developer Options): Document dump filename
3704 determination early. Document stdin/stdout selection.
3705
3706 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
3707
3708 Microblaze Target: PIC data text relative
3709
3710 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3711 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3712 Add declaration.
3713 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3714 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3715 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3716 New addressing mode for data-text relative position indepenedent code.
3717 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3718 'ADDRESS_SYMBOLIC_TXT_REL'.
3719 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3720 (microblaze_legitimate_pic_operand): Exclude function calls from
3721 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3722 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3723 addresses cases.
3724 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3725 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3726 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3727 for 'address + offset'.
3728 (microblaze_expand_prologue): Add new function prologue call for
3729 'r20' assignation.
3730 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3731 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3732 table in case of TARGET_PIC_DATA_TEXT_REL.
3733 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3734 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3735 Add new macros 'UNSPEC_TEXT',
3736 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3737 + exclude function calls from 'UNSPEC_PLT' in case of data text
3738 relative mode.
3739 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3740 new target hook for generating address diff vector tables in case of
3741 flag_pic.
3742 * doc/tm.texi : Regenerate.
3743 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3744 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3745 of addr diff vector generation.
3746 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3747 target hook definition.
3748 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3749 Add default function for generate_pic_addr_diff_vec -> flag_pic.
3750 * doc/invoke.texi (Add new pic option): Add new microblaze pic
3751 option for data text relative.
3752
3753 2018-04-30 Richard Biener <rguenther@suse.de>
3754
3755 * tree-chrec.h (evolution_function_is_constant_p): Remove
3756 redundant check.
3757 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3758
3759 2018-04-30 Richard Biener <rguenther@suse.de>
3760
3761 PR bootstrap/85571
3762 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3763
3764 2018-04-30 Richard Biener <rguenther@suse.de>
3765
3766 PR tree-optimization/28364
3767 PR tree-optimization/85275
3768 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3769 copying first exit test.
3770
3771 2018-04-28 Mark Wielaard <mark@klomp.org>
3772
3773 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3774 dwarf_version >= 5.
3775 (dwarf_AT): Handle DW_AT_addr_base.
3776 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3777
3778 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
3779
3780 PR target/84431
3781 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3782 (*ashl<dwi>3_doubleword_mask_1): Ditto.
3783 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3784 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3785
3786 2018-04-28 Richard Biener <rguenther@suse.de>
3787
3788 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3789 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3790 to reflect use. Only add interesting stmts.
3791
3792 2018-04-27 Martin Jambor <mjambor@suse.cz>
3793
3794 PR ipa/85549
3795 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3796 the jump function allows for passing through aggregate values.
3797
3798 2018-04-27 David Malcolm <dmalcolm@redhat.com>
3799
3800 * input.h (in_system_header_at): Convert from macro to inline
3801 function.
3802 (from_macro_expansion_at): Likewise.
3803 (from_macro_definition_at): Likewise.
3804
3805 2018-04-27 Jeff Law <law@redhat.com>
3806
3807 * config.gcc: Mark tile* targets as deprecated/obsolete.
3808
3809 2018-04-27 Richard Biener <rguenther@suse.de>
3810
3811 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3812 fix for ILP32.
3813
3814 2018-04-27 Richard Biener <rguenther@suse.de>
3815
3816 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3817
3818 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
3819
3820 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3821 with Yd constraint. Set "preferred_for_speed" attribute from
3822 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3823 with Yd constraint.
3824 (*movdi_internal): Ditto.
3825 (movti_interunit splitters): Remove
3826 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3827 (movdi_interunit splitters): Ditto.
3828 * config/i386/constraints.md (Ye): Remove.
3829 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3830
3831 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3832
3833 PR target/85512
3834 * config/aarch64/constraints.md (Usg): Limit to 31.
3835 (Usj): Limit to 63.
3836
3837 2018-04-27 Jakub Jelinek <jakub@redhat.com>
3838
3839 PR tree-optimization/85529
3840 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3841 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3842 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3843 zero extension or masking of the MSB bit.
3844 (optimize_range_tests): Add FIRST_BB argument, pass it through
3845 to optimize_range_tests_var_bound.
3846 (maybe_optimize_range_tests, reassociate_bb): Adjust
3847 optimize_range_tests callers.
3848
3849 2018-04-26 Richard Biener <rguenther@suse.de>
3850 Jakub Jelinek <jakub@redhat.com>
3851
3852 * cgraph.h (symbol_table): Just declare debug method here.
3853 * symtab.c (symbol_table::debug): Define.
3854
3855 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
3856
3857 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3858
3859 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
3860
3861 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3862 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3863 (*movdi_internal): Substitute Yi and Yj constraint with x
3864 and Ym and Yn constraint with y constraint. Update "isa"
3865 attribute and set "preferred_for_speed" attribute from
3866 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3867 (*movsi_internal): Ditto.
3868 (*movdf_internal): Ditto.
3869 (*movsf_internal): Ditto.
3870 (*zero_extendsidi2): Ditto.
3871 * config/i386/sse.md (vec_set<mode>_0): Ditto.
3872 (sse2_loadld): Ditto.
3873 (*vec_extract<ssevecmodelower>_0): Ditto.
3874 (*vec_extractv4si_0_zext_sse4): Ditto.
3875 (vec_concatv2di): Ditto.
3876 (*vec_dup<mode>): Ditto.
3877 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3878 * config/i386/constraints.md (Yi): Remove.
3879 (Yj): Remove.
3880 (Ym): Remove.
3881 (Yn): Remove.
3882
3883 2018-04-26 Nathan Sidwell <nathan@acm.org>
3884
3885 * dumpfile.c (dump_open): New.
3886 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3887 (dump_finish): Detect stdio/stderr by value not name.
3888
3889 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
3890
3891 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3892
3893 2018-04-26 Tom de Vries <tom@codesourcery.com>
3894
3895 PR target/84952
3896 * config/nvptx/nvptx.c (verify_neutering_jumps)
3897 (verify_neutering_labels): New function
3898 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3899
3900 2018-04-26 Tom de Vries <tom@codesourcery.com>
3901
3902 PR target/84025
3903 * config/nvptx/nvptx.c (needs_neutering_p): New function.
3904 (nvptx_single): Use needs_neutering_p to skip over insns that do not
3905 need neutering.
3906
3907 2018-04-26 Richard Biener <rguenther@suse.de>
3908 Tom de Vries <tom@codesourcery.com>
3909
3910 PR lto/85422
3911 * lto-streamer-out.c (output_function): Fixup loops if required to match
3912 discovery done in the reader.
3913
3914 2018-04-26 Richard Biener <rguenther@suse.de>
3915
3916 PR tree-optimization/85116
3917 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3918 have a loop exit from the single latch predecessor. Remove
3919 case of header with just condition.
3920 (ch_base::copy_headers): Exclude infinite loops from any
3921 processing.
3922 (pass_ch::execute): Record exits.
3923
3924 2018-04-26 Richard Biener <rguenther@suse.de>
3925
3926 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3927 prologue cost vector and pass it to vect_get_load_cost.
3928 (vect_get_peeling_costs_all_drs): Likewise.
3929 (vect_peeling_hash_get_lowest_cost): Likewise.
3930 (vect_enhance_data_refs_alignment): Likewise.
3931
3932 2018-04-26 Richard Biener <rguenther@suse.de>
3933
3934 PR middle-end/85450
3935 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3936 checking of integer<->pointer conversions.
3937 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3938 sign-/zero-extending pointer types.
3939 (expand_omp_for_static_chunk): Likewise.
3940
3941 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
3942 Jean Lee <xiaoyur347@gmail.com>
3943
3944 * config/mips/mips.c (mips_asan_shadow_offset): New function.
3945 (TARGET_ASAN_SHADOW_OFFSET): Define.
3946 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3947 true for -fsanitize=address.
3948
3949 2018-04-25 Mark Wielaard <mark@klomp.org>
3950
3951 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3952 shorter ones.
3953
3954 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3955
3956 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3957 than "alu", remove explicit "memory" and "imm_disp" attributes.
3958 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3959
3960 PR middle-end/85414
3961 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3962 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3963 gen_lowpart_no_emit.
3964
3965 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
3966
3967 PR target/85473
3968 * config/i386/i386.c (ix86_expand_builtin): Change memory
3969 operand to XI, extend p0 to Pmode.
3970 * config/i386/i386.md: Change unspec volatile and operand
3971 1 mode to XI, change operand 0 mode to P.
3972
3973 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3974
3975 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3976 GET_MODE_MASK before any checking.
3977 (nds32_can_use_bset_p): Likewise.
3978 (nds32_can_use_btgl_p): Likewise.
3979
3980 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3981
3982 * config/nds32/nds32-doubleword.md: New define_split pattern for
3983 illegal register number.
3984
3985 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3986
3987 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3988
3989 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3990
3991 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3992
3993 2018-04-25 Richard Biener <rguenther@suse.de>
3994
3995 * lto-streamer.h (LTO_major_version): Bump to 8.
3996
3997 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3998
3999 * BASE-VER: Set to 9.0.0.
4000
4001 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4002
4003 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4004 in __abskf2 and __powikf2.
4005
4006 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4007
4008 PR target/85512
4009 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4010 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4011 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4012 Use the above on operand 2. Reindent.
4013 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4014
4015 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4016
4017 PR target/85485
4018 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4019 handle OPT_mcet.
4020 * config/i386/i386.opt (mcet): Removed.
4021 * doc/install.texi: Remove -mcet documentation.
4022 * doc/invoke.texi: Likewise.
4023
4024 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4025
4026 PR target/85485
4027 * doc/install.texi: Remove -mcet from bootstrap-cet.
4028
4029 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4030
4031 PR target/85511
4032 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4033 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4034 if TARGET_64BIT.
4035
4036 PR target/85503
4037 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4038 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4039 containing a CONST_VECTOR.
4040
4041 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4042
4043 * doc/install.texi: Update newlib dependency for nvptx.
4044
4045 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4046
4047 PR target/85508
4048 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4049 instead of INTVAL when shifting x left.
4050
4051 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4052
4053 PR tree-optimization/85478
4054 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4055 vect_grouped_store_supported for single element vectors.
4056
4057 2018-04-24 Richard Biener <rguenther@suse.de>
4058
4059 PR target/85491
4060 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4061 load cost increase to the case of non-constant step.
4062
4063 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4064
4065 PR target/84828
4066 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4067 destination if any_malformed_asm.
4068
4069 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4070
4071 PR middle-end/85496
4072 * expr.c (store_field): In the bitfield case, if the value comes from
4073 a function call and is returned in registers by means of a PARALLEL,
4074 do not change the mode of the temporary unless BLKmode and VOIDmode.
4075
4076 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4077
4078 PR rtl-optimization/85423
4079 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4080 dependencies to debug insns when the previous insn is non-debug.
4081
4082 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4083
4084 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4085 enums into a single definition.
4086 (fls): Fix predicates and printing.
4087 (seti): Likewise.
4088
4089 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4090
4091 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4092 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4093 and short u6 immediate.
4094 (check_if_valid_sleep_operand): Remove.
4095 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4096
4097 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4098
4099 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4100 flag_always_save_lp condition.
4101 * config/nds32/nds32.opt (malways-save-lp): New option.
4102
4103 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4104
4105 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4106 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4107 * config/nds32/nds32.h
4108 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4109 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4110
4111 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4112
4113 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4114 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4115
4116 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4117 Chung-Ju Wu <jasonwucj@gmail.com>
4118
4119 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4120 Declare.
4121 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4122 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4123
4124 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4125
4126 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4127
4128 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4129
4130 * config/nds32/nds32-protos.h (nds32_data_alignment,
4131 nds32_local_alignment): Declare.
4132 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4133 nds32_local_alignment): New functions.
4134 (TARGET_CONSTANT_ALIGNMENT): Define.
4135 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4136
4137 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4138
4139 * config/nds32/nds32.c
4140 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4141 (TARGET_MODES_TIEABLE_P): Likewise.
4142
4143 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4144
4145 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4146 level Ofast and Og.
4147
4148 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4149 Chung-Ju Wu <jasonwucj@gmail.com>
4150
4151 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4152 for unaligned access.
4153 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4154 unaligned access.
4155 * config/nds32/nds32-intrinsic.md: Likewise.
4156 * config/nds32/nds32_intrinsic.h: Likewise.
4157 * config/nds32/nds32.h (nds32_builtins): Likewise.
4158 * config/nds32/nds32.opt (munaligned-access): New option.
4159 * config/nds32/nds32.c (nds32_asm_file_start): Display
4160 flag_unaligned_access status.
4161
4162 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4163
4164 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4165 -mno-relax is present.
4166 * config/riscv/linux.h (LINK_SPEC): Ditto.
4167
4168 2018-04-20 Martin Sebor <msebor@redhat.com>
4169
4170 PR c/85365
4171 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4172 for null pointers.
4173 (gimple_fold_builtin_stxcpy_chk): Same.
4174 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4175
4176 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4177
4178 PR target/85456
4179 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4180 __powikf2 when long double is IEEE 128-bit.
4181
4182 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4183
4184 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4185 step to make sure stack always aligned.
4186
4187 2018-04-20 Carl Love <cel@us.ibm.com>
4188
4189 PR target/83402
4190 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4191 size check for arg0.
4192
4193 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
4194 Tom de Vries <tom@codesourcery.com>
4195
4196 PR target/85445
4197 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4198 Emit insns for calls too.
4199 (nvptx_find_par): Always look for worker-level predecessor insn.
4200 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
4201 calls.
4202 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4203 (nvptx_process_pars): Propagate frames for calls.
4204
4205 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
4206
4207 PR target/85469
4208 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4209 Removed.
4210 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4211 (ix86_handle_option): Don't handle OPT_mibt.
4212 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4213 __SHSTK__.
4214 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4215 has_ibt and ibt.
4216 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4217 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4218 (ix86_target_macros): Define __CET__ with flag_cf_protection
4219 for -fcf-protection.
4220 * config/i386/i386.c (isa2_opts): Remove -mibt.
4221 * config/i386/i386.h (TARGET_IBT): Removed.
4222 (TARGET_IBT_P): Likewise.
4223 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4224 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4225 * config/i386/i386.opt (mcet): Update help message.
4226 (mshstk): Likewise.
4227 (mibt): Removed.
4228 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
4229 -mcet as an alias for -mshstk.
4230
4231 2018-04-20 Richard Biener <rguenther@suse.de>
4232
4233 PR middle-end/85475
4234 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4235 complexity by forcing a single use of the multiply operand.
4236
4237 2018-04-20 Martin Jambor <mjambor@suse.cz>
4238
4239 ipa/85449
4240 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4241 recursion dependency to only apply to non-clones.
4242
4243 2018-04-20 Martin Jambor <mjambor@suse.cz>
4244
4245 ipa/85447
4246 * ipa-cp.c (create_specialized_node): Check that clones of
4247 self-recursive edges exist during IPA-CP.
4248
4249 2018-04-19 Toon Moene <toon@moene.org>
4250
4251 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4252 by -O3.
4253
4254 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR tree-optimization/85467
4257 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4258 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
4259 VECTOR_CST element to type.
4260
4261 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4262
4263 PR target/85397
4264 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4265 * config/i386/i386.md (builtin_setjmp_setup): Removed.
4266 (builtin_longjmp): Likewise.
4267 (save_stack_nonlocal): New pattern.
4268 (restore_stack_nonlocal): Likewise.
4269
4270 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4271
4272 PR target/85404
4273 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4274 Replace ASM_OUTPUT_LABEL with fprintf.
4275
4276 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4277
4278 PR target/85417
4279 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4280 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4281 * config/i386/i386-c.c (ix86_target_macros_internal): Also
4282 define __IBT__ and __SHSTK__ for -fcf-protection.
4283 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4284 TARGET_IBT.
4285 (ix86_trampoline_init): Likewise.
4286 (x86_output_mi_thunk): Likewise.
4287 (ix86_notrack_prefixed_insn_p): Likewise.
4288 (ix86_option_override_internal): Don't disallow -fcf-protection.
4289 * config/i386/i386.md (rdssp<mode>): Also enable for
4290 -fcf-protection.
4291 (incssp<mode>): Likewise.
4292 (nop_endbr): Likewise.
4293 * config/i386/i386.opt (mcet): Change help message to built-in
4294 functions only.
4295 (mibt): Likewise.
4296 (mshstk): Likewise.
4297 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4298 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
4299 enable CET built-in functions.
4300
4301 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
4302
4303 * common/config/i386/i386-common.c
4304 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4305 OPTION_MASK_ISA_MOVDIRI_UNSET,
4306 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4307 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4308 * config.gcc (movdirintrin.h): New header.
4309 * config/i386/cpuid.h (bit_MOVDIRI,
4310 bit_MOVDIR64B): New bits.
4311 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4312 and -mmvodir64b.
4313 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4314 (VOID, PVOID, PCVOID)): New function types.
4315 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4316 __builtin_ia32_directstoreu_u64,
4317 __builtin_ia32_movdir64b): New builtins.
4318 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
4319 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
4320 and -mmovdiri.
4321 (ix86_valid_target_attribute_inner_p): Ditto.
4322 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
4323 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
4324 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
4325 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
4326 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
4327 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
4328 (movdiri<mode>, movdir64b_<mode>): New.
4329 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
4330 * config/i386/immintrin.h: Include movdirintrin.h.
4331 * config/i386/movdirintrin.h: New file.
4332 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
4333
4334 2018-04-19 Richard Biener <rguenther@suse.de>
4335
4336 PR middle-end/85455
4337 * cfg.c (clear_bb_flags): When loop state says we have
4338 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
4339
4340 2018-04-19 Richard Biener <rguenther@suse.de>
4341
4342 PR tree-optimization/84737
4343 * tree-vect-data-refs.c (vect_copy_ref_info): New function
4344 copying restrict info.
4345 (vect_setup_realignment): Use it.
4346 * tree-vectorizer.h (vect_copy_ref_info): Declare.
4347 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
4348 the first DR to all generated stores.
4349 (vectorizable_load): Likewise for loads.
4350
4351 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4352
4353 PR tree-optimization/85446
4354 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
4355 the integral and pointer types to have the same precision.
4356
4357 * doc/install.texi: Document --disable-cet being the default and
4358 --enable-cet=auto.
4359
4360 2018-04-18 Martin Liska <mliska@suse.cz>
4361
4362 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
4363 style.
4364
4365 2018-04-18 Martin Liska <mliska@suse.cz>
4366
4367 Revert
4368 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
4369
4370 PR ipa/83983
4371 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
4372 arguments if they are comparable.
4373
4374 2018-04-18 Martin Liska <mliska@suse.cz>
4375
4376 Revert
4377 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4378
4379 PR lto/84805
4380 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4381 incomplete types.
4382
4383 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
4384
4385 PR target/85388
4386 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
4387 ENDBR after calling __morestack.
4388
4389 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4390
4391 PR jit/85384
4392 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
4393 by using gcc_base_ver to generate a gcc_driver_version, and use
4394 it when generating GCC_DRIVER_NAME.
4395 * configure: Regenerate.
4396
4397 2018-04-18 Jakub Jelinek <jakub@redhat.com>
4398
4399 PR target/81084
4400 * config.gcc: Obsolete powerpc*-*-*spe*.
4401
4402 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4403
4404 PR debug/84637
4405 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
4406 (stabstr_D): Change type of unum from unsigned int to
4407 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
4408 type.
4409
4410 2018-04-17 Jim Wilson <jimw@sifive.com>
4411
4412 PR 84856
4413 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
4414 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
4415 Set arg_pointer_offset after using pretend_args_size.
4416
4417 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4418
4419 PR rtl-optimization/85431
4420 * dse.c (record_store): Ignore zero width stores.
4421
4422 PR sanitizer/85230
4423 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
4424 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
4425 __builtin_stack_restore rather than after it.
4426 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
4427 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
4428 argument instead of virtual_dynamic_stack_rtx.
4429
4430 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
4431
4432 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
4433 New prototype.
4434 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
4435 Add note to error message to explain internal mapping of overloaded
4436 built-in function name to non-overloaded built-in function name.
4437 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
4438 function.
4439
4440 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
4441
4442 PR target/85424
4443 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
4444 where the inputs overlap with the output.
4445
4446 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4447
4448 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
4449 (=v, v) alternative and explicit "memory" attribute.
4450 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
4451 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4452 attributes.
4453 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
4454 "sselog1" type instead of "sselog".
4455 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
4456 "sselog". Remove explicit "memory" attribute.
4457 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
4458 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4459 attributes.
4460 (vec_extract_hi_v32hi): Merge all alternatives into one, use
4461 "sselog1" type instead of "sselog". Remove explicit "memory"
4462 attribute.
4463 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
4464 use "sselog1" type instead of "sselog". Remove explicit "memory"
4465 attribute.
4466 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
4467 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4468 attributes.
4469 (vec_extract_hi_v64qi): Merge all alternatives into one, use
4470 "sselog1" type instead of "sselog". Remove explicit "memory"
4471 attribute.
4472 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
4473 use "sselog1" type instead of "sselog". Remove explicit "memory"
4474 attribute.
4475
4476 PR target/85430
4477 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
4478
4479 PR middle-end/85414
4480 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
4481 on a SUBREG.
4482
4483 2018-04-17 Martin Jambor <mjambor@suse.cz>
4484
4485 PR ipa/85421
4486 * ipa-cp.c (create_specialized_node): Call
4487 expand_all_artificial_thunks if necessary.
4488
4489 2018-04-17 Martin Liska <mliska@suse.cz>
4490
4491 PR lto/85405
4492 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
4493 in message, remote space in between '_G' and '('.
4494
4495 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4496
4497 PR target/85281
4498 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
4499 avx512f_vmcmp<mode>3<round_saeonly_name>,
4500 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
4501 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
4502 avx512f_rndscale<mode><round_saeonly_name>,
4503 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
4504 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
4505 Use %<iptr>2 instead of %2 for -masm=intel.
4506 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
4507 avx512f_vcvttss2usi<round_saeonly_name>,
4508 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
4509 -masm=intel.
4510 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
4511 avx512f_vcvttsd2usi<round_saeonly_name>,
4512 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4513 Use %q1 instead of %1 for -masm=intel.
4514 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4515 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4516 of %3 for -masm=intel.
4517 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4518 -masm=intel.
4519 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4520 -masm=intel.
4521 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4522 -masm=intel.
4523 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4524 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4525 %g1.
4526 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4527 -masm=intel.
4528 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4529 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4530 %g1 and one with %0 and %1.
4531 (avx512er_vmrcp28<mode><round_saeonly_name>,
4532 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4533 %1 for -masm=intel.
4534 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4535 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4536 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4537 of %0 and %{%4%} for -masm=intel.
4538 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4539 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4540 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4541 order of %0 and %{%5%}%{z%} for -masm=intel.
4542
4543 2018-04-17 Jan Hubicka <jh@suse.cz>
4544
4545 PR lto/85405
4546 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4547
4548 2018-04-17 Martin Liska <mliska@suse.cz>
4549
4550 PR ipa/85329
4551 * multiple_target.c (create_dispatcher_calls): Set apostrophes
4552 for target_clone error message. Make default implementation
4553 clone to be a local declaration.
4554 (separate_attrs): Add new argument and check for an empty
4555 string.
4556 (expand_target_clones): Handle it.
4557 (ipa_target_clone): Make redirection just for target_clones
4558 functions.
4559
4560 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
4561 Tom de Vries <tom@codesourcery.com>
4562
4563 PR middle-end/84955
4564 * omp-expand.c (expand_oacc_for): Add dummy false branch for
4565 tiled basic blocks without omp continue statements.
4566
4567 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
4568
4569 PR target/83660
4570 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
4571 vec_extract expression as having side effects to make sure it gets
4572 a cleanup point.
4573
4574 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
4575
4576 PR target/85403
4577 * config/i386/i386.c (get_builtin_code_for_version): Check
4578 error_mark_node.
4579
4580 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
4581
4582 PR target/84331
4583 * gcc/config.gcc: Support "skylake".
4584 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
4585 PROCESSOR_SKYLAKE.
4586 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
4587 (processor_target_table): Add "skylake".
4588 (ix86_option_override_internal): Add "skylake".
4589 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
4590 PROCESSOR_CANNONLAKE.
4591 (get_builtin_code_for_version): Fix priority for
4592 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
4593 PROCESSOR_SKYLAKE-AVX512.
4594 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
4595 (processor_type): Add PROCESSOR_SKYLAKE.
4596
4597 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
4598 Jason Merrill <jason@redhat.com>
4599
4600 PR c++/85112
4601 * convert.c (convert_to_integer_1): Use direct recursion for
4602 enumeral types and types with a precision less than the number
4603 of bits in their mode.
4604
4605 2018-04-16 Julia Koval <julia.koval@intel.com>
4606
4607 PR target/84413
4608 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
4609 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
4610
4611 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
4612
4613 PR target/85293
4614 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
4615 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
4616 and -mno-direct-move.
4617
4618 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
4619
4620 PR target/83402
4621 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
4622 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
4623 Ensure negative shifts result in {0}.
4624
4625 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
4626
4627 PR rtl-optimization/79916
4628 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
4629 regs (if any) to define how to gnerate SD moves when LRA is in
4630 progress.
4631
4632 2018-04-13 Jakub Jelinek <jakub@redhat.com>
4633
4634 PR rtl-optimization/85393
4635 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
4636 * except.c (expand_dw2_landing_pad_for_region): Make static.
4637 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
4638 a label and unconditional jump to old_bb, rather than
4639 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
4640 basic block.
4641
4642 PR rtl-optimization/85376
4643 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
4644 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
4645 instead of a specific value.
4646
4647 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4648 Bin Cheng <bin.cheng@arm.com>
4649
4650 PR tree-optimization/82965
4651 PR tree-optimization/83991
4652 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4653 by_profile_only parameter.
4654 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4655 information if the loop was predicted to iterate too many times.
4656 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4657
4658 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4659
4660 PR lto/71991
4661 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4662 always inline.
4663
4664 2018-04-13 Martin Liska <mliska@suse.cz>
4665 Jakub Jelinek <jakub@redhat.com>
4666
4667 PR middle-end/81657
4668 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4669 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4670 * builtins.c (expand_builtin_memory_copy_args): Use
4671 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4672 handle dest_addr == pc_rtx.
4673
4674 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
4675
4676 PR target/85291
4677 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4678 asked to not generate direct moves.
4679 (fix_trunc<mode>si2_stfiwx): Similar.
4680 (fix_trunc<mode>si2_internal): Similar.
4681
4682 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4683
4684 PR debug/83157
4685 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4686 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4687 lookup if dest in some wider mode is known to be const0_rtx and
4688 if so, record permanent equivalence for it to be ZERO_EXTEND of
4689 the narrower mode destination.
4690
4691 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4692
4693 * lto-streamer-out.c (output_function): Revert 259346.
4694 * omp-expand.c (expand_oacc_for): Likewise.
4695
4696 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
4697
4698 PR rtl-optimization/85354
4699 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4700 * sel-sched.c (sel_global_init): ... here.
4701
4702 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
4703
4704 PR target/85238
4705 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4706 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4707 mode for PE-COFF targets.
4708 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4709 (i386_pe_asm_lto_end): Likewise.
4710 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4711 (TARGET_ASM_LTO_END): Likewise.
4712 * config/i386/winnt.c (saved_debug_info_level): New static variable.
4713 (i386_pe_asm_lto_start): New function.
4714 (i386_pe_asm_lto_end): Likewise.
4715
4716 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4717 Richard Biener <rguenther@suse.de>
4718
4719 PR middle-end/84955
4720 * lto-streamer-out.c (output_function): Fix CFG loop state before
4721 streaming out.
4722 * omp-expand.c (expand_oacc_for): Handle calls to internal
4723 functions like regular functions.
4724
4725 2018-04-12 Richard Biener <rguenther@suse.de>
4726
4727 PR lto/85371
4728 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4729 for the early LTO debug to properly generate references to it
4730 during DIE emission. Do not re-use that for the skeleton for
4731 split-dwarf.
4732 (dwarf2out_early_finish): Likewise.
4733
4734 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4735
4736 PR target/85328
4737 * config/i386/sse.md
4738 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4739 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4740 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4741 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4742 and output is a reg, avoid creating invalid lowpart subreg, but
4743 instead split into a 512-bit move. Don't split if not AVX512VL,
4744 input is xmm16+ reg and output is a mem.
4745 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4746 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4747 xmm16+ reg and output is a mem.
4748
4749 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4750
4751 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4752 also for flag_dwarf2_cfi_asm.
4753
4754 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4755
4756 PR rtl-optimization/85342
4757 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4758 a bool scalar var inside of the loop instead. Don't try to update
4759 recog_data.operand after failed apply_change_group.
4760
4761 2018-04-12 Tom de Vries <tom@codesourcery.com>
4762
4763 PR target/85296
4764 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4765 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
4766 array with flexible array member as array without given dimension.
4767 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4768 argument for undefined param to true.
4769
4770 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
4771
4772 PR target/85321
4773 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4774 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4775 from PowerPC section.
4776 * config/rs6000/sysv4.opt (mcall-): Improve help text.
4777 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4778 help text that is too long.
4779 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4780 help text that is too long.
4781 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4782 help text that is too long.
4783
4784 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
4785
4786 * config/alpha/alpha.md (stack_probe_internal): Rename
4787 from "probe_stack". Update all callers.
4788
4789 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4790
4791 PR rtl-optimization/84566
4792 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4793 sched_macro_fuse_insns.
4794
4795 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4796
4797 PR target/84301
4798 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4799 (compute_block_dependences): ... from here.
4800
4801 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4802
4803 PR tree-optimization/85331
4804 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4805 from int to HOST_WIDE_INT.
4806
4807 2018-04-11 Martin Jambor <mjambor@suse.cz>
4808
4809 PR ipa/84149
4810 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4811 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4812 not the same as the source val.
4813 (cgraph_edge_brings_value_p): New parameter.
4814 (gather_edges_for_value): Pass destination value to
4815 cgraph_edge_brings_value_p.
4816 (perhaps_add_new_callers): Likewise.
4817 (get_info_about_necessary_edges): Likewise and exclude values brought
4818 only by self-recursive edges.
4819 (create_specialized_node): Redirect only clones of self-calling edges.
4820 (+self_recursive_pass_through_p): New function.
4821 (find_more_scalar_values_for_callers_subset): Use it.
4822 (find_aggregate_values_for_callers_subset): Likewise.
4823 (known_aggs_to_agg_replacement_list): Removed.
4824 (decide_whether_version_node): Re-calculate known constants for all
4825 remaining context clones.
4826
4827 2018-04-11 Richard Biener <rguenther@suse.de>
4828
4829 PR lto/85339
4830 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4831 from early DWARF output.
4832 (dwarf2out_early_finish): Output line info unconditionally into
4833 early DWARF and add reference to it.
4834
4835 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4836
4837 PR target/85281
4838 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4839 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4840 other than V2DFmode using iptr mode attribute.
4841 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4842
4843 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4844
4845 PR rtl-optimization/84659
4846 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4847
4848 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4849
4850 PR debug/85302
4851 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4852 SIZEP is NULL.
4853 (output_loc_list): Pass address of a dummy size variable even in the
4854 locview handling loop.
4855 (index_location_lists): Add comment on why skip_loc_list_entry can't
4856 call size_of_locs.
4857
4858 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
4859
4860 PR target/85261
4861 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4862 into register.
4863
4864 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
4865
4866 PR target/85321
4867 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4868 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4869 and -mstring-compare-inline-limit.
4870
4871 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4872
4873 PR target/85287
4874 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4875 for stack clash protection in a register whenever we need it to be in
4876 a register.
4877
4878 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4879
4880 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4881 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4882
4883 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4884
4885 PR target/85321
4886 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4887 the help text.
4888 (mlong-double-): Ditto.
4889 * config/rs6000/sysv4.opt (msdata=): Ditto.
4890 (mtls-size=): Ditto.
4891
4892 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
4893
4894 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4895 erroneous entries for
4896 "vector int vec_ldl (int, long int *)", and
4897 "vector unsigned int vec_ldl (int, unsigned long int *)".
4898 Add comments and entries for
4899 "vector bool char vec_ldl (int, bool char *)",
4900 "vector bool short vec_ldl (int, bool short *)",
4901 "vector bool int vec_ldl (int, bool int *)",
4902 "vector bool long long vec_ldl (int, bool long long *)",
4903 "vector pixel vec_ldl (int, pixel *)",
4904 "vector long long vec_ldl (int, long long *)",
4905 "vector unsigned long long vec_ldl (int, unsigned long long *)".
4906 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4907 type tree bool_long_long_type_node and correct definition of
4908 bool_V2DI_type_node to make reference to this new type tree.
4909 (rs6000_mangle_type): Replace erroneous reference to
4910 bool_long_type_node with bool_long_long_type_node.
4911 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4912 comments to emphasize sign distinctions for char and int types and
4913 replace RS6000_BTI_bool_long constant with
4914 RS6000_BTI_bool_long_long constant. Also add comment to restrict
4915 use of RS6000_BTI_pixel.
4916 (bool_long_type_node): Remove this macro definition.
4917 (bool_long_long_type_node): New macro definition
4918
4919 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4920
4921 PR rtl-optimization/85300
4922 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4923 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4924 simplify_unary_operation fails.
4925
4926 2018-04-10 Martin Liska <mliska@suse.cz>
4927
4928 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4929 cgraph_edge and ipa_ref.
4930
4931 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4932
4933 PR target/85177
4934 PR target/85255
4935 * config/i386/sse.md
4936 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4937 computation of the VEC_MERGE selector from mask.
4938 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4939 Fix decoding of the VEC_MERGE selector into mask.
4940
4941 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4942
4943 PR tree-optimization/85286
4944 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4945
4946 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4947
4948 * final.c (final_1): Set insn_last_address as well as
4949 insn_current_address.
4950
4951 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4952
4953 PR target/85173
4954 * explow.c (emit_stack_probe): Call validize_mem on memory location
4955 before passing it to gen_probe_stack. Create address operand and
4956 legitimize it for the probe_stack_address case.
4957
4958 2018-04-09 Jan Hubicka <jh@suse.cz>
4959
4960 PR lto/85078
4961 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4962 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4963 * tree.c (free_lang_data_in_type): Fix handling of binfos;
4964 walk basetypes.
4965 (free_lang_data): Rebuild type inheritance graph.
4966
4967 2018-04-09 Martin Sebor <msebor@redhat.com>
4968
4969 * invoke.texi (-finline-small-functions): Mention other optimization
4970 options.
4971 (-findirect-inlining, -fpartial-inlining): Same.
4972 (-finline-functions-called-once): Same.
4973 (-freorder-blocks-and-partition): Same.
4974
4975 2018-04-09 Jan Hubicka <jh@suse.cz>
4976
4977 PR rtl/84058
4978 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4979 jumps; choose last target that matches the criteria (i.e.
4980 no partition changes for non-crossing jumps).
4981 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4982 support for redirecting crossing jumps to non-crossing.
4983
4984 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
4985
4986 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4987 also for naked functions.
4988
4989 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
4990
4991 * config/arc/arc.md (add_shift): New pattern.
4992 (add_shift2): Likewise.
4993 (sub_shift): Likewise.
4994 (sub_shift_cmp0_noout): Likewise.
4995 (compare_si_ashiftsi): Likewise.
4996 (xbfu_cmp0_noout): New combine pattern.
4997 (xbfu_cmp0"): Likewise.
4998 (movsi_set_cc_insn): Place the predicable variant first.
4999 (commutative_binary_cmp0_noout): Remove clobber.
5000 (commutative_binary_cmp0): New pattern.
5001 (noncommutative_binary_cmp0): Likewise.
5002 (noncommutative_binary_cmp0_noout): Likewise.
5003 (noncommutative_binary_comparison_result_used): Removed.
5004 (rsub_cmp0): New pattern.
5005 (rsub_cmp0_noout): Likewise.
5006 (extzvsi): Changed, keep only meaningful variants.
5007 (SQH, SEZ): New iterators.
5008 (SQH_postfix): New mode attribute.
5009 (SEZ_prefix): New code attribute.
5010 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5011 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5012 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5013 of numerical value.
5014 (noncommutative_operator): Check the availability of barrel
5015 shifter option.
5016
5017 2018-04-09 Richard Biener <rguenther@suse.de>
5018
5019 PR tree-optimization/85284
5020 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5021 Only use the niter constraining form of simple_iv when the exit
5022 is always executed.
5023
5024 2018-04-09 Tom de Vries <tom@codesourcery.com>
5025
5026 PR target/84041
5027 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5028 (define_expand "*memory_barrier"): New define_expand.
5029 (define_insn "memory_barrier"): New insn.
5030
5031 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5032
5033 PR rtl-optimization/80463
5034 PR rtl-optimization/83972
5035 PR rtl-optimization/83480
5036
5037 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5038 correct producer for the insn.
5039 (tidy_control_flow): Fixup seqnos in case of debug insns.
5040
5041 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5042
5043 PR rtl-optimization/83913
5044
5045 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5046 different sched-times when merging exprs.
5047
5048 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5049
5050 PR rtl-optimization/83962
5051
5052 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5053 tidy_fallthru_edge and tidy_control_flow.
5054
5055 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5056
5057 PR rtl-optimization/83530
5058
5059 * sel-sched.c (force_next_insn): New global variable.
5060 (remove_insn_for_debug): When force_next_insn is true, also leave only
5061 next insn in the ready list.
5062 (sel_sched_region): When the region wasn't scheduled, make another pass
5063 over it with force_next_insn set to 1.
5064
5065 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5066
5067 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5068 into tm_file.
5069 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5070 for interrupt control.
5071 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5072 functions for interrupt control.
5073 * config/nds32/nds32-intrinsic.md: Likewise.
5074 * config/nds32/nds32_intrinsic.h: Likewise.
5075 * config/nds32/nds32.h (nds32_builtins): Likewise.
5076
5077 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5078
5079 * config/nds32/nds32.c (nds32_init_machine_status,
5080 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5081 strict_aligned_p field.
5082 (nds32_expand_to_rtl_hook): New function.
5083 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5084 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5085
5086 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5087 Chung-Ju Wu <jasonwucj@gmail.com>
5088
5089 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5090 * config/nds32/nds32-n7.md: New file.
5091 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5092 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5093 pipeline.
5094 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5095 * config/nds32/nds32.md (pipeline_model): Add n7.
5096 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5097 * config/nds32/pipelines.md: Include n7 settings.
5098
5099 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5100 Chung-Ju Wu <jasonwucj@gmail.com>
5101
5102 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5103 * config/nds32/nds32-e8.md: New file.
5104 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5105 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5106 pipeline.
5107 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5108 * config/nds32/nds32.md (pipeline_model): Add e8.
5109 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5110 * config/nds32/pipelines.md: Include e8 settings.
5111
5112 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5113 Chung-Ju Wu <jasonwucj@gmail.com>
5114
5115 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5116 * config/nds32/nds32-n8.md: New file.
5117 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5118 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5119 pipeline.
5120 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5121 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5122 * config/nds32/nds32.md (pipeline_model): Add n8.
5123 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5124 * config/nds32/pipelines.md: Include n8 settings.
5125
5126 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5127 Chung-Ju Wu <jasonwucj@gmail.com>
5128
5129 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5130 * config/nds32/nds32-n9-2r1w.md: New file.
5131 * config/nds32/nds32-n9-3r2w.md: New file.
5132 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5133 nds32_register_ports): New or modify for cpu n9.
5134 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5135 pipeline.
5136 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5137 * config/nds32/nds32-utils.c: New file.
5138 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5139 TARGET_MUL_SLOW): Define.
5140 * config/nds32/nds32.md (pipeline_model): New attribute.
5141 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5142 New options that support cpu n9.
5143 * config/nds32/pipelines.md: Include n9 settings.
5144 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5145
5146 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5147
5148 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5149 information if necessary.
5150 (output_cond_branch_compare_zero): Likewise.
5151 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5152 (nds32_target_alignment): Refine for alignment.
5153 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5154 (FUNCTION_BOUNDARY): Modify.
5155 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5156 align case.
5157 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5158
5159 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5160
5161 * config/nds32/constants.md (unspec_volatile_element): Add values for
5162 TLB operation and data prefetch.
5163 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5164 functions for TLB operation and data prefetch.
5165 * config/nds32/nds32-intrinsic.md: Likewise.
5166 * config/nds32/nds32_intrinsic.h: Likewise.
5167 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5168 (nds32_print_operand): Likewise.
5169 * config/nds32/nds32.h (nds32_builtins): Likewise.
5170
5171 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5172 Andrew Pinski <pinsika@gcc.gnu.org>
5173
5174 PR middle-end/82976
5175 * match.pd: Use constant_boolean_node of correct type instead of
5176 boolean_true_node or boolean_false_node for simplifying
5177 pointer comparisons to zero.
5178
5179 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5180
5181 PR tree-optimization/80021
5182 * tree.c (verify_type_variant): Make error call in verify_variant_match
5183 translatable and remove final full stop.
5184
5185 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5186
5187 * config/nds32/constants.md (unspec_volatile_element): Add
5188 UNSPEC_VOLATILE_EH_RETURN.
5189 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5190 nds32_output_stack_pop): Support dwarf exception handling process.
5191 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5192 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5193 exception handling process.
5194 (nds32_compute_stack_frame): Likewise.
5195 (nds32_return_addr_rtx): Likewise.
5196 (nds32_initial_elimination_offset): Likewise.
5197 (nds32_expand_prologue): Likewise.
5198 (nds32_expand_epilogue): Likewise.
5199 (nds32_dynamic_chain_address): New function.
5200 * config/nds32/nds32.h (machine_function): Add fields for dwarf
5201 exception handling.
5202 (DYNAMIC_CHAIN_ADDRESS): Define.
5203 (EH_RETURN_DATA_REGNO): Define.
5204 (EH_RETURN_STACKADJ_RTX): Define.
5205 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5206 patterns for dwarf exception handling.
5207
5208 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5209
5210 * config/nds32/nds32.h: Clean up obsolete macros.
5211
5212 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5213
5214 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5215 Add enum values for particular instructions.
5216 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5217 particular intrinsic functions.
5218 * config/nds32/nds32-intrinsic.md: Likewise.
5219 * config/nds32/nds32_intrinsic.h: Likewise.
5220 * config/nds32/nds32.h (nds32_builtins): Likewise.
5221 * config/nds32/nds32.md (type): Add pbsad and pbsada.
5222 (btst, ave): New patterns for particular instructions.
5223
5224 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5225
5226 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5227 Add enum values for atomic load/store and memory sync.
5228 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5229 and memory sync.
5230 * config/nds32/nds32-intrinsic.md: Likewise.
5231 * config/nds32/nds32_intrinsic.h: Likewise.
5232 * config/nds32/nds32.h (nds32_builtins): Likewise.
5233
5234 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5235
5236 PR tree-optimization/85257
5237 * fold-const.c (native_encode_vector): If not all elts could fit
5238 and off is -1, return 0 rather than offset.
5239 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5240 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5241 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
5242 adjust buffer in native_interpret_expr call.
5243
5244 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5245
5246 * config/nds32/constants.md (unspec_volatile_element): Add cache
5247 control enum values.
5248 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5249 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5250 * config/nds32/nds32.c (nds32_cctl_names): New.
5251 (nds32_print_operand): Handle cache control register names.
5252 * config/nds32/nds32.h (nds32_builtins): New enum values.
5253 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5254 macros.
5255 * config/nds32/nds32.md (type): Add mmu.
5256 * config/nds32/pipelines.md (simple_insn): Add mmu.
5257
5258 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5259
5260 * config/nds32/nds32.md (type): Remove call.
5261 * config/nds32/pipelines.md (simple_insn): Likewise.
5262
5263 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5264
5265 * config/nds32/constants.md (unspec_volatile_element): Add
5266 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5267 UNSPEC_VOLATILE_FMFCFG.
5268 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5269 description for fmfcfg and fmfcsr.
5270 (bdesc_1arg): Add fmtcsr.
5271 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5272 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5273 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5274 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5275 unspec_fmfcfg): New patterns.
5276 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5277 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5278 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5279 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5280 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5281 __nds32__fmfcfg): Define.
5282
5283 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5284
5285 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5286 intrinsic register names.
5287 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5288 intrinsic register enum values and macros.
5289
5290 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5291
5292 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5293 for load/store addressing form.
5294 (nds32_print_operand_address): Likewise.
5295
5296 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
5297
5298 PR target/85196
5299 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5300 based on LABEL_REF. Remove useless assertion.
5301 (pic_address_needs_scratch): Fix formatting.
5302 (sparc_legitimize_pic_address): Minor tweaks.
5303 (sparc_delegitimize_address): Adjust assertion accordingly.
5304 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5305 into symbolic_operand.
5306 (movsi_high_pic_label_ref): Likewise.
5307 (movsi_lo_sum_pic_label_ref): Likewise.
5308 (movdi_pic_label_ref): Likewise.
5309 (movdi_high_pic_label_ref): Likewise.
5310 (movdi_lo_sum_pic_label_ref): Likewise.
5311
5312 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
5313
5314 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5315 custom LIB_SPEC setup.
5316
5317 2018-04-06 Ruslan Bukin <br@bsdpad.com>
5318 Kito Cheng <kito.cheng@gmail.com>
5319
5320 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
5321 * config/riscv/freebsd.h: New.
5322
5323 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5324
5325 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
5326 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
5327 file.
5328
5329 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5330 Kito Cheng <kito.cheng@gmail.com>
5331
5332 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
5333 nds32_output_call, nds32_symbol_binds_local_p): New functions.
5334 * config/nds32/nds32-protos.h (nds32_output_call,
5335 nds32_output_return): Declare.
5336 * config/nds32/nds32.md: Refine all the call and return patterns.
5337
5338 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5339
5340 PR debug/85252
5341 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
5342 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
5343
5344 PR rtl-optimization/84872
5345 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
5346 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
5347 EDGE_CROSSING edge.
5348
5349 2018-04-06 Tamar Christina <tamar.christina@arm.com>
5350
5351 * expr.c (copy_blkmode_to_reg): Revert 254862.
5352 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
5353
5354 2018-04-06 Richard Biener <rguenther@suse.de>
5355
5356 PR middle-end/85244
5357 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
5358 after seeing a component reference with an adjacent field. Treat
5359 refs to arrays at struct end of external decls similar to
5360 refs to unconstrained commons.
5361
5362 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5363
5364 PR sanitizer/85213
5365 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
5366 look through SAVE_EXPRs with non-side-effects argument. Adjust
5367 recursive calls.
5368 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
5369 save_p here.
5370
5371 2018-04-06 Richard Biener <rguenther@suse.de>
5372
5373 PR middle-end/85180
5374 * alias.c (find_base_term): New wrapper around find_base_term
5375 unwinding CSELIB_VAL_PTR changes.
5376 (find_base_term): Do not restore CSELIB_VAL_PTR during the
5377 recursion.
5378
5379 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5380
5381 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
5382 instructions.
5383 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
5384 constant definitions.
5385 ("nop"): lr 0,0 -> nopr r0
5386 ("nop_lr0", "nop_lr1"): New insn definitions.
5387
5388 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5389
5390 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
5391 NDS32_V3PUSH_AVAILABLE_P macro.
5392
5393 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
5394 Chung-Ju Wu <jasonwucj@gmail.com>
5395
5396 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
5397 (nds32*-*-*): Add float and fpu_config into supported_defaults.
5398 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
5399 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
5400 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
5401 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
5402 * config/nds32/constraints.md: New constraints and checking for hard
5403 float configuration.
5404 * config/nds32/iterators.md: New mode iterator and attribute for hard
5405 float configuration.
5406 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
5407 patterns.
5408 * config/nds32/nds32-fpu.md: New file.
5409 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
5410 deal with hard float code generation.
5411 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
5412 ARCH_V3S.
5413 (abi_type, float_reg_number): New enum type.
5414 * config/nds32/nds32-predicates.c: New predicates for hard float.
5415 * config/nds32/nds32-protos.h: Declare functions for hard float.
5416 * config/nds32/nds32.c: Implementation for hard float configuration.
5417 * config/nds32/nds32.h: Definitions for hard float configuration.
5418 * config/nds32/nds32.md: Include hard float machine description and
5419 modify patterns for hard float configuration.
5420 * config/nds32/nds32.opt: New options for hard float configuration.
5421 * config/nds32/predicates.md: New predicates for hard float
5422 configuration.
5423
5424 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5425
5426 * common/config/nds32/nds32-common.c
5427 (nds32_option_optimization_table): Enable -mreleax-hint by default.
5428
5429 2018-04-05 Jakub Jelinek <jakub@redhat.com>
5430
5431 PR middle-end/85195
5432 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
5433 CONSTRUCTOR_ELT (ctor, ...)->value.
5434
5435 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
5436
5437 PR target/85193
5438 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
5439
5440 2018-04-05 Tom de Vries <tom@codesourcery.com>
5441
5442 PR target/85204
5443 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
5444 cond jump.
5445
5446 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5447 Kito Cheng <kito.cheng@gmail.com>
5448
5449 * config/nds32/constraints.md (U33): Fine-tune checking condition.
5450 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
5451 * config/nds32/nds32.h (nds32_16bit_address_type): Add
5452 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
5453
5454 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5455 Kito Cheng <kito.cheng@gmail.com>
5456
5457 * config/nds32/constraints.md (Ufe): New memory constraint.
5458 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
5459 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
5460 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
5461 operands.
5462 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
5463 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
5464
5465 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5466
5467 * config/nds32/nds32.md: Use optimize_size in the condition for
5468 alu-shift instructions.
5469
5470 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5471
5472 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
5473
5474 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5475
5476 * config/nds32/nds32.md (negsi2): Refine pattern.
5477
5478 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
5479 Chung-Ju Wu <jasonwucj@gmail.com>
5480
5481 * config/nds32/iterators.md (shift_rotate): New code iterator.
5482 (shift): New code attribute.
5483 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
5484 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
5485 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
5486 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
5487 bit-wise operations.
5488 (andsi3, *andsi3): Ditto.
5489 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
5490 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
5491 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
5492 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
5493 nds32_ior_operand, nds32_xor_operand): New predicates.
5494
5495 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5496
5497 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
5498 (addsi3, subsi3): ... this.
5499
5500 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5501
5502 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
5503
5504 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5505
5506 * config/nds32/nds32.md: Adjust indention.
5507
5508 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
5509
5510 * config/nds32/nds32.md (feature): New attribute.
5511
5512 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5513
5514 * config/nds32/nds32.md (subtype): New attribute.
5515
5516 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
5517
5518 PR target/85203
5519 * config/arm/arm-builtins.c (arm_expand_builtin): Change
5520 expansion to perform a bitwise AND of the argument followed by a
5521 boolean negation of the result.
5522
5523 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
5524
5525 PR rtl-optimization/84878
5526 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5527 the basic block. Assert the use reference is not artificial and that
5528 it has an associated insn.
5529
5530 2018-04-04 Michael Matz <matz@suse.de>
5531
5532 * builtins.c (compute_objsize): Pass correct operand
5533 to array_at_struct_end_p.
5534
5535 2018-04-04 Richard Biener <rguenther@suse.de>
5536
5537 PR lto/85176
5538 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5539 from contexts for DINFO_LEVEL_TERSE and below.
5540
5541 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5542
5543 * config/nds32/nds32-doubleword.md (move_<mode>): Require
5544 resiter_operand condition.
5545 * config/nds32/nds32.md (*move<mode>): Ditto.
5546
5547 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5548 Monk Chiang <sh.chiang04@gmail.com>
5549
5550 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5551
5552 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5553
5554 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5555
5556 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5557 Kito Cheng <kito.cheng@gmail.com>
5558
5559 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5560 nds32_cond_code_str, output_cond_branch,
5561 output_cond_branch_compare_zero, nds32_expand_cbranch,
5562 nds32_expand_cstore, nds32_expand_movcc,
5563 nds32_output_cbranchsi4_equality_zero,
5564 nds32_output_cbranchsi4_equality_reg,
5565 nds32_output_cbranchsi4_equality_reg_or_const_int,
5566 nds32_output_cbranchsi4_greater_less_zero: New functions.
5567 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5568 nds32_expand_cstore, nds32_expand_movcc,
5569 nds32_output_cbranchsi4_equality_zero,
5570 nds32_output_cbranchsi4_equality_reg,
5571 nds32_output_cbranchsi4_equality_reg_or_const_int,
5572 nds32_output_cbranchsi4_greater_less_zero): Declare.
5573 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
5574 nds32_rimm11s_operand): New predicates.
5575 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
5576 * config/nds32/nds32.md: Rewrite all the branch and conditional move
5577 patterns.
5578
5579 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5580
5581 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
5582 * config/nds32/nds32.md: Ditto.
5583 * config/nds32/pipelines.md: Ditto.
5584
5585 2018-04-04 Richard Biener <rguenther@suse.de>
5586
5587 PR tree-optimization/85168
5588 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
5589 propagating abnormals.
5590
5591 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5592
5593 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
5594
5595 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5596 Kito Cheng <kito.cheng@gmail.com>
5597
5598 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
5599 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
5600 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
5601 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
5602 * config/nds32/nds32.md (sibcall_internal): New.
5603 (sibcall_register): Remove.
5604 (sibcall_immediate): Remove.
5605 (sibcall_value_internal): New.
5606 (sibcall_value_register): Remove.
5607 (sibcall_value_immediate): Remove.
5608 * config/nds32/predicates.md (nds32_general_register_operand): New.
5609 (nds32_call_address_operand): New.
5610
5611 2018-04-03 Jakub Jelinek <jakub@redhat.com>
5612
5613 PR rtl-optimization/85167
5614 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
5615 bb_defs if *split_p, instead preinitialize it to NULL.
5616
5617 PR tree-optimization/85156
5618 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
5619 evaluating the argument multiple times.
5620
5621 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
5622
5623 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
5624 than vector.
5625 (_mm_cvtpd_ps): Likewise.
5626 (_mm_cvttpd_epi32): Likewise.
5627 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
5628 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
5629 vector, pixel, and bool following altivec.h include.
5630
5631 2018-04-03 Martin Sebor <msebor@redhat.com>
5632
5633 * doc/extend.texi (Common Function Attributes): Clarify.
5634 (const attribute): Likewise.
5635 (pure attribute): Likewise.
5636
5637 2018-04-03 Jakub Jelinek <jakub@redhat.com>
5638
5639 PR target/85169
5640 * config/i386/i386.c (ix86_expand_vector_set): Use
5641 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
5642
5643 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
5644
5645 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
5646 instructions when changing rounding bits to preserve precision bits
5647 in the x87 control word.
5648
5649 2018-04-03 Martin Liska <mliska@suse.cz>
5650
5651 PR tree-optimization/82491
5652 * rtl.h (strip_offset_and_add): Replace += suboffset with
5653 poly_uint64 () + suboffset.
5654
5655 2018-03-29 Martin Liska <mliska@suse.cz>
5656 Martin Jambor <mjambor@suse.cz>
5657
5658 PR ipa/84947
5659 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5660 param_type is not an integral or pointer type.
5661
5662 2018-04-03 Richard Biener <rguenther@suse.de>
5663
5664 * sese.h (recompute_all_dominators): Remove.
5665
5666 2018-04-02 Martin Sebor <msebor@redhat.com>
5667
5668 * doc/invoke.texi (-Wrestrict): Fix typos.
5669
5670 2018-04-02 Jim Wilson <jimw@sifive.com>
5671
5672 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5673 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5674 (<optab>di3, <optab>si3_extend): Likewise.
5675 (<optab>si3_mask, <optab>si3_mask_1): New.
5676 (<optab>di3_mask, <optab>di3_mask_1): New.
5677 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5678 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5679 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5680
5681 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
5682
5683 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5684 example.
5685
5686 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
5687
5688 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5689 (nds32_canonicalize_comparison): New function.
5690
5691 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5692 Kito Cheng <kito.cheng@gmail.com>
5693 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5694
5695 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5696 * config/nds32/constants.md (unspec_volatile_element): Add
5697 UNSPEC_VOLATILE_RELAX_GROUP.
5698 * config/nds32/nds32-relax-opt.c: New file.
5699 * config/nds32/nds32-predicates.c
5700 (nds32_symbol_load_store_p): New function.
5701 * config/nds32/nds32-protos.h
5702 (nds32_symbol_load_store_p): Declare function.
5703 (make_pass_nds32_relax_opt): Declare new rtl pass function.
5704 * config/nds32/nds32.c
5705 (nds32_register_pass): New function to register pass.
5706 (nds32_register_passes): New function to register passes.
5707 * config/nds32/nds32.md (relax_group): New pattern.
5708 * config/nds32/nds32.opt (mrelax-hint): New option.
5709 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5710
5711 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
5712
5713 * config/nds32/t-nds32: Modify files dependency.
5714
5715 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5716
5717 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5718 (PROFILE_HOOK): Define its implementation.
5719
5720 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5721
5722 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5723 type and 32-bit size.
5724
5725 2018-04-01 Jakub Jelinek <jakub@redhat.com>
5726
5727 PR middle-end/85090
5728 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5729 (V_128_256): New mode iterator.
5730 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5731 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5732 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5733 of V.
5734 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5735 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5736
5737 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
5738
5739 PR target/83315
5740 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5741 NaN inputs correctly.
5742
5743 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
5744
5745 PR target/80546
5746 * config/rs6000/vsx.md (??r): New mode attribute.
5747 (*vsx_mov<mode>_64bit): Use it.
5748 (*vsx_mov<mode>_32bit): Likewise.
5749
5750 2018-03-30 Martin Sebor <msebor@redhat.com>
5751
5752 PR tree-optimization/84818
5753 * builtins.c (check_access): Use warning_n.
5754
5755 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
5756
5757 PR target/83822
5758 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5759 condition.
5760 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5761 condition.
5762
5763 2018-03-30 Julia Koval <julia.koval@intel.com>
5764
5765 PR target/84413
5766 * x86-tune.def (movx, partial_reg_dependency): Enable for
5767 m_SKYLAKE_AVX512.
5768
5769 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
5770
5771 PR inline-asm/84985
5772 * lra-constraints.c (process_alt_operands): Move setting
5773 this_alternative_matches below.
5774
5775 2018-03-29 Martin Liska <mliska@suse.cz>
5776
5777 PR lto/84995.
5778 * doc/invoke.texi: Document how LTO works with debug info.
5779 Describe auto-load support of binutils. Mention 'x86-64'
5780 as valid option value of -march option.
5781
5782 2018-03-29 Jakub Jelinek <jakub@redhat.com>
5783
5784 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5785
5786 PR c/85094
5787 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5788 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5789 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5790 checking.
5791
5792 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5793
5794 PR target/84912
5795 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5796 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5797 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5798 for RS6000_BTM_POWERPC64.
5799 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5800 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5801 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5802 definition.
5803 (DIVDE): Use it.
5804 (DIVDEU): Likewise.
5805
5806 2018-03-28 Carl Love <cel@us.ibm.com>
5807
5808 Revert
5809 2017-09-27 Carl Love <cel@us.ibm.com>
5810
5811 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5812 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5813 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5814 fctiw instruction.
5815
5816 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5817
5818 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5819 instead of __vector bool.
5820 (_mm_max_pu8): Likewise.
5821 (_mm_min_pi16): Likewise.
5822
5823 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5824
5825 PR target/84912
5826 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5827 (DIVWEUO): Likewise.
5828 (DIVDEO): Likewise.
5829 (DIVDEUO): Likewise.
5830 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5831 DIVWEUO and DIVDEUO.
5832 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5833 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5834 (div_extend): Likewise.
5835 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5836 builtin function.
5837 (__builtin_divweuo): Likewise.
5838 (__builtin_divdeo): Likewise.
5839 (__builtin_divdeuo): Likewise.
5840
5841 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5842
5843 PR target/85095
5844 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5845 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5846
5847 PR tree-optimization/82004
5848 * gimple-match-head.c (optimize_pow_to_exp): New function.
5849 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5850 Don't fold to exp if optimize_pow_to_exp is false.
5851
5852 2018-03-28 Martin Liska <mliska@suse.cz>
5853
5854 PR other/84819
5855 * calls.c (initialize_argument_information): Fix trailing space.
5856 * common.opt: Fix typo and provide better explanation for
5857 -fsanitize-coverage option.
5858 * config/i386/i386.opt: Fix typo.
5859
5860 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5861 Martin Liska <mliska@suse.cz>
5862
5863 PR sanitizer/85081
5864 * gimplify.c (asan_poison_variable): Don't do the check for
5865 gimplify_omp_ctxp here.
5866 (gimplify_decl_expr): Do it here.
5867 (gimplify_target_expr): Likewise.
5868
5869 2018-03-28 Martin Liska <mliska@suse.cz>
5870
5871 PR target/84988
5872 * config/i386/i386.c (ix86_function_arg_advance): Do not call
5873 chkp_type_bounds_count if MPX is not enabled.
5874
5875 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
5876
5877 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5878
5879 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5880
5881 PR target/84914
5882 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5883 function to create the function decl for complex long double
5884 multiply and divide for -mabi=ieeelongdouble.
5885 (init_float128_ieee): Call it.
5886
5887 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
5888
5889 PR target/85044
5890 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5891 -fcf-protection=branch -mibt.
5892 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5893
5894 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5895
5896 PR target/81863
5897 * config/arm/arm.c (arm_valid_symbolic_address): Handle
5898 arm_word_relocations.
5899
5900 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
5901
5902 PR target/85056
5903 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5904 extern array declarations.
5905
5906 2018-03-27 Richard Biener <rguenther@suse.de>
5907
5908 PR middle-end/84067
5909 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5910 explicit single_use checks.
5911
5912 2018-03-27 Richard Biener <rguenther@suse.de>
5913
5914 PR tree-optimization/85082
5915 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5916 Valueize the VUSE.
5917
5918 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5919
5920 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5921 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5922 Turn on fasynchronous-unwind-tables and funwind-tables.
5923
5924 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
5925
5926 PR target/85073
5927 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5928 (*bmi_blsr_<mode>_ccz): Ditto.
5929
5930 2018-03-26 Tom de Vries <tom@codesourcery.com>
5931
5932 PR tree-optimization/85063
5933 * omp-general.c (offloading_function_p): New function. Factor out
5934 of ...
5935 * omp-offload.c (pass_omp_target_link::gate): ... here.
5936 * omp-general.h (offloading_function_p): Declare.
5937 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5938 with attribute omp declare target for offloading functions.
5939
5940 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
5941
5942 PR tree-optimization/84005
5943 * tree-data-ref.h (get_base_for_alignment): Declare.
5944 * tree-data-ref.c (get_base_for_alignment_1): New function.
5945 (get_base_for_alignment): Likewise.
5946 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5947 get_base_for_alignment to find a suitable base object, instead
5948 of always using drb->base_address.
5949
5950 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR inline-asm/85022
5953 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5954 known size by default.
5955
5956 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
5957
5958 PR inline-asm/85030
5959 * lra-constraints.c (process_alt_operands): Don't match BLKmode
5960 and non BLKmode operands.
5961
5962 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5963
5964 PR target/85026
5965 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5966 Clean up attributes.
5967
5968 2018-03-23 Richard Biener <rguenther@suse.de>
5969
5970 PR debug/85020
5971 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5972 we are going to emit early debug for LTO.
5973
5974 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5975
5976 PR inline-asm/85034
5977 * function.c (match_asm_constraints_1): Don't optimize if input
5978 doesn't satisfy general_operand predicate for output's mode.
5979
5980 PR inline-asm/85022
5981 * alias.c (write_dependence_p): Don't require for x_canonicalized
5982 non-VOIDmode if x has VOIDmode.
5983
5984 PR sanitizer/85029
5985 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5986 just don't try to optimize it rather than assert it never happens.
5987
5988 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5989
5990 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5991 macro expansions for definition of ST_INTERNAL_<mode> and
5992 LD_INTERNAL_<mode> builtins.
5993 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5994 Remove prototype.
5995 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5996 function.
5997 (altivec_expand_st_builtin): Likewise.
5998 (altivec_expand_builtin): Remove calls to deleted functions.
5999 (rs6000_address_for_altivec): Delete this function.
6000 * config/rs6000/vector.md: Remove expands for
6001 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6002
6003 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6004
6005 PR target/84826
6006 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6007 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6008 re-computing once computed.
6009 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6010 (arm_init_machine_status): Initialize
6011 machine->static_chain_stack_bytes.
6012
6013 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6014
6015 PR target/84760
6016 * doc/extend.texi: Add four new prototypes for vec_ld.
6017 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6018 definitions for more logical presentation.
6019 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6020 entries for V1TI variants of __builtin_altivec_ld builtin.
6021 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6022 handling of V1TI variant of LVX icode pattern.
6023 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6024 (rs6000_gimple_fold_builtin): Likewise.
6025 (altivec_init_builtins): Add code to define
6026 __builtin_altivec_lvx_v1ti function.
6027
6028 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6029
6030 PR inline-asm/84941
6031 * function.c (match_asm_constraints_1): Don't do the optimization
6032 if input isn't a REG, SUBREG, MEM or constant.
6033
6034 2018-03-22 Tom de Vries <tom@codesourcery.com>
6035
6036 PR tree-optimization/84956
6037 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6038 bb_has_abnormal_pred.
6039
6040 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6041
6042 PR sanitizer/85018
6043 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6044 DECL_INITIAL (decl) to decl at the end.
6045 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6046 adjust the comment.
6047
6048 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6049
6050 * doc/extend.texi (__builtin_tgmath): Document when complex
6051 integer types are treated as _Complex _Float64.
6052
6053 2018-03-21 Tom de Vries <tom@codesourcery.com>
6054
6055 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6056
6057 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6058
6059 PR tree-optimization/84960
6060 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6061 if it is ENTRY block, move them into single succ of ENTRY in that case.
6062
6063 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6064
6065 PR tree-optimization/84811
6066 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6067 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6068 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6069 (known_subrange_p): Update accordingly. Cast each value involved
6070 in the size comparison, rather than casting the result of the
6071 subtraction.
6072
6073 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6074
6075 PR tree-optimization/84982
6076 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6077 by flipping the least significant bit rather than all bits from
6078 bitpos to bitpos + bitsize - 1.
6079
6080 2018-03-21 Nathan Sidwell <nathan@acm.org>
6081
6082 * doc/extend.texi (Deprecated Features): Remove mention of
6083 long-deleted deprecations.
6084
6085 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6086
6087 PR jit/84288
6088 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6089 * configure: Regenerate.
6090
6091 2018-03-21 Tom de Vries <tom@codesourcery.com>
6092
6093 PR tree-optimization/83126
6094 * tree-parloops.c (num_phis): New function.
6095 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6096
6097 2018-03-21 Nathan Sidwell <nathan@acm.org>
6098
6099 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6100 mention anon-struct/union members and trailing attributes.
6101
6102 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6103
6104 PR tree-optimization/84969
6105 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6106 builtin memset partitions if they set different rhs values.
6107
6108 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6109
6110 PR rtl-optimization/84989
6111 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6112 VEC_DUPLICATE with scalar result mode.
6113
6114 2018-03-21 Martin Liska <mliska@suse.cz>
6115
6116 PR ipa/84963
6117 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6118 not intended return statement.
6119
6120 2018-03-21 Martin Liska <mliska@suse.cz>
6121
6122 PR target/84988
6123 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6124 (chkp_find_bound_slots_1): Limit number of iterations.
6125
6126 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6127
6128 PR target/84838
6129 * Minor grammar fixes for x86 options.
6130
6131 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6132
6133 PR debug/84875
6134 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6135 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6136
6137 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6138
6139 PR target/83789
6140 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6141 (altivec_lvx_<mode>_1op): Likewise.
6142 (altivec_stvx_<mode>_2op): Likewise.
6143 (altivec_stvx_<mode>_1op): Likewise.
6144 (altivec_lvx_<VM2:mode>): New define_expand.
6145 (altivec_stvx_<VM2:mode>): Likewise.
6146 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6147 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6148 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6149 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6150 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6151 (rs6000_gen_lvx): Likewise.
6152 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6153 (altivec_expand_stv_builtin): Likewise.
6154 (altivec_expand_builtin): Likewise.
6155 * config/rs6000/vector.md: Likewise.
6156
6157 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6158
6159 PR target/82518
6160 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6161 BYTES_BIG_ENDIAN.
6162
6163 2018-03-20 Richard Biener <rguenther@suse.de>
6164
6165 PR target/84986
6166 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6167 sign-conversions as zero, fall back to standard scalar_stmt
6168 cost for the rest.
6169
6170 2018-03-20 Martin Liska <mliska@suse.cz>
6171
6172 PR ipa/84825
6173 * predict.c (rebuild_frequencies): Handle case when we have
6174 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6175
6176 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6177
6178 PR target/84990
6179 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6180 flag_section_anchors.
6181 * varasm.c (use_blocks_for_decl_p): Remove hack for
6182 dw2_force_const_mem.
6183
6184 PR target/84845
6185 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6186 to ...
6187 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
6188 be created, use lowpart_subreg of operands[0] rather than operands[0]
6189 itself.
6190 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6191 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6192 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6193 and n constraint instead of aarch64_shift_imm_di and Usd.
6194 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6195 (*aarch64_<optab>_reg_minus<mode>3): ... this.
6196
6197 2018-03-20 Sudakshina Das <sudi.das@arm.com>
6198
6199 PR target/82989
6200 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6201 to favor GPR over NEON registers.
6202 (<shift>di3_neon): Likewise.
6203
6204 2018-03-20 Tom de Vries <tom@codesourcery.com>
6205
6206 PR target/84952
6207 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6208 (nvptx_process_pars): Emit bar.sync asap and alap.
6209
6210 2018-03-20 Tom de Vries <tom@codesourcery.com>
6211
6212 PR target/84954
6213 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6214 seen_label if seen_label is already set.
6215
6216 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6217
6218 PR target/84945
6219 * config/i386/i386.c (fold_builtin_cpu): For features above 31
6220 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6221 Use 1U instead of 1. Formatting fixes.
6222
6223 PR c/84953
6224 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6225 instead of TREE_TYPE (s1) for the return value.
6226
6227 2018-03-19 Jakub Jelinek <jakub@redhat.com>
6228
6229 PR tree-optimization/84946
6230 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6231 bitsize + bitsize in poly_uint64 rather than poly_int64.
6232
6233 PR sanitizer/78651
6234 * dwarf2asm.c: Include fold-const.c.
6235 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6236 of decl rather than decl itself.
6237
6238 PR rtl-optimization/84643
6239 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6240
6241 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
6242
6243 PR sanitizer/78651
6244 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6245 calling assemble_variable.
6246
6247 2018-03-19 Sudakshina Das <sudi.das@arm.com>
6248
6249 PR target/81647
6250 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6251 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6252
6253 2018-03-19 Jim Wilson <jimw@sifive.com>
6254
6255 PR bootstrap/84856
6256 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6257 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6258 (riscv_first_stack_step): Likewise.
6259 (riscv_option_override): Use STACK_BOUNDARY instead of
6260 MIN_STACK_BOUNDARY.
6261 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6262 MIN_STACK_BOUNDARY.
6263 (BIGGEST_ALIGNMENT): Set to 128.
6264 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6265 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6266 STACK_BOUNDARY.
6267
6268 2018-03-19 Richard Biener <rguenther@suse.de>
6269
6270 PR tree-optimization/84933
6271 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6272 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6273
6274 2018-03-19 Richard Biener <rguenther@suse.de>
6275
6276 PR tree-optimization/84859
6277 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6278 (cond_if_else_store_replacement): Perform sinking operation on
6279 single-store BBs regardless of MAX_STORES_TO_SINK setting.
6280 Generalize what a BB with a single eligible store is.
6281
6282 2018-03-19 Richard Biener <rguenther@suse.de>
6283
6284 PR tree-optimization/84929
6285 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6286 chrec_is_positive against non-chrec arg.
6287
6288 2018-03-19 Tamar Christina <tamar.christina@arm.com>
6289
6290 PR target/84711
6291 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6292
6293 2018-03-18 Martin Liska <mliska@suse.cz>
6294
6295 PR rtl-optimization/84635
6296 * regrename.c (build_def_use): Use matches_mode only when
6297 matches >= 0.
6298
6299 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
6300
6301 PR tree-optimization/84913
6302 * tree-vect-loop.c (vectorizable_reduction): Don't try to
6303 vectorize chains of COND_EXPRs.
6304
6305 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6306
6307 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6308
6309 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6310
6311 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6312
6313 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6314
6315 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6316
6317 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6318 Kito Cheng <kito.cheng@gmail.com>
6319
6320 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
6321 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
6322 (nds32_adjust_reg_alloc_order): New function.
6323 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
6324
6325 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
6326
6327 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
6328 nds32_print_operand, nds32_print_operand_address): Use
6329 HOST_WIDE_INT_PRINT_DEC instead.
6330
6331 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6332
6333 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
6334
6335 2018-03-17 Jakub Jelinek <jakub@redhat.com>
6336
6337 PR target/84902
6338 * config/i386/i386.c (initial_ix86_tune_features,
6339 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
6340 unsigned long long.
6341 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
6342 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
6343 rather than 1u << ix86_tune. Formatting fix.
6344 (ix86_option_override_internal): Change ix86_arch_mask from
6345 unsigned int to unsigned HOST_WIDE_INT, initialize to
6346 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
6347 (ix86_function_specific_restore): Likewise.
6348
6349 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6350
6351 PR target/84899
6352 * postreload.c (reload_combine_recognize_pattern): Perform
6353 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
6354 truncate_int_for_mode the result for the destination's mode.
6355
6356 PR c/84909
6357 * hsa-gen.c (mem_type_for_type): Fix comment typo.
6358 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
6359 Likewise.
6360 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6361 Likewise.
6362
6363 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
6364
6365 PR target/84876
6366 * lra-assigns.c (lra_split_hard_reg_for): Don't use
6367 regno_allocno_class_array and sorted_pseudos.
6368 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
6369 insns where regno is used.
6370
6371 2018-03-16 Martin Liska <mliska@suse.cz>
6372
6373 PR ipa/84833
6374 * multiple_target.c (create_dispatcher_calls): Redirect
6375 reference in the symbol table.
6376
6377 2018-03-16 Martin Liska <mliska@suse.cz>
6378
6379 PR ipa/84722
6380 * multiple_target.c (create_dispatcher_calls): Redirect also
6381 an alias.
6382
6383 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6384
6385 PR c++/79937
6386 PR c++/82410
6387 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
6388 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
6389 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
6390
6391 2018-03-16 Julia Koval <julia.koval@intel.com>
6392
6393 * doc/invoke.texi (Skylake Server): Add CLWB.
6394 Cannonlake): Remove CLWB.
6395
6396 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6397
6398 PR tree-optimization/84841
6399 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
6400 1 << 3.
6401 (FLOAT_ONE_CONST_TYPE): Define.
6402 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
6403 (sort_by_operand_rank): Put entries with higher constant_type last
6404 rather than first to match comments.
6405
6406 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
6407
6408 * config/nios2/nios2.md (movsi_internal): Fix thinko in
6409 split predicate.
6410
6411 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6412
6413 PR c++/79085
6414 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
6415 check and use address of target always.
6416
6417 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
6418
6419 PR target/84574
6420 * config/i386/i386.c (indirect_thunk_needed): Update comments.
6421 (indirect_thunk_bnd_needed): Likewise.
6422 (indirect_thunks_used): Likewise.
6423 (indirect_thunks_bnd_used): Likewise.
6424 (indirect_return_needed): New.
6425 (indirect_return_bnd_needed): Likewise.
6426 (output_indirect_thunk_function): Add a bool argument for
6427 function return.
6428 (output_indirect_thunk_function): Don't generate alias for
6429 function return thunk.
6430 (ix86_code_end): Call output_indirect_thunk_function to generate
6431 function return thunks.
6432 (ix86_output_function_return): Set indirect_return_bnd_needed
6433 and indirect_return_needed instead of indirect_thunk_bnd_needed
6434 and indirect_thunk_needed.
6435
6436 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
6437
6438 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
6439 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
6440 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
6441
6442 2018-03-15 David Malcolm <dmalcolm@redhat.com>
6443 Paul Hua <paul.hua.gm@gmail.com>
6444
6445 PR c/84852
6446 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
6447
6448 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
6449
6450 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
6451 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
6452 resp. SFmode cases.
6453
6454 2018-03-15 Tamar Christina <tamar.christina@arm.com>
6455
6456 PR target/84711
6457 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6458 instead of GET_MODE_SIZE when comparing Units.
6459
6460 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6461
6462 PR target/68256
6463 * varasm.c (hash_section): Return an unchangeble hash value
6464 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
6465 Return !aarch64_can_use_per_function_literal_pools_p ().
6466
6467 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6468
6469 PR target/84860
6470 * optabs.c (emit_conditional_move): Pass address of cmode's copy
6471 rather than address of cmode as last argument to prepare_cmp_insn.
6472
6473 2018-03-15 Julia Koval <julia.koval@intel.com>
6474
6475 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
6476 F_AVX512VNNI, F_AVX512BITALG): New.
6477
6478 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
6479
6480 PR target/83451
6481 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
6482 insn for floating-point loads and stores.
6483
6484 2018-03-14 Carl Love <cel@us.ibm.com>
6485
6486 * config/rs6000/rs6000-c.c: Add macro definitions for
6487 ALTIVEC_BUILTIN_VEC_PERMXOR.
6488 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
6489 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
6490 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
6491 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
6492 UNSPEC_VPERMXOR.
6493 * config/doc/extend.texi: Add prototypes for vec_permxor.
6494
6495 2018-03-14 David Malcolm <dmalcolm@redhat.com>
6496
6497 PR c/84852
6498 * diagnostic-show-locus.c (class layout_point): Convert m_line
6499 from int to linenum_type.
6500 (line_span::comparator): Use linenum "compare" function when
6501 comparing line numbers.
6502 (test_line_span): New function.
6503 (layout_range::contains_point): Convert param "row" from int to
6504 linenum_type.
6505 (layout_range::intersects_line_p): Likewise.
6506 (layout::will_show_line_p): Likewise.
6507 (layout::print_source_line): Likewise.
6508 (layout::should_print_annotation_line_p): Likewise.
6509 (layout::print_annotation_line): Likewise.
6510 (layout::print_leading_fixits): Likewise.
6511 (layout::annotation_line_showed_range_p): Likewise.
6512 (struct line_corrections): Likewise for field m_row.
6513 (line_corrections::line_corrections): Likewise for param "row".
6514 (layout::print_trailing_fixits): Likewise.
6515 (layout::get_state_at_point): Likewise.
6516 (layout::get_x_bound_for_row): Likewise.
6517 (layout::print_line): Likewise.
6518 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
6519 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6520 * input.c (selftest::test_linenum_comparisons): New function.
6521 (selftest::input_c_tests): Call it.
6522 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6523 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6524 * selftest.h (ASSERT_GT): New macro.
6525 (ASSERT_GT_AT): New macro.
6526 (ASSERT_LT): New macro.
6527 (ASSERT_LT_AT): New macro.
6528
6529 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
6530
6531 PR rtl-optimization/84780
6532 * combine.c (distribute_links): Don't make a link based on pc_rtx.
6533
6534 2018-03-14 Martin Liska <mliska@suse.cz>
6535
6536 * tree.c (record_node_allocation_statistics): Use
6537 get_stats_node_kind.
6538 (get_stats_node_kind): New function extracted from
6539 record_node_allocation_statistics.
6540 (free_node): Use get_stats_node_kind.
6541
6542 2018-03-14 Richard Biener <rguenther@suse.de>
6543
6544 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6545 that the value-set of ANTIC_IN doesn't grow.
6546
6547 Revert
6548 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6549 member.
6550 (BB_VISITED_WITH_VISITED_SUCCS): New define.
6551 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6552
6553 2018-03-14 Julia Koval <julia.koval@intel.com>
6554
6555 * config.gcc (icelake-client, icelake-server): New.
6556 (icelake): Remove.
6557 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6558 (initial_ix86_arch_features): Ditto.
6559 (PTA_SKYLAKE): Add SGX.
6560 (PTA_ICELAKE): Remove.
6561 (PTA_ICELAKE_CLIENT): New.
6562 (PTA_ICELAKE_SERVER): New.
6563 (ix86_option_override_internal): Split up icelake on icelake client and
6564 icelake server.
6565 (get_builtin_code_for_version): Ditto.
6566 (fold_builtin_cpu): Ditto.
6567 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6568 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6569 * config/i386/i386.h (processor_type): Ditto.
6570 * doc/invoke.texi: Ditto.
6571
6572 2018-03-14 Jakub Jelinek <jakub@redhat.com>
6573
6574 PR sanitizer/83392
6575 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
6576 INTEGER_CST offset, add it together with bitpos / 8 and
6577 sign extend based on POINTER_SIZE.
6578
6579 PR target/84844
6580 Revert
6581 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
6582
6583 PR target/78090
6584 * config/i386/constraints.md (Yc): New register constraint.
6585 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
6586 Use Yc constraint for alternative 2 of operand 0. Remove
6587 preferred_for_speed attribute.
6588
6589 2018-03-14 Richard Biener <rguenther@suse.de>
6590
6591 PR tree-optimization/84830
6592 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
6593 with the old one to avoid oscillations.
6594
6595 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
6596
6597 PR target/83712
6598 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
6599 pseudos.
6600 (assign_by_spills): Return a flag of reload assignment failure.
6601 Do not process the reload assignment failures. Do not spill other
6602 reload pseudos if they has the same reg class. Update n if
6603 necessary.
6604 (lra_assign): Add a return arg. Set up from the result of
6605 assign_by_spills call.
6606 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6607 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6608 usage_insns if it is not NULL.
6609 (spill_hard_reg_in_range): New function.
6610 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6611 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6612 function prototypes.
6613 (lra_assign): Change prototype.
6614 * lra.c (lra): Add code to deal with fails by splitting hard reg
6615 live ranges.
6616
6617 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
6618
6619 * config/riscv/riscv.opt (mrelax): New option.
6620 * config/riscv/riscv.c (riscv_file_start): Emit ".option
6621 "norelax" when riscv_mrelax is disabled.
6622 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
6623
6624 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6625
6626 PR target/84743
6627 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
6628 reassociation for int modes.
6629
6630 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6631
6632 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
6633 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
6634 for big-endian.
6635 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
6636 * config/aarch64/aarch64-sve.md
6637 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
6638 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
6639 (*extend<mode><Vwide>2): Rename to...
6640 (aarch64_sve_extend<mode><Vwide>2): ...this.
6641 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
6642 renaming the old pattern to...
6643 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
6644 unsigned packs.
6645 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
6646 define_expand, renaming the old pattern to...
6647 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6648 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6649 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6650 account when deciding which SVE instruction the optab should use.
6651 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6652
6653 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6654
6655 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6656 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6657 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6658 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6659 (tlsdesc_small_<mode>): Turn a define_expand and use
6660 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
6661 (tlsdesc_small_advsimd_<mode>): ...this.
6662 (tlsdesc_small_sve_<mode>): New pattern.
6663
6664 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6665
6666 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6667 (UNSPEC_UMUL_HIGHPART): New constants.
6668 (MUL_HIGHPART): New int iteraor.
6669 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6670 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6671 define_expand.
6672 (*<su>mul<mode>3_highpart): New define_insn.
6673
6674 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
6675
6676 PR lto/84805
6677 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6678 incomplete types.
6679
6680 2018-03-13 Martin Liska <mliska@suse.cz>
6681
6682 PR ipa/84658.
6683 * (sem_item_optimizer::sem_item_optimizer): Initialize new
6684 vector.
6685 (sem_item_optimizer::~sem_item_optimizer): Release it.
6686 (sem_item_optimizer::merge_classes): Register variable aliases.
6687 (sem_item_optimizer::fixup_pt_set): New function.
6688 (sem_item_optimizer::fixup_points_to_sets): Likewise.
6689 * ipa-icf.h: Declare new variables and functions.
6690
6691 2018-03-13 Jakub Jelinek <jakub@redhat.com>
6692
6693 PR middle-end/84834
6694 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6695 integer_pow2p@2 and test integer_pow2p in condition.
6696 (A < 0 ? C : 0): Similarly for @1.
6697
6698 PR middle-end/84831
6699 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6700 characters starting at p contain '\0' character, don't look beyond
6701 that.
6702
6703 PR target/84827
6704 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6705 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6706
6707 PR target/84828
6708 * reg-stack.c (change_stack): Change update_end var from int to
6709 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6710 also call set_block_for_insn on the newly added insns and rescan.
6711
6712 PR target/84786
6713 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6714 on the last operand.
6715
6716 PR c++/84704
6717 * tree.c (stabilize_reference_1): Return save_expr (e) for
6718 STATEMENT_LIST even if it doesn't have side-effects.
6719
6720 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
6721
6722 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6723
6724 2018-03-12 Renlin Li <renlin.li@arm.com>
6725
6726 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6727 aarch64_output_scalar_simd_mov_immediate.
6728
6729 2018-03-12 Martin Sebor <msebor@redhat.com>
6730
6731 PR tree-optimization/83456
6732 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6733 for perfectly overlapping calls to memcpy.
6734 (gimple_fold_builtin_memory_chk): Same.
6735 (gimple_fold_builtin_strcpy): Handle no-warning.
6736 (gimple_fold_builtin_stxcpy_chk): Same.
6737 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6738
6739 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6740
6741 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6742 parameter. Use it for SFmode.
6743 (rs6000_function_arg_advance_1): Adjust.
6744 (rs6000_function_arg): Adjust.
6745 (rs6000_gimplify_va_arg): Pass false for that new parameter.
6746
6747 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6748
6749 PR rtl-optimization/84169
6750 PR rtl-optimization/84780
6751 * combine.c (can_combine_p): Check for a 2-insn combination whether
6752 the destination register is used between the two insns, too.
6753
6754 2018-03-12 Richard Biener <rguenther@suse.de>
6755
6756 PR tree-optimization/84803
6757 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6758 for refs DR analysis didn't process.
6759
6760 2018-03-12 Richard Biener <rguenther@suse.de>
6761
6762 PR tree-optimization/84777
6763 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6764 force-vectorize loops ignore whether we are optimizing for size.
6765
6766 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
6767
6768 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6769 (TARGET_MD_ASM_ADJUST): Define.
6770
6771 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
6772 Kito Cheng <kito.cheng@gmail.com>
6773 Chung-Ju Wu <jasonwucj@gmail.com>
6774
6775 * config/nds32/nds32.c (nds32_compute_stack_frame,
6776 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6777 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6778 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6779 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6780 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6781 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6782 * config/nds32/nds32.md (prologue, epilogue): Use macro
6783 NDS32_V3PUSH_AVAILABLE_P to do checking.
6784
6785 2018-03-11 Jakub Jelinek <jakub@redhat.com>
6786
6787 PR debug/58150
6788 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6789 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6790 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
6791 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
6792 addition of most attributes on !orig_type_die or the attribute not
6793 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6794
6795 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6796 Chung-Ju Wu <jasonwucj@gmail.com>
6797
6798 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6799 __NDS32_VH__ macro.
6800 * config/nds32/nds32.opt (mvh): New option.
6801
6802 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6803 Chung-Ju Wu <jasonwucj@gmail.com>
6804
6805 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6806 function.
6807 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6808 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6809 definition.
6810
6811 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6812 Chung-Ju Wu <jasonwucj@gmail.com>
6813
6814 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6815 function.
6816 * config/nds32/nds32-multiple.md (strlensi): New pattern.
6817 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6818
6819 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
6820 Kito Cheng <kito.cheng@gmail.com>
6821 Chung-Ju Wu <jasonwucj@gmail.com>
6822
6823 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6824 UNSPEC_FFMISM and UNSPEC_FLMISM.
6825 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6826 for ffb, ffmism and flmism.
6827 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6828 (unspec_ffmism): Ditto.
6829 (unspec_flmism): Ditto.
6830 (nds32_expand_builtin_impl): Check if string extension is available.
6831 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6832 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6833
6834 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
6835
6836 Reverting patch:
6837 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6838
6839 PR target/83712
6840 * lra-assigns.c (assign_by_spills): Return a flag of reload
6841 assignment failure. Do not process the reload assignment
6842 failures. Do not spill other reload pseudos if they has the same
6843 reg class.
6844 (lra_assign): Add a return arg. Set up from the result of
6845 assign_by_spills call.
6846 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6847 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6848 usage_insns if it is not NULL.
6849 (spill_hard_reg_in_range): New function.
6850 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6851 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6852 function prototypes.
6853 (lra_assign): Change prototype.
6854 * lra.c (lra): Add code to deal with fails by splitting hard reg
6855 live ranges.
6856
6857 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
6858
6859 PR target/84807
6860 * config/i386/i386.opt: Replace Enforcment with Enforcement.
6861
6862 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
6863
6864 PR debug/84620
6865 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6866 (dw_val_node): Add val_symbolic_view.
6867 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6868 (symview_upper_bound): New.
6869 (new_line_info_table): Initialize symviews_since_reset.
6870 (dwarf2out_source_line): Count symviews_since_reset and set
6871 symview_upper_bound.
6872 (dw_val_equal_p): Handle symview.
6873 (add_AT_symview): New.
6874 (print_dw_val): Handle symview.
6875 (attr_checksum, attr_checksum_ordered): Likewise.
6876 (same_dw_val_p, size_of_die): Likewise.
6877 (value_format, output_die): Likewise.
6878 (add_high_low_attributes): Use add_AT_symview for entry_view.
6879 (dwarf2out_finish): Reset symview_upper_bound, clear
6880 zero_view_p.
6881
6882 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
6883
6884 PR target/83969
6885 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6886 Add strict argument and use it.
6887 (rs6000_split_multireg_move): Update for new strict argument.
6888 (mem_operand_gpr): Disallow all non-offsettable addresses.
6889 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6890
6891 2018-03-09 Jakub Jelinek <jakub@redhat.com>
6892
6893 PR target/84772
6894 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6895 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6896 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6897
6898 PR c++/84767
6899 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6900 decl, use remap_type if we want to use the type.
6901
6902 2018-03-09 Martin Sebor <msebor@redhat.com>
6903
6904 PR tree-optimization/84526
6905 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6906 Remove dead code.
6907 (builtin_access::generic_overlap): Be prepared to handle non-array
6908 base objects.
6909
6910 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
6911
6912 PR rtl-optimization/84682
6913 * lra-constraints.c (process_address_1): Check is_address flag
6914 for address constraints.
6915 (process_alt_operands): Likewise.
6916 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6917 preprocess_constraints.
6918 * recog.h (preprocess_constraints): Add oploc parameter.
6919 Adjust callers.
6920 * recog.c (preprocess_constraints): Test address_operand for
6921 CT_ADDRESS constraints.
6922
6923 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6924
6925 PR target/83712
6926 * lra-assigns.c (assign_by_spills): Return a flag of reload
6927 assignment failure. Do not process the reload assignment
6928 failures. Do not spill other reload pseudos if they has the same
6929 reg class.
6930 (lra_assign): Add a return arg. Set up from the result of
6931 assign_by_spills call.
6932 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6933 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6934 usage_insns if it is not NULL.
6935 (spill_hard_reg_in_range): New function.
6936 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6937 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6938 function prototypes.
6939 (lra_assign): Change prototype.
6940 * lra.c (lra): Add code to deal with fails by splitting hard reg
6941 live ranges.
6942
6943 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6944
6945 PR target/83193
6946 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6947 Accept complain bool parameter. Only emit errors if it is true.
6948 (arm_parse_cpu_option_name): Likewise.
6949 (arm_target_thumb_only): Adjust callers of the above.
6950 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6951 prototype to take a default true bool parameter.
6952 (arm_parse_arch_option_name): Likewise.
6953
6954 2018-03-09 David Malcolm <dmalcolm@redhat.com>
6955 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6956
6957 PR jit/64089
6958 PR jit/84288
6959 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6960 * configure: Regenerate.
6961 * configure.ac ("linker --version-script option"): New.
6962 ("linker soname option"): New.
6963
6964 2018-03-09 Richard Biener <rguenther@suse.de>
6965
6966 PR tree-optimization/84775
6967 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6968 immediate uses of predicate stmts and mark them modified.
6969
6970 Revert
6971 PR tree-optimization/84178
6972 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6973 to caller.
6974 (version_loop_for_if_conversion): Delay update_ssa call.
6975 (tree_if_conversion): Delay update_ssa until after predicate
6976 insertion.
6977
6978 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
6979
6980 PR target/84763
6981 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6982 when the function accesses prior frames.
6983
6984 2018-03-08 Jakub Jelinek <jakub@redhat.com>
6985
6986 PR debug/84456
6987 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6988 gen_llsym, otherwise call maybe_gen_llsym.
6989
6990 PR inline-asm/84742
6991 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6992 has ',' character inside of it.
6993
6994 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6995
6996 PR target/84748
6997 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6998 as clobbering CC_REGNUM.
6999
7000 2018-03-08 Richard Biener <rguenther@suse.de>
7001
7002 PR middle-end/84552
7003 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7004 (follow_copies_to_constant): Do not follow SSA names registered
7005 for update.
7006
7007 2018-03-08 Richard Biener <rguenther@suse.de>
7008
7009 PR tree-optimization/84178
7010 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7011 to caller.
7012 (version_loop_for_if_conversion): Delay update_ssa call.
7013 (tree_if_conversion): Delay update_ssa until after predicate
7014 insertion.
7015
7016 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7017
7018 PR tree-optimization/84178
7019 * tree-if-conv.c (release_bb_predicate): Remove the
7020 the assertion that the stmts have NULL use_ops.
7021 Discard the statements, asserting that they haven't
7022 yet been added to a BB.
7023
7024 2018-03-08 Richard Biener <rguenther@suse.de>
7025
7026 PR tree-optimization/84746
7027 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7028 (phi_translate): Pass in destination ANTIC_OUT set.
7029 (phi_translate_1): Likewise. For a simplified result lookup
7030 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7031 (phi_translate_set): Adjust.
7032 (do_pre_regular_insertion): Likewise.
7033 (do_pre_partial_partial_insertion): Likewise.
7034
7035 2018-03-08 Martin Liska <mliska@suse.cz>
7036
7037 PR gcov-profile/84735
7038 * doc/gcov.texi: Document usage of profile files.
7039 * gcov-io.h: Document changes in the format.
7040
7041 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7042
7043 PR debug/84404
7044 PR debug/84408
7045 * dwarf2out.c (struct dw_line_info_table): Update comments for
7046 view == -1.
7047 (FORCE_RESET_NEXT_VIEW): New.
7048 (FORCE_RESETTING_VIEW_P): New.
7049 (RESETTING_VIEW_P): Check for -1 too.
7050 (ZERO_VIEW_P): Likewise.
7051 (new_line_info_table): Force-reset next view.
7052 (dwarf2out_begin_function): Likewise.
7053 (dwarf2out_source_line): Simplify zero_view_p initialization.
7054 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7055 view directly. Omit view when omitting .loc at line 0.
7056
7057 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7058
7059 PR tree-optimization/84740
7060 * tree-switch-conversion.c (process_switch): Call build_constructors
7061 only if info.phi_count is non-zero.
7062
7063 PR tree-optimization/84739
7064 * tree-tailcall.c (find_tail_calls): Check call arguments against
7065 DECL_ARGUMENTS (current_function_decl) rather than
7066 DECL_ARGUMENTS (func) when checking for tail recursion.
7067
7068 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7069
7070 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7071 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7072 Volker Reichelt's entry and add entries for people that perform
7073 GCC fuzzy testing and report numerous bugs.
7074
7075 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7076
7077 PR target/82411
7078 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7079 readonly data in sdata, if that is disabled.
7080 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7081 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7082 -mreadonly-in-sdata option.
7083
7084 2018-03-07 Martin Sebor <msebor@redhat.com>
7085
7086 PR tree-optimization/84468
7087 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7088 basic block when looking for nul assignment.
7089
7090 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7091
7092 PR target/84277
7093 * except.h (output_function_exception_table): Adjust prototype.
7094 * except.c (output_function_exception_table): Remove FNNAME parameter
7095 and add SECTION parameter. Ouput one part of the table at a time.
7096 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7097 the first part of the exception table and emit unwind directives.
7098 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7099 (i386_pe_seh_cold_init): Likewise.
7100 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7101 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7102 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7103 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7104 * config/i386/winnt.c: Include except.h.
7105 (struct seh_frame_state): Add reg_offset, after_prologue and
7106 in_cold_section fields.
7107 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7108 (i386_pe_seh_cold_init): New function.
7109 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7110 to seh->in_cold_section.
7111 (seh_emit_push): Record the offset of the push.
7112 (seh_emit_save): Record the offet of the save.
7113 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7114 Test seh->after_prologue to disregard the epilogue.
7115 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7116 (i386_pe_end_cold_function): New function.
7117
7118 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7119
7120 PR fortran/84565
7121 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7122 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7123
7124 PR c++/84704
7125 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7126 on tmp_var.
7127 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7128 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7129
7130 PR middle-end/84723
7131 * multiple_target.c: Include tree-inline.h and intl.h.
7132 (expand_target_clones): Diagnose and fail if node->definition and
7133 !tree_versionable_function_p (node->decl).
7134
7135 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7136
7137 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7138 sprint_ul.
7139 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7140 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7141 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7142
7143 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7144
7145 PR target/84710
7146 * combine.c (try_combine): Use reg_or_subregno instead of handling
7147 just paradoxical SUBREGs and REGs.
7148
7149 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7150
7151 * config/arc/arc.c (arc_finalize_pic): Remove function.
7152 (arc_must_save_register): We use single base PIC register, remove
7153 checks to save/restore the PIC register.
7154 (arc_expand_prologue): Likewise.
7155 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7156 Remove.
7157 (arc_verify_short): Likewise.
7158 (arc_attr_type): Likewise.
7159 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7160 (walk_stores): Likewise.
7161 (arc_address_cost): Make it static.
7162 (arc_verify_short): Likewise.
7163 (branch_dest): Likewise.
7164 (arc_attr_type): Likewise.
7165 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7166 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7167 (arc_final_prescan_insn): Remove inserting the nops due to
7168 hardware hazards. It is done in reorg step.
7169 (insn_length_variant_t): Remove.
7170 (insn_length_parameters_t): Likewise.
7171 (arc_insn_length_parameters): Likewise.
7172 (arc_get_insn_variants): Likewise.
7173 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7174
7175 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7176
7177 PR inline-asm/84683
7178 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7179 assertion failure.
7180
7181 PR tree-optimization/84687
7182 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7183 on new_node->decl.
7184 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7185
7186 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7187
7188 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7189 Rename to ppc_speculation_barrier.
7190 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7191 __builtin_ppc_speculation_barrier.
7192
7193 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7194
7195 PR target/84700
7196 * combine.c (combine_simplify_rtx): Don't try to simplify if
7197 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7198 are equal to x.
7199
7200 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
7201
7202 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7203 to 32 bytes when compiling for POWER9.
7204
7205 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7206
7207 PR target/84564
7208 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7209 regparm >= 3 with no arg reg available also for calls with
7210 flag_force_indirect_call. Pass decl to ix86_function_regparm.
7211
7212 PR target/84524
7213 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7214 orig,vex.
7215 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
7216
7217 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
7218
7219 PR target/84264
7220 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7221
7222 2018-03-05 Richard Biener <rguenther@suse.de>
7223
7224 PR tree-optimization/84486
7225 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7226 When inserting a __builtin_assume_aligned call set the LHS
7227 SSA name alignment info accordingly.
7228
7229 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
7230
7231 PR tree-optimization/84114
7232 * config/aarch64/aarch64.c (aarch64_reassociation_width)
7233 Avoid reassociation of FLOAT_MODE addition.
7234
7235 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
7236
7237 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7238 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7239 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7240 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7241 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7242 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7243 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7244 and -mwbnoinvd.
7245 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7246 __builtin_ia32_wbinvd): New builtins.
7247 (SPECIAL_ARGS2): New.
7248 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7249 (SPECIAL_ARGS2): New.
7250 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7251 (ix86_valid_target_attribute_inner_p): Ditto.
7252 (ix86_init_mmx_sse_builtins): Add special_args2.
7253 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7254 TARGET_WBNOINVD_P): New.
7255 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7256 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7257 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7258 * config/i386/immintrin.h (_wbinvd): New intrinsic.
7259 * config/i386/pconfigintrin.h: New file.
7260 * config/i386/wbnoinvdintrin.h: Ditto.
7261 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
7262 wbnoinvdintrin.h.
7263 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7264
7265 2018-03-05 Richard Biener <rguenther@suse.de>
7266
7267 PR tree-optimization/84670
7268 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7269 member.
7270 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7271 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7272 (compute_antic_aux): Only assert the number of values in ANTIC_IN
7273 doesn't grow if all successors (recursively) were visited at least
7274 once.
7275
7276 2018-03-05 Richard Biener <rguenther@suse.de>
7277
7278 PR tree-optimization/84650
7279 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7280 if executed in the loop pipeline.
7281
7282 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
7283
7284 * doc/configfiles.texi (Configuration Files): Move info about
7285 conditionalizing $target-protos.h to...
7286 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
7287 differs from $target-protos.h.
7288
7289 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
7290 Chung-Ju Wu <jasonwucj@gmail.com>
7291
7292 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7293 * config/nds32/nds32-multiple.md (setmemsi): Define.
7294 * config/nds32/nds32-memory-manipulation.c
7295 (nds32_gen_dup_4_byte_to_word_value): New.
7296 (emit_setmem_word_loop): New.
7297 (emit_setmem_byte_loop): New.
7298 (nds32_expand_setmem_loop): New.
7299 (nds32_expand_setmem_loop_v3m): New.
7300 (nds32_expand_setmem_unroll): New.
7301 (nds32_expand_setmem): New.
7302
7303 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7304 Chung-Ju Wu <jasonwucj@gmail.com>
7305
7306 * config/nds32/nds32-memory-manipulation.c
7307 (nds32_emit_load_store): New.
7308 (nds32_emit_post_inc_load_store): New.
7309 (nds32_emit_mem_move): New.
7310 (nds32_emit_mem_move_block): New.
7311 (nds32_expand_movmemsi_loop_unknown_size): New.
7312 (nds32_expand_movmemsi_loop_known_size): New.
7313 (nds32_expand_movmemsi_loop): New.
7314 (nds32_expand_movmemsi_unroll): New.
7315 (nds32_expand_movmemqi): Rename ...
7316 (nds32_expand_movmemsi): ... to this.
7317 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7318 (movmemsi): ... to this.
7319 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
7320 (nds32_expand_movmemsi): ... to this.
7321
7322 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7323 Monk Chiang <sh.chiang04@gmail.com>
7324 Chung-Ju Wu <jasonwucj@gmail.com>
7325
7326 * config/nds32/nds32-protos.h
7327 (nds32_expand_load_multiple): New arguments.
7328 (nds32_expand_store_multiple): Ditto.
7329 (nds32_valid_multiple_load_store): Rename ...
7330 (nds32_valid_multiple_load_store_p): ... to this.
7331 * config/nds32/nds32-memory-manipulation.c
7332 (nds32_expand_load_multiple): Refine implementation.
7333 (nds32_expand_store_multiple): Ditto.
7334 * config/nds32/nds32-multiple.md
7335 (load_multiple): Update nds32_expand_load_multiple interface.
7336 (store_multiple): Update nds32_expand_store_multiple interface.
7337 * config/nds32/nds32-predicates.c
7338 (nds32_valid_multiple_load_store): Rename ...
7339 (nds32_valid_multiple_load_store_p): ... to this and refine
7340 implementation.
7341 * config/nds32/predicates.md
7342 (nds32_load_multiple_and_update_address_operation): New predicate.
7343 (nds32_store_multiple_and_update_address_operation): New predicate.
7344
7345 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7346 Chung-Ju Wu <jasonwucj@gmail.com>
7347
7348 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
7349 (combo): New attribute.
7350 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
7351
7352 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
7353
7354 * config/nds32/nds32.opt: Change -mcmodel= default value.
7355
7356 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
7357 Monk Chiang <sh.chiang04@gmail.com>
7358 Chung-Ju Wu <jasonwucj@gmail.com>
7359
7360 * config/nds32/constants.md (unspec_element): New enum.
7361 * config/nds32/constraints.md (Umw): New constraint.
7362 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
7363 * config/nds32/nds32-intrinsic.md: Likewise.
7364 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
7365 (nds32_valid_smw_lwm_base_p): New.
7366 (nds32_output_smw_single_word): New.
7367 (nds32_output_lmw_single_word): New.
7368 (nds32_expand_unaligned_load): New.
7369 (nds32_expand_unaligned_store): New.
7370 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
7371 (nds32_output_smw_single_word): Declare.
7372 (nds32_output_lmw_single_word): Declare.
7373 (nds32_expand_unaligned_load): Declare.
7374 (nds32_expand_unaligned_store): Declare.
7375 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
7376 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
7377 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
7378 NDS32_BUILTIN_UASTORE_DW.
7379 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
7380 predicate.
7381
7382 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
7383 Kito Cheng <kito.cheng@gmail.com>
7384 Chung-Ju Wu <jasonwucj@gmail.com>
7385
7386 * config/nds32/nds32-intrinsic.c
7387 (nds32_expand_builtin_null_ftype_reg): Delete.
7388 (nds32_expand_builtin_reg_ftype_imm): Ditto.
7389 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
7390 (nds32_read_argument): New.
7391 (nds32_legitimize_target): Ditto.
7392 (nds32_legitimize_argument): Ditto.
7393 (nds32_check_constant_argument): Ditto.
7394 (nds32_expand_unop_builtin): Ditto.
7395 (nds32_expand_unopimm_builtin): Ditto.
7396 (nds32_expand_binop_builtin): Ditto.
7397 (nds32_builtin_decl_impl): Ditto.
7398 (builtin_description): Ditto.
7399 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
7400 (nds32_init_builtins_impl): Ditto.
7401 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
7402 (nds32_builtin_decl): New.
7403 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
7404 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
7405
7406 2018-03-02 Jeff Law <law@redhat.com>
7407
7408 * reorg.c (stop_search_p): Handle DEBUG_INSN.
7409 (redundant_insn, fill_simple_delay_slots): Likewise.
7410 (fill_slots_from_thread): Likewise.
7411 * resource.c (mark_referenced_resources): Likewise.
7412 (mark_set_resources, find_dead_or_set_registers): Likewise.
7413
7414 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7415
7416 * substring-locations.h (format_warning_va): Formatting fix for
7417 ATTRIBUTE_GCC_DIAG.
7418 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
7419 argument.
7420 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
7421 * substring-locations.c: Include intl.h.
7422 (format_warning_va): Turned into small wrapper around
7423 format_warning_n_va, renamed to ...
7424 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
7425 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
7426 use ngettext.
7427 (format_warning_at_substring_n): New function.
7428 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
7429 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
7430 format_warning_at_substring with just a shorter name instead of
7431 const function pointer.
7432 (fmtwarn_n): New function.
7433 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
7434 appropriate, get rid of all the fmtstr temporaries, move conditionals
7435 with G_() wrapped string literals directly into fmtwarn arguments,
7436 cast dir.len to (int), formatting fixes.
7437
7438 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
7439
7440 * doc/invoke.texi: Remove "Cilk Plus" references.
7441
7442 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7443 Richard Biener <rguenther@suse.de>
7444
7445 PR ipa/84628
7446 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
7447 for error or warning attributes if CALL_FROM_THUNK_P is set.
7448 Formatting fixes.
7449
7450 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7451
7452 PR target/56540
7453 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
7454 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
7455
7456 PR target/56540
7457 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
7458 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
7459
7460 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
7461 instead of -1U in last predictors element's probability member.
7462
7463 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
7464
7465 PR ipa/83983
7466 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7467 arguments if they are comparable.
7468
7469 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
7470
7471 PR tree-optimization/84634
7472 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
7473 masks and masked_loop_p with a single loop_masks, making sure it's
7474 null for bb vectorization.
7475
7476 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
7477
7478 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7479 (vect_analyze_data_ref_access): Use loop->safe_len rather than
7480 loop->force_vectorize to check whether there is no alias.
7481
7482 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7483
7484 PR target/84614
7485 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
7486 prototypes.
7487 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
7488 comments.
7489 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
7490 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
7491 instead of a loop around prev_real_insn.
7492 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
7493 prev_real_insn.
7494
7495 PR inline-asm/84625
7496 * config/i386/i386.c (ix86_print_operand): Use conditional
7497 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
7498 zero vector.
7499
7500 2018-03-02 Richard Biener <rguenther@suse.de>
7501
7502 PR tree-optimization/84427
7503 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
7504 (bitmap_set_subtract_values): Rewrite to handle multiple
7505 exprs per value.
7506 (clean): Likewise.
7507 (prune_clobbered_mems): Likewise.
7508 (phi_translate): Take edge instead of pred/phiblock.
7509 (phi_translate_1): Likewise.
7510 (phi_translate_set): Likewise. Insert all translated
7511 exprs for a value into the set, keeping possibly multiple
7512 expressions per value.
7513 (compute_antic_aux): Adjust for phi_translate changes.
7514 When intersecting union the expressions and prune those
7515 not in the final value set, keeping possibly multiple
7516 expressions per value. Do not use value-insertion
7517 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7518 all expressions. Add verification that the value-sets
7519 only shrink during iteration.
7520 (compute_partial_antic_aux): Adjust for the phi_translate changes.
7521 (do_pre_regular_insertion): Likewise.
7522 (do_pre_partial_partial_insertion): Likewise.
7523
7524 2018-03-02 Richard Biener <rguenther@suse.de>
7525
7526 PR target/82005
7527 * config/darwin.c (saved_debug_info_level): New static global.
7528 (darwin_asm_lto_start): Disable debug info generation for LTO out.
7529 (darwin_asm_lto_end): Restore debug info generation settings.
7530
7531 2018-03-01 Martin Liska <mliska@suse.cz>
7532
7533 PR sanitizer/82484
7534 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7535 volatile arguments.
7536
7537 2018-03-01 Richard Biener <rguenther@suse.de>
7538
7539 PR debug/84645
7540 * dwarf2out.c (gen_variable_die): Properly handle late VLA
7541 type annotation with LTO when debug was disabled at compile-time.
7542
7543 2018-03-01 Matthew Fortune <mfortune@gmail.com>
7544
7545 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7546 XINT with INTVAL.
7547 (mips_final_postscan_insn): Likewise.
7548
7549 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
7550
7551 PR rtl-optimization/84528
7552 * alias.c (init_alias_target): Add commentary.
7553 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7554 a unique base value if the frame pointer is not eliminated
7555 to the stack pointer.
7556
7557 2018-03-01 Tom de Vries <tom@codesourcery.com>
7558
7559 PR rtl-optimization/83327
7560 * lra-int.h (hard_regs_spilled_into): Declare.
7561 * lra.c (hard_regs_spilled_into): Define.
7562 (init_reg_info): Init hard_regs_spilled_into.
7563 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7564 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7565 (process_bb_lives): Handle hard_regs_spilled_into.
7566 (lra_create_live_ranges_1): Before doing liveness propagation, clear
7567 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7568
7569 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
7570
7571 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
7572 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
7573 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
7574 * config/rs6000/aix72.h: New file.
7575
7576 2018-02-28 Jakub Jelinek <jakub@redhat.com>
7577
7578 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
7579 instead of warning_at with conditional singular and plural messages
7580 where possible.
7581
7582 PR target/52991
7583 * stor-layout.c (update_alignment_for_field): For
7584 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
7585 && !DECL_PACKED (field), do the alignment update, just use
7586 only desired_align instead of MAX (type_align, desired_align)
7587 as the alignment.
7588 (place_field): Don't do known_align < desired_align handling
7589 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
7590 is non-NULL, instead do it after rli->prev_field handling and
7591 only if not within a bitfield word. For DECL_PACKED (field)
7592 use type_align of BITS_PER_UNIT.
7593
7594 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
7595
7596 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
7597 superfluous parentheses and trailing spaces.
7598
7599 2018-02-28 Richard Biener <rguenther@suse.de>
7600
7601 PR tree-optimization/84584
7602 * graphite-scop-detection.c (scop_detection::add_scop): Discard
7603 SCoPs with fake exit edge.
7604
7605 2018-02-28 Martin Liska <mliska@suse.cz>
7606
7607 PR testsuite/84597
7608 * timevar.c (timer::print): Fix format to properly print 100%
7609 values.
7610
7611 2018-02-28 Richard Biener <rguenther@suse.de>
7612
7613 PR middle-end/84607
7614 * genmatch.c (capture_info::walk_match): Do not mark
7615 captured expressions without operands as expr_p given
7616 they act more like predicates and should be subject to
7617 "lost tail" side-effect preserving.
7618
7619 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
7620
7621 PR rtl-optimization/81611
7622 * auto-inc-dec.c (attempt_change): Move dead note from
7623 mem_insn if it's the next use of regno
7624 (find_address): Take address use of reg holding
7625 non-incremented value. Add parm to limit search to the named
7626 reg only.
7627 (merge_in_block): Attempt to use a mem insn that is the next
7628 use of the original regno.
7629
7630 2018-02-27 Martin Sebor <msebor@redhat.com>
7631
7632 PR c++/83871
7633 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
7634 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
7635
7636 2018-02-27 Martin Sebor <msebor@redhat.com>
7637
7638 PR translation/84207
7639 * diagnostic-core.h (warning_n, error_n, inform_n): Change
7640 n argument to unsigned HOST_WIDE_INT.
7641 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
7642 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
7643 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
7644 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
7645
7646 2018-02-27 Richard Biener <rguenther@suse.de>
7647
7648 PR tree-optimization/84512
7649 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7650 Do not use the estimate returned from record_stmt_cost for
7651 the scalar iteration cost but sum properly using add_stmt_cost.
7652
7653 2018-02-27 Richard Biener <rguenther@suse.de>
7654
7655 PR tree-optimization/84466
7656 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7657 Adjust last change to less strictly validate use operands.
7658
7659 2018-02-27 Martin Liska <mliska@suse.cz>
7660
7661 PR gcov-profile/84548
7662 * gcov.c (process_file): Allow partial overlap and consider it
7663 also as group functions.
7664 (output_lines): Properly calculate range of lines for a group.
7665
7666 2018-02-27 Martin Liska <mliska@suse.cz>
7667
7668 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7669 'ggc' suffixes. Change first column width.
7670 (timer::print): Fix formatting of the column.
7671
7672 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
7673
7674 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7675 preserve inline entry blocks for the sake of debug inline
7676 entry point markers alone.
7677 (remove_unused_locals): Suggest in comments a better place to
7678 force the preservation of inline entry blocks that are
7679 otherwise unused, but do not preserve them.
7680
7681 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7682
7683 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7684
7685 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7686
7687 PR target/84039
7688 * config/i386/constraints.md (Bs): Replace
7689 ix86_indirect_branch_register with
7690 TARGET_INDIRECT_BRANCH_REGISTER.
7691 (Bw): Likewise.
7692 * config/i386/i386.md (indirect_jump): Likewise.
7693 (tablejump): Likewise.
7694 (*sibcall_memory): Likewise.
7695 (*sibcall_value_memory): Likewise.
7696 Peepholes of indirect call and jump via memory: Likewise.
7697 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7698 (*sibcall_value_GOT_32): Likewise.
7699 * config/i386/predicates.md (indirect_branch_operand): Likewise.
7700 (GOT_memory_operand): Likewise.
7701 (call_insn_operand): Likewise.
7702 (sibcall_insn_operand): Likewise.
7703 (GOT32_symbol_operand): Likewise.
7704 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7705
7706 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7707
7708 PR rtl-optimization/83496
7709 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7710 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
7711 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7712 redundant insn, if any.
7713 (relax_delay_slots): Likewise.
7714 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7715
7716 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
7717
7718 PR tree-optimization/83965
7719 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7720 that grouped statements are part of a reduction chain. Return
7721 true if the statement is not marked as a reduction itself but
7722 is part of a group.
7723 (vect_recog_dot_prod_pattern): Don't check whether the statement
7724 is part of a group here.
7725 (vect_recog_sad_pattern): Likewise.
7726 (vect_recog_widen_sum_pattern): Likewise.
7727
7728 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7729
7730 PR debug/84545
7731 * final.c (rest_of_clean_state): Also look for calls inside sequences.
7732
7733 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7734
7735 PR target/84530
7736 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7737 the bool argument.
7738 (ix86_output_indirect_function_return): New prototype.
7739 (ix86_split_simple_return_pop_internal): Likewise.
7740 * config/i386/i386.c (indirect_return_via_cx): New.
7741 (indirect_return_via_cx_bnd): Likewise.
7742 (indirect_thunk_name): Handle return va CX_REG.
7743 (output_indirect_thunk_function): Create alias for
7744 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7745 (ix86_output_indirect_jmp): Remove the bool argument.
7746 (ix86_output_indirect_function_return): New function.
7747 (ix86_split_simple_return_pop_internal): Likewise.
7748 * config/i386/i386.md (*indirect_jump): Don't pass false
7749 to ix86_output_indirect_jmp.
7750 (*tablejump_1): Likewise.
7751 (simple_return_pop_internal): Change it to define_insn_and_split.
7752 Call ix86_split_simple_return_pop_internal to split it for
7753 -mfunction-return=.
7754 (simple_return_indirect_internal): Call
7755 ix86_output_indirect_function_return instead of
7756 ix86_output_indirect_jmp.
7757
7758 2018-02-26 Jakub Jelinek <jakub@redhat.com>
7759
7760 PR bootstrap/84405
7761 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7762 memset and value initialization afterwards.
7763
7764 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
7765
7766 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7767
7768 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7769
7770 PR target/84521
7771 * common/config/aarch64/aarch64-common.c
7772 (aarch_option_optimization_table[]): Switch
7773 off fomit-frame-pointer
7774
7775 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7776 Chung-Ju Wu <jasonwucj@gmail.com>
7777
7778 * config/nds32/nds32-multiple.md (load_multiple): Disallow
7779 volatile memory.
7780 (store_multiple): Ditto.
7781
7782 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7783
7784 * config.gcc: Add --with-cpu support for nds32 target.
7785 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7786 * config/nds32/nds32.opt: Add -mcpu= option.
7787
7788 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
7789
7790 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7791 isel=yes): Warn for these deprecated options.
7792
7793 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
7794
7795 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7796 ISA_2_5_MASKS_EMBEDDED.
7797
7798 2018-02-23 Jakub Jelinek <jakub@redhat.com>
7799
7800 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7801 p->max as pointers rather than using iterative_hash_expr.
7802
7803 2018-02-23 Carl Love <cel@us.ibm.com>
7804
7805 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7806 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7807 BU_P8V_OVERLOAD_2.
7808 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7809 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7810 P8V_BUILTIN_VEC_VUNSIGNED2.
7811
7812 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
7813
7814 PR target/81572
7815 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7816 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7817 LRA_UNKNOWN_ALT.
7818 * lra-constraints.c (curr_insn_transform): Set up
7819 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
7820 LRA_UNKNOWN_ALT.
7821 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7822 * lra-eliminations.c (spill_pseudos): Ditto.
7823 (process_insn_for_elimination): Ditto.
7824 * lra-lives.c (reg_early_clobber_p): Use the new macros.
7825 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7826 LRA_NON_CLOBBERED_ALT.
7827
7828 2018-02-22 Martin Sebor <msebor@redhat.com>
7829
7830 PR tree-optimization/84480
7831 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7832 to maybe_diag_stxncpy_trunc. Call it.
7833 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7834 from gimple_fold_builtin_strcpy. Print inlining stack.
7835 (handle_builtin_stxncpy): Print inlining stack.
7836 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7837
7838 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
7839
7840 PR target/84176
7841 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7842 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7843 and -fcheck-pointer-bounds are used together.
7844 (indirect_thunk_prefix): New enum.
7845 (indirect_thunk_need_prefix): New function.
7846 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
7847 "_nt" instead of "_bnd" for NOTRACK prefix.
7848 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7849 (output_indirect_thunk_function): Likewise.
7850 (): Likewise.
7851 (ix86_code_end): Update output_indirect_thunk_function calls.
7852 (ix86_output_indirect_branch_via_reg): Replace
7853 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7854 (ix86_output_indirect_branch_via_push): Likewise.
7855 (ix86_output_function_return): Likewise.
7856 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7857 incompatible with -fcf-protection=branch and
7858 -fcheck-pointer-bounds.
7859
7860 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7861
7862 PR target/83335
7863 * config/aarch64/aarch64.c (aarch64_print_address_internal):
7864 Change gcc_assert call to output_operand_lossage.
7865
7866 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7867
7868 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7869
7870 2018-02-22 DJ Delorie <dj@redhat.com>
7871 Sebastian Perta <sebastian.perta@renesas.com>
7872 Oleg Endo <olegendo@gcc.gnu.org>
7873
7874 * config/rx/rx.c (rx_rtx_costs): New function.
7875 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7876
7877 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
7878
7879 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7880
7881 2018-02-22 Martin Liska <mliska@suse.cz>
7882
7883 PR driver/83193
7884 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7885 Add "native" as a possible value.
7886
7887 2018-02-22 Martin Liska <mliska@suse.cz>
7888
7889 PR driver/83193
7890 * config/i386/i386.c (ix86_option_override_internal):
7891 Add "native" as a possible value for -march and -mtune.
7892
7893 2018-02-22 Jakub Jelinek <jakub@redhat.com>
7894
7895 PR target/84502
7896 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7897 to all type variants.
7898
7899 PR tree-optimization/84503
7900 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7901 width as info->bitpos + info->bitsize - start.
7902 (merged_store_group::merge_overlapping): Simplify width computation.
7903 (check_no_overlap): New function.
7904 (imm_store_chain_info::try_coalesce_bswap): Compute expected
7905 start + width and last_order of the group, fail if check_no_overlap
7906 fails.
7907 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7908 to group if check_no_overlap fails.
7909
7910 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7911
7912 * config/rs6000/altivec.md: Delete contraint arguments to
7913 define_expand, define_split, and define_peephole2, and in
7914 define_insn_and_split if always unused.
7915 * config/rs6000/darwin.md: Ditto.
7916 * config/rs6000/dfp.md: Ditto.
7917 * config/rs6000/rs6000.md: Ditto.
7918 * config/rs6000/sync.md: Ditto.
7919 * config/rs6000/vector.md: Ditto.
7920 * config/rs6000/vsx.md: Ditto.
7921
7922 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7923
7924 * config/rs6000/altivec.md: Write output control strings as braced
7925 blocks instead of double-quoted strings.
7926 * config/rs6000/darwin.md: Ditto.
7927 * config/rs6000/rs6000.md: Ditto.
7928 * config/rs6000/vector.md: Ditto.
7929 * config/rs6000/vsx.md: Ditto.
7930
7931 2018-02-21 Jason Merrill <jason@redhat.com>
7932
7933 PR c++/84314 - ICE with templates and fastcall attribute.
7934 * attribs.c (build_type_attribute_qual_variant): Remove assert.
7935
7936 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7937
7938 * ipa-cp.c (determine_versionability): Fix comment typos.
7939
7940 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7941
7942 PR c/84229
7943 * ipa-cp.c (determine_versionability): Do not version functions caling
7944 va_arg_pack.
7945
7946 2018-02-21 Martin Liska <mliska@suse.cz>
7947
7948 PR driver/83193
7949 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7950 Add "native" as a possible value.
7951 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
7952 the macro when native cpu detection is available.
7953
7954 2018-02-21 Martin Liska <mliska@suse.cz>
7955
7956 PR driver/83193
7957 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7958 Add "native" as a possible value.
7959 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7960 when native cpu detection is available.
7961
7962 2018-02-21 Jakub Jelinek <jakub@redhat.com>
7963 Martin Sebor <msebor@redhat.com>
7964
7965 PR tree-optimization/84478
7966 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7967 false.
7968 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7969 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7970 support which is conservatively correct, for 2 only stay conservative
7971 for maxlen. Formatting and comment capitalization fixes. Add STRICT
7972 argument to the 2 argument get_range_strlen, adjust 6 arg
7973 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7974 false.
7975 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7976 (gimple_fold_builtin_strlen): Pass true as last argument to
7977 get_range_strlen.
7978
7979 2018-02-20 Martin Sebor <msebor@redhat.com>
7980
7981 PR middle-end/84095
7982 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7983 (builtin_memref::set_base_and_offset): Same. Handle inner references.
7984 (builtin_memref::builtin_memref): Factor out parts into
7985 set_base_and_offset and call it.
7986
7987 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
7988
7989 PR middle-end/84406
7990 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7991 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7992 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
7993 search at the associated MODE_INT.
7994
7995 2018-02-20 Jeff Law <law@redhat.com>
7996
7997 PR middle-end/82123
7998 PR tree-optimization/81592
7999 PR middle-end/79257
8000 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8001 for range data rather than using global data.
8002 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8003 range data rather than using global data.
8004 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8005 pass it to children as needed.
8006 (struct directive::fmtresult): Similarly.
8007 (struct directive::set_width): Similarly.
8008 (struct directive::set_precision): Similarly.
8009 (format_integer, format_directive, parse_directive): Similarly.
8010 (format_none): Accept unnamed vr_values parameter.
8011 (format_percent, format_floating, format_character): Similarly.
8012 (format_string, format_plain): Similarly.
8013 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8014 the EVRP range analyzer for range data rather than using global data.
8015 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8016 gimple-ssa-evrp-analyze.h
8017 (class sprintf_dom_walker): Add after_dom_children member function.
8018 Add evrp_range_analyzer member.
8019 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8020 range analyzer as needed.
8021 (sprintf_dom_walker::after_dom_children): New member function.
8022 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8023 if not optimizing.
8024 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8025 (evrp_range_analyzer::pop_to_marker): Likewise.
8026
8027 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8028
8029 PR tree-optimization/84419
8030 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8031 with the required type if its current type is compatible but
8032 different.
8033
8034 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8035
8036 PR middle-end/82004
8037 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8038 after vectorization.
8039
8040 2018-02-20 Martin Liska <mliska@suse.cz>
8041
8042 PR driver/83193
8043 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8044 possible values if we don't have a hint.
8045
8046 2018-02-20 Martin Liska <mliska@suse.cz>
8047
8048 PR c/84310
8049 PR target/79747
8050 * final.c (shorten_branches): Build align_tab array with one
8051 more element.
8052 * opts.c (finish_options): Add alignment option limit check.
8053 (MAX_CODE_ALIGN): Likewise.
8054 (MAX_CODE_ALIGN_VALUE): Likewise.
8055 * doc/invoke.texi: Document maximum allowed option value for
8056 all -falign-* options.
8057
8058 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8059
8060 PR target/84146
8061 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8062 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8063 * var-tracking.c (emit_note_insn_var_location): Remove all references
8064 to NOTE_INSN_CALL_ARG_LOCATION.
8065 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8066 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8067 Use copy_rtx_if_shared.
8068 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8069 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8070 (dwarf2out_var_location): Remove handling of
8071 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8072 on call_insn.
8073 * final.c (final_scan_insn): Remove all references to
8074 NOTE_INSN_CALL_ARG_LOCATION.
8075 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8076 before dumping final insns.
8077 * except.c (emit_note_eh_region_end): Remove all references to
8078 NOTE_INSN_CALL_ARG_LOCATION.
8079 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8080 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8081 * config/arc/arc.c (hwloop_optimize): Likewise.
8082 * config/arm/arm.c (create_fix_barrier): Likewise.
8083 * config/s390/s390.c (s390_chunkify_start): Likewise.
8084 * config/sh/sh.c (find_barrier): Likewise.
8085 * config/i386/i386.c (rest_of_insert_endbranch,
8086 ix86_seh_fixup_eh_fallthru): Likewise.
8087 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8088 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8089 * config/frv/frv.c (frv_function_prologue): Likewise.
8090 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8091 reg note.
8092 (note_outside_basic_block_p): Remove all references to
8093 NOTE_INSN_CALL_ARG_LOCATION.
8094 * gengtype.c (adjust_field_rtx_def): Likewise.
8095 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8096 Likewise.
8097 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8098 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8099
8100 PR c++/84444
8101 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8102 is ADDR_EXPR.
8103
8104 PR tree-optimization/84452
8105 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8106 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8107 is NULL.
8108
8109 2018-02-19 Martin Liska <mliska@suse.cz>
8110
8111 PR sanitizer/82183
8112 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8113
8114 2018-02-19 Martin Liska <mliska@suse.cz>
8115 Richard Sandiford <richard.sandiford@linaro.org>
8116
8117 PR tree-optimization/82491
8118 * gimple-fold.c (get_base_constructor): Make earlier bail out
8119 to prevent ubsan.
8120
8121 2018-02-19 Carl Love <cel@us.ibm.com>
8122
8123 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8124 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8125 BU_P8V_OVERLOAD_1.
8126 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8127 P8V_BUILTIN_VEC_NEG.
8128
8129 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8130
8131 * config/rl78/rl78.md (movdf): New define expand.
8132
8133 2018-02-19 Martin Liska <mliska@suse.cz>
8134
8135 PR other/80589
8136 * doc/invoke.texi: Fix typo.
8137 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8138
8139 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8140
8141 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8142 handle rs6000_single_float and rs6000_double_float specially for
8143 e500 family CPUs.
8144
8145 2018-02-16 Jeff Law <law@redhat.com>
8146
8147 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8148 (pop_regs): Use it.
8149
8150 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8151
8152 PR ipa/84425
8153 * ipa-inline.c (inline_small_functions): Fix a typo.
8154
8155 2018-02-16 Nathan Sidwell <nathan@acm.org>
8156
8157 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8158
8159 2018-02-16 Carl Love <cel@us.ibm.com>
8160
8161 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8162 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8163 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8164 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8165 expansion to P8V_BUILTIN_VEC_FLOAT2.
8166
8167 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8168
8169 PR rtl-optimization/70023
8170 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8171 src_regno into account.
8172
8173 2018-02-16 Carl Love <cel@us.ibm.com>
8174
8175 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8176 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8177 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8178 * config/rs6000/rs6000.c: Remove case statements for
8179 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8180 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8181 and P9V_BUILTIN_VEC_VINSERT4B.
8182 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8183 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8184 * config/rs6000/vsx.md:
8185 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8186 vec_insert4b.
8187
8188 2018-02-16 Carl Love <cel@us.ibm.com>
8189
8190 * config/rs6000/altivec.h: Add builtin names vec_extract4b
8191 vec_insert4b.
8192 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8193 definitions.
8194 * config/rs6000/rs6000-c.c: Add the definitions for
8195 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8196 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8197 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8198 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
8199 definition for insert4b and define insn *insert3b_internal.
8200 * doc/extend.texi: Add documentation for vec_extract4b.
8201
8202 2018-02-16 Nathan Sidwell <nathan@acm.org>
8203
8204 * doc/extend.texi (Backwards Compatibility): Mention friend
8205 injection. Note for-scope is deprecated.
8206 * doc/invoke.texi (-ffriend-injection): Deprecate.
8207
8208 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
8209
8210 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8211 that moved to I2, also allow destinations that are a paradoxical
8212 subreg (instead of a normal reg).
8213
8214 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
8215
8216 PR target/83831
8217 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8218 to QImode.
8219
8220 2018-02-16 Richard Biener <rguenther@suse.de>
8221
8222 PR tree-optimization/84037
8223 PR tree-optimization/84016
8224 PR target/82862
8225 * config/i386/i386.c (ix86_builtin_vectorization_cost):
8226 Adjust vec_construct for the fact we need additional higher latency
8227 128bit inserts for AVX256 and AVX512 vector builds.
8228 (ix86_add_stmt_cost): Scale vector construction cost for
8229 elementwise loads.
8230
8231 2018-02-16 Richard Biener <rguenther@suse.de>
8232
8233 PR tree-optimization/84417
8234 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8235 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8236 (non_rewritable_lvalue_p): Likewise, use poly-ints.
8237
8238 2018-02-16 Martin Liska <mliska@suse.cz>
8239
8240 PR sanitizer/84307
8241 * internal-fn.def (ASAN_CHECK): Set proper flags.
8242 (ASAN_MARK): Likewise.
8243
8244 2018-02-16 Julia Koval <julia.koval@intel.com>
8245
8246 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8247 from PTA_CANNONLAKE.
8248
8249 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8250
8251 PR target/84272
8252 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8253 Use ++iter rather than iter++ for std::list iterators.
8254 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
8255 defer deleting them until all nodes in the forest are processed. Do
8256 free even leaf nodes. Change to_process into auto_vec.
8257
8258 PR bootstrap/84405
8259 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8260 * vec.h (vec_default_construct): Use memset instead of placement new
8261 if BROKEN_VALUE_INITIALIZATION is defined.
8262 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8263 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8264 is defined.
8265
8266 PR rtl-optimization/83723
8267 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8268 * lra.c (lra_substitute_pseudo): Likewise. If true, use
8269 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
8270 recursive calls.
8271 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8272 callers.
8273 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8274
8275 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
8276
8277 PR rtl-optimization/81443
8278 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8279 from inner REGs to paradoxical SUBREGs.
8280
8281 2018-02-16 Richard Biener <rguenther@suse.de>
8282
8283 PR tree-optimization/84399
8284 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8285 For operands we can analyze at their definition make sure we can
8286 analyze them at each use as well.
8287
8288 2018-02-16 Richard Biener <rguenther@suse.de>
8289
8290 PR tree-optimization/84190
8291 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8292 volatile accesses if the decl isn't volatile.
8293
8294 2018-02-15 Jason Merrill <jason@redhat.com>
8295
8296 PR c++/84314 - ICE with templates and fastcall attribute.
8297 * attribs.c (build_type_attribute_qual_variant): Don't clobber
8298 TYPE_CANONICAL on an existing type.
8299
8300 2018-02-15 Jakub Jelinek <jakub@redhat.com>
8301
8302 PR tree-optimization/84383
8303 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8304 dstoff nor call operand_equal_p if dstbase is NULL.
8305
8306 PR tree-optimization/84334
8307 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8308 also a CONSTANT_CLASS_P, punt.
8309
8310 2018-02-14 Jim Wilson <jimw@sifive.com>
8311
8312 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8313 first SMALL_OPERAND check. New local min_second_step. Move assert
8314 to where locals are set. Add TARGET_RVC support.
8315 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8316
8317 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
8318
8319 * doc/invoke.texi: Correct -Wformat-overflow code sample.
8320
8321 2018-02-14 Martin Sebor <msebor@redhat.com>
8322
8323 PR tree-optimization/83698
8324 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
8325 arrays constrain the offset range to their bounds.
8326 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
8327 (builtin_access::overlap): Avoid setting the size of overlap if it's
8328 already been set.
8329 (maybe_diag_overlap): Also consider arrays when deciding what values
8330 of offsets to include in diagnostics.
8331
8332 2018-02-14 Martin Sebor <msebor@redhat.com>
8333
8334 PR c/84108
8335 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
8336 that correspond to the kind of a declaration.
8337
8338 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
8339
8340 PR target/83984
8341 * config/pa/pa.md: Load address of PIC label using the linkage table
8342 if the label is nonlocal.
8343
8344 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
8345
8346 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
8347 warning message if user requests -maltivec=be.
8348 * doc/invoke.texi: Document deprecation of -maltivec=be.
8349
8350 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
8351
8352 PR target/84220
8353 * config/rs6000/rs6000-c.c: Update definitions for
8354 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
8355 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
8356
8357 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8358
8359 PR target/84239
8360 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
8361 add _get_ssp intrinsics. Remove argument from
8362 __builtin_ia32_rdssp[d|q].
8363 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
8364 * config/i386/i386-builtin.def: Remove argument from
8365 __builtin_ia32_rdssp[d|q].
8366 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
8367 ix86_expand_special_args_builtin for _rdssp[d|q].
8368 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
8369 Clear register before usage.
8370 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
8371 Add documentation for new _get_ssp and _inc_ssp intrinsics.
8372
8373 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
8374
8375 PR tree-optimization/84357
8376 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
8377 operand 1 of an ARRAY_REF too.
8378
8379 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
8380
8381 PR target/83831
8382 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
8383 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8384 declarations.
8385 (set_of_reg): New struct.
8386 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
8387 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
8388 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8389 functions.
8390 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
8391 Split into bitclr, bitset, bitinvert patterns if appropriate.
8392 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
8393 use rx_fuse_in_memory_bitop.
8394 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
8395 to named insn, correct maximum insn length.
8396
8397 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
8398
8399 PR target/79242
8400 * machmode.def: Define a complex mode for PARTIAL_INT.
8401 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
8402 MODE_PARTIAL_INT.
8403 * doc/rtl.texi: Document CSPImode.
8404 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
8405 handling.
8406 (msp430_hard_regno_nregs_with_padding): Likewise.
8407
8408 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
8409
8410 PR target/84279
8411 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
8412
8413 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
8414
8415 PR rtl-optimization/84169
8416 * combine.c (try_combine): New variable split_i2i3. Set it to true if
8417 we generated a parallel as new i3 and we split that to new i2 and i3
8418 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
8419 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
8420 those to i2, not i1. Partially rewrite this scan code.
8421
8422 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8423
8424 PR c/82210
8425 * stor-layout.c (place_field): For variable length fields, adjust
8426 offset_align afterwards not just based on the field's alignment,
8427 but also on the size.
8428
8429 PR middle-end/84309
8430 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
8431 of exps and logs in the use_exp2 case.
8432
8433 2018-02-13 Jeff Law <law@redhat.com>
8434
8435 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
8436 entry for "vector".
8437
8438 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
8439 ARGS as unused.
8440
8441 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
8442
8443 PR debug/84342
8444 PR debug/84319
8445 * common.opt (gas-loc-support, gas-locview-support): New.
8446 (ginline-points, ginternal-reset-location-views): New.
8447 * doc/invoke.texi: Document them. Use @itemx where intended.
8448 (gvariable-location-views): Adjust.
8449 * target.def (reset_location_view): New.
8450 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
8451 (TARGET_RESET_LOCATION_VIEW): New.
8452 * doc/tm.texi: Rebuilt.
8453 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
8454 (dwarf2out_default_as_locview_support): New.
8455 (output_asm_line_debug_info): Use option variables.
8456 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
8457 (output_loc_list): Likewise.
8458 (add_high_low_attributes): Check option variables.
8459 Don't output entry view attribute in strict mode.
8460 (gen_inlined_subroutine_die): Check option variables.
8461 (dwarf2out_inline_entry): Likewise.
8462 (init_sections_and_labels): Likewise.
8463 (dwarf2out_early_finish): Likewise.
8464 (maybe_reset_location_view): New, from...
8465 (dwarf2out_var_location): ... here. Call it.
8466 * debug.h (dwarf2out_default_as_loc_support): Declare.
8467 (dwarf2out_default_as_locview_support): Declare.
8468 * hooks.c (hook_int_rtx_insn_0): New.
8469 * hooks.h (hook_int_rtx_insn_0): Declare.
8470 * toplev.c (process_options): Take -gas-loc-support and
8471 -gas-locview-support from dwarf2out. Enable
8472 -gvariable-location-views by default only with locview
8473 assembler support. Enable -ginternal-reset-location-views by
8474 default only if the target defines the corresponding hook.
8475 Enable -ginline-points by default if location views are
8476 enabled; force it disabled if statement frontiers are
8477 disabled.
8478 * tree-inline.c (expand_call_inline): Check option variables.
8479 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8480
8481 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
8482
8483 PR tree-optimization/84321
8484 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
8485 handling. Also check whether the anti-range contains any values
8486 that satisfy the mask; switch to a VR_RANGE if not.
8487
8488 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
8489
8490 PR sanitizer/84340
8491 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
8492
8493 2018-02-13 Martin Jambor <mjambor@suse.cz>
8494
8495 PR c++/83990
8496 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
8497 of call statements, also set location of a load to a temporary.
8498
8499 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
8500
8501 * config/rl78/rl78.c (add_vector_labels): New function.
8502 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
8503 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
8504 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
8505 which checks that no arguments are passed.
8506 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
8507 * doc/extend.texi: Documentation for the new attribute.
8508
8509 2018-02-13 Andreas Schwab <schwab@suse.de>
8510
8511 * config/riscv/linux.h (CPP_SPEC): Define.
8512
8513 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8514
8515 PR target/84335
8516 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8517 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8518 OPTION_MASK_ISA_AES as first argument to def_builtin_const
8519 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8520 instead of OPTION_MASK_ISA_PCLMUL as first argument to
8521 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8522 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8523 temporarily for AES and PCLMUL builtins.
8524
8525 PR tree-optimization/84339
8526 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8527 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8528 Formatting fixes.
8529
8530 PR middle-end/84309
8531 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8532 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8533 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8534 inline function.
8535 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8536 inline function.
8537 * omp-simd-clone.h: New file.
8538 * omp-simd-clone.c: Include omp-simd-clone.h.
8539 (expand_simd_clones): No longer static.
8540 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8541 cgraph.h and omp-simd-clone.h.
8542 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8543 (vect_recog_widen_shift_pattern): Formatting fix.
8544 (vect_pattern_recog_1): Don't check optab for calls.
8545
8546 PR target/84336
8547 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8548 operands[2] into a REG before using gen_lowpart on it.
8549
8550 2018-02-12 Jeff Law <law@redhat.com>
8551
8552 PR target/83760
8553 * config/sh/sh.c (find_barrier): Consider a sibling call
8554 a barrier as well.
8555
8556 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8557 successfully back substituting a reg.
8558
8559 2018-02-12 Richard Biener <rguenther@suse.de>
8560
8561 PR tree-optimization/84037
8562 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8563 parameter, move visited init to caller.
8564 (vect_slp_analyze_operations): Separate cost from validity
8565 check, initialize visited once for all instances.
8566 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8567 for all instances.
8568 * tree-vect-stmts.c (vect_model_simple_cost): Make early
8569 out an assert.
8570 (vect_model_promotion_demotion_cost): Likewise.
8571 (vectorizable_bswap): Guard cost modeling with !slp_node
8572 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
8573 SLP stmts.
8574 (vectorizable_call): Likewise.
8575 (vectorizable_conversion): Likewise.
8576 (vectorizable_assignment): Likewise.
8577 (vectorizable_shift): Likewise.
8578 (vectorizable_operation): Likewise.
8579 (vectorizable_store): Likewise.
8580 (vectorizable_load): Likewise.
8581 (vectorizable_condition): Likewise.
8582 (vectorizable_comparison): Likewise.
8583
8584 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
8585
8586 PR sanitizer/84307
8587 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
8588 (ASAN_MARK): Fix fnspec to account for return value, change pointer
8589 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
8590
8591 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
8592
8593 PR middle-end/83665
8594 * params.def (inline-min-speedup): Increase from 8 to 15.
8595 (max-inline-insns-auto): Decrease from 40 to 30.
8596 * ipa-split.c (consider_split): Add some buffer for function to
8597 be considered inlining candidate.
8598 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
8599 default values.
8600
8601 2018-02-12 Richard Biener <rguenther@suse.de>
8602
8603 PR tree-optimization/84037
8604 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
8605 matched stmts if we cannot swap the non-matched ones.
8606
8607 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
8608
8609 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
8610 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
8611 _mm_maskz_scalef_round_ss): New intrinsics.
8612 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
8613 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
8614 __builtin_ia32_scalefss_round): Remove.
8615 (__builtin_ia32_scalefsd_mask_round,
8616 __builtin_ia32_scalefss_mask_round): New intrinsics.
8617 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
8618 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
8619 ((match_operand:VF_128 2 "<round_nimm_predicate>"
8620 "<round_constraint>")): Changed to ...
8621 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
8622 "<round_scalar_constraint>")): ... this.
8623 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
8624 %0, %1, %2<round_op3>}"): Changed to ...
8625 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
8626 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
8627 %2<round_scalar_mask_op3>}"): ... this.
8628 * config/i386/subst.md (round_scalar_nimm_predicate): New.
8629
8630 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
8631
8632 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
8633 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
8634 (_mm_maskz_sqrt_round_ss): New intrinsics.
8635 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
8636 (__builtin_ia32_sqrtsd_mask_round)
8637 (__builtin_ia32_sqrtss_mask_round): New builtins.
8638 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
8639 (__builtin_ia32_sqrtss_round): Remove.
8640 (__builtin_ia32_sqrtsd_mask_round)
8641 (__builtin_ia32_sqrtss_mask_round): New builtins.
8642 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
8643 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
8644 ((match_operand:VF_128 1 "vector_operand"
8645 "xBm,<round_constraint>")): Changed to ...
8646 ((match_operand:VF_128 1 "vector_operand"
8647 "xBm,<round_scalar_constraint>")): ... this.
8648 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8649 %0, %2, %<iptr>1<round_op3>}): Changed to ...
8650 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8651 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8652 %<iptr>1<round_scalar_mask_op3>}): ... this.
8653 ((set_attr "prefix" "<round_prefix>")): Changed to ...
8654 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8655
8656 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
8657
8658 PR target/84266
8659 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8660 Cast vec_cmpeq result to correct type.
8661 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8662 Cast vec_cmpgt result to correct type.
8663
8664 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
8665
8666 * final.c (final_scan_insn_1): Renamed from...
8667 (final_scan_insn): ... this. New wrapper, to recover
8668 seen from the outermost call in recursive ones.
8669 * config/sparc/sparc.c (output_return): Drop seen from call.
8670 (output_sibcall): Likewise.
8671 * config/visium/visium.c (output_branch): Likewise.
8672
8673 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
8674
8675 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8676 function label.
8677
8678 2018-02-10 Alan Modra <amodra@gmail.com>
8679
8680 PR target/84300
8681 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8682 Specify LR as an input.
8683
8684 2018-02-10 Jakub Jelinek <jakub@redhat.com>
8685
8686 PR sanitizer/83987
8687 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8688 remove_member_access_dummy_vars): New functions.
8689 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8690 lower_omp_1, execute_lower_omp): Use them.
8691
8692 PR rtl-optimization/84308
8693 * shrink-wrap.c (spread_components): Release todo vector.
8694
8695 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
8696
8697 PR rtl-optimization/57193
8698 * ira-color.c (struct allocno_color_data): Add member
8699 conflict_allocno_hard_prefs.
8700 (update_conflict_allocno_hard_prefs): New.
8701 (bucket_allocno_compare_func): Add a preference based on
8702 conflict_allocno_hard_prefs.
8703 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8704 (color_allocnos): Remove a dead code. Initiate
8705 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
8706
8707 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8708
8709 PR target/84226
8710 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8711 constraint from =wa to wa. Avoid a subreg on the output operand,
8712 instead use a pseudo and subreg it in a move.
8713 (p9_xxbrd_<mode>): Changed to ...
8714 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8715 (p9_xxbrd_v2df): New expander.
8716 (p9_xxbrw_<mode>): Changed to ...
8717 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8718 (p9_xxbrw_v4sf): New expander.
8719
8720 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8721
8722 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8723
8724 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
8725
8726 PR target/83926
8727 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8728 multiply in 32-bit mode.
8729 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8730 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8731 mode.
8732
8733 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8734
8735 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8736 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8737 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8738 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8739
8740 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
8741
8742 PR lto/84213
8743 * dwarf2out.c (is_trivial_indirect_ref): New function.
8744 (dwarf2out_late_global_decl): Do not generate a location
8745 attribute for variables that have a non-trivial DECL_VALUE_EXPR
8746 and that are not defined in the current unit.
8747
8748 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8749
8750 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8751 instead of a libcall for UNORDERED.
8752
8753 2018-02-09 Tamar Christina <tamar.christina@arm.com>
8754
8755 PR target/82641
8756 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8757 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8758
8759 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8760
8761 PR target/PR84295
8762 * config/s390/s390.c (s390_set_current_function): Invoke
8763 s390_indirect_branch_settings also if fndecl didn't change.
8764
8765 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8766
8767 * config/rs6000/rs6000.md (blockage): Set length to zero.
8768
8769 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8770
8771 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8772
8773 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8774
8775 PR sanitizer/84285
8776 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8777 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8778 -static-lib*san.
8779
8780 PR debug/84252
8781 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8782 PARALLEL incoming that failed vt_get_decl_and_offset check.
8783
8784 PR middle-end/84237
8785 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8786 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8787 TREE_READONLY bit.
8788 (get_variable_section): For decls in named .bss* sections pass true as
8789 second argument to bss_initializer_p.
8790
8791 2018-02-09 Marek Polacek <polacek@redhat.com>
8792 Jakub Jelinek <jakub@redhat.com>
8793
8794 PR c++/83659
8795 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8796 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
8797 Sync some changes from cxx_fold_indirect_ref.
8798
8799 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8800
8801 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8802 markers.
8803 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8804 (BLOCK_INLINE_ENTRY_LABEL): New.
8805 (dwarf2out_var_location): Disregard inline entry markers.
8806 (inline_entry_data): New struct.
8807 (inline_entry_data_hasher): New hashtable type.
8808 (inline_entry_data_hasher::hash): New.
8809 (inline_entry_data_hasher::equal): New.
8810 (inline_entry_data_table): New variable.
8811 (add_high_low_attributes): Add DW_AT_entry_pc and
8812 DW_AT_GNU_entry_view attributes if a pending entry is found
8813 in inline_entry_data_table. Add old entry_pc attribute only
8814 if debug nonbinding markers are disabled.
8815 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8816 markers are enabled.
8817 (block_within_block_p, dwarf2out_inline_entry): New.
8818 (dwarf2out_finish): Check that no entries remained in
8819 inline_entry_data_table.
8820 * final.c (reemit_insn_block_notes): Handle inline entry notes.
8821 (final_scan_insn, notice_source_line): Likewise.
8822 (rest_of_clean_state): Skip inline entry markers.
8823 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8824 markers.
8825 * gimple.c (gimple_build_debug_inline_entry): New.
8826 * gimple.h (enum gimple_debug_subcode): Add
8827 GIMPLE_DEBUG_INLINE_ENTRY.
8828 (gimple_build_debug_inline_entry): Declare.
8829 (gimple_debug_inline_entry_p): New.
8830 (gimple_debug_nonbind_marker_p): Adjust.
8831 * insn-notes.def (INLINE_ENTRY): New.
8832 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8833 inline entry marker notes.
8834 (print_insn): Likewise.
8835 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8836 (INSN_DEBUG_MARKER_KIND): Likewise.
8837 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8838 * tree-inline.c (expand_call_inline): Build and insert
8839 debug_inline_entry stmt.
8840 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8841 inline entry blocks early, if nonbind markers are enabled.
8842 (dump_scope_block): Dump fragment info.
8843 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8844 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8845 (gimple_build_debug_inline_entry): New.
8846 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8847 Enable/disable inline entry points too.
8848 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8849 (DEBUG_INSN): Describe inline entry markers.
8850
8851 * common.opt (gvariable-location-views): New.
8852 (gvariable-location-views=incompat5): New.
8853 * config.in: Rebuilt.
8854 * configure: Rebuilt.
8855 * configure.ac: Test assembler for view support.
8856 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8857 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8858 * dwarf2out.c (var_loc_view): New typedef.
8859 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8860 (dwarf2out_locviews_in_attribute): New.
8861 (dwarf2out_locviews_in_loclist): New.
8862 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8863 (enum dw_line_info_opcode): Add LI_adv_address.
8864 (struct dw_line_info_table): Add view.
8865 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8866 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8867 (zero_view_p): New variable.
8868 (ZERO_VIEW_P): New macro.
8869 (output_asm_line_debug_info): New.
8870 (struct var_loc_node): Add view.
8871 (add_AT_view_list, AT_loc_list): New.
8872 (add_var_loc_to_decl): Add view param. Test it against last.
8873 (new_loc_list): Add view params. Record them.
8874 (AT_loc_list_ptr): Handle loc and view lists.
8875 (view_list_to_loc_list_val_node): New.
8876 (print_dw_val): Handle dw_val_class_view_list.
8877 (size_of_die): Likewise.
8878 (value_format): Likewise.
8879 (loc_list_has_views): New.
8880 (gen_llsym): Set vl_symbol too.
8881 (maybe_gen_llsym, skip_loc_list_entry): New.
8882 (dwarf2out_maybe_output_loclist_view_pair): New.
8883 (output_loc_list): Output view list or entries too.
8884 (output_view_list_offset): New.
8885 (output_die): Handle dw_val_class_view_list.
8886 (output_dwarf_version): New.
8887 (output_compilation_unit_header): Use it.
8888 (output_skeleton_debug_sections): Likewise.
8889 (output_rnglists, output_line_info): Likewise.
8890 (output_pubnames, output_aranges): Update version comments.
8891 (output_one_line_info_table): Output view numbers in asm comments.
8892 (dw_loc_list): Determine current endview, pass it to new_loc_list.
8893 Call maybe_gen_llsym.
8894 (loc_list_from_tree_1): Adjust.
8895 (add_AT_location_description): Create view list attribute if
8896 needed, check it's absent otherwise.
8897 (convert_cfa_to_fb_loc_list): Adjust.
8898 (maybe_emit_file): Call output_asm_line_debug_info for test.
8899 (dwarf2out_var_location): Reset views as needed. Precompute
8900 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
8901 attribute. Set view.
8902 (new_line_info_table): Reset next view.
8903 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8904 (dwarf2out_source_line): Likewise. Output view resets and labels to
8905 the assembler, or select appropriate line info opcodes.
8906 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8907 (optimize_string_length): Catch it. Adjust.
8908 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
8909 dw_val_class_view_list, and remove it if no longer needed.
8910 (hash_loc_list): Hash view numbers.
8911 (loc_list_hasher::equal): Compare them.
8912 (optimize_location_lists): Check whether a view list symbol is
8913 needed, and whether the locview attribute is present, and
8914 whether they match. Remove the locview attribute if no longer
8915 needed.
8916 (index_location_lists): Call skip_loc_list_entry for test.
8917 (dwarf2out_finish): Call output_asm_line_debug_info for test.
8918 Use output_dwarf_version.
8919 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8920 (struct dw_val_node): Add val_view_list.
8921 * final.c (SEEN_NEXT_VIEW): New.
8922 (set_next_view_needed): New.
8923 (clear_next_view_needed): New.
8924 (maybe_output_next_view): New.
8925 (final_start_function): Rename to...
8926 (final_start_function_1): ... this. Take pointer to FIRST,
8927 add SEEN parameter. Emit param bindings in the initial view.
8928 (final_start_function): Reintroduce SEEN-less interface.
8929 (final): Rename to...
8930 (final_1): ... this. Take SEEN parameter. Output final pending
8931 next view at the end.
8932 (final): Reintroduce seen-less interface.
8933 (final_scan_insn): Output pending next view before switching
8934 sections or ending a block. Mark the next view as needed when
8935 outputting variable locations. Notify debug backend of section
8936 changes, and of location view changes.
8937 (rest_of_handle_final): Adjust.
8938 * toplev.c (process_options): Autodetect value for debug variable
8939 location views option. Warn on incompat5 without -gdwarf-5.
8940 * doc/invoke.texi (gvariable-location-views): New.
8941 (gvariable-location-views=incompat5): New.
8942 (gno-variable-location-views): New.
8943
8944 2018-02-08 David Malcolm <dmalcolm@redhat.com>
8945
8946 PR tree-optimization/84136
8947 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8948 that the result of find_edge is non-NULL.
8949
8950 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8951
8952 PR target/83008
8953 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8954 storing integer register in SImode. Fix cost of 256 and 512
8955 byte aligned SSE register store.
8956
8957 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8958
8959 * config/i386/i386.c (ix86_multiplication_cost): Fix
8960 multiplication cost for TARGET_AVX512DQ.
8961
8962 2018-02-08 Marek Polacek <polacek@redhat.com>
8963
8964 PR tree-optimization/84238
8965 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8966 get_range_strlen.
8967
8968 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8969
8970 PR tree-optimization/84265
8971 * tree-vect-stmts.c (vectorizable_store): Don't treat
8972 VMAT_CONTIGUOUS accesses as grouped.
8973 (vectorizable_load): Likewise.
8974
8975 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8976
8977 PR tree-optimization/81635
8978 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8979 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8980 (test_round_for_mask): New functions.
8981 (wide_int_cc_tests): Call test_round_for_mask.
8982 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8983 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8984 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8985 range returned by get_range_info.
8986
8987 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
8988
8989 PR ipa/81360
8990 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8991 * symtab.c: Include builtins.h
8992 (symtab_node::output_to_lto_symbol_table_p): Move here
8993 from lto-streamer-out.c:output_symbol_p.
8994 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8995 (output_symbol_p): Move all logic to symtab.c
8996 (produce_symtab): Update.
8997
8998 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8999
9000 * config/s390/s390-opts.h (enum indirect_branch): Define.
9001 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9002 (s390_indirect_branch_via_thunk)
9003 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9004 (enum s390_indirect_branch_type): Define.
9005 * config/s390/s390.c (struct s390_frame_layout, struct
9006 machine_function): Remove.
9007 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9008 (indirect_branch_table_label_no, indirect_branch_table_name):
9009 Define variables.
9010 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9011 (enum s390_indirect_branch_option): Define.
9012 (s390_return_addr_from_memory): New function.
9013 (s390_handle_string_attribute): New function.
9014 (s390_attribute_table): Add new attribute handler.
9015 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9016 (s390_indirect_branch_via_thunk): New function.
9017 (s390_indirect_branch_via_inline_thunk): New function.
9018 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9019 sibling call optimization for non z10 compiles.
9020 (s390_emit_call): Force indirect branch target to be a single
9021 register. Add r1 clobber for non-z10 compiles.
9022 (s390_emit_epilogue): Emit return jump via return_use expander.
9023 (s390_reorg): Handle JUMP_INSNs as execute targets.
9024 (s390_option_override_internal): Perform validity checks for the
9025 new command line options.
9026 (s390_indirect_branch_attrvalue): New function.
9027 (s390_indirect_branch_settings): New function.
9028 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9029 (s390_output_indirect_thunk_function): New function.
9030 (s390_code_end): Implement target hook.
9031 (s390_case_values_threshold): Implement target hook.
9032 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9033 macros.
9034 * config/s390/s390.h (struct s390_frame_layout)
9035 (struct machine_function): Move here from s390.c.
9036 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9037 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9038 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9039 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9040 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9041 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9042 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9043 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9044 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9045 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9046 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9047 (mnemonic attribute): Add values which aren't recognized
9048 automatically.
9049 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9050 pattern for branch conversion. Fix mnemonic attribute.
9051 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9052 indirect branch via thunk if requested.
9053 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9054 ("*indirect_jump"): Disable for branch conversion using out of
9055 line thunks.
9056 ("indirect_jump_via_thunk<mode>_z10")
9057 ("indirect_jump_via_thunk<mode>")
9058 ("indirect_jump_via_inlinethunk<mode>_z10")
9059 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9060 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9061 ("casesi_jump_via_inlinethunk<mode>_z10")
9062 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9063 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9064 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9065 ("*indirect2_jump"): Disable for branch conversion.
9066 ("casesi_jump"): Turn into expander and expand patterns for branch
9067 conversion.
9068 ("return_use"): New expander.
9069 ("*return"): Emit return via thunk and rename it to ...
9070 ("*return<mode>"): ... this one.
9071 * config/s390/s390.opt: Add new options and and enum for the
9072 option values.
9073
9074 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9075
9076 * lra-constraints.c (match_reload): Unconditionally use
9077 gen_lowpart_SUBREG, rather than selecting between that
9078 and equivalent gen_rtx_SUBREG code.
9079
9080 2018-02-08 Richard Biener <rguenther@suse.de>
9081
9082 PR tree-optimization/84233
9083 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9084 changed flag instead of boguously re-using phi_inserted.
9085
9086 2018-02-08 Martin Jambor <mjambor@suse.cz>
9087
9088 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9089 static local variables.
9090
9091 2018-02-08 Richard Biener <rguenther@suse.de>
9092
9093 PR tree-optimization/84278
9094 * tree-vect-stmts.c (vectorizable_store): When looking for
9095 smaller vector types to perform grouped strided loads/stores
9096 make sure the mode is supported by the target.
9097 (vectorizable_load): Likewise.
9098
9099 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9100
9101 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9102 Increase LDP/STP opportunities by adding adjacent callee-saves.
9103
9104 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9105
9106 PR rtl-optimization/84068
9107 PR rtl-optimization/83459
9108 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9109
9110 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9111
9112 PR tree-optimization/84224
9113 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9114 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9115 non-zero arguments.
9116
9117 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9118
9119 PR target/84113
9120 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9121 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9122 count, remove one USE.
9123
9124 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9125
9126 * doc/install.texi (Configuration): Document the
9127 --with-long-double-format={ibm,ieee} PowerPC configuration
9128 options.
9129
9130 PR target/84154
9131 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9132 Convert from define_expand to be define_insn_and_split. Rework
9133 float/double/_Float128 conversions to QI/HI/SImode to work with
9134 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9135 conversions to QI/HImode types did a store and then a load to
9136 truncate the value. For conversions to VSX registers, don't split
9137 the insn, instead emit the code directly. Use the code iterator
9138 any_fix to combine signed and unsigned conversions.
9139 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9140 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9141 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9142 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9143 (fix_<mode>di2_hw): Likewise.
9144 (fixuns_<mode>di2_hw): Likewise.
9145 (fix_<mode>si2_hw): Likewise.
9146 (fixuns_<mode>si2_hw): Likewise.
9147 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9148 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9149 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9150 fix<uns>_trunc<SFDF:mode>si2_p8.
9151 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
9152 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9153 (fix<uns>_<mode>_mem): Likewise.
9154 (fctiw<u>z_<mode>_mem): Likewise.
9155 (fix<uns>_<mode>_mem): Likewise.
9156 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9157 the register allocator from doing a direct move to the GPRs to do
9158 a store, and instead use the ISA 3.0 store byte/half-word from
9159 vector register instruction. For IEEE 128-bit floating point,
9160 also optimize stores of 32-bit ints.
9161 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9162
9163 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9164
9165 * genextract.c (push_pathstr_operand): New function to support
9166 [a-zA-Z].
9167 (walk_rtx): Call push_pathstr_operand.
9168 (print_path): Support [a-zA-Z].
9169
9170 2018-02-07 Richard Biener <rguenther@suse.de>
9171
9172 PR tree-optimization/84037
9173 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9174 (cse_and_gimplify_to_preheader): Declare.
9175 (vect_get_place_in_interleaving_chain): Likewise.
9176 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9177 ivexpr_map.
9178 (_loop_vec_info::~_loop_vec_info): Delete it.
9179 (cse_and_gimplify_to_preheader): New function.
9180 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9181 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9182 (vectorizable_load): Likewise. For grouped stores always base
9183 the IV on the first element.
9184 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9185 condition before gimplifying.
9186
9187 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9188
9189 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9190 *DIV_EXPR and *MOD_EXPR.
9191
9192 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
9193
9194 PR target/84248
9195 * config/i386/i386.c (ix86_option_override_internal): Mask out
9196 the CF_SET bit when checking -fcf-protection.
9197
9198 2018-02-07 Tom de Vries <tom@codesourcery.com>
9199
9200 PR libgomp/84217
9201 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9202 enough.
9203
9204 2018-02-07 Richard Biener <rguenther@suse.de>
9205
9206 PR tree-optimization/84204
9207 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9208 this place.
9209
9210 PR tree-optimization/84205
9211 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9212 special-case isl_ast_op_zdiv_r.
9213
9214 PR tree-optimization/84223
9215 * graphite-scop-detection.c (gather_bbs::before_dom_children):
9216 Only add conditions from within the region.
9217 (gather_bbs::after_dom_children): Adjust.
9218
9219 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
9220
9221 PR target/84209
9222 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9223 * config/avr/avr.md: Only post-reload split REG-REG moves if
9224 either register is GENERAL_REG_P.
9225
9226 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9227
9228 PR tree-optimization/84235
9229 * tree-ssa-scopedtables.c
9230 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9231 if the subtraction is performed in floating point type where NaNs are
9232 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9233 build 1. Formatting fix.
9234
9235 2018-02-06 Jakub Jelinek <jakub@redhat.com>
9236
9237 PR target/84146
9238 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9239 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9240 and skip it regardless of bb boundaries. Use CALL_P macro,
9241 don't test INSN_P (insn) together with CALL_P or JUMP_P check
9242 unnecessarily, formatting fix.
9243
9244 2018-02-06 Michael Collison <michael.collison@arm.com>
9245
9246 * config/arm/thumb2.md:
9247 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9248 (*thumb_mov_notscc): Ditto.
9249
9250 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
9251
9252 PR target/84154
9253 * config/rs6000/rs6000.md (su code attribute): Use "u" for
9254 unsigned_fix, not "s".
9255
9256 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9257
9258 * configure.ac (gcc_fn_eh_frame_ro): New function.
9259 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9260 correct .eh_frame permissions.
9261 * configure: Regenerate.
9262
9263 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
9264
9265 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9266 irrelevant options.
9267
9268 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9269
9270 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9271 Display warning message for -mno-speculate-indirect-jumps.
9272
9273 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
9274
9275 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9276 Undocumented.
9277 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9278
9279 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
9280
9281 PR tree-optimization/84225
9282 * tree-eh.c (find_trapping_overflow): Only call
9283 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9284
9285 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9286
9287 PR target/84145
9288 * config/i386/i386.c: Reimplement the check of possible options
9289 -mibt/-mshstk conbination. Change error messages.
9290 * doc/invoke.texi: Fix a typo: remove extra '='.
9291
9292 2018-02-06 Marek Polacek <polacek@redhat.com>
9293
9294 PR tree-optimization/84228
9295 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9296
9297 2018-02-06 Tamar Christina <tamar.christina@arm.com>
9298
9299 PR target/82641
9300 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9301 emitted arch directives.
9302 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9303 __ARM_FEATURE_COPROC before changing architectures.
9304
9305 2018-02-06 Richard Biener <rguenther@suse.de>
9306
9307 * config/i386/i386.c (print_reg): Fix typo.
9308 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9309
9310 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
9311
9312 * configure: Regenerate.
9313
9314 2018-02-05 Martin Sebor <msebor@redhat.com>
9315
9316 PR tree-optimization/83369
9317 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
9318 inlining context.
9319
9320 2018-02-05 Martin Liska <mliska@suse.cz>
9321
9322 * doc/invoke.texi: Cherry-pick upstream r323995.
9323
9324 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
9325
9326 * ira.c (ira_init_register_move_cost): Adjust comment.
9327
9328 2018-02-05 Martin Liska <mliska@suse.cz>
9329
9330 PR gcov-profile/84137
9331 * doc/gcov.texi: Fix typo in documentation.
9332
9333 2018-02-05 Martin Liska <mliska@suse.cz>
9334
9335 PR gcov-profile/83879
9336 * doc/gcov.texi: Document necessity of --dynamic-list-data when
9337 using dlopen functionality.
9338
9339 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
9340
9341 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
9342 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
9343 _mm_maskz_range_ss, _mm_mask_range_round_ss,
9344 _mm_maskz_range_round_ss): New intrinsics.
9345 (__builtin_ia32_rangesd128_round)
9346 (__builtin_ia32_rangess128_round): Remove.
9347 (__builtin_ia32_rangesd128_mask_round,
9348 __builtin_ia32_rangess128_mask_round): New builtins.
9349 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
9350 __builtin_ia32_rangess128_round): Remove.
9351 (__builtin_ia32_rangesd128_mask_round,
9352 __builtin_ia32_rangess128_mask_round): New builtins.
9353 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
9354 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
9355 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
9356 "<round_saeonly_constraint>")): Changed to ...
9357 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
9358 "<round_saeonly_scalar_constraint>")): ... this.
9359 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
9360 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
9361 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
9362 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
9363 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
9364
9365 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
9366
9367 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
9368 options.
9369 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
9370 Remove all values except native, 8540 and 8548.
9371
9372 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
9373
9374 * config/i386/i386.c (ix86_output_function_return): Pass
9375 INVALID_REGNUM, instead of -1, as invalid register number to
9376 indirect_thunk_name and output_indirect_thunk.
9377
9378 2018-02-02 Julia Koval <julia.koval@intel.com>
9379
9380 * config.gcc: Add -march=icelake.
9381 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
9382 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
9383 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
9384 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
9385 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
9386 (processor_target_table): Add icelake.
9387 (ix86_option_override_internal): Handle new PTAs.
9388 (get_builtin_code_for_version): Handle icelake.
9389 (M_INTEL_COREI7_ICELAKE): New.
9390 (fold_builtin_cpu): Handle icelake.
9391 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
9392 * doc/invoke.texi: Add -march=icelake.
9393
9394 2018-02-02 Julia Koval <julia.koval@intel.com>
9395
9396 * config/i386/i386.c (ix86_option_override_internal): Change flags type
9397 to wide_int_bitmask.
9398 * wide-int-bitmask.h: New.
9399
9400 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9401
9402 PR target/84066
9403 * config/i386/i386.md: Replace Pmode with word_mode in
9404 builtin_setjmp_setup and builtin_longjmp to support x32.
9405
9406 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
9407
9408 PR target/56010
9409 PR target/83743
9410 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
9411 #include "opts.h".
9412 (rs6000_supported_cpu_names): New static variable.
9413 (linux_cpu_translation_table): Likewise.
9414 (elf_platform) <cpu>: Define new static variable and use it.
9415 Translate kernel AT_PLATFORM name to canonical name if needed.
9416 Error if platform name is unknown.
9417
9418 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
9419
9420 PR target/84089
9421 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
9422
9423 2018-02-01 Jeff Law <law@redhat.com>
9424
9425 PR target/84128
9426 * config/i386/i386.c (release_scratch_register_on_entry): Add new
9427 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
9428 the scratch if RELEASE_VIA_POP is false.
9429 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
9430 If we have to save a temporary register, decrement SIZE appropriately.
9431 Pass new arguments to release_scratch_register_on_entry.
9432 (ix86_adjust_stack_and_probe): Likewise.
9433 (ix86_emit_probe_stack_range): Pass new arguments to
9434 release_scratch_register_on_entry.
9435
9436 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
9437
9438 PR rtl-optimization/84157
9439 * combine.c (change_zero_ext): Use REG_P predicate in
9440 front of HARD_REGISTER_P predicate.
9441
9442 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
9443
9444 * config/avr/avr.c (avr_option_override): Move disabling of
9445 -fdelete-null-pointer-checks to...
9446 * common/config/avr/avr-common.c (avr_option_optimization_table):
9447 ...here.
9448
9449 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9450
9451 PR tree-optimization/81635
9452 * tree-data-ref.c (split_constant_offset_1): For types that
9453 wrap on overflow, try to use range info to prove that wrapping
9454 cannot occur.
9455
9456 2018-02-01 Renlin Li <renlin.li@arm.com>
9457
9458 PR target/83370
9459 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
9460 TAILCALL_ADDR_REGS.
9461 (aarch64_register_move_cost): Likewise.
9462 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
9463 TAILCALL_ADDR_REGS.
9464 (REG_CLASS_NAMES): Likewise.
9465 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
9466 TAILCALL_ADDR_REGS. Remove IP registers.
9467 * config/aarch64/aarch64.md (Ucs): Update register constraint.
9468
9469 2018-02-01 Richard Biener <rguenther@suse.de>
9470
9471 * domwalk.h (dom_walker::dom_walker): Add additional constructor
9472 for specifying RPO order and allow NULL for that.
9473 * domwalk.c (dom_walker::dom_walker): Likewise.
9474 (dom_walker::walk): Handle NULL RPO order.
9475 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
9476 in RPO order.
9477 (rewrite_update_dom_walker): Likewise.
9478 (mark_def_dom_walker): Likewise.
9479
9480 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9481
9482 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
9483 (aarch64_maybe_expand_sve_subreg_move): Declare.
9484 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
9485 * config/aarch64/predicates.md (aarch64_any_register_operand): New
9486 predicate.
9487 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
9488 that are semantically a reverse operation.
9489 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
9490 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
9491 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
9492 functions.
9493 (aarch64_can_change_mode_class): For big-endian, forbid changes
9494 between two SVE modes if they have different element sizes.
9495
9496 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9497
9498 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
9499 the TImode handling for big-endian targets.
9500
9501 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9502
9503 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
9504 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
9505 not just bytes.
9506 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
9507 Remove BSWAP handing for big-endian targets and use the form of
9508 LD1RQ appropariate for the mode.
9509
9510 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9511
9512 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9513 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9514 duplicated element.
9515
9516 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9517
9518 PR tearget/83845
9519 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9520 check for operands that need to go through aarch64_sve_reload_be.
9521
9522 2018-02-01 Jakub Jelinek <jakub@redhat.com>
9523
9524 PR tree-optimization/81661
9525 PR tree-optimization/84117
9526 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9527 * tree-eh.c: Include gimplify.h.
9528 (find_trapping_overflow, replace_trapping_overflow,
9529 rewrite_to_non_trapping_overflow): New functions.
9530 * tree-vect-loop.c: Include tree-eh.h.
9531 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9532 * tree-data-ref.c: Include tree-eh.h.
9533 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9534
9535 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
9536
9537 PR rtl-optimization/84123
9538 * combine.c (change_zero_ext): Check if hard register satisfies
9539 can_change_dest_mode before calling gen_lowpart_SUBREG.
9540
9541 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
9542
9543 PR target/82444
9544 * ira.c (ira_init_register_move_cost): Remove assert.
9545
9546 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9547
9548 PR rtl-optimization/84071
9549 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9550 * doc/tm.texi: Regenerate.
9551
9552 2018-01-31 Richard Biener <rguenther@suse.de>
9553
9554 PR tree-optimization/84132
9555 * tree-data-ref.c (analyze_miv_subscript): Properly
9556 check whether evolution_function_is_affine_multivariate_p
9557 before calling gcd_of_steps_may_divide_p.
9558
9559 2018-01-31 Julia Koval <julia.koval@intel.com>
9560
9561 PR target/83618
9562 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9563 * config/i386/i386.md (rdpid_rex64) New.
9564 (rdpid): Make 32bit only.
9565
9566 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
9567
9568 PR lto/84105
9569 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9570 an IDENTIFIER_NODE for FUNCTION_TYPE's.
9571
9572 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9573
9574 Revert
9575 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
9576
9577 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9578
9579 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9580
9581 PR rtl-optimization/84071
9582 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
9583 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
9584
9585 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
9586
9587 * config/arc/arc.c (arc_handle_aux_attribute): New function.
9588 (arc_attribute_table): Add 'aux' attribute.
9589 (arc_in_small_data_p): Consider aux like variables.
9590 (arc_is_aux_reg_p): New function.
9591 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
9592 (arc_get_aux_arg): New function.
9593 (prepare_move_operands): Handle aux-register access.
9594 (arc_handle_aux_attribute): New function.
9595 * doc/extend.texi (ARC Variable attributes): Add subsection.
9596
9597 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
9598
9599 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
9600 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
9601 (arc_attribute_table): Add 'uncached' attribute.
9602 (arc_print_operand): Print '.di' flag for uncached memory
9603 accesses.
9604 (arc_in_small_data_p): Do not consider for small data the uncached
9605 types.
9606 (arc_is_uncached_mem_p): New function.
9607 * config/arc/predicates.md (compact_store_memory_operand): Check
9608 for uncached memory accesses.
9609 (nonvol_nonimm_operand): Likewise.
9610 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
9611
9612 2018-01-31 Jakub Jelinek <jakub@redhat.com>
9613
9614 PR c/84100
9615 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
9616 falign-loops=): Add Optimization flag.
9617
9618 2018-01-30 Jeff Law <law@redhat.com>
9619
9620 PR target/84064
9621 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
9622 INT_REGISTERS_SAVED. Check it prior to calling
9623 get_scratch_register_on_entry.
9624 (ix86_adjust_stack_and_probe): Similarly.
9625 (ix86_emit_probe_stack_range): Similarly.
9626 (ix86_expand_prologue): Corresponding changes.
9627
9628 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9629
9630 PR target/40411
9631 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
9632 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
9633
9634 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
9635
9636 PR target/84112
9637 * lra-constraints.c (curr_insn_transform): Process AND in the
9638 address.
9639
9640 2018-01-30 Jakub Jelinek <jakub@redhat.com>
9641
9642 PR rtl-optimization/83986
9643 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
9644 dependence against last_pending_memory_flush in addition to
9645 pending_jump_insns.
9646
9647 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
9648
9649 PR tree-optimization/81611
9650 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9651 copies.
9652
9653 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9654
9655 PR target/83758
9656 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9657 a reg rtx.
9658
9659 2018-01-30 Richard Biener <rguenther@suse.de>
9660 Jakub Jelinek <jakub@redhat.com>
9661
9662 PR tree-optimization/84111
9663 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9664 inner loops added during recursion, as they don't have up-to-date
9665 SSA form.
9666
9667 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9668
9669 PR ipa/81360
9670 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9671 (can_inline_edge_by_limits_p): ... here.
9672 (can_early_inline_edge_p, check_callers,
9673 update_caller_keys, update_callee_keys, recursive_inlining,
9674 add_new_edges_to_heap, speculation_useful_p,
9675 inline_small_functions,
9676 inline_small_functions, flatten_function,
9677 inline_to_all_callers_1): Update.
9678
9679 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9680
9681 * profile-count.c (profile_count::combine_with_ipa_count): Handle
9682 zeros correctly.
9683
9684 2018-01-30 Richard Biener <rguenther@suse.de>
9685
9686 PR tree-optimization/83008
9687 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9688 invariant and constant vector uses in stmts when they need
9689 more than one stmt.
9690
9691 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9692
9693 PR bootstrap/84017
9694 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9695 * configure: Regenerate.
9696
9697 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9698
9699 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9700 pattern.
9701 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9702 Use gen_rtx_REG rather than gen_lowpart.
9703
9704 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9705
9706 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9707 rather than 0 when creating partial subregs.
9708
9709 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9710
9711 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9712 of usage.
9713
9714 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
9715
9716 PR target/81550
9717 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9718 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9719 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9720 flags. This restores the settings used before the 2017-07-24.
9721 Turning off pre increment/decrement/modify allows IVOPTS to
9722 optimize DF/SF loops where the index is an int.
9723
9724 2018-01-29 Richard Biener <rguenther@suse.de>
9725 Kelvin Nilsen <kelvin@gcc.gnu.org>
9726
9727 PR bootstrap/80867
9728 * tree-vect-stmts.c (vectorizable_call): Don't call
9729 targetm.vectorize_builtin_md_vectorized_function if callee is
9730 NULL.
9731
9732 2018-01-22 Carl Love <cel@us.ibm.com>
9733
9734 * doc/extend.tex: Fix typo in second arg in
9735 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9736
9737 2018-01-29 Richard Biener <rguenther@suse.de>
9738
9739 PR tree-optimization/84086
9740 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9741 (flush_ssaname_freelist): When SSA names were released reset
9742 the SCEV hash table.
9743
9744 2018-01-29 Richard Biener <rguenther@suse.de>
9745
9746 PR tree-optimization/84057
9747 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9748 removed paths when removing edges.
9749
9750 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
9751
9752 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9753 -mfunction-return=@var{choice}.
9754
9755 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
9756
9757 PR diagnostic/84034
9758 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9759 Handle CR like TAB.
9760 (layout::print_source_line): Likewise.
9761 (test_get_line_width_without_trailing_whitespace): Add test cases.
9762
9763 2018-01-27 Jakub Jelinek <jakub@redhat.com>
9764
9765 PR middle-end/84040
9766 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9767 debug insns.
9768
9769 2018-01-26 Jim Wilson <jimw@sifive.com>
9770
9771 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9772
9773 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9774 specified.
9775
9776 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9777
9778 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9779 and CMP + SUB-immediate -> SUBS.
9780
9781 2018-01-26 Martin Sebor <msebor@redhat.com>
9782
9783 PR tree-optimization/83896
9784 * tree-ssa-strlen.c (get_string_len): Rename...
9785 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
9786 Avoid assuming length is constant.
9787 (handle_char_store): Use HOST_WIDE_INT for string length.
9788
9789 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
9790
9791 PR target/81763
9792 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9793 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9794
9795 2018-01-26 Richard Biener <rguenther@suse.de>
9796
9797 PR rtl-optimization/84003
9798 * dse.c (record_store): Only record redundant stores when
9799 the earlier store aliases at least all accesses the later one does.
9800
9801 2018-01-26 Jakub Jelinek <jakub@redhat.com>
9802
9803 PR rtl-optimization/83985
9804 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9805 REG_CFA_RESTORE insns.
9806 (delete_unmarked_insns): Don't ignore separate shrink wrapping
9807 REG_CFA_RESTORE insns here.
9808
9809 PR c/83989
9810 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9811 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9812
9813 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9814
9815 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9816 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9817 (arc_init): Likewise.
9818 (arc_override_options): Likewise.
9819 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9820 value.
9821 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9822 support.
9823 * config/arc/arc.h (TARGET_DBNZ): Define.
9824 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9825 properly set the tune attribute.
9826 (dbnz): Use TARGET_DBNZ guard.
9827 * config/arc/arc.opt (mtune): Add core3 option.
9828
9829 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9830
9831 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9832 recognize new pic like addresses.
9833 (arc_delegitimize_address): Clean up.
9834
9835 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9836
9837 * config/arc/arc-arches.def: Option mrf16 valid for all
9838 architectures.
9839 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9840 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9841 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9842 * config/arc/arc-tables.opt: Regenerate.
9843 * config/arc/arc.c (arc_conditional_register_usage): Handle
9844 reduced register file case.
9845 (arc_file_start): Set must have build attributes.
9846 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9847 mrf16 option value.
9848 * config/arc/arc.opt (mrf16): Add new option.
9849 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9850 * config/arc/genmultilib.awk: Handle new mrf16 option.
9851 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9852 * config/arc/t-multilib: Regenerate.
9853 * doc/invoke.texi (ARC Options): Document mrf16 option.
9854
9855 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9856
9857 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9858 * config/arc/arc.c (arc_handle_secure_attribute): New function.
9859 (arc_attribute_table): Add 'secure_call' attribute.
9860 (arc_print_operand): Print secure call operand.
9861 (arc_function_ok_for_sibcall): Don't optimize tail calls when
9862 secure.
9863 (arc_is_secure_call_p): New function. * config/arc/arc.md
9864 (call_i): Add support for sjli instruction.
9865 (call_value_i): Likewise.
9866 * config/arc/constraints.md (Csc): New constraint.
9867
9868 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9869 John Eric Martin <John.Martin@emmicro-us.com>
9870
9871 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9872 * config/arc/arc.c (_arc_jli_section): New struct.
9873 (arc_jli_section): New type.
9874 (rc_jli_sections): New static variable.
9875 (arc_handle_jli_attribute): New function.
9876 (arc_attribute_table): Add jli_always and jli_fixed attribute.
9877 (arc_file_end): New function.
9878 (TARGET_ASM_FILE_END): Define.
9879 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9880 (arc_add_jli_section): New function.
9881 (jli_call_scan): Likewise.
9882 (arc_reorg): Call jli_call_scan.
9883 (arc_output_addsi): Remove 'S' from printing asm operand.
9884 (arc_is_jli_call_p): New function.
9885 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9886 operand.
9887 (movhi_insn): Likewise.
9888 (movsi_insn): Likewise.
9889 (movsi_set_cc_insn): Likewise.
9890 (loadqi_update): Likewise.
9891 (load_zeroextendqisi_update): Likewise.
9892 (load_signextendqisi_update): Likewise.
9893 (loadhi_update): Likewise.
9894 (load_zeroextendhisi_update): Likewise.
9895 (load_signextendhisi_update): Likewise.
9896 (loadsi_update): Likewise.
9897 (loadsf_update): Likewise.
9898 (movsicc_insn): Likewise.
9899 (bset_insn): Likewise.
9900 (bxor_insn): Likewise.
9901 (bclr_insn): Likewise.
9902 (bmsk_insn): Likewise.
9903 (bicsi3_insn): Likewise.
9904 (cmpsi_cc_c_insn): Likewise.
9905 (movsi_ne): Likewise.
9906 (movsi_cond_exec): Likewise.
9907 (clrsbsi2): Likewise.
9908 (norm_f): Likewise.
9909 (normw): Likewise.
9910 (swap): Likewise.
9911 (divaw): Likewise.
9912 (flag): Likewise.
9913 (sr): Likewise.
9914 (kflag): Likewise.
9915 (ffs): Likewise.
9916 (ffs_f): Likewise.
9917 (fls): Likewise.
9918 (call_i): Remove 'S' asm letter, add jli instruction.
9919 (call_value_i): Likewise.
9920 * config/arc/arc.op (mjli-always): New option.
9921 * config/arc/constraints.md (Cji): New constraint.
9922 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9923 operand.
9924 (subsf3_fpx): Likewise.
9925 (mulsf3_fpx): Likewise.
9926 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9927 asm operand.
9928 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9929 function attrbutes.
9930 * doc/invoke.texi (ARC): Document mjli-always option.
9931
9932 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
9933
9934 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
9935 avoid addition with 0 and use incw and decw where possible.
9936
9937 2018-01-26 Richard Biener <rguenther@suse.de>
9938
9939 PR tree-optimization/81082
9940 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9941 association if it requires casting to unsigned.
9942 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9943 from fold_plusminus_mult_expr to catch important cases late when
9944 range info is available.
9945
9946 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9947
9948 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9949 * configure.ac (hidden_linkonce): New test.
9950 * configure: Regenerate.
9951 * config.in: Regenerate.
9952
9953 2018-01-26 Julia Koval <julia.koval@intel.com>
9954
9955 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9956 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9957 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9958 _mm_mask_bitshuffle_epi64_mask): Fix type.
9959 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9960 USI_FTYPE_V4DI_V4DI_USI): Remove.
9961 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9962 __builtin_ia32_vpshufbitqmb256_mask,
9963 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9964 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9965 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9966
9967 2018-01-26 Alan Modra <amodra@gmail.com>
9968
9969 PR target/84033
9970 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9971 UNSPEC_VBPERMQ. Sort other unspecs.
9972
9973 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
9974
9975 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9976
9977 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
9978
9979 PR middle-end/83055
9980 * predict.c (drop_profile): Do not push/pop cfun; update also
9981 node->count.
9982 (handle_missing_profiles): Fix logic looking for zero profiles.
9983
9984 2018-01-25 Jakub Jelinek <jakub@redhat.com>
9985
9986 PR middle-end/83977
9987 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9988 on functions with #pragma omp declare simd or functions with simd
9989 attribute.
9990 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9991 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9992 Remove trailing \n from warning_at calls.
9993
9994 2018-01-25 Tom de Vries <tom@codesourcery.com>
9995
9996 PR target/84028
9997 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9998 for neutered workers.
9999
10000 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10001
10002 PR target/68467
10003 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10004 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10005
10006 2018-01-24 Jeff Law <law@redhat.com>
10007
10008 PR target/83994
10009 * i386.c (get_probe_interval): Move to earlier point.
10010 (ix86_compute_frame_layout): If -fstack-clash-protection and
10011 the frame is larger than the probe interval, then use pushes
10012 to save registers rather than reg->mem moves.
10013 (ix86_expand_prologue): Remove conditional for int_registers_saved
10014 assertion.
10015
10016 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10017
10018 PR target/84014
10019 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10020 min/max for never referenced object.
10021
10022 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10023
10024 PR middle-end/83977
10025 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10026 here.
10027 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10028 attributes from DECL_ATTRIBUTES (decl) without affecting
10029 DECL_ATTRIBUTES (current_function_decl).
10030 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10031 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10032
10033 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10034
10035 PR tree-optimization/83979
10036 * fold-const.c (fold_comparison): Use constant_boolean_node
10037 instead of boolean_{true,false}_node.
10038
10039 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10040
10041 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10042 with zero counts.
10043
10044 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10045
10046 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10047 Simplify the clause that sets the length attribute.
10048 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10049 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10050 clause that sets the length attribute.
10051 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10052
10053 2018-01-24 Tom de Vries <tom@codesourcery.com>
10054
10055 PR target/83589
10056 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10057 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10058 Add strict parameter.
10059 (prevent_branch_around_nothing): Insert dummy insn between branch to
10060 label and label with no ptx insn inbetween.
10061 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10062
10063 2018-01-24 Tom de Vries <tom@codesourcery.com>
10064
10065 PR target/81352
10066 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10067 for neutered threads in warp.
10068 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10069
10070 2018-01-24 Richard Biener <rguenther@suse.de>
10071
10072 PR tree-optimization/83176
10073 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10074 operands.
10075
10076 2018-01-24 Richard Biener <rguenther@suse.de>
10077
10078 PR tree-optimization/82819
10079 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10080 code generating pluses that are no-ops in the target precision.
10081
10082 2018-01-24 Richard Biener <rguenther@suse.de>
10083
10084 PR middle-end/84000
10085 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10086
10087 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10088
10089 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10090 to merge probabilities.
10091 * predict.c (probably_never_executed): Also mark as cold functions
10092 with global 0 profile and guessed local profile.
10093 * profile-count.c (profile_probability::combine_with_count): New
10094 member function.
10095 * profile-count.h (profile_probability::operator*,
10096 profile_probability::operator*=, profile_probability::operator/,
10097 profile_probability::operator/=): Reduce precision to adjusted
10098 and set value to guessed on contradictory divisions.
10099 (profile_probability::combine_with_freq): Remove.
10100 (profile_probability::combine_wiht_count): Declare.
10101 (profile_count::force_nonzero):: Set to adjusted.
10102 (profile_count::probability_in):: Set quality to adjusted.
10103 * tree-ssa-tail-merge.c (replace_block_by): Use
10104 combine_with_count.
10105
10106 2018-01-23 Andrew Waterman <andrew@sifive.com>
10107 Jim Wilson <jimw@sifive.com>
10108
10109 * config/riscv/riscv.c (riscv_stack_boundary): New.
10110 (riscv_option_override): Set riscv_stack_boundary. Handle
10111 riscv_preferred_stack_boundary_arg.
10112 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10113 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10114 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10115 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10116 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10117 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10118
10119 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10120
10121 PR target/83905
10122 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10123 of struct ix86_frame.
10124 (ix86_expand_epilogue): Likewise. Add a local variable for
10125 the reg_save_offset field in struct ix86_frame.
10126
10127 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10128
10129 PR tree-optimization/82604
10130 * tree-loop-distribution.c (enum partition_kind): New enum item
10131 PKIND_PARTIAL_MEMSET.
10132 (partition_builtin_p): Support above new enum item.
10133 (generate_code_for_partition): Ditto.
10134 (compute_access_range): Differentiate cases that equality can be
10135 proven at all loops, the innermost loops or no loops.
10136 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10137 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10138 (finalize_partitions, distribute_loop): Don't fuse partition of
10139 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10140 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10141 parloop is enabled.
10142
10143 2018-01-23 Martin Liska <mliska@suse.cz>
10144
10145 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10146 order to ignore the predictor.
10147 (PRED_POLYMORPHIC_CALL): Likewise.
10148 (PRED_RECURSIVE_CALL): Likewise.
10149
10150 2018-01-23 Martin Liska <mliska@suse.cz>
10151
10152 * tree-profile.c (tree_profiling): Print function header to
10153 aware reader which function we are working on.
10154 * value-prof.c (gimple_find_values_to_profile): Do not print
10155 not interesting value histograms.
10156
10157 2018-01-23 Martin Liska <mliska@suse.cz>
10158
10159 * profile-count.h (enum profile_quality): Add
10160 profile_uninitialized as the first value. Do not number values
10161 as they are zero based.
10162 (profile_count::verify): Update sanity check.
10163 (profile_probability::verify): Likewise.
10164
10165 2018-01-23 Nathan Sidwell <nathan@acm.org>
10166
10167 * doc/invoke.texi (ffor-scope): Deprecate.
10168
10169 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10170
10171 PR tree-optimization/83510
10172 * domwalk.c (set_all_edges_as_executable): New function.
10173 (dom_walker::dom_walker): Convert bool param
10174 "skip_unreachable_blocks" to enum reachability. Move setup of
10175 edge flags to set_all_edges_as_executable and only do it when
10176 reachability is REACHABLE_BLOCKS.
10177 * domwalk.h (enum dom_walker::reachability): New enum.
10178 (dom_walker::dom_walker): Convert bool param
10179 "skip_unreachable_blocks" to enum reachability.
10180 (set_all_edges_as_executable): New decl.
10181 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
10182 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10183 "reachability".
10184 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10185 but converting true to REACHABLE_BLOCKS.
10186 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10187 * tree-vrp.c
10188 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10189 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10190 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10191 REACHABLE_BLOCKS.
10192 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10193 if check_all_array_refs will be called.
10194
10195 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10196
10197 * tree.c (selftest::test_location_wrappers): Add more test
10198 coverage.
10199
10200 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10201
10202 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10203 (selftest::test_bit_in_range): Likewise.
10204
10205 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10206
10207 PR testsuite/83888
10208 * doc/sourcebuild.texi (vect_float): Say that the selector
10209 only describes the situation when -funsafe-math-optimizations is on.
10210 (vect_float_strict): Document.
10211
10212 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10213
10214 PR tree-optimization/83965
10215 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10216 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10217 instead of checking only for a reduction.
10218 (vect_recog_widen_sum_pattern): Likewise.
10219
10220 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10221
10222 * predict.c (probably_never_executed): Only use precise profile info.
10223 (compute_function_frequency): Skip after inlining hack since we now
10224 have quality checking.
10225
10226 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10227
10228 * profile-count.h (profile_probability::very_unlikely,
10229 profile_probability::unlikely, profile_probability::even): Set
10230 precision to guessed.
10231
10232 2018-01-23 Richard Biener <rguenther@suse.de>
10233
10234 PR tree-optimization/83963
10235 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10236 Properly terminate dominator walk when crossing the exit edge not
10237 when visiting its source block.
10238
10239 2018-01-23 Jakub Jelinek <jakub@redhat.com>
10240
10241 PR c++/83918
10242 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10243 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10244
10245 2018-01-22 Jakub Jelinek <jakub@redhat.com>
10246
10247 PR tree-optimization/83957
10248 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
10249 semicolon after for body surrounded by braces.
10250
10251 PR tree-optimization/83081
10252 * profile-count.h (profile_probability::split): New method.
10253 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10254 Use profile_probability::split.
10255 (do_compare_rtx_and_jump): Fix adjustment of probabilities
10256 when splitting a single conditional jump into 2.
10257
10258 2018-01-22 David Malcolm <dmalcolm@redhat.com>
10259
10260 PR tree-optimization/69452
10261 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10262 decl.
10263
10264 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10265
10266 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10267 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10268 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10269
10270 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10271
10272 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
10273 declaration.
10274 * config/rl78/rl78.md (movdi): New define_expand.
10275 * config/rl78/rl78.c (rl78_split_movdi): New function.
10276
10277 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
10278
10279 PR target/83862
10280 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10281 no longer used.
10282 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10283 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10284 128-bit to produce an UNSPEC move to get the double word with the
10285 signbit and then a shift directly to do signbit.
10286 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10287 implementation with a new version that just does either a direct
10288 move or a regular move. Move memory interface to separate insns.
10289 Move insns so they are next to the expander.
10290 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10291 with signbit move. Split big and little endian case.
10292 (signbit<mode>2_dm_mem_le): Likewise.
10293 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10294 (signbit<mode>2_dm2): Likewise.
10295
10296 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10297
10298 * config/rl78/rl78.md (anddi3): New define_expand.
10299
10300 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10301
10302 * config/rl78/rl78.md (umindi3): New define_expand.
10303
10304 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10305
10306 * config/rl78/rl78.md (smindi3): New define_expand.
10307
10308 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10309
10310 * config/rl78/rl78.md (smaxdi3): New define_expand.
10311
10312 2018-01-22 Carl Love <cel@us.ibm.com>
10313
10314 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10315 LVX_V1TI): Add macro expansion.
10316 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10317 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10318 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
10319 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
10320 Change check to determine if the instruction is a byte reversing
10321 entry. Fix typo in comment.
10322 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
10323 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
10324 Add def_builtin calls for new builtins.
10325 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
10326 Add define_insn expansion.
10327
10328 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10329
10330 * config/rl78/rl78.md (umaxdi3): New define_expand.
10331
10332 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10333
10334 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
10335 for non-QImode registers.
10336
10337 2018-01-22 Richard Biener <rguenther@suse.de>
10338
10339 PR tree-optimization/83963
10340 * graphite-scop-detection.c (scop_detection::get_sese): Delay
10341 including the loop exit block.
10342 (scop_detection::merge_sese): Likewise.
10343 (scop_detection::add_scop): Do it here instead.
10344
10345 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10346
10347 * doc/sourcebuild.texi (arm_softfloat): Document.
10348
10349 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
10350
10351 PR gcc/77734
10352 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
10353 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
10354 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
10355
10356 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10357 David Edelsohn <dje.gcc@gmail.com>
10358
10359 PR target/83946
10360 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10361 Change "crset eq" to "crset 2".
10362 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10363 (*call_indirect_aix<mode>_nospec): Likewise.
10364 (*call_value_indirect_aix<mode>_nospec): Likewise.
10365 (*call_indirect_elfv2<mode>_nospec): Likewise.
10366 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
10367 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
10368 change assembly output from . to $.
10369 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10370 (indirect_jump<mode>_nospec): Change assembly output from . to $.
10371 (*tablejump<mode>_internal1_nospec): Likewise.
10372
10373 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
10374
10375 PR target/80870
10376 * config/sh/sh_optimize_sett_clrt.cc:
10377 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
10378
10379 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
10380
10381 PR tree-optimization/83940
10382 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
10383 offset_dt to vect_constant_def rather than vect_unknown_def_type.
10384 (vect_check_load_store_mask): Add a mask_dt_out parameter and
10385 use it to pass back the definition type.
10386 (vect_check_store_rhs): Likewise rhs_dt_out.
10387 (vect_build_gather_load_calls): Add a mask_dt argument and use
10388 it instead of a call to vect_is_simple_use.
10389 (vectorizable_store): Update calls to vect_check_load_store_mask
10390 and vect_check_store_rhs. Use the dt returned by the latter instead
10391 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
10392 instead of calls to vect_is_simple_use. Pass the scalar rather
10393 than the vector operand to vect_is_simple_use when handling
10394 second and subsequent copies of an rhs value.
10395 (vectorizable_load): Update calls to vect_check_load_store_mask
10396 and vect_build_gather_load_calls. Use the cached mask_dt and
10397 gs_info.offset_dt instead of calls to vect_is_simple_use.
10398
10399 2018-01-20 Jakub Jelinek <jakub@redhat.com>
10400
10401 PR middle-end/83945
10402 * tree-emutls.c: Include gimplify.h.
10403 (lower_emutls_2): New function.
10404 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
10405 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
10406 it before further processing.
10407
10408 PR target/83930
10409 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
10410 UINTVAL (trueop1) instead of INTVAL (op1).
10411
10412 2018-01-19 Jakub Jelinek <jakub@redhat.com>
10413
10414 PR debug/81570
10415 PR debug/83728
10416 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
10417 INCOMING_FRAME_SP_OFFSET if not defined.
10418 (scan_trace): Add ENTRY argument. If true and
10419 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
10420 emit a note to adjust the CFA offset.
10421 (create_cfi_notes): Adjust scan_trace callers.
10422 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
10423 INCOMING_FRAME_SP_OFFSET in the CIE.
10424 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
10425 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
10426 Likewise.
10427 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
10428 * doc/tm.texi: Regenerated.
10429
10430 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10431
10432 PR rtl-optimization/83147
10433 * lra-constraints.c (remove_inheritance_pseudos): Use
10434 lra_substitute_pseudo_within_insn.
10435
10436 2018-01-19 Tom de Vries <tom@codesourcery.com>
10437 Cesar Philippidis <cesar@codesourcery.com>
10438
10439 PR target/83920
10440 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
10441
10442 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
10443
10444 PR target/83790
10445 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
10446 spaces for function labels.
10447
10448 2018-01-19 Martin Liska <mliska@suse.cz>
10449
10450 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
10451 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
10452 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
10453 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
10454 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
10455 (PRED_CONST_RETURN): Change from 69 to 65.
10456 (PRED_NULL_RETURN): Change from 91 to 71.
10457 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
10458 (PRED_LOOP_GUARD): Change from 66 to 73.
10459
10460 2018-01-19 Martin Liska <mliska@suse.cz>
10461
10462 * predict.c (predict_insn_def): Add new assert.
10463 (struct branch_predictor): Change type to signed integer.
10464 (test_prediction_value_range): Amend test to cover
10465 PROB_UNINITIALIZED.
10466 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
10467 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
10468 (PRED_LOOP_ITERATIONS_MAX): Likewise.
10469 (PRED_LOOP_IV_COMPARE): Likewise.
10470 * predict.h (PROB_UNINITIALIZED): Define new constant.
10471
10472 2018-01-19 Martin Liska <mliska@suse.cz>
10473
10474 * predict.c (dump_prediction): Add new format for
10475 analyze_brprob.py script which is enabled with -details
10476 suboption.
10477 * profile-count.h (precise_p): New function.
10478
10479 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
10480
10481 PR tree-optimization/83922
10482 * tree-vect-loop.c (vect_verify_full_masking): Return false if
10483 there are no statements that need masking.
10484 (vect_active_double_reduction_p): New function.
10485 (vect_analyze_loop_operations): Use it when handling phis that
10486 are not in the loop header.
10487
10488 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
10489
10490 PR tree-optimization/83914
10491 * tree-vect-loop.c (vectorizable_induction): Don't convert
10492 init_expr or apply the peeling adjustment for inductions
10493 that are nested within the vectorized loop.
10494
10495 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10496
10497 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
10498 instead of NEG.
10499
10500 2018-01-18 Jakub Jelinek <jakub@redhat.com>
10501
10502 PR sanitizer/81715
10503 PR testsuite/83882
10504 * function.h (gimplify_parameters): Add gimple_seq * argument.
10505 * function.c: Include gimple.h and options.h.
10506 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
10507 for the added local temporaries if needed.
10508 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
10509 if there are any parameter cleanups, wrap whole body into a
10510 try/finally with the cleanups.
10511
10512 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
10513
10514 PR target/82964
10515 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10516 Use GET_MODE_CLASS for scalar floating point.
10517
10518 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10519
10520 PR ipa/82256
10521 patch by PaX Team
10522 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10523 Fix call of call_cgraph_insertion_hooks.
10524
10525 2018-01-18 Martin Sebor <msebor@redhat.com>
10526
10527 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10528
10529 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10530
10531 PR ipa/83619
10532 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10533 frequencies.
10534
10535 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
10536
10537 PR other/70268
10538 * common.opt: (-ffile-prefix-map): New option.
10539 * opts.c (common_handle_option): Defer it.
10540 * opts-global.c (handle_common_deferred_options): Handle it.
10541 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10542 * file-prefix-map.h: New file.
10543 (remap_debug_filename, add_debug_prefix_map): ...here.
10544 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10545 * final.c (debug_prefix_map, add_debug_prefix_map
10546 remap_debug_filename): Move to...
10547 * file-prefix-map.c: New file.
10548 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10549 generalize, get rid of alloca(), use strrchr() instead of strchr().
10550 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10551 Implement in terms of add_prefix_map().
10552 (remap_macro_filename, remap_debug_filename): Implement in term of
10553 remap_filename().
10554 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10555 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10556 * dbxout.c: Include file-prefix-map.h.
10557 * varasm.c: Likewise.
10558 * vmsdbgout.c: Likewise.
10559 * xcoffout.c: Likewise.
10560 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10561 * doc/cppopts.texi (-fmacro-prefix-map): Document.
10562 * doc/invoke.texi (-ffile-prefix-map): Document.
10563 (-fdebug-prefix-map): Update description.
10564
10565 2018-01-18 Martin Liska <mliska@suse.cz>
10566
10567 * config/i386/i386.c (indirect_thunk_name): Document that also
10568 lfence is emitted.
10569 (output_indirect_thunk): Document why both instructions
10570 (pause and lfence) are generated.
10571
10572 2018-01-18 Richard Biener <rguenther@suse.de>
10573
10574 PR tree-optimization/83887
10575 * graphite-scop-detection.c
10576 (scop_detection::get_nearest_dom_with_single_entry): Remove.
10577 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
10578 (scop_detection::merge_sese): Re-implement with a flood-fill
10579 algorithm that properly finds a SESE region if it exists.
10580
10581 2018-01-18 Jakub Jelinek <jakub@redhat.com>
10582
10583 PR c/61240
10584 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
10585 pointer_diff optimizations use view_convert instead of convert.
10586
10587 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10588
10589 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10590 Generate different code for -mno-speculate-indirect-jumps.
10591 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10592 (*call_indirect_aix<mode>): Disable for
10593 -mno-speculate-indirect-jumps.
10594 (*call_indirect_aix<mode>_nospec): New define_insn.
10595 (*call_value_indirect_aix<mode>): Disable for
10596 -mno-speculate-indirect-jumps.
10597 (*call_value_indirect_aix<mode>_nospec): New define_insn.
10598 (*sibcall_nonlocal_sysv<mode>): Generate different code for
10599 -mno-speculate-indirect-jumps.
10600 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10601
10602 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10603
10604 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
10605 long double type, set the flags for noting the default long double
10606 type, even if we don't pass or return a long double type.
10607
10608 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
10609
10610 PR ipa/83051
10611 * ipa-inline.c (flatten_function): Do not overwrite final inlining
10612 failure.
10613
10614 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
10615
10616 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
10617 support for merge[hl].
10618 (fold_mergehl_helper): New helper function.
10619 (tree-vector-builder.h): New #include for tree_vector_builder usage.
10620 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
10621 (altivec_vmrglw_direct): Add xxmrglw insn.
10622
10623 2018-01-17 Andrew Waterman <andrew@sifive.com>
10624
10625 * config/riscv/riscv.c (riscv_conditional_register_usage): If
10626 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
10627
10628 2018-01-17 David Malcolm <dmalcolm@redhat.com>
10629
10630 PR lto/83121
10631 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
10632 call the lto_location_cache before reading the
10633 DECL_SOURCE_LOCATION of the types.
10634
10635 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
10636 Richard Sandiford <richard.sandiford@linaro.org>
10637
10638 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
10639 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
10640 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
10641 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
10642 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
10643 Add declaration.
10644 * config/aarch64/constraints.md (aarch64_movti_operand):
10645 Limit immediates.
10646 * config/aarch64/predicates.md (Uti): Add new constraint.
10647
10648 2018-01-17 Carl Love <cel@us.ibm.com>
10649
10650 * config/rs6000/vsx.md (define_expand xl_len_r,
10651 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10652 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10653 lxvll.
10654 (define_expand, define_insn): Move the shift left from the
10655 define_insn to the define_expand for lxvl and stxvl instructions.
10656 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10657 and XL_LEN_R definitions to PURE.
10658
10659 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
10660
10661 * config/i386/i386.c (indirect_thunk_name): Declare regno
10662 as unsigned int. Compare regno with INVALID_REGNUM.
10663 (output_indirect_thunk): Ditto.
10664 (output_indirect_thunk_function): Ditto.
10665 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
10666 in the call to output_indirect_thunk_function.
10667
10668 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
10669
10670 PR middle-end/83884
10671 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10672 rather than the size of inner_type to determine the stack slot size
10673 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10674
10675 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
10676
10677 PR target/83546
10678 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10679 to PTA_SILVERMONT.
10680
10681 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
10682
10683 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10684 endian Linux systems to optionally enable multilibs for selecting
10685 the long double type if the user configured an explicit type.
10686 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10687 have no long double multilibs if not defined.
10688 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10689 warn if the user used -mabi={ieee,ibm}longdouble and we built
10690 multilibs for long double.
10691 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10692 appropriate multilib option.
10693 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10694 multilib options.
10695 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10696 for building long double multilibs.
10697 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10698
10699 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
10700
10701 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10702 copies.
10703
10704 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10705 64 bits.
10706 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10707 128 bits.
10708
10709 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10710 variables.
10711
10712 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10713 return value.
10714
10715 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10716
10717 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10718 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10719
10720 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10721
10722 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10723 different rtl trees depending on TARGET_64BIT.
10724 (rs6000_gen_lvx): Likewise.
10725
10726 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10727
10728 * config/visium/visium.md (nop): Tweak comment.
10729 (hazard_nop): Likewise.
10730
10731 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10732
10733 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10734 -mspeculate-indirect-jumps.
10735 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10736 for -mno-speculate-indirect-jumps.
10737 (*call_indirect_elfv2<mode>_nospec): New define_insn.
10738 (*call_value_indirect_elfv2<mode>): Disable for
10739 -mno-speculate-indirect-jumps.
10740 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10741 (indirect_jump): Emit different RTL for
10742 -mno-speculate-indirect-jumps.
10743 (*indirect_jump<mode>): Disable for
10744 -mno-speculate-indirect-jumps.
10745 (*indirect_jump<mode>_nospec): New define_insn.
10746 (tablejump): Emit different RTL for
10747 -mno-speculate-indirect-jumps.
10748 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10749 (tablejumpsi_nospec): New define_expand.
10750 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10751 (tablejumpdi_nospec): New define_expand.
10752 (*tablejump<mode>_internal1): Disable for
10753 -mno-speculate-indirect-jumps.
10754 (*tablejump<mode>_internal1_nospec): New define_insn.
10755 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10756 option.
10757
10758 2018-01-16 Artyom Skrobov tyomitch@gmail.com
10759
10760 * caller-save.c (insert_save): Drop unnecessary parameter. All
10761 callers updated.
10762
10763 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10764 Richard Biener <rguenth@suse.de>
10765
10766 PR libgomp/83590
10767 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10768 return early, inline manually is_gimple_sizepos. Make sure if we
10769 call gimplify_expr we don't end up with a gimple constant.
10770 * tree.c (variably_modified_type_p): Don't return true for
10771 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
10772 * gimplify.h (is_gimple_sizepos): Remove.
10773
10774 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10775
10776 PR tree-optimization/83857
10777 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10778 vectorizable_live_operation for pure SLP statements.
10779 (vectorizable_live_operation): Handle PHIs.
10780
10781 2018-01-16 Richard Biener <rguenther@suse.de>
10782
10783 PR tree-optimization/83867
10784 * tree-vect-stmts.c (vect_transform_stmt): Precompute
10785 nested_in_vect_loop_p since the scalar stmt may get invalidated.
10786
10787 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10788
10789 PR c/83844
10790 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10791 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10792 If off is not INTEGER_CST, issue a may not be aligned warning
10793 rather than isn't aligned. Use isn%'t rather than isn't.
10794 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10795 into MULT_EXPR.
10796 <case MULT_EXPR>: Improve the case when bottom and one of the
10797 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10798 operand, in that case check if the other operand is multiple of
10799 bottom divided by the INTEGER_CST operand.
10800
10801 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10802
10803 PR target/83858
10804 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10805 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10806 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10807 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10808 * config/pa/pa.c (pa_function_arg_advance): Likewise.
10809 (pa_function_arg, pa_arg_partial_bytes): Likewise.
10810 (pa_function_arg_size): New function.
10811
10812 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10813
10814 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10815 in a separate statement.
10816
10817 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10818
10819 PR tree-optimization/83847
10820 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10821 group gathers and scatters.
10822
10823 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10824
10825 PR rtl-optimization/86620
10826 * params.def (max-sched-ready-insns): Bump minimum value to 1.
10827
10828 PR rtl-optimization/83213
10829 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10830 to last if both are JUMP_INSNs.
10831
10832 PR tree-optimization/83843
10833 * gimple-ssa-store-merging.c
10834 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10835 store_immediate_info for bswap/nop orig_stores.
10836
10837 2018-01-15 Andrew Waterman <andrew@sifive.com>
10838
10839 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10840 !TARGET_MUL.
10841 <UDIV>: Increase cost if !TARGET_DIV.
10842
10843 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
10844
10845 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10846 (define_attr "cr_logical_3op"): New.
10847 (cceq_ior_compare): Adjust.
10848 (cceq_ior_compare_complement): Adjust.
10849 (*cceq_rev_compare): Adjust.
10850 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10851 (is_cracked_insn): Adjust.
10852 (insn_must_be_first_in_group): Adjust.
10853 * config/rs6000/40x.md: Adjust.
10854 * config/rs6000/440.md: Adjust.
10855 * config/rs6000/476.md: Adjust.
10856 * config/rs6000/601.md: Adjust.
10857 * config/rs6000/603.md: Adjust.
10858 * config/rs6000/6xx.md: Adjust.
10859 * config/rs6000/7450.md: Adjust.
10860 * config/rs6000/7xx.md: Adjust.
10861 * config/rs6000/8540.md: Adjust.
10862 * config/rs6000/cell.md: Adjust.
10863 * config/rs6000/e300c2c3.md: Adjust.
10864 * config/rs6000/e500mc.md: Adjust.
10865 * config/rs6000/e500mc64.md: Adjust.
10866 * config/rs6000/e5500.md: Adjust.
10867 * config/rs6000/e6500.md: Adjust.
10868 * config/rs6000/mpc.md: Adjust.
10869 * config/rs6000/power4.md: Adjust.
10870 * config/rs6000/power5.md: Adjust.
10871 * config/rs6000/power6.md: Adjust.
10872 * config/rs6000/power7.md: Adjust.
10873 * config/rs6000/power8.md: Adjust.
10874 * config/rs6000/power9.md: Adjust.
10875 * config/rs6000/rs64.md: Adjust.
10876 * config/rs6000/titan.md: Adjust.
10877
10878 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10879
10880 * config/i386/predicates.md (indirect_branch_operand): Rewrite
10881 ix86_indirect_branch_register logic.
10882
10883 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10884
10885 * config/i386/constraints.md (Bs): Update
10886 ix86_indirect_branch_register check. Don't check
10887 ix86_indirect_branch_register with GOT_memory_operand.
10888 (Bw): Likewise.
10889 * config/i386/predicates.md (GOT_memory_operand): Don't check
10890 ix86_indirect_branch_register here.
10891 (GOT32_symbol_operand): Likewise.
10892
10893 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10894
10895 * config/i386/predicates.md (constant_call_address_operand):
10896 Rewrite ix86_indirect_branch_register logic.
10897 (sibcall_insn_operand): Likewise.
10898
10899 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10900
10901 * config/i386/constraints.md (Bs): Replace
10902 ix86_indirect_branch_thunk_register with
10903 ix86_indirect_branch_register.
10904 (Bw): Likewise.
10905 * config/i386/i386.md (indirect_jump): Likewise.
10906 (tablejump): Likewise.
10907 (*sibcall_memory): Likewise.
10908 (*sibcall_value_memory): Likewise.
10909 Peepholes of indirect call and jump via memory: Likewise.
10910 * config/i386/i386.opt: Likewise.
10911 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10912 (GOT_memory_operand): Likewise.
10913 (call_insn_operand): Likewise.
10914 (sibcall_insn_operand): Likewise.
10915 (GOT32_symbol_operand): Likewise.
10916
10917 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10918
10919 PR middle-end/83837
10920 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10921 type rather than type addr's type points to.
10922 (expand_omp_atomic_mutex): Likewise.
10923 (expand_omp_atomic): Likewise.
10924
10925 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10926
10927 PR target/83839
10928 * config/i386/i386.c (output_indirect_thunk_function): Use
10929 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10930 for __x86_return_thunk.
10931
10932 2018-01-15 Richard Biener <rguenther@suse.de>
10933
10934 PR middle-end/83850
10935 * expmed.c (extract_bit_field_1): Fix typo.
10936
10937 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10938
10939 PR target/83687
10940 * config/arm/iterators.md (VF): New mode iterator.
10941 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10942 Remove integer-related logic from pattern.
10943 (neon_vabd<mode>_3): Likewise.
10944
10945 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10946
10947 PR middle-end/82694
10948 * common.opt (fstrict-overflow): No longer an alias.
10949 (fwrapv-pointer): New option.
10950 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10951 also for pointer types based on flag_wrapv_pointer.
10952 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10953 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10954 opts->x_flag_wrapv got set.
10955 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10956 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10957 POINTER_TYPE_OVERFLOW_UNDEFINED.
10958 * match.pd: Likewise in address comparison pattern.
10959 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10960
10961 2018-01-15 Richard Biener <rguenther@suse.de>
10962
10963 PR lto/83804
10964 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10965 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
10966 Reset type names to their identifier if their TYPE_DECL doesn't
10967 have linkage (and thus is used for ODR and devirt).
10968 (save_debug_info_for_decl): Remove.
10969 (save_debug_info_for_type): Likewise.
10970 (add_tree_to_fld_list): Adjust.
10971 * tree-pretty-print.c (dump_generic_node): Make dumping of
10972 type names more robust.
10973
10974 2018-01-15 Richard Biener <rguenther@suse.de>
10975
10976 * BASE-VER: Bump to 8.0.1.
10977
10978 2018-01-14 Martin Sebor <msebor@redhat.com>
10979
10980 PR other/83508
10981 * builtins.c (check_access): Avoid warning when the no-warning bit
10982 is set.
10983
10984 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
10985
10986 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10987 * ira-color (allocno_hard_regs_compare): Likewise.
10988
10989 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
10990
10991 PR target/83013
10992 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10993 Use .pushsection/.popsection.
10994
10995 2018-01-14 Martin Sebor <msebor@redhat.com>
10996
10997 PR c++/81327
10998 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10999
11000 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11001
11002 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11003 entry from extra_headers.
11004 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11005 extra_headers, make the list bitwise identical to the i?86-*-* one.
11006
11007 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11008
11009 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11010 -mcmodel=large with -mindirect-branch=thunk,
11011 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11012 -mfunction-return=thunk-extern.
11013 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11014 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11015 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11016
11017 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11018
11019 * config/i386/i386.c (print_reg): Print the name of the full
11020 integer register without '%'.
11021 (ix86_print_operand): Handle 'V'.
11022 * doc/extend.texi: Document 'V' modifier.
11023
11024 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11025
11026 * config/i386/constraints.md (Bs): Disallow memory operand for
11027 -mindirect-branch-register.
11028 (Bw): Likewise.
11029 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11030 (GOT_memory_operand): Likewise.
11031 (call_insn_operand): Likewise.
11032 (sibcall_insn_operand): Likewise.
11033 (GOT32_symbol_operand): Likewise.
11034 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11035 for -mindirect-branch-register.
11036 (tablejump): Likewise.
11037 (*sibcall_memory): Likewise.
11038 (*sibcall_value_memory): Likewise.
11039 Disallow peepholes of indirect call and jump via memory for
11040 -mindirect-branch-register.
11041 (*call_pop): Replace m with Bw.
11042 (*call_value_pop): Likewise.
11043 (*sibcall_pop_memory): Replace m with Bs.
11044 * config/i386/i386.opt (mindirect-branch-register): New option.
11045 * doc/invoke.texi: Document -mindirect-branch-register option.
11046
11047 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11048
11049 * config/i386/i386-protos.h (ix86_output_function_return): New.
11050 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11051 set function_return_type.
11052 (indirect_thunk_name): Add ret_p to indicate thunk for function
11053 return.
11054 (output_indirect_thunk_function): Pass false to
11055 indirect_thunk_name.
11056 (ix86_output_indirect_branch_via_reg): Likewise.
11057 (ix86_output_indirect_branch_via_push): Likewise.
11058 (output_indirect_thunk_function): Create alias for function
11059 return thunk if regno < 0.
11060 (ix86_output_function_return): New function.
11061 (ix86_handle_fndecl_attribute): Handle function_return.
11062 (ix86_attribute_table): Add function_return.
11063 * config/i386/i386.h (machine_function): Add
11064 function_return_type.
11065 * config/i386/i386.md (simple_return_internal): Use
11066 ix86_output_function_return.
11067 (simple_return_internal_long): Likewise.
11068 * config/i386/i386.opt (mfunction-return=): New option.
11069 (indirect_branch): Mention -mfunction-return=.
11070 * doc/extend.texi: Document function_return function attribute.
11071 * doc/invoke.texi: Document -mfunction-return= option.
11072
11073 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11074
11075 * config/i386/i386-opts.h (indirect_branch): New.
11076 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11077 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11078 with local indirect jump when converting indirect call and jump.
11079 (ix86_set_indirect_branch_type): New.
11080 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11081 (indirectlabelno): New.
11082 (indirect_thunk_needed): Likewise.
11083 (indirect_thunk_bnd_needed): Likewise.
11084 (indirect_thunks_used): Likewise.
11085 (indirect_thunks_bnd_used): Likewise.
11086 (INDIRECT_LABEL): Likewise.
11087 (indirect_thunk_name): Likewise.
11088 (output_indirect_thunk): Likewise.
11089 (output_indirect_thunk_function): Likewise.
11090 (ix86_output_indirect_branch_via_reg): Likewise.
11091 (ix86_output_indirect_branch_via_push): Likewise.
11092 (ix86_output_indirect_branch): Likewise.
11093 (ix86_output_indirect_jmp): Likewise.
11094 (ix86_code_end): Call output_indirect_thunk_function if needed.
11095 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11096 needed.
11097 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11098 (ix86_attribute_table): Add indirect_branch.
11099 * config/i386/i386.h (machine_function): Add indirect_branch_type
11100 and has_local_indirect_jump.
11101 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11102 to true.
11103 (tablejump): Likewise.
11104 (*indirect_jump): Use ix86_output_indirect_jmp.
11105 (*tablejump_1): Likewise.
11106 (simple_return_indirect_internal): Likewise.
11107 * config/i386/i386.opt (mindirect-branch=): New option.
11108 (indirect_branch): New.
11109 (keep): Likewise.
11110 (thunk): Likewise.
11111 (thunk-inline): Likewise.
11112 (thunk-extern): Likewise.
11113 * doc/extend.texi: Document indirect_branch function attribute.
11114 * doc/invoke.texi: Document -mindirect-branch= option.
11115
11116 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11117
11118 PR ipa/83051
11119 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11120
11121 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11122
11123 * ipa-inline.c (want_inline_small_function_p): Return false if
11124 inlining has already failed with CIF_FINAL_ERROR.
11125 (update_caller_keys): Call want_inline_small_function_p before
11126 can_inline_edge_p.
11127 (update_callee_keys): Likewise.
11128
11129 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11130
11131 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11132 New function.
11133 (rs6000_quadword_masked_address_p): Likewise.
11134 (quad_aligned_load_p): Likewise.
11135 (quad_aligned_store_p): Likewise.
11136 (const_load_sequence_p): Add comment to describe the outer-most loop.
11137 (mimic_memory_attributes_and_flags): New function.
11138 (rs6000_gen_stvx): Likewise.
11139 (replace_swapped_aligned_store): Likewise.
11140 (rs6000_gen_lvx): Likewise.
11141 (replace_swapped_aligned_load): Likewise.
11142 (replace_swapped_load_constant): Capitalize argument name in
11143 comment describing this function.
11144 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11145 and stores that access quad-word aligned addresses and replace
11146 with stvx or lvx instructions when appropriate.
11147 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11148 New function prototype.
11149 (rs6000_quadword_masked_address_p): Likewise.
11150 (rs6000_gen_lvx): Likewise.
11151 (rs6000_gen_stvx): Likewise.
11152 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11153 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11154 when memory address is aligned.
11155 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11156 this split to select lvx instruction when memory address is aligned.
11157 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11158 instruction when memory address is aligned.
11159 (*vsx_le_perm_load_v16qi): Likewise.
11160 (four unnamed splitters): Modify to select the stvx instruction
11161 when memory is aligned.
11162
11163 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11164
11165 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11166 which appears in the queue multiple times.
11167
11168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11169 Alan Hayward <alan.hayward@arm.com>
11170 David Sherwood <david.sherwood@arm.com>
11171
11172 * tree-vectorizer.h (vec_lower_bound): New structure.
11173 (_loop_vec_info): Add check_nonzero and lower_bounds.
11174 (LOOP_VINFO_CHECK_NONZERO): New macro.
11175 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11176 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11177 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11178 fields. Make seg_len the distance travelled, not including the
11179 access size.
11180 (dr_direction_indicator): Declare.
11181 (dr_zero_step_indicator): Likewise.
11182 (dr_known_forward_stride_p): Likewise.
11183 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11184 tree-ssanames.h.
11185 (runtime_alias_check_p): Allow runtime alias checks with
11186 variable strides.
11187 (operator ==): Compare access_size and align.
11188 (prune_runtime_alias_test_list): Rework for new distinction between
11189 the access_size and seg_len.
11190 (create_intersect_range_checks_index): Likewise. Cope with polynomial
11191 segment lengths.
11192 (get_segment_min_max): New function.
11193 (create_intersect_range_checks): Use it.
11194 (dr_step_indicator): New function.
11195 (dr_direction_indicator): Likewise.
11196 (dr_zero_step_indicator): Likewise.
11197 (dr_known_forward_stride_p): Likewise.
11198 * tree-loop-distribution.c (data_ref_segment_size): Return
11199 DR_STEP * (niters - 1).
11200 (compute_alias_check_pairs): Update call to the dr_with_seg_len
11201 constructor.
11202 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11203 (vect_preserves_scalar_order_p): New function, split out from...
11204 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
11205 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11206 (vect_vfa_access_size): New function.
11207 (vect_vfa_align): Likewise.
11208 (vect_compile_time_alias): Take access_size_a and access_b arguments.
11209 (dump_lower_bound): New function.
11210 (vect_check_lower_bound): Likewise.
11211 (vect_small_gap_p): Likewise.
11212 (vectorizable_with_step_bound_p): Likewise.
11213 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11214 depencies if the vectorization factor is 1. Convert the checks
11215 for nonzero steps into checks on the bounds of DR_STEP. Try using
11216 a bunds check for variable steps if the minimum required step is
11217 relatively small. Update calls to the dr_with_seg_len
11218 constructor and to vect_compile_time_alias.
11219 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11220 function.
11221 (vect_loop_versioning): Call it.
11222 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11223 when retrying.
11224 (vect_estimate_min_profitable_iters): Account for any bounds checks.
11225
11226 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11227 Alan Hayward <alan.hayward@arm.com>
11228 David Sherwood <david.sherwood@arm.com>
11229
11230 * doc/sourcebuild.texi (vect_scatter_store): Document.
11231 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11232 optabs.
11233 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11234 Document.
11235 * genopinit.c (main): Add supports_vec_scatter_store and
11236 supports_vec_scatter_store_cached to target_optabs.
11237 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11238 IFN_MASK_SCATTER_STORE.
11239 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11240 functions.
11241 * internal-fn.h (internal_store_fn_p): Declare.
11242 (internal_fn_stored_value_index): Likewise.
11243 * internal-fn.c (scatter_store_direct): New macro.
11244 (expand_scatter_store_optab_fn): New function.
11245 (direct_scatter_store_optab_supported_p): New macro.
11246 (internal_store_fn_p): New function.
11247 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11248 IFN_MASK_SCATTER_STORE.
11249 (internal_fn_mask_index): Likewise.
11250 (internal_fn_stored_value_index): New function.
11251 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11252 for scatter stores.
11253 * optabs-query.h (supports_vec_scatter_store_p): Declare.
11254 * optabs-query.c (supports_vec_scatter_store_p): New function.
11255 * tree-vectorizer.h (vect_get_store_rhs): Declare.
11256 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11257 true for scatter stores.
11258 (vect_gather_scatter_fn_p): Handle scatter stores too.
11259 (vect_check_gather_scatter): Consider using scatter stores if
11260 supports_vec_scatter_store_p.
11261 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11262 scatter stores too.
11263 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11264 internal_fn_stored_value_index.
11265 (check_load_store_masking): Handle scatter stores too.
11266 (vect_get_store_rhs): Make public.
11267 (vectorizable_call): Use internal_store_fn_p.
11268 (vectorizable_store): Handle scatter store internal functions.
11269 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11270 when deciding whether the end of the group has been reached.
11271 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11272 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11273 (mask_scatter_store<mode>): New insns.
11274
11275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11276 Alan Hayward <alan.hayward@arm.com>
11277 David Sherwood <david.sherwood@arm.com>
11278
11279 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11280 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11281 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11282 function.
11283 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11284 Use vect_truncate_gather_scatter_offset if we can't treat the
11285 operation as a normal gather load or scatter store.
11286 (get_group_load_store_type): Take the gather_scatter_info
11287 as argument. Try using a gather load or scatter store for
11288 single-element groups.
11289 (get_load_store_type): Update calls to get_group_load_store_type
11290 and vect_use_strided_gather_scatters_p.
11291
11292 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11293 Alan Hayward <alan.hayward@arm.com>
11294 David Sherwood <david.sherwood@arm.com>
11295
11296 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11297 optional tree argument.
11298 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11299 null target hooks.
11300 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11301 but continue to use the current value as a fallback.
11302 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11303 to compare the updates.
11304 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11305 (get_load_store_type): Use it when handling a strided access.
11306 (vect_get_strided_load_store_ops): New function.
11307 (vect_get_data_ptr_increment): Likewise.
11308 (vectorizable_load): Handle strided gather loads. Always pass
11309 a step to vect_create_data_ref_ptr and bump_vector_ptr.
11310
11311 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11312 Alan Hayward <alan.hayward@arm.com>
11313 David Sherwood <david.sherwood@arm.com>
11314
11315 * doc/md.texi (gather_load@var{m}): Document.
11316 (mask_gather_load@var{m}): Likewise.
11317 * genopinit.c (main): Add supports_vec_gather_load and
11318 supports_vec_gather_load_cached to target_optabs.
11319 * optabs-tree.c (init_tree_optimization_optabs): Use
11320 ggc_cleared_alloc to allocate target_optabs.
11321 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
11322 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
11323 functions.
11324 * internal-fn.h (internal_load_fn_p): Declare.
11325 (internal_gather_scatter_fn_p): Likewise.
11326 (internal_fn_mask_index): Likewise.
11327 (internal_gather_scatter_fn_supported_p): Likewise.
11328 * internal-fn.c (gather_load_direct): New macro.
11329 (expand_gather_load_optab_fn): New function.
11330 (direct_gather_load_optab_supported_p): New macro.
11331 (direct_internal_fn_optab): New function.
11332 (internal_load_fn_p): Likewise.
11333 (internal_gather_scatter_fn_p): Likewise.
11334 (internal_fn_mask_index): Likewise.
11335 (internal_gather_scatter_fn_supported_p): Likewise.
11336 * optabs-query.c (supports_at_least_one_mode_p): New function.
11337 (supports_vec_gather_load_p): Likewise.
11338 * optabs-query.h (supports_vec_gather_load_p): Declare.
11339 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
11340 and memory_type field.
11341 (NUM_PATTERNS): Bump to 15.
11342 * tree-vect-data-refs.c: Include internal-fn.h.
11343 (vect_gather_scatter_fn_p): New function.
11344 (vect_describe_gather_scatter_call): Likewise.
11345 (vect_check_gather_scatter): Try using internal functions for
11346 gather loads. Recognize existing calls to a gather load function.
11347 (vect_analyze_data_refs): Consider using gather loads if
11348 supports_vec_gather_load_p.
11349 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
11350 (vect_get_gather_scatter_offset_type): Likewise.
11351 (vect_convert_mask_for_vectype): Likewise.
11352 (vect_add_conversion_to_patterm): Likewise.
11353 (vect_try_gather_scatter_pattern): Likewise.
11354 (vect_recog_gather_scatter_pattern): New pattern recognizer.
11355 (vect_vect_recog_func_ptrs): Add it.
11356 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11357 internal_fn_mask_index and internal_gather_scatter_fn_p.
11358 (check_load_store_masking): Take the gather_scatter_info as an
11359 argument and handle gather loads.
11360 (vect_get_gather_scatter_ops): New function.
11361 (vectorizable_call): Check internal_load_fn_p.
11362 (vectorizable_load): Likewise. Handle gather load internal
11363 functions.
11364 (vectorizable_store): Update call to check_load_store_masking.
11365 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
11366 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
11367 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
11368 (aarch64_gather_scale_operand_d): New predicates.
11369 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
11370 (mask_gather_load<mode>): New insns.
11371
11372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11373 Alan Hayward <alan.hayward@arm.com>
11374 David Sherwood <david.sherwood@arm.com>
11375
11376 * optabs.def (fold_left_plus_optab): New optab.
11377 * doc/md.texi (fold_left_plus_@var{m}): Document.
11378 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
11379 * internal-fn.c (fold_left_direct): Define.
11380 (expand_fold_left_optab_fn): Likewise.
11381 (direct_fold_left_optab_supported_p): Likewise.
11382 * fold-const-call.c (fold_const_fold_left): New function.
11383 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
11384 * tree-parloops.c (valid_reduction_p): New function.
11385 (gather_scalar_reductions): Use it.
11386 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
11387 (vect_finish_replace_stmt): Declare.
11388 * tree-vect-loop.c (fold_left_reduction_fn): New function.
11389 (needs_fold_left_reduction_p): New function, split out from...
11390 (vect_is_simple_reduction): ...here. Accept reductions that
11391 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
11392 (vect_force_simple_reduction): Also store the reduction type in
11393 the assignment's STMT_VINFO_REDUC_TYPE.
11394 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
11395 (merge_with_identity): New function.
11396 (vect_expand_fold_left): Likewise.
11397 (vectorize_fold_left_reduction): Likewise.
11398 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
11399 scalar phi in place for it. Check for target support and reject
11400 cases that would reassociate the operation. Defer the transform
11401 phase to vectorize_fold_left_reduction.
11402 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
11403 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
11404 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
11405
11406 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11407
11408 * tree-if-conv.c (predicate_mem_writes): Remove redundant
11409 call to ifc_temp_var.
11410
11411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11412 Alan Hayward <alan.hayward@arm.com>
11413 David Sherwood <david.sherwood@arm.com>
11414
11415 * target.def (legitimize_address_displacement): Take the original
11416 offset as a poly_int.
11417 * targhooks.h (default_legitimize_address_displacement): Update
11418 accordingly.
11419 * targhooks.c (default_legitimize_address_displacement): Likewise.
11420 * doc/tm.texi: Regenerate.
11421 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
11422 as an argument, moving assert of ad->disp == ad->disp_term to...
11423 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
11424 Try calling targetm.legitimize_address_displacement before expanding
11425 the address rather than afterwards, and adjust for the new interface.
11426 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
11427 Match the new hook interface. Handle SVE addresses.
11428 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
11429 new hook interface.
11430
11431 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11432
11433 * Makefile.in (OBJS): Add early-remat.o.
11434 * target.def (select_early_remat_modes): New hook.
11435 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
11436 * doc/tm.texi: Regenerate.
11437 * targhooks.h (default_select_early_remat_modes): Declare.
11438 * targhooks.c (default_select_early_remat_modes): New function.
11439 * timevar.def (TV_EARLY_REMAT): New timevar.
11440 * passes.def (pass_early_remat): New pass.
11441 * tree-pass.h (make_pass_early_remat): Declare.
11442 * early-remat.c: New file.
11443 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
11444 function.
11445 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
11446
11447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11448 Alan Hayward <alan.hayward@arm.com>
11449 David Sherwood <david.sherwood@arm.com>
11450
11451 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
11452 vfm1 with a bound_epilog parameter.
11453 (vect_do_peeling): Update calls accordingly, and move the prologue
11454 call earlier in the function. Treat the base bound_epilog as 0 for
11455 fully-masked loops and retain vf - 1 for other loops. Add 1 to
11456 this base when peeling for gaps.
11457 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
11458 with fully-masked loops.
11459 (vect_estimate_min_profitable_iters): Handle the single peeled
11460 iteration in that case.
11461
11462 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11463 Alan Hayward <alan.hayward@arm.com>
11464 David Sherwood <david.sherwood@arm.com>
11465
11466 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
11467 single-element interleaving even if the size is not a power of 2.
11468 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
11469 accesses for single-element interleaving if the group size is
11470 not a power of 2.
11471
11472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11473 Alan Hayward <alan.hayward@arm.com>
11474 David Sherwood <david.sherwood@arm.com>
11475
11476 * doc/md.texi (fold_extract_last_@var{m}): Document.
11477 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
11478 * optabs.def (fold_extract_last_optab): New optab.
11479 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
11480 * internal-fn.c (fold_extract_direct): New macro.
11481 (expand_fold_extract_optab_fn): Likewise.
11482 (direct_fold_extract_optab_supported_p): Likewise.
11483 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
11484 * tree-vect-loop.c (vect_model_reduction_cost): Handle
11485 EXTRACT_LAST_REDUCTION.
11486 (get_initial_def_for_reduction): Do not create an initial vector
11487 for EXTRACT_LAST_REDUCTION reductions.
11488 (vectorizable_reduction): Leave the scalar phi in place for
11489 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
11490 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
11491 epilogue code for EXTRACT_LAST_REDUCTION and defer the
11492 transform phase to vectorizable_condition.
11493 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
11494 split out from...
11495 (vect_finish_stmt_generation): ...here.
11496 (vect_finish_replace_stmt): New function.
11497 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
11498 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
11499 pattern.
11500 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
11501
11502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11503 Alan Hayward <alan.hayward@arm.com>
11504 David Sherwood <david.sherwood@arm.com>
11505
11506 * doc/md.texi (extract_last_@var{m}): Document.
11507 * optabs.def (extract_last_optab): New optab.
11508 * internal-fn.def (EXTRACT_LAST): New internal function.
11509 * internal-fn.c (cond_unary_direct): New macro.
11510 (expand_cond_unary_optab_fn): Likewise.
11511 (direct_cond_unary_optab_supported_p): Likewise.
11512 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
11513 loops using EXTRACT_LAST.
11514 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11515 (extract_last_<mode>): ...this optab.
11516 (vec_extract<mode><Vel>): Update accordingly.
11517
11518 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11519 Alan Hayward <alan.hayward@arm.com>
11520 David Sherwood <david.sherwood@arm.com>
11521
11522 * target.def (empty_mask_is_expensive): New hook.
11523 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11524 * doc/tm.texi: Regenerate.
11525 * targhooks.h (default_empty_mask_is_expensive): Declare.
11526 * targhooks.c (default_empty_mask_is_expensive): New function.
11527 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11528 if the target says that empty masks are expensive.
11529 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11530 New function.
11531 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11532
11533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11534 Alan Hayward <alan.hayward@arm.com>
11535 David Sherwood <david.sherwood@arm.com>
11536
11537 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11538 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11539 (vect_use_loop_mask_for_alignment_p): New function.
11540 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11541 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11542 niters_skip argument. Make sure that the first niters_skip elements
11543 of the first iteration are inactive.
11544 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11545 Update call to vect_set_loop_masks_directly.
11546 (get_misalign_in_elems): New function, split out from...
11547 (vect_gen_prolog_loop_niters): ...here.
11548 (vect_update_init_of_dr): Take a code argument that specifies whether
11549 the adjustment should be added or subtracted.
11550 (vect_update_init_of_drs): Likewise.
11551 (vect_prepare_for_masked_peels): New function.
11552 (vect_do_peeling): Skip prologue peeling if we're using a mask
11553 instead. Update call to vect_update_inits_of_drs.
11554 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11555 mask_skip_niters.
11556 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11557 alignment. Do not include the number of peeled iterations in
11558 the minimum threshold in that case.
11559 (vectorizable_induction): Adjust the start value down by
11560 LOOP_VINFO_MASK_SKIP_NITERS iterations.
11561 (vect_transform_loop): Call vect_prepare_for_masked_peels.
11562 Take the number of skipped iterations into account when calculating
11563 the loop bounds.
11564 * tree-vect-stmts.c (vect_gen_while_not): New function.
11565
11566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11567 Alan Hayward <alan.hayward@arm.com>
11568 David Sherwood <david.sherwood@arm.com>
11569
11570 * doc/sourcebuild.texi (vect_fully_masked): Document.
11571 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
11572 default value to 0.
11573 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
11574 split out from...
11575 (vect_analyze_loop_2): ...here. Don't check the vectorization
11576 factor against the number of loop iterations if the loop is
11577 fully-masked.
11578
11579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11580 Alan Hayward <alan.hayward@arm.com>
11581 David Sherwood <david.sherwood@arm.com>
11582
11583 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
11584 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
11585 (dump_groups): Update accordingly.
11586 (iv_use::mem_type): New member variable.
11587 (address_p): New function.
11588 (record_use): Add a mem_type argument and initialize the new
11589 mem_type field.
11590 (record_group_use): Add a mem_type argument. Use address_p.
11591 Remove obsolete null checks of base_object. Update call to record_use.
11592 (find_interesting_uses_op): Update call to record_group_use.
11593 (find_interesting_uses_cond): Likewise.
11594 (find_interesting_uses_address): Likewise.
11595 (get_mem_type_for_internal_fn): New function.
11596 (find_address_like_use): Likewise.
11597 (find_interesting_uses_stmt): Try find_address_like_use before
11598 calling find_interesting_uses_op.
11599 (addr_offset_valid_p): Use the iv mem_type field as the type
11600 of the addressed memory.
11601 (add_autoinc_candidates): Likewise.
11602 (get_address_cost): Likewise.
11603 (split_small_address_groups_p): Use address_p.
11604 (split_address_groups): Likewise.
11605 (add_iv_candidate_for_use): Likewise.
11606 (autoinc_possible_for_pair): Likewise.
11607 (rewrite_groups): Likewise.
11608 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
11609 (determine_group_iv_cost): Update after split of USE_ADDRESS.
11610 (get_alias_ptr_type_for_ptr_address): New function.
11611 (rewrite_use_address): Rewrite address uses in calls that were
11612 identified by find_address_like_use.
11613
11614 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11615 Alan Hayward <alan.hayward@arm.com>
11616 David Sherwood <david.sherwood@arm.com>
11617
11618 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
11619 TARGET_MEM_REFs.
11620 * gimple-expr.h (is_gimple_addressable: Likewise.
11621 * gimple-expr.c (is_gimple_address): Likewise.
11622 * internal-fn.c (expand_call_mem_ref): New function.
11623 (expand_mask_load_optab_fn): Use it.
11624 (expand_mask_store_optab_fn): Likewise.
11625
11626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11627 Alan Hayward <alan.hayward@arm.com>
11628 David Sherwood <david.sherwood@arm.com>
11629
11630 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
11631 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
11632 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
11633 (cond_umax@var{mode}): Document.
11634 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
11635 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
11636 (cond_umin_optab, cond_umax_optab): New optabs.
11637 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
11638 (COND_IOR, COND_XOR): New internal functions.
11639 * internal-fn.h (get_conditional_internal_fn): Declare.
11640 * internal-fn.c (cond_binary_direct): New macro.
11641 (expand_cond_binary_optab_fn): Likewise.
11642 (direct_cond_binary_optab_supported_p): Likewise.
11643 (get_conditional_internal_fn): New function.
11644 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
11645 Cope with reduction statements that are vectorized as calls rather
11646 than assignments.
11647 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
11648 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11649 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11650 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11651 (UNSPEC_COND_EOR): New unspecs.
11652 (optab): Add mappings for them.
11653 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11654 (sve_int_op, sve_fp_op): New int attributes.
11655
11656 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11657 Alan Hayward <alan.hayward@arm.com>
11658 David Sherwood <david.sherwood@arm.com>
11659
11660 * optabs.def (while_ult_optab): New optab.
11661 * doc/md.texi (while_ult@var{m}@var{n}): Document.
11662 * internal-fn.def (WHILE_ULT): New internal function.
11663 * internal-fn.h (direct_internal_fn_supported_p): New override
11664 that takes two types as argument.
11665 * internal-fn.c (while_direct): New macro.
11666 (expand_while_optab_fn): New function.
11667 (convert_optab_supported_p): Likewise.
11668 (direct_while_optab_supported_p): New macro.
11669 * wide-int.h (wi::udiv_ceil): New function.
11670 * tree-vectorizer.h (rgroup_masks): New structure.
11671 (vec_loop_masks): New typedef.
11672 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11673 and fully_masked_p.
11674 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11675 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11676 (vect_max_vf): New function.
11677 (slpeel_make_loop_iterate_ntimes): Delete.
11678 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11679 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11680 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11681 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11682 internal-fn.h, stor-layout.h and optabs-query.h.
11683 (vect_set_loop_mask): New function.
11684 (add_preheader_seq): Likewise.
11685 (add_header_seq): Likewise.
11686 (interleave_supported_p): Likewise.
11687 (vect_maybe_permute_loop_masks): Likewise.
11688 (vect_set_loop_masks_directly): Likewise.
11689 (vect_set_loop_condition_masked): Likewise.
11690 (vect_set_loop_condition_unmasked): New function, split out from
11691 slpeel_make_loop_iterate_ntimes.
11692 (slpeel_make_loop_iterate_ntimes): Rename to..
11693 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
11694 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11695 (vect_do_peeling): Update call accordingly.
11696 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11697 loops.
11698 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11699 mask_compare_type, can_fully_mask_p and fully_masked_p.
11700 (release_vec_loop_masks): New function.
11701 (_loop_vec_info): Use it to free the loop masks.
11702 (can_produce_all_loop_masks_p): New function.
11703 (vect_get_max_nscalars_per_iter): Likewise.
11704 (vect_verify_full_masking): Likewise.
11705 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11706 retries, and free the mask rgroups before retrying. Check loop-wide
11707 reasons for disallowing fully-masked loops. Make the final decision
11708 about whether use a fully-masked loop or not.
11709 (vect_estimate_min_profitable_iters): Do not assume that peeling
11710 for the number of iterations will be needed for fully-masked loops.
11711 (vectorizable_reduction): Disable fully-masked loops.
11712 (vectorizable_live_operation): Likewise.
11713 (vect_halve_mask_nunits): New function.
11714 (vect_double_mask_nunits): Likewise.
11715 (vect_record_loop_mask): Likewise.
11716 (vect_get_loop_mask): Likewise.
11717 (vect_transform_loop): Handle the case in which the final loop
11718 iteration might handle a partial vector. Call vect_set_loop_condition
11719 instead of slpeel_make_loop_iterate_ntimes.
11720 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11721 (check_load_store_masking): New function.
11722 (prepare_load_store_mask): Likewise.
11723 (vectorizable_store): Handle fully-masked loops.
11724 (vectorizable_load): Likewise.
11725 (supportable_widening_operation): Use vect_halve_mask_nunits for
11726 booleans.
11727 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11728 (vect_gen_while): New function.
11729 * config/aarch64/aarch64.md (umax<mode>3): New expander.
11730 (aarch64_uqdec<mode>): New insn.
11731
11732 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11733 Alan Hayward <alan.hayward@arm.com>
11734 David Sherwood <david.sherwood@arm.com>
11735
11736 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11737 (reduc_xor_scal_optab): New optabs.
11738 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11739 (reduc_xor_scal_@var{m}): Document.
11740 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11741 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11742 internal functions.
11743 * fold-const-call.c (fold_const_call): Handle them.
11744 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11745 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11746 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11747 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11748 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11749 (UNSPEC_XORV): New unspecs.
11750 (optab): Add entries for them.
11751 (BITWISEV): New int iterator.
11752 (bit_reduc_op): New int attributes.
11753
11754 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11755 Alan Hayward <alan.hayward@arm.com>
11756 David Sherwood <david.sherwood@arm.com>
11757
11758 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11759 * internal-fn.def (VEC_SHL_INSERT): New internal function.
11760 * optabs.def (vec_shl_insert_optab): New optab.
11761 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11762 (duplicate_and_interleave): Likewise.
11763 * tree-vect-loop.c: Include internal-fn.h.
11764 (neutral_op_for_slp_reduction): New function, split out from
11765 get_initial_defs_for_reduction.
11766 (get_initial_def_for_reduction): Handle option 2 for variable-length
11767 vectors by loading the neutral value into a vector and then shifting
11768 the initial value into element 0.
11769 (get_initial_defs_for_reduction): Replace the code argument with
11770 the neutral value calculated by neutral_op_for_slp_reduction.
11771 Use gimple_build_vector for constant-length vectors.
11772 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11773 but the first group_size elements have a neutral value.
11774 Use duplicate_and_interleave otherwise.
11775 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11776 Update call to get_initial_defs_for_reduction. Handle SLP
11777 reductions for variable-length vectors by creating one vector
11778 result for each scalar result, with the elements associated
11779 with other scalar results stubbed out with the neutral value.
11780 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11781 Require IFN_VEC_SHL_INSERT for double reductions on
11782 variable-length vectors, or SLP reductions that have
11783 a neutral value. Require can_duplicate_and_interleave_p
11784 support for variable-length unchained SLP reductions if there
11785 is no neutral value, such as for MIN/MAX reductions. Also require
11786 the number of vector elements to be a multiple of the number of
11787 SLP statements when doing variable-length unchained SLP reductions.
11788 Update call to vect_create_epilog_for_reduction.
11789 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11790 and remove initial values.
11791 (duplicate_and_interleave): Make public.
11792 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11793 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11794
11795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11796 Alan Hayward <alan.hayward@arm.com>
11797 David Sherwood <david.sherwood@arm.com>
11798
11799 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11800 (can_duplicate_and_interleave_p): New function.
11801 (vect_get_and_check_slp_defs): Take the vector of statements
11802 rather than just the current one. Remove excess parentheses.
11803 Restriction rejectinon of vect_constant_def and vect_external_def
11804 for variable-length vectors to boolean types, or types for which
11805 can_duplicate_and_interleave_p is false.
11806 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11807 (duplicate_and_interleave): New function.
11808 (vect_get_constant_vectors): Use gimple_build_vector for
11809 constant-length vectors and suitable variable-length constant
11810 vectors. Use duplicate_and_interleave for other variable-length
11811 vectors. Don't defer the update when inserting new statements.
11812
11813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11814 Alan Hayward <alan.hayward@arm.com>
11815 David Sherwood <david.sherwood@arm.com>
11816
11817 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11818 min_profitable_iters doesn't go negative.
11819
11820 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11821 Alan Hayward <alan.hayward@arm.com>
11822 David Sherwood <david.sherwood@arm.com>
11823
11824 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11825 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11826 * optabs.def (vec_mask_load_lanes_optab): New optab.
11827 (vec_mask_store_lanes_optab): Likewise.
11828 * internal-fn.def (MASK_LOAD_LANES): New internal function.
11829 (MASK_STORE_LANES): Likewise.
11830 * internal-fn.c (mask_load_lanes_direct): New macro.
11831 (mask_store_lanes_direct): Likewise.
11832 (expand_mask_load_optab_fn): Handle masked operations.
11833 (expand_mask_load_lanes_optab_fn): New macro.
11834 (expand_mask_store_optab_fn): Handle masked operations.
11835 (expand_mask_store_lanes_optab_fn): New macro.
11836 (direct_mask_load_lanes_optab_supported_p): Likewise.
11837 (direct_mask_store_lanes_optab_supported_p): Likewise.
11838 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11839 parameter.
11840 (vect_load_lanes_supported): Likewise.
11841 * tree-vect-data-refs.c (strip_conversion): New function.
11842 (can_group_stmts_p): Likewise.
11843 (vect_analyze_data_ref_accesses): Use it instead of checking
11844 for a pair of assignments.
11845 (vect_store_lanes_supported): Take a masked_p parameter.
11846 (vect_load_lanes_supported): Likewise.
11847 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11848 vect_store_lanes_supported and vect_load_lanes_supported.
11849 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11850 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11851 parameter. Don't allow gaps for masked accesses.
11852 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
11853 and vect_load_lanes_supported.
11854 (get_load_store_type): Take a masked_p parameter and update
11855 call to get_group_load_store_type.
11856 (vectorizable_store): Update call to get_load_store_type.
11857 Handle IFN_MASK_STORE_LANES.
11858 (vectorizable_load): Update call to get_load_store_type.
11859 Handle IFN_MASK_LOAD_LANES.
11860
11861 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11862 Alan Hayward <alan.hayward@arm.com>
11863 David Sherwood <david.sherwood@arm.com>
11864
11865 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11866 modes for SVE.
11867 * config/aarch64/aarch64-protos.h
11868 (aarch64_sve_struct_memory_operand_p): Declare.
11869 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11870 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11871 (VPRED, vpred): Handle SVE structure modes.
11872 * config/aarch64/constraints.md (Utx): New constraint.
11873 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11874 (aarch64_sve_struct_nonimmediate_operand): New predicates.
11875 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11876 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11877 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11878 structure modes. Split into pieces after RA.
11879 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11880 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11881 New patterns.
11882 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11883 SVE structure modes.
11884 (aarch64_classify_address): Likewise.
11885 (sizetochar): Move earlier in file.
11886 (aarch64_print_operand): Handle SVE register lists.
11887 (aarch64_array_mode): New function.
11888 (aarch64_sve_struct_memory_operand_p): Likewise.
11889 (TARGET_ARRAY_MODE): Redefine.
11890
11891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11892 Alan Hayward <alan.hayward@arm.com>
11893 David Sherwood <david.sherwood@arm.com>
11894
11895 * target.def (array_mode): New target hook.
11896 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11897 * doc/tm.texi: Regenerate.
11898 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11899 * hooks.c (hook_optmode_mode_uhwi_none): New function.
11900 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11901 targetm.array_mode.
11902 * stor-layout.c (mode_for_array): Likewise. Support polynomial
11903 type sizes.
11904
11905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11906 Alan Hayward <alan.hayward@arm.com>
11907 David Sherwood <david.sherwood@arm.com>
11908
11909 * fold-const.c (fold_binary_loc): Check the argument types
11910 rather than the result type when testing for a vector operation.
11911
11912 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11913
11914 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11915 * doc/tm.texi: Regenerate.
11916
11917 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11918 Alan Hayward <alan.hayward@arm.com>
11919 David Sherwood <david.sherwood@arm.com>
11920
11921 * doc/invoke.texi (-msve-vector-bits=): Document new option.
11922 (sve): Document new AArch64 extension.
11923 * doc/md.texi (w): Extend the description of the AArch64
11924 constraint to include SVE vectors.
11925 (Upl, Upa): Document new AArch64 predicate constraints.
11926 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11927 enum.
11928 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11929 (msve-vector-bits=): New option.
11930 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11931 SVE when these are disabled.
11932 (sve): New extension.
11933 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11934 modes. Adjust their number of units based on aarch64_sve_vg.
11935 (MAX_BITSIZE_MODE_ANY_MODE): Define.
11936 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11937 aarch64_addr_query_type.
11938 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11939 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11940 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11941 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11942 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11943 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11944 (aarch64_simd_imm_zero_p): Delete.
11945 (aarch64_check_zero_based_sve_index_immediate): Declare.
11946 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11947 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11948 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11949 (aarch64_sve_float_mul_immediate_p): Likewise.
11950 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11951 rather than an rtx.
11952 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11953 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11954 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11955 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11956 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11957 (aarch64_regmode_natural_size): Likewise.
11958 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11959 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11960 left one place.
11961 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11962 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11963 for VG and the SVE predicate registers.
11964 (V_ALIASES): Add a "z"-prefixed alias.
11965 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11966 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11967 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11968 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11969 (REG_CLASS_NAMES): Add entries for them.
11970 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
11971 and the predicate registers.
11972 (aarch64_sve_vg): Declare.
11973 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11974 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11975 (REGMODE_NATURAL_SIZE): Define.
11976 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11977 SVE macros.
11978 * config/aarch64/aarch64.c: Include cfgrtl.h.
11979 (simd_immediate_info): Add a constructor for series vectors,
11980 and an associated step field.
11981 (aarch64_sve_vg): New variable.
11982 (aarch64_dbx_register_number): Handle VG and the predicate registers.
11983 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11984 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11985 (VEC_ANY_DATA, VEC_STRUCT): New constants.
11986 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11987 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11988 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11989 (aarch64_get_mask_mode): New functions.
11990 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11991 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11992 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
11993 predicate modes and predicate registers. Explicitly restrict
11994 GPRs to modes of 16 bytes or smaller. Only allow FP registers
11995 to store a vector mode if it is recognized by
11996 aarch64_classify_vector_mode.
11997 (aarch64_regmode_natural_size): New function.
11998 (aarch64_hard_regno_caller_save_mode): Return the original mode
11999 for predicates.
12000 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12001 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12002 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12003 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12004 functions.
12005 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12006 does not overlap dest if the function is frame-related. Handle
12007 SVE constants.
12008 (aarch64_split_add_offset): New function.
12009 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12010 them aarch64_add_offset.
12011 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12012 and update call to aarch64_sub_sp.
12013 (aarch64_add_cfa_expression): New function.
12014 (aarch64_expand_prologue): Pass extra temporary registers to the
12015 functions above. Handle the case in which we need to emit new
12016 DW_CFA_expressions for registers that were originally saved
12017 relative to the stack pointer, but now have to be expressed
12018 relative to the frame pointer.
12019 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12020 functions above.
12021 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12022 IP0 and IP1 values for SVE frames.
12023 (aarch64_expand_vec_series): New function.
12024 (aarch64_expand_sve_widened_duplicate): Likewise.
12025 (aarch64_expand_sve_const_vector): Likewise.
12026 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12027 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12028 into the register, rather than emitting a SET directly.
12029 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12030 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12031 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12032 (offset_9bit_signed_scaled_p): New functions.
12033 (aarch64_replicate_bitmask_imm): New function.
12034 (aarch64_bitmask_imm): Use it.
12035 (aarch64_cannot_force_const_mem): Reject expressions involving
12036 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12037 (aarch64_classify_index): Handle SVE indices, by requiring
12038 a plain register index with a scale that matches the element size.
12039 (aarch64_classify_address): Handle SVE addresses. Assert that
12040 the mode of the address is VOIDmode or an integer mode.
12041 Update call to aarch64_classify_symbol.
12042 (aarch64_classify_symbolic_expression): Update call to
12043 aarch64_classify_symbol.
12044 (aarch64_const_vec_all_in_range_p): New function.
12045 (aarch64_print_vector_float_operand): Likewise.
12046 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12047 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12048 and the FP immediates 1.0 and 0.5.
12049 (aarch64_print_address_internal): Handle SVE addresses.
12050 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12051 (aarch64_regno_regclass): Handle predicate registers.
12052 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12053 data modes.
12054 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12055 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12056 (aarch64_convert_sve_vector_bits): New function.
12057 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12058 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12059 rather than an rtx.
12060 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12061 Handle SVE vector and predicate modes. Accept VL-based constants
12062 that need only one temporary register, and VL offsets that require
12063 no temporary registers.
12064 (aarch64_conditional_register_usage): Mark the predicate registers
12065 as fixed if SVE isn't available.
12066 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12067 Return true for SVE vector and predicate modes.
12068 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12069 rather than an unsigned int. Handle SVE modes.
12070 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12071 SVE modes.
12072 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12073 if SVE is enabled.
12074 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12075 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12076 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12077 (aarch64_sve_float_mul_immediate_p): New functions.
12078 (aarch64_sve_valid_immediate): New function.
12079 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12080 Explicitly reject structure modes. Check for INDEX constants.
12081 Handle PTRUE and PFALSE constants.
12082 (aarch64_check_zero_based_sve_index_immediate): New function.
12083 (aarch64_simd_imm_zero_p): Delete.
12084 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12085 vector modes. Accept constants in the range of CNT[BHWD].
12086 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12087 ask for an Advanced SIMD mode.
12088 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12089 (aarch64_simd_vector_alignment): Handle SVE predicates.
12090 (aarch64_vectorize_preferred_vector_alignment): New function.
12091 (aarch64_simd_vector_alignment_reachable): Use it instead of
12092 the vector size.
12093 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12094 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12095 functions.
12096 (MAX_VECT_LEN): Delete.
12097 (expand_vec_perm_d): Add a vec_flags field.
12098 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12099 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12100 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12101 for SVE modes.
12102 (aarch64_evpc_rev): Rename to...
12103 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12104 (aarch64_evpc_rev_global): New function.
12105 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12106 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12107 MAX_VECT_LEN.
12108 (aarch64_evpc_sve_tbl): New function.
12109 (aarch64_expand_vec_perm_const_1): Update after rename of
12110 aarch64_evpc_rev. Handle SVE permutes too, trying
12111 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12112 than aarch64_evpc_tbl.
12113 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12114 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12115 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12116 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12117 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12118 (aarch64_expand_sve_vcond): New functions.
12119 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12120 of aarch64_vector_mode_p.
12121 (aarch64_dwarf_poly_indeterminate_value): New function.
12122 (aarch64_compute_pressure_classes): Likewise.
12123 (aarch64_can_change_mode_class): Likewise.
12124 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12125 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12126 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12127 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12128 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12129 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12130 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12131 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12132 constraints.
12133 (Dn, Dl, Dr): Accept const as well as const_vector.
12134 (Dz): Likewise. Compare against CONST0_RTX.
12135 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12136 of "vector" where appropriate.
12137 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12138 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12139 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12140 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12141 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12142 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12143 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12144 (v_int_equiv): Extend to SVE modes.
12145 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12146 mode attributes.
12147 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12148 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12149 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12150 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12151 (SVE_COND_FP_CMP): New int iterators.
12152 (perm_hilo): Handle the new unpack unspecs.
12153 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12154 attributes.
12155 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12156 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12157 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12158 (aarch64_equality_operator, aarch64_constant_vector_operand)
12159 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12160 (aarch64_sve_nonimmediate_operand): Likewise.
12161 (aarch64_sve_general_operand): Likewise.
12162 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12163 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12164 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12165 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12166 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12167 (aarch64_sve_float_arith_immediate): Likewise.
12168 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12169 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12170 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12171 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12172 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12173 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12174 (aarch64_sve_float_arith_operand): Likewise.
12175 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12176 (aarch64_sve_float_mul_operand): Likewise.
12177 (aarch64_sve_vec_perm_operand): Likewise.
12178 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12179 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12180 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12181 as well as const_vector.
12182 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12183 in file. Use CONST0_RTX and CONSTM1_RTX.
12184 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
12185 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12186 Use aarch64_simd_imm_zero.
12187 * config/aarch64/aarch64-sve.md: New file.
12188 * config/aarch64/aarch64.md: Include it.
12189 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12190 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12191 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12192 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12193 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12194 (sve): New attribute.
12195 (enabled): Disable instructions with the sve attribute unless
12196 TARGET_SVE.
12197 (movqi, movhi): Pass CONST_POLY_INT operaneds through
12198 aarch64_expand_mov_immediate.
12199 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12200 CNT[BHSD] immediates.
12201 (movti): Split CONST_POLY_INT moves into two halves.
12202 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12203 Split additions that need a temporary here if the destination
12204 is the stack pointer.
12205 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12206 (*add<mode>3_poly_1): New instruction.
12207 (set_clobber_cc): New expander.
12208
12209 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12210
12211 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12212 parameter and use it instead of GET_MODE_SIZE (innermode). Use
12213 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12214 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12215 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
12216 Change innermode from fixed_mode_size to machine_mode.
12217 (simplify_subreg): Update call accordingly. Handle a constant-sized
12218 subreg of a variable-length CONST_VECTOR.
12219
12220 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12221 Alan Hayward <alan.hayward@arm.com>
12222 David Sherwood <david.sherwood@arm.com>
12223
12224 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12225 (add_offset_to_base): New function, split out from...
12226 (create_mem_ref): ...here. When handling a scale other than 1,
12227 check first whether the address is valid without the offset.
12228 Add it into the base if so, leaving the index and scale as-is.
12229
12230 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12231
12232 PR c++/83778
12233 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12234 fold_for_warn before checking if arg2 is INTEGER_CST.
12235
12236 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
12237
12238 * config/rs6000/predicates.md (load_multiple_operation): Delete.
12239 (store_multiple_operation): Delete.
12240 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12241 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12242 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12243 guarded by TARGET_STRING.
12244 (rs6000_output_load_multiple): Delete.
12245 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12246 OPTION_MASK_STRING / TARGET_STRING handling.
12247 (print_operand) <'N', 'O'>: Add comment that these are unused now.
12248 (const rs6000_opt_masks) <"string">: Change mask to 0.
12249 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12250 (MASK_STRING): Delete.
12251 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12252 parts. Simplify.
12253 (load_multiple): Delete.
12254 (*ldmsi8): Delete.
12255 (*ldmsi7): Delete.
12256 (*ldmsi6): Delete.
12257 (*ldmsi5): Delete.
12258 (*ldmsi4): Delete.
12259 (*ldmsi3): Delete.
12260 (store_multiple): Delete.
12261 (*stmsi8): Delete.
12262 (*stmsi7): Delete.
12263 (*stmsi6): Delete.
12264 (*stmsi5): Delete.
12265 (*stmsi4): Delete.
12266 (*stmsi3): Delete.
12267 (movmemsi_8reg): Delete.
12268 (corresponding unnamed define_insn): Delete.
12269 (movmemsi_6reg): Delete.
12270 (corresponding unnamed define_insn): Delete.
12271 (movmemsi_4reg): Delete.
12272 (corresponding unnamed define_insn): Delete.
12273 (movmemsi_2reg): Delete.
12274 (corresponding unnamed define_insn): Delete.
12275 (movmemsi_1reg): Delete.
12276 (corresponding unnamed define_insn): Delete.
12277 * config/rs6000/rs6000.opt (mno-string): New.
12278 (mstring): Replace by deprecation warning stub.
12279 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12280
12281 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12282
12283 * regrename.c (regrename_do_replace): If replacing the same
12284 reg multiple times, try to reuse last created gen_raw_REG.
12285
12286 PR debug/81155
12287 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12288 main to workaround a bug in GDB.
12289
12290 2018-01-12 Tom de Vries <tom@codesourcery.com>
12291
12292 PR target/83737
12293 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12294
12295 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
12296
12297 PR rtl-optimization/80481
12298 * ira-color.c (get_cap_member): New function.
12299 (allocnos_conflict_by_live_ranges_p): Use it.
12300 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12301 (setup_slot_coalesced_allocno_live_ranges): Ditto.
12302
12303 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
12304
12305 PR target/83628
12306 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12307 (*saddl_se_1): Ditto.
12308 (*ssubsi_1): Ditto.
12309 (*ssubl_se_1): Ditto.
12310
12311 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12312
12313 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12314 rather than wi::to_widest for DR_INITs.
12315 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12316 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12317 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
12318 INTEGER_CSTs.
12319 (vect_analyze_group_access_1): Note that here.
12320
12321 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12322
12323 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
12324 polynomial type sizes.
12325
12326 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12327
12328 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
12329 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
12330 (gimple_add_tmp_var): Likewise.
12331
12332 2018-01-12 Martin Liska <mliska@suse.cz>
12333
12334 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
12335 (gimple_alloc_sizes): Likewise.
12336 (dump_gimple_statistics): Use PRIu64 in printf format.
12337 * gimple.h: Change uint64_t to int.
12338
12339 2018-01-12 Martin Liska <mliska@suse.cz>
12340
12341 * tree-core.h: Use uint64_t instead of int.
12342 * tree.c (tree_node_counts): Likewise.
12343 (tree_node_sizes): Likewise.
12344 (dump_tree_statistics): Use PRIu64 in printf format.
12345
12346 2018-01-12 Martin Liska <mliska@suse.cz>
12347
12348 * Makefile.in: As qsort_chk is implemented in vec.c, add
12349 vec.o to linkage of gencfn-macros.
12350 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
12351 passing the info to record_node_allocation_statistics.
12352 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
12353 and pass the info.
12354 * ggc-common.c (struct ggc_usage): Add operator== and use
12355 it in operator< and compare function.
12356 * mem-stats.h (struct mem_usage): Likewise.
12357 * vec.c (struct vec_usage): Remove operator< and compare
12358 function. Can be simply inherited.
12359
12360 2018-01-12 Martin Jambor <mjambor@suse.cz>
12361
12362 PR target/81616
12363 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
12364 * tree-ssa-math-opts.c: Include domwalk.h.
12365 (convert_mult_to_fma_1): New function.
12366 (fma_transformation_info): New type.
12367 (fma_deferring_state): Likewise.
12368 (cancel_fma_deferring): New function.
12369 (result_of_phi): Likewise.
12370 (last_fma_candidate_feeds_initial_phi): Likewise.
12371 (convert_mult_to_fma): Added deferring logic, split actual
12372 transformation to convert_mult_to_fma_1.
12373 (math_opts_dom_walker): New type.
12374 (math_opts_dom_walker::after_dom_children): New method, body moved
12375 here from pass_optimize_widening_mul::execute, added deferring logic
12376 bits.
12377 (pass_optimize_widening_mul::execute): Moved most of code to
12378 math_opts_dom_walker::after_dom_children.
12379 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
12380 * config/i386/i386.c (ix86_option_override_internal): Added
12381 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
12382
12383 2018-01-12 Richard Biener <rguenther@suse.de>
12384
12385 PR debug/83157
12386 * dwarf2out.c (gen_variable_die): Do not reset old_die for
12387 inline instance vars.
12388
12389 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
12390
12391 PR target/81819
12392 * config/rx/rx.c (rx_is_restricted_memory_address):
12393 Handle SUBREG case.
12394
12395 2018-01-12 Richard Biener <rguenther@suse.de>
12396
12397 PR tree-optimization/80846
12398 * target.def (split_reduction): New target hook.
12399 * targhooks.c (default_split_reduction): New function.
12400 * targhooks.h (default_split_reduction): Declare.
12401 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
12402 target requests first reduce vectors by combining low and high
12403 parts.
12404 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
12405 (get_vectype_for_scalar_type_and_size): Export.
12406 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
12407 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
12408 * doc/tm.texi: Regenerate.
12409 * config/i386/i386.c (ix86_split_reduction): Implement
12410 TARGET_VECTORIZE_SPLIT_REDUCTION.
12411
12412 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12413
12414 PR target/83368
12415 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
12416 in PIC mode except for TARGET_VXWORKS_RTP.
12417 * config/sparc/sparc.c: Include cfgrtl.h.
12418 (TARGET_INIT_PIC_REG): Define.
12419 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
12420 (sparc_pic_register_p): New predicate.
12421 (sparc_legitimate_address_p): Use it.
12422 (sparc_legitimize_pic_address): Likewise.
12423 (sparc_delegitimize_address): Likewise.
12424 (sparc_mode_dependent_address_p): Likewise.
12425 (gen_load_pcrel_sym): Remove 4th parameter.
12426 (load_got_register): Adjust call to above. Remove obsolete stuff.
12427 (sparc_expand_prologue): Do not call load_got_register here.
12428 (sparc_flat_expand_prologue): Likewise.
12429 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
12430 (sparc_use_pseudo_pic_reg): New function.
12431 (sparc_init_pic_reg): Likewise.
12432 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12433 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
12434
12435 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
12436
12437 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
12438 Add item for branch_cost.
12439
12440 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12441
12442 PR rtl-optimization/83565
12443 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
12444 not extend the result to a larger mode for rotate operations.
12445 (num_sign_bit_copies1): Likewise.
12446
12447 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12448
12449 PR target/40411
12450 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
12451 -symbolic.
12452 Use values-Xc.o for -pedantic.
12453 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
12454
12455 2018-01-12 Martin Liska <mliska@suse.cz>
12456
12457 PR ipa/83054
12458 * ipa-devirt.c (final_warning_record::grow_type_warnings):
12459 New function.
12460 (possible_polymorphic_call_targets): Use it.
12461 (ipa_devirt): Likewise.
12462
12463 2018-01-12 Martin Liska <mliska@suse.cz>
12464
12465 * profile-count.h (enum profile_quality): Use 0 as invalid
12466 enum value of profile_quality.
12467
12468 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
12469
12470 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
12471 -mext-string options.
12472
12473 2018-01-12 Richard Biener <rguenther@suse.de>
12474
12475 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
12476 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
12477 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
12478 Likewise.
12479 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
12480
12481 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12482
12483 * configure.ac (--with-long-double-format): Add support for the
12484 configuration option to change the default long double format on
12485 PowerPC systems.
12486 * config.gcc (powerpc*-linux*-*): Likewise.
12487 * configure: Regenerate.
12488 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
12489 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
12490 used without modification.
12491
12492 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12493
12494 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
12495 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
12496 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
12497 MISC_BUILTIN_SPEC_BARRIER.
12498 (rs6000_init_builtins): Likewise.
12499 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
12500 enum value.
12501 (speculation_barrier): New define_insn.
12502 * doc/extend.texi: Document __builtin_speculation_barrier.
12503
12504 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12505
12506 PR target/83203
12507 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
12508 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
12509 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
12510 iterators.
12511 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
12512 integral modes instead of "ss" and "sd".
12513 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12514 vectors with 32-bit and 64-bit elements.
12515 (vecdupssescalarmodesuffix): New mode attribute.
12516 (vec_dup<mode>): Use it.
12517
12518 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
12519
12520 PR target/83330
12521 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12522 frame if argument is passed on stack.
12523
12524 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12525
12526 PR target/82682
12527 * ree.c (combine_reaching_defs): Optimize also
12528 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12529 reg2=any_extend(exp); reg1=reg2;, formatting fix.
12530
12531 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12532
12533 PR middle-end/83189
12534 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12535
12536 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12537
12538 PR middle-end/83718
12539 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12540 after they are computed.
12541
12542 2018-01-11 Bin Cheng <bin.cheng@arm.com>
12543
12544 PR tree-optimization/83695
12545 * gimple-loop-linterchange.cc
12546 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12547 reset cached scev information after interchange.
12548 (pass_linterchange::execute): Remove call to scev_reset_htab.
12549
12550 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12551
12552 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12553 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12554 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12555 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12556 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12557 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12558 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12559 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12560 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12561 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12562 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12563 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12564 (V_lane_reg): Likewise.
12565 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12566 New define_expand.
12567 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12568 (vfmal_lane_low<mode>_intrinsic,
12569 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12570 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12571 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
12572 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
12573 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
12574 vfmsl_lane_high<mode>_intrinsic): New define_insns.
12575
12576 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12577
12578 * config/arm/arm-cpus.in (fp16fml): New feature.
12579 (ALL_SIMD): Add fp16fml.
12580 (armv8.2-a): Add fp16fml as an option.
12581 (armv8.3-a): Likewise.
12582 (armv8.4-a): Add fp16fml as part of fp16.
12583 * config/arm/arm.h (TARGET_FP16FML): Define.
12584 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
12585 when appropriate.
12586 * config/arm/arm-modes.def (V2HF): Define.
12587 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
12588 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
12589 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
12590 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
12591 vfmsl_low, vfmsl_high): New set of builtins.
12592 * config/arm/iterators.md (PLUSMINUS): New code iterator.
12593 (vfml_op): New code attribute.
12594 (VFMLHALVES): New int iterator.
12595 (VFML, VFMLSEL): New mode attributes.
12596 (V_reg): Define mapping for V2HF.
12597 (V_hi, V_lo): New mode attributes.
12598 (VF_constraint): Likewise.
12599 (vfml_half, vfml_half_selector): New int attributes.
12600 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
12601 define_expand.
12602 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
12603 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
12604 New define_insn.
12605 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
12606 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
12607 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
12608 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
12609 documentation.
12610 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
12611 Document new effective target and option set.
12612
12613 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12614
12615 * config/arm/arm-cpus.in (armv8_4): New feature.
12616 (ARMv8_4a): New fgroup.
12617 (armv8.4-a): New arch.
12618 * config/arm/arm-tables.opt: Regenerate.
12619 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
12620 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
12621 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
12622 Add matching rules for -march=armv8.4-a and extensions.
12623 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
12624
12625 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
12626
12627 PR target/81821
12628 * config/rx/rx.md (BW): New mode attribute.
12629 (sync_lock_test_and_setsi): Add mode suffix to insn output.
12630
12631 2018-01-11 Richard Biener <rguenther@suse.de>
12632
12633 PR tree-optimization/83435
12634 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
12635 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
12636 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
12637
12638 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12639 Alan Hayward <alan.hayward@arm.com>
12640 David Sherwood <david.sherwood@arm.com>
12641
12642 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
12643 field.
12644 (aarch64_classify_address): Initialize it. Track polynomial offsets.
12645 (aarch64_print_address_internal): Use it to check for a zero offset.
12646
12647 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12648 Alan Hayward <alan.hayward@arm.com>
12649 David Sherwood <david.sherwood@arm.com>
12650
12651 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12652 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12653 Return a poly_int64 rather than a HOST_WIDE_INT.
12654 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12655 rather than a HOST_WIDE_INT.
12656 * config/aarch64/aarch64.h (aarch64_frame): Protect with
12657 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
12658 hard_fp_offset, frame_size, initial_adjust, callee_offset and
12659 final_offset from HOST_WIDE_INT to poly_int64.
12660 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12661 to_constant when getting the number of units in an Advanced SIMD
12662 mode.
12663 (aarch64_builtin_vectorized_function): Check for a constant number
12664 of units.
12665 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12666 GET_MODE_SIZE.
12667 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12668 attribute instead of GET_MODE_NUNITS.
12669 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12670 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12671 GET_MODE_SIZE for fixed-size registers.
12672 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12673 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12674 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12675 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12676 (aarch64_print_operand, aarch64_print_address_internal)
12677 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12678 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12679 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12680 Handle polynomial GET_MODE_SIZE.
12681 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
12682 wider than SImode without modification.
12683 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12684 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12685 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12686 passing and returning SVE modes.
12687 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12688 rather than GEN_INT.
12689 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12690 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12691 (aarch64_allocate_and_probe_stack_space): Likewise.
12692 (aarch64_layout_frame): Cope with polynomial offsets.
12693 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12694 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
12695 polynomial offsets.
12696 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12697 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12698 poly_int64 rather than a HOST_WIDE_INT.
12699 (aarch64_get_separate_components, aarch64_process_components)
12700 (aarch64_expand_prologue, aarch64_expand_epilogue)
12701 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12702 (aarch64_anchor_offset): New function, split out from...
12703 (aarch64_legitimize_address): ...here.
12704 (aarch64_builtin_vectorization_cost): Handle polynomial
12705 TYPE_VECTOR_SUBPARTS.
12706 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12707 GET_MODE_NUNITS.
12708 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12709 number of elements from the PARALLEL rather than the mode.
12710 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12711 rather than GET_MODE_BITSIZE.
12712 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12713 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12714 (aarch64_expand_vec_perm_const_1): Handle polynomial
12715 d->perm.length () and d->perm elements.
12716 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
12717 Apply to_constant to d->perm elements.
12718 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12719 polynomial CONST_VECTOR_NUNITS.
12720 (aarch64_move_pointer): Take amount as a poly_int64 rather
12721 than an int.
12722 (aarch64_progress_pointer): Avoid temporary variable.
12723 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12724 the mode attribute instead of GET_MODE.
12725
12726 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12727 Alan Hayward <alan.hayward@arm.com>
12728 David Sherwood <david.sherwood@arm.com>
12729
12730 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12731 x exists before using it.
12732 (aarch64_add_constant_internal): Rename to...
12733 (aarch64_add_offset_1): ...this. Replace regnum with separate
12734 src and dest rtxes. Handle the case in which they're different,
12735 including when the offset is zero. Replace scratchreg with an rtx.
12736 Use 2 additions if there is no spare register into which we can
12737 move a 16-bit constant.
12738 (aarch64_add_constant): Delete.
12739 (aarch64_add_offset): Replace reg with separate src and dest
12740 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
12741 Use aarch64_add_offset_1.
12742 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12743 an rtx rather than an int. Take the delta as a poly_int64
12744 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
12745 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12746 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12747 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12748 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12749 and aarch64_add_sp.
12750 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12751 aarch64_add_constant.
12752
12753 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12754
12755 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12756 Use scalar_float_mode.
12757
12758 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12759
12760 * config/aarch64/aarch64-simd.md
12761 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12762 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12763 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12764 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12765 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12766 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12767 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12768 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12769 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12770 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12771
12772 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12773
12774 PR target/83514
12775 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12776 targ_options->x_arm_arch_string is non NULL.
12777
12778 2018-01-11 Tamar Christina <tamar.christina@arm.com>
12779
12780 * config/aarch64/aarch64.h
12781 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
12782
12783 2018-01-11 Sudakshina Das <sudi.das@arm.com>
12784
12785 PR target/82096
12786 * expmed.c (emit_store_flag_force): Swap if const op0
12787 and change VOIDmode to mode of op0.
12788
12789 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12790
12791 PR rtl-optimization/83761
12792 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12793 than bytes to mode_for_size.
12794
12795 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12796
12797 PR middle-end/83189
12798 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12799 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12800 profile.
12801
12802 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12803
12804 PR middle-end/83575
12805 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12806 when in layout mode.
12807 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12808 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12809 partition fixup.
12810
12811 2018-01-10 Michael Collison <michael.collison@arm.com>
12812
12813 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12814 * config/aarch64/aarch64-option-extension.def: Add
12815 AARCH64_OPT_EXTENSION of 'fp16fml'.
12816 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12817 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12818 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12819 * config/aarch64/constraints.md (Ui7): New constraint.
12820 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12821 (VFMLA_SEL_W): Ditto.
12822 (f16quad): Ditto.
12823 (f16mac1): Ditto.
12824 (VFMLA16_LOW): New int iterator.
12825 (VFMLA16_HIGH): Ditto.
12826 (UNSPEC_FMLAL): New unspec.
12827 (UNSPEC_FMLSL): Ditto.
12828 (UNSPEC_FMLAL2): Ditto.
12829 (UNSPEC_FMLSL2): Ditto.
12830 (f16mac): New code attribute.
12831 * config/aarch64/aarch64-simd-builtins.def
12832 (aarch64_fmlal_lowv2sf): Ditto.
12833 (aarch64_fmlsl_lowv2sf): Ditto.
12834 (aarch64_fmlalq_lowv4sf): Ditto.
12835 (aarch64_fmlslq_lowv4sf): Ditto.
12836 (aarch64_fmlal_highv2sf): Ditto.
12837 (aarch64_fmlsl_highv2sf): Ditto.
12838 (aarch64_fmlalq_highv4sf): Ditto.
12839 (aarch64_fmlslq_highv4sf): Ditto.
12840 (aarch64_fmlal_lane_lowv2sf): Ditto.
12841 (aarch64_fmlsl_lane_lowv2sf): Ditto.
12842 (aarch64_fmlal_laneq_lowv2sf): Ditto.
12843 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12844 (aarch64_fmlalq_lane_lowv4sf): Ditto.
12845 (aarch64_fmlsl_lane_lowv4sf): Ditto.
12846 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12847 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12848 (aarch64_fmlal_lane_highv2sf): Ditto.
12849 (aarch64_fmlsl_lane_highv2sf): Ditto.
12850 (aarch64_fmlal_laneq_highv2sf): Ditto.
12851 (aarch64_fmlsl_laneq_highv2sf): Ditto.
12852 (aarch64_fmlalq_lane_highv4sf): Ditto.
12853 (aarch64_fmlsl_lane_highv4sf): Ditto.
12854 (aarch64_fmlalq_laneq_highv4sf): Ditto.
12855 (aarch64_fmlsl_laneq_highv4sf): Ditto.
12856 * config/aarch64/aarch64-simd.md:
12857 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12858 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12859 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12860 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12861 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12862 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12863 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12864 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12865 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12866 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12867 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12868 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12869 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12870 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12871 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12872 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12873 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12874 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12875 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12876 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12877 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12878 (vfmlsl_low_u32): Ditto.
12879 (vfmlalq_low_u32): Ditto.
12880 (vfmlslq_low_u32): Ditto.
12881 (vfmlal_high_u32): Ditto.
12882 (vfmlsl_high_u32): Ditto.
12883 (vfmlalq_high_u32): Ditto.
12884 (vfmlslq_high_u32): Ditto.
12885 (vfmlal_lane_low_u32): Ditto.
12886 (vfmlsl_lane_low_u32): Ditto.
12887 (vfmlal_laneq_low_u32): Ditto.
12888 (vfmlsl_laneq_low_u32): Ditto.
12889 (vfmlalq_lane_low_u32): Ditto.
12890 (vfmlslq_lane_low_u32): Ditto.
12891 (vfmlalq_laneq_low_u32): Ditto.
12892 (vfmlslq_laneq_low_u32): Ditto.
12893 (vfmlal_lane_high_u32): Ditto.
12894 (vfmlsl_lane_high_u32): Ditto.
12895 (vfmlal_laneq_high_u32): Ditto.
12896 (vfmlsl_laneq_high_u32): Ditto.
12897 (vfmlalq_lane_high_u32): Ditto.
12898 (vfmlslq_lane_high_u32): Ditto.
12899 (vfmlalq_laneq_high_u32): Ditto.
12900 (vfmlslq_laneq_high_u32): Ditto.
12901 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12902 (AARCH64_FL_FOR_ARCH8_4): New.
12903 (AARCH64_ISA_F16FML): New ISA flag.
12904 (TARGET_F16FML): New feature flag for fp16fml.
12905 (doc/invoke.texi): Document new fp16fml option.
12906
12907 2018-01-10 Michael Collison <michael.collison@arm.com>
12908
12909 * config/aarch64/aarch64-builtins.c:
12910 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12911 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12912 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12913 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12914 (AARCH64_ISA_SHA3): New ISA flag.
12915 (TARGET_SHA3): New feature flag for sha3.
12916 * config/aarch64/iterators.md (sha512_op): New int attribute.
12917 (CRYPTO_SHA512): New int iterator.
12918 (UNSPEC_SHA512H): New unspec.
12919 (UNSPEC_SHA512H2): Ditto.
12920 (UNSPEC_SHA512SU0): Ditto.
12921 (UNSPEC_SHA512SU1): Ditto.
12922 * config/aarch64/aarch64-simd-builtins.def
12923 (aarch64_crypto_sha512hqv2di): New builtin.
12924 (aarch64_crypto_sha512h2qv2di): Ditto.
12925 (aarch64_crypto_sha512su0qv2di): Ditto.
12926 (aarch64_crypto_sha512su1qv2di): Ditto.
12927 (aarch64_eor3qv8hi): Ditto.
12928 (aarch64_rax1qv2di): Ditto.
12929 (aarch64_xarqv2di): Ditto.
12930 (aarch64_bcaxqv8hi): Ditto.
12931 * config/aarch64/aarch64-simd.md:
12932 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12933 (aarch64_crypto_sha512su0qv2di): Ditto.
12934 (aarch64_crypto_sha512su1qv2di): Ditto.
12935 (aarch64_eor3qv8hi): Ditto.
12936 (aarch64_rax1qv2di): Ditto.
12937 (aarch64_xarqv2di): Ditto.
12938 (aarch64_bcaxqv8hi): Ditto.
12939 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12940 (vsha512h2q_u64): Ditto.
12941 (vsha512su0q_u64): Ditto.
12942 (vsha512su1q_u64): Ditto.
12943 (veor3q_u16): Ditto.
12944 (vrax1q_u64): Ditto.
12945 (vxarq_u64): Ditto.
12946 (vbcaxq_u16): Ditto.
12947 * config/arm/types.md (crypto_sha512): New type attribute.
12948 (crypto_sha3): Ditto.
12949 (doc/invoke.texi): Document new sha3 option.
12950
12951 2018-01-10 Michael Collison <michael.collison@arm.com>
12952
12953 * config/aarch64/aarch64-builtins.c:
12954 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12955 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12956 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12957 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12958 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12959 (AARCH64_ISA_SM4): New ISA flag.
12960 (TARGET_SM4): New feature flag for sm4.
12961 * config/aarch64/aarch64-simd-builtins.def
12962 (aarch64_sm3ss1qv4si): Ditto.
12963 (aarch64_sm3tt1aq4si): Ditto.
12964 (aarch64_sm3tt1bq4si): Ditto.
12965 (aarch64_sm3tt2aq4si): Ditto.
12966 (aarch64_sm3tt2bq4si): Ditto.
12967 (aarch64_sm3partw1qv4si): Ditto.
12968 (aarch64_sm3partw2qv4si): Ditto.
12969 (aarch64_sm4eqv4si): Ditto.
12970 (aarch64_sm4ekeyqv4si): Ditto.
12971 * config/aarch64/aarch64-simd.md:
12972 (aarch64_sm3ss1qv4si): Ditto.
12973 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12974 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12975 (aarch64_sm4eqv4si): Ditto.
12976 (aarch64_sm4ekeyqv4si): Ditto.
12977 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12978 (sm3part_op): Ditto.
12979 (CRYPTO_SM3TT): Ditto.
12980 (CRYPTO_SM3PART): Ditto.
12981 (UNSPEC_SM3SS1): New unspec.
12982 (UNSPEC_SM3TT1A): Ditto.
12983 (UNSPEC_SM3TT1B): Ditto.
12984 (UNSPEC_SM3TT2A): Ditto.
12985 (UNSPEC_SM3TT2B): Ditto.
12986 (UNSPEC_SM3PARTW1): Ditto.
12987 (UNSPEC_SM3PARTW2): Ditto.
12988 (UNSPEC_SM4E): Ditto.
12989 (UNSPEC_SM4EKEY): Ditto.
12990 * config/aarch64/constraints.md (Ui2): New constraint.
12991 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12992 * config/arm/types.md (crypto_sm3): New type attribute.
12993 (crypto_sm4): Ditto.
12994 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12995 (vsm3tt1aq_u32): Ditto.
12996 (vsm3tt1bq_u32): Ditto.
12997 (vsm3tt2aq_u32): Ditto.
12998 (vsm3tt2bq_u32): Ditto.
12999 (vsm3partw1q_u32): Ditto.
13000 (vsm3partw2q_u32): Ditto.
13001 (vsm4eq_u32): Ditto.
13002 (vsm4ekeyq_u32): Ditto.
13003 (doc/invoke.texi): Document new sm4 option.
13004
13005 2018-01-10 Michael Collison <michael.collison@arm.com>
13006
13007 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13008 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13009 (AARCH64_FL_FOR_ARCH8_4): New.
13010 (AARCH64_FL_V8_4): New flag.
13011 (doc/invoke.texi): Document new armv8.4-a option.
13012
13013 2018-01-10 Michael Collison <michael.collison@arm.com>
13014
13015 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13016 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13017 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13018 * config/aarch64/aarch64-option-extension.def: Add
13019 AARCH64_OPT_EXTENSION of 'sha2'.
13020 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13021 (crypto): Disable sha2 and aes if crypto disabled.
13022 (crypto): Enable aes and sha2 if enabled.
13023 (simd): Disable sha2 and aes if simd disabled.
13024 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13025 New flags.
13026 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13027 (TARGET_SHA2): New feature flag for sha2.
13028 (TARGET_AES): New feature flag for aes.
13029 * config/aarch64/aarch64-simd.md:
13030 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13031 conditional on TARGET_AES.
13032 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13033 (aarch64_crypto_sha1hsi): Make pattern conditional
13034 on TARGET_SHA2.
13035 (aarch64_crypto_sha1hv4si): Ditto.
13036 (aarch64_be_crypto_sha1hv4si): Ditto.
13037 (aarch64_crypto_sha1su1v4si): Ditto.
13038 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13039 (aarch64_crypto_sha1su0v4si): Ditto.
13040 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13041 (aarch64_crypto_sha256su0v4si): Ditto.
13042 (aarch64_crypto_sha256su1v4si): Ditto.
13043 (doc/invoke.texi): Document new aes and sha2 options.
13044
13045 2018-01-10 Martin Sebor <msebor@redhat.com>
13046
13047 PR tree-optimization/83781
13048 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13049 as string arrays.
13050
13051 2018-01-11 Martin Sebor <msebor@gmail.com>
13052 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13053
13054 PR tree-optimization/83501
13055 PR tree-optimization/81703
13056
13057 * tree-ssa-strlen.c (get_string_cst): Rename...
13058 (get_string_len): ...to this. Handle global constants.
13059 (handle_char_store): Adjust.
13060
13061 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13062 Jim Wilson <jimw@sifive.com>
13063
13064 * config/riscv/riscv-protos.h (riscv_output_return): New.
13065 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13066 (riscv_attribute_table, riscv_output_return),
13067 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13068 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13069 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13070 function.
13071 (riscv_expand_prologue): Add early return for naked function.
13072 (riscv_expand_epilogue): Likewise.
13073 (riscv_function_ok_for_sibcall): Return false for naked function.
13074 (riscv_set_current_function): New.
13075 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13076 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13077 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13078 * doc/extend.texi (RISC-V Function Attributes): New.
13079
13080 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13081
13082 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13083 check for 128-bit long double before checking TCmode.
13084 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13085 128-bit long doubles before checking TFmode or TCmode.
13086 (FLOAT128_IBM_P): Likewise.
13087
13088 2018-01-10 Martin Sebor <msebor@redhat.com>
13089
13090 PR tree-optimization/83671
13091 * builtins.c (c_strlen): Unconditionally return zero for the empty
13092 string.
13093 Use -Warray-bounds for warnings.
13094 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13095 for non-constant array indices with COMPONENT_REF, arrays of
13096 arrays, and pointers to arrays.
13097 (gimple_fold_builtin_strlen): Determine and set length range for
13098 non-constant character arrays.
13099
13100 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13101
13102 PR middle-end/81897
13103 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13104 empty blocks.
13105
13106 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13107
13108 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13109
13110 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13111
13112 PR target/83399
13113 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13114 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13115 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13116 indexed_or_indirect_operand predicate.
13117 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13118 (*vsx_le_perm_load_v8hi): Likewise.
13119 (*vsx_le_perm_load_v16qi): Likewise.
13120 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13121 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13122 (*vsx_le_perm_store_v8hi): Likewise.
13123 (*vsx_le_perm_store_v16qi): Likewise.
13124 (eight unnamed splitters): Likewise.
13125
13126 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13127
13128 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13129 * config/rs6000/emmintrin.h: Likewise.
13130 * config/rs6000/mmintrin.h: Likewise.
13131 * config/rs6000/xmmintrin.h: Likewise.
13132
13133 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13134
13135 PR c++/43486
13136 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13137 "public_flag".
13138 * tree.c (tree_nop_conversion): Return true for location wrapper
13139 nodes.
13140 (maybe_wrap_with_location): New function.
13141 (selftest::check_strip_nops): New function.
13142 (selftest::test_location_wrappers): New function.
13143 (selftest::tree_c_tests): Call it.
13144 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13145 (maybe_wrap_with_location): New decl.
13146 (EXPR_LOCATION_WRAPPER_P): New macro.
13147 (location_wrapper_p): New inline function.
13148 (tree_strip_any_location_wrapper): New inline function.
13149
13150 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13151
13152 PR target/83735
13153 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13154 stack_realign_offset for the largest alignment of stack slot
13155 actually used.
13156 (ix86_find_max_used_stack_alignment): New function.
13157 (ix86_finalize_stack_frame_flags): Use it. Set
13158 max_used_stack_alignment if we don't realign stack.
13159 * config/i386/i386.h (machine_function): Add
13160 max_used_stack_alignment.
13161
13162 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13163
13164 * config/arm/arm.opt (-mbranch-cost): New option.
13165 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13166 account.
13167
13168 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13169
13170 PR target/83629
13171 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13172 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13173
13174 2018-01-10 Richard Biener <rguenther@suse.de>
13175
13176 PR debug/83765
13177 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13178 early out so it also covers the case where we have a non-NULL
13179 origin.
13180
13181 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13182
13183 PR tree-optimization/83753
13184 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13185 for non-strided grouped accesses if the number of elements is 1.
13186
13187 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13188
13189 PR target/81616
13190 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13191 * i386.h (TARGET_USE_GATHER): Define.
13192 * x86-tune.def (X86_TUNE_USE_GATHER): New.
13193
13194 2018-01-10 Martin Liska <mliska@suse.cz>
13195
13196 PR bootstrap/82831
13197 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13198 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13199 partitioning.
13200 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13201 CLEANUP_NO_PARTITIONING is not set.
13202
13203 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13204
13205 * doc/rtl.texi: Remove documentation of (const ...) wrappers
13206 for vectors, as a partial revert of r254296.
13207 * rtl.h (const_vec_p): Delete.
13208 (const_vec_duplicate_p): Don't test for vector CONSTs.
13209 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13210 * expmed.c (make_tree): Likewise.
13211
13212 Revert:
13213 * common.md (E, F): Use CONSTANT_P instead of checking for
13214 CONST_VECTOR.
13215 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13216 checking for CONST_VECTOR.
13217
13218 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13219
13220 PR middle-end/83575
13221 * predict.c (force_edge_cold): Handle in more sane way edges
13222 with no prediction.
13223
13224 2018-01-09 Carl Love <cel@us.ibm.com>
13225
13226 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13227 V4SI, V4SF types.
13228 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13229 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13230 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13231 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
13232 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13233 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
13234 * config/rs6000/rs6000-protos.h: Add extern defition for
13235 rs6000_generate_float2_double_code.
13236 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13237 function.
13238 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13239 (float2_v2df): Add define_expand.
13240
13241 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
13242
13243 PR target/83628
13244 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13245 op_mode in the force_to_mode call.
13246
13247 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13248
13249 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13250 instead of checking each element individually.
13251 (aarch64_evpc_uzp): Likewise.
13252 (aarch64_evpc_zip): Likewise.
13253 (aarch64_evpc_ext): Likewise.
13254 (aarch64_evpc_rev): Likewise.
13255 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13256 instead of checking each element individually. Return true without
13257 generating rtl if
13258 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13259 whether all selected elements come from the same input, instead of
13260 checking each element individually. Remove calls to gen_rtx_REG,
13261 start_sequence and end_sequence and instead assert that no rtl is
13262 generated.
13263
13264 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13265
13266 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13267 order of HIGH and CONST checks.
13268
13269 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13270
13271 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13272 if the destination isn't an SSA_NAME.
13273
13274 2018-01-09 Richard Biener <rguenther@suse.de>
13275
13276 PR tree-optimization/83668
13277 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13278 move prologue...
13279 (canonicalize_loop_form): ... here, renamed from ...
13280 (canonicalize_loop_closed_ssa_form): ... this and amended to
13281 swap successor edges for loop exit blocks to make us use
13282 the RPO order we need for initial schedule generation.
13283
13284 2018-01-09 Joseph Myers <joseph@codesourcery.com>
13285
13286 PR tree-optimization/64811
13287 * match.pd: When optimizing comparisons with Inf, avoid
13288 introducing or losing exceptions from comparisons with NaN.
13289
13290 2018-01-09 Martin Liska <mliska@suse.cz>
13291
13292 PR sanitizer/82517
13293 * asan.c (shadow_mem_size): Add gcc_assert.
13294
13295 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
13296
13297 Don't save registers in main().
13298
13299 PR target/83738
13300 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13301 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13302 * config/avr/avr.c (avr_set_current_function): Don't error if
13303 naked, OS_task or OS_main are specified at the same time.
13304 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13305 OS_main.
13306 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13307 attribute.
13308 * common/config/avr/avr-common.c (avr_option_optimization_table):
13309 Switch on -mmain-is-OS_task for optimizing compilations.
13310
13311 2018-01-09 Richard Biener <rguenther@suse.de>
13312
13313 PR tree-optimization/83572
13314 * graphite.c: Include cfganal.h.
13315 (graphite_transform_loops): Connect infinite loops to exit
13316 and remove fake edges at the end.
13317
13318 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13319
13320 * ipa-inline.c (edge_badness): Revert accidental checkin.
13321
13322 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13323
13324 PR ipa/80763
13325 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
13326 symbols; not inline clones.
13327
13328 2018-01-09 Jakub Jelinek <jakub@redhat.com>
13329
13330 PR target/83507
13331 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
13332 hard registers. Formatting fixes.
13333
13334 PR preprocessor/83722
13335 * gcc.c (try_generate_repro): Pass
13336 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
13337 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
13338 do_report_bug.
13339
13340 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
13341 Kito Cheng <kito.cheng@gmail.com>
13342
13343 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
13344 (riscv_leaf_function_p): Delete.
13345 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
13346
13347 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13348
13349 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
13350 function.
13351 (do_ifelse): New function.
13352 (do_isel): New function.
13353 (do_sub3): New function.
13354 (do_add3): New function.
13355 (do_load_mask_compare): New function.
13356 (do_overlap_load_compare): New function.
13357 (expand_compare_loop): New function.
13358 (expand_block_compare): Call expand_compare_loop() when appropriate.
13359 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
13360 option description.
13361 (-mblock-compare-inline-loop-limit): New option.
13362
13363 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13364
13365 PR target/83677
13366 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
13367 Reverse order of second and third operands in first alternative.
13368 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
13369 of first and second elements in UNSPEC_VPERMR vector.
13370 (altivec_expand_vec_perm_le): Likewise.
13371
13372 2018-01-08 Jeff Law <law@redhat.com>
13373
13374 PR rtl-optimizatin/81308
13375 * tree-switch-conversion.c (cfg_altered): New file scoped static.
13376 (process_switch): If group_case_labels makes a change, then set
13377 cfg_altered.
13378 (pass_convert_switch::execute): If a switch is converted, then
13379 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
13380
13381 PR rtl-optimization/81308
13382 * recog.c (split_all_insns): Conditionally cleanup the CFG after
13383 splitting insns.
13384
13385 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
13386
13387 PR target/83663 - Revert r255946
13388 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
13389 generation for cases where splatting a value is not useful.
13390 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
13391 across a vec_duplicate and a paradoxical subreg forming a vector
13392 mode to a vec_concat.
13393
13394 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13395
13396 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
13397 -march=armv8.3-a variants.
13398 * config/arm/t-multilib: Likewise.
13399 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
13400
13401 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13402
13403 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
13404 to generate rtl.
13405 (cceq_ior_compare_complement): Give it a name so I can use it, and
13406 change boolean_or_operator predicate to boolean_operator so it can
13407 be used to generate a crand.
13408 (eqne): New code iterator.
13409 (bd/bd_neg): New code_attrs.
13410 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
13411 a single define_insn.
13412 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
13413 decrement (bdnzt/bdnzf/bdzt/bdzf).
13414 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
13415 with the new names of the branch decrement patterns, and added the
13416 names of the branch decrement conditional patterns.
13417
13418 2018-01-08 Richard Biener <rguenther@suse.de>
13419
13420 PR tree-optimization/83563
13421 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
13422 cache.
13423
13424 2018-01-08 Richard Biener <rguenther@suse.de>
13425
13426 PR middle-end/83713
13427 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
13428
13429 2018-01-08 Richard Biener <rguenther@suse.de>
13430
13431 PR tree-optimization/83685
13432 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
13433 references to abnormals.
13434
13435 2018-01-08 Richard Biener <rguenther@suse.de>
13436
13437 PR lto/83719
13438 * dwarf2out.c (output_indirect_strings): Handle empty
13439 skeleton_debug_str_hash.
13440 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
13441
13442 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13443
13444 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
13445 (emit_store_direct): Likewise.
13446 (arc_trampoline_adjust_address): Likewise.
13447 (arc_asm_trampoline_template): New function.
13448 (arc_initialize_trampoline): Use asm_trampoline_template.
13449 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
13450 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
13451 * config/arc/arc.md (flush_icache): Delete pattern.
13452
13453 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13454
13455 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
13456 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
13457 munaligned-access.
13458
13459 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
13460
13461 PR target/83681
13462 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
13463 by not USED_FOR_TARGET.
13464 (make_pass_resolve_sw_modes): Likewise.
13465
13466 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
13467
13468 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
13469 USED_FOR_TARGET.
13470
13471 2018-01-08 Richard Biener <rguenther@suse.de>
13472
13473 PR middle-end/83580
13474 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
13475
13476 2018-01-08 Richard Biener <rguenther@suse.de>
13477
13478 PR middle-end/83517
13479 * match.pd ((t * 2) / 2) -> t): Add missing :c.
13480
13481 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
13482
13483 PR middle-end/81897
13484 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
13485 basic blocks with a small number of successors.
13486 (convert_control_dep_chain_into_preds): Improve handling of
13487 forwarder blocks.
13488 (dump_predicates): Split apart into...
13489 (dump_pred_chain): ...here...
13490 (dump_pred_info): ...and here.
13491 (can_one_predicate_be_invalidated_p): Add debugging printfs.
13492 (can_chain_union_be_invalidated_p): Improve check for invalidation
13493 of paths.
13494 (uninit_uses_cannot_happen): Avoid unnecessary if
13495 convert_control_dep_chain_into_preds yielded nothing.
13496
13497 2018-01-06 Martin Sebor <msebor@redhat.com>
13498
13499 PR tree-optimization/83640
13500 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
13501 subtracting negative offset from size.
13502 (builtin_access::overlap): Adjust offset bounds of the access to fall
13503 within the size of the object if possible.
13504
13505 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
13506
13507 PR rtl-optimization/83699
13508 * expmed.c (extract_bit_field_1): Restrict the vector usage of
13509 extract_bit_field_as_subreg to cases in which the extracted
13510 value is also a vector.
13511
13512 * lra-constraints.c (process_alt_operands): Test for the equivalence
13513 substitutions when detecting a possible reload cycle.
13514
13515 2018-01-06 Jakub Jelinek <jakub@redhat.com>
13516
13517 PR debug/83480
13518 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13519 by default if flag_selective_schedling{,2}. Formatting fixes.
13520
13521 PR rtl-optimization/83682
13522 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13523 if it has non-VECTOR_MODE element mode.
13524 (vec_duplicate_p): Likewise.
13525
13526 PR middle-end/83694
13527 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13528 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13529
13530 2018-01-05 Jakub Jelinek <jakub@redhat.com>
13531
13532 PR target/83604
13533 * config/i386/i386-builtin.def
13534 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13535 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13536 Require also OPTION_MASK_ISA_AVX512F in addition to
13537 OPTION_MASK_ISA_GFNI.
13538 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13539 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13540 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13541 to OPTION_MASK_ISA_GFNI.
13542 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13543 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13544 OPTION_MASK_ISA_AVX512BW.
13545 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13546 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13547 addition to OPTION_MASK_ISA_GFNI.
13548 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13549 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13550 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13551 to OPTION_MASK_ISA_GFNI.
13552 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13553 a requirement for all ISAs rather than any of them with a few
13554 exceptions.
13555 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13556 processing.
13557 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13558 bitmasks to be enabled with 3 exceptions, instead of requiring any
13559 enabled ISA with lots of exceptions.
13560 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13561 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13562 Change avx512bw in isa attribute to avx512f.
13563 * config/i386/sgxintrin.h: Add license boilerplate.
13564 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
13565 to __AVX512F__ and __AVX512VL to __AVX512VL__.
13566 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13567 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13568 defined.
13569 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13570 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13571 temporarily sse2 rather than sse if not enabled already.
13572
13573 PR target/83604
13574 * config/i386/sse.md (VI248_VLBW): Rename to ...
13575 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
13576 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
13577 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
13578 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
13579 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
13580 mode iterator instead of VI248_VLBW.
13581
13582 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
13583
13584 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
13585 (record_modified): Skip clobbers; add debug output.
13586 (param_change_prob): Use sreal frequencies.
13587
13588 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
13589
13590 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
13591 punt for user-aligned variables.
13592
13593 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
13594
13595 * tree-chrec.c (chrec_contains_symbols): Return true for
13596 POLY_INT_CST.
13597
13598 2018-01-05 Sudakshina Das <sudi.das@arm.com>
13599
13600 PR target/82439
13601 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
13602 of (x|y) == x for BICS pattern.
13603
13604 2018-01-05 Jakub Jelinek <jakub@redhat.com>
13605
13606 PR tree-optimization/83605
13607 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
13608 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
13609 can throw.
13610
13611 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
13612
13613 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
13614 * config/epiphany/rtems.h: New file.
13615
13616 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13617 Uros Bizjak <ubizjak@gmail.com>
13618
13619 PR target/83554
13620 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
13621 QIreg_operand instead of register_operand predicate.
13622 * config/i386/i386.c (ix86_rop_should_change_byte_p,
13623 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
13624 comments instead of -fmitigate[-_]rop.
13625
13626 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13627
13628 PR bootstrap/81926
13629 * cgraphunit.c (symbol_table::compile): Switch to text_section
13630 before calling assembly_start debug hook.
13631 * run-rtl-passes.c (run_rtl_passes): Likewise.
13632 Include output.h.
13633
13634 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13635
13636 * tree-vrp.c (extract_range_from_binary_expr_1): Check
13637 range_int_cst_p rather than !symbolic_range_p before calling
13638 extract_range_from_multiplicative_op_1.
13639
13640 2018-01-04 Jeff Law <law@redhat.com>
13641
13642 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
13643 redundant test in assertion.
13644
13645 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13646
13647 * doc/rtl.texi: Document machine_mode wrapper classes.
13648
13649 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13650
13651 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13652 using tree_to_uhwi.
13653
13654 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13655
13656 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13657 the VEC_PERM_EXPR fold to fail.
13658
13659 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13660
13661 PR debug/83585
13662 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13663 to switched_sections.
13664
13665 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13666
13667 PR target/83680
13668 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13669 test for d.testing.
13670
13671 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
13672
13673 PR target/83387
13674 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13675 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13676
13677 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13678
13679 PR debug/83666
13680 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13681 is BLKmode and bitpos not zero or mode change is needed.
13682
13683 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13684
13685 PR target/83675
13686 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13687 TARGET_VIS2.
13688
13689 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
13690
13691 PR target/83628
13692 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13693 instead of MULT rtx. Update all corresponding splitters.
13694 (*saddl_se): Ditto.
13695 (*ssub<modesuffix>): Ditto.
13696 (*ssubl_se): Ditto.
13697 (*cmp_sadd_di): Update split patterns.
13698 (*cmp_sadd_si): Ditto.
13699 (*cmp_sadd_sidi): Ditto.
13700 (*cmp_ssub_di): Ditto.
13701 (*cmp_ssub_si): Ditto.
13702 (*cmp_ssub_sidi): Ditto.
13703 * config/alpha/predicates.md (const23_operand): New predicate.
13704 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13705 Look for ASHIFT, not MULT inner operand.
13706 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13707
13708 2018-01-04 Martin Liska <mliska@suse.cz>
13709
13710 PR gcov-profile/83669
13711 * gcov.c (output_intermediate_file): Add version to intermediate
13712 gcov file.
13713 * doc/gcov.texi: Document new field 'version' in intermediate
13714 file format. Fix location of '-k' option of gcov command.
13715
13716 2018-01-04 Martin Liska <mliska@suse.cz>
13717
13718 PR ipa/82352
13719 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13720
13721 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13722
13723 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13724
13725 2018-01-03 Martin Sebor <msebor@redhat.com>
13726
13727 PR tree-optimization/83655
13728 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13729 checking calls with invalid arguments.
13730
13731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13732
13733 * tree-vect-stmts.c (vect_get_store_rhs): New function.
13734 (vectorizable_mask_load_store): Delete.
13735 (vectorizable_call): Return false for masked loads and stores.
13736 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
13737 instead of gimple_assign_rhs1.
13738 (vectorizable_load): Handle IFN_MASK_LOAD.
13739 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13740
13741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13742
13743 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13744 split out from..,
13745 (vectorizable_mask_load_store): ...here.
13746 (vectorizable_load): ...and here.
13747
13748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13749
13750 * tree-vect-stmts.c (vect_build_all_ones_mask)
13751 (vect_build_zero_merge_argument): New functions, split out from...
13752 (vectorizable_load): ...here.
13753
13754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13755
13756 * tree-vect-stmts.c (vect_check_store_rhs): New function,
13757 split out from...
13758 (vectorizable_mask_load_store): ...here.
13759 (vectorizable_store): ...and here.
13760
13761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13762
13763 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13764 split out from...
13765 (vectorizable_mask_load_store): ...here.
13766
13767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13768
13769 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13770 (vect_model_store_cost): Take a vec_load_store_type instead of a
13771 vect_def_type.
13772 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13773 (vect_model_store_cost): Take a vec_load_store_type instead of a
13774 vect_def_type.
13775 (vectorizable_mask_load_store): Update accordingly.
13776 (vectorizable_store): Likewise.
13777 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13778
13779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13780
13781 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13782 IFN_MASK_LOAD calls here rather than...
13783 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13784
13785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13786 Alan Hayward <alan.hayward@arm.com>
13787 David Sherwood <david.sherwood@arm.com>
13788
13789 * expmed.c (extract_bit_field_1): For vector extracts,
13790 fall back to extract_bit_field_as_subreg if vec_extract
13791 isn't available.
13792
13793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13794 Alan Hayward <alan.hayward@arm.com>
13795 David Sherwood <david.sherwood@arm.com>
13796
13797 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13798 they are variable or constant sized.
13799 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13800 slots for constant-sized data.
13801
13802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13803 Alan Hayward <alan.hayward@arm.com>
13804 David Sherwood <david.sherwood@arm.com>
13805
13806 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13807 handling COND_EXPRs with boolean comparisons, try to find a better
13808 basis for the mask type than the boolean itself.
13809
13810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13811
13812 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13813 is calculated and how it can be overridden.
13814 * genmodes.c (max_bitsize_mode_any_mode): New variable.
13815 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13816 if defined.
13817 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13818 if nonzero.
13819
13820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13821 Alan Hayward <alan.hayward@arm.com>
13822 David Sherwood <david.sherwood@arm.com>
13823
13824 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13825 Remove the mode argument.
13826 (aarch64_simd_valid_immediate): Remove the mode and inverse
13827 arguments.
13828 * config/aarch64/iterators.md (bitsize): New iterator.
13829 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13830 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13831 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13832 aarch64_simd_valid_immediate.
13833 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13834 (aarch64_reg_or_bic_imm): Likewise.
13835 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13836 with an insn_type enum and msl with a modifier_type enum.
13837 Replace element_width with a scalar_mode. Change the shift
13838 to unsigned int. Add constructors for scalar_float_mode and
13839 scalar_int_mode elements.
13840 (aarch64_vect_float_const_representable_p): Delete.
13841 (aarch64_can_const_movi_rtx_p)
13842 (aarch64_simd_scalar_immediate_valid_for_move)
13843 (aarch64_simd_make_constant): Update call to
13844 aarch64_simd_valid_immediate.
13845 (aarch64_advsimd_valid_immediate_hs): New function.
13846 (aarch64_advsimd_valid_immediate): Likewise.
13847 (aarch64_simd_valid_immediate): Remove mode and inverse
13848 arguments. Rewrite to use the above. Use const_vec_duplicate_p
13849 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13850 and aarch64_float_const_representable_p on the result.
13851 (aarch64_output_simd_mov_immediate): Remove mode argument.
13852 Update call to aarch64_simd_valid_immediate and use of
13853 simd_immediate_info.
13854 (aarch64_output_scalar_simd_mov_immediate): Update call
13855 accordingly.
13856
13857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13858 Alan Hayward <alan.hayward@arm.com>
13859 David Sherwood <david.sherwood@arm.com>
13860
13861 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13862 (mode_nunits): Likewise CONST_MODE_NUNITS.
13863 * machmode.def (ADJUST_NUNITS): Document.
13864 * genmodes.c (mode_data::need_nunits_adj): New field.
13865 (blank_mode): Update accordingly.
13866 (adj_nunits): New variable.
13867 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13868 parameter.
13869 (emit_mode_size_inline): Set need_bytesize_adj for all modes
13870 listed in adj_nunits.
13871 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13872 listed in adj_nunits. Don't emit case statements for such modes.
13873 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13874 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
13875 nothing if adj_nunits is nonnull.
13876 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13877 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13878 (emit_mode_fbit): Update use of print_maybe_const_decl.
13879 (emit_move_size): Likewise. Treat the array as non-const
13880 if adj_nunits.
13881 (emit_mode_adjustments): Handle adj_nunits.
13882
13883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13884
13885 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13886 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13887 (VECTOR_MODES): Use it.
13888 (make_vector_modes): Take the prefix as an argument.
13889
13890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13891 Alan Hayward <alan.hayward@arm.com>
13892 David Sherwood <david.sherwood@arm.com>
13893
13894 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13895 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13896 for MODE_VECTOR_BOOL.
13897 * machmode.def (VECTOR_BOOL_MODE): Document.
13898 * genmodes.c (VECTOR_BOOL_MODE): New macro.
13899 (make_vector_bool_mode): New function.
13900 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13901 MODE_VECTOR_BOOL.
13902 * lto-streamer-in.c (lto_input_mode_table): Likewise.
13903 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13904 Likewise.
13905 * stor-layout.c (int_mode_for_mode): Likewise.
13906 * tree.c (build_vector_type_for_mode): Likewise.
13907 * varasm.c (output_constant_pool_2): Likewise.
13908 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13909 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
13910 for MODE_VECTOR_BOOL.
13911 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13912 of mode class checks.
13913 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13914 instead of a list of mode class checks.
13915 (expand_vector_scalar_condition): Likewise.
13916 (type_for_widest_vector_mode): Handle BImode as an inner mode.
13917
13918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13919 Alan Hayward <alan.hayward@arm.com>
13920 David Sherwood <david.sherwood@arm.com>
13921
13922 * machmode.h (mode_size): Change from unsigned short to
13923 poly_uint16_pod.
13924 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13925 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13926 or if measurement_type is not polynomial.
13927 (fixed_size_mode::includes_p): Check for constant-sized modes.
13928 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13929 return a poly_uint16 rather than an unsigned short.
13930 (emit_mode_size): Change the type of mode_size from unsigned short
13931 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
13932 (emit_mode_adjustments): Cope with polynomial vector sizes.
13933 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13934 for GET_MODE_SIZE.
13935 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13936 for GET_MODE_SIZE.
13937 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13938 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13939 * caller-save.c (setup_save_areas): Likewise.
13940 (replace_reg_with_saved_mem): Likewise.
13941 * calls.c (emit_library_call_value_1): Likewise.
13942 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13943 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13944 (gen_lowpart_for_combine): Likewise.
13945 * convert.c (convert_to_integer_1): Likewise.
13946 * cse.c (equiv_constant, cse_insn): Likewise.
13947 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13948 (cselib_subst_to_values): Likewise.
13949 * dce.c (word_dce_process_block): Likewise.
13950 * df-problems.c (df_word_lr_mark_ref): Likewise.
13951 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13952 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13953 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13954 (rtl_for_decl_location): Likewise.
13955 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13956 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13957 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13958 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13959 (expand_expr_real_1): Likewise.
13960 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13961 (pad_below): Likewise.
13962 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13963 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13964 * ira.c (get_subreg_tracking_sizes): Likewise.
13965 * ira-build.c (ira_create_allocno_objects): Likewise.
13966 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13967 (ira_sort_regnos_for_alter_reg): Likewise.
13968 * ira-costs.c (record_operand_costs): Likewise.
13969 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13970 (resolve_simple_move): Likewise.
13971 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13972 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13973 (lra_constraints): Likewise.
13974 (CONST_POOL_OK_P): Reject variable-sized modes.
13975 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13976 (add_pseudo_to_slot, lra_spill): Likewise.
13977 * omp-low.c (omp_clause_aligned_alignment): Likewise.
13978 * optabs-query.c (get_best_extraction_insn): Likewise.
13979 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13980 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13981 (expand_mult_highpart, valid_multiword_target_p): Likewise.
13982 * recog.c (offsettable_address_addr_space_p): Likewise.
13983 * regcprop.c (maybe_mode_change): Likewise.
13984 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13985 * regrename.c (build_def_use): Likewise.
13986 * regstat.c (dump_reg_info): Likewise.
13987 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13988 (find_reloads, find_reloads_subreg_address): Likewise.
13989 * reload1.c (eliminate_regs_1): Likewise.
13990 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13991 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13992 (simplify_binary_operation_1, simplify_subreg): Likewise.
13993 * targhooks.c (default_function_arg_padding): Likewise.
13994 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13995 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13996 (verify_gimple_assign_ternary): Likewise.
13997 * tree-inline.c (estimate_move_cost): Likewise.
13998 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13999 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14000 (get_address_cost_ainc): Likewise.
14001 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14002 (vect_supportable_dr_alignment): Likewise.
14003 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14004 (vectorizable_reduction): Likewise.
14005 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14006 (vectorizable_operation, vectorizable_load): Likewise.
14007 * tree.c (build_same_sized_truth_vector_type): Likewise.
14008 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14009 * var-tracking.c (emit_note_insn_var_location): Likewise.
14010 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14011 (ADDR_VEC_ALIGN): Likewise.
14012
14013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14014 Alan Hayward <alan.hayward@arm.com>
14015 David Sherwood <david.sherwood@arm.com>
14016
14017 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14018 unsigned short.
14019 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14020 or if measurement_type is polynomial.
14021 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14022 * combine.c (make_extraction): Likewise.
14023 * dse.c (find_shift_sequence): Likewise.
14024 * dwarf2out.c (mem_loc_descriptor): Likewise.
14025 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14026 (extract_bit_field, extract_low_bits): Likewise.
14027 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14028 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14029 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14030 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14031 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14032 * reload.c (find_reloads): Likewise.
14033 * reload1.c (alter_reg): Likewise.
14034 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14035 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14036 * tree-if-conv.c (predicate_mem_writes): Likewise.
14037 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14038 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14039 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14040 * valtrack.c (dead_debug_insert_temp): Likewise.
14041 * varasm.c (mergeable_constant_section): Likewise.
14042 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14043
14044 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14045 Alan Hayward <alan.hayward@arm.com>
14046 David Sherwood <david.sherwood@arm.com>
14047
14048 * expr.c (expand_assignment): Cope with polynomial mode sizes
14049 when assigning to a CONCAT.
14050
14051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14052 Alan Hayward <alan.hayward@arm.com>
14053 David Sherwood <david.sherwood@arm.com>
14054
14055 * machmode.h (mode_precision): Change from unsigned short to
14056 poly_uint16_pod.
14057 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14058 short.
14059 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14060 or if measurement_type is not polynomial.
14061 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14062 in which the mode is already known to be a scalar_int_mode.
14063 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14064 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14065 initializer.
14066 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14067 for GET_MODE_PRECISION.
14068 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14069 for GET_MODE_PRECISION.
14070 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14071 as polynomial.
14072 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14073 (expand_field_assignment, make_extraction): Likewise.
14074 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14075 (get_last_value): Likewise.
14076 * convert.c (convert_to_integer_1): Likewise.
14077 * cse.c (cse_insn): Likewise.
14078 * expr.c (expand_expr_real_1): Likewise.
14079 * lra-constraints.c (simplify_operand_subreg): Likewise.
14080 * optabs-query.c (can_atomic_load_p): Likewise.
14081 * optabs.c (expand_atomic_load): Likewise.
14082 (expand_atomic_store): Likewise.
14083 * ree.c (combine_reaching_defs): Likewise.
14084 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14085 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14086 * tree.h (type_has_mode_precision_p): Likewise.
14087 * ubsan.c (instrument_si_overflow): Likewise.
14088
14089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14090 Alan Hayward <alan.hayward@arm.com>
14091 David Sherwood <david.sherwood@arm.com>
14092
14093 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14094 polynomial numbers of units.
14095 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14096 (valid_vector_subparts_p): New function.
14097 (build_vector_type): Remove temporary shim and take the number
14098 of units as a poly_uint64 rather than an int.
14099 (build_opaque_vector_type): Take the number of units as a
14100 poly_uint64 rather than an int.
14101 * tree.c (build_vector_from_ctor): Handle polynomial
14102 TYPE_VECTOR_SUBPARTS.
14103 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14104 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14105 (build_vector_from_val): If the number of units is variable,
14106 use build_vec_duplicate_cst for constant operands and
14107 VEC_DUPLICATE_EXPR otherwise.
14108 (make_vector_type): Remove temporary is_constant ().
14109 (build_vector_type, build_opaque_vector_type): Take the number of
14110 units as a poly_uint64 rather than an int.
14111 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14112 VECTOR_CST_NELTS.
14113 * cfgexpand.c (expand_debug_expr): Likewise.
14114 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14115 (store_constructor, expand_expr_real_1): Likewise.
14116 (const_scalar_mask_from_tree): Likewise.
14117 * fold-const-call.c (fold_const_reduction): Likewise.
14118 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14119 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14120 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14121 (fold_relational_const): Likewise.
14122 (native_interpret_vector): Likewise. Change the size from an
14123 int to an unsigned int.
14124 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14125 TYPE_VECTOR_SUBPARTS.
14126 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14127 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14128 duplicating a non-constant operand into a variable-length vector.
14129 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14130 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14131 * ipa-icf.c (sem_variable::equals): Likewise.
14132 * match.pd: Likewise.
14133 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14134 * print-tree.c (print_node): Likewise.
14135 * stor-layout.c (layout_type): Likewise.
14136 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14137 * tree-cfg.c (verify_gimple_comparison): Likewise.
14138 (verify_gimple_assign_binary): Likewise.
14139 (verify_gimple_assign_ternary): Likewise.
14140 (verify_gimple_assign_single): Likewise.
14141 * tree-pretty-print.c (dump_generic_node): Likewise.
14142 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14143 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14144 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14145 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14146 (vect_shift_permute_load_chain): Likewise.
14147 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14148 (expand_vector_condition, optimize_vector_constructor): Likewise.
14149 (lower_vec_perm, get_compute_type): Likewise.
14150 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14151 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14152 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14153 (vect_recog_mask_conversion_pattern): Likewise.
14154 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14155 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14156 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14157 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14158 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14159 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14160 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14161 (supportable_widening_operation): Likewise.
14162 (supportable_narrowing_operation): Likewise.
14163 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14164 Likewise.
14165 * varasm.c (output_constant): Likewise.
14166
14167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14168 Alan Hayward <alan.hayward@arm.com>
14169 David Sherwood <david.sherwood@arm.com>
14170
14171 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14172 so that both the length == 3 and length != 3 cases set up their
14173 own permute vectors. Add comments explaining why we know the
14174 number of elements is constant.
14175 (vect_permute_load_chain): Likewise.
14176
14177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14178 Alan Hayward <alan.hayward@arm.com>
14179 David Sherwood <david.sherwood@arm.com>
14180
14181 * machmode.h (mode_nunits): Change from unsigned char to
14182 poly_uint16_pod.
14183 (ONLY_FIXED_SIZE_MODES): New macro.
14184 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14185 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14186 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14187 New typedefs.
14188 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14189 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14190 or if measurement_type is not polynomial.
14191 * genmodes.c (ZERO_COEFFS): New macro.
14192 (emit_mode_nunits_inline): Make mode_nunits_inline return a
14193 poly_uint16.
14194 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14195 Use ZERO_COEFFS when emitting initializers.
14196 * data-streamer.h (bp_pack_poly_value): New function.
14197 (bp_unpack_poly_value): Likewise.
14198 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14199 for GET_MODE_NUNITS.
14200 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14201 for GET_MODE_NUNITS.
14202 * tree.c (make_vector_type): Remove temporary shim and make
14203 the real function take the number of units as a poly_uint64
14204 rather than an int.
14205 (build_vector_type_for_mode): Handle polynomial nunits.
14206 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14207 * emit-rtl.c (const_vec_series_p_1): Likewise.
14208 (gen_rtx_CONST_VECTOR): Likewise.
14209 * fold-const.c (test_vec_duplicate_folding): Likewise.
14210 * genrecog.c (validate_pattern): Likewise.
14211 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14212 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14213 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14214 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14215 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14216 * rtlanal.c (subreg_get_info): Likewise.
14217 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14218 (vect_grouped_load_supported): Likewise.
14219 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14220 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14221 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14222 (simplify_const_unary_operation, simplify_binary_operation_1)
14223 (simplify_const_binary_operation, simplify_ternary_operation)
14224 (test_vector_ops_duplicate, test_vector_ops): Likewise.
14225 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14226 instead of CONST_VECTOR_NUNITS.
14227 * varasm.c (output_constant_pool_2): Likewise.
14228 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14229 explicit-encoded elements in the XVEC for variable-length vectors.
14230
14231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14232
14233 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14234
14235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14236 Alan Hayward <alan.hayward@arm.com>
14237 David Sherwood <david.sherwood@arm.com>
14238
14239 * coretypes.h (fixed_size_mode): Declare.
14240 (fixed_size_mode_pod): New typedef.
14241 * builtins.h (target_builtins::x_apply_args_mode)
14242 (target_builtins::x_apply_result_mode): Change type to
14243 fixed_size_mode_pod.
14244 * builtins.c (apply_args_size, apply_result_size, result_vector)
14245 (expand_builtin_apply_args_1, expand_builtin_apply)
14246 (expand_builtin_return): Update accordingly.
14247
14248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14249
14250 * cse.c (hash_rtx_cb): Hash only the encoded elements.
14251 * cselib.c (cselib_hash_rtx): Likewise.
14252 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14253 CONST_VECTOR encoding.
14254
14255 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14256 Jeff Law <law@redhat.com>
14257
14258 PR target/83641
14259 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14260 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14261 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14262 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14263
14264 PR target/83641
14265 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14266 explicitly probe *sp in a noreturn function if there were any callee
14267 register saves or frame pointer is needed.
14268
14269 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14270
14271 PR debug/83621
14272 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14273 BLKmode for ternary, binary or unary expressions.
14274
14275 PR debug/83645
14276 * var-tracking.c (delete_vta_debug_insn): New inline function.
14277 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14278 insns from get_insns () to NULL instead of each bb separately.
14279 Use delete_vta_debug_insn. No longer static.
14280 (vt_debug_insns_local, variable_tracking_main_1): Adjust
14281 delete_vta_debug_insns callers.
14282 * rtl.h (delete_vta_debug_insns): Declare.
14283 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14284 instead of variable_tracking_main.
14285
14286 2018-01-03 Martin Sebor <msebor@redhat.com>
14287
14288 PR tree-optimization/83603
14289 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14290 arguments past the endof the argument list in functions declared
14291 without a prototype.
14292 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14293 Avoid checking when arguments are null.
14294
14295 2018-01-03 Martin Sebor <msebor@redhat.com>
14296
14297 PR c/83559
14298 * doc/extend.texi (attribute const): Fix a typo.
14299 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14300 issuing -Wsuggest-attribute for void functions.
14301
14302 2018-01-03 Martin Sebor <msebor@redhat.com>
14303
14304 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14305 offset_int::from instead of wide_int::to_shwi.
14306 (maybe_diag_overlap): Remove assertion.
14307 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14308 * gimple-ssa-sprintf.c (format_directive): Same.
14309 (parse_directive): Same.
14310 (sprintf_dom_walker::compute_format_length): Same.
14311 (try_substitute_return_value): Same.
14312
14313 2018-01-03 Jeff Law <law@redhat.com>
14314
14315 PR middle-end/83654
14316 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14317 non-constant residual for zero at runtime and avoid probing in
14318 that case. Reorganize code for trailing problem to mirror handling
14319 of the residual.
14320
14321 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14322
14323 PR tree-optimization/83501
14324 * tree-ssa-strlen.c (get_string_cst): New.
14325 (handle_char_store): Call get_string_cst.
14326
14327 2018-01-03 Martin Liska <mliska@suse.cz>
14328
14329 PR tree-optimization/83593
14330 * tree-ssa-strlen.c: Include tree-cfg.h.
14331 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
14332 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
14333 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
14334 to false.
14335 (strlen_dom_walker::before_dom_children): Call
14336 gimple_purge_dead_eh_edges. Dump tranformation with details
14337 dump flags.
14338 (strlen_dom_walker::before_dom_children): Update call by adding
14339 new argument cleanup_eh.
14340 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
14341
14342 2018-01-03 Martin Liska <mliska@suse.cz>
14343
14344 PR ipa/83549
14345 * cif-code.def (VARIADIC_THUNK): New enum value.
14346 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
14347 thunks.
14348
14349 2018-01-03 Jan Beulich <jbeulich@suse.com>
14350
14351 * sse.md (mov<mode>_internal): Tighten condition for when to use
14352 vmovdqu<ssescalarsize> for TI and OI modes.
14353
14354 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14355
14356 Update copyright years.
14357
14358 2018-01-03 Martin Liska <mliska@suse.cz>
14359
14360 PR ipa/83594
14361 * ipa-visibility.c (function_and_variable_visibility): Skip
14362 functions with noipa attribure.
14363
14364 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14365
14366 * gcc.c (process_command): Update copyright notice dates.
14367 * gcov-dump.c (print_version): Ditto.
14368 * gcov.c (print_version): Ditto.
14369 * gcov-tool.c (print_version): Ditto.
14370 * gengtype.c (create_file): Ditto.
14371 * doc/cpp.texi: Bump @copying's copyright year.
14372 * doc/cppinternals.texi: Ditto.
14373 * doc/gcc.texi: Ditto.
14374 * doc/gccint.texi: Ditto.
14375 * doc/gcov.texi: Ditto.
14376 * doc/install.texi: Ditto.
14377 * doc/invoke.texi: Ditto.
14378
14379 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14380
14381 * vector-builder.h (vector_builder::m_full_nelts): Change from
14382 unsigned int to poly_uint64.
14383 (vector_builder::full_nelts): Update prototype accordingly.
14384 (vector_builder::new_vector): Likewise.
14385 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
14386 (vector_builder::operator ==): Likewise.
14387 (vector_builder::finalize): Likewise.
14388 * int-vector-builder.h (int_vector_builder::int_vector_builder):
14389 Take the number of elements as a poly_uint64 rather than an
14390 unsigned int.
14391 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
14392 from unsigned int to poly_uint64.
14393 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
14394 (vec_perm_indices::new_vector): Likewise.
14395 (vec_perm_indices::length): Likewise.
14396 (vec_perm_indices::nelts_per_input): Likewise.
14397 (vec_perm_indices::input_nelts): Likewise.
14398 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
14399 number of elements per input as a poly_uint64 rather than an
14400 unsigned int. Use the original encoding for variable-length
14401 vectors, rather than clamping each individual element.
14402 For the second and subsequent elements in each pattern,
14403 clamp the step and base before clamping their sum.
14404 (vec_perm_indices::series_p): Handle polynomial element counts.
14405 (vec_perm_indices::all_in_range_p): Likewise.
14406 (vec_perm_indices_to_tree): Likewise.
14407 (vec_perm_indices_to_rtx): Likewise.
14408 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
14409 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
14410 (tree_vector_builder::new_binary_operation): Handle polynomial
14411 element counts. Return false if we need to know the number
14412 of elements at compile time.
14413 * fold-const.c (fold_vec_perm): Punt if the number of elements
14414 isn't known at compile time.
14415
14416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14417
14418 * vec-perm-indices.h (vec_perm_builder): Change element type
14419 from HOST_WIDE_INT to poly_int64.
14420 (vec_perm_indices::element_type): Update accordingly.
14421 (vec_perm_indices::clamp): Handle polynomial element_types.
14422 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14423 (vec_perm_indices::all_in_range_p): Likewise.
14424 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
14425 than shwi trees.
14426 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
14427 polynomial vec_perm_indices element types.
14428 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
14429 * fold-const.c (fold_vec_perm): Likewise.
14430 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
14431 * tree-vect-generic.c (lower_vec_perm): Likewise.
14432 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14433 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
14434 element type to HOST_WIDE_INT.
14435
14436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14437 Alan Hayward <alan.hayward@arm.com>
14438 David Sherwood <david.sherwood@arm.com>
14439
14440 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
14441 rather than an int. Use plus_constant.
14442 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
14443 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
14444
14445 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14446 Alan Hayward <alan.hayward@arm.com>
14447 David Sherwood <david.sherwood@arm.com>
14448
14449 * calls.c (emit_call_1, expand_call): Change struct_value_size from
14450 a HOST_WIDE_INT to a poly_int64.
14451
14452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14453 Alan Hayward <alan.hayward@arm.com>
14454 David Sherwood <david.sherwood@arm.com>
14455
14456 * calls.c (load_register_parameters): Cope with polynomial
14457 mode sizes. Require a constant size for BLKmode parameters
14458 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
14459 forces a parameter to be padded at the lsb end in order to
14460 fill a complete number of words, require the parameter size
14461 to be ordered wrt UNITS_PER_WORD.
14462
14463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14464 Alan Hayward <alan.hayward@arm.com>
14465 David Sherwood <david.sherwood@arm.com>
14466
14467 * reload1.c (spill_stack_slot_width): Change element type
14468 from unsigned int to poly_uint64_pod.
14469 (alter_reg): Treat mode sizes as polynomial.
14470
14471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14472 Alan Hayward <alan.hayward@arm.com>
14473 David Sherwood <david.sherwood@arm.com>
14474
14475 * reload.c (complex_word_subreg_p): New function.
14476 (reload_inner_reg_of_subreg, push_reload): Use it.
14477
14478 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14479 Alan Hayward <alan.hayward@arm.com>
14480 David Sherwood <david.sherwood@arm.com>
14481
14482 * lra-constraints.c (process_alt_operands): Reject matched
14483 operands whose sizes aren't ordered.
14484 (match_reload): Refer to this check here.
14485
14486 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14487 Alan Hayward <alan.hayward@arm.com>
14488 David Sherwood <david.sherwood@arm.com>
14489
14490 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
14491 that the mode size is in the set {1, 2, 4, 8, 16}.
14492
14493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14494 Alan Hayward <alan.hayward@arm.com>
14495 David Sherwood <david.sherwood@arm.com>
14496
14497 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
14498 Use plus_constant instead of gen_rtx_PLUS.
14499
14500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14501 Alan Hayward <alan.hayward@arm.com>
14502 David Sherwood <david.sherwood@arm.com>
14503
14504 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
14505 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
14506 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
14507 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
14508 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
14509 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
14510 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
14511 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
14512 * config/i386/i386.c (ix86_push_rounding): ...this new function.
14513 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14514 a poly_int64.
14515 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14516 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14517 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14518 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14519 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14520 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14521 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14522 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14523 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14524 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14525 function.
14526 * expr.c (emit_move_resolve_push): Treat the input and result
14527 of PUSH_ROUNDING as a poly_int64.
14528 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14529 (emit_push_insn): Likewise.
14530 * lra-eliminations.c (mark_not_eliminable): Likewise.
14531 * recog.c (push_operand): Likewise.
14532 * reload1.c (elimination_effects): Likewise.
14533 * rtlanal.c (nonzero_bits1): Likewise.
14534 * calls.c (store_one_arg): Likewise. Require the padding to be
14535 known at compile time.
14536
14537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14538 Alan Hayward <alan.hayward@arm.com>
14539 David Sherwood <david.sherwood@arm.com>
14540
14541 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14542 Use plus_constant instead of gen_rtx_PLUS.
14543
14544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14545 Alan Hayward <alan.hayward@arm.com>
14546 David Sherwood <david.sherwood@arm.com>
14547
14548 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14549 rather than an int.
14550
14551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14552 Alan Hayward <alan.hayward@arm.com>
14553 David Sherwood <david.sherwood@arm.com>
14554
14555 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14556 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14557 via stack temporaries. Treat the mode size as polynomial too.
14558
14559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14560 Alan Hayward <alan.hayward@arm.com>
14561 David Sherwood <david.sherwood@arm.com>
14562
14563 * expr.c (expand_expr_real_2): When handling conversions involving
14564 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14565 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
14566 as a poly_uint64 too.
14567
14568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14569 Alan Hayward <alan.hayward@arm.com>
14570 David Sherwood <david.sherwood@arm.com>
14571
14572 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
14573
14574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14575 Alan Hayward <alan.hayward@arm.com>
14576 David Sherwood <david.sherwood@arm.com>
14577
14578 * combine.c (can_change_dest_mode): Handle polynomial
14579 REGMODE_NATURAL_SIZE.
14580 * expmed.c (store_bit_field_1): Likewise.
14581 * expr.c (store_constructor): Likewise.
14582 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
14583 and polynomial REGMODE_NATURAL_SIZE.
14584 (gen_lowpart_common): Likewise.
14585 * reginfo.c (record_subregs_of_mode): Likewise.
14586 * rtlanal.c (read_modify_subreg_p): Likewise.
14587
14588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14589 Alan Hayward <alan.hayward@arm.com>
14590 David Sherwood <david.sherwood@arm.com>
14591
14592 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
14593 numbers of elements.
14594
14595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14596 Alan Hayward <alan.hayward@arm.com>
14597 David Sherwood <david.sherwood@arm.com>
14598
14599 * match.pd: Cope with polynomial numbers of vector elements.
14600
14601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14602 Alan Hayward <alan.hayward@arm.com>
14603 David Sherwood <david.sherwood@arm.com>
14604
14605 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
14606 in a POINTER_PLUS_EXPR.
14607
14608 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14609 Alan Hayward <alan.hayward@arm.com>
14610 David Sherwood <david.sherwood@arm.com>
14611
14612 * omp-simd-clone.c (simd_clone_subparts): New function.
14613 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
14614 (ipa_simd_modify_function_body): Likewise.
14615
14616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14617 Alan Hayward <alan.hayward@arm.com>
14618 David Sherwood <david.sherwood@arm.com>
14619
14620 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
14621 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
14622 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
14623 (expand_vector_condition, vector_element): Likewise.
14624 (subparts_gt): New function.
14625 (get_compute_type): Use subparts_gt.
14626 (count_type_subparts): Delete.
14627 (expand_vector_operations_1): Use subparts_gt instead of
14628 count_type_subparts.
14629
14630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14631 Alan Hayward <alan.hayward@arm.com>
14632 David Sherwood <david.sherwood@arm.com>
14633
14634 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
14635 (vect_compile_time_alias): ...this new function. Do the calculation
14636 on poly_ints rather than trees.
14637 (vect_prune_runtime_alias_test_list): Update call accordingly.
14638
14639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14640 Alan Hayward <alan.hayward@arm.com>
14641 David Sherwood <david.sherwood@arm.com>
14642
14643 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
14644 numbers of units.
14645 (vect_schedule_slp_instance): Likewise.
14646
14647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14648 Alan Hayward <alan.hayward@arm.com>
14649 David Sherwood <david.sherwood@arm.com>
14650
14651 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14652 constant and extern definitions for variable-length vectors.
14653 (vect_get_constant_vectors): Note that the number of units
14654 is known to be constant.
14655
14656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14657 Alan Hayward <alan.hayward@arm.com>
14658 David Sherwood <david.sherwood@arm.com>
14659
14660 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
14661 of units as polynomial. Choose between WIDE and NARROW based
14662 on multiple_p.
14663
14664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14665 Alan Hayward <alan.hayward@arm.com>
14666 David Sherwood <david.sherwood@arm.com>
14667
14668 * tree-vect-stmts.c (simd_clone_subparts): New function.
14669 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14670
14671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14672 Alan Hayward <alan.hayward@arm.com>
14673 David Sherwood <david.sherwood@arm.com>
14674
14675 * tree-vect-stmts.c (vectorizable_call): Treat the number of
14676 vectors as polynomial. Use build_index_vector for
14677 IFN_GOMP_SIMD_LANE.
14678
14679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14680 Alan Hayward <alan.hayward@arm.com>
14681 David Sherwood <david.sherwood@arm.com>
14682
14683 * tree-vect-stmts.c (get_load_store_type): Treat the number of
14684 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14685 for variable-length vectors.
14686 (vectorizable_mask_load_store): Treat the number of units as
14687 polynomial, asserting that it is constant if the condition has
14688 already been enforced.
14689 (vectorizable_store, vectorizable_load): Likewise.
14690
14691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14692 Alan Hayward <alan.hayward@arm.com>
14693 David Sherwood <david.sherwood@arm.com>
14694
14695 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14696 of units as polynomial. Punt if we can't tell at compile time
14697 which vector contains the final result.
14698
14699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14700 Alan Hayward <alan.hayward@arm.com>
14701 David Sherwood <david.sherwood@arm.com>
14702
14703 * tree-vect-loop.c (vectorizable_induction): Treat the number
14704 of units as polynomial. Punt on SLP inductions. Use an integer
14705 VEC_SERIES_EXPR for variable-length integer reductions. Use a
14706 cast of such a series for variable-length floating-point
14707 reductions.
14708
14709 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14710 Alan Hayward <alan.hayward@arm.com>
14711 David Sherwood <david.sherwood@arm.com>
14712
14713 * tree.h (build_index_vector): Declare.
14714 * tree.c (build_index_vector): New function.
14715 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14716 of units as polynomial, forcibly converting it to a constant if
14717 vectorizable_reduction has already enforced the condition.
14718 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
14719 to create a {1,2,3,...} vector.
14720 (vectorizable_reduction): Treat the number of units as polynomial.
14721 Choose vectype_in based on the largest scalar element size rather
14722 than the smallest number of units. Enforce the restrictions
14723 relied on above.
14724
14725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14726 Alan Hayward <alan.hayward@arm.com>
14727 David Sherwood <david.sherwood@arm.com>
14728
14729 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14730 number of units as polynomial.
14731
14732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14733 Alan Hayward <alan.hayward@arm.com>
14734 David Sherwood <david.sherwood@arm.com>
14735
14736 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14737 * target.def (autovectorize_vector_sizes): Return the vector sizes
14738 by pointer, using vector_sizes rather than a bitmask.
14739 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14740 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14741 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14742 Likewise.
14743 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14744 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14745 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14746 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14747 * omp-general.c (omp_max_vf): Likewise.
14748 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14749 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14750 * tree-vect-loop.c (vect_analyze_loop): Likewise.
14751 * tree-vect-slp.c (vect_slp_bb): Likewise.
14752 * doc/tm.texi: Regenerate.
14753 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14754 to a poly_uint64.
14755 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14756 the vector size as a poly_uint64 rather than an unsigned int.
14757 (current_vector_size): Change from an unsigned int to a poly_uint64.
14758 (get_vectype_for_scalar_type): Update accordingly.
14759 * tree.h (build_truth_vector_type): Take the size and number of
14760 units as a poly_uint64 rather than an unsigned int.
14761 (build_vector_type): Add a temporary overload that takes
14762 the number of units as a poly_uint64 rather than an unsigned int.
14763 * tree.c (make_vector_type): Likewise.
14764 (build_truth_vector_type): Take the number of units as a poly_uint64
14765 rather than an unsigned int.
14766
14767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14768 Alan Hayward <alan.hayward@arm.com>
14769 David Sherwood <david.sherwood@arm.com>
14770
14771 * target.def (get_mask_mode): Take the number of units and length
14772 as poly_uint64s rather than unsigned ints.
14773 * targhooks.h (default_get_mask_mode): Update accordingly.
14774 * targhooks.c (default_get_mask_mode): Likewise.
14775 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14776 * doc/tm.texi: Regenerate.
14777
14778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14779 Alan Hayward <alan.hayward@arm.com>
14780 David Sherwood <david.sherwood@arm.com>
14781
14782 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14783 * omp-general.c (omp_max_vf): Likewise.
14784 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14785 (expand_omp_simd): Handle polynomial safelen.
14786 * omp-low.c (omplow_simd_context): Add a default constructor.
14787 (omplow_simd_context::max_vf): Change from int to poly_uint64.
14788 (lower_rec_simd_input_clauses): Update accordingly.
14789 (lower_rec_input_clauses): Likewise.
14790
14791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14792 Alan Hayward <alan.hayward@arm.com>
14793 David Sherwood <david.sherwood@arm.com>
14794
14795 * tree-vectorizer.h (vect_nunits_for_cost): New function.
14796 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14797 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14798 (vect_analyze_slp_cost): Likewise.
14799 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14800 (vect_model_load_cost): Likewise.
14801
14802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14803 Alan Hayward <alan.hayward@arm.com>
14804 David Sherwood <david.sherwood@arm.com>
14805
14806 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14807 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14808 from an unsigned int * to a poly_uint64_pod *.
14809 (calculate_unrolling_factor): New function.
14810 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
14811
14812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14813 Alan Hayward <alan.hayward@arm.com>
14814 David Sherwood <david.sherwood@arm.com>
14815
14816 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14817 from an unsigned int to a poly_uint64.
14818 (_loop_vec_info::slp_unrolling_factor): Likewise.
14819 (_loop_vec_info::vectorization_factor): Change from an int
14820 to a poly_uint64.
14821 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14822 (vect_get_num_vectors): New function.
14823 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14824 (vect_get_num_copies): Use vect_get_num_vectors.
14825 (vect_analyze_data_ref_dependences): Change max_vf from an int *
14826 to an unsigned int *.
14827 (vect_analyze_data_refs): Change min_vf from an int * to a
14828 poly_uint64 *.
14829 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14830 than an unsigned HOST_WIDE_INT.
14831 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14832 (vect_analyze_data_ref_dependence): Change max_vf from an int *
14833 to an unsigned int *.
14834 (vect_analyze_data_ref_dependences): Likewise.
14835 (vect_compute_data_ref_alignment): Handle polynomial vf.
14836 (vect_enhance_data_refs_alignment): Likewise.
14837 (vect_prune_runtime_alias_test_list): Likewise.
14838 (vect_shift_permute_load_chain): Likewise.
14839 (vect_supportable_dr_alignment): Likewise.
14840 (dependence_distance_ge_vf): Take the vectorization factor as a
14841 poly_uint64 rather than an unsigned HOST_WIDE_INT.
14842 (vect_analyze_data_refs): Change min_vf from an int * to a
14843 poly_uint64 *.
14844 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14845 vfm1 as a poly_uint64 rather than an int. Make the same change
14846 for the returned bound_scalar.
14847 (vect_gen_vector_loop_niters): Handle polynomial vf.
14848 (vect_do_peeling): Likewise. Update call to
14849 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14850 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14851 be constant.
14852 * tree-vect-loop.c (vect_determine_vectorization_factor)
14853 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14854 (vect_get_known_peeling_cost): Likewise.
14855 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14856 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14857 (vect_transform_loop): Likewise. Use the lowest possible VF when
14858 updating the upper bounds of the loop.
14859 (vect_min_worthwhile_factor): Make static. Return an unsigned int
14860 rather than an int.
14861 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14862 polynomial unroll factors.
14863 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14864 (vect_make_slp_decision): Likewise.
14865 (vect_supported_load_permutation_p): Likewise, and polynomial
14866 vf too.
14867 (vect_analyze_slp_cost): Handle polynomial vf.
14868 (vect_slp_analyze_node_operations): Likewise.
14869 (vect_slp_analyze_bb_1): Likewise.
14870 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14871 than an unsigned HOST_WIDE_INT.
14872 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14873 (vectorizable_load): Handle polynomial vf.
14874 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14875 a poly_uint64.
14876 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14877
14878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14879 Alan Hayward <alan.hayward@arm.com>
14880 David Sherwood <david.sherwood@arm.com>
14881
14882 * match.pd: Handle bit operations involving three constants
14883 and try to fold one pair.
14884
14885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14886
14887 * tree-vect-loop-manip.c: Include gimple-fold.h.
14888 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14889 niters_maybe_zero parameters. Handle other cases besides a step of 1.
14890 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14891 Add a path that uses a step of VF instead of 1, but disable it
14892 for now.
14893 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14894 and niters_no_overflow parameters. Update calls to
14895 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14896 Create a new SSA name if the latter choses to use a ste other
14897 than zero, and return it via niters_vector_mult_vf_var.
14898 * tree-vect-loop.c (vect_transform_loop): Update calls to
14899 vect_do_peeling, vect_gen_vector_loop_niters and
14900 slpeel_make_loop_iterate_ntimes.
14901 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14902 (vect_gen_vector_loop_niters): Update declarations after above changes.
14903
14904 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
14905
14906 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14907 128-bit round to integer instructions.
14908 (ceil<mode>2): Likewise.
14909 (btrunc<mode>2): Likewise.
14910 (round<mode>2): Likewise.
14911
14912 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14913
14914 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14915 unaligned VSX load/store on P8/P9.
14916 (expand_block_clear): Allow the use of unaligned VSX
14917 load/store on P8/P9.
14918
14919 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14920
14921 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14922 New function.
14923 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14924 swap associated with both a load and a store.
14925
14926 2018-01-02 Andrew Waterman <andrew@sifive.com>
14927
14928 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14929 * config/riscv/riscv.md (clear_cache): Use it.
14930
14931 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
14932
14933 * web.c: Remove out-of-date comment.
14934
14935 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14936
14937 * expr.c (fixup_args_size_notes): Check that any existing
14938 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14939 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14940 (emit_single_push_insn): ...here.
14941
14942 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14943
14944 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14945 (const_vector_encoded_nelts): New function.
14946 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14947 (const_vector_int_elt, const_vector_elt): Declare.
14948 * emit-rtl.c (const_vector_int_elt_1): New function.
14949 (const_vector_elt): Likewise.
14950 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14951 of CONST_VECTOR_ELT.
14952
14953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14954
14955 * expr.c: Include rtx-vector-builder.h.
14956 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14957 directly on the tree encoding.
14958 (const_vector_from_tree): Likewise.
14959 * optabs.c: Include rtx-vector-builder.h.
14960 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14961 sequence of "u" values.
14962 * vec-perm-indices.c: Include rtx-vector-builder.h.
14963 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14964 directly on the vec_perm_indices encoding.
14965
14966 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14967
14968 * doc/rtl.texi (const_vector): Describe new encoding scheme.
14969 * Makefile.in (OBJS): Add rtx-vector-builder.o.
14970 * rtx-vector-builder.h: New file.
14971 * rtx-vector-builder.c: Likewise.
14972 * rtl.h (rtx_def::u2): Add a const_vector field.
14973 (CONST_VECTOR_NPATTERNS): New macro.
14974 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14975 (CONST_VECTOR_DUPLICATE_P): Likewise.
14976 (CONST_VECTOR_STEPPED_P): Likewise.
14977 (CONST_VECTOR_ENCODED_ELT): Likewise.
14978 (const_vec_duplicate_p): Check for a duplicated vector encoding.
14979 (unwrap_const_vec_duplicate): Likewise.
14980 (const_vec_series_p): Check for a non-duplicated vector encoding.
14981 Say that the function only returns true for integer vectors.
14982 * emit-rtl.c: Include rtx-vector-builder.h.
14983 (gen_const_vec_duplicate_1): Delete.
14984 (gen_const_vector): Call gen_const_vec_duplicate instead of
14985 gen_const_vec_duplicate_1.
14986 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14987 (gen_const_vec_duplicate): Use rtx_vector_builder.
14988 (gen_const_vec_series): Likewise.
14989 (gen_rtx_CONST_VECTOR): Likewise.
14990 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14991 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14992 Build a new vector rather than modifying a CONST_VECTOR in-place.
14993 (handle_special_swappables): Update call accordingly.
14994 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14995 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14996 Build a new vector rather than modifying a CONST_VECTOR in-place.
14997 (handle_special_swappables): Update call accordingly.
14998
14999 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15000
15001 * simplify-rtx.c (simplify_const_binary_operation): Use
15002 CONST_VECTOR_ELT instead of XVECEXP.
15003
15004 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15005
15006 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15007 the selector elements to be different from the data elements
15008 if the selector is a VECTOR_CST.
15009 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15010 ssizetype for the selector.
15011
15012 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15013
15014 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15015 before testing each element individually.
15016 * tree-vect-generic.c (lower_vec_perm): Likewise.
15017
15018 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15019
15020 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15021 * selftest-run-tests.c (selftest::run_tests): Call it.
15022 * vector-builder.h (vector_builder::operator ==): New function.
15023 (vector_builder::operator !=): Likewise.
15024 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15025 (vec_perm_indices::all_from_input_p): New function.
15026 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15027 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15028 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15029 instead of reading the VECTOR_CST directly. Detect whether both
15030 vector inputs are the same before constructing the vec_perm_indices,
15031 and update the number of inputs argument accordingly. Use the
15032 utility functions added above. Only construct sel2 if we need to.
15033
15034 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15035
15036 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15037 the broadcast of the low byte.
15038 (expand_mult_highpart): Use an explicit encoding for the permutes.
15039 * optabs-query.c (can_mult_highpart_p): Likewise.
15040 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15041 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15042 (vectorizable_bswap): Likewise.
15043 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15044 explicit encoding for the power-of-2 permutes.
15045 (vect_permute_store_chain): Likewise.
15046 (vect_grouped_load_supported): Likewise.
15047 (vect_permute_load_chain): Likewise.
15048
15049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15050
15051 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15052 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15053 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15054 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15055 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15056 (vect_gen_perm_mask_any): Likewise.
15057
15058 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15059
15060 * int-vector-builder.h: New file.
15061 * vec-perm-indices.h: Include int-vector-builder.h.
15062 (vec_perm_indices): Redefine as an int_vector_builder.
15063 (auto_vec_perm_indices): Delete.
15064 (vec_perm_builder): Redefine as a stand-alone class.
15065 (vec_perm_indices::vec_perm_indices): New function.
15066 (vec_perm_indices::clamp): Likewise.
15067 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15068 (vec_perm_indices::new_vector): New function.
15069 (vec_perm_indices::new_expanded_vector): Update for new
15070 vec_perm_indices class.
15071 (vec_perm_indices::rotate_inputs): New function.
15072 (vec_perm_indices::all_in_range_p): Operate directly on the
15073 encoded form, without computing elided elements.
15074 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15075 encoding. Update for new vec_perm_indices class.
15076 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15077 the given vec_perm_builder.
15078 (expand_vec_perm_var): Update vec_perm_builder constructor.
15079 (expand_mult_highpart): Use vec_perm_builder instead of
15080 auto_vec_perm_indices.
15081 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15082 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15083 or double series encoding as appropriate.
15084 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15085 vec_perm_indices instead of auto_vec_perm_indices.
15086 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15087 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15088 (vect_permute_store_chain): Likewise.
15089 (vect_grouped_load_supported): Likewise.
15090 (vect_permute_load_chain): Likewise.
15091 (vect_shift_permute_load_chain): Likewise.
15092 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15093 (vect_transform_slp_perm_load): Likewise.
15094 (vect_schedule_slp_instance): Likewise.
15095 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15096 (vectorizable_mask_load_store): Likewise.
15097 (vectorizable_bswap): Likewise.
15098 (vectorizable_store): Likewise.
15099 (vectorizable_load): Likewise.
15100 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15101 vec_perm_indices instead of auto_vec_perm_indices. Use
15102 tree_to_vec_perm_builder to read the vector from a tree.
15103 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15104 vec_perm_builder instead of a vec_perm_indices.
15105 (have_whole_vector_shift): Use vec_perm_builder and
15106 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15107 truncation to calc_vec_perm_mask_for_shift.
15108 (vect_create_epilog_for_reduction): Likewise.
15109 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15110 from auto_vec_perm_indices to vec_perm_indices.
15111 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15112 instead of changing individual elements.
15113 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15114 the vector in d.perm.
15115 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15116 from auto_vec_perm_indices to vec_perm_indices.
15117 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15118 instead of changing individual elements.
15119 (arm_vectorize_vec_perm_const): Use new_vector to install
15120 the vector in d.perm.
15121 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15122 Update vec_perm_builder constructor.
15123 (rs6000_expand_interleave): Likewise.
15124 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15125 (rs6000_expand_interleave): Likewise.
15126
15127 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15128
15129 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15130 to qimode could truncate the indices.
15131 * optabs.c (expand_vec_perm_var): Likewise.
15132
15133 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15134
15135 * Makefile.in (OBJS): Add vec-perm-indices.o.
15136 * vec-perm-indices.h: New file.
15137 * vec-perm-indices.c: Likewise.
15138 * target.h (vec_perm_indices): Replace with a forward class
15139 declaration.
15140 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15141 * optabs.h: Include vec-perm-indices.h.
15142 (expand_vec_perm): Delete.
15143 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15144 (expand_vec_perm_const): Declare.
15145 * target.def (vec_perm_const_ok): Replace with...
15146 (vec_perm_const): ...this new hook.
15147 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15148 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15149 * doc/tm.texi: Regenerate.
15150 * optabs.def (vec_perm_const): Delete.
15151 * doc/md.texi (vec_perm_const): Likewise.
15152 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15153 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15154 expand_vec_perm for constant permutation vectors. Assert that
15155 the mode of variable permutation vectors is the integer equivalent
15156 of the mode that is being permuted.
15157 * optabs-query.h (selector_fits_mode_p): Declare.
15158 * optabs-query.c: Include vec-perm-indices.h.
15159 (selector_fits_mode_p): New function.
15160 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15161 is defined, instead of checking whether the vec_perm_const_optab
15162 exists. Use targetm.vectorize.vec_perm_const instead of
15163 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15164 fit in the vector mode before using a variable permute.
15165 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15166 vec_perm_indices instead of an rtx.
15167 (expand_vec_perm): Replace with...
15168 (expand_vec_perm_const): ...this new function. Take the selector
15169 as a vec_perm_indices rather than an rtx. Also take the mode of
15170 the selector. Update call to shift_amt_for_vec_perm_mask.
15171 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15172 Use vec_perm_indices::new_expanded_vector to expand the original
15173 selector into bytes. Check whether the indices fit in the vector
15174 mode before using a variable permute.
15175 (expand_vec_perm_var): Make global.
15176 (expand_mult_highpart): Use expand_vec_perm_const.
15177 * fold-const.c: Includes vec-perm-indices.h.
15178 * tree-ssa-forwprop.c: Likewise.
15179 * tree-vect-data-refs.c: Likewise.
15180 * tree-vect-generic.c: Likewise.
15181 * tree-vect-loop.c: Likewise.
15182 * tree-vect-slp.c: Likewise.
15183 * tree-vect-stmts.c: Likewise.
15184 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15185 Delete.
15186 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15187 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15188 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15189 (aarch64_vectorize_vec_perm_const): ...this new function.
15190 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15191 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15192 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15193 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15194 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15195 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15196 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15197 into...
15198 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
15199 check for NEON modes.
15200 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15201 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15202 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15203 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15204 into...
15205 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
15206 the old VEC_PERM_CONST conditions.
15207 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15208 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15209 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15210 (ia64_vectorize_vec_perm_const_ok): Merge into...
15211 (ia64_vectorize_vec_perm_const): ...this new function.
15212 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15213 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15214 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15215 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15216 * config/mips/mips.c (mips_expand_vec_perm_const)
15217 (mips_vectorize_vec_perm_const_ok): Merge into...
15218 (mips_vectorize_vec_perm_const): ...this new function.
15219 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15220 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15221 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15222 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15223 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15224 (rs6000_expand_vec_perm_const): Delete.
15225 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15226 Delete.
15227 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15228 (altivec_expand_vec_perm_const_le): Take each operand individually.
15229 Operate on constant selectors rather than rtxes.
15230 (altivec_expand_vec_perm_const): Likewise. Update call to
15231 altivec_expand_vec_perm_const_le.
15232 (rs6000_expand_vec_perm_const): Delete.
15233 (rs6000_vectorize_vec_perm_const_ok): Delete.
15234 (rs6000_vectorize_vec_perm_const): New function.
15235 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15236 an element count and rtx array.
15237 (rs6000_expand_extract_even): Update call accordingly.
15238 (rs6000_expand_interleave): Likewise.
15239 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15240 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15241 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15242 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15243 (rs6000_expand_vec_perm_const): Delete.
15244 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15245 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15246 (altivec_expand_vec_perm_const_le): Take each operand individually.
15247 Operate on constant selectors rather than rtxes.
15248 (altivec_expand_vec_perm_const): Likewise. Update call to
15249 altivec_expand_vec_perm_const_le.
15250 (rs6000_expand_vec_perm_const): Delete.
15251 (rs6000_vectorize_vec_perm_const_ok): Delete.
15252 (rs6000_vectorize_vec_perm_const): New function. Remove stray
15253 reference to the SPE evmerge intructions.
15254 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15255 an element count and rtx array.
15256 (rs6000_expand_extract_even): Update call accordingly.
15257 (rs6000_expand_interleave): Likewise.
15258 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15259 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15260 new function.
15261 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15262
15263 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15264
15265 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15266 vector mode and that that mode matches the mode of the data
15267 being permuted.
15268 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15269 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
15270 directly using expand_vec_perm_1 when forcing selectors into
15271 registers.
15272 (expand_vec_perm_var): New function, split out from expand_vec_perm.
15273
15274 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15275
15276 * optabs-query.h (can_vec_perm_p): Delete.
15277 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15278 * optabs-query.c (can_vec_perm_p): Split into...
15279 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15280 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15281 particular selector is valid.
15282 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15283 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15284 (vect_grouped_load_supported): Likewise.
15285 (vect_shift_permute_load_chain): Likewise.
15286 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15287 (vect_transform_slp_perm_load): Likewise.
15288 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15289 (vectorizable_bswap): Likewise.
15290 (vect_gen_perm_mask_checked): Likewise.
15291 * fold-const.c (fold_ternary_loc): Likewise. Don't take
15292 implementations of variable permutation vectors into account
15293 when deciding which selector to use.
15294 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15295 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15296 with a false third argument.
15297 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15298 to test whether the constant selector is valid and can_vec_perm_var_p
15299 to test whether a variable selector is valid.
15300
15301 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15302
15303 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15304 * optabs-query.c (can_vec_perm_p): Likewise.
15305 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15306 instead of vec_perm_indices.
15307 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15308 (vect_gen_perm_mask_checked): Likewise,
15309 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15310 (vect_gen_perm_mask_checked): Likewise,
15311
15312 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15313
15314 * optabs-query.h (qimode_for_vec_perm): Declare.
15315 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15316 (qimode_for_vec_perm): ...this new function.
15317 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
15318
15319 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15320
15321 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
15322 does not have a conditional at the top.
15323
15324 2018-01-02 Richard Biener <rguenther@suse.de>
15325
15326 * ipa-inline.c (big_speedup_p): Fix expression.
15327
15328 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15329
15330 PR target/81616
15331 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
15332 for generic 4->6.
15333
15334 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15335
15336 PR target/81616
15337 Generic tuning.
15338 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
15339 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
15340 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
15341 cond_taken_branch_cost 3->4.
15342
15343 2018-01-01 Jakub Jelinek <jakub@redhat.com>
15344
15345 PR tree-optimization/83581
15346 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
15347 TODO_cleanup_cfg if any changes have been made.
15348
15349 PR middle-end/83608
15350 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
15351 convert_modes if target mode has the right side, but different mode
15352 class.
15353
15354 PR middle-end/83609
15355 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
15356 last argument when extracting from CONCAT. If either from_real or
15357 from_imag is NULL, use expansion through memory. If result is not
15358 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
15359 the parts directly to inner mode, if even that fails, use expansion
15360 through memory.
15361
15362 PR middle-end/83623
15363 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
15364 check for bswap in mode rather than HImode and use that in expand_unop
15365 too.
15366 \f
15367 Copyright (C) 2018 Free Software Foundation, Inc.
15368
15369 Copying and distribution of this file, with or without modification,
15370 are permitted in any medium without royalty provided the copyright
15371 notice and this notice are preserved.