[NDS32] Set call address constraint.
[gcc.git] / gcc / ChangeLog
1 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
2
3 * config/nds32/constraints.md (S): New constraint.
4 * config/nds32/nds32.md (call_internal): Use constraint S.
5 (call_value_internal): Likewise.
6 (sibcall_internal): Likewise.
7 (sibcall_value_internal): Likewise.
8
9 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10 Chung-Ju Wu <jasonwucj@gmail.com>
11
12 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
13 into consideration.
14
15 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16 Chung-Ju Wu <jasonwucj@gmail.com>
17
18 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20 (nds32_rtx_costs_impl): Simplify.
21 (nds32_address_cost_impl): Simplify.
22 (nds32_init_rtx_costs): New function.
23 (nds32_rtx_costs_speed_prefer): Likewise.
24 (nds32_rtx_costs_size_prefer): Likewise.
25 (nds32_address_cost_speed_prefer): Likewise.
26 (nds32_address_cost_speed_fwprop): Likewise.
27 (nds32_address_cost_size_prefer): Likewise.
28 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
29 * config/nds32/nds32.c (nds32_option_override): Use
30 nds32_init_rtx_costs function.
31
32 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
33
34 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
35 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
36 (TARGET_PIPELINE_N8): Likewise.
37 (TARGET_PIPELINE_N10): Likewise.
38 (TARGET_PIPELINE_N13): Likewise.
39 (TARGET_PIPELINE_GRAYWOLF): Likewise.
40
41 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
42
43 * config/nds32/nds32-fpu.md: Update copyright year.
44
45 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
46
47 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
48
49 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
50
51 * config/nds32/nds32.c
52 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
53 * config/nds32/nds32.opt (minline-asm-r15): New option.
54
55 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
56
57 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
58 MASK_HW_ABS.
59 * config/nds32/nds32.md (abssi2): New pattern.
60
61 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
62
63 * config/i386/i386.md (rex64namesuffix): New mode attribute.
64 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
65 Merge insn pattern from sse_cvtsi2ss<round_name> and
66 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
67 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
68 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
69 using SWI48 mode iterator.
70 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
71 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
72 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
73 pattern from sse_cvttss2si<round_saeonly_name>
74 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
75 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
76 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
77 using SWI48 mode iterator.
78 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
79 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
80 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
81 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
82 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
83 using SWI48 mode iterator.
84 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
85 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
86 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
87 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
88 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
89 SWI48 mode iterator.
90 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
91 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
92 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
93 pattern from sse_cvttsd2si<round_saeonly_name>
94 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
95
96 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
97
98 * config/nds32/nds32-md-auxiliary.c
99 (nds32_valid_smw_lwm_base_p): Refine.
100 (nds32_output_smw_single_word): Refine.
101 (nds32_output_smw_double_word): New.
102 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
103
104 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
105
106 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
107 (nds32_output_stack_pop): Refine.
108 (nds32_expand_unaligned_load): Refine.
109 (nds32_expand_unaligned_store): Refine.
110
111 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
112 Chung-Ju Wu <jasonwucj@gmail.com>
113
114 * config/nds32/constants.md: Add TP_REGNUM constant.
115 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
116 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
117 UNSPEC_ADD32.
118 * config/nds32/nds32-doubleword.md: Consider flag_pic.
119 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
120 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
121 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
122 and PIC code generation.
123 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
124 code generation.
125 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
126 optimization.
127 * config/nds32/nds32.md: Support TLS and PIC.
128 * config/nds32/nds32.c: Support TLS and PIC.
129 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
130 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
131 predicate.
132
133 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
134
135 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
136 mode with E_ prefix.
137
138 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
139 Chung-Ju Wu <jasonwucj@gmail.com>
140
141 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
142 * config/nds32/nds32-md-auxiliary.c
143 (symbolic_reference_mentioned_p): New.
144 (nds32_legitimize_ict_address): New.
145 (nds32_expand_ict_move): New.
146 (nds32_indirect_call_referenced_p): New.
147 (nds32_symbol_binds_local_p): Delete.
148 (nds32_long_call_p): Modify.
149 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
150 * config/nds32/nds32-protos.h
151 (symbolic_reference_mentioned_p): Declare.
152 (nds32_legitimize_ict_address): Declare.
153 (nds32_expand_ict_move): Declare.
154 (nds32_indirect_call_referenced_p): Declare.
155 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
156 (nds32_relax_group): Use nds32_ict_const_p as condition.
157 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
158 (nds32_asm_file_start): Output ict_model directive in asm code.
159 (nds32_legitimate_address_p): Consider indirect call.
160 (nds32_print_operand): Consider indirect call.
161 (nds32_print_operand_address): Consider indirect call.
162 (nds32_insert_attributes): Handle "indirect_call" attribute.
163 (TARGET_LEGITIMATE_ADDRESS_P): Define.
164 (TARGET_LEGITIMATE_CONSTANT_P): Define.
165 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
166 (TARGET_DELEGITIMIZE_ADDRESS): Define.
167 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
168 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
169 (TARGET_ICT_MODEL_SMALL): Define.
170 (TARGET_ICT_MODEL_LARGE): Define.
171 * config/nds32/nds32.md (movsi): Consider ict model.
172 (call, call_value): Consider ict model.
173 (sibcall, sibcall_value): Consider ict model.
174 * config/nds32/nds32.opt (mict-model): New option.
175 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
176 model.
177
178 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
179 Monk Chiang <sh.chiang04@gmail.com>
180 Jim Wilson <jimw@sifive.com>
181
182 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
183 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
184 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
185 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
186 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
187 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
188 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
189 compute save_libcall_adjustment properly.
190 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
191 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
192 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
193 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
194 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
195 (ABI_SPEC): Handle mabi=ilp32e.
196 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
197 (RVE): Add RVE mask.
198 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
199 <-march>: Add rv32e as an example.
200
201 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
202
203 PR c++/82899
204 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
205 (intra_create_variable_infos): Handle C++ constructors.
206
207 2018-05-18 Martin Liska <mliska@suse.cz>
208
209 * passes.def: Remove a redundant pass.
210
211 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
212
213 PR bootstrap/85838
214 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
215
216 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
217
218 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
219 (ARMv4): Update.
220 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
221 (ARMv6m): Update.
222 (armv2, armv2a, armv3, armv3m): Delete architectures.
223 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
224 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
225 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
226 Delete cpus.
227 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
228 (*mulsidi3adddi): Likewise.
229 (mulsidi3): Likewise.
230 (*mulsidi3_nov6): Likewise.
231 (umulsidi3): Likewise.
232 (umulsidi3_nov6): Likewise.
233 (umaddsidi4): Likewise.
234 (*umulsidi3adddi): Likewise.
235 (smulsi3_highpart): Likewise.
236 (*smulsi3_highpart_nov6): Likewise.
237 (umulsi3_highpart): Likewise.
238 (*umulsi3_highpart_nov6): Likewise.
239 * config/arm/arm.h (arm_arch3m): Delete.
240 * config/arm/arm.c (arm_arch3m): Delete.
241 (arm_option_override_internal): Update armv3-related comment.
242 (arm_configure_build_target): Delete use of isa_bit_mode32.
243 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
244 (arm_rtx_costs_internal): Delete check of arm_arch3m.
245 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
246 (mulsa3): Likewise.
247 (mulusa3): Likewise.
248 * config/arm/arm-protos.h (arm_arch3m): Delete.
249 * config/arm/arm-tables.opt: Regenerate.
250 * config/arm/arm-tune.md: Likewise.
251 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
252 deleted architectures.
253
254 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
255
256 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
257 (armv5t, armv5te): New features.
258 (ARMv5, ARMv5e): Delete fgroups.
259 (ARMv5t, ARMv5te): Adjust for above changes.
260 (ARMv6m): Likewise.
261 (armv5, armv5e): Delete arches.
262 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
263 arm_arch5.
264 (*call_reg_arm): Likewise.
265 (*call_value_reg_armv5): Likewise.
266 (*call_value_reg_arm): Likewise.
267 (*call_symbol): Likewise.
268 (*call_value_symbol): Likewise.
269 (*sibcall_insn): Likewise.
270 (*sibcall_value_insn): Likewise.
271 (clzsi2): Likewise.
272 (prefetch): Likewise.
273 (define_split and define_peephole2 dependent on arm_arch5):
274 Likewise.
275 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
276 arm_arch5e.
277 (TARGET_ARM_QBIT): Likewise.
278 (TARGET_DSP_MULTIPLY): Likewise.
279 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
280 (arm_arch5, arm_arch5e): Delete.
281 (arm_arch5t, arm_arch5te): Declare.
282 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
283 (arm_arch5t): Declare.
284 (arm_option_reconfigure_globals): Update for the above.
285 (arm_options_perform_arch_sanity_checks): Update comment, replace
286 use of arm_arch5 with arm_arch5t.
287 (use_return_insn): Likewise.
288 (arm_emit_call_insn): Likewise.
289 (output_return_instruction): Likewise.
290 (arm_final_prescan_insn): Likewise.
291 (arm_coproc_builtin_available): Likewise.
292 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
293 arm_arch5e with arm_arch5t and arm_arch5te.
294 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
295 (arm_arch5t, arm_arch5te): Declare.
296 * config/arm/arm-tables.opt: Regenerate.
297 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
298 * config/arm/t-multilib: Likewise.
299 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
300 instead of arm_arch5.
301 (*call_reg_thumb1): Likewise.
302 (*call_value_reg_thumb1_v5): Likewise.
303 (*call_value_reg_thumb1): Likewise.
304 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
305 unreachable path.
306 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
307
308 2018-05-18 Martin Liska <mliska@suse.cz>
309
310 PR gcov-profile/84846
311 * doc/gcov.texi: Document -t option of gcov tool.
312
313 2018-05-18 Martin Liska <mliska@suse.cz>
314
315 PR gcov-profile/84846
316 * gcov.c (print_usage): Add new -t option.
317 (process_args): Handle the option.
318 (generate_results): Use stdout as output when requested by
319 the option.
320
321 2018-05-18 Martin Liska <mliska@suse.cz>
322
323 PR gcov-profile/84846
324 * coverage.c (coverage_init): Write PWD to .gcno file.
325 * doc/gcov.texi: Document how working directory is printed.
326 * gcov-dump.c (dump_gcov_file): Print PWD.
327 * gcov.c (output_intermediate_file): Likewise.
328 (read_graph_file): Read PWD string.
329 (output_lines): Print PWD.
330
331 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
332
333 PR middle-end/85817
334 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
335 for retval and return false if all args to phi are zero.
336
337 2018-05-18 Richard Biener <rguenther@suse.de>
338
339 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
340 method.
341 (evrp_dom_walker::before_dom_children): Call it.
342
343 2018-05-18 Richard Biener <rguenther@suse.de>
344
345 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
346 results when processing array refs with variable index.
347
348 2018-05-18 Toon Moene <toon@moene.org>
349
350 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
351 directly after that of -floop-interchange. Indicate that both
352 options are enabled by default when specifying -O3.
353
354 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
355
356 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
357 iterator. Delete separate integer-mode vec_set<mode> expander.
358 (aarch64_simd_vec_setv2di): Delete.
359 (vec_setv2di): Delete.
360 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
361 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
362 the "w, r" alternative.
363
364 2018-05-18 Martin Liska <mliska@suse.cz>
365
366 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
367 * tree-pass.h (make_pass_lower_switch_O0): New function.
368 * tree-switch-conversion.c (node_has_low_bound): Remove.
369 (node_has_high_bound): Likewise.
370 (node_is_bounded): Likewise.
371 (class pass_lower_switch): Make it a template type and create
372 two instances.
373 (pass_lower_switch::execute): Add template argument.
374 (make_pass_lower_switch): New function.
375 (make_pass_lower_switch_O0): New function.
376 (do_jump_if_equal): Remove.
377 (emit_case_nodes): Simplify to just handle all 3 cases and leave
378 all the hard work to tree optimization passes.
379
380 2018-05-18 Martin Liska <mliska@suse.cz>
381
382 * dbgcnt.c (limit_low): Renamed from limit.
383 (limit_high): New variable.
384 (dbg_cnt_is_enabled): Check for upper limit.
385 (dbg_cnt): Adjust dumping.
386 (dbg_cnt_set_limit_by_index): Add new argument for high
387 value.
388 (dbg_cnt_set_limit_by_name): Likewise.
389 (dbg_cnt_process_single_pair): Parse new format.
390 (dbg_cnt_process_opt): Use strtok.
391 (dbg_cnt_list_all_counters): Remove 'value' and add
392 'limit_high'.
393 * doc/invoke.texi: Document changes.
394
395 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
396
397 * doc/sourcebuild.texi (scalar_all_fma): Document.
398 * tree.def (FMA_EXPR): Delete.
399 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
400 * internal-fn.c (ternary_direct): New macro.
401 (expand_ternary_optab_fn): Likewise.
402 (direct_ternary_optab_supported_p): Likewise.
403 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
404 * builtins.c (fold_builtin_fma): Delete.
405 (fold_builtin_3): Don't call it.
406 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
407 * expr.c (expand_expr_real_2): Likewise.
408 * fold-const.c (operand_equal_p): Likewise.
409 (fold_ternary_loc): Likewise.
410 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
411 * gimple.c (DEFTREECODE): Likewise.
412 * gimplify.c (gimplify_expr): Likewise.
413 * optabs-tree.c (optab_for_tree_code): Likewise.
414 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
415 * tree-eh.c (operation_could_trap_p): Likewise.
416 (stmt_could_throw_1_p): Likewise.
417 * tree-inline.c (estimate_operator_cost): Likewise.
418 * tree-pretty-print.c (dump_generic_node): Likewise.
419 (op_code_prio): Likewise.
420 * tree-ssa-loop-im.c (stmt_cost): Likewise.
421 * tree-ssa-operands.c (get_expr_operands): Likewise.
422 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
423 * fold-const-call.h (fold_fma): Delete.
424 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
425 CFN_FNMA and CFN_FNMS.
426 (fold_fma): Delete.
427 * genmatch.c (combined_fn): New enum.
428 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
429 (commutative_op): New function.
430 (commutate): Use it. Handle more than 2 operands.
431 (dt_operand::gen_gimple_expr): Use commutative_op.
432 (parser::parse_expr): Allow :c to be used with non-binary
433 operators if the commutative operand is known.
434 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
435 CFN_FMS, CFN_FNMA and CFN_FNMS.
436 (backprop::process_assign_use): Remove FMA_EXPR handling.
437 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
438 (gen_hsa_fma): New function.
439 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
440 IFN_FNMA and IFN_FNMS.
441 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
442 * gimple-fold.h (follow_all_ssa_edges): Declare.
443 * gimple-fold.c (follow_all_ssa_edges): New function.
444 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
445 gimple_build interface and use follow_all_ssa_edges to fold the result.
446 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
447 instead of checking for optabs directly.
448 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
449 rather than FMA_EXPRs.
450 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
451 call to IFN_FMA instead of an FMA_EXPR.
452
453 2018-05-17 Jim Wilson <jimw@sifive.com>
454
455 * expr.c (do_tablejump): When converting index to Pmode, if we have a
456 sign extended promoted subreg, and the range does not have the sign bit
457 set, then do a sign extend.
458
459 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
460 test, check for sign extended subreg and/or constant operands, and
461 do a sign extend in that case.
462
463 2018-05-17 Steve Ellcey <sellcey@cavium.com>
464
465 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
466 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
467 Add untyped.
468 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
469 Change logics_shift_reg to logics_shift_imm.
470 (thunderx2t99_fp_loadpair_basic): Delete.
471 (thunderx2t99_fp_storepair_basic): Delete.
472 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
473 (thunderx2t99_asimd_polynomial): Delete.
474 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
475 and neon_fp_mul_d_scalar_q.
476 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
477 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
478 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
479 (thunderx2t99_asimd_lut): Add missing tbl types.
480 (thunderx2t99_asimd_ext): Delete.
481 (thunderx2t99_asimd_load1_1_mult): Delete.
482 (thunderx2t99_asimd_load1_2_mult): Delete.
483 (thunderx2t99_asimd_load1_ldp): New.
484 (thunderx2t99_asimd_load1): New.
485 (thunderx2t99_asimd_load2): Add missing *load2* types.
486 (thunderx2t99_asimd_load3): New.
487 (thunderx2t99_asimd_load4): New.
488 (thunderx2t99_asimd_store1_1_mult): Delete.
489 (thunderx2t99_asimd_store1_2_mult): Delete.
490 (thunderx2t99_asimd_store2_mult): Delete.
491 (thunderx2t99_asimd_store2_onelane): Delete.
492 (thunderx2t99_asimd_store_stp): New.
493 (thunderx2t99_asimd_store1): New.
494 (thunderx2t99_asimd_store2): New.
495 (thunderx2t99_asimd_store3): New.
496 (thunderx2t99_asimd_store4): New.
497
498 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
499
500 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
501 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
502
503 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
504 Segher Boessenkool <segher@kernel.crashing.org>
505
506 PR target/85698
507 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
508 operand.
509
510 2018-05-17 Richard Biener <rguenther@suse.de>
511
512 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
513 for pruning loop and prune defs feeding only already visited PHIs.
514
515 2018-05-17 Richard Biener <rguenther@suse.de>
516
517 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
518
519 2018-05-17 Bin Cheng <bin.cheng@arm.com>
520 Richard Biener <rguenther@suse.de>
521
522 PR tree-optimization/85793
523 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
524 for VMAT_ELEMENTWISE.
525
526 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
527
528 * internal-fn.h (lookup_internal_fn): Declare
529 * internal-fn.c (lookup_internal_fn): New function.
530 * gimple.c (gimple_build_call_from_tree): Handle calls to
531 internal functions.
532 * gimple-pretty-print.c (dump_gimple_call): Print "." before
533 internal function names.
534 * tree-pretty-print.c (dump_generic_node): Likewise.
535 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
536
537 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
538
539 * gimple-fold.h (gimple_build): Make the function forms take
540 combined_fn rather than built_in_function.
541 (gimple_simplify): Likewise.
542 * gimple-match-head.c (gimple_simplify): Likewise.
543 * gimple-fold.c (gimple_build): Likewise.
544 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
545 rather than gimple_build_call_internal.
546 (get_initial_defs_for_reduction): Likewise.
547 (vect_create_epilog_for_reduction): Likewise.
548 (vectorizable_live_operation): Likewise.
549
550 2018-05-17 Martin Liska <mliska@suse.cz>
551
552 * gimple-ssa-sprintf.c (format_directive): Do not use
553 space in between 'G_' and '('.
554
555 2018-05-17 Jakub Jelinek <jakub@redhat.com>
556
557 PR target/85323
558 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
559 even if the mask is not all ones.
560
561 PR target/85323
562 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
563 vector.
564 (ix86_gimple_fold_builtin): Likewise.
565
566 PR target/85323
567 * config/i386/i386.c: Include tree-vector-builder.h.
568 (ix86_vector_shift_count): New function.
569 (ix86_fold_builtin): Fold shift builtins by scalar count.
570 (ix86_gimple_fold_builtin): Likewise.
571
572 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
573 _mm512_setzero): New intrinsics.
574
575 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
576 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
577
578 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
579 code generation for cases where splatting a value is not useful.
580 * simplify-rtx.c (simplify_ternary_operation): Simplify
581 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
582 mode to a vec_concat.
583
584 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
585
586 * config.gcc: Support "goldmont-plus".
587 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
588 "goldmont-plus".
589 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
590 PROCESSOR_GOLDMONT_PLUS.
591 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
592 (processor_target_table): Add "goldmont-plus".
593 (PTA_GOLDMONT_PLUS): Define.
594 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
595 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
596 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
597 (fold_builtin_cpu): Add "goldmont-plus".
598 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
599 (ix86_option_override_internal): Add "goldmont-plus".
600 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
601 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
602 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
603 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
604
605 2018-05-17 Richard Biener <rguenther@suse.de>
606
607 PR tree-optimization/85757
608 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
609 remove defs that only feed that PHI from further processing.
610
611 2018-05-16 Jim Wilson <jimw@sifive.com>
612
613 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
614 asterisk to name.
615 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
616
617 2018-05-16 Mark Wielaard <mark@klomp.org>
618
619 * dwarf2out.c (count_index_strings): New function.
620 (output_indirect_strings): Call count_index_strings and generate
621 header for dwarf_version >= 5.
622
623 2018-05-16 Mark Wielaard <mark@klomp.org>
624
625 * dwarf2out.c (dwarf_FORM): New function.
626 (set_indirect_string): Use dwarf_FORM.
627 (reset_indirect_string): Likewise.
628 (size_of_die): Likewise.
629 (value_format): Likewise.
630 (output_die): Likewise.
631 (add_skeleton_AT_string): Likewise.
632 (output_macinfo_op): Likewise.
633 (index_string): Likewise.
634 (output_index_string_offset): Likewise.
635 (output_index_string): Likewise.
636 (count_index_strings): Likewise.
637
638 2018-05-16 Carl Love <cel@us.ibm.com>
639
640 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
641 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
642
643 2018-05-16 Martin Jambor <mjambor@suse.cz>
644
645 * ipa-prop.c (ipa_free_all_edge_args): Remove.
646 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
647
648 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
649
650 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
651 (fnma<mode>4): Likewise.
652 (fms<mode>4): Likewise.
653 (fnms<mode>4): Likewise.
654 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
655 (aarch64_fnma<mode>4): Likewise.
656 (aarch64_fms<mode>4): Likewise.
657 (aarch64_fnms<mode>4): Likewise.
658 (aarch64_fnmadd<mode>4): Likewise.
659
660 2018-05-16 Jason Merrill <jason@redhat.com>
661
662 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
663
664 2018-05-16 Richard Biener <rguenther@suse.de>
665
666 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
667 (dump_stmt_cost): Declare.
668 (add_stmt_cost): Dump cost we add.
669 (add_stmt_costs): New function.
670 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
671 No longer exported.
672 (vect_analyze_stmt): Adjust prototype.
673 (vectorizable_condition): Likewise.
674 (vectorizable_live_operation): Likewise.
675 (vectorizable_reduction): Likewise.
676 (vectorizable_induction): Likewise.
677 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
678 cost vector to pass to vectorizable_ and record afterwards.
679 (vect_model_reduction_cost): Take cost vector argument and adjust.
680 (vect_model_induction_cost): Likewise.
681 (vectorizable_reduction): Likewise.
682 (vectorizable_induction): Likewise.
683 (vectorizable_live_operation): Likewise.
684 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
685 SLP_TREE_NUMBER_OF_VEC_STMTS.
686 (vect_analyze_slp_cost_1): Remove.
687 (vect_analyze_slp_cost): Likewise.
688 (vect_slp_analyze_node_operations): Take visited args and
689 a target cost vector. Avoid processing already visited stmt sets.
690 (vect_slp_analyze_operations): Use a local cost vector to gather
691 costs and register those of non-discarded instances.
692 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
693 (vect_schedule_slp_instance): Remove copying of
694 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
695 zero.
696 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
697 adding cost. Record cost entry location.
698 (vect_prologue_cost_for_slp_op): Function to compute cost of
699 a constant or invariant generated for SLP vect in the prologue,
700 split out from vect_analyze_slp_cost_1.
701 (vect_model_simple_cost): Make static. Adjust for SLP costing.
702 (vect_model_promotion_demotion_cost): Likewise.
703 (vect_model_store_cost): Likewise, make static.
704 (vect_model_load_cost): Likewise.
705 (vectorizable_bswap): Add cost vector arg and adjust.
706 (vectorizable_call): Likewise.
707 (vectorizable_simd_clone_call): Likewise.
708 (vectorizable_conversion): Likewise.
709 (vectorizable_assignment): Likewise.
710 (vectorizable_shift): Likewise.
711 (vectorizable_operation): Likewise.
712 (vectorizable_store): Likewise.
713 (vectorizable_load): Likewise.
714 (vectorizable_condition): Likewise.
715 (vectorizable_comparison): Likewise.
716 (can_vectorize_live_stmts): Likewise.
717 (vect_analyze_stmt): Likewise.
718 (vect_transform_stmt): Adjust calls to vectorizable_*.
719 * tree-vectorizer.c: Include gimple-pretty-print.h.
720 (dump_stmt_cost): New function.
721
722 2018-05-16 Richard Biener <rguenther@suse.de>
723
724 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
725 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
726 * tree-ssa-dse.c: Include tree-ssa-loop.h.
727 (check_name): New callback.
728 (dse_classify_store): Track cycles via a visited bitmap of PHI
729 defs and simplify handling of in-loop and across loop dead stores
730 and properly fail for loop-variant refs. Handle byte-tracking with
731 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
732 limiting the walk.
733
734 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
735
736 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
737 (vect_get_mask_type_for_stmt): Likewise.
738 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
739 split out from...
740 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
741 to determine the statement's vector type and the vector type that
742 should be used for calculating nunits. Deal with cases in which
743 the type has to be deferred.
744 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
745 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
746 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
747 (vect_determine_vf_for_stmt): New functions, split out from...
748 (vect_determine_vectorization_factor): ...here.
749 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
750 (vect_get_mask_type_for_stmt): New functions, split out from
751 vect_determine_vectorization_factor.
752
753 2018-05-16 Richard Biener <rguenther@suse.de>
754
755 * tree-cfg.c (verify_gimple_assign_ternary): Properly
756 verify the [VEC_]COND_EXPR embedded comparison.
757
758 2018-05-15 Martin Sebor <msebor@redhat.com>
759
760 PR tree-optimization/85753
761 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
762 RECORD_TYPE in addition to ARRAY_TYPE.
763
764 2018-05-15 Martin Sebor <msebor@redhat.com>
765
766 PR middle-end/85643
767 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
768
769 2018-05-15 Richard Biener <rguenther@suse.de>
770
771 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
772 add by_clobber_p one. Change algorithm to collect all defs
773 representing uses we need to walk and try reducing them to
774 a single one before failing.
775 (dse_dom_walker::dse_optimize_stmt): Adjust.
776
777 2018-05-13 Mark Wielaard <mark@klomp.org>
778
779 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
780 (size_of_loc_descr): Likewise.
781 (output_loc_operands): Likewise.
782 (output_loc_operands_raw): Likewise.
783 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
784 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
785 (hash_loc_operands): Likewise.
786 (compare_loc_operands): Likewise.
787
788 2018-05-14 Mark Wielaard <mark@klomp.org>
789
790 * dwarf2out.c (count_index_addrs): New function.
791 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
792
793 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
794
795 PR tree-optimization/83648
796 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
797 return value as malloc candidate.
798
799 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
800
801 PR ipa/85734
802 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
803 as true in call to suggest_attribute.
804
805 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
806
807 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
808 -mreadonly-in-sdata.
809
810 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
811
812 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
813 New pattern.
814 (aarch64_crypto_aesd_fused): Likewise.
815
816 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
817
818 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
819 (movsi_aarch64): Likewise.
820 (load_pairsi): Likewise.
821 (load_pairdi): Likewise.
822 (store_pairsi): Likewise.
823 (store_pairdi): Likewise.
824 (load_pairsf): Likewise.
825 (load_pairdf): Likewise.
826 (store_pairsf): Likewise.
827 (store_pairdf): Likewise.
828 (zero_extend): Likewise.
829 (trunc): Swap alternatives.
830 (fcvt_target): Add '?' to prefer w over r.
831
832 2018-05-14 Jakub Jelinek <jakub@redhat.com>
833
834 PR target/85756
835 * config/i386/i386.md: Disallow non-commutative arithmetics in
836 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
837 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
838 in the peephole2 before it.
839
840 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
841
842 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
843 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
844 (ix86_handle_option): Handle -mcldemote.
845 * config.gcc: New header.
846 * config/i386/cldemoteintrin.h: New file.
847 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
848 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
849 -mcldemote.
850 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
851 OPTION_MASK_ISA_CLDEMOTE.
852 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
853 (ix86_valid_target_attribute_inner_p): Ditto.
854 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
855 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
856 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
857 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
858 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
859 (cldemote): New.
860 * config/i386/i386.opt: Add -mcldemote.
861 * config/i386/x86intrin.h: New header.
862 * doc/invoke.texi: Add -mcldemote.
863
864 2018-05-14 Richard Biener <rguenther@suse.de>
865
866 * doc/match-and-simplify.texi: Adjust :s documentation.
867
868 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
869
870 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
871 intended memcpy size.
872 (REORDER_45): Likewise.
873
874 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
875
876 * sort.cc: New file.
877 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
878 * vec.c (qsort_chk): Use gcc_qsort.
879 * Makefile.in (OBJS-libcommon): Add sort.o.
880 (build/sort.o): New target. Use it...
881 (BUILD_RTL): ... here, and...
882 (build/gencfn-macros): ... here, and...
883 (build/genmatch): ... here.
884
885 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
886 Chung-Ju Wu <jasonwucj@gmail.com>
887
888 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
889 * config/nds32/nds32-graywolf.md: New file.
890 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
891 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
892 pipeline.
893 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
894 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
895 * config/nds32/nds32.md (pipeline_model): Add graywolf.
896 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
897 * config/nds32/pipelines.md: Include n15 settings.
898
899 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
900 Chung-Ju Wu <jasonwucj@gmail.com>
901
902 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
903 * config/nds32/nds32-n13.md: New file.
904 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
905 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
906 pipeline.
907 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
908 * config/nds32/nds32.md (pipeline_model): Add n13.
909 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
910 * config/nds32/pipelines.md: Include n13 settings.
911
912 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
913 Chung-Ju Wu <jasonwucj@gmail.com>
914
915 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
916 * config/nds32/nds32-n10.md: New file.
917 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
918 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
919 pipeline.
920 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
921 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
922 * config/nds32/nds32.md (pipeline_model): Add n10.
923 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
924 * config/nds32/pipelines.md: Include n10 settings.
925
926 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
927 Kito Cheng <kito.cheng@gmail.com>
928 Chung-Ju Wu <jasonwucj@gmail.com>
929
930 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
931 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
932 Add enum values for DSP extension instructions.
933 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
934 New constraints.
935 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
936 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
937 New code iterators.
938 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
939 * config/nds32/nds32-dspext.md: New file for DSP implementation.
940 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
941 * config/nds32/nds32-intrinsic.md: Likewise.
942 * config/nds32/nds32_intrinsic.h: Likewise.
943 * config/nds32/nds32-md-auxiliary.c: Likewise.
944 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
945 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
946 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
947 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
948 * config/nds32/nds32-protos.h: New declarations for DSP extension.
949 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
950 TYPE_DMAC in switch statement.
951 * config/nds32/nds32.c: New checking and implementation for DSP
952 extension instructions.
953 * config/nds32/nds32.h: Likewise.
954 * config/nds32/nds32.md: Likewise.
955 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
956 * config/nds32/predicates.md: Implement new predicates for DSP
957 extension.
958
959 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
960
961 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
962 Reformat alternatives and attributes so it is easier to identify
963 which constraints/attributes go with which instruction.
964 (mov<mode>_hardfloat32, FMOVE64): Likewise.
965 (mov<mode>_softfloat32, FMOVE64): Likewise.
966 (mov<mode>_hardfloat64, FMOVE64): Likewise.
967 (mov<mode>_softfloat64, FMOVE64): Likewise.
968
969 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
970
971 * doc/extend.texi (PowerPC Built-in Functions): Rename this
972 subsection.
973 (Basic PowerPC Built-in Functions): The new name of the
974 subsection previously known as "PowerPC Built-in Functions".
975 (Basic PowerPC Built-in Functions Available on all Configurations):
976 New subsubsection.
977 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
978 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
979 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
980 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
981
982 2018-05-11 Martin Jambor <mjambor@suse.cz>
983
984 PR ipa/85655
985 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
986 single const.
987
988 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
989
990 PR target/85733
991 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
992
993 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
994
995 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
996 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
997 (ix86_handle_option): Handle -mwaitpkg.
998 * config.gcc: New header.
999 * config/i386/cpuid.h (bit_WAITPKG): New bit.
1000 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1001 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1002 function type.
1003 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1004 OPTION_MASK_ISA_WAITPKG.
1005 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1006 (ix86_option_override_internal): Add PTA_WAITPKG.
1007 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1008 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1009 IX86_BUILTIN_TPAUSE.
1010 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1011 __builtin_ia32_umwait and __builtin_ia32_tpause.
1012 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1013 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1014 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1015 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1016 UNSPECV_TPAUSE): New.
1017 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1018 * config/i386/i386.opt: Add -mwaitpkg.
1019 * config/i386/waitpkgintrin.h: New file.
1020 * config/i386/x86intrin.h: New header.
1021 * doc/invoke.texi: Add -mwaitpkg.
1022
1023 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
1024
1025 PR target/85606
1026 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1027 equivalent.
1028 (cortex-m0): Use armv6s-m isa.
1029 (cortex-m0plus): Likewise.
1030 (cortex-m1): Likewise.
1031 (cortex-m0.small-multiply): Likewise.
1032 (cortex-m0plus.small-multiply): Likewise.
1033 (cortex-m1.small-multiply): Likewise.
1034
1035 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
1036 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR tree-optimization/85692
1039 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1040 source permute as well.
1041
1042 2018-05-11 Martin Liska <mliska@suse.cz>
1043
1044 PR sanitizer/85556
1045 * doc/extend.texi: Document LLVM style format for no_sanitize
1046 attribute.
1047
1048 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
1049
1050 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1051 mode_supports_vsx_dform_quad to mode_supports_dq_form.
1052 (mode_supports_vsx_dform_quad): Likewise.
1053 (mode_supports_vmx_dform): Move these functions to be next to the
1054 other mode_supports functions.
1055 (mode_supports_dq_form): Likewise.
1056 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1057 mode_supports_dq_form.
1058 (reg_offset_addressing_ok_p): Likewise.
1059 (offsettable_ok_by_alignment): Likewise.
1060 (rs6000_legitimate_offset_address_p): Likewise.
1061 (legitimate_lo_sum_address_p): Likewise.
1062 (rs6000_legitimize_address): Likewise.
1063 (rs6000_legitimize_reload_address): Likewise.
1064 (rs6000_secondary_reload_inner): Likewise.
1065 (rs6000_preferred_reload_class): Likewise.
1066 (rs6000_output_move_128bit): Likewise.
1067
1068 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
1069
1070 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1071 Generate SImode target register for null target.
1072 <case IX86_BUILTIN_XGETBV>: Ditto.
1073 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1074 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1075
1076 2018-05-10 Carl Love <cel@us.ibm.com>
1077
1078 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1079 dcbtt and dcbtstt if operands[2] is 0.
1080
1081 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
1082
1083 PR target/85693
1084 * config/i386/sse.md (usadv64qi): New expander.
1085
1086 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
1087
1088 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1089 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1090 -maltivec=be support.
1091 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1092 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1093 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1094 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1095 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1096 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1097 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1098 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1099 altivec_vsumsws): Adjust.
1100 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1101 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1102 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1103 support.
1104 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1105 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1106 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1107 (altivec_lve<VI_char>x): Delete expand.
1108 (*altivec_lve<VI_char>x_internal): Rename to...
1109 (altivec_lve<VI_char>x): ... this.
1110 (altivec_lvxl_<mode>): Delete expand.
1111 (*altivec_lvxl_<mode>_internal): Rename to ...
1112 (altivec_lvxl_<mode>): ... this.
1113 (altivec_stvxl_<mode>): Delete expand.
1114 (*altivec_stvxl_<mode>_internal): Rename to ...
1115 (altivec_stvxl_<mode>): ... this.
1116 (altivec_stve<VI_char>x): Delete expand.
1117 (*altivec_stve<VI_char>x_internal): Rename to ...
1118 (altivec_stve<VI_char>x): ... this.
1119 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1120 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1121 reduc_plus_scal_<mode>): Adjust.
1122 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1123 comment.
1124 (rs6000_cpu_cpp_builtins): Adjust.
1125 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1126 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1127 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1128 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1129 -maltivec=be support.
1130 (rs6000_split_vec_extract_var): Adjust.
1131 (rs6000_split_v4si_init): Adjust.
1132 (swap_selector_for_mode): Delete.
1133 (altivec_expand_lvx_be, altivec_expand_stvx_be,
1134 altivec_expand_stvex_be): Delete.
1135 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1136 -maltivec=be support.
1137 (rs6000_gimple_fold_builtin): Ditto.
1138 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1139 Adjust.
1140 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1141 (TARGET_DIRECT_MOVE_64BIT): Adjust.
1142 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1143 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1144 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1145 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1146 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1147 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1148 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1149 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1150 anonymous split): Adjust.
1151 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1152 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1153
1154 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1155
1156 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1157 when --with-gxx-include-dir is also specified.
1158 * configure: Regenerate.
1159
1160 2018-05-09 Jim Wilson <jimw@sifive.com>
1161
1162 PR target/84797
1163 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1164 * config/riscv/t-withmultilib: New.
1165 * config/riscv/withmultilib.h: New.
1166 * doc/install.texi: Document RISC-V --with-multilib-list support.
1167
1168 2018-05-09 Richard Biener <rguenther@suse.de>
1169
1170 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1171 vector.
1172 (vect_bb_vectorization_profitable_p): Adjust. Compute
1173 actual scalar cost using the cost vector and the add_stmt_cost
1174 machinery.
1175
1176 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1177
1178 PR rtl-optimization/85645
1179 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1180 in the REG_CFA_REGISTER note for LR, don't leave it empty.
1181
1182 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1183
1184 PR rtl-optimization/85645
1185 * shrink-wrap.c (spread_components): Return a boolean saying if
1186 anything was changed.
1187 (try_shrink_wrapping_separate): Iterate spread_components until
1188 nothing changes anymore.
1189
1190 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1191
1192 PR rtl-optimization/85645
1193 * regrename.c (build_def_use): Also kill the chains that include the
1194 destination of a REG_CFA_REGISTER note.
1195
1196 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1197
1198 PR rtl-optimization/85645
1199 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
1200 insn that has a REG_CFA_REGISTER note.
1201
1202 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
1203
1204 * cfgexpand.c (expand_clobber): New function.
1205 (expand_gimple_stmt_1): Use it.
1206 * tree-vect-stmts.c (vect_clobber_variable): New function,
1207 split out from...
1208 (vectorizable_simd_clone_call): ...here.
1209 (vectorizable_store): Emit a clobber either side of an
1210 IFN_STORE_LANES sequence.
1211 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
1212
1213 2018-05-09 Tom de Vries <tom@codesourcery.com>
1214
1215 PR target/85626
1216 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
1217 (define_insn "trap_if_false"): Add exit after trap.
1218
1219 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
1220
1221 PR rtl-optimization/85638
1222 * bb-reorder.c: Include common/common-target.h.
1223 (create_forwarder_block): New function extracted from...
1224 (fix_up_crossing_landing_pad): ...here. Rename into...
1225 (dw2_fix_up_crossing_landing_pad): ...this.
1226 (sjlj_fix_up_crossing_landing_pad): New function.
1227 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
1228 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
1229 from both partitions and exit the loop after one iteration.
1230
1231 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
1232
1233 Revert:
1234 * doc/extend.texi (PowerPC Built-in Functions): Rename this
1235 subsection.
1236 (Basic PowerPC Built-in Functions): The new name of the
1237 subsection previously known as "PowerPC Built-in Functions".
1238 (Basic PowerPC Built-in Functions Available on all Configurations):
1239 New subsubsection.
1240 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1241 subsubsection.
1242 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1243 subsubsection.
1244 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1245 subsubsection.
1246 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1247 subsubsection.
1248
1249 2018-05-08 Jim Wilson <jimw@sifive.com>
1250
1251 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
1252 (LD_EMUL_SUFFIX): New.
1253 (LINK_SPEC): Use it.
1254
1255 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
1256
1257 * doc/extend.texi (PowerPC Built-in Functions): Rename this
1258 subsection.
1259 (Basic PowerPC Built-in Functions): The new name of the
1260 subsection previously known as "PowerPC Built-in Functions".
1261 (Basic PowerPC Built-in Functions Available on all Configurations):
1262 New subsubsection.
1263 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1264 subsubsection.
1265 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1266 subsubsection.
1267 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1268 subsubsection.
1269 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1270 subsubsection.
1271
1272 2018-05-08 Jakub Jelinek <jakub@redhat.com>
1273
1274 PR target/85683
1275 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
1276 after cmpelim optimization.
1277
1278 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
1279
1280 * config.gcc: Support "goldmont".
1281 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
1282 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1283 PROCESSOR_GOLDMONT.
1284 * config/i386/i386.c (m_GOLDMONT): Define.
1285 (processor_target_table): Add "goldmont".
1286 (PTA_GOLDMONT): Define.
1287 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
1288 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
1289 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
1290 (fold_builtin_cpu): Add "goldmont".
1291 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
1292 (ix86_option_override_internal): Add "goldmont".
1293 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
1294 (processor_type): Add PROCESSOR_GOLDMONT.
1295 * config/i386/i386.md: Add CPU "glm".
1296 * config/i386/glm.md: New file.
1297 * config/i386/x86-tune.def: Add m_GOLDMONT.
1298 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
1299
1300 2018-05-08 Jakub Jelinek <jakub@redhat.com>
1301
1302 PR target/85572
1303 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
1304 E_V4DImode.
1305 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
1306 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
1307 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
1308
1309 PR target/85317
1310 * config/i386/i386.c (ix86_fold_builtin): Handle
1311 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
1312
1313 PR target/85480
1314 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
1315 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
1316
1317 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
1318
1319 PR target/85658
1320 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
1321 (check_arch): Likewise.
1322 (check_fpu): Return the result rather than printing it.
1323 (end arch): Fix operator precedence.
1324 (end cpu): Likewise.
1325 (END): Print the result from check_fpu.
1326
1327 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1328 Alan Hayward <alan.hayward@arm.com>
1329 David Sherwood <david.sherwood@arm.com>
1330
1331 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
1332 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
1333 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
1334 (*fcmuo<mode>_and): New patterns.
1335
1336 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1337
1338 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
1339 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
1340 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
1341 (cmp_op, sve_imm_con): New code attributes.
1342 (SVE_COND_INT_CMP, imm_con): Delete.
1343 (cmp_op): Remove above unspecs from int attribute.
1344 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
1345 to...
1346 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
1347 comparison-specific unspecs.
1348 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
1349 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
1350 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
1351 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
1352 (*vec_fcm<cmp_op><mode>): Rename to...
1353 (*fcm<cmp_op><mode>): ...this and adjust likewise.
1354 (*vec_fcmuo<mode>): Rename to...
1355 (*fcmuo<mode>): ...this and adjust likewise.
1356 (*pred_fcm<cmp_op><mode>): New pattern.
1357 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1358 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1359 functions.
1360 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1361 and UNORDERED.
1362 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1363 (aarch64_emit_sve_predicated_cond): New function.
1364 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1365 (aarch64_emit_unspec_cond_or): Replace with...
1366 (aarch64_emit_sve_or_conds): ...this new function. Use
1367 aarch64_emit_sve_ptrue_op for the individual comparisons and
1368 aarch64_emit_binop to OR them together.
1369 (aarch64_emit_inverted_unspec_cond): Replace with...
1370 (aarch64_emit_sve_inverted_cond): ...this new function. Use
1371 aarch64_emit_sve_ptrue_op for the comparison and
1372 aarch64_emit_unop to invert the result.
1373 (aarch64_expand_sve_vec_cmp_float): Update after the above
1374 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
1375
1376 2018-05-07 Nathan Sidwell <nathan@acm.org>
1377
1378 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1379 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1380 (Backwards Compatibility): Likewise.
1381
1382 2018-05-07 Luis Machado <luis.machado@linaro.org>
1383
1384 PR bootstrap/85681
1385 Revert:
1386 2018-05-07 Luis Machado <luis.machado@linaro.org>
1387
1388 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1389 <prefetch_dynamic_strides>: New const bool field.
1390 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1391 prefetch_dynamic_strides.
1392 (exynosm1_prefetch_tune): Likewise.
1393 (thunderxt88_prefetch_tune): Likewise.
1394 (thunderx_prefetch_tune): Likewise.
1395 (thunderx2t99_prefetch_tune): Likewise.
1396 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1397 (aarch64_override_options_internal): Update to set
1398 PARAM_PREFETCH_DYNAMIC_STRIDES.
1399 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1400 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1401 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1402 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1403 prefetch-dynamic-strides setting.
1404
1405 2018-05-07 Luis Machado <luis.machado@linaro.org>
1406
1407 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1408 <minimum_stride>: New const int field.
1409 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1410 minimum_stride field.
1411 (exynosm1_prefetch_tune): Likewise.
1412 (thunderxt88_prefetch_tune): Likewise.
1413 (thunderx_prefetch_tune): Likewise.
1414 (thunderx2t99_prefetch_tune): Likewise.
1415 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1416 (aarch64_override_options_internal): Update to set
1417 PARAM_PREFETCH_MINIMUM_STRIDE.
1418 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1419 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1420 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1421 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1422 stride is constant and is below the minimum stride threshold.
1423
1424 2018-05-07 Luis Machado <luis.machado@linaro.org>
1425
1426 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
1427 to 512.
1428
1429 2018-05-07 Luis Machado <luis.machado@linaro.org>
1430
1431 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1432 <prefetch_dynamic_strides>: New const bool field.
1433 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1434 prefetch_dynamic_strides.
1435 (exynosm1_prefetch_tune): Likewise.
1436 (thunderxt88_prefetch_tune): Likewise.
1437 (thunderx_prefetch_tune): Likewise.
1438 (thunderx2t99_prefetch_tune): Likewise.
1439 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1440 (aarch64_override_options_internal): Update to set
1441 PARAM_PREFETCH_DYNAMIC_STRIDES.
1442 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1443 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1444 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1445 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1446 prefetch-dynamic-strides setting.
1447
1448 2018-05-07 Luis Machado <luis.machado@linaro.org>
1449
1450 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1451 <minimum_stride>: New const int field.
1452 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1453 minimum_stride field.
1454 (exynosm1_prefetch_tune): Likewise.
1455 (thunderxt88_prefetch_tune): Likewise.
1456 (thunderx_prefetch_tune): Likewise.
1457 (thunderx2t99_prefetch_tune): Likewise.
1458 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1459 (aarch64_override_options_internal): Update to set
1460 PARAM_PREFETCH_MINIMUM_STRIDE.
1461 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1462 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1463 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1464 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1465 stride is constant and is below the minimum stride threshold.
1466
1467 2018-05-06 Jakub Jelinek <jakub@redhat.com>
1468
1469 PR c++/85659
1470 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
1471 the type is addressable. Don't force op into register if it has
1472 BLKmode.
1473
1474 2018-05-05 Roland McGrath <mcgrathr@google.com>
1475
1476 PR other/77609
1477 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
1478 any section for which we don't know a specific type it should have,
1479 regardless of name. Previously this was done only for the exact
1480 names ".init_array", ".fini_array", and ".preinit_array".
1481 (default_elf_asm_named_section): Add comment about
1482 relationship with default_section_type_flags and SECTION_NOTYPE.
1483 (get_section): Don't consider it a type conflict if one side has
1484 SECTION_NOTYPE and the other doesn't, as long as neither has the
1485 SECTION_BSS et al used in the default_section_type_flags logic.
1486
1487 2018-05-05 Tom de Vries <tom@codesourcery.com>
1488
1489 PR target/85653
1490 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
1491 (workaround_barsyncs): New function.
1492 (nvptx_reorg): Use workaround_barsyncs.
1493 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
1494 (define_expand "nvptx_membar_cta"): New define_expand.
1495 (define_insn "*nvptx_membar_cta"): New insn.
1496
1497 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
1498
1499 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
1500 To improve optimization opportunities.
1501 * builtin-types.def: The new needed builtin types for the above.
1502
1503 2018-05-04 Richard Biener <rguenther@suse.de>
1504
1505 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
1506 * gimple-ssa-store-merging.c
1507 (imm_store_chain_info::output_merged_store): Remove redundant create,
1508 release split_store vector contents on failure.
1509 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
1510 scalar stmt vector on cache hit.
1511
1512 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
1513
1514 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
1515 Xilinx FP support.
1516 * config.gcc (powerpc-xilinx-eabi*): Remove.
1517 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
1518 support.
1519 (fusion_addis_mem_combo_load): Ditto.
1520 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
1521 FP support.
1522 (rs6000_cpu_cpp_builtins): Ditto.
1523 * config/rs6000/rs6000-linux.c
1524 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
1525 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
1526 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
1527 support.
1528 (rs6000_setup_reg_addr_masks): Ditto.
1529 (rs6000_init_hard_regno_mode_ok): Ditto.
1530 (rs6000_option_override_internal): Ditto.
1531 (legitimate_lo_sum_address_p): Ditto.
1532 (rs6000_legitimize_address): Ditto.
1533 (rs6000_legitimize_reload_address): Ditto.
1534 (rs6000_legitimate_address_p): Ditto.
1535 (abi_v4_pass_in_fpr): Ditto.
1536 (setup_incoming_varargs): Ditto.
1537 (rs6000_gimplify_va_arg): Ditto.
1538 (rs6000_split_multireg_move): Ditto.
1539 (rs6000_savres_strategy): Ditto.
1540 (rs6000_emit_prologue_components): Ditto.
1541 (rs6000_emit_epilogue_components): Ditto.
1542 (rs6000_emit_prologue): Ditto.
1543 (rs6000_emit_epilogue): Ditto.
1544 (rs6000_elf_file_end): Ditto.
1545 (rs6000_function_value): Ditto.
1546 (rs6000_libcall_value): Ditto.
1547 * config/rs6000/rs6000.h: Ditto.
1548 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
1549 (TARGET_MINMAX): ... this. New.
1550 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
1551 * config/rs6000/rs6000.md: Remove Xilinx FP support.
1552 (*movsi_internal1_single): Delete.
1553 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
1554 mfpu=, mxilinx-fpu): Delete.
1555 * config/rs6000/singlefp.h: Delete.
1556 * config/rs6000/sysv4.h: Remove Xilinx FP support.
1557 * config/rs6000/t-rs6000: Ditto.
1558 * config/rs6000/t-xilinx: Delete.
1559 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
1560 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
1561 (VStype_simple): Delete.
1562 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
1563 * config/rs6000/xfpu.h: Delete.
1564 * config/rs6000/xfpu.md: Delete.
1565 * config/rs6000/xilinx.h: Delete.
1566 * config/rs6000/xilinx.opt: Delete.
1567 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
1568 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
1569
1570 2018-05-04 Tom de Vries <tom@codesourcery.com>
1571
1572 PR libgomp/85639
1573 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
1574 if ignore == 0.
1575
1576 2018-05-04 Richard Biener <rguenther@suse.de>
1577
1578 PR middle-end/85627
1579 * tree-complex.c (update_complex_assignment): We are always in SSA form.
1580 (expand_complex_div_wide): Likewise.
1581 (expand_complex_operations_1): Likewise.
1582 (expand_complex_libcall): Preserve EH info of the original stmt.
1583 (tree_lower_complex): Handle removed blocks.
1584 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
1585 on complex multiplication and division libcall builtins.
1586
1587 2018-05-04 Richard Biener <rguenther@suse.de>
1588
1589 PR middle-end/85574
1590 * fold-const.c (negate_expr_p): Restrict negation of operand
1591 zero of a division to when we know that can happen without
1592 overflow.
1593 (fold_negate_expr_1): Likewise.
1594
1595 2018-05-04 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR libstdc++/85466
1598 * real.h (real_nextafter): Declare.
1599 * real.c (real_nextafter): New function.
1600 * fold-const-call.c (fold_const_nextafter): New function.
1601 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
1602 CASE_CFN_NEXTTOWARD.
1603 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
1604 even when arg1_mode is different from arg0_mode.
1605
1606 2018-05-03 Nathan Sidwell <nathan@acm.org>
1607
1608 * doc/extend.texi (Deprecated Features): Remove
1609 -ffriend-injection.
1610 (Backwards Compatibility): Likewise.
1611 * doc/invoke.texi (C++ Language Options): Likewise.
1612 (C++ Dialect Options): Likewise.
1613
1614 2018-05-03 Jakub Jelinek <jakub@redhat.com>
1615
1616 PR target/85530
1617 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
1618 _mm512_mask_mullox_epi64): New intrinsics.
1619
1620 2018-05-03 Tom de Vries <tom@codesourcery.com>
1621
1622 PR testsuite/85106
1623 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1624 dump files): Add offload-tree.
1625
1626 2018-05-03 Richard Biener <rguenther@suse.de>
1627
1628 PR tree-optimization/85615
1629 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
1630 to loops not nested in BBs loop father to avoid creating multi-entry
1631 loops.
1632
1633 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1634
1635 PR tree-optimization/70291
1636 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
1637 arguments. Change return type to tree. Emit libcall as a new
1638 statement rather than replacing existing one when inplace_p is true.
1639 (expand_complex_multiplication_components): New function.
1640 (expand_complex_multiplication): Expand floating-point complex
1641 multiplication using the above.
1642 (expand_complex_division): Rename inner_type parameter to type.
1643 Update expand_complex_libcall call-site.
1644 (expand_complex_operations_1): Update expand_complex_multiplication
1645 and expand_complex_division call-sites.
1646
1647 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1648
1649 PR target/85582
1650 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1651 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1652 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
1653 the highest significant bit of the shift count mask is clear. In
1654 check whether and[sq]i3 is needed verify that all significant bits
1655 of the shift count other than the highest are set.
1656
1657 2018-05-02 Tom de Vries <tom@codesourcery.com>
1658
1659 PR libgomp/82428
1660 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
1661 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
1662 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
1663 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
1664 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
1665 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
1666 __builtin_goacc_parlevel_size.
1667
1668 2018-05-02 Richard Biener <rguenther@suse.de>
1669
1670 PR tree-optimization/85597
1671 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
1672 do not use split vect_get_vec_defs call but call vect_get_slp_defs
1673 directly.
1674
1675 2018-05-02 Tom de Vries <tom@codesourcery.com>
1676
1677 PR testsuite/85106
1678 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1679 dump files): Add ltrans-tree.
1680
1681 2018-05-02 Tom de Vries <tom@codesourcery.com>
1682
1683 PR testsuite/85106
1684 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1685 dump files): Add wpa-ipa.
1686
1687 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
1688
1689 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
1690 powerpc*-*-linux*paired* target.
1691 * config/rs6000/750cl.h: Delete.
1692 * config/rs6000/paired.h: Delete.
1693 * config/rs6000/paired.md: Delete.
1694 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
1695 float support.
1696 * config/rs6000/rs6000-builtin.def: Remove paired float support.
1697 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
1698 comment. Remove paired float support.
1699 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
1700 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1701 VECTOR_PAIRED.
1702 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
1703 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
1704 declarations.
1705 * config/rs6000/rs6000.c: Remove paired float support.
1706 (paired_expand_vector_init, paired_expand_vector_move,
1707 paired_emit_vector_compare, paired_emit_vector_cond_expr,
1708 (paired_expand_lv_builtin, paired_expand_stv_builtin,
1709 paired_expand_builtin, paired_expand_predicate_builtin,
1710 paired_init_builtins): Delete.
1711 * config/rs6000/rs6000.h: Remove paired float support.
1712 * config/rs6000/rs6000.md: Remove paired float support.
1713 (move_from_CR_ov_bit): Delete.
1714 * config/rs6000/rs6000.opt (mpaired): Delete.
1715 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
1716 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
1717
1718 2018-05-02 Richard Biener <rguenther@suse.de>
1719
1720 PR middle-end/85567
1721 * gimplify.c (gimplify_save_expr): When in SSA form allow
1722 SAVE_EXPRs to compute to SSA vars.
1723
1724 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR target/85582
1727 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1728 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1729 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
1730 clobber operands[2], instead use a new pseudo. Formatting fixes.
1731
1732 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
1733
1734 PR tree-optimization/85586
1735 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
1736 exit early for statements in the same group if the accesses are
1737 not strided.
1738
1739 2018-05-02 Tom de Vries <tom@codesourcery.com>
1740
1741 PR lto/85451
1742 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
1743 error message.
1744
1745 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
1746
1747 PR tree-optimization/85143
1748 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
1749
1750 2018-05-01 Tom de Vries <tom@codesourcery.com>
1751
1752 PR lto/85451
1753 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
1754 not found" error message.
1755
1756 2018-05-01 Tom de Vries <tom@codesourcery.com>
1757
1758 PR other/83786
1759 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
1760 * vec.c (test_ordered_remove_if): New function.
1761 (vec_c_tests): Call test_ordered_remove_if.
1762 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
1763 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
1764 * tree-vect-patterns.c (vect_pattern_recog_1): Use
1765 VEC_ORDERED_REMOVE_IF.
1766
1767 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1768
1769 PR tree-optimization/82665
1770 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
1771 pointer subtraction where arguments come from a memchr call.
1772
1773 2018-05-01 Jakub Jelinek <jakub@redhat.com>
1774
1775 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
1776 --push-state --as-needed and --pop-state instead of --as-needed and
1777 --no-as-needed if ld supports it.
1778 * configure: Regenerated.
1779
1780 PR web/85578
1781 * doc/install.texi2html: Replace _002d with - and _002a with * in
1782 generated html files using sed.
1783
1784 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1785
1786 PR c++/85523
1787 * gcc-rich-location.c (blank_line_before_p): New function.
1788 (use_new_line): New function.
1789 (gcc_rich_location::add_fixit_insert_formatted): New function.
1790 * gcc-rich-location.h
1791 (gcc_rich_location::add_fixit_insert_formatted): New function.
1792
1793 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1794
1795 * selftest.c (assert_streq): Rename "expected" and "actual" to
1796 "val1" and "val2". Extend NULL-handling to cover both inputs
1797 symmetrically, while still requiring both to be non-NULL for a pass.
1798 * selftest.h (assert_streq): Rename "expected" and "actual" to
1799 "val1" and "val2".
1800 (ASSERT_EQ): Likewise.
1801 (ASSERT_EQ_AT): Likewise.
1802 (ASSERT_KNOWN_EQ): Likewise.
1803 (ASSERT_KNOWN_EQ_AT): Likewise.
1804 (ASSERT_NE): Likewise.
1805 (ASSERT_MAYBE_NE): Likewise.
1806 (ASSERT_MAYBE_NE_AT): Likewise.
1807 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
1808 the assertion to pass.
1809 (ASSERT_STREQ_AT): Likewise.
1810
1811 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1812
1813 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
1814 interaction with -pie.
1815
1816 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1817
1818 * selftest.h: Fix alphabetization of per-source-file selftest
1819 declarations.
1820
1821 2018-04-30 Jason Merrill <jason@redhat.com>
1822
1823 PR c++/61982 - dead stores to destroyed objects.
1824 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
1825 of clobber.
1826
1827 2018-04-30 Jason Merrill <jason@redhat.com>
1828
1829 * tree.c (build_clobber): New.
1830 * tree.h: Declare it.
1831 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
1832
1833 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1834
1835 * diagnostic-show-locus.c (layout::layout): Update for
1836 location_get_source_line returning a char_span.
1837 (struct char_span): Move to input.h.
1838 (struct correction): Update for fields in char_span becoming
1839 private.
1840 (struct source_line): Update for location_get_source_line
1841 returning a char_span.
1842 (layout::print_line): Likewise.
1843 * edit-context.c (edited_file::print_content): Likewise.
1844 (edited_file::print_diff_hunk): Likewise.
1845 (edited_file::print_run_of_changed_lines): Likewise.
1846 (edited_file::get_num_lines): Likewise.
1847 (edited_line::edited_line): Likewise.
1848 * final.c (asm_show_source): Likewise.
1849 * input.c (location_get_source_line): Convert return type
1850 from const char * to char_span, losing the final "line_len"
1851 param.
1852 (dump_location_info): Update for the above.
1853 (get_substring_ranges_for_loc): Likewise. Use a char_span
1854 when handling the literal within the line.
1855 (test_reading_source_line): Update for location_get_source_line
1856 returning a char_span.
1857 * input.h (class char_span): Move here from
1858 diagnostic-show-locus.c, converting from a struct to a class.
1859 Make data members private.
1860 (char_span::operator bool): New.
1861 (char_span::length): New.
1862 (char_span::get_buffer): New.
1863 (char_span::operator[]): New.
1864 (char_span::subspan): Make const.
1865 (char_span::xstrdup): New.
1866 (location_get_source_line): Convert return type from const char *
1867 to char_span, losing the final "line_size" param.
1868
1869 2018-04-30 Jan Hubicka <jh@suse.cz>
1870
1871 * lto-wrapper.c (ltrans_priorities): New static var.
1872 (cmp_priority): New.
1873 (run_gcc): Read priorities and if doing parallel build order
1874 the Makefile by them.
1875
1876 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1877
1878 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
1879
1880 2018-04-30 Richard Biener <rguenther@suse.de>
1881
1882 * tree-cfg.c (verify_address): Remove base argument, add
1883 flag whether to check TREE_ADDRESSABLE and do that.
1884 (verify_expr): Remove.
1885 (verify_types_in_gimple_reference): Add pieces from verify_expr.
1886 (verify_gimple_assign_single): Likewise.
1887 (verify_gimple_switch): Likewise.
1888 (verify_expr_location_1): Dereference tp once. Add (disabled)
1889 piece from verify_expr.
1890 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
1891
1892 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1893
1894 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
1895
1896 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1897
1898 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
1899 (small_data_pattern): Likewise.
1900 (arc_rewrite_small_data): Likewise.
1901 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
1902 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
1903 (get_symbol_alignment): New function.
1904 (legitimate_small_data_address_p): Likewise.
1905 (legitimate_scaled_address): Update, call
1906 legitimate_small_data_address_p.
1907 (output_sdata): New static variable.
1908 (arc_print_operand): Update how we handle small data operands.
1909 (arc_print_operand_address): Likewise.
1910 (arc_legitimate_address_p): Update, use
1911 legitimate_small_data_address_p.
1912 (arc_rewrite_small_data_p): Remove.
1913 (arc_rewrite_small_data_1): Likewise.
1914 (arc_rewrite_small_data): Likewise.
1915 (small_data_pattern): Likewise.
1916 (compact_sda_memory_operand): Update to use
1917 legitimate_small_data_address_p and get_symbol_alignment.
1918 (prepare_move_operands): Don't rewite sdata pattern.
1919 (prepare_extend_operands): Remove.
1920 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
1921 pattern.
1922 (zero_extendqisi2): Likewise.
1923 (zero_extendhisi2): Likewise.
1924 (extendqihi2): Likewise.
1925 (extendqisi2): Likewise.
1926 (extendhisi2): Likewise.
1927 (addsi3): Likewise.
1928 (subsi3): Likewise.
1929 (andsi3): Likewise.
1930 * config/arc/constraints.md (Usd): Change it to memory constraint.
1931
1932 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1933
1934 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
1935 as source of std instructions.
1936 * config/arc/arc.md (movsi_insn): Update pattern predicate to
1937 allow 6-bit constants as source for store instructions.
1938 (movdi_insn): Update instruction pattern to allow 6-bit constants
1939 as source for store instructions.
1940
1941 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1942
1943 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
1944
1945 2018-04-30 Nathan Sidwell <nathan@acm.org>
1946 Sandra Loosemore <sandra@codesourcery.com>
1947
1948 * dumpfile.c (dump_open): Allow '-' for stdout.
1949 * doc/invoke.texi (Developer Options): Document dump filename
1950 determination early. Document stdin/stdout selection.
1951
1952 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
1953
1954 Microblaze Target: PIC data text relative
1955
1956 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
1957 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
1958 Add declaration.
1959 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
1960 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
1961 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
1962 New addressing mode for data-text relative position indepenedent code.
1963 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
1964 'ADDRESS_SYMBOLIC_TXT_REL'.
1965 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
1966 (microblaze_legitimate_pic_operand): Exclude function calls from
1967 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
1968 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
1969 addresses cases.
1970 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1971 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1972 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
1973 for 'address + offset'.
1974 (microblaze_expand_prologue): Add new function prologue call for
1975 'r20' assignation.
1976 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
1977 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
1978 table in case of TARGET_PIC_DATA_TEXT_REL.
1979 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
1980 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
1981 Add new macros 'UNSPEC_TEXT',
1982 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
1983 + exclude function calls from 'UNSPEC_PLT' in case of data text
1984 relative mode.
1985 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1986 new target hook for generating address diff vector tables in case of
1987 flag_pic.
1988 * doc/tm.texi : Regenerate.
1989 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
1990 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
1991 of addr diff vector generation.
1992 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1993 target hook definition.
1994 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
1995 Add default function for generate_pic_addr_diff_vec -> flag_pic.
1996 * doc/invoke.texi (Add new pic option): Add new microblaze pic
1997 option for data text relative.
1998
1999 2018-04-30 Richard Biener <rguenther@suse.de>
2000
2001 * tree-chrec.h (evolution_function_is_constant_p): Remove
2002 redundant check.
2003 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2004
2005 2018-04-30 Richard Biener <rguenther@suse.de>
2006
2007 PR bootstrap/85571
2008 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2009
2010 2018-04-30 Richard Biener <rguenther@suse.de>
2011
2012 PR tree-optimization/28364
2013 PR tree-optimization/85275
2014 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2015 copying first exit test.
2016
2017 2018-04-28 Mark Wielaard <mark@klomp.org>
2018
2019 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2020 dwarf_version >= 5.
2021 (dwarf_AT): Handle DW_AT_addr_base.
2022 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2023
2024 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
2025
2026 PR target/84431
2027 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2028 (*ashl<dwi>3_doubleword_mask_1): Ditto.
2029 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2030 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2031
2032 2018-04-28 Richard Biener <rguenther@suse.de>
2033
2034 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2035 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2036 to reflect use. Only add interesting stmts.
2037
2038 2018-04-27 Martin Jambor <mjambor@suse.cz>
2039
2040 PR ipa/85549
2041 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2042 the jump function allows for passing through aggregate values.
2043
2044 2018-04-27 David Malcolm <dmalcolm@redhat.com>
2045
2046 * input.h (in_system_header_at): Convert from macro to inline
2047 function.
2048 (from_macro_expansion_at): Likewise.
2049 (from_macro_definition_at): Likewise.
2050
2051 2018-04-27 Jeff Law <law@redhat.com>
2052
2053 * config.gcc: Mark tile* targets as deprecated/obsolete.
2054
2055 2018-04-27 Richard Biener <rguenther@suse.de>
2056
2057 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2058 fix for ILP32.
2059
2060 2018-04-27 Richard Biener <rguenther@suse.de>
2061
2062 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2063
2064 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
2065
2066 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2067 with Yd constraint. Set "preferred_for_speed" attribute from
2068 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2069 with Yd constraint.
2070 (*movdi_internal): Ditto.
2071 (movti_interunit splitters): Remove
2072 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2073 (movdi_interunit splitters): Ditto.
2074 * config/i386/constraints.md (Ye): Remove.
2075 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2076
2077 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2078
2079 PR target/85512
2080 * config/aarch64/constraints.md (Usg): Limit to 31.
2081 (Usj): Limit to 63.
2082
2083 2018-04-27 Jakub Jelinek <jakub@redhat.com>
2084
2085 PR tree-optimization/85529
2086 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2087 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2088 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2089 zero extension or masking of the MSB bit.
2090 (optimize_range_tests): Add FIRST_BB argument, pass it through
2091 to optimize_range_tests_var_bound.
2092 (maybe_optimize_range_tests, reassociate_bb): Adjust
2093 optimize_range_tests callers.
2094
2095 2018-04-26 Richard Biener <rguenther@suse.de>
2096 Jakub Jelinek <jakub@redhat.com>
2097
2098 * cgraph.h (symbol_table): Just declare debug method here.
2099 * symtab.c (symbol_table::debug): Define.
2100
2101 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2104
2105 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
2106
2107 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2108 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2109 (*movdi_internal): Substitute Yi and Yj constraint with x
2110 and Ym and Yn constraint with y constraint. Update "isa"
2111 attribute and set "preferred_for_speed" attribute from
2112 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2113 (*movsi_internal): Ditto.
2114 (*movdf_internal): Ditto.
2115 (*movsf_internal): Ditto.
2116 (*zero_extendsidi2): Ditto.
2117 * config/i386/sse.md (vec_set<mode>_0): Ditto.
2118 (sse2_loadld): Ditto.
2119 (*vec_extract<ssevecmodelower>_0): Ditto.
2120 (*vec_extractv4si_0_zext_sse4): Ditto.
2121 (vec_concatv2di): Ditto.
2122 (*vec_dup<mode>): Ditto.
2123 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2124 * config/i386/constraints.md (Yi): Remove.
2125 (Yj): Remove.
2126 (Ym): Remove.
2127 (Yn): Remove.
2128
2129 2018-04-26 Nathan Sidwell <nathan@acm.org>
2130
2131 * dumpfile.c (dump_open): New.
2132 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2133 (dump_finish): Detect stdio/stderr by value not name.
2134
2135 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
2136
2137 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2138
2139 2018-04-26 Tom de Vries <tom@codesourcery.com>
2140
2141 PR target/84952
2142 * config/nvptx/nvptx.c (verify_neutering_jumps)
2143 (verify_neutering_labels): New function
2144 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2145
2146 2018-04-26 Tom de Vries <tom@codesourcery.com>
2147
2148 PR target/84025
2149 * config/nvptx/nvptx.c (needs_neutering_p): New function.
2150 (nvptx_single): Use needs_neutering_p to skip over insns that do not
2151 need neutering.
2152
2153 2018-04-26 Richard Biener <rguenther@suse.de>
2154 Tom de Vries <tom@codesourcery.com>
2155
2156 PR lto/85422
2157 * lto-streamer-out.c (output_function): Fixup loops if required to match
2158 discovery done in the reader.
2159
2160 2018-04-26 Richard Biener <rguenther@suse.de>
2161
2162 PR tree-optimization/85116
2163 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2164 have a loop exit from the single latch predecessor. Remove
2165 case of header with just condition.
2166 (ch_base::copy_headers): Exclude infinite loops from any
2167 processing.
2168 (pass_ch::execute): Record exits.
2169
2170 2018-04-26 Richard Biener <rguenther@suse.de>
2171
2172 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2173 prologue cost vector and pass it to vect_get_load_cost.
2174 (vect_get_peeling_costs_all_drs): Likewise.
2175 (vect_peeling_hash_get_lowest_cost): Likewise.
2176 (vect_enhance_data_refs_alignment): Likewise.
2177
2178 2018-04-26 Richard Biener <rguenther@suse.de>
2179
2180 PR middle-end/85450
2181 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2182 checking of integer<->pointer conversions.
2183 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2184 sign-/zero-extending pointer types.
2185 (expand_omp_for_static_chunk): Likewise.
2186
2187 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
2188 Jean Lee <xiaoyur347@gmail.com>
2189
2190 * config/mips/mips.c (mips_asan_shadow_offset): New function.
2191 (TARGET_ASAN_SHADOW_OFFSET): Define.
2192 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2193 true for -fsanitize=address.
2194
2195 2018-04-25 Mark Wielaard <mark@klomp.org>
2196
2197 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
2198 shorter ones.
2199
2200 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2201
2202 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
2203 than "alu", remove explicit "memory" and "imm_disp" attributes.
2204 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
2205
2206 PR middle-end/85414
2207 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
2208 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
2209 gen_lowpart_no_emit.
2210
2211 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
2212
2213 PR target/85473
2214 * config/i386/i386.c (ix86_expand_builtin): Change memory
2215 operand to XI, extend p0 to Pmode.
2216 * config/i386/i386.md: Change unspec volatile and operand
2217 1 mode to XI, change operand 0 mode to P.
2218
2219 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2220
2221 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
2222 GET_MODE_MASK before any checking.
2223 (nds32_can_use_bset_p): Likewise.
2224 (nds32_can_use_btgl_p): Likewise.
2225
2226 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2227
2228 * config/nds32/nds32-doubleword.md: New define_split pattern for
2229 illegal register number.
2230
2231 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2232
2233 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2234
2235 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2236
2237 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2238
2239 2018-04-25 Richard Biener <rguenther@suse.de>
2240
2241 * lto-streamer.h (LTO_major_version): Bump to 8.
2242
2243 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2244
2245 * BASE-VER: Set to 9.0.0.
2246
2247 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
2248
2249 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
2250 in __abskf2 and __powikf2.
2251
2252 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2253
2254 PR target/85512
2255 * config/aarch64/constraints.md (Usg, Usj): New constraints.
2256 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
2257 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
2258 Use the above on operand 2. Reindent.
2259 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2260
2261 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2262
2263 PR target/85485
2264 * common/config/i386/i386-common.c (ix86_handle_option): Don't
2265 handle OPT_mcet.
2266 * config/i386/i386.opt (mcet): Removed.
2267 * doc/install.texi: Remove -mcet documentation.
2268 * doc/invoke.texi: Likewise.
2269
2270 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2271
2272 PR target/85485
2273 * doc/install.texi: Remove -mcet from bootstrap-cet.
2274
2275 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2276
2277 PR target/85511
2278 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
2279 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
2280 if TARGET_64BIT.
2281
2282 PR target/85503
2283 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
2284 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
2285 containing a CONST_VECTOR.
2286
2287 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
2288
2289 * doc/install.texi: Update newlib dependency for nvptx.
2290
2291 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR target/85508
2294 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
2295 instead of INTVAL when shifting x left.
2296
2297 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
2298
2299 PR tree-optimization/85478
2300 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
2301 vect_grouped_store_supported for single element vectors.
2302
2303 2018-04-24 Richard Biener <rguenther@suse.de>
2304
2305 PR target/85491
2306 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2307 load cost increase to the case of non-constant step.
2308
2309 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR target/84828
2312 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
2313 destination if any_malformed_asm.
2314
2315 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
2316
2317 PR middle-end/85496
2318 * expr.c (store_field): In the bitfield case, if the value comes from
2319 a function call and is returned in registers by means of a PARALLEL,
2320 do not change the mode of the temporary unless BLKmode and VOIDmode.
2321
2322 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
2323
2324 PR rtl-optimization/85423
2325 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
2326 dependencies to debug insns when the previous insn is non-debug.
2327
2328 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2329
2330 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
2331 enums into a single definition.
2332 (fls): Fix predicates and printing.
2333 (seti): Likewise.
2334
2335 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2336
2337 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
2338 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
2339 and short u6 immediate.
2340 (check_if_valid_sleep_operand): Remove.
2341 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2342
2343 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2344
2345 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
2346 flag_always_save_lp condition.
2347 * config/nds32/nds32.opt (malways-save-lp): New option.
2348
2349 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2350
2351 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
2352 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2353 * config/nds32/nds32.h
2354 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2355 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2356
2357 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2358
2359 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2360 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2361
2362 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2363 Chung-Ju Wu <jasonwucj@gmail.com>
2364
2365 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2366 Declare.
2367 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2368 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2369
2370 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2371
2372 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2373
2374 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2375
2376 * config/nds32/nds32-protos.h (nds32_data_alignment,
2377 nds32_local_alignment): Declare.
2378 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2379 nds32_local_alignment): New functions.
2380 (TARGET_CONSTANT_ALIGNMENT): Define.
2381 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2382
2383 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2384
2385 * config/nds32/nds32.c
2386 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2387 (TARGET_MODES_TIEABLE_P): Likewise.
2388
2389 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2390
2391 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2392 level Ofast and Og.
2393
2394 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
2395 Chung-Ju Wu <jasonwucj@gmail.com>
2396
2397 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2398 for unaligned access.
2399 * config/nds32/nds32-intrinsic.c: Implementation of expanding
2400 unaligned access.
2401 * config/nds32/nds32-intrinsic.md: Likewise.
2402 * config/nds32/nds32_intrinsic.h: Likewise.
2403 * config/nds32/nds32.h (nds32_builtins): Likewise.
2404 * config/nds32/nds32.opt (munaligned-access): New option.
2405 * config/nds32/nds32.c (nds32_asm_file_start): Display
2406 flag_unaligned_access status.
2407
2408 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2409
2410 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
2411 -mno-relax is present.
2412 * config/riscv/linux.h (LINK_SPEC): Ditto.
2413
2414 2018-04-20 Martin Sebor <msebor@redhat.com>
2415
2416 PR c/85365
2417 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
2418 for null pointers.
2419 (gimple_fold_builtin_stxcpy_chk): Same.
2420 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2421
2422 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
2423
2424 PR target/85456
2425 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
2426 __powikf2 when long double is IEEE 128-bit.
2427
2428 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2429
2430 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
2431 step to make sure stack always aligned.
2432
2433 2018-04-20 Carl Love <cel@us.ibm.com>
2434
2435 PR target/83402
2436 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
2437 size check for arg0.
2438
2439 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
2440 Tom de Vries <tom@codesourcery.com>
2441
2442 PR target/85445
2443 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
2444 Emit insns for calls too.
2445 (nvptx_find_par): Always look for worker-level predecessor insn.
2446 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
2447 calls.
2448 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
2449 (nvptx_process_pars): Propagate frames for calls.
2450
2451 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
2452
2453 PR target/85469
2454 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
2455 Removed.
2456 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
2457 (ix86_handle_option): Don't handle OPT_mibt.
2458 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
2459 __SHSTK__.
2460 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
2461 has_ibt and ibt.
2462 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
2463 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
2464 (ix86_target_macros): Define __CET__ with flag_cf_protection
2465 for -fcf-protection.
2466 * config/i386/i386.c (isa2_opts): Remove -mibt.
2467 * config/i386/i386.h (TARGET_IBT): Removed.
2468 (TARGET_IBT_P): Likewise.
2469 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
2470 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
2471 * config/i386/i386.opt (mcet): Update help message.
2472 (mshstk): Likewise.
2473 (mibt): Removed.
2474 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
2475 -mcet as an alias for -mshstk.
2476
2477 2018-04-20 Richard Biener <rguenther@suse.de>
2478
2479 PR middle-end/85475
2480 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
2481 complexity by forcing a single use of the multiply operand.
2482
2483 2018-04-20 Martin Jambor <mjambor@suse.cz>
2484
2485 ipa/85449
2486 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
2487 recursion dependency to only apply to non-clones.
2488
2489 2018-04-20 Martin Jambor <mjambor@suse.cz>
2490
2491 ipa/85447
2492 * ipa-cp.c (create_specialized_node): Check that clones of
2493 self-recursive edges exist during IPA-CP.
2494
2495 2018-04-19 Toon Moene <toon@moene.org>
2496
2497 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
2498 by -O3.
2499
2500 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2501
2502 PR tree-optimization/85467
2503 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
2504 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
2505 VECTOR_CST element to type.
2506
2507 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2508
2509 PR target/85397
2510 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
2511 * config/i386/i386.md (builtin_setjmp_setup): Removed.
2512 (builtin_longjmp): Likewise.
2513 (save_stack_nonlocal): New pattern.
2514 (restore_stack_nonlocal): Likewise.
2515
2516 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2517
2518 PR target/85404
2519 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2520 Replace ASM_OUTPUT_LABEL with fprintf.
2521
2522 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2523
2524 PR target/85417
2525 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2526 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
2527 * config/i386/i386-c.c (ix86_target_macros_internal): Also
2528 define __IBT__ and __SHSTK__ for -fcf-protection.
2529 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
2530 TARGET_IBT.
2531 (ix86_trampoline_init): Likewise.
2532 (x86_output_mi_thunk): Likewise.
2533 (ix86_notrack_prefixed_insn_p): Likewise.
2534 (ix86_option_override_internal): Don't disallow -fcf-protection.
2535 * config/i386/i386.md (rdssp<mode>): Also enable for
2536 -fcf-protection.
2537 (incssp<mode>): Likewise.
2538 (nop_endbr): Likewise.
2539 * config/i386/i386.opt (mcet): Change help message to built-in
2540 functions only.
2541 (mibt): Likewise.
2542 (mshstk): Likewise.
2543 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
2544 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
2545 enable CET built-in functions.
2546
2547 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
2548
2549 * common/config/i386/i386-common.c
2550 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
2551 OPTION_MASK_ISA_MOVDIRI_UNSET,
2552 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
2553 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
2554 * config.gcc (movdirintrin.h): New header.
2555 * config/i386/cpuid.h (bit_MOVDIRI,
2556 bit_MOVDIR64B): New bits.
2557 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
2558 and -mmvodir64b.
2559 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
2560 (VOID, PVOID, PCVOID)): New function types.
2561 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
2562 __builtin_ia32_directstoreu_u64,
2563 __builtin_ia32_movdir64b): New builtins.
2564 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
2565 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
2566 and -mmovdiri.
2567 (ix86_valid_target_attribute_inner_p): Ditto.
2568 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
2569 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
2570 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
2571 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
2572 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
2573 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
2574 (movdiri<mode>, movdir64b_<mode>): New.
2575 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
2576 * config/i386/immintrin.h: Include movdirintrin.h.
2577 * config/i386/movdirintrin.h: New file.
2578 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
2579
2580 2018-04-19 Richard Biener <rguenther@suse.de>
2581
2582 PR middle-end/85455
2583 * cfg.c (clear_bb_flags): When loop state says we have
2584 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
2585
2586 2018-04-19 Richard Biener <rguenther@suse.de>
2587
2588 PR tree-optimization/84737
2589 * tree-vect-data-refs.c (vect_copy_ref_info): New function
2590 copying restrict info.
2591 (vect_setup_realignment): Use it.
2592 * tree-vectorizer.h (vect_copy_ref_info): Declare.
2593 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
2594 the first DR to all generated stores.
2595 (vectorizable_load): Likewise for loads.
2596
2597 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR tree-optimization/85446
2600 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
2601 the integral and pointer types to have the same precision.
2602
2603 * doc/install.texi: Document --disable-cet being the default and
2604 --enable-cet=auto.
2605
2606 2018-04-18 Martin Liska <mliska@suse.cz>
2607
2608 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
2609 style.
2610
2611 2018-04-18 Martin Liska <mliska@suse.cz>
2612
2613 Revert
2614 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
2615
2616 PR ipa/83983
2617 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2618 arguments if they are comparable.
2619
2620 2018-04-18 Martin Liska <mliska@suse.cz>
2621
2622 Revert
2623 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
2624
2625 PR lto/84805
2626 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
2627 incomplete types.
2628
2629 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
2630
2631 PR target/85388
2632 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
2633 ENDBR after calling __morestack.
2634
2635 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2636
2637 PR jit/85384
2638 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
2639 by using gcc_base_ver to generate a gcc_driver_version, and use
2640 it when generating GCC_DRIVER_NAME.
2641 * configure: Regenerate.
2642
2643 2018-04-18 Jakub Jelinek <jakub@redhat.com>
2644
2645 PR target/81084
2646 * config.gcc: Obsolete powerpc*-*-*spe*.
2647
2648 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR debug/84637
2651 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
2652 (stabstr_D): Change type of unum from unsigned int to
2653 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
2654 type.
2655
2656 2018-04-17 Jim Wilson <jimw@sifive.com>
2657
2658 PR 84856
2659 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
2660 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
2661 Set arg_pointer_offset after using pretend_args_size.
2662
2663 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2664
2665 PR rtl-optimization/85431
2666 * dse.c (record_store): Ignore zero width stores.
2667
2668 PR sanitizer/85230
2669 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
2670 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
2671 __builtin_stack_restore rather than after it.
2672 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
2673 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
2674 argument instead of virtual_dynamic_stack_rtx.
2675
2676 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
2677
2678 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
2679 New prototype.
2680 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2681 Add note to error message to explain internal mapping of overloaded
2682 built-in function name to non-overloaded built-in function name.
2683 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
2684 function.
2685
2686 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
2687
2688 PR target/85424
2689 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
2690 where the inputs overlap with the output.
2691
2692 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2693
2694 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
2695 (=v, v) alternative and explicit "memory" attribute.
2696 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
2697 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2698 attributes.
2699 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
2700 "sselog1" type instead of "sselog".
2701 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
2702 "sselog". Remove explicit "memory" attribute.
2703 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
2704 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2705 attributes.
2706 (vec_extract_hi_v32hi): Merge all alternatives into one, use
2707 "sselog1" type instead of "sselog". Remove explicit "memory"
2708 attribute.
2709 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
2710 use "sselog1" type instead of "sselog". Remove explicit "memory"
2711 attribute.
2712 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
2713 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2714 attributes.
2715 (vec_extract_hi_v64qi): Merge all alternatives into one, use
2716 "sselog1" type instead of "sselog". Remove explicit "memory"
2717 attribute.
2718 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
2719 use "sselog1" type instead of "sselog". Remove explicit "memory"
2720 attribute.
2721
2722 PR target/85430
2723 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
2724
2725 PR middle-end/85414
2726 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
2727 on a SUBREG.
2728
2729 2018-04-17 Martin Jambor <mjambor@suse.cz>
2730
2731 PR ipa/85421
2732 * ipa-cp.c (create_specialized_node): Call
2733 expand_all_artificial_thunks if necessary.
2734
2735 2018-04-17 Martin Liska <mliska@suse.cz>
2736
2737 PR lto/85405
2738 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
2739 in message, remote space in between '_G' and '('.
2740
2741 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2742
2743 PR target/85281
2744 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
2745 avx512f_vmcmp<mode>3<round_saeonly_name>,
2746 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
2747 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
2748 avx512f_rndscale<mode><round_saeonly_name>,
2749 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
2750 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
2751 Use %<iptr>2 instead of %2 for -masm=intel.
2752 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
2753 avx512f_vcvttss2usi<round_saeonly_name>,
2754 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
2755 -masm=intel.
2756 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
2757 avx512f_vcvttsd2usi<round_saeonly_name>,
2758 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
2759 Use %q1 instead of %1 for -masm=intel.
2760 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
2761 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
2762 of %3 for -masm=intel.
2763 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
2764 -masm=intel.
2765 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
2766 -masm=intel.
2767 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
2768 -masm=intel.
2769 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
2770 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
2771 %g1.
2772 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
2773 -masm=intel.
2774 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
2775 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
2776 %g1 and one with %0 and %1.
2777 (avx512er_vmrcp28<mode><round_saeonly_name>,
2778 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
2779 %1 for -masm=intel.
2780 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
2781 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
2782 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
2783 of %0 and %{%4%} for -masm=intel.
2784 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
2785 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
2786 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
2787 order of %0 and %{%5%}%{z%} for -masm=intel.
2788
2789 2018-04-17 Jan Hubicka <jh@suse.cz>
2790
2791 PR lto/85405
2792 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2793
2794 2018-04-17 Martin Liska <mliska@suse.cz>
2795
2796 PR ipa/85329
2797 * multiple_target.c (create_dispatcher_calls): Set apostrophes
2798 for target_clone error message. Make default implementation
2799 clone to be a local declaration.
2800 (separate_attrs): Add new argument and check for an empty
2801 string.
2802 (expand_target_clones): Handle it.
2803 (ipa_target_clone): Make redirection just for target_clones
2804 functions.
2805
2806 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
2807 Tom de Vries <tom@codesourcery.com>
2808
2809 PR middle-end/84955
2810 * omp-expand.c (expand_oacc_for): Add dummy false branch for
2811 tiled basic blocks without omp continue statements.
2812
2813 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
2814
2815 PR target/83660
2816 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
2817 vec_extract expression as having side effects to make sure it gets
2818 a cleanup point.
2819
2820 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
2821
2822 PR target/85403
2823 * config/i386/i386.c (get_builtin_code_for_version): Check
2824 error_mark_node.
2825
2826 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
2827
2828 PR target/84331
2829 * gcc/config.gcc: Support "skylake".
2830 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
2831 PROCESSOR_SKYLAKE.
2832 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
2833 (processor_target_table): Add "skylake".
2834 (ix86_option_override_internal): Add "skylake".
2835 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
2836 PROCESSOR_CANNONLAKE.
2837 (get_builtin_code_for_version): Fix priority for
2838 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
2839 PROCESSOR_SKYLAKE-AVX512.
2840 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
2841 (processor_type): Add PROCESSOR_SKYLAKE.
2842
2843 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2844 Jason Merrill <jason@redhat.com>
2845
2846 PR c++/85112
2847 * convert.c (convert_to_integer_1): Use direct recursion for
2848 enumeral types and types with a precision less than the number
2849 of bits in their mode.
2850
2851 2018-04-16 Julia Koval <julia.koval@intel.com>
2852
2853 PR target/84413
2854 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
2855 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
2856
2857 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
2858
2859 PR target/85293
2860 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
2861 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
2862 and -mno-direct-move.
2863
2864 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
2865
2866 PR target/83402
2867 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
2868 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
2869 Ensure negative shifts result in {0}.
2870
2871 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
2872
2873 PR rtl-optimization/79916
2874 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
2875 regs (if any) to define how to gnerate SD moves when LRA is in
2876 progress.
2877
2878 2018-04-13 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR rtl-optimization/85393
2881 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
2882 * except.c (expand_dw2_landing_pad_for_region): Make static.
2883 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
2884 a label and unconditional jump to old_bb, rather than
2885 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
2886 basic block.
2887
2888 PR rtl-optimization/85376
2889 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
2890 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
2891 instead of a specific value.
2892
2893 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2894 Bin Cheng <bin.cheng@arm.com>
2895
2896 PR tree-optimization/82965
2897 PR tree-optimization/83991
2898 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
2899 by_profile_only parameter.
2900 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
2901 information if the loop was predicted to iterate too many times.
2902 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
2903
2904 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2905
2906 PR lto/71991
2907 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
2908 always inline.
2909
2910 2018-04-13 Martin Liska <mliska@suse.cz>
2911 Jakub Jelinek <jakub@redhat.com>
2912
2913 PR middle-end/81657
2914 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
2915 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
2916 * builtins.c (expand_builtin_memory_copy_args): Use
2917 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
2918 handle dest_addr == pc_rtx.
2919
2920 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
2921
2922 PR target/85291
2923 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
2924 asked to not generate direct moves.
2925 (fix_trunc<mode>si2_stfiwx): Similar.
2926 (fix_trunc<mode>si2_internal): Similar.
2927
2928 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2929
2930 PR debug/83157
2931 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
2932 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
2933 lookup if dest in some wider mode is known to be const0_rtx and
2934 if so, record permanent equivalence for it to be ZERO_EXTEND of
2935 the narrower mode destination.
2936
2937 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2938
2939 * lto-streamer-out.c (output_function): Revert 259346.
2940 * omp-expand.c (expand_oacc_for): Likewise.
2941
2942 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
2943
2944 PR rtl-optimization/85354
2945 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
2946 * sel-sched.c (sel_global_init): ... here.
2947
2948 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
2949
2950 PR target/85238
2951 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
2952 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2953 mode for PE-COFF targets.
2954 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
2955 (i386_pe_asm_lto_end): Likewise.
2956 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
2957 (TARGET_ASM_LTO_END): Likewise.
2958 * config/i386/winnt.c (saved_debug_info_level): New static variable.
2959 (i386_pe_asm_lto_start): New function.
2960 (i386_pe_asm_lto_end): Likewise.
2961
2962 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2963 Richard Biener <rguenther@suse.de>
2964
2965 PR middle-end/84955
2966 * lto-streamer-out.c (output_function): Fix CFG loop state before
2967 streaming out.
2968 * omp-expand.c (expand_oacc_for): Handle calls to internal
2969 functions like regular functions.
2970
2971 2018-04-12 Richard Biener <rguenther@suse.de>
2972
2973 PR lto/85371
2974 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
2975 for the early LTO debug to properly generate references to it
2976 during DIE emission. Do not re-use that for the skeleton for
2977 split-dwarf.
2978 (dwarf2out_early_finish): Likewise.
2979
2980 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2981
2982 PR target/85328
2983 * config/i386/sse.md
2984 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
2985 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
2986 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
2987 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
2988 and output is a reg, avoid creating invalid lowpart subreg, but
2989 instead split into a 512-bit move. Don't split if not AVX512VL,
2990 input is xmm16+ reg and output is a mem.
2991 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
2992 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
2993 xmm16+ reg and output is a mem.
2994
2995 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2996
2997 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
2998 also for flag_dwarf2_cfi_asm.
2999
3000 2018-04-12 Jakub Jelinek <jakub@redhat.com>
3001
3002 PR rtl-optimization/85342
3003 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3004 a bool scalar var inside of the loop instead. Don't try to update
3005 recog_data.operand after failed apply_change_group.
3006
3007 2018-04-12 Tom de Vries <tom@codesourcery.com>
3008
3009 PR target/85296
3010 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3011 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
3012 array with flexible array member as array without given dimension.
3013 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3014 argument for undefined param to true.
3015
3016 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
3017
3018 PR target/85321
3019 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3020 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3021 from PowerPC section.
3022 * config/rs6000/sysv4.opt (mcall-): Improve help text.
3023 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3024 help text that is too long.
3025 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3026 help text that is too long.
3027 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3028 help text that is too long.
3029
3030 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
3031
3032 * config/alpha/alpha.md (stack_probe_internal): Rename
3033 from "probe_stack". Update all callers.
3034
3035 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3036
3037 PR rtl-optimization/84566
3038 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3039 sched_macro_fuse_insns.
3040
3041 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3042
3043 PR target/84301
3044 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3045 (compute_block_dependences): ... from here.
3046
3047 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR tree-optimization/85331
3050 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3051 from int to HOST_WIDE_INT.
3052
3053 2018-04-11 Martin Jambor <mjambor@suse.cz>
3054
3055 PR ipa/84149
3056 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3057 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3058 not the same as the source val.
3059 (cgraph_edge_brings_value_p): New parameter.
3060 (gather_edges_for_value): Pass destination value to
3061 cgraph_edge_brings_value_p.
3062 (perhaps_add_new_callers): Likewise.
3063 (get_info_about_necessary_edges): Likewise and exclude values brought
3064 only by self-recursive edges.
3065 (create_specialized_node): Redirect only clones of self-calling edges.
3066 (+self_recursive_pass_through_p): New function.
3067 (find_more_scalar_values_for_callers_subset): Use it.
3068 (find_aggregate_values_for_callers_subset): Likewise.
3069 (known_aggs_to_agg_replacement_list): Removed.
3070 (decide_whether_version_node): Re-calculate known constants for all
3071 remaining context clones.
3072
3073 2018-04-11 Richard Biener <rguenther@suse.de>
3074
3075 PR lto/85339
3076 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3077 from early DWARF output.
3078 (dwarf2out_early_finish): Output line info unconditionally into
3079 early DWARF and add reference to it.
3080
3081 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3082
3083 PR target/85281
3084 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3085 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3086 other than V2DFmode using iptr mode attribute.
3087 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3088
3089 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3090
3091 PR rtl-optimization/84659
3092 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3093
3094 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3095
3096 PR debug/85302
3097 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3098 SIZEP is NULL.
3099 (output_loc_list): Pass address of a dummy size variable even in the
3100 locview handling loop.
3101 (index_location_lists): Add comment on why skip_loc_list_entry can't
3102 call size_of_locs.
3103
3104 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
3105
3106 PR target/85261
3107 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3108 into register.
3109
3110 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
3111
3112 PR target/85321
3113 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3114 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3115 and -mstring-compare-inline-limit.
3116
3117 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3118
3119 PR target/85287
3120 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3121 for stack clash protection in a register whenever we need it to be in
3122 a register.
3123
3124 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3125
3126 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3127 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3128
3129 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3130
3131 PR target/85321
3132 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3133 the help text.
3134 (mlong-double-): Ditto.
3135 * config/rs6000/sysv4.opt (msdata=): Ditto.
3136 (mtls-size=): Ditto.
3137
3138 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
3139
3140 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3141 erroneous entries for
3142 "vector int vec_ldl (int, long int *)", and
3143 "vector unsigned int vec_ldl (int, unsigned long int *)".
3144 Add comments and entries for
3145 "vector bool char vec_ldl (int, bool char *)",
3146 "vector bool short vec_ldl (int, bool short *)",
3147 "vector bool int vec_ldl (int, bool int *)",
3148 "vector bool long long vec_ldl (int, bool long long *)",
3149 "vector pixel vec_ldl (int, pixel *)",
3150 "vector long long vec_ldl (int, long long *)",
3151 "vector unsigned long long vec_ldl (int, unsigned long long *)".
3152 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3153 type tree bool_long_long_type_node and correct definition of
3154 bool_V2DI_type_node to make reference to this new type tree.
3155 (rs6000_mangle_type): Replace erroneous reference to
3156 bool_long_type_node with bool_long_long_type_node.
3157 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3158 comments to emphasize sign distinctions for char and int types and
3159 replace RS6000_BTI_bool_long constant with
3160 RS6000_BTI_bool_long_long constant. Also add comment to restrict
3161 use of RS6000_BTI_pixel.
3162 (bool_long_type_node): Remove this macro definition.
3163 (bool_long_long_type_node): New macro definition
3164
3165 2018-04-10 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR rtl-optimization/85300
3168 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3169 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3170 simplify_unary_operation fails.
3171
3172 2018-04-10 Martin Liska <mliska@suse.cz>
3173
3174 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3175 cgraph_edge and ipa_ref.
3176
3177 2018-04-10 Jakub Jelinek <jakub@redhat.com>
3178
3179 PR target/85177
3180 PR target/85255
3181 * config/i386/sse.md
3182 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3183 computation of the VEC_MERGE selector from mask.
3184 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3185 Fix decoding of the VEC_MERGE selector into mask.
3186
3187 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
3188
3189 PR tree-optimization/85286
3190 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3191
3192 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
3193
3194 * final.c (final_1): Set insn_last_address as well as
3195 insn_current_address.
3196
3197 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3198
3199 PR target/85173
3200 * explow.c (emit_stack_probe): Call validize_mem on memory location
3201 before passing it to gen_probe_stack. Create address operand and
3202 legitimize it for the probe_stack_address case.
3203
3204 2018-04-09 Jan Hubicka <jh@suse.cz>
3205
3206 PR lto/85078
3207 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
3208 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
3209 * tree.c (free_lang_data_in_type): Fix handling of binfos;
3210 walk basetypes.
3211 (free_lang_data): Rebuild type inheritance graph.
3212
3213 2018-04-09 Martin Sebor <msebor@redhat.com>
3214
3215 * invoke.texi (-finline-small-functions): Mention other optimization
3216 options.
3217 (-findirect-inlining, -fpartial-inlining): Same.
3218 (-finline-functions-called-once): Same.
3219 (-freorder-blocks-and-partition): Same.
3220
3221 2018-04-09 Jan Hubicka <jh@suse.cz>
3222
3223 PR rtl/84058
3224 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
3225 jumps; choose last target that matches the criteria (i.e.
3226 no partition changes for non-crossing jumps).
3227 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
3228 support for redirecting crossing jumps to non-crossing.
3229
3230 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
3231
3232 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
3233 also for naked functions.
3234
3235 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
3236
3237 * config/arc/arc.md (add_shift): New pattern.
3238 (add_shift2): Likewise.
3239 (sub_shift): Likewise.
3240 (sub_shift_cmp0_noout): Likewise.
3241 (compare_si_ashiftsi): Likewise.
3242 (xbfu_cmp0_noout): New combine pattern.
3243 (xbfu_cmp0"): Likewise.
3244 (movsi_set_cc_insn): Place the predicable variant first.
3245 (commutative_binary_cmp0_noout): Remove clobber.
3246 (commutative_binary_cmp0): New pattern.
3247 (noncommutative_binary_cmp0): Likewise.
3248 (noncommutative_binary_cmp0_noout): Likewise.
3249 (noncommutative_binary_comparison_result_used): Removed.
3250 (rsub_cmp0): New pattern.
3251 (rsub_cmp0_noout): Likewise.
3252 (extzvsi): Changed, keep only meaningful variants.
3253 (SQH, SEZ): New iterators.
3254 (SQH_postfix): New mode attribute.
3255 (SEZ_prefix): New code attribute.
3256 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
3257 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
3258 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
3259 of numerical value.
3260 (noncommutative_operator): Check the availability of barrel
3261 shifter option.
3262
3263 2018-04-09 Richard Biener <rguenther@suse.de>
3264
3265 PR tree-optimization/85284
3266 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
3267 Only use the niter constraining form of simple_iv when the exit
3268 is always executed.
3269
3270 2018-04-09 Tom de Vries <tom@codesourcery.com>
3271
3272 PR target/84041
3273 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3274 (define_expand "*memory_barrier"): New define_expand.
3275 (define_insn "memory_barrier"): New insn.
3276
3277 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3278
3279 PR rtl-optimization/80463
3280 PR rtl-optimization/83972
3281 PR rtl-optimization/83480
3282
3283 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
3284 correct producer for the insn.
3285 (tidy_control_flow): Fixup seqnos in case of debug insns.
3286
3287 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3288
3289 PR rtl-optimization/83913
3290
3291 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
3292 different sched-times when merging exprs.
3293
3294 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3295
3296 PR rtl-optimization/83962
3297
3298 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
3299 tidy_fallthru_edge and tidy_control_flow.
3300
3301 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3302
3303 PR rtl-optimization/83530
3304
3305 * sel-sched.c (force_next_insn): New global variable.
3306 (remove_insn_for_debug): When force_next_insn is true, also leave only
3307 next insn in the ready list.
3308 (sel_sched_region): When the region wasn't scheduled, make another pass
3309 over it with force_next_insn set to 1.
3310
3311 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3312
3313 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
3314 into tm_file.
3315 * config/nds32/constants.md (unspec_volatile_element): Add enum values
3316 for interrupt control.
3317 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3318 functions for interrupt control.
3319 * config/nds32/nds32-intrinsic.md: Likewise.
3320 * config/nds32/nds32_intrinsic.h: Likewise.
3321 * config/nds32/nds32.h (nds32_builtins): Likewise.
3322
3323 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3324
3325 * config/nds32/nds32.c (nds32_init_machine_status,
3326 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
3327 strict_aligned_p field.
3328 (nds32_expand_to_rtl_hook): New function.
3329 (TARGET_EXPAND_TO_RTL_HOOK): Define.
3330 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
3331
3332 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3333 Chung-Ju Wu <jasonwucj@gmail.com>
3334
3335 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
3336 * config/nds32/nds32-n7.md: New file.
3337 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
3338 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
3339 pipeline.
3340 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
3341 * config/nds32/nds32.md (pipeline_model): Add n7.
3342 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
3343 * config/nds32/pipelines.md: Include n7 settings.
3344
3345 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3346 Chung-Ju Wu <jasonwucj@gmail.com>
3347
3348 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
3349 * config/nds32/nds32-e8.md: New file.
3350 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
3351 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3352 pipeline.
3353 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3354 * config/nds32/nds32.md (pipeline_model): Add e8.
3355 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3356 * config/nds32/pipelines.md: Include e8 settings.
3357
3358 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3359 Chung-Ju Wu <jasonwucj@gmail.com>
3360
3361 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3362 * config/nds32/nds32-n8.md: New file.
3363 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3364 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3365 pipeline.
3366 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3367 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3368 * config/nds32/nds32.md (pipeline_model): Add n8.
3369 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3370 * config/nds32/pipelines.md: Include n8 settings.
3371
3372 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3373 Chung-Ju Wu <jasonwucj@gmail.com>
3374
3375 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3376 * config/nds32/nds32-n9-2r1w.md: New file.
3377 * config/nds32/nds32-n9-3r2w.md: New file.
3378 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3379 nds32_register_ports): New or modify for cpu n9.
3380 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3381 pipeline.
3382 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3383 * config/nds32/nds32-utils.c: New file.
3384 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3385 TARGET_MUL_SLOW): Define.
3386 * config/nds32/nds32.md (pipeline_model): New attribute.
3387 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3388 New options that support cpu n9.
3389 * config/nds32/pipelines.md: Include n9 settings.
3390 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3391
3392 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3393
3394 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3395 information if necessary.
3396 (output_cond_branch_compare_zero): Likewise.
3397 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3398 (nds32_target_alignment): Refine for alignment.
3399 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3400 (FUNCTION_BOUNDARY): Modify.
3401 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3402 align case.
3403 * config/nds32/nds32.opt (malways-align, malign-functions): New.
3404
3405 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3406
3407 * config/nds32/constants.md (unspec_volatile_element): Add values for
3408 TLB operation and data prefetch.
3409 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3410 functions for TLB operation and data prefetch.
3411 * config/nds32/nds32-intrinsic.md: Likewise.
3412 * config/nds32/nds32_intrinsic.h: Likewise.
3413 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
3414 (nds32_print_operand): Likewise.
3415 * config/nds32/nds32.h (nds32_builtins): Likewise.
3416
3417 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
3418 Andrew Pinski <pinsika@gcc.gnu.org>
3419
3420 PR middle-end/82976
3421 * match.pd: Use constant_boolean_node of correct type instead of
3422 boolean_true_node or boolean_false_node for simplifying
3423 pointer comparisons to zero.
3424
3425 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3426
3427 PR tree-optimization/80021
3428 * tree.c (verify_type_variant): Make error call in verify_variant_match
3429 translatable and remove final full stop.
3430
3431 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3432
3433 * config/nds32/constants.md (unspec_volatile_element): Add
3434 UNSPEC_VOLATILE_EH_RETURN.
3435 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
3436 nds32_output_stack_pop): Support dwarf exception handling process.
3437 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
3438 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
3439 exception handling process.
3440 (nds32_compute_stack_frame): Likewise.
3441 (nds32_return_addr_rtx): Likewise.
3442 (nds32_initial_elimination_offset): Likewise.
3443 (nds32_expand_prologue): Likewise.
3444 (nds32_expand_epilogue): Likewise.
3445 (nds32_dynamic_chain_address): New function.
3446 * config/nds32/nds32.h (machine_function): Add fields for dwarf
3447 exception handling.
3448 (DYNAMIC_CHAIN_ADDRESS): Define.
3449 (EH_RETURN_DATA_REGNO): Define.
3450 (EH_RETURN_STACKADJ_RTX): Define.
3451 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
3452 patterns for dwarf exception handling.
3453
3454 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3455
3456 * config/nds32/nds32.h: Clean up obsolete macros.
3457
3458 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3459
3460 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3461 Add enum values for particular instructions.
3462 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3463 particular intrinsic functions.
3464 * config/nds32/nds32-intrinsic.md: Likewise.
3465 * config/nds32/nds32_intrinsic.h: Likewise.
3466 * config/nds32/nds32.h (nds32_builtins): Likewise.
3467 * config/nds32/nds32.md (type): Add pbsad and pbsada.
3468 (btst, ave): New patterns for particular instructions.
3469
3470 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3471
3472 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3473 Add enum values for atomic load/store and memory sync.
3474 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
3475 and memory sync.
3476 * config/nds32/nds32-intrinsic.md: Likewise.
3477 * config/nds32/nds32_intrinsic.h: Likewise.
3478 * config/nds32/nds32.h (nds32_builtins): Likewise.
3479
3480 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3481
3482 PR tree-optimization/85257
3483 * fold-const.c (native_encode_vector): If not all elts could fit
3484 and off is -1, return 0 rather than offset.
3485 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
3486 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
3487 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
3488 adjust buffer in native_interpret_expr call.
3489
3490 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3491
3492 * config/nds32/constants.md (unspec_volatile_element): Add cache
3493 control enum values.
3494 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
3495 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
3496 * config/nds32/nds32.c (nds32_cctl_names): New.
3497 (nds32_print_operand): Handle cache control register names.
3498 * config/nds32/nds32.h (nds32_builtins): New enum values.
3499 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
3500 macros.
3501 * config/nds32/nds32.md (type): Add mmu.
3502 * config/nds32/pipelines.md (simple_insn): Add mmu.
3503
3504 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3505
3506 * config/nds32/nds32.md (type): Remove call.
3507 * config/nds32/pipelines.md (simple_insn): Likewise.
3508
3509 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3510
3511 * config/nds32/constants.md (unspec_volatile_element): Add
3512 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
3513 UNSPEC_VOLATILE_FMFCFG.
3514 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
3515 description for fmfcfg and fmfcsr.
3516 (bdesc_1arg): Add fmtcsr.
3517 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
3518 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
3519 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
3520 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
3521 unspec_fmfcfg): New patterns.
3522 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
3523 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
3524 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
3525 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
3526 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
3527 __nds32__fmfcfg): Define.
3528
3529 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3530
3531 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
3532 intrinsic register names.
3533 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
3534 intrinsic register enum values and macros.
3535
3536 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3537
3538 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
3539 for load/store addressing form.
3540 (nds32_print_operand_address): Likewise.
3541
3542 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
3543
3544 PR target/85196
3545 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
3546 based on LABEL_REF. Remove useless assertion.
3547 (pic_address_needs_scratch): Fix formatting.
3548 (sparc_legitimize_pic_address): Minor tweaks.
3549 (sparc_delegitimize_address): Adjust assertion accordingly.
3550 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
3551 into symbolic_operand.
3552 (movsi_high_pic_label_ref): Likewise.
3553 (movsi_lo_sum_pic_label_ref): Likewise.
3554 (movdi_pic_label_ref): Likewise.
3555 (movdi_high_pic_label_ref): Likewise.
3556 (movdi_lo_sum_pic_label_ref): Likewise.
3557
3558 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
3559
3560 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
3561 custom LIB_SPEC setup.
3562
3563 2018-04-06 Ruslan Bukin <br@bsdpad.com>
3564 Kito Cheng <kito.cheng@gmail.com>
3565
3566 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
3567 * config/riscv/freebsd.h: New.
3568
3569 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3570
3571 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
3572 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
3573 file.
3574
3575 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3576 Kito Cheng <kito.cheng@gmail.com>
3577
3578 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
3579 nds32_output_call, nds32_symbol_binds_local_p): New functions.
3580 * config/nds32/nds32-protos.h (nds32_output_call,
3581 nds32_output_return): Declare.
3582 * config/nds32/nds32.md: Refine all the call and return patterns.
3583
3584 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3585
3586 PR debug/85252
3587 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
3588 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
3589
3590 PR rtl-optimization/84872
3591 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
3592 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
3593 EDGE_CROSSING edge.
3594
3595 2018-04-06 Tamar Christina <tamar.christina@arm.com>
3596
3597 * expr.c (copy_blkmode_to_reg): Revert 254862.
3598 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
3599
3600 2018-04-06 Richard Biener <rguenther@suse.de>
3601
3602 PR middle-end/85244
3603 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
3604 after seeing a component reference with an adjacent field. Treat
3605 refs to arrays at struct end of external decls similar to
3606 refs to unconstrained commons.
3607
3608 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3609
3610 PR sanitizer/85213
3611 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
3612 look through SAVE_EXPRs with non-side-effects argument. Adjust
3613 recursive calls.
3614 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
3615 save_p here.
3616
3617 2018-04-06 Richard Biener <rguenther@suse.de>
3618
3619 PR middle-end/85180
3620 * alias.c (find_base_term): New wrapper around find_base_term
3621 unwinding CSELIB_VAL_PTR changes.
3622 (find_base_term): Do not restore CSELIB_VAL_PTR during the
3623 recursion.
3624
3625 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3626
3627 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
3628 instructions.
3629 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
3630 constant definitions.
3631 ("nop"): lr 0,0 -> nopr r0
3632 ("nop_lr0", "nop_lr1"): New insn definitions.
3633
3634 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3635
3636 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
3637 NDS32_V3PUSH_AVAILABLE_P macro.
3638
3639 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
3640 Chung-Ju Wu <jasonwucj@gmail.com>
3641
3642 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
3643 (nds32*-*-*): Add float and fpu_config into supported_defaults.
3644 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
3645 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
3646 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
3647 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
3648 * config/nds32/constraints.md: New constraints and checking for hard
3649 float configuration.
3650 * config/nds32/iterators.md: New mode iterator and attribute for hard
3651 float configuration.
3652 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
3653 patterns.
3654 * config/nds32/nds32-fpu.md: New file.
3655 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
3656 deal with hard float code generation.
3657 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
3658 ARCH_V3S.
3659 (abi_type, float_reg_number): New enum type.
3660 * config/nds32/nds32-predicates.c: New predicates for hard float.
3661 * config/nds32/nds32-protos.h: Declare functions for hard float.
3662 * config/nds32/nds32.c: Implementation for hard float configuration.
3663 * config/nds32/nds32.h: Definitions for hard float configuration.
3664 * config/nds32/nds32.md: Include hard float machine description and
3665 modify patterns for hard float configuration.
3666 * config/nds32/nds32.opt: New options for hard float configuration.
3667 * config/nds32/predicates.md: New predicates for hard float
3668 configuration.
3669
3670 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3671
3672 * common/config/nds32/nds32-common.c
3673 (nds32_option_optimization_table): Enable -mreleax-hint by default.
3674
3675 2018-04-05 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR middle-end/85195
3678 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
3679 CONSTRUCTOR_ELT (ctor, ...)->value.
3680
3681 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
3682
3683 PR target/85193
3684 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
3685
3686 2018-04-05 Tom de Vries <tom@codesourcery.com>
3687
3688 PR target/85204
3689 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
3690 cond jump.
3691
3692 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3693 Kito Cheng <kito.cheng@gmail.com>
3694
3695 * config/nds32/constraints.md (U33): Fine-tune checking condition.
3696 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
3697 * config/nds32/nds32.h (nds32_16bit_address_type): Add
3698 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
3699
3700 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3701 Kito Cheng <kito.cheng@gmail.com>
3702
3703 * config/nds32/constraints.md (Ufe): New memory constraint.
3704 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
3705 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
3706 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
3707 operands.
3708 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
3709 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
3710
3711 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3712
3713 * config/nds32/nds32.md: Use optimize_size in the condition for
3714 alu-shift instructions.
3715
3716 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3717
3718 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
3719
3720 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3721
3722 * config/nds32/nds32.md (negsi2): Refine pattern.
3723
3724 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3725 Chung-Ju Wu <jasonwucj@gmail.com>
3726
3727 * config/nds32/iterators.md (shift_rotate): New code iterator.
3728 (shift): New code attribute.
3729 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
3730 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
3731 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
3732 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
3733 bit-wise operations.
3734 (andsi3, *andsi3): Ditto.
3735 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
3736 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
3737 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
3738 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
3739 nds32_ior_operand, nds32_xor_operand): New predicates.
3740
3741 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3742
3743 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
3744 (addsi3, subsi3): ... this.
3745
3746 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3747
3748 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
3749
3750 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3751
3752 * config/nds32/nds32.md: Adjust indention.
3753
3754 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3755
3756 * config/nds32/nds32.md (feature): New attribute.
3757
3758 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3759
3760 * config/nds32/nds32.md (subtype): New attribute.
3761
3762 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
3763
3764 PR target/85203
3765 * config/arm/arm-builtins.c (arm_expand_builtin): Change
3766 expansion to perform a bitwise AND of the argument followed by a
3767 boolean negation of the result.
3768
3769 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
3770
3771 PR rtl-optimization/84878
3772 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
3773 the basic block. Assert the use reference is not artificial and that
3774 it has an associated insn.
3775
3776 2018-04-04 Michael Matz <matz@suse.de>
3777
3778 * builtins.c (compute_objsize): Pass correct operand
3779 to array_at_struct_end_p.
3780
3781 2018-04-04 Richard Biener <rguenther@suse.de>
3782
3783 PR lto/85176
3784 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
3785 from contexts for DINFO_LEVEL_TERSE and below.
3786
3787 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3788
3789 * config/nds32/nds32-doubleword.md (move_<mode>): Require
3790 resiter_operand condition.
3791 * config/nds32/nds32.md (*move<mode>): Ditto.
3792
3793 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3794 Monk Chiang <sh.chiang04@gmail.com>
3795
3796 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
3797
3798 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3799
3800 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
3801
3802 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3803 Kito Cheng <kito.cheng@gmail.com>
3804
3805 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
3806 nds32_cond_code_str, output_cond_branch,
3807 output_cond_branch_compare_zero, nds32_expand_cbranch,
3808 nds32_expand_cstore, nds32_expand_movcc,
3809 nds32_output_cbranchsi4_equality_zero,
3810 nds32_output_cbranchsi4_equality_reg,
3811 nds32_output_cbranchsi4_equality_reg_or_const_int,
3812 nds32_output_cbranchsi4_greater_less_zero: New functions.
3813 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
3814 nds32_expand_cstore, nds32_expand_movcc,
3815 nds32_output_cbranchsi4_equality_zero,
3816 nds32_output_cbranchsi4_equality_reg,
3817 nds32_output_cbranchsi4_equality_reg_or_const_int,
3818 nds32_output_cbranchsi4_greater_less_zero): Declare.
3819 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
3820 nds32_rimm11s_operand): New predicates.
3821 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
3822 * config/nds32/nds32.md: Rewrite all the branch and conditional move
3823 patterns.
3824
3825 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3826
3827 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
3828 * config/nds32/nds32.md: Ditto.
3829 * config/nds32/pipelines.md: Ditto.
3830
3831 2018-04-04 Richard Biener <rguenther@suse.de>
3832
3833 PR tree-optimization/85168
3834 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
3835 propagating abnormals.
3836
3837 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3838
3839 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
3840
3841 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3842 Kito Cheng <kito.cheng@gmail.com>
3843
3844 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
3845 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
3846 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
3847 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
3848 * config/nds32/nds32.md (sibcall_internal): New.
3849 (sibcall_register): Remove.
3850 (sibcall_immediate): Remove.
3851 (sibcall_value_internal): New.
3852 (sibcall_value_register): Remove.
3853 (sibcall_value_immediate): Remove.
3854 * config/nds32/predicates.md (nds32_general_register_operand): New.
3855 (nds32_call_address_operand): New.
3856
3857 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3858
3859 PR rtl-optimization/85167
3860 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
3861 bb_defs if *split_p, instead preinitialize it to NULL.
3862
3863 PR tree-optimization/85156
3864 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
3865 evaluating the argument multiple times.
3866
3867 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
3868
3869 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
3870 than vector.
3871 (_mm_cvtpd_ps): Likewise.
3872 (_mm_cvttpd_epi32): Likewise.
3873 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
3874 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
3875 vector, pixel, and bool following altivec.h include.
3876
3877 2018-04-03 Martin Sebor <msebor@redhat.com>
3878
3879 * doc/extend.texi (Common Function Attributes): Clarify.
3880 (const attribute): Likewise.
3881 (pure attribute): Likewise.
3882
3883 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3884
3885 PR target/85169
3886 * config/i386/i386.c (ix86_expand_vector_set): Use
3887 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
3888
3889 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
3890
3891 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
3892 instructions when changing rounding bits to preserve precision bits
3893 in the x87 control word.
3894
3895 2018-04-03 Martin Liska <mliska@suse.cz>
3896
3897 PR tree-optimization/82491
3898 * rtl.h (strip_offset_and_add): Replace += suboffset with
3899 poly_uint64 () + suboffset.
3900
3901 2018-03-29 Martin Liska <mliska@suse.cz>
3902 Martin Jambor <mjambor@suse.cz>
3903
3904 PR ipa/84947
3905 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
3906 param_type is not an integral or pointer type.
3907
3908 2018-04-03 Richard Biener <rguenther@suse.de>
3909
3910 * sese.h (recompute_all_dominators): Remove.
3911
3912 2018-04-02 Martin Sebor <msebor@redhat.com>
3913
3914 * doc/invoke.texi (-Wrestrict): Fix typos.
3915
3916 2018-04-02 Jim Wilson <jimw@sifive.com>
3917
3918 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
3919 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
3920 (<optab>di3, <optab>si3_extend): Likewise.
3921 (<optab>si3_mask, <optab>si3_mask_1): New.
3922 (<optab>di3_mask, <optab>di3_mask_1): New.
3923 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
3924 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
3925 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
3926
3927 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
3928
3929 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
3930 example.
3931
3932 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
3933
3934 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
3935 (nds32_canonicalize_comparison): New function.
3936
3937 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3938 Kito Cheng <kito.cheng@gmail.com>
3939 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3940
3941 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
3942 * config/nds32/constants.md (unspec_volatile_element): Add
3943 UNSPEC_VOLATILE_RELAX_GROUP.
3944 * config/nds32/nds32-relax-opt.c: New file.
3945 * config/nds32/nds32-predicates.c
3946 (nds32_symbol_load_store_p): New function.
3947 * config/nds32/nds32-protos.h
3948 (nds32_symbol_load_store_p): Declare function.
3949 (make_pass_nds32_relax_opt): Declare new rtl pass function.
3950 * config/nds32/nds32.c
3951 (nds32_register_pass): New function to register pass.
3952 (nds32_register_passes): New function to register passes.
3953 * config/nds32/nds32.md (relax_group): New pattern.
3954 * config/nds32/nds32.opt (mrelax-hint): New option.
3955 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
3956
3957 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
3958
3959 * config/nds32/t-nds32: Modify files dependency.
3960
3961 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3962
3963 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
3964 (PROFILE_HOOK): Define its implementation.
3965
3966 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3967
3968 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
3969 type and 32-bit size.
3970
3971 2018-04-01 Jakub Jelinek <jakub@redhat.com>
3972
3973 PR middle-end/85090
3974 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
3975 (V_128_256): New mode iterator.
3976 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
3977 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
3978 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
3979 of V.
3980 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
3981 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
3982
3983 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
3984
3985 PR target/83315
3986 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
3987 NaN inputs correctly.
3988
3989 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
3990
3991 PR target/80546
3992 * config/rs6000/vsx.md (??r): New mode attribute.
3993 (*vsx_mov<mode>_64bit): Use it.
3994 (*vsx_mov<mode>_32bit): Likewise.
3995
3996 2018-03-30 Martin Sebor <msebor@redhat.com>
3997
3998 PR tree-optimization/84818
3999 * builtins.c (check_access): Use warning_n.
4000
4001 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4002
4003 PR target/83822
4004 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4005 condition.
4006 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4007 condition.
4008
4009 2018-03-30 Julia Koval <julia.koval@intel.com>
4010
4011 PR target/84413
4012 * x86-tune.def (movx, partial_reg_dependency): Enable for
4013 m_SKYLAKE_AVX512.
4014
4015 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
4016
4017 PR inline-asm/84985
4018 * lra-constraints.c (process_alt_operands): Move setting
4019 this_alternative_matches below.
4020
4021 2018-03-29 Martin Liska <mliska@suse.cz>
4022
4023 PR lto/84995.
4024 * doc/invoke.texi: Document how LTO works with debug info.
4025 Describe auto-load support of binutils. Mention 'x86-64'
4026 as valid option value of -march option.
4027
4028 2018-03-29 Jakub Jelinek <jakub@redhat.com>
4029
4030 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4031
4032 PR c/85094
4033 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4034 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4035 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4036 checking.
4037
4038 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
4039
4040 PR target/84912
4041 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4042 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4043 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4044 for RS6000_BTM_POWERPC64.
4045 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4046 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4047 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4048 definition.
4049 (DIVDE): Use it.
4050 (DIVDEU): Likewise.
4051
4052 2018-03-28 Carl Love <cel@us.ibm.com>
4053
4054 Revert
4055 2017-09-27 Carl Love <cel@us.ibm.com>
4056
4057 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4058 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4059 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4060 fctiw instruction.
4061
4062 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4063
4064 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4065 instead of __vector bool.
4066 (_mm_max_pu8): Likewise.
4067 (_mm_min_pi16): Likewise.
4068
4069 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
4070
4071 PR target/84912
4072 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4073 (DIVWEUO): Likewise.
4074 (DIVDEO): Likewise.
4075 (DIVDEUO): Likewise.
4076 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4077 DIVWEUO and DIVDEUO.
4078 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4079 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4080 (div_extend): Likewise.
4081 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4082 builtin function.
4083 (__builtin_divweuo): Likewise.
4084 (__builtin_divdeo): Likewise.
4085 (__builtin_divdeuo): Likewise.
4086
4087 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4088
4089 PR target/85095
4090 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4091 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4092
4093 PR tree-optimization/82004
4094 * gimple-match-head.c (optimize_pow_to_exp): New function.
4095 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4096 Don't fold to exp if optimize_pow_to_exp is false.
4097
4098 2018-03-28 Martin Liska <mliska@suse.cz>
4099
4100 PR other/84819
4101 * calls.c (initialize_argument_information): Fix trailing space.
4102 * common.opt: Fix typo and provide better explanation for
4103 -fsanitize-coverage option.
4104 * config/i386/i386.opt: Fix typo.
4105
4106 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4107 Martin Liska <mliska@suse.cz>
4108
4109 PR sanitizer/85081
4110 * gimplify.c (asan_poison_variable): Don't do the check for
4111 gimplify_omp_ctxp here.
4112 (gimplify_decl_expr): Do it here.
4113 (gimplify_target_expr): Likewise.
4114
4115 2018-03-28 Martin Liska <mliska@suse.cz>
4116
4117 PR target/84988
4118 * config/i386/i386.c (ix86_function_arg_advance): Do not call
4119 chkp_type_bounds_count if MPX is not enabled.
4120
4121 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
4122
4123 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4124
4125 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4126
4127 PR target/84914
4128 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4129 function to create the function decl for complex long double
4130 multiply and divide for -mabi=ieeelongdouble.
4131 (init_float128_ieee): Call it.
4132
4133 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
4134
4135 PR target/85044
4136 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4137 -fcf-protection=branch -mibt.
4138 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4139
4140 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4141
4142 PR target/81863
4143 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4144
4145 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
4146
4147 PR target/85056
4148 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4149 extern array declarations.
4150
4151 2018-03-27 Richard Biener <rguenther@suse.de>
4152
4153 PR middle-end/84067
4154 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4155 explicit single_use checks.
4156
4157 2018-03-27 Richard Biener <rguenther@suse.de>
4158
4159 PR tree-optimization/85082
4160 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4161 Valueize the VUSE.
4162
4163 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4164
4165 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4166 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4167 Turn on fasynchronous-unwind-tables and funwind-tables.
4168
4169 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
4170
4171 PR target/85073
4172 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4173 (*bmi_blsr_<mode>_ccz): Ditto.
4174
4175 2018-03-26 Tom de Vries <tom@codesourcery.com>
4176
4177 PR tree-optimization/85063
4178 * omp-general.c (offloading_function_p): New function. Factor out
4179 of ...
4180 * omp-offload.c (pass_omp_target_link::gate): ... here.
4181 * omp-general.h (offloading_function_p): Declare.
4182 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4183 with attribute omp declare target for offloading functions.
4184
4185 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
4186
4187 PR tree-optimization/84005
4188 * tree-data-ref.h (get_base_for_alignment): Declare.
4189 * tree-data-ref.c (get_base_for_alignment_1): New function.
4190 (get_base_for_alignment): Likewise.
4191 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4192 get_base_for_alignment to find a suitable base object, instead
4193 of always using drb->base_address.
4194
4195 2018-03-23 Jakub Jelinek <jakub@redhat.com>
4196
4197 PR inline-asm/85022
4198 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
4199 known size by default.
4200
4201 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
4202
4203 PR inline-asm/85030
4204 * lra-constraints.c (process_alt_operands): Don't match BLKmode
4205 and non BLKmode operands.
4206
4207 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4208
4209 PR target/85026
4210 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
4211 Clean up attributes.
4212
4213 2018-03-23 Richard Biener <rguenther@suse.de>
4214
4215 PR debug/85020
4216 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
4217 we are going to emit early debug for LTO.
4218
4219 2018-03-23 Jakub Jelinek <jakub@redhat.com>
4220
4221 PR inline-asm/85034
4222 * function.c (match_asm_constraints_1): Don't optimize if input
4223 doesn't satisfy general_operand predicate for output's mode.
4224
4225 PR inline-asm/85022
4226 * alias.c (write_dependence_p): Don't require for x_canonicalized
4227 non-VOIDmode if x has VOIDmode.
4228
4229 PR sanitizer/85029
4230 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
4231 just don't try to optimize it rather than assert it never happens.
4232
4233 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4234
4235 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
4236 macro expansions for definition of ST_INTERNAL_<mode> and
4237 LD_INTERNAL_<mode> builtins.
4238 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
4239 Remove prototype.
4240 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
4241 function.
4242 (altivec_expand_st_builtin): Likewise.
4243 (altivec_expand_builtin): Remove calls to deleted functions.
4244 (rs6000_address_for_altivec): Delete this function.
4245 * config/rs6000/vector.md: Remove expands for
4246 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
4247
4248 2018-03-22 Sudakshina Das <sudi.das@arm.com>
4249
4250 PR target/84826
4251 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
4252 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
4253 re-computing once computed.
4254 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
4255 (arm_init_machine_status): Initialize
4256 machine->static_chain_stack_bytes.
4257
4258 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4259
4260 PR target/84760
4261 * doc/extend.texi: Add four new prototypes for vec_ld.
4262 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
4263 definitions for more logical presentation.
4264 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
4265 entries for V1TI variants of __builtin_altivec_ld builtin.
4266 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
4267 handling of V1TI variant of LVX icode pattern.
4268 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
4269 (rs6000_gimple_fold_builtin): Likewise.
4270 (altivec_init_builtins): Add code to define
4271 __builtin_altivec_lvx_v1ti function.
4272
4273 2018-03-22 Jakub Jelinek <jakub@redhat.com>
4274
4275 PR inline-asm/84941
4276 * function.c (match_asm_constraints_1): Don't do the optimization
4277 if input isn't a REG, SUBREG, MEM or constant.
4278
4279 2018-03-22 Tom de Vries <tom@codesourcery.com>
4280
4281 PR tree-optimization/84956
4282 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
4283 bb_has_abnormal_pred.
4284
4285 2018-03-22 Jakub Jelinek <jakub@redhat.com>
4286
4287 PR sanitizer/85018
4288 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
4289 DECL_INITIAL (decl) to decl at the end.
4290 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
4291 adjust the comment.
4292
4293 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4294
4295 * doc/extend.texi (__builtin_tgmath): Document when complex
4296 integer types are treated as _Complex _Float64.
4297
4298 2018-03-21 Tom de Vries <tom@codesourcery.com>
4299
4300 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
4301
4302 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4303
4304 PR tree-optimization/84960
4305 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
4306 if it is ENTRY block, move them into single succ of ENTRY in that case.
4307
4308 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
4309
4310 PR tree-optimization/84811
4311 * poly-int.h (poly_span_traits): Remove the T3 parameter and
4312 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
4313 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
4314 (known_subrange_p): Update accordingly. Cast each value involved
4315 in the size comparison, rather than casting the result of the
4316 subtraction.
4317
4318 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4319
4320 PR tree-optimization/84982
4321 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
4322 by flipping the least significant bit rather than all bits from
4323 bitpos to bitpos + bitsize - 1.
4324
4325 2018-03-21 Nathan Sidwell <nathan@acm.org>
4326
4327 * doc/extend.texi (Deprecated Features): Remove mention of
4328 long-deleted deprecations.
4329
4330 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4331
4332 PR jit/84288
4333 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
4334 * configure: Regenerate.
4335
4336 2018-03-21 Tom de Vries <tom@codesourcery.com>
4337
4338 PR tree-optimization/83126
4339 * tree-parloops.c (num_phis): New function.
4340 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
4341
4342 2018-03-21 Nathan Sidwell <nathan@acm.org>
4343
4344 * doc/extend.texi (Deprecated Features): Update deprecated flags,
4345 mention anon-struct/union members and trailing attributes.
4346
4347 2018-03-21 Bin Cheng <bin.cheng@arm.com>
4348
4349 PR tree-optimization/84969
4350 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
4351 builtin memset partitions if they set different rhs values.
4352
4353 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4354
4355 PR rtl-optimization/84989
4356 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4357 VEC_DUPLICATE with scalar result mode.
4358
4359 2018-03-21 Martin Liska <mliska@suse.cz>
4360
4361 PR ipa/84963
4362 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4363 not intended return statement.
4364
4365 2018-03-21 Martin Liska <mliska@suse.cz>
4366
4367 PR target/84988
4368 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4369 (chkp_find_bound_slots_1): Limit number of iterations.
4370
4371 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
4372
4373 PR target/84838
4374 * Minor grammar fixes for x86 options.
4375
4376 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4377
4378 PR debug/84875
4379 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4380 holding REG_CFA_RESTORE notes, instead turn them into a USE.
4381
4382 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
4383
4384 PR target/83789
4385 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4386 (altivec_lvx_<mode>_1op): Likewise.
4387 (altivec_stvx_<mode>_2op): Likewise.
4388 (altivec_stvx_<mode>_1op): Likewise.
4389 (altivec_lvx_<VM2:mode>): New define_expand.
4390 (altivec_stvx_<VM2:mode>): Likewise.
4391 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4392 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4393 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4394 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4395 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4396 (rs6000_gen_lvx): Likewise.
4397 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4398 (altivec_expand_stv_builtin): Likewise.
4399 (altivec_expand_builtin): Likewise.
4400 * config/rs6000/vector.md: Likewise.
4401
4402 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4403
4404 PR target/82518
4405 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
4406 BYTES_BIG_ENDIAN.
4407
4408 2018-03-20 Richard Biener <rguenther@suse.de>
4409
4410 PR target/84986
4411 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
4412 sign-conversions as zero, fall back to standard scalar_stmt
4413 cost for the rest.
4414
4415 2018-03-20 Martin Liska <mliska@suse.cz>
4416
4417 PR ipa/84825
4418 * predict.c (rebuild_frequencies): Handle case when we have
4419 PROFILE_ABSENT, but flag_guess_branch_prob is false.
4420
4421 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4422
4423 PR target/84990
4424 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
4425 flag_section_anchors.
4426 * varasm.c (use_blocks_for_decl_p): Remove hack for
4427 dw2_force_const_mem.
4428
4429 PR target/84845
4430 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
4431 to ...
4432 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
4433 be created, use lowpart_subreg of operands[0] rather than operands[0]
4434 itself.
4435 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
4436 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
4437 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
4438 and n constraint instead of aarch64_shift_imm_di and Usd.
4439 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
4440 (*aarch64_<optab>_reg_minus<mode>3): ... this.
4441
4442 2018-03-20 Sudakshina Das <sudi.das@arm.com>
4443
4444 PR target/82989
4445 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
4446 to favor GPR over NEON registers.
4447 (<shift>di3_neon): Likewise.
4448
4449 2018-03-20 Tom de Vries <tom@codesourcery.com>
4450
4451 PR target/84952
4452 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
4453 (nvptx_process_pars): Emit bar.sync asap and alap.
4454
4455 2018-03-20 Tom de Vries <tom@codesourcery.com>
4456
4457 PR target/84954
4458 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
4459 seen_label if seen_label is already set.
4460
4461 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4462
4463 PR target/84945
4464 * config/i386/i386.c (fold_builtin_cpu): For features above 31
4465 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
4466 Use 1U instead of 1. Formatting fixes.
4467
4468 PR c/84953
4469 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
4470 instead of TREE_TYPE (s1) for the return value.
4471
4472 2018-03-19 Jakub Jelinek <jakub@redhat.com>
4473
4474 PR tree-optimization/84946
4475 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
4476 bitsize + bitsize in poly_uint64 rather than poly_int64.
4477
4478 PR sanitizer/78651
4479 * dwarf2asm.c: Include fold-const.c.
4480 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
4481 of decl rather than decl itself.
4482
4483 PR rtl-optimization/84643
4484 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
4485
4486 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
4487
4488 PR sanitizer/78651
4489 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
4490 calling assemble_variable.
4491
4492 2018-03-19 Sudakshina Das <sudi.das@arm.com>
4493
4494 PR target/81647
4495 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
4496 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
4497
4498 2018-03-19 Jim Wilson <jimw@sifive.com>
4499
4500 PR bootstrap/84856
4501 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
4502 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
4503 (riscv_first_stack_step): Likewise.
4504 (riscv_option_override): Use STACK_BOUNDARY instead of
4505 MIN_STACK_BOUNDARY.
4506 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
4507 MIN_STACK_BOUNDARY.
4508 (BIGGEST_ALIGNMENT): Set to 128.
4509 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
4510 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
4511 STACK_BOUNDARY.
4512
4513 2018-03-19 Richard Biener <rguenther@suse.de>
4514
4515 PR tree-optimization/84933
4516 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
4517 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
4518
4519 2018-03-19 Richard Biener <rguenther@suse.de>
4520
4521 PR tree-optimization/84859
4522 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
4523 (cond_if_else_store_replacement): Perform sinking operation on
4524 single-store BBs regardless of MAX_STORES_TO_SINK setting.
4525 Generalize what a BB with a single eligible store is.
4526
4527 2018-03-19 Richard Biener <rguenther@suse.de>
4528
4529 PR tree-optimization/84929
4530 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
4531 chrec_is_positive against non-chrec arg.
4532
4533 2018-03-19 Tamar Christina <tamar.christina@arm.com>
4534
4535 PR target/84711
4536 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
4537
4538 2018-03-18 Martin Liska <mliska@suse.cz>
4539
4540 PR rtl-optimization/84635
4541 * regrename.c (build_def_use): Use matches_mode only when
4542 matches >= 0.
4543
4544 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
4545
4546 PR tree-optimization/84913
4547 * tree-vect-loop.c (vectorizable_reduction): Don't try to
4548 vectorize chains of COND_EXPRs.
4549
4550 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4551
4552 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
4553
4554 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4555
4556 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
4557
4558 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4559
4560 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
4561
4562 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4563 Kito Cheng <kito.cheng@gmail.com>
4564
4565 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
4566 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
4567 (nds32_adjust_reg_alloc_order): New function.
4568 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
4569
4570 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
4571
4572 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
4573 nds32_print_operand, nds32_print_operand_address): Use
4574 HOST_WIDE_INT_PRINT_DEC instead.
4575
4576 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4577
4578 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
4579
4580 2018-03-17 Jakub Jelinek <jakub@redhat.com>
4581
4582 PR target/84902
4583 * config/i386/i386.c (initial_ix86_tune_features,
4584 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
4585 unsigned long long.
4586 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
4587 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
4588 rather than 1u << ix86_tune. Formatting fix.
4589 (ix86_option_override_internal): Change ix86_arch_mask from
4590 unsigned int to unsigned HOST_WIDE_INT, initialize to
4591 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
4592 (ix86_function_specific_restore): Likewise.
4593
4594 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4595
4596 PR target/84899
4597 * postreload.c (reload_combine_recognize_pattern): Perform
4598 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
4599 truncate_int_for_mode the result for the destination's mode.
4600
4601 PR c/84909
4602 * hsa-gen.c (mem_type_for_type): Fix comment typo.
4603 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
4604 Likewise.
4605 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4606 Likewise.
4607
4608 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
4609
4610 PR target/84876
4611 * lra-assigns.c (lra_split_hard_reg_for): Don't use
4612 regno_allocno_class_array and sorted_pseudos.
4613 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
4614 insns where regno is used.
4615
4616 2018-03-16 Martin Liska <mliska@suse.cz>
4617
4618 PR ipa/84833
4619 * multiple_target.c (create_dispatcher_calls): Redirect
4620 reference in the symbol table.
4621
4622 2018-03-16 Martin Liska <mliska@suse.cz>
4623
4624 PR ipa/84722
4625 * multiple_target.c (create_dispatcher_calls): Redirect also
4626 an alias.
4627
4628 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4629
4630 PR c++/79937
4631 PR c++/82410
4632 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
4633 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
4634 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
4635
4636 2018-03-16 Julia Koval <julia.koval@intel.com>
4637
4638 * doc/invoke.texi (Skylake Server): Add CLWB.
4639 Cannonlake): Remove CLWB.
4640
4641 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4642
4643 PR tree-optimization/84841
4644 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
4645 1 << 3.
4646 (FLOAT_ONE_CONST_TYPE): Define.
4647 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
4648 (sort_by_operand_rank): Put entries with higher constant_type last
4649 rather than first to match comments.
4650
4651 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
4652
4653 * config/nios2/nios2.md (movsi_internal): Fix thinko in
4654 split predicate.
4655
4656 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4657
4658 PR c++/79085
4659 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
4660 check and use address of target always.
4661
4662 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
4663
4664 PR target/84574
4665 * config/i386/i386.c (indirect_thunk_needed): Update comments.
4666 (indirect_thunk_bnd_needed): Likewise.
4667 (indirect_thunks_used): Likewise.
4668 (indirect_thunks_bnd_used): Likewise.
4669 (indirect_return_needed): New.
4670 (indirect_return_bnd_needed): Likewise.
4671 (output_indirect_thunk_function): Add a bool argument for
4672 function return.
4673 (output_indirect_thunk_function): Don't generate alias for
4674 function return thunk.
4675 (ix86_code_end): Call output_indirect_thunk_function to generate
4676 function return thunks.
4677 (ix86_output_function_return): Set indirect_return_bnd_needed
4678 and indirect_return_needed instead of indirect_thunk_bnd_needed
4679 and indirect_thunk_needed.
4680
4681 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
4682
4683 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
4684 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
4685 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
4686
4687 2018-03-15 David Malcolm <dmalcolm@redhat.com>
4688 Paul Hua <paul.hua.gm@gmail.com>
4689
4690 PR c/84852
4691 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
4692
4693 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
4694
4695 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
4696 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
4697 resp. SFmode cases.
4698
4699 2018-03-15 Tamar Christina <tamar.christina@arm.com>
4700
4701 PR target/84711
4702 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4703 instead of GET_MODE_SIZE when comparing Units.
4704
4705 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4706
4707 PR target/68256
4708 * varasm.c (hash_section): Return an unchangeble hash value
4709 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
4710 Return !aarch64_can_use_per_function_literal_pools_p ().
4711
4712 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR target/84860
4715 * optabs.c (emit_conditional_move): Pass address of cmode's copy
4716 rather than address of cmode as last argument to prepare_cmp_insn.
4717
4718 2018-03-15 Julia Koval <julia.koval@intel.com>
4719
4720 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
4721 F_AVX512VNNI, F_AVX512BITALG): New.
4722
4723 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
4724
4725 PR target/83451
4726 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
4727 insn for floating-point loads and stores.
4728
4729 2018-03-14 Carl Love <cel@us.ibm.com>
4730
4731 * config/rs6000/rs6000-c.c: Add macro definitions for
4732 ALTIVEC_BUILTIN_VEC_PERMXOR.
4733 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
4734 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
4735 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
4736 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
4737 UNSPEC_VPERMXOR.
4738 * config/doc/extend.texi: Add prototypes for vec_permxor.
4739
4740 2018-03-14 David Malcolm <dmalcolm@redhat.com>
4741
4742 PR c/84852
4743 * diagnostic-show-locus.c (class layout_point): Convert m_line
4744 from int to linenum_type.
4745 (line_span::comparator): Use linenum "compare" function when
4746 comparing line numbers.
4747 (test_line_span): New function.
4748 (layout_range::contains_point): Convert param "row" from int to
4749 linenum_type.
4750 (layout_range::intersects_line_p): Likewise.
4751 (layout::will_show_line_p): Likewise.
4752 (layout::print_source_line): Likewise.
4753 (layout::should_print_annotation_line_p): Likewise.
4754 (layout::print_annotation_line): Likewise.
4755 (layout::print_leading_fixits): Likewise.
4756 (layout::annotation_line_showed_range_p): Likewise.
4757 (struct line_corrections): Likewise for field m_row.
4758 (line_corrections::line_corrections): Likewise for param "row".
4759 (layout::print_trailing_fixits): Likewise.
4760 (layout::get_state_at_point): Likewise.
4761 (layout::get_x_bound_for_row): Likewise.
4762 (layout::print_line): Likewise.
4763 (diagnostic_show_locus): Likewise for locals "last_line" and
4764 "row".
4765 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
4766 * input.c (selftest::test_linenum_comparisons): New function.
4767 (selftest::input_c_tests): Call it.
4768 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
4769 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
4770 * selftest.h (ASSERT_GT): New macro.
4771 (ASSERT_GT_AT): New macro.
4772 (ASSERT_LT): New macro.
4773 (ASSERT_LT_AT): New macro.
4774
4775 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
4776
4777 PR rtl-optimization/84780
4778 * combine.c (distribute_links): Don't make a link based on pc_rtx.
4779
4780 2018-03-14 Martin Liska <mliska@suse.cz>
4781
4782 * tree.c (record_node_allocation_statistics): Use
4783 get_stats_node_kind.
4784 (get_stats_node_kind): New function extracted from
4785 record_node_allocation_statistics.
4786 (free_node): Use get_stats_node_kind.
4787
4788 2018-03-14 Richard Biener <rguenther@suse.de>
4789
4790 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
4791 that the value-set of ANTIC_IN doesn't grow.
4792
4793 Revert
4794 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4795 member.
4796 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4797 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4798
4799 2018-03-14 Julia Koval <julia.koval@intel.com>
4800
4801 * config.gcc (icelake-client, icelake-server): New.
4802 (icelake): Remove.
4803 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
4804 (initial_ix86_arch_features): Ditto.
4805 (PTA_SKYLAKE): Add SGX.
4806 (PTA_ICELAKE): Remove.
4807 (PTA_ICELAKE_CLIENT): New.
4808 (PTA_ICELAKE_SERVER): New.
4809 (ix86_option_override_internal): Split up icelake on icelake client and
4810 icelake server.
4811 (get_builtin_code_for_version): Ditto.
4812 (fold_builtin_cpu): Ditto.
4813 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
4814 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
4815 * config/i386/i386.h (processor_type): Ditto.
4816 * doc/invoke.texi: Ditto.
4817
4818 2018-03-14 Jakub Jelinek <jakub@redhat.com>
4819
4820 PR sanitizer/83392
4821 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
4822 INTEGER_CST offset, add it together with bitpos / 8 and
4823 sign extend based on POINTER_SIZE.
4824
4825 PR target/84844
4826 Revert
4827 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
4828
4829 PR target/78090
4830 * config/i386/constraints.md (Yc): New register constraint.
4831 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
4832 Use Yc constraint for alternative 2 of operand 0. Remove
4833 preferred_for_speed attribute.
4834
4835 2018-03-14 Richard Biener <rguenther@suse.de>
4836
4837 PR tree-optimization/84830
4838 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
4839 with the old one to avoid oscillations.
4840
4841 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
4842
4843 PR target/83712
4844 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
4845 pseudos.
4846 (assign_by_spills): Return a flag of reload assignment failure.
4847 Do not process the reload assignment failures. Do not spill other
4848 reload pseudos if they has the same reg class. Update n if
4849 necessary.
4850 (lra_assign): Add a return arg. Set up from the result of
4851 assign_by_spills call.
4852 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4853 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4854 usage_insns if it is not NULL.
4855 (spill_hard_reg_in_range): New function.
4856 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4857 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4858 function prototypes.
4859 (lra_assign): Change prototype.
4860 * lra.c (lra): Add code to deal with fails by splitting hard reg
4861 live ranges.
4862
4863 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
4864
4865 * config/riscv/riscv.opt (mrelax): New option.
4866 * config/riscv/riscv.c (riscv_file_start): Emit ".option
4867 "norelax" when riscv_mrelax is disabled.
4868 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
4869
4870 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4871
4872 PR target/84743
4873 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
4874 reassociation for int modes.
4875
4876 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4877
4878 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
4879 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
4880 for big-endian.
4881 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
4882 * config/aarch64/aarch64-sve.md
4883 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
4884 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
4885 (*extend<mode><Vwide>2): Rename to...
4886 (aarch64_sve_extend<mode><Vwide>2): ...this.
4887 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
4888 renaming the old pattern to...
4889 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
4890 unsigned packs.
4891 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
4892 define_expand, renaming the old pattern to...
4893 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
4894 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
4895 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
4896 account when deciding which SVE instruction the optab should use.
4897 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
4898
4899 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4900
4901 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
4902 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
4903 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
4904 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
4905 (tlsdesc_small_<mode>): Turn a define_expand and use
4906 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
4907 (tlsdesc_small_advsimd_<mode>): ...this.
4908 (tlsdesc_small_sve_<mode>): New pattern.
4909
4910 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4911
4912 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
4913 (UNSPEC_UMUL_HIGHPART): New constants.
4914 (MUL_HIGHPART): New int iteraor.
4915 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
4916 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
4917 define_expand.
4918 (*<su>mul<mode>3_highpart): New define_insn.
4919
4920 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4921
4922 PR lto/84805
4923 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4924 incomplete types.
4925
4926 2018-03-13 Martin Liska <mliska@suse.cz>
4927
4928 PR ipa/84658.
4929 * (sem_item_optimizer::sem_item_optimizer): Initialize new
4930 vector.
4931 (sem_item_optimizer::~sem_item_optimizer): Release it.
4932 (sem_item_optimizer::merge_classes): Register variable aliases.
4933 (sem_item_optimizer::fixup_pt_set): New function.
4934 (sem_item_optimizer::fixup_points_to_sets): Likewise.
4935 * ipa-icf.h: Declare new variables and functions.
4936
4937 2018-03-13 Jakub Jelinek <jakub@redhat.com>
4938
4939 PR middle-end/84834
4940 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
4941 integer_pow2p@2 and test integer_pow2p in condition.
4942 (A < 0 ? C : 0): Similarly for @1.
4943
4944 PR middle-end/84831
4945 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
4946 characters starting at p contain '\0' character, don't look beyond
4947 that.
4948
4949 PR target/84827
4950 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
4951 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
4952
4953 PR target/84828
4954 * reg-stack.c (change_stack): Change update_end var from int to
4955 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
4956 also call set_block_for_insn on the newly added insns and rescan.
4957
4958 PR target/84786
4959 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
4960 on the last operand.
4961
4962 PR c++/84704
4963 * tree.c (stabilize_reference_1): Return save_expr (e) for
4964 STATEMENT_LIST even if it doesn't have side-effects.
4965
4966 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4967
4968 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
4969
4970 2018-03-12 Renlin Li <renlin.li@arm.com>
4971
4972 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
4973 aarch64_output_scalar_simd_mov_immediate.
4974
4975 2018-03-12 Martin Sebor <msebor@redhat.com>
4976
4977 PR tree-optimization/83456
4978 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
4979 for perfectly overlapping calls to memcpy.
4980 (gimple_fold_builtin_memory_chk): Same.
4981 (gimple_fold_builtin_strcpy): Handle no-warning.
4982 (gimple_fold_builtin_stxcpy_chk): Same.
4983 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
4984
4985 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4986
4987 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
4988 parameter. Use it for SFmode.
4989 (rs6000_function_arg_advance_1): Adjust.
4990 (rs6000_function_arg): Adjust.
4991 (rs6000_gimplify_va_arg): Pass false for that new parameter.
4992
4993 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4994
4995 PR rtl-optimization/84169
4996 PR rtl-optimization/84780
4997 * combine.c (can_combine_p): Check for a 2-insn combination whether
4998 the destination register is used between the two insns, too.
4999
5000 2018-03-12 Richard Biener <rguenther@suse.de>
5001
5002 PR tree-optimization/84803
5003 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5004 for refs DR analysis didn't process.
5005
5006 2018-03-12 Richard Biener <rguenther@suse.de>
5007
5008 PR tree-optimization/84777
5009 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5010 force-vectorize loops ignore whether we are optimizing for size.
5011
5012 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
5013
5014 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5015 (TARGET_MD_ASM_ADJUST): Define.
5016
5017 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
5018 Kito Cheng <kito.cheng@gmail.com>
5019 Chung-Ju Wu <jasonwucj@gmail.com>
5020
5021 * config/nds32/nds32.c (nds32_compute_stack_frame,
5022 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5023 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5024 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5025 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5026 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5027 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5028 * config/nds32/nds32.md (prologue, epilogue): Use macro
5029 NDS32_V3PUSH_AVAILABLE_P to do checking.
5030
5031 2018-03-11 Jakub Jelinek <jakub@redhat.com>
5032
5033 PR debug/58150
5034 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5035 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5036 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
5037 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
5038 addition of most attributes on !orig_type_die or the attribute not
5039 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5040
5041 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5042 Chung-Ju Wu <jasonwucj@gmail.com>
5043
5044 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5045 __NDS32_VH__ macro.
5046 * config/nds32/nds32.opt (mvh): New option.
5047
5048 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5049 Chung-Ju Wu <jasonwucj@gmail.com>
5050
5051 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5052 function.
5053 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5054 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5055 definition.
5056
5057 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5058 Chung-Ju Wu <jasonwucj@gmail.com>
5059
5060 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5061 function.
5062 * config/nds32/nds32-multiple.md (strlensi): New pattern.
5063 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5064
5065 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
5066 Kito Cheng <kito.cheng@gmail.com>
5067 Chung-Ju Wu <jasonwucj@gmail.com>
5068
5069 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5070 UNSPEC_FFMISM and UNSPEC_FLMISM.
5071 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5072 for ffb, ffmism and flmism.
5073 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5074 (unspec_ffmism): Ditto.
5075 (unspec_flmism): Ditto.
5076 (nds32_expand_builtin_impl): Check if string extension is available.
5077 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5078 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5079
5080 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
5081
5082 Reverting patch:
5083 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
5084
5085 PR target/83712
5086 * lra-assigns.c (assign_by_spills): Return a flag of reload
5087 assignment failure. Do not process the reload assignment
5088 failures. Do not spill other reload pseudos if they has the same
5089 reg class.
5090 (lra_assign): Add a return arg. Set up from the result of
5091 assign_by_spills call.
5092 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5093 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5094 usage_insns if it is not NULL.
5095 (spill_hard_reg_in_range): New function.
5096 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5097 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5098 function prototypes.
5099 (lra_assign): Change prototype.
5100 * lra.c (lra): Add code to deal with fails by splitting hard reg
5101 live ranges.
5102
5103 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
5104
5105 PR target/84807
5106 * config/i386/i386.opt: Replace Enforcment with Enforcement.
5107
5108 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
5109
5110 PR debug/84620
5111 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5112 (dw_val_node): Add val_symbolic_view.
5113 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5114 (symview_upper_bound): New.
5115 (new_line_info_table): Initialize symviews_since_reset.
5116 (dwarf2out_source_line): Count symviews_since_reset and set
5117 symview_upper_bound.
5118 (dw_val_equal_p): Handle symview.
5119 (add_AT_symview): New.
5120 (print_dw_val): Handle symview.
5121 (attr_checksum, attr_checksum_ordered): Likewise.
5122 (same_dw_val_p, size_of_die): Likewise.
5123 (value_format, output_die): Likewise.
5124 (add_high_low_attributes): Use add_AT_symview for entry_view.
5125 (dwarf2out_finish): Reset symview_upper_bound, clear
5126 zero_view_p.
5127
5128 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
5129
5130 PR target/83969
5131 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5132 Add strict argument and use it.
5133 (rs6000_split_multireg_move): Update for new strict argument.
5134 (mem_operand_gpr): Disallow all non-offsettable addresses.
5135 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5136
5137 2018-03-09 Jakub Jelinek <jakub@redhat.com>
5138
5139 PR target/84772
5140 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5141 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5142 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5143
5144 PR c++/84767
5145 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5146 decl, use remap_type if we want to use the type.
5147
5148 2018-03-09 Martin Sebor <msebor@redhat.com>
5149
5150 PR tree-optimization/84526
5151 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5152 Remove dead code.
5153 (builtin_access::generic_overlap): Be prepared to handle non-array
5154 base objects.
5155
5156 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
5157
5158 PR rtl-optimization/84682
5159 * lra-constraints.c (process_address_1): Check is_address flag
5160 for address constraints.
5161 (process_alt_operands): Likewise.
5162 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5163 preprocess_constraints.
5164 * recog.h (preprocess_constraints): Add oploc parameter.
5165 Adjust callers.
5166 * recog.c (preprocess_constraints): Test address_operand for
5167 CT_ADDRESS constraints.
5168
5169 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
5170
5171 PR target/83712
5172 * lra-assigns.c (assign_by_spills): Return a flag of reload
5173 assignment failure. Do not process the reload assignment
5174 failures. Do not spill other reload pseudos if they has the same
5175 reg class.
5176 (lra_assign): Add a return arg. Set up from the result of
5177 assign_by_spills call.
5178 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5179 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5180 usage_insns if it is not NULL.
5181 (spill_hard_reg_in_range): New function.
5182 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5183 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5184 function prototypes.
5185 (lra_assign): Change prototype.
5186 * lra.c (lra): Add code to deal with fails by splitting hard reg
5187 live ranges.
5188
5189 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5190
5191 PR target/83193
5192 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5193 Accept complain bool parameter. Only emit errors if it is true.
5194 (arm_parse_cpu_option_name): Likewise.
5195 (arm_target_thumb_only): Adjust callers of the above.
5196 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
5197 prototype to take a default true bool parameter.
5198 (arm_parse_arch_option_name): Likewise.
5199
5200 2018-03-09 David Malcolm <dmalcolm@redhat.com>
5201 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5202
5203 PR jit/64089
5204 PR jit/84288
5205 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
5206 * configure: Regenerate.
5207 * configure.ac ("linker --version-script option"): New.
5208 ("linker soname option"): New.
5209
5210 2018-03-09 Richard Biener <rguenther@suse.de>
5211
5212 PR tree-optimization/84775
5213 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
5214 immediate uses of predicate stmts and mark them modified.
5215
5216 Revert
5217 PR tree-optimization/84178
5218 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5219 to caller.
5220 (version_loop_for_if_conversion): Delay update_ssa call.
5221 (tree_if_conversion): Delay update_ssa until after predicate
5222 insertion.
5223
5224 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
5225
5226 PR target/84763
5227 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
5228 when the function accesses prior frames.
5229
5230 2018-03-08 Jakub Jelinek <jakub@redhat.com>
5231
5232 PR debug/84456
5233 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
5234 gen_llsym, otherwise call maybe_gen_llsym.
5235
5236 PR inline-asm/84742
5237 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
5238 has ',' character inside of it.
5239
5240 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5241
5242 PR target/84748
5243 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
5244 as clobbering CC_REGNUM.
5245
5246 2018-03-08 Richard Biener <rguenther@suse.de>
5247
5248 PR middle-end/84552
5249 * tree-scalar-evolution.c: Include tree-into-ssa.h.
5250 (follow_copies_to_constant): Do not follow SSA names registered
5251 for update.
5252
5253 2018-03-08 Richard Biener <rguenther@suse.de>
5254
5255 PR tree-optimization/84178
5256 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5257 to caller.
5258 (version_loop_for_if_conversion): Delay update_ssa call.
5259 (tree_if_conversion): Delay update_ssa until after predicate
5260 insertion.
5261
5262 2018-03-08 David Malcolm <dmalcolm@redhat.com>
5263
5264 PR tree-optimization/84178
5265 * tree-if-conv.c (release_bb_predicate): Remove the
5266 the assertion that the stmts have NULL use_ops.
5267 Discard the statements, asserting that they haven't
5268 yet been added to a BB.
5269
5270 2018-03-08 Richard Biener <rguenther@suse.de>
5271
5272 PR tree-optimization/84746
5273 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
5274 (phi_translate): Pass in destination ANTIC_OUT set.
5275 (phi_translate_1): Likewise. For a simplified result lookup
5276 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
5277 (phi_translate_set): Adjust.
5278 (do_pre_regular_insertion): Likewise.
5279 (do_pre_partial_partial_insertion): Likewise.
5280
5281 2018-03-08 Martin Liska <mliska@suse.cz>
5282
5283 PR gcov-profile/84735
5284 * doc/gcov.texi: Document usage of profile files.
5285 * gcov-io.h: Document changes in the format.
5286
5287 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
5288
5289 PR debug/84404
5290 PR debug/84408
5291 * dwarf2out.c (struct dw_line_info_table): Update comments for
5292 view == -1.
5293 (FORCE_RESET_NEXT_VIEW): New.
5294 (FORCE_RESETTING_VIEW_P): New.
5295 (RESETTING_VIEW_P): Check for -1 too.
5296 (ZERO_VIEW_P): Likewise.
5297 (new_line_info_table): Force-reset next view.
5298 (dwarf2out_begin_function): Likewise.
5299 (dwarf2out_source_line): Simplify zero_view_p initialization.
5300 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
5301 view directly. Omit view when omitting .loc at line 0.
5302
5303 2018-03-08 Jakub Jelinek <jakub@redhat.com>
5304
5305 PR tree-optimization/84740
5306 * tree-switch-conversion.c (process_switch): Call build_constructors
5307 only if info.phi_count is non-zero.
5308
5309 PR tree-optimization/84739
5310 * tree-tailcall.c (find_tail_calls): Check call arguments against
5311 DECL_ARGUMENTS (current_function_decl) rather than
5312 DECL_ARGUMENTS (func) when checking for tail recursion.
5313
5314 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5315
5316 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
5317 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
5318 Volker Reichelt's entry and add entries for people that perform
5319 GCC fuzzy testing and report numerous bugs.
5320
5321 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
5322
5323 PR target/82411
5324 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
5325 readonly data in sdata, if that is disabled.
5326 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
5327 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
5328 -mreadonly-in-sdata option.
5329
5330 2018-03-07 Martin Sebor <msebor@redhat.com>
5331
5332 PR tree-optimization/84468
5333 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
5334 basic block when looking for nul assignment.
5335
5336 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
5337
5338 PR target/84277
5339 * except.h (output_function_exception_table): Adjust prototype.
5340 * except.c (output_function_exception_table): Remove FNNAME parameter
5341 and add SECTION parameter. Ouput one part of the table at a time.
5342 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
5343 the first part of the exception table and emit unwind directives.
5344 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
5345 (i386_pe_seh_cold_init): Likewise.
5346 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
5347 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
5348 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
5349 (ix86_output_call_insn): Emit a nop in one more case for SEH.
5350 * config/i386/winnt.c: Include except.h.
5351 (struct seh_frame_state): Add reg_offset, after_prologue and
5352 in_cold_section fields.
5353 (i386_pe_seh_end_prologue): Set seh->after_prologue.
5354 (i386_pe_seh_cold_init): New function.
5355 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5356 to seh->in_cold_section.
5357 (seh_emit_push): Record the offset of the push.
5358 (seh_emit_save): Record the offet of the save.
5359 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5360 Test seh->after_prologue to disregard the epilogue.
5361 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5362 (i386_pe_end_cold_function): New function.
5363
5364 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5365
5366 PR fortran/84565
5367 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5368 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5369
5370 PR c++/84704
5371 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5372 on tmp_var.
5373 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5374 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5375
5376 PR middle-end/84723
5377 * multiple_target.c: Include tree-inline.h and intl.h.
5378 (expand_target_clones): Diagnose and fail if node->definition and
5379 !tree_versionable_function_p (node->decl).
5380
5381 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
5382
5383 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5384 sprint_ul.
5385 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5386 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5387 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5388
5389 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR target/84710
5392 * combine.c (try_combine): Use reg_or_subregno instead of handling
5393 just paradoxical SUBREGs and REGs.
5394
5395 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
5396
5397 * config/arc/arc.c (arc_finalize_pic): Remove function.
5398 (arc_must_save_register): We use single base PIC register, remove
5399 checks to save/restore the PIC register.
5400 (arc_expand_prologue): Likewise.
5401 * config/arc/arc-protos.h (arc_set_default_type_attributes):
5402 Remove.
5403 (arc_verify_short): Likewise.
5404 (arc_attr_type): Likewise.
5405 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
5406 (walk_stores): Likewise.
5407 (arc_address_cost): Make it static.
5408 (arc_verify_short): Likewise.
5409 (branch_dest): Likewise.
5410 (arc_attr_type): Likewise.
5411 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
5412 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
5413 (arc_final_prescan_insn): Remove inserting the nops due to
5414 hardware hazards. It is done in reorg step.
5415 (insn_length_variant_t): Remove.
5416 (insn_length_parameters_t): Likewise.
5417 (arc_insn_length_parameters): Likewise.
5418 (arc_get_insn_variants): Likewise.
5419 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
5420
5421 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5422
5423 PR inline-asm/84683
5424 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
5425 assertion failure.
5426
5427 PR tree-optimization/84687
5428 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
5429 on new_node->decl.
5430 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
5431
5432 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5433
5434 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
5435 Rename to ppc_speculation_barrier.
5436 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
5437 __builtin_ppc_speculation_barrier.
5438
5439 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5440
5441 PR target/84700
5442 * combine.c (combine_simplify_rtx): Don't try to simplify if
5443 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
5444 are equal to x.
5445
5446 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
5447
5448 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
5449 to 32 bytes when compiling for POWER9.
5450
5451 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5452
5453 PR target/84564
5454 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
5455 regparm >= 3 with no arg reg available also for calls with
5456 flag_force_indirect_call. Pass decl to ix86_function_regparm.
5457
5458 PR target/84524
5459 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
5460 orig,vex.
5461 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
5462
5463 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
5464
5465 PR target/84264
5466 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
5467
5468 2018-03-05 Richard Biener <rguenther@suse.de>
5469
5470 PR tree-optimization/84486
5471 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
5472 When inserting a __builtin_assume_aligned call set the LHS
5473 SSA name alignment info accordingly.
5474
5475 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
5476
5477 PR tree-optimization/84114
5478 * config/aarch64/aarch64.c (aarch64_reassociation_width)
5479 Avoid reassociation of FLOAT_MODE addition.
5480
5481 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
5482
5483 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
5484 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
5485 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
5486 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
5487 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
5488 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
5489 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
5490 and -mwbnoinvd.
5491 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
5492 __builtin_ia32_wbinvd): New builtins.
5493 (SPECIAL_ARGS2): New.
5494 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
5495 (SPECIAL_ARGS2): New.
5496 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
5497 (ix86_valid_target_attribute_inner_p): Ditto.
5498 (ix86_init_mmx_sse_builtins): Add special_args2.
5499 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
5500 TARGET_WBNOINVD_P): New.
5501 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
5502 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
5503 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
5504 * config/i386/immintrin.h (_wbinvd): New intrinsic.
5505 * config/i386/pconfigintrin.h: New file.
5506 * config/i386/wbnoinvdintrin.h: Ditto.
5507 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
5508 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
5509
5510 2018-03-05 Richard Biener <rguenther@suse.de>
5511
5512 PR tree-optimization/84670
5513 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5514 member.
5515 (BB_VISITED_WITH_VISITED_SUCCS): New define.
5516 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5517 (compute_antic_aux): Only assert the number of values in ANTIC_IN
5518 doesn't grow if all successors (recursively) were visited at least
5519 once.
5520
5521 2018-03-05 Richard Biener <rguenther@suse.de>
5522
5523 PR tree-optimization/84650
5524 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
5525 if executed in the loop pipeline.
5526
5527 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
5528
5529 * doc/configfiles.texi (Configuration Files): Move info about
5530 conditionalizing $target-protos.h to...
5531 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
5532 differs from $target-protos.h.
5533
5534 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
5535 Chung-Ju Wu <jasonwucj@gmail.com>
5536
5537 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
5538 * config/nds32/nds32-multiple.md (setmemsi): Define.
5539 * config/nds32/nds32-memory-manipulation.c
5540 (nds32_gen_dup_4_byte_to_word_value): New.
5541 (emit_setmem_word_loop): New.
5542 (emit_setmem_byte_loop): New.
5543 (nds32_expand_setmem_loop): New.
5544 (nds32_expand_setmem_loop_v3m): New.
5545 (nds32_expand_setmem_unroll): New.
5546 (nds32_expand_setmem): New.
5547
5548 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5549 Chung-Ju Wu <jasonwucj@gmail.com>
5550
5551 * config/nds32/nds32-memory-manipulation.c
5552 (nds32_emit_load_store): New.
5553 (nds32_emit_post_inc_load_store): New.
5554 (nds32_emit_mem_move): New.
5555 (nds32_emit_mem_move_block): New.
5556 (nds32_expand_movmemsi_loop_unknown_size): New.
5557 (nds32_expand_movmemsi_loop_known_size): New.
5558 (nds32_expand_movmemsi_loop): New.
5559 (nds32_expand_movmemsi_unroll): New.
5560 (nds32_expand_movmemqi): Rename ...
5561 (nds32_expand_movmemsi): ... to this.
5562 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
5563 (movmemsi): ... to this.
5564 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
5565 (nds32_expand_movmemsi): ... to this.
5566
5567 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5568 Monk Chiang <sh.chiang04@gmail.com>
5569 Chung-Ju Wu <jasonwucj@gmail.com>
5570
5571 * config/nds32/nds32-protos.h
5572 (nds32_expand_load_multiple): New arguments.
5573 (nds32_expand_store_multiple): Ditto.
5574 (nds32_valid_multiple_load_store): Rename ...
5575 (nds32_valid_multiple_load_store_p): ... to this.
5576 * config/nds32/nds32-memory-manipulation.c
5577 (nds32_expand_load_multiple): Refine implementation.
5578 (nds32_expand_store_multiple): Ditto.
5579 * config/nds32/nds32-multiple.md
5580 (load_multiple): Update nds32_expand_load_multiple interface.
5581 (store_multiple): Update nds32_expand_store_multiple interface.
5582 * config/nds32/nds32-predicates.c
5583 (nds32_valid_multiple_load_store): Rename ...
5584 (nds32_valid_multiple_load_store_p): ... to this and refine
5585 implementation.
5586 * config/nds32/predicates.md
5587 (nds32_load_multiple_and_update_address_operation): New predicate.
5588 (nds32_store_multiple_and_update_address_operation): New predicate.
5589
5590 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5591 Chung-Ju Wu <jasonwucj@gmail.com>
5592
5593 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
5594 (combo): New attribute.
5595 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
5596
5597 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
5598
5599 * config/nds32/nds32.opt: Change -mcmodel= default value.
5600
5601 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
5602 Monk Chiang <sh.chiang04@gmail.com>
5603 Chung-Ju Wu <jasonwucj@gmail.com>
5604
5605 * config/nds32/constants.md (unspec_element): New enum.
5606 * config/nds32/constraints.md (Umw): New constraint.
5607 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
5608 * config/nds32/nds32-intrinsic.md: Likewise.
5609 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
5610 (nds32_valid_smw_lwm_base_p): New.
5611 (nds32_output_smw_single_word): New.
5612 (nds32_output_lmw_single_word): New.
5613 (nds32_expand_unaligned_load): New.
5614 (nds32_expand_unaligned_store): New.
5615 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
5616 (nds32_output_smw_single_word): Declare.
5617 (nds32_output_lmw_single_word): Declare.
5618 (nds32_expand_unaligned_load): Declare.
5619 (nds32_expand_unaligned_store): Declare.
5620 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
5621 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
5622 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
5623 NDS32_BUILTIN_UASTORE_DW.
5624 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
5625 predicate.
5626
5627 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
5628 Kito Cheng <kito.cheng@gmail.com>
5629 Chung-Ju Wu <jasonwucj@gmail.com>
5630
5631 * config/nds32/nds32-intrinsic.c
5632 (nds32_expand_builtin_null_ftype_reg): Delete.
5633 (nds32_expand_builtin_reg_ftype_imm): Ditto.
5634 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
5635 (nds32_read_argument): New.
5636 (nds32_legitimize_target): Ditto.
5637 (nds32_legitimize_argument): Ditto.
5638 (nds32_check_constant_argument): Ditto.
5639 (nds32_expand_unop_builtin): Ditto.
5640 (nds32_expand_unopimm_builtin): Ditto.
5641 (nds32_expand_binop_builtin): Ditto.
5642 (nds32_builtin_decl_impl): Ditto.
5643 (builtin_description): Ditto.
5644 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
5645 (nds32_init_builtins_impl): Ditto.
5646 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
5647 (nds32_builtin_decl): New.
5648 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
5649 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
5650
5651 2018-03-02 Jeff Law <law@redhat.com>
5652
5653 * reorg.c (stop_search_p): Handle DEBUG_INSN.
5654 (redundant_insn, fill_simple_delay_slots): Likewise.
5655 (fill_slots_from_thread): Likewise.
5656 * resource.c (mark_referenced_resources): Likewise.
5657 (mark_set_resources, find_dead_or_set_registers): Likewise.
5658
5659 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5660
5661 * substring-locations.h (format_warning_va): Formatting fix for
5662 ATTRIBUTE_GCC_DIAG.
5663 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
5664 argument.
5665 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
5666 * substring-locations.c: Include intl.h.
5667 (format_warning_va): Turned into small wrapper around
5668 format_warning_n_va, renamed to ...
5669 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
5670 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
5671 use ngettext.
5672 (format_warning_at_substring_n): New function.
5673 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
5674 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
5675 format_warning_at_substring with just a shorter name instead of
5676 const function pointer.
5677 (fmtwarn_n): New function.
5678 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
5679 appropriate, get rid of all the fmtstr temporaries, move conditionals
5680 with G_() wrapped string literals directly into fmtwarn arguments,
5681 cast dir.len to (int), formatting fixes.
5682
5683 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5684
5685 * doc/invoke.texi: Remove "Cilk Plus" references.
5686
5687 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5688 Richard Biener <rguenther@suse.de>
5689
5690 PR ipa/84628
5691 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
5692 for error or warning attributes if CALL_FROM_THUNK_P is set.
5693 Formatting fixes.
5694
5695 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5696
5697 PR target/56540
5698 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
5699 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
5700
5701 PR target/56540
5702 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
5703 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
5704
5705 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
5706 instead of -1U in last predictors element's probability member.
5707
5708 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5709
5710 PR ipa/83983
5711 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5712 arguments if they are comparable.
5713
5714 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5715
5716 PR tree-optimization/84634
5717 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
5718 masks and masked_loop_p with a single loop_masks, making sure it's
5719 null for bb vectorization.
5720
5721 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5722
5723 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5724 (vect_analyze_data_ref_access): Use loop->safe_len rather than
5725 loop->force_vectorize to check whether there is no alias.
5726
5727 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5728
5729 PR target/84614
5730 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
5731 prototypes.
5732 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
5733 comments.
5734 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
5735 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
5736 instead of a loop around prev_real_insn.
5737 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
5738 prev_real_insn.
5739
5740 PR inline-asm/84625
5741 * config/i386/i386.c (ix86_print_operand): Use conditional
5742 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
5743 zero vector.
5744
5745 2018-03-02 Richard Biener <rguenther@suse.de>
5746
5747 PR tree-optimization/84427
5748 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
5749 (bitmap_set_subtract_values): Rewrite to handle multiple
5750 exprs per value.
5751 (clean): Likewise.
5752 (prune_clobbered_mems): Likewise.
5753 (phi_translate): Take edge instead of pred/phiblock.
5754 (phi_translate_1): Likewise.
5755 (phi_translate_set): Likewise. Insert all translated
5756 exprs for a value into the set, keeping possibly multiple
5757 expressions per value.
5758 (compute_antic_aux): Adjust for phi_translate changes.
5759 When intersecting union the expressions and prune those
5760 not in the final value set, keeping possibly multiple
5761 expressions per value. Do not use value-insertion
5762 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
5763 all expressions. Add verification that the value-sets
5764 only shrink during iteration.
5765 (compute_partial_antic_aux): Adjust for the phi_translate changes.
5766 (do_pre_regular_insertion): Likewise.
5767 (do_pre_partial_partial_insertion): Likewise.
5768
5769 2018-03-02 Richard Biener <rguenther@suse.de>
5770
5771 PR target/82005
5772 * config/darwin.c (saved_debug_info_level): New static global.
5773 (darwin_asm_lto_start): Disable debug info generation for LTO out.
5774 (darwin_asm_lto_end): Restore debug info generation settings.
5775
5776 2018-03-01 Martin Liska <mliska@suse.cz>
5777
5778 PR sanitizer/82484
5779 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
5780 volatile arguments.
5781
5782 2018-03-01 Richard Biener <rguenther@suse.de>
5783
5784 PR debug/84645
5785 * dwarf2out.c (gen_variable_die): Properly handle late VLA
5786 type annotation with LTO when debug was disabled at compile-time.
5787
5788 2018-03-01 Matthew Fortune <mfortune@gmail.com>
5789
5790 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
5791 XINT with INTVAL.
5792 (mips_final_postscan_insn): Likewise.
5793
5794 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
5795
5796 PR rtl-optimization/84528
5797 * alias.c (init_alias_target): Add commentary.
5798 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
5799 a unique base value if the frame pointer is not eliminated
5800 to the stack pointer.
5801
5802 2018-03-01 Tom de Vries <tom@codesourcery.com>
5803
5804 PR rtl-optimization/83327
5805 * lra-int.h (hard_regs_spilled_into): Declare.
5806 * lra.c (hard_regs_spilled_into): Define.
5807 (init_reg_info): Init hard_regs_spilled_into.
5808 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
5809 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
5810 (process_bb_lives): Handle hard_regs_spilled_into.
5811 (lra_create_live_ranges_1): Before doing liveness propagation, clear
5812 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
5813
5814 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
5815
5816 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
5817 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
5818 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
5819 * config/rs6000/aix72.h: New file.
5820
5821 2018-02-28 Jakub Jelinek <jakub@redhat.com>
5822
5823 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
5824 instead of warning_at with conditional singular and plural messages
5825 where possible.
5826
5827 PR target/52991
5828 * stor-layout.c (update_alignment_for_field): For
5829 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
5830 && !DECL_PACKED (field), do the alignment update, just use
5831 only desired_align instead of MAX (type_align, desired_align)
5832 as the alignment.
5833 (place_field): Don't do known_align < desired_align handling
5834 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
5835 is non-NULL, instead do it after rli->prev_field handling and
5836 only if not within a bitfield word. For DECL_PACKED (field)
5837 use type_align of BITS_PER_UNIT.
5838
5839 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5840
5841 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
5842 superfluous parentheses and trailing spaces.
5843
5844 2018-02-28 Richard Biener <rguenther@suse.de>
5845
5846 PR tree-optimization/84584
5847 * graphite-scop-detection.c (scop_detection::add_scop): Discard
5848 SCoPs with fake exit edge.
5849
5850 2018-02-28 Martin Liska <mliska@suse.cz>
5851
5852 PR testsuite/84597
5853 * timevar.c (timer::print): Fix format to properly print 100%
5854 values.
5855
5856 2018-02-28 Richard Biener <rguenther@suse.de>
5857
5858 PR middle-end/84607
5859 * genmatch.c (capture_info::walk_match): Do not mark
5860 captured expressions without operands as expr_p given
5861 they act more like predicates and should be subject to
5862 "lost tail" side-effect preserving.
5863
5864 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
5865
5866 PR rtl-optimization/81611
5867 * auto-inc-dec.c (attempt_change): Move dead note from
5868 mem_insn if it's the next use of regno
5869 (find_address): Take address use of reg holding
5870 non-incremented value. Add parm to limit search to the named
5871 reg only.
5872 (merge_in_block): Attempt to use a mem insn that is the next
5873 use of the original regno.
5874
5875 2018-02-27 Martin Sebor <msebor@redhat.com>
5876
5877 PR c++/83871
5878 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
5879 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
5880
5881 2018-02-27 Martin Sebor <msebor@redhat.com>
5882
5883 PR translation/84207
5884 * diagnostic-core.h (warning_n, error_n, inform_n): Change
5885 n argument to unsigned HOST_WIDE_INT.
5886 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
5887 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
5888 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
5889 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
5890
5891 2018-02-27 Richard Biener <rguenther@suse.de>
5892
5893 PR tree-optimization/84512
5894 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5895 Do not use the estimate returned from record_stmt_cost for
5896 the scalar iteration cost but sum properly using add_stmt_cost.
5897
5898 2018-02-27 Richard Biener <rguenther@suse.de>
5899
5900 PR tree-optimization/84466
5901 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5902 Adjust last change to less strictly validate use operands.
5903
5904 2018-02-27 Martin Liska <mliska@suse.cz>
5905
5906 PR gcov-profile/84548
5907 * gcov.c (process_file): Allow partial overlap and consider it
5908 also as group functions.
5909 (output_lines): Properly calculate range of lines for a group.
5910
5911 2018-02-27 Martin Liska <mliska@suse.cz>
5912
5913 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
5914 'ggc' suffixes. Change first column width.
5915 (timer::print): Fix formatting of the column.
5916
5917 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
5918
5919 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
5920 preserve inline entry blocks for the sake of debug inline
5921 entry point markers alone.
5922 (remove_unused_locals): Suggest in comments a better place to
5923 force the preservation of inline entry blocks that are
5924 otherwise unused, but do not preserve them.
5925
5926 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5927
5928 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
5929
5930 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5931
5932 PR target/84039
5933 * config/i386/constraints.md (Bs): Replace
5934 ix86_indirect_branch_register with
5935 TARGET_INDIRECT_BRANCH_REGISTER.
5936 (Bw): Likewise.
5937 * config/i386/i386.md (indirect_jump): Likewise.
5938 (tablejump): Likewise.
5939 (*sibcall_memory): Likewise.
5940 (*sibcall_value_memory): Likewise.
5941 Peepholes of indirect call and jump via memory: Likewise.
5942 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
5943 (*sibcall_value_GOT_32): Likewise.
5944 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5945 (GOT_memory_operand): Likewise.
5946 (call_insn_operand): Likewise.
5947 (sibcall_insn_operand): Likewise.
5948 (GOT32_symbol_operand): Likewise.
5949 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
5950
5951 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5952
5953 PR rtl-optimization/83496
5954 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
5955 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
5956 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
5957 redundant insn, if any.
5958 (relax_delay_slots): Likewise.
5959 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
5960
5961 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
5962
5963 PR tree-optimization/83965
5964 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
5965 that grouped statements are part of a reduction chain. Return
5966 true if the statement is not marked as a reduction itself but
5967 is part of a group.
5968 (vect_recog_dot_prod_pattern): Don't check whether the statement
5969 is part of a group here.
5970 (vect_recog_sad_pattern): Likewise.
5971 (vect_recog_widen_sum_pattern): Likewise.
5972
5973 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5974
5975 PR debug/84545
5976 * final.c (rest_of_clean_state): Also look for calls inside sequences.
5977
5978 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5979
5980 PR target/84530
5981 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
5982 the bool argument.
5983 (ix86_output_indirect_function_return): New prototype.
5984 (ix86_split_simple_return_pop_internal): Likewise.
5985 * config/i386/i386.c (indirect_return_via_cx): New.
5986 (indirect_return_via_cx_bnd): Likewise.
5987 (indirect_thunk_name): Handle return va CX_REG.
5988 (output_indirect_thunk_function): Create alias for
5989 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
5990 (ix86_output_indirect_jmp): Remove the bool argument.
5991 (ix86_output_indirect_function_return): New function.
5992 (ix86_split_simple_return_pop_internal): Likewise.
5993 * config/i386/i386.md (*indirect_jump): Don't pass false
5994 to ix86_output_indirect_jmp.
5995 (*tablejump_1): Likewise.
5996 (simple_return_pop_internal): Change it to define_insn_and_split.
5997 Call ix86_split_simple_return_pop_internal to split it for
5998 -mfunction-return=.
5999 (simple_return_indirect_internal): Call
6000 ix86_output_indirect_function_return instead of
6001 ix86_output_indirect_jmp.
6002
6003 2018-02-26 Jakub Jelinek <jakub@redhat.com>
6004
6005 PR bootstrap/84405
6006 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6007 memset and value initialization afterwards.
6008
6009 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
6010
6011 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6012
6013 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6014
6015 PR target/84521
6016 * common/config/aarch64/aarch64-common.c
6017 (aarch_option_optimization_table[]): Switch
6018 off fomit-frame-pointer
6019
6020 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
6021 Chung-Ju Wu <jasonwucj@gmail.com>
6022
6023 * config/nds32/nds32-multiple.md (load_multiple): Disallow
6024 volatile memory.
6025 (store_multiple): Ditto.
6026
6027 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
6028
6029 * config.gcc: Add --with-cpu support for nds32 target.
6030 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6031 * config/nds32/nds32.opt: Add -mcpu= option.
6032
6033 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
6034
6035 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6036 isel=yes): Warn for these deprecated options.
6037
6038 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
6039
6040 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6041 ISA_2_5_MASKS_EMBEDDED.
6042
6043 2018-02-23 Jakub Jelinek <jakub@redhat.com>
6044
6045 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6046 p->max as pointers rather than using iterative_hash_expr.
6047
6048 2018-02-23 Carl Love <cel@us.ibm.com>
6049
6050 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6051 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6052 BU_P8V_OVERLOAD_2.
6053 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6054 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6055 P8V_BUILTIN_VEC_VUNSIGNED2.
6056
6057 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
6058
6059 PR target/81572
6060 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6061 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6062 LRA_UNKNOWN_ALT.
6063 * lra-constraints.c (curr_insn_transform): Set up
6064 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
6065 LRA_UNKNOWN_ALT.
6066 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6067 * lra-eliminations.c (spill_pseudos): Ditto.
6068 (process_insn_for_elimination): Ditto.
6069 * lra-lives.c (reg_early_clobber_p): Use the new macros.
6070 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6071 LRA_NON_CLOBBERED_ALT.
6072
6073 2018-02-22 Martin Sebor <msebor@redhat.com>
6074
6075 PR tree-optimization/84480
6076 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6077 to maybe_diag_stxncpy_trunc. Call it.
6078 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6079 from gimple_fold_builtin_strcpy. Print inlining stack.
6080 (handle_builtin_stxncpy): Print inlining stack.
6081 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6082
6083 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
6084
6085 PR target/84176
6086 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6087 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6088 and -fcheck-pointer-bounds are used together.
6089 (indirect_thunk_prefix): New enum.
6090 (indirect_thunk_need_prefix): New function.
6091 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
6092 "_nt" instead of "_bnd" for NOTRACK prefix.
6093 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6094 (output_indirect_thunk_function): Likewise.
6095 (): Likewise.
6096 (ix86_code_end): Update output_indirect_thunk_function calls.
6097 (ix86_output_indirect_branch_via_reg): Replace
6098 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6099 (ix86_output_indirect_branch_via_push): Likewise.
6100 (ix86_output_function_return): Likewise.
6101 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6102 incompatible with -fcf-protection=branch and
6103 -fcheck-pointer-bounds.
6104
6105 2018-02-22 Steve Ellcey <sellcey@cavium.com>
6106
6107 PR target/83335
6108 * config/aarch64/aarch64.c (aarch64_print_address_internal):
6109 Change gcc_assert call to output_operand_lossage.
6110
6111 2018-02-22 Steve Ellcey <sellcey@cavium.com>
6112
6113 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6114
6115 2018-02-22 DJ Delorie <dj@redhat.com>
6116 Sebastian Perta <sebastian.perta@renesas.com>
6117 Oleg Endo <olegendo@gcc.gnu.org>
6118
6119 * config/rx/rx.c (rx_rtx_costs): New function.
6120 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6121
6122 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
6123
6124 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6125
6126 2018-02-22 Martin Liska <mliska@suse.cz>
6127
6128 PR driver/83193
6129 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6130 Add "native" as a possible value.
6131
6132 2018-02-22 Martin Liska <mliska@suse.cz>
6133
6134 PR driver/83193
6135 * config/i386/i386.c (ix86_option_override_internal):
6136 Add "native" as a possible value for -march and -mtune.
6137
6138 2018-02-22 Jakub Jelinek <jakub@redhat.com>
6139
6140 PR target/84502
6141 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6142 to all type variants.
6143
6144 PR tree-optimization/84503
6145 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6146 width as info->bitpos + info->bitsize - start.
6147 (merged_store_group::merge_overlapping): Simplify width computation.
6148 (check_no_overlap): New function.
6149 (imm_store_chain_info::try_coalesce_bswap): Compute expected
6150 start + width and last_order of the group, fail if check_no_overlap
6151 fails.
6152 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6153 to group if check_no_overlap fails.
6154
6155 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
6156
6157 * config/rs6000/altivec.md: Delete contraint arguments to
6158 define_expand, define_split, and define_peephole2, and in
6159 define_insn_and_split if always unused.
6160 * config/rs6000/darwin.md: Ditto.
6161 * config/rs6000/dfp.md: Ditto.
6162 * config/rs6000/rs6000.md: Ditto.
6163 * config/rs6000/sync.md: Ditto.
6164 * config/rs6000/vector.md: Ditto.
6165 * config/rs6000/vsx.md: Ditto.
6166
6167 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
6168
6169 * config/rs6000/altivec.md: Write output control strings as braced
6170 blocks instead of double-quoted strings.
6171 * config/rs6000/darwin.md: Ditto.
6172 * config/rs6000/rs6000.md: Ditto.
6173 * config/rs6000/vector.md: Ditto.
6174 * config/rs6000/vsx.md: Ditto.
6175
6176 2018-02-21 Jason Merrill <jason@redhat.com>
6177
6178 PR c++/84314 - ICE with templates and fastcall attribute.
6179 * attribs.c (build_type_attribute_qual_variant): Remove assert.
6180
6181 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
6182
6183 * ipa-cp.c (determine_versionability): Fix comment typos.
6184
6185 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
6186
6187 PR c/84229
6188 * ipa-cp.c (determine_versionability): Do not version functions caling
6189 va_arg_pack.
6190
6191 2018-02-21 Martin Liska <mliska@suse.cz>
6192
6193 PR driver/83193
6194 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
6195 Add "native" as a possible value.
6196 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
6197 the macro when native cpu detection is available.
6198
6199 2018-02-21 Martin Liska <mliska@suse.cz>
6200
6201 PR driver/83193
6202 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
6203 Add "native" as a possible value.
6204 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
6205 when native cpu detection is available.
6206
6207 2018-02-21 Jakub Jelinek <jakub@redhat.com>
6208 Martin Sebor <msebor@redhat.com>
6209
6210 PR tree-optimization/84478
6211 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
6212 false.
6213 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
6214 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
6215 support which is conservatively correct, for 2 only stay conservative
6216 for maxlen. Formatting and comment capitalization fixes. Add STRICT
6217 argument to the 2 argument get_range_strlen, adjust 6 arg
6218 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
6219 false.
6220 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
6221 (gimple_fold_builtin_strlen): Pass true as last argument to
6222 get_range_strlen.
6223
6224 2018-02-20 Martin Sebor <msebor@redhat.com>
6225
6226 PR middle-end/84095
6227 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
6228 (builtin_memref::set_base_and_offset): Same. Handle inner references.
6229 (builtin_memref::builtin_memref): Factor out parts into
6230 set_base_and_offset and call it.
6231
6232 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
6233
6234 PR middle-end/84406
6235 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
6236 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
6237 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
6238 search at the associated MODE_INT.
6239
6240 2018-02-20 Jeff Law <law@redhat.com>
6241
6242 PR middle-end/82123
6243 PR tree-optimization/81592
6244 PR middle-end/79257
6245 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
6246 for range data rather than using global data.
6247 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
6248 range data rather than using global data.
6249 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
6250 pass it to children as needed.
6251 (struct directive::fmtresult): Similarly.
6252 (struct directive::set_width): Similarly.
6253 (struct directive::set_precision): Similarly.
6254 (format_integer, format_directive, parse_directive): Similarly.
6255 (format_none): Accept unnamed vr_values parameter.
6256 (format_percent, format_floating, format_character): Similarly.
6257 (format_string, format_plain): Similarly.
6258 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
6259 the EVRP range analyzer for range data rather than using global data.
6260 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
6261 gimple-ssa-evrp-analyze.h
6262 (class sprintf_dom_walker): Add after_dom_children member function.
6263 Add evrp_range_analyzer member.
6264 (sprintf_dom_walker::before_dom_children): Call into the EVRP
6265 range analyzer as needed.
6266 (sprintf_dom_walker::after_dom_children): New member function.
6267 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
6268 if not optimizing.
6269 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
6270 (evrp_range_analyzer::pop_to_marker): Likewise.
6271
6272 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
6273
6274 PR tree-optimization/84419
6275 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
6276 with the required type if its current type is compatible but
6277 different.
6278
6279 2018-02-20 Jakub Jelinek <jakub@redhat.com>
6280
6281 PR middle-end/82004
6282 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
6283 after vectorization.
6284
6285 2018-02-20 Martin Liska <mliska@suse.cz>
6286
6287 PR driver/83193
6288 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
6289 possible values if we don't have a hint.
6290
6291 2018-02-20 Martin Liska <mliska@suse.cz>
6292
6293 PR c/84310
6294 PR target/79747
6295 * final.c (shorten_branches): Build align_tab array with one
6296 more element.
6297 * opts.c (finish_options): Add alignment option limit check.
6298 (MAX_CODE_ALIGN): Likewise.
6299 (MAX_CODE_ALIGN_VALUE): Likewise.
6300 * doc/invoke.texi: Document maximum allowed option value for
6301 all -falign-* options.
6302
6303 2018-02-19 Jakub Jelinek <jakub@redhat.com>
6304
6305 PR target/84146
6306 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6307 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6308 * var-tracking.c (emit_note_insn_var_location): Remove all references
6309 to NOTE_INSN_CALL_ARG_LOCATION.
6310 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
6311 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
6312 Use copy_rtx_if_shared.
6313 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
6314 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
6315 (dwarf2out_var_location): Remove handling of
6316 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
6317 on call_insn.
6318 * final.c (final_scan_insn): Remove all references to
6319 NOTE_INSN_CALL_ARG_LOCATION.
6320 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
6321 before dumping final insns.
6322 * except.c (emit_note_eh_region_end): Remove all references to
6323 NOTE_INSN_CALL_ARG_LOCATION.
6324 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
6325 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
6326 * config/arc/arc.c (hwloop_optimize): Likewise.
6327 * config/arm/arm.c (create_fix_barrier): Likewise.
6328 * config/s390/s390.c (s390_chunkify_start): Likewise.
6329 * config/sh/sh.c (find_barrier): Likewise.
6330 * config/i386/i386.c (rest_of_insert_endbranch,
6331 ix86_seh_fixup_eh_fallthru): Likewise.
6332 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
6333 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
6334 * config/frv/frv.c (frv_function_prologue): Likewise.
6335 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
6336 reg note.
6337 (note_outside_basic_block_p): Remove all references to
6338 NOTE_INSN_CALL_ARG_LOCATION.
6339 * gengtype.c (adjust_field_rtx_def): Likewise.
6340 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
6341 Likewise.
6342 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
6343 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
6344
6345 PR c++/84444
6346 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
6347 is ADDR_EXPR.
6348
6349 PR tree-optimization/84452
6350 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
6351 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6352 is NULL.
6353
6354 2018-02-19 Martin Liska <mliska@suse.cz>
6355
6356 PR sanitizer/82183
6357 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6358
6359 2018-02-19 Martin Liska <mliska@suse.cz>
6360 Richard Sandiford <richard.sandiford@linaro.org>
6361
6362 PR tree-optimization/82491
6363 * gimple-fold.c (get_base_constructor): Make earlier bail out
6364 to prevent ubsan.
6365
6366 2018-02-19 Carl Love <cel@us.ibm.com>
6367
6368 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6369 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6370 BU_P8V_OVERLOAD_1.
6371 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6372 P8V_BUILTIN_VEC_NEG.
6373
6374 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
6375
6376 * config/rl78/rl78.md (movdf): New define expand.
6377
6378 2018-02-19 Martin Liska <mliska@suse.cz>
6379
6380 PR other/80589
6381 * doc/invoke.texi: Fix typo.
6382 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6383
6384 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
6385
6386 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6387 handle rs6000_single_float and rs6000_double_float specially for
6388 e500 family CPUs.
6389
6390 2018-02-16 Jeff Law <law@redhat.com>
6391
6392 * config/rx/rx.c (add_pop_cfi_notes): New function.;
6393 (pop_regs): Use it.
6394
6395 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6396
6397 PR ipa/84425
6398 * ipa-inline.c (inline_small_functions): Fix a typo.
6399
6400 2018-02-16 Nathan Sidwell <nathan@acm.org>
6401
6402 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
6403
6404 2018-02-16 Carl Love <cel@us.ibm.com>
6405
6406 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
6407 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
6408 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
6409 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
6410 expansion to P8V_BUILTIN_VEC_FLOAT2.
6411
6412 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
6413
6414 PR rtl-optimization/70023
6415 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
6416 src_regno into account.
6417
6418 2018-02-16 Carl Love <cel@us.ibm.com>
6419
6420 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
6421 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
6422 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
6423 * config/rs6000/rs6000.c: Remove case statements for
6424 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
6425 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
6426 and P9V_BUILTIN_VEC_VINSERT4B.
6427 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
6428 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
6429 * config/rs6000/vsx.md:
6430 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
6431 vec_insert4b.
6432
6433 2018-02-16 Carl Love <cel@us.ibm.com>
6434
6435 * config/rs6000/altivec.h: Add builtin names vec_extract4b
6436 vec_insert4b.
6437 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
6438 definitions.
6439 * config/rs6000/rs6000-c.c: Add the definitions for
6440 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
6441 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
6442 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
6443 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
6444 definition for insert4b and define insn *insert3b_internal.
6445 * doc/extend.texi: Add documentation for vec_extract4b.
6446
6447 2018-02-16 Nathan Sidwell <nathan@acm.org>
6448
6449 * doc/extend.texi (Backwards Compatibility): Mention friend
6450 injection. Note for-scope is deprecated.
6451 * doc/invoke.texi (-ffriend-injection): Deprecate.
6452
6453 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
6454
6455 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
6456 that moved to I2, also allow destinations that are a paradoxical
6457 subreg (instead of a normal reg).
6458
6459 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
6460
6461 PR target/83831
6462 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
6463 to QImode.
6464
6465 2018-02-16 Richard Biener <rguenther@suse.de>
6466
6467 PR tree-optimization/84037
6468 PR tree-optimization/84016
6469 PR target/82862
6470 * config/i386/i386.c (ix86_builtin_vectorization_cost):
6471 Adjust vec_construct for the fact we need additional higher latency
6472 128bit inserts for AVX256 and AVX512 vector builds.
6473 (ix86_add_stmt_cost): Scale vector construction cost for
6474 elementwise loads.
6475
6476 2018-02-16 Richard Biener <rguenther@suse.de>
6477
6478 PR tree-optimization/84417
6479 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
6480 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
6481 (non_rewritable_lvalue_p): Likewise, use poly-ints.
6482
6483 2018-02-16 Martin Liska <mliska@suse.cz>
6484
6485 PR sanitizer/84307
6486 * internal-fn.def (ASAN_CHECK): Set proper flags.
6487 (ASAN_MARK): Likewise.
6488
6489 2018-02-16 Julia Koval <julia.koval@intel.com>
6490
6491 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
6492 from PTA_CANNONLAKE.
6493
6494 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6495
6496 PR target/84272
6497 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
6498 Use ++iter rather than iter++ for std::list iterators.
6499 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
6500 defer deleting them until all nodes in the forest are processed. Do
6501 free even leaf nodes. Change to_process into auto_vec.
6502
6503 PR bootstrap/84405
6504 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
6505 * vec.h (vec_default_construct): Use memset instead of placement new
6506 if BROKEN_VALUE_INITIALIZATION is defined.
6507 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
6508 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
6509 is defined.
6510
6511 PR rtl-optimization/83723
6512 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
6513 * lra.c (lra_substitute_pseudo): Likewise. If true, use
6514 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
6515 recursive calls.
6516 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
6517 callers.
6518 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
6519
6520 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
6521
6522 PR rtl-optimization/81443
6523 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
6524 from inner REGs to paradoxical SUBREGs.
6525
6526 2018-02-16 Richard Biener <rguenther@suse.de>
6527
6528 PR tree-optimization/84399
6529 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6530 For operands we can analyze at their definition make sure we can
6531 analyze them at each use as well.
6532
6533 2018-02-16 Richard Biener <rguenther@suse.de>
6534
6535 PR tree-optimization/84190
6536 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
6537 volatile accesses if the decl isn't volatile.
6538
6539 2018-02-15 Jason Merrill <jason@redhat.com>
6540
6541 PR c++/84314 - ICE with templates and fastcall attribute.
6542 * attribs.c (build_type_attribute_qual_variant): Don't clobber
6543 TYPE_CANONICAL on an existing type.
6544
6545 2018-02-15 Jakub Jelinek <jakub@redhat.com>
6546
6547 PR tree-optimization/84383
6548 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
6549 dstoff nor call operand_equal_p if dstbase is NULL.
6550
6551 PR tree-optimization/84334
6552 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
6553 also a CONSTANT_CLASS_P, punt.
6554
6555 2018-02-14 Jim Wilson <jimw@sifive.com>
6556
6557 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
6558 first SMALL_OPERAND check. New local min_second_step. Move assert
6559 to where locals are set. Add TARGET_RVC support.
6560 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
6561
6562 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
6563
6564 * doc/invoke.texi: Correct -Wformat-overflow code sample.
6565
6566 2018-02-14 Martin Sebor <msebor@redhat.com>
6567
6568 PR tree-optimization/83698
6569 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
6570 arrays constrain the offset range to their bounds.
6571 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
6572 (builtin_access::overlap): Avoid setting the size of overlap if it's
6573 already been set.
6574 (maybe_diag_overlap): Also consider arrays when deciding what values
6575 of offsets to include in diagnostics.
6576
6577 2018-02-14 Martin Sebor <msebor@redhat.com>
6578
6579 PR c/84108
6580 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
6581 that correspond to the kind of a declaration.
6582
6583 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
6584
6585 PR target/83984
6586 * config/pa/pa.md: Load address of PIC label using the linkage table
6587 if the label is nonlocal.
6588
6589 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
6590
6591 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
6592 warning message if user requests -maltivec=be.
6593 * doc/invoke.texi: Document deprecation of -maltivec=be.
6594
6595 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
6596
6597 PR target/84220
6598 * config/rs6000/rs6000-c.c: Update definitions for
6599 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
6600 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
6601
6602 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6603
6604 PR target/84239
6605 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
6606 add _get_ssp intrinsics. Remove argument from
6607 __builtin_ia32_rdssp[d|q].
6608 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
6609 * config/i386/i386-builtin.def: Remove argument from
6610 __builtin_ia32_rdssp[d|q].
6611 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
6612 ix86_expand_special_args_builtin for _rdssp[d|q].
6613 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
6614 Clear register before usage.
6615 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
6616 Add documentation for new _get_ssp and _inc_ssp intrinsics.
6617
6618 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
6619
6620 PR tree-optimization/84357
6621 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
6622 operand 1 of an ARRAY_REF too.
6623
6624 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
6625
6626 PR target/83831
6627 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
6628 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6629 declarations.
6630 (set_of_reg): New struct.
6631 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
6632 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
6633 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6634 functions.
6635 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
6636 Split into bitclr, bitset, bitinvert patterns if appropriate.
6637 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
6638 use rx_fuse_in_memory_bitop.
6639 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
6640 to named insn, correct maximum insn length.
6641
6642 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
6643
6644 PR target/79242
6645 * machmode.def: Define a complex mode for PARTIAL_INT.
6646 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
6647 MODE_PARTIAL_INT.
6648 * doc/rtl.texi: Document CSPImode.
6649 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
6650 handling.
6651 (msp430_hard_regno_nregs_with_padding): Likewise.
6652
6653 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
6654
6655 PR target/84279
6656 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
6657
6658 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
6659
6660 PR rtl-optimization/84169
6661 * combine.c (try_combine): New variable split_i2i3. Set it to true if
6662 we generated a parallel as new i3 and we split that to new i2 and i3
6663 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
6664 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
6665 those to i2, not i1. Partially rewrite this scan code.
6666
6667 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6668
6669 PR c/82210
6670 * stor-layout.c (place_field): For variable length fields, adjust
6671 offset_align afterwards not just based on the field's alignment,
6672 but also on the size.
6673
6674 PR middle-end/84309
6675 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
6676 of exps and logs in the use_exp2 case.
6677
6678 2018-02-13 Jeff Law <law@redhat.com>
6679
6680 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
6681 entry for "vector".
6682
6683 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
6684 ARGS as unused.
6685
6686 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
6687
6688 PR debug/84342
6689 PR debug/84319
6690 * common.opt (gas-loc-support, gas-locview-support): New.
6691 (ginline-points, ginternal-reset-location-views): New.
6692 * doc/invoke.texi: Document them. Use @itemx where intended.
6693 (gvariable-location-views): Adjust.
6694 * target.def (reset_location_view): New.
6695 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
6696 (TARGET_RESET_LOCATION_VIEW): New.
6697 * doc/tm.texi: Rebuilt.
6698 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
6699 (dwarf2out_default_as_locview_support): New.
6700 (output_asm_line_debug_info): Use option variables.
6701 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
6702 (output_loc_list): Likewise.
6703 (add_high_low_attributes): Check option variables.
6704 Don't output entry view attribute in strict mode.
6705 (gen_inlined_subroutine_die): Check option variables.
6706 (dwarf2out_inline_entry): Likewise.
6707 (init_sections_and_labels): Likewise.
6708 (dwarf2out_early_finish): Likewise.
6709 (maybe_reset_location_view): New, from...
6710 (dwarf2out_var_location): ... here. Call it.
6711 * debug.h (dwarf2out_default_as_loc_support): Declare.
6712 (dwarf2out_default_as_locview_support): Declare.
6713 * hooks.c (hook_int_rtx_insn_0): New.
6714 * hooks.h (hook_int_rtx_insn_0): Declare.
6715 * toplev.c (process_options): Take -gas-loc-support and
6716 -gas-locview-support from dwarf2out. Enable
6717 -gvariable-location-views by default only with locview
6718 assembler support. Enable -ginternal-reset-location-views by
6719 default only if the target defines the corresponding hook.
6720 Enable -ginline-points by default if location views are
6721 enabled; force it disabled if statement frontiers are
6722 disabled.
6723 * tree-inline.c (expand_call_inline): Check option variables.
6724 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6725
6726 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6727
6728 PR tree-optimization/84321
6729 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
6730 handling. Also check whether the anti-range contains any values
6731 that satisfy the mask; switch to a VR_RANGE if not.
6732
6733 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
6734
6735 PR sanitizer/84340
6736 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
6737
6738 2018-02-13 Martin Jambor <mjambor@suse.cz>
6739
6740 PR c++/83990
6741 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
6742 of call statements, also set location of a load to a temporary.
6743
6744 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
6745
6746 * config/rl78/rl78.c (add_vector_labels): New function.
6747 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
6748 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
6749 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
6750 which checks that no arguments are passed.
6751 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
6752 * doc/extend.texi: Documentation for the new attribute.
6753
6754 2018-02-13 Andreas Schwab <schwab@suse.de>
6755
6756 * config/riscv/linux.h (CPP_SPEC): Define.
6757
6758 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6759
6760 PR target/84335
6761 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
6762 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
6763 OPTION_MASK_ISA_AES as first argument to def_builtin_const
6764 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
6765 instead of OPTION_MASK_ISA_PCLMUL as first argument to
6766 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
6767 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
6768 temporarily for AES and PCLMUL builtins.
6769
6770 PR tree-optimization/84339
6771 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
6772 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
6773 Formatting fixes.
6774
6775 PR middle-end/84309
6776 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
6777 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
6778 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
6779 inline function.
6780 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
6781 inline function.
6782 * omp-simd-clone.h: New file.
6783 * omp-simd-clone.c: Include omp-simd-clone.h.
6784 (expand_simd_clones): No longer static.
6785 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
6786 cgraph.h and omp-simd-clone.h.
6787 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
6788 (vect_recog_widen_shift_pattern): Formatting fix.
6789 (vect_pattern_recog_1): Don't check optab for calls.
6790
6791 PR target/84336
6792 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
6793 operands[2] into a REG before using gen_lowpart on it.
6794
6795 2018-02-12 Jeff Law <law@redhat.com>
6796
6797 PR target/83760
6798 * config/sh/sh.c (find_barrier): Consider a sibling call
6799 a barrier as well.
6800
6801 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
6802 successfully back substituting a reg.
6803
6804 2018-02-12 Richard Biener <rguenther@suse.de>
6805
6806 PR tree-optimization/84037
6807 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
6808 parameter, move visited init to caller.
6809 (vect_slp_analyze_operations): Separate cost from validity
6810 check, initialize visited once for all instances.
6811 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
6812 for all instances.
6813 * tree-vect-stmts.c (vect_model_simple_cost): Make early
6814 out an assert.
6815 (vect_model_promotion_demotion_cost): Likewise.
6816 (vectorizable_bswap): Guard cost modeling with !slp_node
6817 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
6818 SLP stmts.
6819 (vectorizable_call): Likewise.
6820 (vectorizable_conversion): Likewise.
6821 (vectorizable_assignment): Likewise.
6822 (vectorizable_shift): Likewise.
6823 (vectorizable_operation): Likewise.
6824 (vectorizable_store): Likewise.
6825 (vectorizable_load): Likewise.
6826 (vectorizable_condition): Likewise.
6827 (vectorizable_comparison): Likewise.
6828
6829 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
6830
6831 PR sanitizer/84307
6832 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
6833 (ASAN_MARK): Fix fnspec to account for return value, change pointer
6834 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
6835
6836 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6837
6838 PR middle-end/83665
6839 * params.def (inline-min-speedup): Increase from 8 to 15.
6840 (max-inline-insns-auto): Decrease from 40 to 30.
6841 * ipa-split.c (consider_split): Add some buffer for function to
6842 be considered inlining candidate.
6843 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
6844 default values.
6845
6846 2018-02-12 Richard Biener <rguenther@suse.de>
6847
6848 PR tree-optimization/84037
6849 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
6850 matched stmts if we cannot swap the non-matched ones.
6851
6852 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6853
6854 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
6855 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
6856 _mm_maskz_scalef_round_ss): New intrinsics.
6857 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
6858 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
6859 __builtin_ia32_scalefss_round): Remove.
6860 (__builtin_ia32_scalefsd_mask_round,
6861 __builtin_ia32_scalefss_mask_round): New intrinsics.
6862 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
6863 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
6864 ((match_operand:VF_128 2 "<round_nimm_predicate>"
6865 "<round_constraint>")): Changed to ...
6866 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
6867 "<round_scalar_constraint>")): ... this.
6868 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
6869 %0, %1, %2<round_op3>}"): Changed to ...
6870 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
6871 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
6872 %2<round_scalar_mask_op3>}"): ... this.
6873 * config/i386/subst.md (round_scalar_nimm_predicate): New.
6874
6875 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6876
6877 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
6878 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
6879 (_mm_maskz_sqrt_round_ss): New intrinsics.
6880 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
6881 (__builtin_ia32_sqrtsd_mask_round)
6882 (__builtin_ia32_sqrtss_mask_round): New builtins.
6883 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
6884 (__builtin_ia32_sqrtss_round): Remove.
6885 (__builtin_ia32_sqrtsd_mask_round)
6886 (__builtin_ia32_sqrtss_mask_round): New builtins.
6887 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
6888 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
6889 ((match_operand:VF_128 1 "vector_operand"
6890 "xBm,<round_constraint>")): Changed to ...
6891 ((match_operand:VF_128 1 "vector_operand"
6892 "xBm,<round_scalar_constraint>")): ... this.
6893 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
6894 %0, %2, %<iptr>1<round_op3>}): Changed to ...
6895 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
6896 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
6897 %<iptr>1<round_scalar_mask_op3>}): ... this.
6898 ((set_attr "prefix" "<round_prefix>")): Changed to ...
6899 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
6900
6901 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
6902
6903 PR target/84266
6904 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
6905 Cast vec_cmpeq result to correct type.
6906 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
6907 Cast vec_cmpgt result to correct type.
6908
6909 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
6910
6911 * final.c (final_scan_insn_1): Renamed from...
6912 (final_scan_insn): ... this. New wrapper, to recover
6913 seen from the outermost call in recursive ones.
6914 * config/sparc/sparc.c (output_return): Drop seen from call.
6915 (output_sibcall): Likewise.
6916 * config/visium/visium.c (output_branch): Likewise.
6917
6918 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
6919
6920 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
6921 function label.
6922
6923 2018-02-10 Alan Modra <amodra@gmail.com>
6924
6925 PR target/84300
6926 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
6927 Specify LR as an input.
6928
6929 2018-02-10 Jakub Jelinek <jakub@redhat.com>
6930
6931 PR sanitizer/83987
6932 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
6933 remove_member_access_dummy_vars): New functions.
6934 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
6935 lower_omp_1, execute_lower_omp): Use them.
6936
6937 PR rtl-optimization/84308
6938 * shrink-wrap.c (spread_components): Release todo vector.
6939
6940 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
6941
6942 PR rtl-optimization/57193
6943 * ira-color.c (struct allocno_color_data): Add member
6944 conflict_allocno_hard_prefs.
6945 (update_conflict_allocno_hard_prefs): New.
6946 (bucket_allocno_compare_func): Add a preference based on
6947 conflict_allocno_hard_prefs.
6948 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
6949 (color_allocnos): Remove a dead code. Initiate
6950 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
6951
6952 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6953
6954 PR target/84226
6955 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
6956 constraint from =wa to wa. Avoid a subreg on the output operand,
6957 instead use a pseudo and subreg it in a move.
6958 (p9_xxbrd_<mode>): Changed to ...
6959 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
6960 (p9_xxbrd_v2df): New expander.
6961 (p9_xxbrw_<mode>): Changed to ...
6962 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
6963 (p9_xxbrw_v4sf): New expander.
6964
6965 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6966
6967 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
6968
6969 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
6970
6971 PR target/83926
6972 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
6973 multiply in 32-bit mode.
6974 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
6975 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
6976 mode.
6977
6978 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6979
6980 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
6981 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
6982 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
6983 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
6984
6985 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
6986
6987 PR lto/84213
6988 * dwarf2out.c (is_trivial_indirect_ref): New function.
6989 (dwarf2out_late_global_decl): Do not generate a location
6990 attribute for variables that have a non-trivial DECL_VALUE_EXPR
6991 and that are not defined in the current unit.
6992
6993 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6994
6995 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
6996 instead of a libcall for UNORDERED.
6997
6998 2018-02-09 Tamar Christina <tamar.christina@arm.com>
6999
7000 PR target/82641
7001 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7002 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7003
7004 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7005
7006 PR target/PR84295
7007 * config/s390/s390.c (s390_set_current_function): Invoke
7008 s390_indirect_branch_settings also if fndecl didn't change.
7009
7010 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
7011
7012 * config/rs6000/rs6000.md (blockage): Set length to zero.
7013
7014 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
7015
7016 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7017
7018 2018-02-09 Jakub Jelinek <jakub@redhat.com>
7019
7020 PR sanitizer/84285
7021 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7022 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7023 -static-lib*san.
7024
7025 PR debug/84252
7026 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7027 PARALLEL incoming that failed vt_get_decl_and_offset check.
7028
7029 PR middle-end/84237
7030 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7031 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7032 TREE_READONLY bit.
7033 (get_variable_section): For decls in named .bss* sections pass true as
7034 second argument to bss_initializer_p.
7035
7036 2018-02-09 Marek Polacek <polacek@redhat.com>
7037 Jakub Jelinek <jakub@redhat.com>
7038
7039 PR c++/83659
7040 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7041 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
7042 Sync some changes from cxx_fold_indirect_ref.
7043
7044 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
7045
7046 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7047 markers.
7048 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7049 (BLOCK_INLINE_ENTRY_LABEL): New.
7050 (dwarf2out_var_location): Disregard inline entry markers.
7051 (inline_entry_data): New struct.
7052 (inline_entry_data_hasher): New hashtable type.
7053 (inline_entry_data_hasher::hash): New.
7054 (inline_entry_data_hasher::equal): New.
7055 (inline_entry_data_table): New variable.
7056 (add_high_low_attributes): Add DW_AT_entry_pc and
7057 DW_AT_GNU_entry_view attributes if a pending entry is found
7058 in inline_entry_data_table. Add old entry_pc attribute only
7059 if debug nonbinding markers are disabled.
7060 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7061 markers are enabled.
7062 (block_within_block_p, dwarf2out_inline_entry): New.
7063 (dwarf2out_finish): Check that no entries remained in
7064 inline_entry_data_table.
7065 * final.c (reemit_insn_block_notes): Handle inline entry notes.
7066 (final_scan_insn, notice_source_line): Likewise.
7067 (rest_of_clean_state): Skip inline entry markers.
7068 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7069 markers.
7070 * gimple.c (gimple_build_debug_inline_entry): New.
7071 * gimple.h (enum gimple_debug_subcode): Add
7072 GIMPLE_DEBUG_INLINE_ENTRY.
7073 (gimple_build_debug_inline_entry): Declare.
7074 (gimple_debug_inline_entry_p): New.
7075 (gimple_debug_nonbind_marker_p): Adjust.
7076 * insn-notes.def (INLINE_ENTRY): New.
7077 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7078 inline entry marker notes.
7079 (print_insn): Likewise.
7080 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7081 (INSN_DEBUG_MARKER_KIND): Likewise.
7082 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7083 * tree-inline.c (expand_call_inline): Build and insert
7084 debug_inline_entry stmt.
7085 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7086 inline entry blocks early, if nonbind markers are enabled.
7087 (dump_scope_block): Dump fragment info.
7088 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7089 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7090 (gimple_build_debug_inline_entry): New.
7091 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7092 Enable/disable inline entry points too.
7093 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7094 (DEBUG_INSN): Describe inline entry markers.
7095
7096 * common.opt (gvariable-location-views): New.
7097 (gvariable-location-views=incompat5): New.
7098 * config.in: Rebuilt.
7099 * configure: Rebuilt.
7100 * configure.ac: Test assembler for view support.
7101 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7102 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7103 * dwarf2out.c (var_loc_view): New typedef.
7104 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7105 (dwarf2out_locviews_in_attribute): New.
7106 (dwarf2out_locviews_in_loclist): New.
7107 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7108 (enum dw_line_info_opcode): Add LI_adv_address.
7109 (struct dw_line_info_table): Add view.
7110 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7111 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7112 (zero_view_p): New variable.
7113 (ZERO_VIEW_P): New macro.
7114 (output_asm_line_debug_info): New.
7115 (struct var_loc_node): Add view.
7116 (add_AT_view_list, AT_loc_list): New.
7117 (add_var_loc_to_decl): Add view param. Test it against last.
7118 (new_loc_list): Add view params. Record them.
7119 (AT_loc_list_ptr): Handle loc and view lists.
7120 (view_list_to_loc_list_val_node): New.
7121 (print_dw_val): Handle dw_val_class_view_list.
7122 (size_of_die): Likewise.
7123 (value_format): Likewise.
7124 (loc_list_has_views): New.
7125 (gen_llsym): Set vl_symbol too.
7126 (maybe_gen_llsym, skip_loc_list_entry): New.
7127 (dwarf2out_maybe_output_loclist_view_pair): New.
7128 (output_loc_list): Output view list or entries too.
7129 (output_view_list_offset): New.
7130 (output_die): Handle dw_val_class_view_list.
7131 (output_dwarf_version): New.
7132 (output_compilation_unit_header): Use it.
7133 (output_skeleton_debug_sections): Likewise.
7134 (output_rnglists, output_line_info): Likewise.
7135 (output_pubnames, output_aranges): Update version comments.
7136 (output_one_line_info_table): Output view numbers in asm comments.
7137 (dw_loc_list): Determine current endview, pass it to new_loc_list.
7138 Call maybe_gen_llsym.
7139 (loc_list_from_tree_1): Adjust.
7140 (add_AT_location_description): Create view list attribute if
7141 needed, check it's absent otherwise.
7142 (convert_cfa_to_fb_loc_list): Adjust.
7143 (maybe_emit_file): Call output_asm_line_debug_info for test.
7144 (dwarf2out_var_location): Reset views as needed. Precompute
7145 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
7146 attribute. Set view.
7147 (new_line_info_table): Reset next view.
7148 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7149 (dwarf2out_source_line): Likewise. Output view resets and labels to
7150 the assembler, or select appropriate line info opcodes.
7151 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7152 (optimize_string_length): Catch it. Adjust.
7153 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
7154 dw_val_class_view_list, and remove it if no longer needed.
7155 (hash_loc_list): Hash view numbers.
7156 (loc_list_hasher::equal): Compare them.
7157 (optimize_location_lists): Check whether a view list symbol is
7158 needed, and whether the locview attribute is present, and
7159 whether they match. Remove the locview attribute if no longer
7160 needed.
7161 (index_location_lists): Call skip_loc_list_entry for test.
7162 (dwarf2out_finish): Call output_asm_line_debug_info for test.
7163 Use output_dwarf_version.
7164 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7165 (struct dw_val_node): Add val_view_list.
7166 * final.c (SEEN_NEXT_VIEW): New.
7167 (set_next_view_needed): New.
7168 (clear_next_view_needed): New.
7169 (maybe_output_next_view): New.
7170 (final_start_function): Rename to...
7171 (final_start_function_1): ... this. Take pointer to FIRST,
7172 add SEEN parameter. Emit param bindings in the initial view.
7173 (final_start_function): Reintroduce SEEN-less interface.
7174 (final): Rename to...
7175 (final_1): ... this. Take SEEN parameter. Output final pending
7176 next view at the end.
7177 (final): Reintroduce seen-less interface.
7178 (final_scan_insn): Output pending next view before switching
7179 sections or ending a block. Mark the next view as needed when
7180 outputting variable locations. Notify debug backend of section
7181 changes, and of location view changes.
7182 (rest_of_handle_final): Adjust.
7183 * toplev.c (process_options): Autodetect value for debug variable
7184 location views option. Warn on incompat5 without -gdwarf-5.
7185 * doc/invoke.texi (gvariable-location-views): New.
7186 (gvariable-location-views=incompat5): New.
7187 (gno-variable-location-views): New.
7188
7189 2018-02-08 David Malcolm <dmalcolm@redhat.com>
7190
7191 PR tree-optimization/84136
7192 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7193 that the result of find_edge is non-NULL.
7194
7195 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
7196
7197 PR target/83008
7198 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
7199 storing integer register in SImode. Fix cost of 256 and 512
7200 byte aligned SSE register store.
7201
7202 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
7203
7204 * config/i386/i386.c (ix86_multiplication_cost): Fix
7205 multiplication cost for TARGET_AVX512DQ.
7206
7207 2018-02-08 Marek Polacek <polacek@redhat.com>
7208
7209 PR tree-optimization/84238
7210 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
7211 get_range_strlen.
7212
7213 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7214
7215 PR tree-optimization/84265
7216 * tree-vect-stmts.c (vectorizable_store): Don't treat
7217 VMAT_CONTIGUOUS accesses as grouped.
7218 (vectorizable_load): Likewise.
7219
7220 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7221
7222 PR tree-optimization/81635
7223 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
7224 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
7225 (test_round_for_mask): New functions.
7226 (wide_int_cc_tests): Call test_round_for_mask.
7227 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
7228 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
7229 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
7230 range returned by get_range_info.
7231
7232 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
7233
7234 PR ipa/81360
7235 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
7236 * symtab.c: Include builtins.h
7237 (symtab_node::output_to_lto_symbol_table_p): Move here
7238 from lto-streamer-out.c:output_symbol_p.
7239 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
7240 (output_symbol_p): Move all logic to symtab.c
7241 (produce_symtab): Update.
7242
7243 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7244
7245 * config/s390/s390-opts.h (enum indirect_branch): Define.
7246 * config/s390/s390-protos.h (s390_return_addr_from_memory)
7247 (s390_indirect_branch_via_thunk)
7248 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
7249 (enum s390_indirect_branch_type): Define.
7250 * config/s390/s390.c (struct s390_frame_layout, struct
7251 machine_function): Remove.
7252 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
7253 (indirect_branch_table_label_no, indirect_branch_table_name):
7254 Define variables.
7255 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
7256 (enum s390_indirect_branch_option): Define.
7257 (s390_return_addr_from_memory): New function.
7258 (s390_handle_string_attribute): New function.
7259 (s390_attribute_table): Add new attribute handler.
7260 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
7261 (s390_indirect_branch_via_thunk): New function.
7262 (s390_indirect_branch_via_inline_thunk): New function.
7263 (s390_function_ok_for_sibcall): When jumping via thunk disallow
7264 sibling call optimization for non z10 compiles.
7265 (s390_emit_call): Force indirect branch target to be a single
7266 register. Add r1 clobber for non-z10 compiles.
7267 (s390_emit_epilogue): Emit return jump via return_use expander.
7268 (s390_reorg): Handle JUMP_INSNs as execute targets.
7269 (s390_option_override_internal): Perform validity checks for the
7270 new command line options.
7271 (s390_indirect_branch_attrvalue): New function.
7272 (s390_indirect_branch_settings): New function.
7273 (s390_set_current_function): Invoke s390_indirect_branch_settings.
7274 (s390_output_indirect_thunk_function): New function.
7275 (s390_code_end): Implement target hook.
7276 (s390_case_values_threshold): Implement target hook.
7277 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
7278 macros.
7279 * config/s390/s390.h (struct s390_frame_layout)
7280 (struct machine_function): Move here from s390.c.
7281 (TARGET_INDIRECT_BRANCH_NOBP_RET)
7282 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
7283 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
7284 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
7285 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
7286 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
7287 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
7288 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
7289 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
7290 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
7291 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
7292 (mnemonic attribute): Add values which aren't recognized
7293 automatically.
7294 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
7295 pattern for branch conversion. Fix mnemonic attribute.
7296 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
7297 indirect branch via thunk if requested.
7298 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
7299 ("*indirect_jump"): Disable for branch conversion using out of
7300 line thunks.
7301 ("indirect_jump_via_thunk<mode>_z10")
7302 ("indirect_jump_via_thunk<mode>")
7303 ("indirect_jump_via_inlinethunk<mode>_z10")
7304 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
7305 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
7306 ("casesi_jump_via_inlinethunk<mode>_z10")
7307 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7308 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7309 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
7310 ("*indirect2_jump"): Disable for branch conversion.
7311 ("casesi_jump"): Turn into expander and expand patterns for branch
7312 conversion.
7313 ("return_use"): New expander.
7314 ("*return"): Emit return via thunk and rename it to ...
7315 ("*return<mode>"): ... this one.
7316 * config/s390/s390.opt: Add new options and and enum for the
7317 option values.
7318
7319 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7320
7321 * lra-constraints.c (match_reload): Unconditionally use
7322 gen_lowpart_SUBREG, rather than selecting between that
7323 and equivalent gen_rtx_SUBREG code.
7324
7325 2018-02-08 Richard Biener <rguenther@suse.de>
7326
7327 PR tree-optimization/84233
7328 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
7329 changed flag instead of boguously re-using phi_inserted.
7330
7331 2018-02-08 Martin Jambor <mjambor@suse.cz>
7332
7333 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
7334 static local variables.
7335
7336 2018-02-08 Richard Biener <rguenther@suse.de>
7337
7338 PR tree-optimization/84278
7339 * tree-vect-stmts.c (vectorizable_store): When looking for
7340 smaller vector types to perform grouped strided loads/stores
7341 make sure the mode is supported by the target.
7342 (vectorizable_load): Likewise.
7343
7344 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7345
7346 * config/aarch64/aarch64.c (aarch64_components_for_bb):
7347 Increase LDP/STP opportunities by adding adjacent callee-saves.
7348
7349 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7350
7351 PR rtl-optimization/84068
7352 PR rtl-optimization/83459
7353 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7354
7355 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
7356
7357 PR tree-optimization/84224
7358 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7359 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7360 non-zero arguments.
7361
7362 2018-02-07 Iain Sandoe <iain@codesourcery.com>
7363
7364 PR target/84113
7365 * config/rs6000/altivec.md (*restore_world): Remove LR use.
7366 * config/rs6000/predicates.md (restore_world_operation): Adjust op
7367 count, remove one USE.
7368
7369 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
7370
7371 * doc/install.texi (Configuration): Document the
7372 --with-long-double-format={ibm,ieee} PowerPC configuration
7373 options.
7374
7375 PR target/84154
7376 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7377 Convert from define_expand to be define_insn_and_split. Rework
7378 float/double/_Float128 conversions to QI/HI/SImode to work with
7379 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
7380 conversions to QI/HImode types did a store and then a load to
7381 truncate the value. For conversions to VSX registers, don't split
7382 the insn, instead emit the code directly. Use the code iterator
7383 any_fix to combine signed and unsigned conversions.
7384 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7385 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7386 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7387 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7388 (fix_<mode>di2_hw): Likewise.
7389 (fixuns_<mode>di2_hw): Likewise.
7390 (fix_<mode>si2_hw): Likewise.
7391 (fixuns_<mode>si2_hw): Likewise.
7392 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7393 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7394 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7395 fix<uns>_trunc<SFDF:mode>si2_p8.
7396 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7397 used.
7398 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7399 (fix<uns>_<mode>_mem): Likewise.
7400 (fctiw<u>z_<mode>_mem): Likewise.
7401 (fix<uns>_<mode>_mem): Likewise.
7402 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
7403 the register allocator from doing a direct move to the GPRs to do
7404 a store, and instead use the ISA 3.0 store byte/half-word from
7405 vector register instruction. For IEEE 128-bit floating point,
7406 also optimize stores of 32-bit ints.
7407 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
7408
7409 2018-02-07 Alan Hayward <alan.hayward@arm.com>
7410
7411 * genextract.c (push_pathstr_operand): New function to support
7412 [a-zA-Z].
7413 (walk_rtx): Call push_pathstr_operand.
7414 (print_path): Support [a-zA-Z].
7415
7416 2018-02-07 Richard Biener <rguenther@suse.de>
7417
7418 PR tree-optimization/84037
7419 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
7420 (cse_and_gimplify_to_preheader): Declare.
7421 (vect_get_place_in_interleaving_chain): Likewise.
7422 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
7423 ivexpr_map.
7424 (_loop_vec_info::~_loop_vec_info): Delete it.
7425 (cse_and_gimplify_to_preheader): New function.
7426 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
7427 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
7428 (vectorizable_load): Likewise. For grouped stores always base
7429 the IV on the first element.
7430 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
7431 condition before gimplifying.
7432
7433 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7434
7435 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
7436 *DIV_EXPR and *MOD_EXPR.
7437
7438 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
7439
7440 PR target/84248
7441 * config/i386/i386.c (ix86_option_override_internal): Mask out
7442 the CF_SET bit when checking -fcf-protection.
7443
7444 2018-02-07 Tom de Vries <tom@codesourcery.com>
7445
7446 PR libgomp/84217
7447 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
7448 enough.
7449
7450 2018-02-07 Richard Biener <rguenther@suse.de>
7451
7452 PR tree-optimization/84204
7453 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7454 this place.
7455
7456 PR tree-optimization/84205
7457 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
7458 special-case isl_ast_op_zdiv_r.
7459
7460 PR tree-optimization/84223
7461 * graphite-scop-detection.c (gather_bbs::before_dom_children):
7462 Only add conditions from within the region.
7463 (gather_bbs::after_dom_children): Adjust.
7464
7465 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
7466
7467 PR target/84209
7468 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
7469 * config/avr/avr.md: Only post-reload split REG-REG moves if
7470 either register is GENERAL_REG_P.
7471
7472 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7473
7474 PR tree-optimization/84235
7475 * tree-ssa-scopedtables.c
7476 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
7477 if the subtraction is performed in floating point type where NaNs are
7478 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
7479 build 1. Formatting fix.
7480
7481 2018-02-06 Jakub Jelinek <jakub@redhat.com>
7482
7483 PR target/84146
7484 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
7485 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
7486 and skip it regardless of bb boundaries. Use CALL_P macro,
7487 don't test INSN_P (insn) together with CALL_P or JUMP_P check
7488 unnecessarily, formatting fix.
7489
7490 2018-02-06 Michael Collison <michael.collison@arm.com>
7491
7492 * config/arm/thumb2.md:
7493 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
7494 (*thumb_mov_notscc): Ditto.
7495
7496 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
7497
7498 PR target/84154
7499 * config/rs6000/rs6000.md (su code attribute): Use "u" for
7500 unsigned_fix, not "s".
7501
7502 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7503
7504 * configure.ac (gcc_fn_eh_frame_ro): New function.
7505 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
7506 correct .eh_frame permissions.
7507 * configure: Regenerate.
7508
7509 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
7510
7511 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
7512 irrelevant options.
7513
7514 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7515
7516 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7517 Display warning message for -mno-speculate-indirect-jumps.
7518
7519 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
7520
7521 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
7522 Undocumented.
7523 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
7524
7525 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
7526
7527 PR tree-optimization/84225
7528 * tree-eh.c (find_trapping_overflow): Only call
7529 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
7530
7531 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7532
7533 PR target/84145
7534 * config/i386/i386.c: Reimplement the check of possible options
7535 -mibt/-mshstk conbination. Change error messages.
7536 * doc/invoke.texi: Fix a typo: remove extra '='.
7537
7538 2018-02-06 Marek Polacek <polacek@redhat.com>
7539
7540 PR tree-optimization/84228
7541 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
7542
7543 2018-02-06 Tamar Christina <tamar.christina@arm.com>
7544
7545 PR target/82641
7546 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
7547 emitted arch directives.
7548 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
7549 __ARM_FEATURE_COPROC before changing architectures.
7550
7551 2018-02-06 Richard Biener <rguenther@suse.de>
7552
7553 * config/i386/i386.c (print_reg): Fix typo.
7554 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
7555
7556 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
7557
7558 * configure: Regenerate.
7559
7560 2018-02-05 Martin Sebor <msebor@redhat.com>
7561
7562 PR tree-optimization/83369
7563 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
7564 inlining context.
7565
7566 2018-02-05 Martin Liska <mliska@suse.cz>
7567
7568 * doc/invoke.texi: Cherry-pick upstream r323995.
7569
7570 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
7571
7572 * ira.c (ira_init_register_move_cost): Adjust comment.
7573
7574 2018-02-05 Martin Liska <mliska@suse.cz>
7575
7576 PR gcov-profile/84137
7577 * doc/gcov.texi: Fix typo in documentation.
7578
7579 2018-02-05 Martin Liska <mliska@suse.cz>
7580
7581 PR gcov-profile/83879
7582 * doc/gcov.texi: Document necessity of --dynamic-list-data when
7583 using dlopen functionality.
7584
7585 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
7586
7587 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
7588 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
7589 _mm_maskz_range_ss, _mm_mask_range_round_ss,
7590 _mm_maskz_range_round_ss): New intrinsics.
7591 (__builtin_ia32_rangesd128_round)
7592 (__builtin_ia32_rangess128_round): Remove.
7593 (__builtin_ia32_rangesd128_mask_round,
7594 __builtin_ia32_rangess128_mask_round): New builtins.
7595 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
7596 __builtin_ia32_rangess128_round): Remove.
7597 (__builtin_ia32_rangesd128_mask_round,
7598 __builtin_ia32_rangess128_mask_round): New builtins.
7599 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
7600 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
7601 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
7602 "<round_saeonly_constraint>")): Changed to ...
7603 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
7604 "<round_saeonly_scalar_constraint>")): ... this.
7605 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
7606 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
7607 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
7608 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
7609 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
7610
7611 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
7612
7613 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
7614 options.
7615 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
7616 Remove all values except native, 8540 and 8548.
7617
7618 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
7619
7620 * config/i386/i386.c (ix86_output_function_return): Pass
7621 INVALID_REGNUM, instead of -1, as invalid register number to
7622 indirect_thunk_name and output_indirect_thunk.
7623
7624 2018-02-02 Julia Koval <julia.koval@intel.com>
7625
7626 * config.gcc: Add -march=icelake.
7627 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
7628 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
7629 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
7630 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
7631 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
7632 (processor_target_table): Add icelake.
7633 (ix86_option_override_internal): Handle new PTAs.
7634 (get_builtin_code_for_version): Handle icelake.
7635 (M_INTEL_COREI7_ICELAKE): New.
7636 (fold_builtin_cpu): Handle icelake.
7637 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
7638 * doc/invoke.texi: Add -march=icelake.
7639
7640 2018-02-02 Julia Koval <julia.koval@intel.com>
7641
7642 * config/i386/i386.c (ix86_option_override_internal): Change flags type
7643 to wide_int_bitmask.
7644 * wide-int-bitmask.h: New.
7645
7646 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7647
7648 PR target/84066
7649 * config/i386/i386.md: Replace Pmode with word_mode in
7650 builtin_setjmp_setup and builtin_longjmp to support x32.
7651
7652 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
7653
7654 PR target/56010
7655 PR target/83743
7656 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
7657 #include "opts.h".
7658 (rs6000_supported_cpu_names): New static variable.
7659 (linux_cpu_translation_table): Likewise.
7660 (elf_platform) <cpu>: Define new static variable and use it.
7661 Translate kernel AT_PLATFORM name to canonical name if needed.
7662 Error if platform name is unknown.
7663
7664 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
7665
7666 PR target/84089
7667 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
7668
7669 2018-02-01 Jeff Law <law@redhat.com>
7670
7671 PR target/84128
7672 * config/i386/i386.c (release_scratch_register_on_entry): Add new
7673 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
7674 the scratch if RELEASE_VIA_POP is false.
7675 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
7676 If we have to save a temporary register, decrement SIZE appropriately.
7677 Pass new arguments to release_scratch_register_on_entry.
7678 (ix86_adjust_stack_and_probe): Likewise.
7679 (ix86_emit_probe_stack_range): Pass new arguments to
7680 release_scratch_register_on_entry.
7681
7682 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
7683
7684 PR rtl-optimization/84157
7685 * combine.c (change_zero_ext): Use REG_P predicate in
7686 front of HARD_REGISTER_P predicate.
7687
7688 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
7689
7690 * config/avr/avr.c (avr_option_override): Move disabling of
7691 -fdelete-null-pointer-checks to...
7692 * common/config/avr/avr-common.c (avr_option_optimization_table):
7693 ...here.
7694
7695 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7696
7697 PR tree-optimization/81635
7698 * tree-data-ref.c (split_constant_offset_1): For types that
7699 wrap on overflow, try to use range info to prove that wrapping
7700 cannot occur.
7701
7702 2018-02-01 Renlin Li <renlin.li@arm.com>
7703
7704 PR target/83370
7705 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7706 TAILCALL_ADDR_REGS.
7707 (aarch64_register_move_cost): Likewise.
7708 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
7709 TAILCALL_ADDR_REGS.
7710 (REG_CLASS_NAMES): Likewise.
7711 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
7712 TAILCALL_ADDR_REGS. Remove IP registers.
7713 * config/aarch64/aarch64.md (Ucs): Update register constraint.
7714
7715 2018-02-01 Richard Biener <rguenther@suse.de>
7716
7717 * domwalk.h (dom_walker::dom_walker): Add additional constructor
7718 for specifying RPO order and allow NULL for that.
7719 * domwalk.c (dom_walker::dom_walker): Likewise.
7720 (dom_walker::walk): Handle NULL RPO order.
7721 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
7722 in RPO order.
7723 (rewrite_update_dom_walker): Likewise.
7724 (mark_def_dom_walker): Likewise.
7725
7726 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7727
7728 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
7729 (aarch64_maybe_expand_sve_subreg_move): Declare.
7730 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
7731 * config/aarch64/predicates.md (aarch64_any_register_operand): New
7732 predicate.
7733 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
7734 that are semantically a reverse operation.
7735 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
7736 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
7737 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
7738 functions.
7739 (aarch64_can_change_mode_class): For big-endian, forbid changes
7740 between two SVE modes if they have different element sizes.
7741
7742 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7743
7744 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
7745 the TImode handling for big-endian targets.
7746
7747 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7748
7749 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
7750 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
7751 not just bytes.
7752 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
7753 Remove BSWAP handing for big-endian targets and use the form of
7754 LD1RQ appropariate for the mode.
7755
7756 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7757
7758 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
7759 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
7760 duplicated element.
7761
7762 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7763
7764 PR tearget/83845
7765 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
7766 check for operands that need to go through aarch64_sve_reload_be.
7767
7768 2018-02-01 Jakub Jelinek <jakub@redhat.com>
7769
7770 PR tree-optimization/81661
7771 PR tree-optimization/84117
7772 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
7773 * tree-eh.c: Include gimplify.h.
7774 (find_trapping_overflow, replace_trapping_overflow,
7775 rewrite_to_non_trapping_overflow): New functions.
7776 * tree-vect-loop.c: Include tree-eh.h.
7777 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
7778 * tree-data-ref.c: Include tree-eh.h.
7779 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
7780
7781 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
7782
7783 PR rtl-optimization/84123
7784 * combine.c (change_zero_ext): Check if hard register satisfies
7785 can_change_dest_mode before calling gen_lowpart_SUBREG.
7786
7787 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
7788
7789 PR target/82444
7790 * ira.c (ira_init_register_move_cost): Remove assert.
7791
7792 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7793
7794 PR rtl-optimization/84071
7795 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
7796 * doc/tm.texi: Regenerate.
7797
7798 2018-01-31 Richard Biener <rguenther@suse.de>
7799
7800 PR tree-optimization/84132
7801 * tree-data-ref.c (analyze_miv_subscript): Properly
7802 check whether evolution_function_is_affine_multivariate_p
7803 before calling gcd_of_steps_may_divide_p.
7804
7805 2018-01-31 Julia Koval <julia.koval@intel.com>
7806
7807 PR target/83618
7808 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
7809 * config/i386/i386.md (rdpid_rex64) New.
7810 (rdpid): Make 32bit only.
7811
7812 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
7813
7814 PR lto/84105
7815 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
7816 an IDENTIFIER_NODE for FUNCTION_TYPE's.
7817
7818 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7819
7820 Revert
7821 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7822
7823 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7824
7825 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7826
7827 PR rtl-optimization/84071
7828 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
7829 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
7830
7831 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7832
7833 * config/arc/arc.c (arc_handle_aux_attribute): New function.
7834 (arc_attribute_table): Add 'aux' attribute.
7835 (arc_in_small_data_p): Consider aux like variables.
7836 (arc_is_aux_reg_p): New function.
7837 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
7838 (arc_get_aux_arg): New function.
7839 (prepare_move_operands): Handle aux-register access.
7840 (arc_handle_aux_attribute): New function.
7841 * doc/extend.texi (ARC Variable attributes): Add subsection.
7842
7843 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7844
7845 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
7846 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
7847 (arc_attribute_table): Add 'uncached' attribute.
7848 (arc_print_operand): Print '.di' flag for uncached memory
7849 accesses.
7850 (arc_in_small_data_p): Do not consider for small data the uncached
7851 types.
7852 (arc_is_uncached_mem_p): New function.
7853 * config/arc/predicates.md (compact_store_memory_operand): Check
7854 for uncached memory accesses.
7855 (nonvol_nonimm_operand): Likewise.
7856 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
7857
7858 2018-01-31 Jakub Jelinek <jakub@redhat.com>
7859
7860 PR c/84100
7861 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
7862 falign-loops=): Add Optimization flag.
7863
7864 2018-01-30 Jeff Law <law@redhat.com>
7865
7866 PR target/84064
7867 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
7868 INT_REGISTERS_SAVED. Check it prior to calling
7869 get_scratch_register_on_entry.
7870 (ix86_adjust_stack_and_probe): Similarly.
7871 (ix86_emit_probe_stack_range): Similarly.
7872 (ix86_expand_prologue): Corresponding changes.
7873
7874 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7875
7876 PR target/40411
7877 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
7878 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
7879
7880 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
7881
7882 PR target/84112
7883 * lra-constraints.c (curr_insn_transform): Process AND in the
7884 address.
7885
7886 2018-01-30 Jakub Jelinek <jakub@redhat.com>
7887
7888 PR rtl-optimization/83986
7889 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
7890 dependence against last_pending_memory_flush in addition to
7891 pending_jump_insns.
7892
7893 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
7894
7895 PR tree-optimization/81611
7896 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
7897 copies.
7898
7899 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7900
7901 PR target/83758
7902 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
7903 a reg rtx.
7904
7905 2018-01-30 Richard Biener <rguenther@suse.de>
7906 Jakub Jelinek <jakub@redhat.com>
7907
7908 PR tree-optimization/84111
7909 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
7910 inner loops added during recursion, as they don't have up-to-date
7911 SSA form.
7912
7913 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7914
7915 PR ipa/81360
7916 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
7917 (can_inline_edge_by_limits_p): ... here.
7918 (can_early_inline_edge_p, check_callers,
7919 update_caller_keys, update_callee_keys, recursive_inlining,
7920 add_new_edges_to_heap, speculation_useful_p,
7921 inline_small_functions,
7922 inline_small_functions, flatten_function,
7923 inline_to_all_callers_1): Update.
7924
7925 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7926
7927 * profile-count.c (profile_count::combine_with_ipa_count): Handle
7928 zeros correctly.
7929
7930 2018-01-30 Richard Biener <rguenther@suse.de>
7931
7932 PR tree-optimization/83008
7933 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
7934 invariant and constant vector uses in stmts when they need
7935 more than one stmt.
7936
7937 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7938
7939 PR bootstrap/84017
7940 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
7941 * configure: Regenerate.
7942
7943 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7944
7945 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
7946 pattern.
7947 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
7948 Use gen_rtx_REG rather than gen_lowpart.
7949
7950 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7951
7952 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
7953 rather than 0 when creating partial subregs.
7954
7955 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7956
7957 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
7958 of usage.
7959
7960 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
7961
7962 PR target/81550
7963 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
7964 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
7965 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
7966 flags. This restores the settings used before the 2017-07-24.
7967 Turning off pre increment/decrement/modify allows IVOPTS to
7968 optimize DF/SF loops where the index is an int.
7969
7970 2018-01-29 Richard Biener <rguenther@suse.de>
7971 Kelvin Nilsen <kelvin@gcc.gnu.org>
7972
7973 PR bootstrap/80867
7974 * tree-vect-stmts.c (vectorizable_call): Don't call
7975 targetm.vectorize_builtin_md_vectorized_function if callee is
7976 NULL.
7977
7978 2018-01-22 Carl Love <cel@us.ibm.com>
7979
7980 * doc/extend.tex: Fix typo in second arg in
7981 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
7982
7983 2018-01-29 Richard Biener <rguenther@suse.de>
7984
7985 PR tree-optimization/84086
7986 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
7987 (flush_ssaname_freelist): When SSA names were released reset
7988 the SCEV hash table.
7989
7990 2018-01-29 Richard Biener <rguenther@suse.de>
7991
7992 PR tree-optimization/84057
7993 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
7994 removed paths when removing edges.
7995
7996 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
7997
7998 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
7999 -mfunction-return=@var{choice}.
8000
8001 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
8002
8003 PR diagnostic/84034
8004 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8005 Handle CR like TAB.
8006 (layout::print_source_line): Likewise.
8007 (test_get_line_width_without_trailing_whitespace): Add test cases.
8008
8009 2018-01-27 Jakub Jelinek <jakub@redhat.com>
8010
8011 PR middle-end/84040
8012 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8013 debug insns.
8014
8015 2018-01-26 Jim Wilson <jimw@sifive.com>
8016
8017 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8018
8019 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8020 specified.
8021
8022 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8023
8024 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8025 and CMP + SUB-immediate -> SUBS.
8026
8027 2018-01-26 Martin Sebor <msebor@redhat.com>
8028
8029 PR tree-optimization/83896
8030 * tree-ssa-strlen.c (get_string_len): Rename...
8031 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
8032 Avoid assuming length is constant.
8033 (handle_char_store): Use HOST_WIDE_INT for string length.
8034
8035 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
8036
8037 PR target/81763
8038 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8039 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8040
8041 2018-01-26 Richard Biener <rguenther@suse.de>
8042
8043 PR rtl-optimization/84003
8044 * dse.c (record_store): Only record redundant stores when
8045 the earlier store aliases at least all accesses the later one does.
8046
8047 2018-01-26 Jakub Jelinek <jakub@redhat.com>
8048
8049 PR rtl-optimization/83985
8050 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8051 REG_CFA_RESTORE insns.
8052 (delete_unmarked_insns): Don't ignore separate shrink wrapping
8053 REG_CFA_RESTORE insns here.
8054
8055 PR c/83989
8056 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8057 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8058
8059 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8060
8061 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8062 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8063 (arc_init): Likewise.
8064 (arc_override_options): Likewise.
8065 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8066 value.
8067 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8068 support.
8069 * config/arc/arc.h (TARGET_DBNZ): Define.
8070 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8071 properly set the tune attribute.
8072 (dbnz): Use TARGET_DBNZ guard.
8073 * config/arc/arc.opt (mtune): Add core3 option.
8074
8075 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8076
8077 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8078 recognize new pic like addresses.
8079 (arc_delegitimize_address): Clean up.
8080
8081 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8082
8083 * config/arc/arc-arches.def: Option mrf16 valid for all
8084 architectures.
8085 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8086 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8087 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8088 * config/arc/arc-tables.opt: Regenerate.
8089 * config/arc/arc.c (arc_conditional_register_usage): Handle
8090 reduced register file case.
8091 (arc_file_start): Set must have build attributes.
8092 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8093 mrf16 option value.
8094 * config/arc/arc.opt (mrf16): Add new option.
8095 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8096 * config/arc/genmultilib.awk: Handle new mrf16 option.
8097 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8098 * config/arc/t-multilib: Regenerate.
8099 * doc/invoke.texi (ARC Options): Document mrf16 option.
8100
8101 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8102
8103 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8104 * config/arc/arc.c (arc_handle_secure_attribute): New function.
8105 (arc_attribute_table): Add 'secure_call' attribute.
8106 (arc_print_operand): Print secure call operand.
8107 (arc_function_ok_for_sibcall): Don't optimize tail calls when
8108 secure.
8109 (arc_is_secure_call_p): New function. * config/arc/arc.md
8110 (call_i): Add support for sjli instruction.
8111 (call_value_i): Likewise.
8112 * config/arc/constraints.md (Csc): New constraint.
8113
8114 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8115 John Eric Martin <John.Martin@emmicro-us.com>
8116
8117 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8118 * config/arc/arc.c (_arc_jli_section): New struct.
8119 (arc_jli_section): New type.
8120 (rc_jli_sections): New static variable.
8121 (arc_handle_jli_attribute): New function.
8122 (arc_attribute_table): Add jli_always and jli_fixed attribute.
8123 (arc_file_end): New function.
8124 (TARGET_ASM_FILE_END): Define.
8125 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8126 (arc_add_jli_section): New function.
8127 (jli_call_scan): Likewise.
8128 (arc_reorg): Call jli_call_scan.
8129 (arc_output_addsi): Remove 'S' from printing asm operand.
8130 (arc_is_jli_call_p): New function.
8131 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8132 operand.
8133 (movhi_insn): Likewise.
8134 (movsi_insn): Likewise.
8135 (movsi_set_cc_insn): Likewise.
8136 (loadqi_update): Likewise.
8137 (load_zeroextendqisi_update): Likewise.
8138 (load_signextendqisi_update): Likewise.
8139 (loadhi_update): Likewise.
8140 (load_zeroextendhisi_update): Likewise.
8141 (load_signextendhisi_update): Likewise.
8142 (loadsi_update): Likewise.
8143 (loadsf_update): Likewise.
8144 (movsicc_insn): Likewise.
8145 (bset_insn): Likewise.
8146 (bxor_insn): Likewise.
8147 (bclr_insn): Likewise.
8148 (bmsk_insn): Likewise.
8149 (bicsi3_insn): Likewise.
8150 (cmpsi_cc_c_insn): Likewise.
8151 (movsi_ne): Likewise.
8152 (movsi_cond_exec): Likewise.
8153 (clrsbsi2): Likewise.
8154 (norm_f): Likewise.
8155 (normw): Likewise.
8156 (swap): Likewise.
8157 (divaw): Likewise.
8158 (flag): Likewise.
8159 (sr): Likewise.
8160 (kflag): Likewise.
8161 (ffs): Likewise.
8162 (ffs_f): Likewise.
8163 (fls): Likewise.
8164 (call_i): Remove 'S' asm letter, add jli instruction.
8165 (call_value_i): Likewise.
8166 * config/arc/arc.op (mjli-always): New option.
8167 * config/arc/constraints.md (Cji): New constraint.
8168 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8169 operand.
8170 (subsf3_fpx): Likewise.
8171 (mulsf3_fpx): Likewise.
8172 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8173 asm operand.
8174 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8175 function attrbutes.
8176 * doc/invoke.texi (ARC): Document mjli-always option.
8177
8178 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
8179
8180 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
8181 avoid addition with 0 and use incw and decw where possible.
8182
8183 2018-01-26 Richard Biener <rguenther@suse.de>
8184
8185 PR tree-optimization/81082
8186 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8187 association if it requires casting to unsigned.
8188 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8189 from fold_plusminus_mult_expr to catch important cases late when
8190 range info is available.
8191
8192 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8193
8194 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
8195 * configure.ac (hidden_linkonce): New test.
8196 * configure: Regenerate.
8197 * config.in: Regenerate.
8198
8199 2018-01-26 Julia Koval <julia.koval@intel.com>
8200
8201 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
8202 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
8203 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
8204 _mm_mask_bitshuffle_epi64_mask): Fix type.
8205 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
8206 USI_FTYPE_V4DI_V4DI_USI): Remove.
8207 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
8208 __builtin_ia32_vpshufbitqmb256_mask,
8209 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
8210 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
8211 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
8212
8213 2018-01-26 Alan Modra <amodra@gmail.com>
8214
8215 PR target/84033
8216 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
8217 UNSPEC_VBPERMQ. Sort other unspecs.
8218
8219 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
8220
8221 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
8222
8223 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
8224
8225 PR middle-end/83055
8226 * predict.c (drop_profile): Do not push/pop cfun; update also
8227 node->count.
8228 (handle_missing_profiles): Fix logic looking for zero profiles.
8229
8230 2018-01-25 Jakub Jelinek <jakub@redhat.com>
8231
8232 PR middle-end/83977
8233 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
8234 on functions with #pragma omp declare simd or functions with simd
8235 attribute.
8236 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
8237 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
8238 Remove trailing \n from warning_at calls.
8239
8240 2018-01-25 Tom de Vries <tom@codesourcery.com>
8241
8242 PR target/84028
8243 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8244 for neutered workers.
8245
8246 2018-01-24 Joseph Myers <joseph@codesourcery.com>
8247
8248 PR target/68467
8249 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
8250 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
8251
8252 2018-01-24 Jeff Law <law@redhat.com>
8253
8254 PR target/83994
8255 * i386.c (get_probe_interval): Move to earlier point.
8256 (ix86_compute_frame_layout): If -fstack-clash-protection and
8257 the frame is larger than the probe interval, then use pushes
8258 to save registers rather than reg->mem moves.
8259 (ix86_expand_prologue): Remove conditional for int_registers_saved
8260 assertion.
8261
8262 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
8263
8264 PR target/84014
8265 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
8266 min/max for never referenced object.
8267
8268 2018-01-24 Jakub Jelinek <jakub@redhat.com>
8269
8270 PR middle-end/83977
8271 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
8272 here.
8273 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
8274 attributes from DECL_ATTRIBUTES (decl) without affecting
8275 DECL_ATTRIBUTES (current_function_decl).
8276 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
8277 functions with non-NULL DECL_ABSTRACT_ORIGIN.
8278
8279 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
8280
8281 PR tree-optimization/83979
8282 * fold-const.c (fold_comparison): Use constant_boolean_node
8283 instead of boolean_{true,false}_node.
8284
8285 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
8286
8287 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
8288 with zero counts.
8289
8290 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8291
8292 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8293 Simplify the clause that sets the length attribute.
8294 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8295 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
8296 clause that sets the length attribute.
8297 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8298
8299 2018-01-24 Tom de Vries <tom@codesourcery.com>
8300
8301 PR target/83589
8302 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
8303 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
8304 Add strict parameter.
8305 (prevent_branch_around_nothing): Insert dummy insn between branch to
8306 label and label with no ptx insn inbetween.
8307 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8308
8309 2018-01-24 Tom de Vries <tom@codesourcery.com>
8310
8311 PR target/81352
8312 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8313 for neutered threads in warp.
8314 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
8315
8316 2018-01-24 Richard Biener <rguenther@suse.de>
8317
8318 PR tree-optimization/83176
8319 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
8320 operands.
8321
8322 2018-01-24 Richard Biener <rguenther@suse.de>
8323
8324 PR tree-optimization/82819
8325 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
8326 code generating pluses that are no-ops in the target precision.
8327
8328 2018-01-24 Richard Biener <rguenther@suse.de>
8329
8330 PR middle-end/84000
8331 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
8332
8333 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8334
8335 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
8336 to merge probabilities.
8337 * predict.c (probably_never_executed): Also mark as cold functions
8338 with global 0 profile and guessed local profile.
8339 * profile-count.c (profile_probability::combine_with_count): New
8340 member function.
8341 * profile-count.h (profile_probability::operator*,
8342 profile_probability::operator*=, profile_probability::operator/,
8343 profile_probability::operator/=): Reduce precision to adjusted
8344 and set value to guessed on contradictory divisions.
8345 (profile_probability::combine_with_freq): Remove.
8346 (profile_probability::combine_wiht_count): Declare.
8347 (profile_count::force_nonzero):: Set to adjusted.
8348 (profile_count::probability_in):: Set quality to adjusted.
8349 * tree-ssa-tail-merge.c (replace_block_by): Use
8350 combine_with_count.
8351
8352 2018-01-23 Andrew Waterman <andrew@sifive.com>
8353 Jim Wilson <jimw@sifive.com>
8354
8355 * config/riscv/riscv.c (riscv_stack_boundary): New.
8356 (riscv_option_override): Set riscv_stack_boundary. Handle
8357 riscv_preferred_stack_boundary_arg.
8358 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8359 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8360 (STACK_BOUNDARY): Set to riscv_stack_boundary.
8361 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8362 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8363 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8364
8365 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
8366
8367 PR target/83905
8368 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8369 of struct ix86_frame.
8370 (ix86_expand_epilogue): Likewise. Add a local variable for
8371 the reg_save_offset field in struct ix86_frame.
8372
8373 2018-01-23 Bin Cheng <bin.cheng@arm.com>
8374
8375 PR tree-optimization/82604
8376 * tree-loop-distribution.c (enum partition_kind): New enum item
8377 PKIND_PARTIAL_MEMSET.
8378 (partition_builtin_p): Support above new enum item.
8379 (generate_code_for_partition): Ditto.
8380 (compute_access_range): Differentiate cases that equality can be
8381 proven at all loops, the innermost loops or no loops.
8382 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8383 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
8384 (finalize_partitions, distribute_loop): Don't fuse partition of
8385 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8386 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8387 parloop is enabled.
8388
8389 2018-01-23 Martin Liska <mliska@suse.cz>
8390
8391 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8392 order to ignore the predictor.
8393 (PRED_POLYMORPHIC_CALL): Likewise.
8394 (PRED_RECURSIVE_CALL): Likewise.
8395
8396 2018-01-23 Martin Liska <mliska@suse.cz>
8397
8398 * tree-profile.c (tree_profiling): Print function header to
8399 aware reader which function we are working on.
8400 * value-prof.c (gimple_find_values_to_profile): Do not print
8401 not interesting value histograms.
8402
8403 2018-01-23 Martin Liska <mliska@suse.cz>
8404
8405 * profile-count.h (enum profile_quality): Add
8406 profile_uninitialized as the first value. Do not number values
8407 as they are zero based.
8408 (profile_count::verify): Update sanity check.
8409 (profile_probability::verify): Likewise.
8410
8411 2018-01-23 Nathan Sidwell <nathan@acm.org>
8412
8413 * doc/invoke.texi (ffor-scope): Deprecate.
8414
8415 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8416
8417 PR tree-optimization/83510
8418 * domwalk.c (set_all_edges_as_executable): New function.
8419 (dom_walker::dom_walker): Convert bool param
8420 "skip_unreachable_blocks" to enum reachability. Move setup of
8421 edge flags to set_all_edges_as_executable and only do it when
8422 reachability is REACHABLE_BLOCKS.
8423 * domwalk.h (enum dom_walker::reachability): New enum.
8424 (dom_walker::dom_walker): Convert bool param
8425 "skip_unreachable_blocks" to enum reachability.
8426 (set_all_edges_as_executable): New decl.
8427 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
8428 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
8429 "reachability".
8430 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
8431 but converting true to REACHABLE_BLOCKS.
8432 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
8433 * tree-vrp.c
8434 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
8435 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
8436 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
8437 REACHABLE_BLOCKS.
8438 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
8439 if check_all_array_refs will be called.
8440
8441 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8442
8443 * tree.c (selftest::test_location_wrappers): Add more test
8444 coverage.
8445
8446 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8447
8448 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
8449 (selftest::test_bit_in_range): Likewise.
8450
8451 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8452
8453 PR testsuite/83888
8454 * doc/sourcebuild.texi (vect_float): Say that the selector
8455 only describes the situation when -funsafe-math-optimizations is on.
8456 (vect_float_strict): Document.
8457
8458 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8459
8460 PR tree-optimization/83965
8461 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8462 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
8463 instead of checking only for a reduction.
8464 (vect_recog_widen_sum_pattern): Likewise.
8465
8466 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8467
8468 * predict.c (probably_never_executed): Only use precise profile info.
8469 (compute_function_frequency): Skip after inlining hack since we now
8470 have quality checking.
8471
8472 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8473
8474 * profile-count.h (profile_probability::very_unlikely,
8475 profile_probability::unlikely, profile_probability::even): Set
8476 precision to guessed.
8477
8478 2018-01-23 Richard Biener <rguenther@suse.de>
8479
8480 PR tree-optimization/83963
8481 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
8482 Properly terminate dominator walk when crossing the exit edge not
8483 when visiting its source block.
8484
8485 2018-01-23 Jakub Jelinek <jakub@redhat.com>
8486
8487 PR c++/83918
8488 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
8489 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
8490
8491 2018-01-22 Jakub Jelinek <jakub@redhat.com>
8492
8493 PR tree-optimization/83957
8494 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
8495 semicolon after for body surrounded by braces.
8496
8497 PR tree-optimization/83081
8498 * profile-count.h (profile_probability::split): New method.
8499 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
8500 Use profile_probability::split.
8501 (do_compare_rtx_and_jump): Fix adjustment of probabilities
8502 when splitting a single conditional jump into 2.
8503
8504 2018-01-22 David Malcolm <dmalcolm@redhat.com>
8505
8506 PR tree-optimization/69452
8507 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
8508 decl.
8509
8510 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8511
8512 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
8513 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
8514 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
8515
8516 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8517
8518 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
8519 * config/rl78/rl78.md (movdi): New define_expand.
8520 * config/rl78/rl78.c (rl78_split_movdi): New function.
8521
8522 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
8523
8524 PR target/83862
8525 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
8526 no longer used.
8527 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
8528 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
8529 128-bit to produce an UNSPEC move to get the double word with the
8530 signbit and then a shift directly to do signbit.
8531 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
8532 implementation with a new version that just does either a direct
8533 move or a regular move. Move memory interface to separate insns.
8534 Move insns so they are next to the expander.
8535 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
8536 with signbit move. Split big and little endian case.
8537 (signbit<mode>2_dm_mem_le): Likewise.
8538 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
8539 (signbit<mode>2_dm2): Likewise.
8540
8541 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8542
8543 * config/rl78/rl78.md (anddi3): New define_expand.
8544
8545 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8546
8547 * config/rl78/rl78.md (umindi3): New define_expand.
8548
8549 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8550
8551 * config/rl78/rl78.md (smindi3): New define_expand.
8552
8553 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8554
8555 * config/rl78/rl78.md (smaxdi3): New define_expand.
8556
8557 2018-01-22 Carl Love <cel@us.ibm.com>
8558
8559 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
8560 LVX_V1TI): Add macro expansion.
8561 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
8562 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
8563 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
8564 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
8565 Change check to determine if the instruction is a byte reversing
8566 entry. Fix typo in comment.
8567 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
8568 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
8569 Add def_builtin calls for new builtins.
8570 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
8571 Add define_insn expansion.
8572
8573 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8574
8575 * config/rl78/rl78.md (umaxdi3): New define_expand.
8576
8577 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8578
8579 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
8580 for non-QImode registers.
8581
8582 2018-01-22 Richard Biener <rguenther@suse.de>
8583
8584 PR tree-optimization/83963
8585 * graphite-scop-detection.c (scop_detection::get_sese): Delay
8586 including the loop exit block.
8587 (scop_detection::merge_sese): Likewise.
8588 (scop_detection::add_scop): Do it here instead.
8589
8590 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8591
8592 * doc/sourcebuild.texi (arm_softfloat): Document.
8593
8594 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
8595
8596 PR gcc/77734
8597 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
8598 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
8599 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
8600
8601 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8602 David Edelsohn <dje.gcc@gmail.com>
8603
8604 PR target/83946
8605 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8606 Change "crset eq" to "crset 2".
8607 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8608 (*call_indirect_aix<mode>_nospec): Likewise.
8609 (*call_value_indirect_aix<mode>_nospec): Likewise.
8610 (*call_indirect_elfv2<mode>_nospec): Likewise.
8611 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
8612 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
8613 change assembly output from . to $.
8614 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8615 (indirect_jump<mode>_nospec): Change assembly output from . to $.
8616 (*tablejump<mode>_internal1_nospec): Likewise.
8617
8618 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
8619
8620 PR target/80870
8621 * config/sh/sh_optimize_sett_clrt.cc:
8622 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
8623
8624 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
8625
8626 PR tree-optimization/83940
8627 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
8628 offset_dt to vect_constant_def rather than vect_unknown_def_type.
8629 (vect_check_load_store_mask): Add a mask_dt_out parameter and
8630 use it to pass back the definition type.
8631 (vect_check_store_rhs): Likewise rhs_dt_out.
8632 (vect_build_gather_load_calls): Add a mask_dt argument and use
8633 it instead of a call to vect_is_simple_use.
8634 (vectorizable_store): Update calls to vect_check_load_store_mask
8635 and vect_check_store_rhs. Use the dt returned by the latter instead
8636 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
8637 instead of calls to vect_is_simple_use. Pass the scalar rather
8638 than the vector operand to vect_is_simple_use when handling
8639 second and subsequent copies of an rhs value.
8640 (vectorizable_load): Update calls to vect_check_load_store_mask
8641 and vect_build_gather_load_calls. Use the cached mask_dt and
8642 gs_info.offset_dt instead of calls to vect_is_simple_use.
8643
8644 2018-01-20 Jakub Jelinek <jakub@redhat.com>
8645
8646 PR middle-end/83945
8647 * tree-emutls.c: Include gimplify.h.
8648 (lower_emutls_2): New function.
8649 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
8650 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
8651 it before further processing.
8652
8653 PR target/83930
8654 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
8655 UINTVAL (trueop1) instead of INTVAL (op1).
8656
8657 2018-01-19 Jakub Jelinek <jakub@redhat.com>
8658
8659 PR debug/81570
8660 PR debug/83728
8661 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
8662 INCOMING_FRAME_SP_OFFSET if not defined.
8663 (scan_trace): Add ENTRY argument. If true and
8664 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
8665 emit a note to adjust the CFA offset.
8666 (create_cfi_notes): Adjust scan_trace callers.
8667 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
8668 INCOMING_FRAME_SP_OFFSET in the CIE.
8669 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
8670 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
8671 Likewise.
8672 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
8673 * doc/tm.texi: Regenerated.
8674
8675 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8676
8677 PR rtl-optimization/83147
8678 * lra-constraints.c (remove_inheritance_pseudos): Use
8679 lra_substitute_pseudo_within_insn.
8680
8681 2018-01-19 Tom de Vries <tom@codesourcery.com>
8682 Cesar Philippidis <cesar@codesourcery.com>
8683
8684 PR target/83920
8685 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
8686
8687 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
8688
8689 PR target/83790
8690 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
8691 spaces for function labels.
8692
8693 2018-01-19 Martin Liska <mliska@suse.cz>
8694
8695 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
8696 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
8697 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
8698 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
8699 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
8700 (PRED_CONST_RETURN): Change from 69 to 65.
8701 (PRED_NULL_RETURN): Change from 91 to 71.
8702 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
8703 (PRED_LOOP_GUARD): Change from 66 to 73.
8704
8705 2018-01-19 Martin Liska <mliska@suse.cz>
8706
8707 * predict.c (predict_insn_def): Add new assert.
8708 (struct branch_predictor): Change type to signed integer.
8709 (test_prediction_value_range): Amend test to cover
8710 PROB_UNINITIALIZED.
8711 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
8712 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
8713 (PRED_LOOP_ITERATIONS_MAX): Likewise.
8714 (PRED_LOOP_IV_COMPARE): Likewise.
8715 * predict.h (PROB_UNINITIALIZED): Define new constant.
8716
8717 2018-01-19 Martin Liska <mliska@suse.cz>
8718
8719 * predict.c (dump_prediction): Add new format for
8720 analyze_brprob.py script which is enabled with -details
8721 suboption.
8722 * profile-count.h (precise_p): New function.
8723
8724 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8725
8726 PR tree-optimization/83922
8727 * tree-vect-loop.c (vect_verify_full_masking): Return false if
8728 there are no statements that need masking.
8729 (vect_active_double_reduction_p): New function.
8730 (vect_analyze_loop_operations): Use it when handling phis that
8731 are not in the loop header.
8732
8733 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8734
8735 PR tree-optimization/83914
8736 * tree-vect-loop.c (vectorizable_induction): Don't convert
8737 init_expr or apply the peeling adjustment for inductions
8738 that are nested within the vectorized loop.
8739
8740 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8741
8742 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
8743 instead of NEG.
8744
8745 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8746
8747 PR sanitizer/81715
8748 PR testsuite/83882
8749 * function.h (gimplify_parameters): Add gimple_seq * argument.
8750 * function.c: Include gimple.h and options.h.
8751 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
8752 for the added local temporaries if needed.
8753 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
8754 if there are any parameter cleanups, wrap whole body into a
8755 try/finally with the cleanups.
8756
8757 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
8758
8759 PR target/82964
8760 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8761 Use GET_MODE_CLASS for scalar floating point.
8762
8763 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8764
8765 PR ipa/82256
8766 patch by PaX Team
8767 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8768 Fix call of call_cgraph_insertion_hooks.
8769
8770 2018-01-18 Martin Sebor <msebor@redhat.com>
8771
8772 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
8773
8774 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8775
8776 PR ipa/83619
8777 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
8778 frequencies.
8779
8780 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
8781
8782 PR other/70268
8783 * common.opt: (-ffile-prefix-map): New option.
8784 * opts.c (common_handle_option): Defer it.
8785 * opts-global.c (handle_common_deferred_options): Handle it.
8786 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
8787 * file-prefix-map.h: New file.
8788 (remap_debug_filename, add_debug_prefix_map): ...here.
8789 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
8790 * final.c (debug_prefix_map, add_debug_prefix_map
8791 remap_debug_filename): Move to...
8792 * file-prefix-map.c: New file.
8793 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
8794 generalize, get rid of alloca(), use strrchr() instead of strchr().
8795 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
8796 Implement in terms of add_prefix_map().
8797 (remap_macro_filename, remap_debug_filename): Implement in term of
8798 remap_filename().
8799 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
8800 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
8801 * dbxout.c: Include file-prefix-map.h.
8802 * varasm.c: Likewise.
8803 * vmsdbgout.c: Likewise.
8804 * xcoffout.c: Likewise.
8805 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
8806 * doc/cppopts.texi (-fmacro-prefix-map): Document.
8807 * doc/invoke.texi (-ffile-prefix-map): Document.
8808 (-fdebug-prefix-map): Update description.
8809
8810 2018-01-18 Martin Liska <mliska@suse.cz>
8811
8812 * config/i386/i386.c (indirect_thunk_name): Document that also
8813 lfence is emitted.
8814 (output_indirect_thunk): Document why both instructions
8815 (pause and lfence) are generated.
8816
8817 2018-01-18 Richard Biener <rguenther@suse.de>
8818
8819 PR tree-optimization/83887
8820 * graphite-scop-detection.c
8821 (scop_detection::get_nearest_dom_with_single_entry): Remove.
8822 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
8823 (scop_detection::merge_sese): Re-implement with a flood-fill
8824 algorithm that properly finds a SESE region if it exists.
8825
8826 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8827
8828 PR c/61240
8829 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
8830 pointer_diff optimizations use view_convert instead of convert.
8831
8832 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8833
8834 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8835 Generate different code for -mno-speculate-indirect-jumps.
8836 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8837 (*call_indirect_aix<mode>): Disable for
8838 -mno-speculate-indirect-jumps.
8839 (*call_indirect_aix<mode>_nospec): New define_insn.
8840 (*call_value_indirect_aix<mode>): Disable for
8841 -mno-speculate-indirect-jumps.
8842 (*call_value_indirect_aix<mode>_nospec): New define_insn.
8843 (*sibcall_nonlocal_sysv<mode>): Generate different code for
8844 -mno-speculate-indirect-jumps.
8845 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8846
8847 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8848
8849 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
8850 long double type, set the flags for noting the default long double
8851 type, even if we don't pass or return a long double type.
8852
8853 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
8854
8855 PR ipa/83051
8856 * ipa-inline.c (flatten_function): Do not overwrite final inlining
8857 failure.
8858
8859 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
8860
8861 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
8862 support for merge[hl].
8863 (fold_mergehl_helper): New helper function.
8864 (tree-vector-builder.h): New #include for tree_vector_builder usage.
8865 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
8866 (altivec_vmrglw_direct): Add xxmrglw insn.
8867
8868 2018-01-17 Andrew Waterman <andrew@sifive.com>
8869
8870 * config/riscv/riscv.c (riscv_conditional_register_usage): If
8871 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
8872
8873 2018-01-17 David Malcolm <dmalcolm@redhat.com>
8874
8875 PR lto/83121
8876 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
8877 call the lto_location_cache before reading the
8878 DECL_SOURCE_LOCATION of the types.
8879
8880 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
8881 Richard Sandiford <richard.sandiford@linaro.org>
8882
8883 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
8884 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
8885 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
8886 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
8887 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
8888 Add declaration.
8889 * config/aarch64/constraints.md (aarch64_movti_operand):
8890 Limit immediates.
8891 * config/aarch64/predicates.md (Uti): Add new constraint.
8892
8893 2018-01-17 Carl Love <cel@us.ibm.com>
8894
8895 * config/rs6000/vsx.md (define_expand xl_len_r,
8896 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
8897 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
8898 lxvll.
8899 (define_expand, define_insn): Move the shift left from the
8900 define_insn to the define_expand for lxvl and stxvl instructions.
8901 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
8902 and XL_LEN_R definitions to PURE.
8903
8904 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
8905
8906 * config/i386/i386.c (indirect_thunk_name): Declare regno
8907 as unsigned int. Compare regno with INVALID_REGNUM.
8908 (output_indirect_thunk): Ditto.
8909 (output_indirect_thunk_function): Ditto.
8910 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
8911 in the call to output_indirect_thunk_function.
8912
8913 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
8914
8915 PR middle-end/83884
8916 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
8917 rather than the size of inner_type to determine the stack slot size
8918 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
8919
8920 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
8921
8922 PR target/83546
8923 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
8924 to PTA_SILVERMONT.
8925
8926 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
8927
8928 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
8929 endian Linux systems to optionally enable multilibs for selecting
8930 the long double type if the user configured an explicit type.
8931 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
8932 have no long double multilibs if not defined.
8933 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
8934 warn if the user used -mabi={ieee,ibm}longdouble and we built
8935 multilibs for long double.
8936 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
8937 appropriate multilib option.
8938 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
8939 multilib options.
8940 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
8941 for building long double multilibs.
8942 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
8943
8944 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
8945
8946 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
8947 copies.
8948
8949 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
8950 64 bits.
8951 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
8952 128 bits.
8953
8954 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
8955 variables.
8956
8957 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
8958 return value.
8959
8960 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8961
8962 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
8963 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
8964
8965 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8966
8967 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
8968 different rtl trees depending on TARGET_64BIT.
8969 (rs6000_gen_lvx): Likewise.
8970
8971 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8972
8973 * config/visium/visium.md (nop): Tweak comment.
8974 (hazard_nop): Likewise.
8975
8976 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8977
8978 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
8979 -mspeculate-indirect-jumps.
8980 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
8981 for -mno-speculate-indirect-jumps.
8982 (*call_indirect_elfv2<mode>_nospec): New define_insn.
8983 (*call_value_indirect_elfv2<mode>): Disable for
8984 -mno-speculate-indirect-jumps.
8985 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
8986 (indirect_jump): Emit different RTL for
8987 -mno-speculate-indirect-jumps.
8988 (*indirect_jump<mode>): Disable for
8989 -mno-speculate-indirect-jumps.
8990 (*indirect_jump<mode>_nospec): New define_insn.
8991 (tablejump): Emit different RTL for
8992 -mno-speculate-indirect-jumps.
8993 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
8994 (tablejumpsi_nospec): New define_expand.
8995 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
8996 (tablejumpdi_nospec): New define_expand.
8997 (*tablejump<mode>_internal1): Disable for
8998 -mno-speculate-indirect-jumps.
8999 (*tablejump<mode>_internal1_nospec): New define_insn.
9000 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9001 option.
9002
9003 2018-01-16 Artyom Skrobov tyomitch@gmail.com
9004
9005 * caller-save.c (insert_save): Drop unnecessary parameter. All
9006 callers updated.
9007
9008 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9009 Richard Biener <rguenth@suse.de>
9010
9011 PR libgomp/83590
9012 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9013 return early, inline manually is_gimple_sizepos. Make sure if we
9014 call gimplify_expr we don't end up with a gimple constant.
9015 * tree.c (variably_modified_type_p): Don't return true for
9016 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
9017 * gimplify.h (is_gimple_sizepos): Remove.
9018
9019 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9020
9021 PR tree-optimization/83857
9022 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9023 vectorizable_live_operation for pure SLP statements.
9024 (vectorizable_live_operation): Handle PHIs.
9025
9026 2018-01-16 Richard Biener <rguenther@suse.de>
9027
9028 PR tree-optimization/83867
9029 * tree-vect-stmts.c (vect_transform_stmt): Precompute
9030 nested_in_vect_loop_p since the scalar stmt may get invalidated.
9031
9032 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9033
9034 PR c/83844
9035 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9036 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9037 If off is not INTEGER_CST, issue a may not be aligned warning
9038 rather than isn't aligned. Use isn%'t rather than isn't.
9039 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9040 into MULT_EXPR.
9041 <case MULT_EXPR>: Improve the case when bottom and one of the
9042 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9043 operand, in that case check if the other operand is multiple of
9044 bottom divided by the INTEGER_CST operand.
9045
9046 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9047
9048 PR target/83858
9049 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9050 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9051 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9052 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9053 * config/pa/pa.c (pa_function_arg_advance): Likewise.
9054 (pa_function_arg, pa_arg_partial_bytes): Likewise.
9055 (pa_function_arg_size): New function.
9056
9057 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9058
9059 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9060 in a separate statement.
9061
9062 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9063
9064 PR tree-optimization/83847
9065 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9066 group gathers and scatters.
9067
9068 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9069
9070 PR rtl-optimization/86620
9071 * params.def (max-sched-ready-insns): Bump minimum value to 1.
9072
9073 PR rtl-optimization/83213
9074 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9075 to last if both are JUMP_INSNs.
9076
9077 PR tree-optimization/83843
9078 * gimple-ssa-store-merging.c
9079 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9080 store_immediate_info for bswap/nop orig_stores.
9081
9082 2018-01-15 Andrew Waterman <andrew@sifive.com>
9083
9084 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9085 !TARGET_MUL.
9086 <UDIV>: Increase cost if !TARGET_DIV.
9087
9088 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
9089
9090 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9091 (define_attr "cr_logical_3op"): New.
9092 (cceq_ior_compare): Adjust.
9093 (cceq_ior_compare_complement): Adjust.
9094 (*cceq_rev_compare): Adjust.
9095 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9096 (is_cracked_insn): Adjust.
9097 (insn_must_be_first_in_group): Adjust.
9098 * config/rs6000/40x.md: Adjust.
9099 * config/rs6000/440.md: Adjust.
9100 * config/rs6000/476.md: Adjust.
9101 * config/rs6000/601.md: Adjust.
9102 * config/rs6000/603.md: Adjust.
9103 * config/rs6000/6xx.md: Adjust.
9104 * config/rs6000/7450.md: Adjust.
9105 * config/rs6000/7xx.md: Adjust.
9106 * config/rs6000/8540.md: Adjust.
9107 * config/rs6000/cell.md: Adjust.
9108 * config/rs6000/e300c2c3.md: Adjust.
9109 * config/rs6000/e500mc.md: Adjust.
9110 * config/rs6000/e500mc64.md: Adjust.
9111 * config/rs6000/e5500.md: Adjust.
9112 * config/rs6000/e6500.md: Adjust.
9113 * config/rs6000/mpc.md: Adjust.
9114 * config/rs6000/power4.md: Adjust.
9115 * config/rs6000/power5.md: Adjust.
9116 * config/rs6000/power6.md: Adjust.
9117 * config/rs6000/power7.md: Adjust.
9118 * config/rs6000/power8.md: Adjust.
9119 * config/rs6000/power9.md: Adjust.
9120 * config/rs6000/rs64.md: Adjust.
9121 * config/rs6000/titan.md: Adjust.
9122
9123 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9124
9125 * config/i386/predicates.md (indirect_branch_operand): Rewrite
9126 ix86_indirect_branch_register logic.
9127
9128 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9129
9130 * config/i386/constraints.md (Bs): Update
9131 ix86_indirect_branch_register check. Don't check
9132 ix86_indirect_branch_register with GOT_memory_operand.
9133 (Bw): Likewise.
9134 * config/i386/predicates.md (GOT_memory_operand): Don't check
9135 ix86_indirect_branch_register here.
9136 (GOT32_symbol_operand): Likewise.
9137
9138 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9139
9140 * config/i386/predicates.md (constant_call_address_operand):
9141 Rewrite ix86_indirect_branch_register logic.
9142 (sibcall_insn_operand): Likewise.
9143
9144 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9145
9146 * config/i386/constraints.md (Bs): Replace
9147 ix86_indirect_branch_thunk_register with
9148 ix86_indirect_branch_register.
9149 (Bw): Likewise.
9150 * config/i386/i386.md (indirect_jump): Likewise.
9151 (tablejump): Likewise.
9152 (*sibcall_memory): Likewise.
9153 (*sibcall_value_memory): Likewise.
9154 Peepholes of indirect call and jump via memory: Likewise.
9155 * config/i386/i386.opt: Likewise.
9156 * config/i386/predicates.md (indirect_branch_operand): Likewise.
9157 (GOT_memory_operand): Likewise.
9158 (call_insn_operand): Likewise.
9159 (sibcall_insn_operand): Likewise.
9160 (GOT32_symbol_operand): Likewise.
9161
9162 2018-01-15 Jakub Jelinek <jakub@redhat.com>
9163
9164 PR middle-end/83837
9165 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9166 type rather than type addr's type points to.
9167 (expand_omp_atomic_mutex): Likewise.
9168 (expand_omp_atomic): Likewise.
9169
9170 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9171
9172 PR target/83839
9173 * config/i386/i386.c (output_indirect_thunk_function): Use
9174 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9175 for __x86_return_thunk.
9176
9177 2018-01-15 Richard Biener <rguenther@suse.de>
9178
9179 PR middle-end/83850
9180 * expmed.c (extract_bit_field_1): Fix typo.
9181
9182 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9183
9184 PR target/83687
9185 * config/arm/iterators.md (VF): New mode iterator.
9186 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9187 Remove integer-related logic from pattern.
9188 (neon_vabd<mode>_3): Likewise.
9189
9190 2018-01-15 Jakub Jelinek <jakub@redhat.com>
9191
9192 PR middle-end/82694
9193 * common.opt (fstrict-overflow): No longer an alias.
9194 (fwrapv-pointer): New option.
9195 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
9196 also for pointer types based on flag_wrapv_pointer.
9197 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
9198 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
9199 opts->x_flag_wrapv got set.
9200 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
9201 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
9202 POINTER_TYPE_OVERFLOW_UNDEFINED.
9203 * match.pd: Likewise in address comparison pattern.
9204 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
9205
9206 2018-01-15 Richard Biener <rguenther@suse.de>
9207
9208 PR lto/83804
9209 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
9210 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
9211 Reset type names to their identifier if their TYPE_DECL doesn't
9212 have linkage (and thus is used for ODR and devirt).
9213 (save_debug_info_for_decl): Remove.
9214 (save_debug_info_for_type): Likewise.
9215 (add_tree_to_fld_list): Adjust.
9216 * tree-pretty-print.c (dump_generic_node): Make dumping of
9217 type names more robust.
9218
9219 2018-01-15 Richard Biener <rguenther@suse.de>
9220
9221 * BASE-VER: Bump to 8.0.1.
9222
9223 2018-01-14 Martin Sebor <msebor@redhat.com>
9224
9225 PR other/83508
9226 * builtins.c (check_access): Avoid warning when the no-warning bit
9227 is set.
9228
9229 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
9230
9231 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
9232 * ira-color (allocno_hard_regs_compare): Likewise.
9233
9234 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
9235
9236 PR target/83013
9237 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
9238 Use .pushsection/.popsection.
9239
9240 2018-01-14 Martin Sebor <msebor@redhat.com>
9241
9242 PR c++/81327
9243 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
9244
9245 2018-01-14 Jakub Jelinek <jakub@redhat.com>
9246
9247 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
9248 entry from extra_headers.
9249 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
9250 extra_headers, make the list bitwise identical to the i?86-*-* one.
9251
9252 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9253
9254 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
9255 -mcmodel=large with -mindirect-branch=thunk,
9256 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
9257 -mfunction-return=thunk-extern.
9258 * doc/invoke.texi: Document -mcmodel=large is incompatible with
9259 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
9260 -mfunction-return=thunk and -mfunction-return=thunk-extern.
9261
9262 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9263
9264 * config/i386/i386.c (print_reg): Print the name of the full
9265 integer register without '%'.
9266 (ix86_print_operand): Handle 'V'.
9267 * doc/extend.texi: Document 'V' modifier.
9268
9269 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9270
9271 * config/i386/constraints.md (Bs): Disallow memory operand for
9272 -mindirect-branch-register.
9273 (Bw): Likewise.
9274 * config/i386/predicates.md (indirect_branch_operand): Likewise.
9275 (GOT_memory_operand): Likewise.
9276 (call_insn_operand): Likewise.
9277 (sibcall_insn_operand): Likewise.
9278 (GOT32_symbol_operand): Likewise.
9279 * config/i386/i386.md (indirect_jump): Call convert_memory_address
9280 for -mindirect-branch-register.
9281 (tablejump): Likewise.
9282 (*sibcall_memory): Likewise.
9283 (*sibcall_value_memory): Likewise.
9284 Disallow peepholes of indirect call and jump via memory for
9285 -mindirect-branch-register.
9286 (*call_pop): Replace m with Bw.
9287 (*call_value_pop): Likewise.
9288 (*sibcall_pop_memory): Replace m with Bs.
9289 * config/i386/i386.opt (mindirect-branch-register): New option.
9290 * doc/invoke.texi: Document -mindirect-branch-register option.
9291
9292 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9293
9294 * config/i386/i386-protos.h (ix86_output_function_return): New.
9295 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
9296 set function_return_type.
9297 (indirect_thunk_name): Add ret_p to indicate thunk for function
9298 return.
9299 (output_indirect_thunk_function): Pass false to
9300 indirect_thunk_name.
9301 (ix86_output_indirect_branch_via_reg): Likewise.
9302 (ix86_output_indirect_branch_via_push): Likewise.
9303 (output_indirect_thunk_function): Create alias for function
9304 return thunk if regno < 0.
9305 (ix86_output_function_return): New function.
9306 (ix86_handle_fndecl_attribute): Handle function_return.
9307 (ix86_attribute_table): Add function_return.
9308 * config/i386/i386.h (machine_function): Add
9309 function_return_type.
9310 * config/i386/i386.md (simple_return_internal): Use
9311 ix86_output_function_return.
9312 (simple_return_internal_long): Likewise.
9313 * config/i386/i386.opt (mfunction-return=): New option.
9314 (indirect_branch): Mention -mfunction-return=.
9315 * doc/extend.texi: Document function_return function attribute.
9316 * doc/invoke.texi: Document -mfunction-return= option.
9317
9318 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9319
9320 * config/i386/i386-opts.h (indirect_branch): New.
9321 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
9322 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
9323 with local indirect jump when converting indirect call and jump.
9324 (ix86_set_indirect_branch_type): New.
9325 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
9326 (indirectlabelno): New.
9327 (indirect_thunk_needed): Likewise.
9328 (indirect_thunk_bnd_needed): Likewise.
9329 (indirect_thunks_used): Likewise.
9330 (indirect_thunks_bnd_used): Likewise.
9331 (INDIRECT_LABEL): Likewise.
9332 (indirect_thunk_name): Likewise.
9333 (output_indirect_thunk): Likewise.
9334 (output_indirect_thunk_function): Likewise.
9335 (ix86_output_indirect_branch_via_reg): Likewise.
9336 (ix86_output_indirect_branch_via_push): Likewise.
9337 (ix86_output_indirect_branch): Likewise.
9338 (ix86_output_indirect_jmp): Likewise.
9339 (ix86_code_end): Call output_indirect_thunk_function if needed.
9340 (ix86_output_call_insn): Call ix86_output_indirect_branch if
9341 needed.
9342 (ix86_handle_fndecl_attribute): Handle indirect_branch.
9343 (ix86_attribute_table): Add indirect_branch.
9344 * config/i386/i386.h (machine_function): Add indirect_branch_type
9345 and has_local_indirect_jump.
9346 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
9347 to true.
9348 (tablejump): Likewise.
9349 (*indirect_jump): Use ix86_output_indirect_jmp.
9350 (*tablejump_1): Likewise.
9351 (simple_return_indirect_internal): Likewise.
9352 * config/i386/i386.opt (mindirect-branch=): New option.
9353 (indirect_branch): New.
9354 (keep): Likewise.
9355 (thunk): Likewise.
9356 (thunk-inline): Likewise.
9357 (thunk-extern): Likewise.
9358 * doc/extend.texi: Document indirect_branch function attribute.
9359 * doc/invoke.texi: Document -mindirect-branch= option.
9360
9361 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
9362
9363 PR ipa/83051
9364 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9365
9366 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
9367
9368 * ipa-inline.c (want_inline_small_function_p): Return false if
9369 inlining has already failed with CIF_FINAL_ERROR.
9370 (update_caller_keys): Call want_inline_small_function_p before
9371 can_inline_edge_p.
9372 (update_callee_keys): Likewise.
9373
9374 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9375
9376 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9377 New function.
9378 (rs6000_quadword_masked_address_p): Likewise.
9379 (quad_aligned_load_p): Likewise.
9380 (quad_aligned_store_p): Likewise.
9381 (const_load_sequence_p): Add comment to describe the outer-most loop.
9382 (mimic_memory_attributes_and_flags): New function.
9383 (rs6000_gen_stvx): Likewise.
9384 (replace_swapped_aligned_store): Likewise.
9385 (rs6000_gen_lvx): Likewise.
9386 (replace_swapped_aligned_load): Likewise.
9387 (replace_swapped_load_constant): Capitalize argument name in
9388 comment describing this function.
9389 (rs6000_analyze_swaps): Add a third pass to search for vector loads
9390 and stores that access quad-word aligned addresses and replace
9391 with stvx or lvx instructions when appropriate.
9392 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9393 New function prototype.
9394 (rs6000_quadword_masked_address_p): Likewise.
9395 (rs6000_gen_lvx): Likewise.
9396 (rs6000_gen_stvx): Likewise.
9397 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9398 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9399 when memory address is aligned.
9400 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9401 this split to select lvx instruction when memory address is aligned.
9402 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
9403 instruction when memory address is aligned.
9404 (*vsx_le_perm_load_v16qi): Likewise.
9405 (four unnamed splitters): Modify to select the stvx instruction
9406 when memory is aligned.
9407
9408 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
9409
9410 * predict.c (determine_unlikely_bbs): Handle correctly BBs
9411 which appears in the queue multiple times.
9412
9413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9414 Alan Hayward <alan.hayward@arm.com>
9415 David Sherwood <david.sherwood@arm.com>
9416
9417 * tree-vectorizer.h (vec_lower_bound): New structure.
9418 (_loop_vec_info): Add check_nonzero and lower_bounds.
9419 (LOOP_VINFO_CHECK_NONZERO): New macro.
9420 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
9421 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
9422 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
9423 fields. Make seg_len the distance travelled, not including the
9424 access size.
9425 (dr_direction_indicator): Declare.
9426 (dr_zero_step_indicator): Likewise.
9427 (dr_known_forward_stride_p): Likewise.
9428 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
9429 tree-ssanames.h.
9430 (runtime_alias_check_p): Allow runtime alias checks with
9431 variable strides.
9432 (operator ==): Compare access_size and align.
9433 (prune_runtime_alias_test_list): Rework for new distinction between
9434 the access_size and seg_len.
9435 (create_intersect_range_checks_index): Likewise. Cope with polynomial
9436 segment lengths.
9437 (get_segment_min_max): New function.
9438 (create_intersect_range_checks): Use it.
9439 (dr_step_indicator): New function.
9440 (dr_direction_indicator): Likewise.
9441 (dr_zero_step_indicator): Likewise.
9442 (dr_known_forward_stride_p): Likewise.
9443 * tree-loop-distribution.c (data_ref_segment_size): Return
9444 DR_STEP * (niters - 1).
9445 (compute_alias_check_pairs): Update call to the dr_with_seg_len
9446 constructor.
9447 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
9448 (vect_preserves_scalar_order_p): New function, split out from...
9449 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
9450 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
9451 (vect_vfa_access_size): New function.
9452 (vect_vfa_align): Likewise.
9453 (vect_compile_time_alias): Take access_size_a and access_b arguments.
9454 (dump_lower_bound): New function.
9455 (vect_check_lower_bound): Likewise.
9456 (vect_small_gap_p): Likewise.
9457 (vectorizable_with_step_bound_p): Likewise.
9458 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
9459 depencies if the vectorization factor is 1. Convert the checks
9460 for nonzero steps into checks on the bounds of DR_STEP. Try using
9461 a bunds check for variable steps if the minimum required step is
9462 relatively small. Update calls to the dr_with_seg_len
9463 constructor and to vect_compile_time_alias.
9464 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
9465 function.
9466 (vect_loop_versioning): Call it.
9467 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
9468 when retrying.
9469 (vect_estimate_min_profitable_iters): Account for any bounds checks.
9470
9471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9472 Alan Hayward <alan.hayward@arm.com>
9473 David Sherwood <david.sherwood@arm.com>
9474
9475 * doc/sourcebuild.texi (vect_scatter_store): Document.
9476 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
9477 optabs.
9478 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
9479 Document.
9480 * genopinit.c (main): Add supports_vec_scatter_store and
9481 supports_vec_scatter_store_cached to target_optabs.
9482 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
9483 IFN_MASK_SCATTER_STORE.
9484 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
9485 functions.
9486 * internal-fn.h (internal_store_fn_p): Declare.
9487 (internal_fn_stored_value_index): Likewise.
9488 * internal-fn.c (scatter_store_direct): New macro.
9489 (expand_scatter_store_optab_fn): New function.
9490 (direct_scatter_store_optab_supported_p): New macro.
9491 (internal_store_fn_p): New function.
9492 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
9493 IFN_MASK_SCATTER_STORE.
9494 (internal_fn_mask_index): Likewise.
9495 (internal_fn_stored_value_index): New function.
9496 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
9497 for scatter stores.
9498 * optabs-query.h (supports_vec_scatter_store_p): Declare.
9499 * optabs-query.c (supports_vec_scatter_store_p): New function.
9500 * tree-vectorizer.h (vect_get_store_rhs): Declare.
9501 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
9502 true for scatter stores.
9503 (vect_gather_scatter_fn_p): Handle scatter stores too.
9504 (vect_check_gather_scatter): Consider using scatter stores if
9505 supports_vec_scatter_store_p.
9506 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
9507 scatter stores too.
9508 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9509 internal_fn_stored_value_index.
9510 (check_load_store_masking): Handle scatter stores too.
9511 (vect_get_store_rhs): Make public.
9512 (vectorizable_call): Use internal_store_fn_p.
9513 (vectorizable_store): Handle scatter store internal functions.
9514 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
9515 when deciding whether the end of the group has been reached.
9516 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
9517 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
9518 (mask_scatter_store<mode>): New insns.
9519
9520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9521 Alan Hayward <alan.hayward@arm.com>
9522 David Sherwood <david.sherwood@arm.com>
9523
9524 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
9525 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
9526 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
9527 function.
9528 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
9529 Use vect_truncate_gather_scatter_offset if we can't treat the
9530 operation as a normal gather load or scatter store.
9531 (get_group_load_store_type): Take the gather_scatter_info
9532 as argument. Try using a gather load or scatter store for
9533 single-element groups.
9534 (get_load_store_type): Update calls to get_group_load_store_type
9535 and vect_use_strided_gather_scatters_p.
9536
9537 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9538 Alan Hayward <alan.hayward@arm.com>
9539 David Sherwood <david.sherwood@arm.com>
9540
9541 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
9542 optional tree argument.
9543 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
9544 null target hooks.
9545 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
9546 but continue to use the current value as a fallback.
9547 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
9548 to compare the updates.
9549 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
9550 (get_load_store_type): Use it when handling a strided access.
9551 (vect_get_strided_load_store_ops): New function.
9552 (vect_get_data_ptr_increment): Likewise.
9553 (vectorizable_load): Handle strided gather loads. Always pass
9554 a step to vect_create_data_ref_ptr and bump_vector_ptr.
9555
9556 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9557 Alan Hayward <alan.hayward@arm.com>
9558 David Sherwood <david.sherwood@arm.com>
9559
9560 * doc/md.texi (gather_load@var{m}): Document.
9561 (mask_gather_load@var{m}): Likewise.
9562 * genopinit.c (main): Add supports_vec_gather_load and
9563 supports_vec_gather_load_cached to target_optabs.
9564 * optabs-tree.c (init_tree_optimization_optabs): Use
9565 ggc_cleared_alloc to allocate target_optabs.
9566 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
9567 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
9568 functions.
9569 * internal-fn.h (internal_load_fn_p): Declare.
9570 (internal_gather_scatter_fn_p): Likewise.
9571 (internal_fn_mask_index): Likewise.
9572 (internal_gather_scatter_fn_supported_p): Likewise.
9573 * internal-fn.c (gather_load_direct): New macro.
9574 (expand_gather_load_optab_fn): New function.
9575 (direct_gather_load_optab_supported_p): New macro.
9576 (direct_internal_fn_optab): New function.
9577 (internal_load_fn_p): Likewise.
9578 (internal_gather_scatter_fn_p): Likewise.
9579 (internal_fn_mask_index): Likewise.
9580 (internal_gather_scatter_fn_supported_p): Likewise.
9581 * optabs-query.c (supports_at_least_one_mode_p): New function.
9582 (supports_vec_gather_load_p): Likewise.
9583 * optabs-query.h (supports_vec_gather_load_p): Declare.
9584 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
9585 and memory_type field.
9586 (NUM_PATTERNS): Bump to 15.
9587 * tree-vect-data-refs.c: Include internal-fn.h.
9588 (vect_gather_scatter_fn_p): New function.
9589 (vect_describe_gather_scatter_call): Likewise.
9590 (vect_check_gather_scatter): Try using internal functions for
9591 gather loads. Recognize existing calls to a gather load function.
9592 (vect_analyze_data_refs): Consider using gather loads if
9593 supports_vec_gather_load_p.
9594 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
9595 (vect_get_gather_scatter_offset_type): Likewise.
9596 (vect_convert_mask_for_vectype): Likewise.
9597 (vect_add_conversion_to_patterm): Likewise.
9598 (vect_try_gather_scatter_pattern): Likewise.
9599 (vect_recog_gather_scatter_pattern): New pattern recognizer.
9600 (vect_vect_recog_func_ptrs): Add it.
9601 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9602 internal_fn_mask_index and internal_gather_scatter_fn_p.
9603 (check_load_store_masking): Take the gather_scatter_info as an
9604 argument and handle gather loads.
9605 (vect_get_gather_scatter_ops): New function.
9606 (vectorizable_call): Check internal_load_fn_p.
9607 (vectorizable_load): Likewise. Handle gather load internal
9608 functions.
9609 (vectorizable_store): Update call to check_load_store_masking.
9610 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
9611 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
9612 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
9613 (aarch64_gather_scale_operand_d): New predicates.
9614 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
9615 (mask_gather_load<mode>): New insns.
9616
9617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9618 Alan Hayward <alan.hayward@arm.com>
9619 David Sherwood <david.sherwood@arm.com>
9620
9621 * optabs.def (fold_left_plus_optab): New optab.
9622 * doc/md.texi (fold_left_plus_@var{m}): Document.
9623 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
9624 * internal-fn.c (fold_left_direct): Define.
9625 (expand_fold_left_optab_fn): Likewise.
9626 (direct_fold_left_optab_supported_p): Likewise.
9627 * fold-const-call.c (fold_const_fold_left): New function.
9628 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
9629 * tree-parloops.c (valid_reduction_p): New function.
9630 (gather_scalar_reductions): Use it.
9631 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
9632 (vect_finish_replace_stmt): Declare.
9633 * tree-vect-loop.c (fold_left_reduction_fn): New function.
9634 (needs_fold_left_reduction_p): New function, split out from...
9635 (vect_is_simple_reduction): ...here. Accept reductions that
9636 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
9637 (vect_force_simple_reduction): Also store the reduction type in
9638 the assignment's STMT_VINFO_REDUC_TYPE.
9639 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
9640 (merge_with_identity): New function.
9641 (vect_expand_fold_left): Likewise.
9642 (vectorize_fold_left_reduction): Likewise.
9643 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
9644 scalar phi in place for it. Check for target support and reject
9645 cases that would reassociate the operation. Defer the transform
9646 phase to vectorize_fold_left_reduction.
9647 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
9648 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
9649 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
9650
9651 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9652
9653 * tree-if-conv.c (predicate_mem_writes): Remove redundant
9654 call to ifc_temp_var.
9655
9656 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9657 Alan Hayward <alan.hayward@arm.com>
9658 David Sherwood <david.sherwood@arm.com>
9659
9660 * target.def (legitimize_address_displacement): Take the original
9661 offset as a poly_int.
9662 * targhooks.h (default_legitimize_address_displacement): Update
9663 accordingly.
9664 * targhooks.c (default_legitimize_address_displacement): Likewise.
9665 * doc/tm.texi: Regenerate.
9666 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
9667 as an argument, moving assert of ad->disp == ad->disp_term to...
9668 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
9669 Try calling targetm.legitimize_address_displacement before expanding
9670 the address rather than afterwards, and adjust for the new interface.
9671 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9672 Match the new hook interface. Handle SVE addresses.
9673 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
9674 new hook interface.
9675
9676 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9677
9678 * Makefile.in (OBJS): Add early-remat.o.
9679 * target.def (select_early_remat_modes): New hook.
9680 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
9681 * doc/tm.texi: Regenerate.
9682 * targhooks.h (default_select_early_remat_modes): Declare.
9683 * targhooks.c (default_select_early_remat_modes): New function.
9684 * timevar.def (TV_EARLY_REMAT): New timevar.
9685 * passes.def (pass_early_remat): New pass.
9686 * tree-pass.h (make_pass_early_remat): Declare.
9687 * early-remat.c: New file.
9688 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
9689 function.
9690 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
9691
9692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9693 Alan Hayward <alan.hayward@arm.com>
9694 David Sherwood <david.sherwood@arm.com>
9695
9696 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
9697 vfm1 with a bound_epilog parameter.
9698 (vect_do_peeling): Update calls accordingly, and move the prologue
9699 call earlier in the function. Treat the base bound_epilog as 0 for
9700 fully-masked loops and retain vf - 1 for other loops. Add 1 to
9701 this base when peeling for gaps.
9702 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
9703 with fully-masked loops.
9704 (vect_estimate_min_profitable_iters): Handle the single peeled
9705 iteration in that case.
9706
9707 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9708 Alan Hayward <alan.hayward@arm.com>
9709 David Sherwood <david.sherwood@arm.com>
9710
9711 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
9712 single-element interleaving even if the size is not a power of 2.
9713 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
9714 accesses for single-element interleaving if the group size is
9715 not a power of 2.
9716
9717 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9718 Alan Hayward <alan.hayward@arm.com>
9719 David Sherwood <david.sherwood@arm.com>
9720
9721 * doc/md.texi (fold_extract_last_@var{m}): Document.
9722 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
9723 * optabs.def (fold_extract_last_optab): New optab.
9724 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
9725 * internal-fn.c (fold_extract_direct): New macro.
9726 (expand_fold_extract_optab_fn): Likewise.
9727 (direct_fold_extract_optab_supported_p): Likewise.
9728 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
9729 * tree-vect-loop.c (vect_model_reduction_cost): Handle
9730 EXTRACT_LAST_REDUCTION.
9731 (get_initial_def_for_reduction): Do not create an initial vector
9732 for EXTRACT_LAST_REDUCTION reductions.
9733 (vectorizable_reduction): Leave the scalar phi in place for
9734 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
9735 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
9736 epilogue code for EXTRACT_LAST_REDUCTION and defer the
9737 transform phase to vectorizable_condition.
9738 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
9739 split out from...
9740 (vect_finish_stmt_generation): ...here.
9741 (vect_finish_replace_stmt): New function.
9742 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
9743 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
9744 pattern.
9745 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
9746
9747 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9748 Alan Hayward <alan.hayward@arm.com>
9749 David Sherwood <david.sherwood@arm.com>
9750
9751 * doc/md.texi (extract_last_@var{m}): Document.
9752 * optabs.def (extract_last_optab): New optab.
9753 * internal-fn.def (EXTRACT_LAST): New internal function.
9754 * internal-fn.c (cond_unary_direct): New macro.
9755 (expand_cond_unary_optab_fn): Likewise.
9756 (direct_cond_unary_optab_supported_p): Likewise.
9757 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
9758 loops using EXTRACT_LAST.
9759 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
9760 (extract_last_<mode>): ...this optab.
9761 (vec_extract<mode><Vel>): Update accordingly.
9762
9763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9764 Alan Hayward <alan.hayward@arm.com>
9765 David Sherwood <david.sherwood@arm.com>
9766
9767 * target.def (empty_mask_is_expensive): New hook.
9768 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
9769 * doc/tm.texi: Regenerate.
9770 * targhooks.h (default_empty_mask_is_expensive): Declare.
9771 * targhooks.c (default_empty_mask_is_expensive): New function.
9772 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
9773 if the target says that empty masks are expensive.
9774 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
9775 New function.
9776 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
9777
9778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9779 Alan Hayward <alan.hayward@arm.com>
9780 David Sherwood <david.sherwood@arm.com>
9781
9782 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
9783 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
9784 (vect_use_loop_mask_for_alignment_p): New function.
9785 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
9786 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
9787 niters_skip argument. Make sure that the first niters_skip elements
9788 of the first iteration are inactive.
9789 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
9790 Update call to vect_set_loop_masks_directly.
9791 (get_misalign_in_elems): New function, split out from...
9792 (vect_gen_prolog_loop_niters): ...here.
9793 (vect_update_init_of_dr): Take a code argument that specifies whether
9794 the adjustment should be added or subtracted.
9795 (vect_update_init_of_drs): Likewise.
9796 (vect_prepare_for_masked_peels): New function.
9797 (vect_do_peeling): Skip prologue peeling if we're using a mask
9798 instead. Update call to vect_update_inits_of_drs.
9799 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9800 mask_skip_niters.
9801 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
9802 alignment. Do not include the number of peeled iterations in
9803 the minimum threshold in that case.
9804 (vectorizable_induction): Adjust the start value down by
9805 LOOP_VINFO_MASK_SKIP_NITERS iterations.
9806 (vect_transform_loop): Call vect_prepare_for_masked_peels.
9807 Take the number of skipped iterations into account when calculating
9808 the loop bounds.
9809 * tree-vect-stmts.c (vect_gen_while_not): New function.
9810
9811 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9812 Alan Hayward <alan.hayward@arm.com>
9813 David Sherwood <david.sherwood@arm.com>
9814
9815 * doc/sourcebuild.texi (vect_fully_masked): Document.
9816 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
9817 default value to 0.
9818 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
9819 split out from...
9820 (vect_analyze_loop_2): ...here. Don't check the vectorization
9821 factor against the number of loop iterations if the loop is
9822 fully-masked.
9823
9824 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9825 Alan Hayward <alan.hayward@arm.com>
9826 David Sherwood <david.sherwood@arm.com>
9827
9828 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
9829 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
9830 (dump_groups): Update accordingly.
9831 (iv_use::mem_type): New member variable.
9832 (address_p): New function.
9833 (record_use): Add a mem_type argument and initialize the new
9834 mem_type field.
9835 (record_group_use): Add a mem_type argument. Use address_p.
9836 Remove obsolete null checks of base_object. Update call to record_use.
9837 (find_interesting_uses_op): Update call to record_group_use.
9838 (find_interesting_uses_cond): Likewise.
9839 (find_interesting_uses_address): Likewise.
9840 (get_mem_type_for_internal_fn): New function.
9841 (find_address_like_use): Likewise.
9842 (find_interesting_uses_stmt): Try find_address_like_use before
9843 calling find_interesting_uses_op.
9844 (addr_offset_valid_p): Use the iv mem_type field as the type
9845 of the addressed memory.
9846 (add_autoinc_candidates): Likewise.
9847 (get_address_cost): Likewise.
9848 (split_small_address_groups_p): Use address_p.
9849 (split_address_groups): Likewise.
9850 (add_iv_candidate_for_use): Likewise.
9851 (autoinc_possible_for_pair): Likewise.
9852 (rewrite_groups): Likewise.
9853 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
9854 (determine_group_iv_cost): Update after split of USE_ADDRESS.
9855 (get_alias_ptr_type_for_ptr_address): New function.
9856 (rewrite_use_address): Rewrite address uses in calls that were
9857 identified by find_address_like_use.
9858
9859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9860 Alan Hayward <alan.hayward@arm.com>
9861 David Sherwood <david.sherwood@arm.com>
9862
9863 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
9864 TARGET_MEM_REFs.
9865 * gimple-expr.h (is_gimple_addressable: Likewise.
9866 * gimple-expr.c (is_gimple_address): Likewise.
9867 * internal-fn.c (expand_call_mem_ref): New function.
9868 (expand_mask_load_optab_fn): Use it.
9869 (expand_mask_store_optab_fn): Likewise.
9870
9871 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9872 Alan Hayward <alan.hayward@arm.com>
9873 David Sherwood <david.sherwood@arm.com>
9874
9875 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
9876 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
9877 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
9878 (cond_umax@var{mode}): Document.
9879 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
9880 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
9881 (cond_umin_optab, cond_umax_optab): New optabs.
9882 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
9883 (COND_IOR, COND_XOR): New internal functions.
9884 * internal-fn.h (get_conditional_internal_fn): Declare.
9885 * internal-fn.c (cond_binary_direct): New macro.
9886 (expand_cond_binary_optab_fn): Likewise.
9887 (direct_cond_binary_optab_supported_p): Likewise.
9888 (get_conditional_internal_fn): New function.
9889 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
9890 Cope with reduction statements that are vectorized as calls rather
9891 than assignments.
9892 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
9893 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
9894 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
9895 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9896 (UNSPEC_COND_EOR): New unspecs.
9897 (optab): Add mappings for them.
9898 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
9899 (sve_int_op, sve_fp_op): New int attributes.
9900
9901 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9902 Alan Hayward <alan.hayward@arm.com>
9903 David Sherwood <david.sherwood@arm.com>
9904
9905 * optabs.def (while_ult_optab): New optab.
9906 * doc/md.texi (while_ult@var{m}@var{n}): Document.
9907 * internal-fn.def (WHILE_ULT): New internal function.
9908 * internal-fn.h (direct_internal_fn_supported_p): New override
9909 that takes two types as argument.
9910 * internal-fn.c (while_direct): New macro.
9911 (expand_while_optab_fn): New function.
9912 (convert_optab_supported_p): Likewise.
9913 (direct_while_optab_supported_p): New macro.
9914 * wide-int.h (wi::udiv_ceil): New function.
9915 * tree-vectorizer.h (rgroup_masks): New structure.
9916 (vec_loop_masks): New typedef.
9917 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
9918 and fully_masked_p.
9919 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
9920 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
9921 (vect_max_vf): New function.
9922 (slpeel_make_loop_iterate_ntimes): Delete.
9923 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
9924 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
9925 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
9926 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
9927 internal-fn.h, stor-layout.h and optabs-query.h.
9928 (vect_set_loop_mask): New function.
9929 (add_preheader_seq): Likewise.
9930 (add_header_seq): Likewise.
9931 (interleave_supported_p): Likewise.
9932 (vect_maybe_permute_loop_masks): Likewise.
9933 (vect_set_loop_masks_directly): Likewise.
9934 (vect_set_loop_condition_masked): Likewise.
9935 (vect_set_loop_condition_unmasked): New function, split out from
9936 slpeel_make_loop_iterate_ntimes.
9937 (slpeel_make_loop_iterate_ntimes): Rename to..
9938 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
9939 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
9940 (vect_do_peeling): Update call accordingly.
9941 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
9942 loops.
9943 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9944 mask_compare_type, can_fully_mask_p and fully_masked_p.
9945 (release_vec_loop_masks): New function.
9946 (_loop_vec_info): Use it to free the loop masks.
9947 (can_produce_all_loop_masks_p): New function.
9948 (vect_get_max_nscalars_per_iter): Likewise.
9949 (vect_verify_full_masking): Likewise.
9950 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
9951 retries, and free the mask rgroups before retrying. Check loop-wide
9952 reasons for disallowing fully-masked loops. Make the final decision
9953 about whether use a fully-masked loop or not.
9954 (vect_estimate_min_profitable_iters): Do not assume that peeling
9955 for the number of iterations will be needed for fully-masked loops.
9956 (vectorizable_reduction): Disable fully-masked loops.
9957 (vectorizable_live_operation): Likewise.
9958 (vect_halve_mask_nunits): New function.
9959 (vect_double_mask_nunits): Likewise.
9960 (vect_record_loop_mask): Likewise.
9961 (vect_get_loop_mask): Likewise.
9962 (vect_transform_loop): Handle the case in which the final loop
9963 iteration might handle a partial vector. Call vect_set_loop_condition
9964 instead of slpeel_make_loop_iterate_ntimes.
9965 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
9966 (check_load_store_masking): New function.
9967 (prepare_load_store_mask): Likewise.
9968 (vectorizable_store): Handle fully-masked loops.
9969 (vectorizable_load): Likewise.
9970 (supportable_widening_operation): Use vect_halve_mask_nunits for
9971 booleans.
9972 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
9973 (vect_gen_while): New function.
9974 * config/aarch64/aarch64.md (umax<mode>3): New expander.
9975 (aarch64_uqdec<mode>): New insn.
9976
9977 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9978 Alan Hayward <alan.hayward@arm.com>
9979 David Sherwood <david.sherwood@arm.com>
9980
9981 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
9982 (reduc_xor_scal_optab): New optabs.
9983 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
9984 (reduc_xor_scal_@var{m}): Document.
9985 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
9986 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
9987 internal functions.
9988 * fold-const-call.c (fold_const_call): Handle them.
9989 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
9990 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
9991 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
9992 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
9993 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
9994 (UNSPEC_XORV): New unspecs.
9995 (optab): Add entries for them.
9996 (BITWISEV): New int iterator.
9997 (bit_reduc_op): New int attributes.
9998
9999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10000 Alan Hayward <alan.hayward@arm.com>
10001 David Sherwood <david.sherwood@arm.com>
10002
10003 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10004 * internal-fn.def (VEC_SHL_INSERT): New internal function.
10005 * optabs.def (vec_shl_insert_optab): New optab.
10006 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10007 (duplicate_and_interleave): Likewise.
10008 * tree-vect-loop.c: Include internal-fn.h.
10009 (neutral_op_for_slp_reduction): New function, split out from
10010 get_initial_defs_for_reduction.
10011 (get_initial_def_for_reduction): Handle option 2 for variable-length
10012 vectors by loading the neutral value into a vector and then shifting
10013 the initial value into element 0.
10014 (get_initial_defs_for_reduction): Replace the code argument with
10015 the neutral value calculated by neutral_op_for_slp_reduction.
10016 Use gimple_build_vector for constant-length vectors.
10017 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10018 but the first group_size elements have a neutral value.
10019 Use duplicate_and_interleave otherwise.
10020 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10021 Update call to get_initial_defs_for_reduction. Handle SLP
10022 reductions for variable-length vectors by creating one vector
10023 result for each scalar result, with the elements associated
10024 with other scalar results stubbed out with the neutral value.
10025 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10026 Require IFN_VEC_SHL_INSERT for double reductions on
10027 variable-length vectors, or SLP reductions that have
10028 a neutral value. Require can_duplicate_and_interleave_p
10029 support for variable-length unchained SLP reductions if there
10030 is no neutral value, such as for MIN/MAX reductions. Also require
10031 the number of vector elements to be a multiple of the number of
10032 SLP statements when doing variable-length unchained SLP reductions.
10033 Update call to vect_create_epilog_for_reduction.
10034 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10035 and remove initial values.
10036 (duplicate_and_interleave): Make public.
10037 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10038 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10039
10040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10041 Alan Hayward <alan.hayward@arm.com>
10042 David Sherwood <david.sherwood@arm.com>
10043
10044 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10045 (can_duplicate_and_interleave_p): New function.
10046 (vect_get_and_check_slp_defs): Take the vector of statements
10047 rather than just the current one. Remove excess parentheses.
10048 Restriction rejectinon of vect_constant_def and vect_external_def
10049 for variable-length vectors to boolean types, or types for which
10050 can_duplicate_and_interleave_p is false.
10051 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10052 (duplicate_and_interleave): New function.
10053 (vect_get_constant_vectors): Use gimple_build_vector for
10054 constant-length vectors and suitable variable-length constant
10055 vectors. Use duplicate_and_interleave for other variable-length
10056 vectors. Don't defer the update when inserting new statements.
10057
10058 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10059 Alan Hayward <alan.hayward@arm.com>
10060 David Sherwood <david.sherwood@arm.com>
10061
10062 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10063 min_profitable_iters doesn't go negative.
10064
10065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10066 Alan Hayward <alan.hayward@arm.com>
10067 David Sherwood <david.sherwood@arm.com>
10068
10069 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10070 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10071 * optabs.def (vec_mask_load_lanes_optab): New optab.
10072 (vec_mask_store_lanes_optab): Likewise.
10073 * internal-fn.def (MASK_LOAD_LANES): New internal function.
10074 (MASK_STORE_LANES): Likewise.
10075 * internal-fn.c (mask_load_lanes_direct): New macro.
10076 (mask_store_lanes_direct): Likewise.
10077 (expand_mask_load_optab_fn): Handle masked operations.
10078 (expand_mask_load_lanes_optab_fn): New macro.
10079 (expand_mask_store_optab_fn): Handle masked operations.
10080 (expand_mask_store_lanes_optab_fn): New macro.
10081 (direct_mask_load_lanes_optab_supported_p): Likewise.
10082 (direct_mask_store_lanes_optab_supported_p): Likewise.
10083 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10084 parameter.
10085 (vect_load_lanes_supported): Likewise.
10086 * tree-vect-data-refs.c (strip_conversion): New function.
10087 (can_group_stmts_p): Likewise.
10088 (vect_analyze_data_ref_accesses): Use it instead of checking
10089 for a pair of assignments.
10090 (vect_store_lanes_supported): Take a masked_p parameter.
10091 (vect_load_lanes_supported): Likewise.
10092 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10093 vect_store_lanes_supported and vect_load_lanes_supported.
10094 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10095 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10096 parameter. Don't allow gaps for masked accesses.
10097 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
10098 and vect_load_lanes_supported.
10099 (get_load_store_type): Take a masked_p parameter and update
10100 call to get_group_load_store_type.
10101 (vectorizable_store): Update call to get_load_store_type.
10102 Handle IFN_MASK_STORE_LANES.
10103 (vectorizable_load): Update call to get_load_store_type.
10104 Handle IFN_MASK_LOAD_LANES.
10105
10106 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10107 Alan Hayward <alan.hayward@arm.com>
10108 David Sherwood <david.sherwood@arm.com>
10109
10110 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10111 modes for SVE.
10112 * config/aarch64/aarch64-protos.h
10113 (aarch64_sve_struct_memory_operand_p): Declare.
10114 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10115 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10116 (VPRED, vpred): Handle SVE structure modes.
10117 * config/aarch64/constraints.md (Utx): New constraint.
10118 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10119 (aarch64_sve_struct_nonimmediate_operand): New predicates.
10120 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10121 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10122 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10123 structure modes. Split into pieces after RA.
10124 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10125 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10126 New patterns.
10127 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10128 SVE structure modes.
10129 (aarch64_classify_address): Likewise.
10130 (sizetochar): Move earlier in file.
10131 (aarch64_print_operand): Handle SVE register lists.
10132 (aarch64_array_mode): New function.
10133 (aarch64_sve_struct_memory_operand_p): Likewise.
10134 (TARGET_ARRAY_MODE): Redefine.
10135
10136 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10137 Alan Hayward <alan.hayward@arm.com>
10138 David Sherwood <david.sherwood@arm.com>
10139
10140 * target.def (array_mode): New target hook.
10141 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10142 * doc/tm.texi: Regenerate.
10143 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10144 * hooks.c (hook_optmode_mode_uhwi_none): New function.
10145 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10146 targetm.array_mode.
10147 * stor-layout.c (mode_for_array): Likewise. Support polynomial
10148 type sizes.
10149
10150 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10151 Alan Hayward <alan.hayward@arm.com>
10152 David Sherwood <david.sherwood@arm.com>
10153
10154 * fold-const.c (fold_binary_loc): Check the argument types
10155 rather than the result type when testing for a vector operation.
10156
10157 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10158
10159 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10160 * doc/tm.texi: Regenerate.
10161
10162 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10163 Alan Hayward <alan.hayward@arm.com>
10164 David Sherwood <david.sherwood@arm.com>
10165
10166 * doc/invoke.texi (-msve-vector-bits=): Document new option.
10167 (sve): Document new AArch64 extension.
10168 * doc/md.texi (w): Extend the description of the AArch64
10169 constraint to include SVE vectors.
10170 (Upl, Upa): Document new AArch64 predicate constraints.
10171 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10172 enum.
10173 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10174 (msve-vector-bits=): New option.
10175 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10176 SVE when these are disabled.
10177 (sve): New extension.
10178 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10179 modes. Adjust their number of units based on aarch64_sve_vg.
10180 (MAX_BITSIZE_MODE_ANY_MODE): Define.
10181 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10182 aarch64_addr_query_type.
10183 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10184 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10185 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10186 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10187 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10188 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10189 (aarch64_simd_imm_zero_p): Delete.
10190 (aarch64_check_zero_based_sve_index_immediate): Declare.
10191 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10192 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10193 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10194 (aarch64_sve_float_mul_immediate_p): Likewise.
10195 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10196 rather than an rtx.
10197 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
10198 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
10199 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
10200 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
10201 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
10202 (aarch64_regmode_natural_size): Likewise.
10203 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
10204 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
10205 left one place.
10206 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
10207 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
10208 for VG and the SVE predicate registers.
10209 (V_ALIASES): Add a "z"-prefixed alias.
10210 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
10211 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
10212 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
10213 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
10214 (REG_CLASS_NAMES): Add entries for them.
10215 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
10216 and the predicate registers.
10217 (aarch64_sve_vg): Declare.
10218 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
10219 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
10220 (REGMODE_NATURAL_SIZE): Define.
10221 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
10222 SVE macros.
10223 * config/aarch64/aarch64.c: Include cfgrtl.h.
10224 (simd_immediate_info): Add a constructor for series vectors,
10225 and an associated step field.
10226 (aarch64_sve_vg): New variable.
10227 (aarch64_dbx_register_number): Handle VG and the predicate registers.
10228 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
10229 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
10230 (VEC_ANY_DATA, VEC_STRUCT): New constants.
10231 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
10232 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
10233 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
10234 (aarch64_get_mask_mode): New functions.
10235 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
10236 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
10237 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
10238 predicate modes and predicate registers. Explicitly restrict
10239 GPRs to modes of 16 bytes or smaller. Only allow FP registers
10240 to store a vector mode if it is recognized by
10241 aarch64_classify_vector_mode.
10242 (aarch64_regmode_natural_size): New function.
10243 (aarch64_hard_regno_caller_save_mode): Return the original mode
10244 for predicates.
10245 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
10246 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
10247 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
10248 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
10249 functions.
10250 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
10251 does not overlap dest if the function is frame-related. Handle
10252 SVE constants.
10253 (aarch64_split_add_offset): New function.
10254 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
10255 them aarch64_add_offset.
10256 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
10257 and update call to aarch64_sub_sp.
10258 (aarch64_add_cfa_expression): New function.
10259 (aarch64_expand_prologue): Pass extra temporary registers to the
10260 functions above. Handle the case in which we need to emit new
10261 DW_CFA_expressions for registers that were originally saved
10262 relative to the stack pointer, but now have to be expressed
10263 relative to the frame pointer.
10264 (aarch64_output_mi_thunk): Pass extra temporary registers to the
10265 functions above.
10266 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
10267 IP0 and IP1 values for SVE frames.
10268 (aarch64_expand_vec_series): New function.
10269 (aarch64_expand_sve_widened_duplicate): Likewise.
10270 (aarch64_expand_sve_const_vector): Likewise.
10271 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
10272 Handle SVE constants. Use emit_move_insn to move a force_const_mem
10273 into the register, rather than emitting a SET directly.
10274 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
10275 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
10276 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
10277 (offset_9bit_signed_scaled_p): New functions.
10278 (aarch64_replicate_bitmask_imm): New function.
10279 (aarch64_bitmask_imm): Use it.
10280 (aarch64_cannot_force_const_mem): Reject expressions involving
10281 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
10282 (aarch64_classify_index): Handle SVE indices, by requiring
10283 a plain register index with a scale that matches the element size.
10284 (aarch64_classify_address): Handle SVE addresses. Assert that
10285 the mode of the address is VOIDmode or an integer mode.
10286 Update call to aarch64_classify_symbol.
10287 (aarch64_classify_symbolic_expression): Update call to
10288 aarch64_classify_symbol.
10289 (aarch64_const_vec_all_in_range_p): New function.
10290 (aarch64_print_vector_float_operand): Likewise.
10291 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
10292 "vN" for FP registers with SVE modes. Handle (const ...) vectors
10293 and the FP immediates 1.0 and 0.5.
10294 (aarch64_print_address_internal): Handle SVE addresses.
10295 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
10296 (aarch64_regno_regclass): Handle predicate registers.
10297 (aarch64_secondary_reload): Handle big-endian reloads of SVE
10298 data modes.
10299 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
10300 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
10301 (aarch64_convert_sve_vector_bits): New function.
10302 (aarch64_override_options): Use it to handle -msve-vector-bits=.
10303 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10304 rather than an rtx.
10305 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
10306 Handle SVE vector and predicate modes. Accept VL-based constants
10307 that need only one temporary register, and VL offsets that require
10308 no temporary registers.
10309 (aarch64_conditional_register_usage): Mark the predicate registers
10310 as fixed if SVE isn't available.
10311 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
10312 Return true for SVE vector and predicate modes.
10313 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
10314 rather than an unsigned int. Handle SVE modes.
10315 (aarch64_preferred_simd_mode): Update call accordingly. Handle
10316 SVE modes.
10317 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
10318 if SVE is enabled.
10319 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10320 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10321 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10322 (aarch64_sve_float_mul_immediate_p): New functions.
10323 (aarch64_sve_valid_immediate): New function.
10324 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
10325 Explicitly reject structure modes. Check for INDEX constants.
10326 Handle PTRUE and PFALSE constants.
10327 (aarch64_check_zero_based_sve_index_immediate): New function.
10328 (aarch64_simd_imm_zero_p): Delete.
10329 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
10330 vector modes. Accept constants in the range of CNT[BHWD].
10331 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
10332 ask for an Advanced SIMD mode.
10333 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
10334 (aarch64_simd_vector_alignment): Handle SVE predicates.
10335 (aarch64_vectorize_preferred_vector_alignment): New function.
10336 (aarch64_simd_vector_alignment_reachable): Use it instead of
10337 the vector size.
10338 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
10339 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
10340 functions.
10341 (MAX_VECT_LEN): Delete.
10342 (expand_vec_perm_d): Add a vec_flags field.
10343 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
10344 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
10345 (aarch64_evpc_ext): Don't apply a big-endian lane correction
10346 for SVE modes.
10347 (aarch64_evpc_rev): Rename to...
10348 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
10349 (aarch64_evpc_rev_global): New function.
10350 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
10351 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10352 MAX_VECT_LEN.
10353 (aarch64_evpc_sve_tbl): New function.
10354 (aarch64_expand_vec_perm_const_1): Update after rename of
10355 aarch64_evpc_rev. Handle SVE permutes too, trying
10356 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10357 than aarch64_evpc_tbl.
10358 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10359 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10360 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10361 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10362 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10363 (aarch64_expand_sve_vcond): New functions.
10364 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10365 of aarch64_vector_mode_p.
10366 (aarch64_dwarf_poly_indeterminate_value): New function.
10367 (aarch64_compute_pressure_classes): Likewise.
10368 (aarch64_can_change_mode_class): Likewise.
10369 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10370 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10371 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10372 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10373 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10374 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10375 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10376 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10377 constraints.
10378 (Dn, Dl, Dr): Accept const as well as const_vector.
10379 (Dz): Likewise. Compare against CONST0_RTX.
10380 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10381 of "vector" where appropriate.
10382 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10383 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10384 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10385 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10386 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10387 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10388 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10389 (v_int_equiv): Extend to SVE modes.
10390 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10391 mode attributes.
10392 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10393 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10394 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10395 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10396 (SVE_COND_FP_CMP): New int iterators.
10397 (perm_hilo): Handle the new unpack unspecs.
10398 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10399 attributes.
10400 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10401 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10402 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
10403 (aarch64_equality_operator, aarch64_constant_vector_operand)
10404 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
10405 (aarch64_sve_nonimmediate_operand): Likewise.
10406 (aarch64_sve_general_operand): Likewise.
10407 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
10408 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
10409 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
10410 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
10411 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
10412 (aarch64_sve_float_arith_immediate): Likewise.
10413 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
10414 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
10415 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
10416 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
10417 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
10418 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
10419 (aarch64_sve_float_arith_operand): Likewise.
10420 (aarch64_sve_float_arith_with_sub_operand): Likewise.
10421 (aarch64_sve_float_mul_operand): Likewise.
10422 (aarch64_sve_vec_perm_operand): Likewise.
10423 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
10424 (aarch64_mov_operand): Accept const_poly_int and const_vector.
10425 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
10426 as well as const_vector.
10427 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
10428 in file. Use CONST0_RTX and CONSTM1_RTX.
10429 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
10430 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
10431 Use aarch64_simd_imm_zero.
10432 * config/aarch64/aarch64-sve.md: New file.
10433 * config/aarch64/aarch64.md: Include it.
10434 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
10435 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
10436 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
10437 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
10438 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
10439 (sve): New attribute.
10440 (enabled): Disable instructions with the sve attribute unless
10441 TARGET_SVE.
10442 (movqi, movhi): Pass CONST_POLY_INT operaneds through
10443 aarch64_expand_mov_immediate.
10444 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
10445 CNT[BHSD] immediates.
10446 (movti): Split CONST_POLY_INT moves into two halves.
10447 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
10448 Split additions that need a temporary here if the destination
10449 is the stack pointer.
10450 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
10451 (*add<mode>3_poly_1): New instruction.
10452 (set_clobber_cc): New expander.
10453
10454 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10455
10456 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
10457 parameter and use it instead of GET_MODE_SIZE (innermode). Use
10458 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
10459 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
10460 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
10461 Change innermode from fixed_mode_size to machine_mode.
10462 (simplify_subreg): Update call accordingly. Handle a constant-sized
10463 subreg of a variable-length CONST_VECTOR.
10464
10465 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10466 Alan Hayward <alan.hayward@arm.com>
10467 David Sherwood <david.sherwood@arm.com>
10468
10469 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
10470 (add_offset_to_base): New function, split out from...
10471 (create_mem_ref): ...here. When handling a scale other than 1,
10472 check first whether the address is valid without the offset.
10473 Add it into the base if so, leaving the index and scale as-is.
10474
10475 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10476
10477 PR c++/83778
10478 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
10479 fold_for_warn before checking if arg2 is INTEGER_CST.
10480
10481 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
10482
10483 * config/rs6000/predicates.md (load_multiple_operation): Delete.
10484 (store_multiple_operation): Delete.
10485 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
10486 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
10487 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
10488 guarded by TARGET_STRING.
10489 (rs6000_output_load_multiple): Delete.
10490 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
10491 OPTION_MASK_STRING / TARGET_STRING handling.
10492 (print_operand) <'N', 'O'>: Add comment that these are unused now.
10493 (const rs6000_opt_masks) <"string">: Change mask to 0.
10494 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
10495 (MASK_STRING): Delete.
10496 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
10497 parts. Simplify.
10498 (load_multiple): Delete.
10499 (*ldmsi8): Delete.
10500 (*ldmsi7): Delete.
10501 (*ldmsi6): Delete.
10502 (*ldmsi5): Delete.
10503 (*ldmsi4): Delete.
10504 (*ldmsi3): Delete.
10505 (store_multiple): Delete.
10506 (*stmsi8): Delete.
10507 (*stmsi7): Delete.
10508 (*stmsi6): Delete.
10509 (*stmsi5): Delete.
10510 (*stmsi4): Delete.
10511 (*stmsi3): Delete.
10512 (movmemsi_8reg): Delete.
10513 (corresponding unnamed define_insn): Delete.
10514 (movmemsi_6reg): Delete.
10515 (corresponding unnamed define_insn): Delete.
10516 (movmemsi_4reg): Delete.
10517 (corresponding unnamed define_insn): Delete.
10518 (movmemsi_2reg): Delete.
10519 (corresponding unnamed define_insn): Delete.
10520 (movmemsi_1reg): Delete.
10521 (corresponding unnamed define_insn): Delete.
10522 * config/rs6000/rs6000.opt (mno-string): New.
10523 (mstring): Replace by deprecation warning stub.
10524 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
10525
10526 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10527
10528 * regrename.c (regrename_do_replace): If replacing the same
10529 reg multiple times, try to reuse last created gen_raw_REG.
10530
10531 PR debug/81155
10532 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
10533 main to workaround a bug in GDB.
10534
10535 2018-01-12 Tom de Vries <tom@codesourcery.com>
10536
10537 PR target/83737
10538 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
10539
10540 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
10541
10542 PR rtl-optimization/80481
10543 * ira-color.c (get_cap_member): New function.
10544 (allocnos_conflict_by_live_ranges_p): Use it.
10545 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
10546 (setup_slot_coalesced_allocno_live_ranges): Ditto.
10547
10548 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
10549
10550 PR target/83628
10551 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
10552 (*saddl_se_1): Ditto.
10553 (*ssubsi_1): Ditto.
10554 (*ssubl_se_1): Ditto.
10555
10556 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10557
10558 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
10559 rather than wi::to_widest for DR_INITs.
10560 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
10561 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
10562 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
10563 INTEGER_CSTs.
10564 (vect_analyze_group_access_1): Note that here.
10565
10566 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10567
10568 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
10569 polynomial type sizes.
10570
10571 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10572
10573 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
10574 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
10575 (gimple_add_tmp_var): Likewise.
10576
10577 2018-01-12 Martin Liska <mliska@suse.cz>
10578
10579 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
10580 (gimple_alloc_sizes): Likewise.
10581 (dump_gimple_statistics): Use PRIu64 in printf format.
10582 * gimple.h: Change uint64_t to int.
10583
10584 2018-01-12 Martin Liska <mliska@suse.cz>
10585
10586 * tree-core.h: Use uint64_t instead of int.
10587 * tree.c (tree_node_counts): Likewise.
10588 (tree_node_sizes): Likewise.
10589 (dump_tree_statistics): Use PRIu64 in printf format.
10590
10591 2018-01-12 Martin Liska <mliska@suse.cz>
10592
10593 * Makefile.in: As qsort_chk is implemented in vec.c, add
10594 vec.o to linkage of gencfn-macros.
10595 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
10596 passing the info to record_node_allocation_statistics.
10597 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
10598 and pass the info.
10599 * ggc-common.c (struct ggc_usage): Add operator== and use
10600 it in operator< and compare function.
10601 * mem-stats.h (struct mem_usage): Likewise.
10602 * vec.c (struct vec_usage): Remove operator< and compare
10603 function. Can be simply inherited.
10604
10605 2018-01-12 Martin Jambor <mjambor@suse.cz>
10606
10607 PR target/81616
10608 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
10609 * tree-ssa-math-opts.c: Include domwalk.h.
10610 (convert_mult_to_fma_1): New function.
10611 (fma_transformation_info): New type.
10612 (fma_deferring_state): Likewise.
10613 (cancel_fma_deferring): New function.
10614 (result_of_phi): Likewise.
10615 (last_fma_candidate_feeds_initial_phi): Likewise.
10616 (convert_mult_to_fma): Added deferring logic, split actual
10617 transformation to convert_mult_to_fma_1.
10618 (math_opts_dom_walker): New type.
10619 (math_opts_dom_walker::after_dom_children): New method, body moved
10620 here from pass_optimize_widening_mul::execute, added deferring logic
10621 bits.
10622 (pass_optimize_widening_mul::execute): Moved most of code to
10623 math_opts_dom_walker::after_dom_children.
10624 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
10625 * config/i386/i386.c (ix86_option_override_internal): Added
10626 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
10627
10628 2018-01-12 Richard Biener <rguenther@suse.de>
10629
10630 PR debug/83157
10631 * dwarf2out.c (gen_variable_die): Do not reset old_die for
10632 inline instance vars.
10633
10634 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
10635
10636 PR target/81819
10637 * config/rx/rx.c (rx_is_restricted_memory_address):
10638 Handle SUBREG case.
10639
10640 2018-01-12 Richard Biener <rguenther@suse.de>
10641
10642 PR tree-optimization/80846
10643 * target.def (split_reduction): New target hook.
10644 * targhooks.c (default_split_reduction): New function.
10645 * targhooks.h (default_split_reduction): Declare.
10646 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
10647 target requests first reduce vectors by combining low and high
10648 parts.
10649 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
10650 (get_vectype_for_scalar_type_and_size): Export.
10651 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
10652 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
10653 * doc/tm.texi: Regenerate.
10654 * config/i386/i386.c (ix86_split_reduction): Implement
10655 TARGET_VECTORIZE_SPLIT_REDUCTION.
10656
10657 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10658
10659 PR target/83368
10660 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
10661 in PIC mode except for TARGET_VXWORKS_RTP.
10662 * config/sparc/sparc.c: Include cfgrtl.h.
10663 (TARGET_INIT_PIC_REG): Define.
10664 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
10665 (sparc_pic_register_p): New predicate.
10666 (sparc_legitimate_address_p): Use it.
10667 (sparc_legitimize_pic_address): Likewise.
10668 (sparc_delegitimize_address): Likewise.
10669 (sparc_mode_dependent_address_p): Likewise.
10670 (gen_load_pcrel_sym): Remove 4th parameter.
10671 (load_got_register): Adjust call to above. Remove obsolete stuff.
10672 (sparc_expand_prologue): Do not call load_got_register here.
10673 (sparc_flat_expand_prologue): Likewise.
10674 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
10675 (sparc_use_pseudo_pic_reg): New function.
10676 (sparc_init_pic_reg): Likewise.
10677 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10678 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
10679
10680 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
10681
10682 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
10683 Add item for branch_cost.
10684
10685 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10686
10687 PR rtl-optimization/83565
10688 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
10689 not extend the result to a larger mode for rotate operations.
10690 (num_sign_bit_copies1): Likewise.
10691
10692 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10693
10694 PR target/40411
10695 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
10696 -symbolic.
10697 Use values-Xc.o for -pedantic.
10698 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
10699
10700 2018-01-12 Martin Liska <mliska@suse.cz>
10701
10702 PR ipa/83054
10703 * ipa-devirt.c (final_warning_record::grow_type_warnings):
10704 New function.
10705 (possible_polymorphic_call_targets): Use it.
10706 (ipa_devirt): Likewise.
10707
10708 2018-01-12 Martin Liska <mliska@suse.cz>
10709
10710 * profile-count.h (enum profile_quality): Use 0 as invalid
10711 enum value of profile_quality.
10712
10713 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
10714
10715 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
10716 -mext-string options.
10717
10718 2018-01-12 Richard Biener <rguenther@suse.de>
10719
10720 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
10721 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
10722 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
10723 Likewise.
10724 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
10725
10726 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10727
10728 * configure.ac (--with-long-double-format): Add support for the
10729 configuration option to change the default long double format on
10730 PowerPC systems.
10731 * config.gcc (powerpc*-linux*-*): Likewise.
10732 * configure: Regenerate.
10733 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
10734 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
10735 used without modification.
10736
10737 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10738
10739 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
10740 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
10741 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
10742 MISC_BUILTIN_SPEC_BARRIER.
10743 (rs6000_init_builtins): Likewise.
10744 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
10745 enum value.
10746 (speculation_barrier): New define_insn.
10747 * doc/extend.texi: Document __builtin_speculation_barrier.
10748
10749 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10750
10751 PR target/83203
10752 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
10753 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
10754 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
10755 iterators.
10756 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
10757 integral modes instead of "ss" and "sd".
10758 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
10759 vectors with 32-bit and 64-bit elements.
10760 (vecdupssescalarmodesuffix): New mode attribute.
10761 (vec_dup<mode>): Use it.
10762
10763 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
10764
10765 PR target/83330
10766 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
10767 frame if argument is passed on stack.
10768
10769 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10770
10771 PR target/82682
10772 * ree.c (combine_reaching_defs): Optimize also
10773 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
10774 reg2=any_extend(exp); reg1=reg2;, formatting fix.
10775
10776 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10777
10778 PR middle-end/83189
10779 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
10780
10781 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10782
10783 PR middle-end/83718
10784 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
10785 after they are computed.
10786
10787 2018-01-11 Bin Cheng <bin.cheng@arm.com>
10788
10789 PR tree-optimization/83695
10790 * gimple-loop-linterchange.cc
10791 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
10792 reset cached scev information after interchange.
10793 (pass_linterchange::execute): Remove call to scev_reset_htab.
10794
10795 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10796
10797 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
10798 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
10799 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
10800 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
10801 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
10802 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
10803 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
10804 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
10805 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
10806 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
10807 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
10808 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
10809 (V_lane_reg): Likewise.
10810 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
10811 New define_expand.
10812 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
10813 (vfmal_lane_low<mode>_intrinsic,
10814 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
10815 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
10816 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
10817 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
10818 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
10819 vfmsl_lane_high<mode>_intrinsic): New define_insns.
10820
10821 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10822
10823 * config/arm/arm-cpus.in (fp16fml): New feature.
10824 (ALL_SIMD): Add fp16fml.
10825 (armv8.2-a): Add fp16fml as an option.
10826 (armv8.3-a): Likewise.
10827 (armv8.4-a): Add fp16fml as part of fp16.
10828 * config/arm/arm.h (TARGET_FP16FML): Define.
10829 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
10830 when appropriate.
10831 * config/arm/arm-modes.def (V2HF): Define.
10832 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
10833 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
10834 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
10835 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
10836 vfmsl_low, vfmsl_high): New set of builtins.
10837 * config/arm/iterators.md (PLUSMINUS): New code iterator.
10838 (vfml_op): New code attribute.
10839 (VFMLHALVES): New int iterator.
10840 (VFML, VFMLSEL): New mode attributes.
10841 (V_reg): Define mapping for V2HF.
10842 (V_hi, V_lo): New mode attributes.
10843 (VF_constraint): Likewise.
10844 (vfml_half, vfml_half_selector): New int attributes.
10845 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
10846 define_expand.
10847 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
10848 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
10849 New define_insn.
10850 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
10851 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
10852 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
10853 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
10854 documentation.
10855 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
10856 Document new effective target and option set.
10857
10858 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10859
10860 * config/arm/arm-cpus.in (armv8_4): New feature.
10861 (ARMv8_4a): New fgroup.
10862 (armv8.4-a): New arch.
10863 * config/arm/arm-tables.opt: Regenerate.
10864 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
10865 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
10866 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
10867 Add matching rules for -march=armv8.4-a and extensions.
10868 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
10869
10870 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
10871
10872 PR target/81821
10873 * config/rx/rx.md (BW): New mode attribute.
10874 (sync_lock_test_and_setsi): Add mode suffix to insn output.
10875
10876 2018-01-11 Richard Biener <rguenther@suse.de>
10877
10878 PR tree-optimization/83435
10879 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
10880 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
10881 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
10882
10883 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10884 Alan Hayward <alan.hayward@arm.com>
10885 David Sherwood <david.sherwood@arm.com>
10886
10887 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
10888 field.
10889 (aarch64_classify_address): Initialize it. Track polynomial offsets.
10890 (aarch64_print_address_internal): Use it to check for a zero offset.
10891
10892 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10893 Alan Hayward <alan.hayward@arm.com>
10894 David Sherwood <david.sherwood@arm.com>
10895
10896 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
10897 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
10898 Return a poly_int64 rather than a HOST_WIDE_INT.
10899 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
10900 rather than a HOST_WIDE_INT.
10901 * config/aarch64/aarch64.h (aarch64_frame): Protect with
10902 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
10903 hard_fp_offset, frame_size, initial_adjust, callee_offset and
10904 final_offset from HOST_WIDE_INT to poly_int64.
10905 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
10906 to_constant when getting the number of units in an Advanced SIMD
10907 mode.
10908 (aarch64_builtin_vectorized_function): Check for a constant number
10909 of units.
10910 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
10911 GET_MODE_SIZE.
10912 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
10913 attribute instead of GET_MODE_NUNITS.
10914 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
10915 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
10916 GET_MODE_SIZE for fixed-size registers.
10917 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
10918 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
10919 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
10920 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
10921 (aarch64_print_operand, aarch64_print_address_internal)
10922 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
10923 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
10924 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
10925 Handle polynomial GET_MODE_SIZE.
10926 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
10927 wider than SImode without modification.
10928 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
10929 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
10930 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
10931 passing and returning SVE modes.
10932 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
10933 rather than GEN_INT.
10934 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
10935 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
10936 (aarch64_allocate_and_probe_stack_space): Likewise.
10937 (aarch64_layout_frame): Cope with polynomial offsets.
10938 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
10939 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
10940 polynomial offsets.
10941 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
10942 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
10943 poly_int64 rather than a HOST_WIDE_INT.
10944 (aarch64_get_separate_components, aarch64_process_components)
10945 (aarch64_expand_prologue, aarch64_expand_epilogue)
10946 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
10947 (aarch64_anchor_offset): New function, split out from...
10948 (aarch64_legitimize_address): ...here.
10949 (aarch64_builtin_vectorization_cost): Handle polynomial
10950 TYPE_VECTOR_SUBPARTS.
10951 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
10952 GET_MODE_NUNITS.
10953 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
10954 number of elements from the PARALLEL rather than the mode.
10955 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
10956 rather than GET_MODE_BITSIZE.
10957 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
10958 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
10959 (aarch64_expand_vec_perm_const_1): Handle polynomial
10960 d->perm.length () and d->perm elements.
10961 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
10962 Apply to_constant to d->perm elements.
10963 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
10964 polynomial CONST_VECTOR_NUNITS.
10965 (aarch64_move_pointer): Take amount as a poly_int64 rather
10966 than an int.
10967 (aarch64_progress_pointer): Avoid temporary variable.
10968 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
10969 the mode attribute instead of GET_MODE.
10970
10971 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10972 Alan Hayward <alan.hayward@arm.com>
10973 David Sherwood <david.sherwood@arm.com>
10974
10975 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
10976 x exists before using it.
10977 (aarch64_add_constant_internal): Rename to...
10978 (aarch64_add_offset_1): ...this. Replace regnum with separate
10979 src and dest rtxes. Handle the case in which they're different,
10980 including when the offset is zero. Replace scratchreg with an rtx.
10981 Use 2 additions if there is no spare register into which we can
10982 move a 16-bit constant.
10983 (aarch64_add_constant): Delete.
10984 (aarch64_add_offset): Replace reg with separate src and dest
10985 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
10986 Use aarch64_add_offset_1.
10987 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
10988 an rtx rather than an int. Take the delta as a poly_int64
10989 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
10990 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
10991 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
10992 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
10993 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
10994 and aarch64_add_sp.
10995 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
10996 aarch64_add_constant.
10997
10998 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10999
11000 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11001 Use scalar_float_mode.
11002
11003 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11004
11005 * config/aarch64/aarch64-simd.md
11006 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11007 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11008 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11009 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11010 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11011 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11012 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11013 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11014 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11015 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11016
11017 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11018
11019 PR target/83514
11020 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11021 targ_options->x_arm_arch_string is non NULL.
11022
11023 2018-01-11 Tamar Christina <tamar.christina@arm.com>
11024
11025 * config/aarch64/aarch64.h
11026 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
11027
11028 2018-01-11 Sudakshina Das <sudi.das@arm.com>
11029
11030 PR target/82096
11031 * expmed.c (emit_store_flag_force): Swap if const op0
11032 and change VOIDmode to mode of op0.
11033
11034 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11035
11036 PR rtl-optimization/83761
11037 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11038 than bytes to mode_for_size.
11039
11040 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11041
11042 PR middle-end/83189
11043 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11044 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11045 profile.
11046
11047 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11048
11049 PR middle-end/83575
11050 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11051 when in layout mode.
11052 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11053 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11054 partition fixup.
11055
11056 2018-01-10 Michael Collison <michael.collison@arm.com>
11057
11058 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11059 * config/aarch64/aarch64-option-extension.def: Add
11060 AARCH64_OPT_EXTENSION of 'fp16fml'.
11061 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11062 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11063 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11064 * config/aarch64/constraints.md (Ui7): New constraint.
11065 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11066 (VFMLA_SEL_W): Ditto.
11067 (f16quad): Ditto.
11068 (f16mac1): Ditto.
11069 (VFMLA16_LOW): New int iterator.
11070 (VFMLA16_HIGH): Ditto.
11071 (UNSPEC_FMLAL): New unspec.
11072 (UNSPEC_FMLSL): Ditto.
11073 (UNSPEC_FMLAL2): Ditto.
11074 (UNSPEC_FMLSL2): Ditto.
11075 (f16mac): New code attribute.
11076 * config/aarch64/aarch64-simd-builtins.def
11077 (aarch64_fmlal_lowv2sf): Ditto.
11078 (aarch64_fmlsl_lowv2sf): Ditto.
11079 (aarch64_fmlalq_lowv4sf): Ditto.
11080 (aarch64_fmlslq_lowv4sf): Ditto.
11081 (aarch64_fmlal_highv2sf): Ditto.
11082 (aarch64_fmlsl_highv2sf): Ditto.
11083 (aarch64_fmlalq_highv4sf): Ditto.
11084 (aarch64_fmlslq_highv4sf): Ditto.
11085 (aarch64_fmlal_lane_lowv2sf): Ditto.
11086 (aarch64_fmlsl_lane_lowv2sf): Ditto.
11087 (aarch64_fmlal_laneq_lowv2sf): Ditto.
11088 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11089 (aarch64_fmlalq_lane_lowv4sf): Ditto.
11090 (aarch64_fmlsl_lane_lowv4sf): Ditto.
11091 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11092 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11093 (aarch64_fmlal_lane_highv2sf): Ditto.
11094 (aarch64_fmlsl_lane_highv2sf): Ditto.
11095 (aarch64_fmlal_laneq_highv2sf): Ditto.
11096 (aarch64_fmlsl_laneq_highv2sf): Ditto.
11097 (aarch64_fmlalq_lane_highv4sf): Ditto.
11098 (aarch64_fmlsl_lane_highv4sf): Ditto.
11099 (aarch64_fmlalq_laneq_highv4sf): Ditto.
11100 (aarch64_fmlsl_laneq_highv4sf): Ditto.
11101 * config/aarch64/aarch64-simd.md:
11102 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11103 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11104 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11105 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11106 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11107 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11108 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11109 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11110 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11111 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11112 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11113 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11114 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11115 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11116 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11117 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11118 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11119 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11120 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11121 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11122 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11123 (vfmlsl_low_u32): Ditto.
11124 (vfmlalq_low_u32): Ditto.
11125 (vfmlslq_low_u32): Ditto.
11126 (vfmlal_high_u32): Ditto.
11127 (vfmlsl_high_u32): Ditto.
11128 (vfmlalq_high_u32): Ditto.
11129 (vfmlslq_high_u32): Ditto.
11130 (vfmlal_lane_low_u32): Ditto.
11131 (vfmlsl_lane_low_u32): Ditto.
11132 (vfmlal_laneq_low_u32): Ditto.
11133 (vfmlsl_laneq_low_u32): Ditto.
11134 (vfmlalq_lane_low_u32): Ditto.
11135 (vfmlslq_lane_low_u32): Ditto.
11136 (vfmlalq_laneq_low_u32): Ditto.
11137 (vfmlslq_laneq_low_u32): Ditto.
11138 (vfmlal_lane_high_u32): Ditto.
11139 (vfmlsl_lane_high_u32): Ditto.
11140 (vfmlal_laneq_high_u32): Ditto.
11141 (vfmlsl_laneq_high_u32): Ditto.
11142 (vfmlalq_lane_high_u32): Ditto.
11143 (vfmlslq_lane_high_u32): Ditto.
11144 (vfmlalq_laneq_high_u32): Ditto.
11145 (vfmlslq_laneq_high_u32): Ditto.
11146 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11147 (AARCH64_FL_FOR_ARCH8_4): New.
11148 (AARCH64_ISA_F16FML): New ISA flag.
11149 (TARGET_F16FML): New feature flag for fp16fml.
11150 (doc/invoke.texi): Document new fp16fml option.
11151
11152 2018-01-10 Michael Collison <michael.collison@arm.com>
11153
11154 * config/aarch64/aarch64-builtins.c:
11155 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11156 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11157 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11158 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11159 (AARCH64_ISA_SHA3): New ISA flag.
11160 (TARGET_SHA3): New feature flag for sha3.
11161 * config/aarch64/iterators.md (sha512_op): New int attribute.
11162 (CRYPTO_SHA512): New int iterator.
11163 (UNSPEC_SHA512H): New unspec.
11164 (UNSPEC_SHA512H2): Ditto.
11165 (UNSPEC_SHA512SU0): Ditto.
11166 (UNSPEC_SHA512SU1): Ditto.
11167 * config/aarch64/aarch64-simd-builtins.def
11168 (aarch64_crypto_sha512hqv2di): New builtin.
11169 (aarch64_crypto_sha512h2qv2di): Ditto.
11170 (aarch64_crypto_sha512su0qv2di): Ditto.
11171 (aarch64_crypto_sha512su1qv2di): Ditto.
11172 (aarch64_eor3qv8hi): Ditto.
11173 (aarch64_rax1qv2di): Ditto.
11174 (aarch64_xarqv2di): Ditto.
11175 (aarch64_bcaxqv8hi): Ditto.
11176 * config/aarch64/aarch64-simd.md:
11177 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11178 (aarch64_crypto_sha512su0qv2di): Ditto.
11179 (aarch64_crypto_sha512su1qv2di): Ditto.
11180 (aarch64_eor3qv8hi): Ditto.
11181 (aarch64_rax1qv2di): Ditto.
11182 (aarch64_xarqv2di): Ditto.
11183 (aarch64_bcaxqv8hi): Ditto.
11184 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11185 (vsha512h2q_u64): Ditto.
11186 (vsha512su0q_u64): Ditto.
11187 (vsha512su1q_u64): Ditto.
11188 (veor3q_u16): Ditto.
11189 (vrax1q_u64): Ditto.
11190 (vxarq_u64): Ditto.
11191 (vbcaxq_u16): Ditto.
11192 * config/arm/types.md (crypto_sha512): New type attribute.
11193 (crypto_sha3): Ditto.
11194 (doc/invoke.texi): Document new sha3 option.
11195
11196 2018-01-10 Michael Collison <michael.collison@arm.com>
11197
11198 * config/aarch64/aarch64-builtins.c:
11199 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
11200 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11201 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
11202 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
11203 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
11204 (AARCH64_ISA_SM4): New ISA flag.
11205 (TARGET_SM4): New feature flag for sm4.
11206 * config/aarch64/aarch64-simd-builtins.def
11207 (aarch64_sm3ss1qv4si): Ditto.
11208 (aarch64_sm3tt1aq4si): Ditto.
11209 (aarch64_sm3tt1bq4si): Ditto.
11210 (aarch64_sm3tt2aq4si): Ditto.
11211 (aarch64_sm3tt2bq4si): Ditto.
11212 (aarch64_sm3partw1qv4si): Ditto.
11213 (aarch64_sm3partw2qv4si): Ditto.
11214 (aarch64_sm4eqv4si): Ditto.
11215 (aarch64_sm4ekeyqv4si): Ditto.
11216 * config/aarch64/aarch64-simd.md:
11217 (aarch64_sm3ss1qv4si): Ditto.
11218 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
11219 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
11220 (aarch64_sm4eqv4si): Ditto.
11221 (aarch64_sm4ekeyqv4si): Ditto.
11222 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
11223 (sm3part_op): Ditto.
11224 (CRYPTO_SM3TT): Ditto.
11225 (CRYPTO_SM3PART): Ditto.
11226 (UNSPEC_SM3SS1): New unspec.
11227 (UNSPEC_SM3TT1A): Ditto.
11228 (UNSPEC_SM3TT1B): Ditto.
11229 (UNSPEC_SM3TT2A): Ditto.
11230 (UNSPEC_SM3TT2B): Ditto.
11231 (UNSPEC_SM3PARTW1): Ditto.
11232 (UNSPEC_SM3PARTW2): Ditto.
11233 (UNSPEC_SM4E): Ditto.
11234 (UNSPEC_SM4EKEY): Ditto.
11235 * config/aarch64/constraints.md (Ui2): New constraint.
11236 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
11237 * config/arm/types.md (crypto_sm3): New type attribute.
11238 (crypto_sm4): Ditto.
11239 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
11240 (vsm3tt1aq_u32): Ditto.
11241 (vsm3tt1bq_u32): Ditto.
11242 (vsm3tt2aq_u32): Ditto.
11243 (vsm3tt2bq_u32): Ditto.
11244 (vsm3partw1q_u32): Ditto.
11245 (vsm3partw2q_u32): Ditto.
11246 (vsm4eq_u32): Ditto.
11247 (vsm4ekeyq_u32): Ditto.
11248 (doc/invoke.texi): Document new sm4 option.
11249
11250 2018-01-10 Michael Collison <michael.collison@arm.com>
11251
11252 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
11253 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
11254 (AARCH64_FL_FOR_ARCH8_4): New.
11255 (AARCH64_FL_V8_4): New flag.
11256 (doc/invoke.texi): Document new armv8.4-a option.
11257
11258 2018-01-10 Michael Collison <michael.collison@arm.com>
11259
11260 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11261 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
11262 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
11263 * config/aarch64/aarch64-option-extension.def: Add
11264 AARCH64_OPT_EXTENSION of 'sha2'.
11265 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
11266 (crypto): Disable sha2 and aes if crypto disabled.
11267 (crypto): Enable aes and sha2 if enabled.
11268 (simd): Disable sha2 and aes if simd disabled.
11269 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
11270 New flags.
11271 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
11272 (TARGET_SHA2): New feature flag for sha2.
11273 (TARGET_AES): New feature flag for aes.
11274 * config/aarch64/aarch64-simd.md:
11275 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
11276 conditional on TARGET_AES.
11277 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
11278 (aarch64_crypto_sha1hsi): Make pattern conditional
11279 on TARGET_SHA2.
11280 (aarch64_crypto_sha1hv4si): Ditto.
11281 (aarch64_be_crypto_sha1hv4si): Ditto.
11282 (aarch64_crypto_sha1su1v4si): Ditto.
11283 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
11284 (aarch64_crypto_sha1su0v4si): Ditto.
11285 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
11286 (aarch64_crypto_sha256su0v4si): Ditto.
11287 (aarch64_crypto_sha256su1v4si): Ditto.
11288 (doc/invoke.texi): Document new aes and sha2 options.
11289
11290 2018-01-10 Martin Sebor <msebor@redhat.com>
11291
11292 PR tree-optimization/83781
11293 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
11294 as string arrays.
11295
11296 2018-01-11 Martin Sebor <msebor@gmail.com>
11297 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11298
11299 PR tree-optimization/83501
11300 PR tree-optimization/81703
11301
11302 * tree-ssa-strlen.c (get_string_cst): Rename...
11303 (get_string_len): ...to this. Handle global constants.
11304 (handle_char_store): Adjust.
11305
11306 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
11307 Jim Wilson <jimw@sifive.com>
11308
11309 * config/riscv/riscv-protos.h (riscv_output_return): New.
11310 * config/riscv/riscv.c (struct machine_function): New naked_p field.
11311 (riscv_attribute_table, riscv_output_return),
11312 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
11313 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
11314 (riscv_compute_frame_info): Only compute frame->mask if not a naked
11315 function.
11316 (riscv_expand_prologue): Add early return for naked function.
11317 (riscv_expand_epilogue): Likewise.
11318 (riscv_function_ok_for_sibcall): Return false for naked function.
11319 (riscv_set_current_function): New.
11320 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
11321 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
11322 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
11323 * doc/extend.texi (RISC-V Function Attributes): New.
11324
11325 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11326
11327 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
11328 check for 128-bit long double before checking TCmode.
11329 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
11330 128-bit long doubles before checking TFmode or TCmode.
11331 (FLOAT128_IBM_P): Likewise.
11332
11333 2018-01-10 Martin Sebor <msebor@redhat.com>
11334
11335 PR tree-optimization/83671
11336 * builtins.c (c_strlen): Unconditionally return zero for the empty
11337 string.
11338 Use -Warray-bounds for warnings.
11339 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
11340 for non-constant array indices with COMPONENT_REF, arrays of
11341 arrays, and pointers to arrays.
11342 (gimple_fold_builtin_strlen): Determine and set length range for
11343 non-constant character arrays.
11344
11345 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
11346
11347 PR middle-end/81897
11348 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
11349 empty blocks.
11350
11351 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
11352
11353 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11354
11355 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11356
11357 PR target/83399
11358 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11359 VECTOR_MEM_ALTIVEC_OR_VSX_P.
11360 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11361 indexed_or_indirect_operand predicate.
11362 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11363 (*vsx_le_perm_load_v8hi): Likewise.
11364 (*vsx_le_perm_load_v16qi): Likewise.
11365 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11366 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11367 (*vsx_le_perm_store_v8hi): Likewise.
11368 (*vsx_le_perm_store_v16qi): Likewise.
11369 (eight unnamed splitters): Likewise.
11370
11371 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11372
11373 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11374 * config/rs6000/emmintrin.h: Likewise.
11375 * config/rs6000/mmintrin.h: Likewise.
11376 * config/rs6000/xmmintrin.h: Likewise.
11377
11378 2018-01-10 David Malcolm <dmalcolm@redhat.com>
11379
11380 PR c++/43486
11381 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11382 "public_flag".
11383 * tree.c (tree_nop_conversion): Return true for location wrapper
11384 nodes.
11385 (maybe_wrap_with_location): New function.
11386 (selftest::check_strip_nops): New function.
11387 (selftest::test_location_wrappers): New function.
11388 (selftest::tree_c_tests): Call it.
11389 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11390 (maybe_wrap_with_location): New decl.
11391 (EXPR_LOCATION_WRAPPER_P): New macro.
11392 (location_wrapper_p): New inline function.
11393 (tree_strip_any_location_wrapper): New inline function.
11394
11395 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
11396
11397 PR target/83735
11398 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11399 stack_realign_offset for the largest alignment of stack slot
11400 actually used.
11401 (ix86_find_max_used_stack_alignment): New function.
11402 (ix86_finalize_stack_frame_flags): Use it. Set
11403 max_used_stack_alignment if we don't realign stack.
11404 * config/i386/i386.h (machine_function): Add
11405 max_used_stack_alignment.
11406
11407 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
11408
11409 * config/arm/arm.opt (-mbranch-cost): New option.
11410 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
11411 account.
11412
11413 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
11414
11415 PR target/83629
11416 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
11417 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
11418
11419 2018-01-10 Richard Biener <rguenther@suse.de>
11420
11421 PR debug/83765
11422 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
11423 early out so it also covers the case where we have a non-NULL
11424 origin.
11425
11426 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11427
11428 PR tree-optimization/83753
11429 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
11430 for non-strided grouped accesses if the number of elements is 1.
11431
11432 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11433
11434 PR target/81616
11435 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
11436 * i386.h (TARGET_USE_GATHER): Define.
11437 * x86-tune.def (X86_TUNE_USE_GATHER): New.
11438
11439 2018-01-10 Martin Liska <mliska@suse.cz>
11440
11441 PR bootstrap/82831
11442 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
11443 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
11444 partitioning.
11445 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
11446 CLEANUP_NO_PARTITIONING is not set.
11447
11448 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11449
11450 * doc/rtl.texi: Remove documentation of (const ...) wrappers
11451 for vectors, as a partial revert of r254296.
11452 * rtl.h (const_vec_p): Delete.
11453 (const_vec_duplicate_p): Don't test for vector CONSTs.
11454 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
11455 * expmed.c (make_tree): Likewise.
11456
11457 Revert:
11458 * common.md (E, F): Use CONSTANT_P instead of checking for
11459 CONST_VECTOR.
11460 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
11461 checking for CONST_VECTOR.
11462
11463 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11464
11465 PR middle-end/83575
11466 * predict.c (force_edge_cold): Handle in more sane way edges
11467 with no prediction.
11468
11469 2018-01-09 Carl Love <cel@us.ibm.com>
11470
11471 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
11472 V4SI, V4SF types.
11473 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
11474 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
11475 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
11476 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
11477 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
11478 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
11479 * config/rs6000/rs6000-protos.h: Add extern defition for
11480 rs6000_generate_float2_double_code.
11481 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
11482 function.
11483 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
11484 (float2_v2df): Add define_expand.
11485
11486 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
11487
11488 PR target/83628
11489 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
11490 op_mode in the force_to_mode call.
11491
11492 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11493
11494 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
11495 instead of checking each element individually.
11496 (aarch64_evpc_uzp): Likewise.
11497 (aarch64_evpc_zip): Likewise.
11498 (aarch64_evpc_ext): Likewise.
11499 (aarch64_evpc_rev): Likewise.
11500 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
11501 instead of checking each element individually. Return true without
11502 generating rtl if
11503 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
11504 whether all selected elements come from the same input, instead of
11505 checking each element individually. Remove calls to gen_rtx_REG,
11506 start_sequence and end_sequence and instead assert that no rtl is
11507 generated.
11508
11509 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11510
11511 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
11512 order of HIGH and CONST checks.
11513
11514 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11515
11516 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
11517 if the destination isn't an SSA_NAME.
11518
11519 2018-01-09 Richard Biener <rguenther@suse.de>
11520
11521 PR tree-optimization/83668
11522 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
11523 move prologue...
11524 (canonicalize_loop_form): ... here, renamed from ...
11525 (canonicalize_loop_closed_ssa_form): ... this and amended to
11526 swap successor edges for loop exit blocks to make us use
11527 the RPO order we need for initial schedule generation.
11528
11529 2018-01-09 Joseph Myers <joseph@codesourcery.com>
11530
11531 PR tree-optimization/64811
11532 * match.pd: When optimizing comparisons with Inf, avoid
11533 introducing or losing exceptions from comparisons with NaN.
11534
11535 2018-01-09 Martin Liska <mliska@suse.cz>
11536
11537 PR sanitizer/82517
11538 * asan.c (shadow_mem_size): Add gcc_assert.
11539
11540 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
11541
11542 Don't save registers in main().
11543
11544 PR target/83738
11545 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
11546 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
11547 * config/avr/avr.c (avr_set_current_function): Don't error if
11548 naked, OS_task or OS_main are specified at the same time.
11549 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
11550 OS_main.
11551 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
11552 attribute.
11553 * common/config/avr/avr-common.c (avr_option_optimization_table):
11554 Switch on -mmain-is-OS_task for optimizing compilations.
11555
11556 2018-01-09 Richard Biener <rguenther@suse.de>
11557
11558 PR tree-optimization/83572
11559 * graphite.c: Include cfganal.h.
11560 (graphite_transform_loops): Connect infinite loops to exit
11561 and remove fake edges at the end.
11562
11563 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11564
11565 * ipa-inline.c (edge_badness): Revert accidental checkin.
11566
11567 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11568
11569 PR ipa/80763
11570 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
11571 symbols; not inline clones.
11572
11573 2018-01-09 Jakub Jelinek <jakub@redhat.com>
11574
11575 PR target/83507
11576 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
11577 hard registers. Formatting fixes.
11578
11579 PR preprocessor/83722
11580 * gcc.c (try_generate_repro): Pass
11581 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
11582 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
11583 do_report_bug.
11584
11585 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
11586 Kito Cheng <kito.cheng@gmail.com>
11587
11588 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
11589 (riscv_leaf_function_p): Delete.
11590 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
11591
11592 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11593
11594 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
11595 function.
11596 (do_ifelse): New function.
11597 (do_isel): New function.
11598 (do_sub3): New function.
11599 (do_add3): New function.
11600 (do_load_mask_compare): New function.
11601 (do_overlap_load_compare): New function.
11602 (expand_compare_loop): New function.
11603 (expand_block_compare): Call expand_compare_loop() when appropriate.
11604 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
11605 option description.
11606 (-mblock-compare-inline-loop-limit): New option.
11607
11608 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11609
11610 PR target/83677
11611 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
11612 Reverse order of second and third operands in first alternative.
11613 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
11614 of first and second elements in UNSPEC_VPERMR vector.
11615 (altivec_expand_vec_perm_le): Likewise.
11616
11617 2018-01-08 Jeff Law <law@redhat.com>
11618
11619 PR rtl-optimizatin/81308
11620 * tree-switch-conversion.c (cfg_altered): New file scoped static.
11621 (process_switch): If group_case_labels makes a change, then set
11622 cfg_altered.
11623 (pass_convert_switch::execute): If a switch is converted, then
11624 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
11625
11626 PR rtl-optimization/81308
11627 * recog.c (split_all_insns): Conditionally cleanup the CFG after
11628 splitting insns.
11629
11630 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
11631
11632 PR target/83663 - Revert r255946
11633 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
11634 generation for cases where splatting a value is not useful.
11635 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
11636 across a vec_duplicate and a paradoxical subreg forming a vector
11637 mode to a vec_concat.
11638
11639 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11640
11641 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
11642 -march=armv8.3-a variants.
11643 * config/arm/t-multilib: Likewise.
11644 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
11645
11646 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11647
11648 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
11649 to generate rtl.
11650 (cceq_ior_compare_complement): Give it a name so I can use it, and
11651 change boolean_or_operator predicate to boolean_operator so it can
11652 be used to generate a crand.
11653 (eqne): New code iterator.
11654 (bd/bd_neg): New code_attrs.
11655 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
11656 a single define_insn.
11657 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
11658 decrement (bdnzt/bdnzf/bdzt/bdzf).
11659 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
11660 with the new names of the branch decrement patterns, and added the
11661 names of the branch decrement conditional patterns.
11662
11663 2018-01-08 Richard Biener <rguenther@suse.de>
11664
11665 PR tree-optimization/83563
11666 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
11667 cache.
11668
11669 2018-01-08 Richard Biener <rguenther@suse.de>
11670
11671 PR middle-end/83713
11672 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
11673
11674 2018-01-08 Richard Biener <rguenther@suse.de>
11675
11676 PR tree-optimization/83685
11677 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
11678 references to abnormals.
11679
11680 2018-01-08 Richard Biener <rguenther@suse.de>
11681
11682 PR lto/83719
11683 * dwarf2out.c (output_indirect_strings): Handle empty
11684 skeleton_debug_str_hash.
11685 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
11686
11687 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11688
11689 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
11690 (emit_store_direct): Likewise.
11691 (arc_trampoline_adjust_address): Likewise.
11692 (arc_asm_trampoline_template): New function.
11693 (arc_initialize_trampoline): Use asm_trampoline_template.
11694 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
11695 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
11696 * config/arc/arc.md (flush_icache): Delete pattern.
11697
11698 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11699
11700 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
11701 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
11702 munaligned-access.
11703
11704 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11705
11706 PR target/83681
11707 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
11708 by not USED_FOR_TARGET.
11709 (make_pass_resolve_sw_modes): Likewise.
11710
11711 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11712
11713 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
11714 USED_FOR_TARGET.
11715
11716 2018-01-08 Richard Biener <rguenther@suse.de>
11717
11718 PR middle-end/83580
11719 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
11720
11721 2018-01-08 Richard Biener <rguenther@suse.de>
11722
11723 PR middle-end/83517
11724 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11725
11726 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
11727
11728 PR middle-end/81897
11729 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
11730 basic blocks with a small number of successors.
11731 (convert_control_dep_chain_into_preds): Improve handling of
11732 forwarder blocks.
11733 (dump_predicates): Split apart into...
11734 (dump_pred_chain): ...here...
11735 (dump_pred_info): ...and here.
11736 (can_one_predicate_be_invalidated_p): Add debugging printfs.
11737 (can_chain_union_be_invalidated_p): Improve check for invalidation
11738 of paths.
11739 (uninit_uses_cannot_happen): Avoid unnecessary if
11740 convert_control_dep_chain_into_preds yielded nothing.
11741
11742 2018-01-06 Martin Sebor <msebor@redhat.com>
11743
11744 PR tree-optimization/83640
11745 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
11746 subtracting negative offset from size.
11747 (builtin_access::overlap): Adjust offset bounds of the access to fall
11748 within the size of the object if possible.
11749
11750 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
11751
11752 PR rtl-optimization/83699
11753 * expmed.c (extract_bit_field_1): Restrict the vector usage of
11754 extract_bit_field_as_subreg to cases in which the extracted
11755 value is also a vector.
11756
11757 * lra-constraints.c (process_alt_operands): Test for the equivalence
11758 substitutions when detecting a possible reload cycle.
11759
11760 2018-01-06 Jakub Jelinek <jakub@redhat.com>
11761
11762 PR debug/83480
11763 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
11764 by default if flag_selective_schedling{,2}. Formatting fixes.
11765
11766 PR rtl-optimization/83682
11767 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
11768 if it has non-VECTOR_MODE element mode.
11769 (vec_duplicate_p): Likewise.
11770
11771 PR middle-end/83694
11772 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
11773 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
11774
11775 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11776
11777 PR target/83604
11778 * config/i386/i386-builtin.def
11779 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
11780 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
11781 Require also OPTION_MASK_ISA_AVX512F in addition to
11782 OPTION_MASK_ISA_GFNI.
11783 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
11784 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
11785 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
11786 to OPTION_MASK_ISA_GFNI.
11787 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
11788 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
11789 OPTION_MASK_ISA_AVX512BW.
11790 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
11791 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
11792 addition to OPTION_MASK_ISA_GFNI.
11793 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
11794 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
11795 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
11796 to OPTION_MASK_ISA_GFNI.
11797 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
11798 a requirement for all ISAs rather than any of them with a few
11799 exceptions.
11800 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
11801 processing.
11802 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
11803 bitmasks to be enabled with 3 exceptions, instead of requiring any
11804 enabled ISA with lots of exceptions.
11805 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
11806 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
11807 Change avx512bw in isa attribute to avx512f.
11808 * config/i386/sgxintrin.h: Add license boilerplate.
11809 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
11810 to __AVX512F__ and __AVX512VL to __AVX512VL__.
11811 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
11812 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
11813 defined.
11814 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
11815 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
11816 temporarily sse2 rather than sse if not enabled already.
11817
11818 PR target/83604
11819 * config/i386/sse.md (VI248_VLBW): Rename to ...
11820 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
11821 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
11822 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
11823 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
11824 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
11825 mode iterator instead of VI248_VLBW.
11826
11827 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
11828
11829 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
11830 (record_modified): Skip clobbers; add debug output.
11831 (param_change_prob): Use sreal frequencies.
11832
11833 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11834
11835 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
11836 punt for user-aligned variables.
11837
11838 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11839
11840 * tree-chrec.c (chrec_contains_symbols): Return true for
11841 POLY_INT_CST.
11842
11843 2018-01-05 Sudakshina Das <sudi.das@arm.com>
11844
11845 PR target/82439
11846 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
11847 of (x|y) == x for BICS pattern.
11848
11849 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11850
11851 PR tree-optimization/83605
11852 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
11853 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
11854 can throw.
11855
11856 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
11857
11858 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
11859 * config/epiphany/rtems.h: New file.
11860
11861 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11862 Uros Bizjak <ubizjak@gmail.com>
11863
11864 PR target/83554
11865 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
11866 QIreg_operand instead of register_operand predicate.
11867 * config/i386/i386.c (ix86_rop_should_change_byte_p,
11868 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
11869 comments instead of -fmitigate[-_]rop.
11870
11871 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11872
11873 PR bootstrap/81926
11874 * cgraphunit.c (symbol_table::compile): Switch to text_section
11875 before calling assembly_start debug hook.
11876 * run-rtl-passes.c (run_rtl_passes): Likewise.
11877 Include output.h.
11878
11879 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11880
11881 * tree-vrp.c (extract_range_from_binary_expr_1): Check
11882 range_int_cst_p rather than !symbolic_range_p before calling
11883 extract_range_from_multiplicative_op_1.
11884
11885 2018-01-04 Jeff Law <law@redhat.com>
11886
11887 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
11888 redundant test in assertion.
11889
11890 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11891
11892 * doc/rtl.texi: Document machine_mode wrapper classes.
11893
11894 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11895
11896 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
11897 using tree_to_uhwi.
11898
11899 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11900
11901 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
11902 the VEC_PERM_EXPR fold to fail.
11903
11904 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11905
11906 PR debug/83585
11907 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
11908 to switched_sections.
11909
11910 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11911
11912 PR target/83680
11913 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
11914 test for d.testing.
11915
11916 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
11917
11918 PR target/83387
11919 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
11920 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
11921
11922 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11923
11924 PR debug/83666
11925 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
11926 is BLKmode and bitpos not zero or mode change is needed.
11927
11928 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11929
11930 PR target/83675
11931 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
11932 TARGET_VIS2.
11933
11934 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
11935
11936 PR target/83628
11937 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
11938 instead of MULT rtx. Update all corresponding splitters.
11939 (*saddl_se): Ditto.
11940 (*ssub<modesuffix>): Ditto.
11941 (*ssubl_se): Ditto.
11942 (*cmp_sadd_di): Update split patterns.
11943 (*cmp_sadd_si): Ditto.
11944 (*cmp_sadd_sidi): Ditto.
11945 (*cmp_ssub_di): Ditto.
11946 (*cmp_ssub_si): Ditto.
11947 (*cmp_ssub_sidi): Ditto.
11948 * config/alpha/predicates.md (const23_operand): New predicate.
11949 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
11950 Look for ASHIFT, not MULT inner operand.
11951 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
11952
11953 2018-01-04 Martin Liska <mliska@suse.cz>
11954
11955 PR gcov-profile/83669
11956 * gcov.c (output_intermediate_file): Add version to intermediate
11957 gcov file.
11958 * doc/gcov.texi: Document new field 'version' in intermediate
11959 file format. Fix location of '-k' option of gcov command.
11960
11961 2018-01-04 Martin Liska <mliska@suse.cz>
11962
11963 PR ipa/82352
11964 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
11965
11966 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11967
11968 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
11969
11970 2018-01-03 Martin Sebor <msebor@redhat.com>
11971
11972 PR tree-optimization/83655
11973 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
11974 checking calls with invalid arguments.
11975
11976 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11977
11978 * tree-vect-stmts.c (vect_get_store_rhs): New function.
11979 (vectorizable_mask_load_store): Delete.
11980 (vectorizable_call): Return false for masked loads and stores.
11981 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
11982 instead of gimple_assign_rhs1.
11983 (vectorizable_load): Handle IFN_MASK_LOAD.
11984 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
11985
11986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11987
11988 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
11989 split out from..,
11990 (vectorizable_mask_load_store): ...here.
11991 (vectorizable_load): ...and here.
11992
11993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11994
11995 * tree-vect-stmts.c (vect_build_all_ones_mask)
11996 (vect_build_zero_merge_argument): New functions, split out from...
11997 (vectorizable_load): ...here.
11998
11999 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12000
12001 * tree-vect-stmts.c (vect_check_store_rhs): New function,
12002 split out from...
12003 (vectorizable_mask_load_store): ...here.
12004 (vectorizable_store): ...and here.
12005
12006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12007
12008 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12009 split out from...
12010 (vectorizable_mask_load_store): ...here.
12011
12012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12013
12014 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12015 (vect_model_store_cost): Take a vec_load_store_type instead of a
12016 vect_def_type.
12017 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12018 (vect_model_store_cost): Take a vec_load_store_type instead of a
12019 vect_def_type.
12020 (vectorizable_mask_load_store): Update accordingly.
12021 (vectorizable_store): Likewise.
12022 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12023
12024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12025
12026 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12027 IFN_MASK_LOAD calls here rather than...
12028 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12029
12030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12031 Alan Hayward <alan.hayward@arm.com>
12032 David Sherwood <david.sherwood@arm.com>
12033
12034 * expmed.c (extract_bit_field_1): For vector extracts,
12035 fall back to extract_bit_field_as_subreg if vec_extract
12036 isn't available.
12037
12038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12039 Alan Hayward <alan.hayward@arm.com>
12040 David Sherwood <david.sherwood@arm.com>
12041
12042 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12043 they are variable or constant sized.
12044 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12045 slots for constant-sized data.
12046
12047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12048 Alan Hayward <alan.hayward@arm.com>
12049 David Sherwood <david.sherwood@arm.com>
12050
12051 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12052 handling COND_EXPRs with boolean comparisons, try to find a better
12053 basis for the mask type than the boolean itself.
12054
12055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12056
12057 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12058 is calculated and how it can be overridden.
12059 * genmodes.c (max_bitsize_mode_any_mode): New variable.
12060 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12061 if defined.
12062 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12063 if nonzero.
12064
12065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12066 Alan Hayward <alan.hayward@arm.com>
12067 David Sherwood <david.sherwood@arm.com>
12068
12069 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12070 Remove the mode argument.
12071 (aarch64_simd_valid_immediate): Remove the mode and inverse
12072 arguments.
12073 * config/aarch64/iterators.md (bitsize): New iterator.
12074 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12075 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12076 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12077 aarch64_simd_valid_immediate.
12078 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12079 (aarch64_reg_or_bic_imm): Likewise.
12080 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12081 with an insn_type enum and msl with a modifier_type enum.
12082 Replace element_width with a scalar_mode. Change the shift
12083 to unsigned int. Add constructors for scalar_float_mode and
12084 scalar_int_mode elements.
12085 (aarch64_vect_float_const_representable_p): Delete.
12086 (aarch64_can_const_movi_rtx_p)
12087 (aarch64_simd_scalar_immediate_valid_for_move)
12088 (aarch64_simd_make_constant): Update call to
12089 aarch64_simd_valid_immediate.
12090 (aarch64_advsimd_valid_immediate_hs): New function.
12091 (aarch64_advsimd_valid_immediate): Likewise.
12092 (aarch64_simd_valid_immediate): Remove mode and inverse
12093 arguments. Rewrite to use the above. Use const_vec_duplicate_p
12094 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12095 and aarch64_float_const_representable_p on the result.
12096 (aarch64_output_simd_mov_immediate): Remove mode argument.
12097 Update call to aarch64_simd_valid_immediate and use of
12098 simd_immediate_info.
12099 (aarch64_output_scalar_simd_mov_immediate): Update call
12100 accordingly.
12101
12102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12103 Alan Hayward <alan.hayward@arm.com>
12104 David Sherwood <david.sherwood@arm.com>
12105
12106 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12107 (mode_nunits): Likewise CONST_MODE_NUNITS.
12108 * machmode.def (ADJUST_NUNITS): Document.
12109 * genmodes.c (mode_data::need_nunits_adj): New field.
12110 (blank_mode): Update accordingly.
12111 (adj_nunits): New variable.
12112 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12113 parameter.
12114 (emit_mode_size_inline): Set need_bytesize_adj for all modes
12115 listed in adj_nunits.
12116 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12117 listed in adj_nunits. Don't emit case statements for such modes.
12118 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12119 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
12120 nothing if adj_nunits is nonnull.
12121 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12122 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12123 (emit_mode_fbit): Update use of print_maybe_const_decl.
12124 (emit_move_size): Likewise. Treat the array as non-const
12125 if adj_nunits.
12126 (emit_mode_adjustments): Handle adj_nunits.
12127
12128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12129
12130 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12131 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12132 (VECTOR_MODES): Use it.
12133 (make_vector_modes): Take the prefix as an argument.
12134
12135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12136 Alan Hayward <alan.hayward@arm.com>
12137 David Sherwood <david.sherwood@arm.com>
12138
12139 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12140 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12141 for MODE_VECTOR_BOOL.
12142 * machmode.def (VECTOR_BOOL_MODE): Document.
12143 * genmodes.c (VECTOR_BOOL_MODE): New macro.
12144 (make_vector_bool_mode): New function.
12145 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12146 MODE_VECTOR_BOOL.
12147 * lto-streamer-in.c (lto_input_mode_table): Likewise.
12148 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12149 Likewise.
12150 * stor-layout.c (int_mode_for_mode): Likewise.
12151 * tree.c (build_vector_type_for_mode): Likewise.
12152 * varasm.c (output_constant_pool_2): Likewise.
12153 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12154 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
12155 for MODE_VECTOR_BOOL.
12156 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12157 of mode class checks.
12158 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12159 instead of a list of mode class checks.
12160 (expand_vector_scalar_condition): Likewise.
12161 (type_for_widest_vector_mode): Handle BImode as an inner mode.
12162
12163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12164 Alan Hayward <alan.hayward@arm.com>
12165 David Sherwood <david.sherwood@arm.com>
12166
12167 * machmode.h (mode_size): Change from unsigned short to
12168 poly_uint16_pod.
12169 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12170 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12171 or if measurement_type is not polynomial.
12172 (fixed_size_mode::includes_p): Check for constant-sized modes.
12173 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12174 return a poly_uint16 rather than an unsigned short.
12175 (emit_mode_size): Change the type of mode_size from unsigned short
12176 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
12177 (emit_mode_adjustments): Cope with polynomial vector sizes.
12178 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12179 for GET_MODE_SIZE.
12180 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12181 for GET_MODE_SIZE.
12182 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12183 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12184 * caller-save.c (setup_save_areas): Likewise.
12185 (replace_reg_with_saved_mem): Likewise.
12186 * calls.c (emit_library_call_value_1): Likewise.
12187 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12188 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12189 (gen_lowpart_for_combine): Likewise.
12190 * convert.c (convert_to_integer_1): Likewise.
12191 * cse.c (equiv_constant, cse_insn): Likewise.
12192 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12193 (cselib_subst_to_values): Likewise.
12194 * dce.c (word_dce_process_block): Likewise.
12195 * df-problems.c (df_word_lr_mark_ref): Likewise.
12196 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
12197 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
12198 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
12199 (rtl_for_decl_location): Likewise.
12200 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
12201 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
12202 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
12203 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
12204 (expand_expr_real_1): Likewise.
12205 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
12206 (pad_below): Likewise.
12207 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12208 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
12209 * ira.c (get_subreg_tracking_sizes): Likewise.
12210 * ira-build.c (ira_create_allocno_objects): Likewise.
12211 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
12212 (ira_sort_regnos_for_alter_reg): Likewise.
12213 * ira-costs.c (record_operand_costs): Likewise.
12214 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
12215 (resolve_simple_move): Likewise.
12216 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
12217 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
12218 (lra_constraints): Likewise.
12219 (CONST_POOL_OK_P): Reject variable-sized modes.
12220 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
12221 (add_pseudo_to_slot, lra_spill): Likewise.
12222 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12223 * optabs-query.c (get_best_extraction_insn): Likewise.
12224 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12225 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
12226 (expand_mult_highpart, valid_multiword_target_p): Likewise.
12227 * recog.c (offsettable_address_addr_space_p): Likewise.
12228 * regcprop.c (maybe_mode_change): Likewise.
12229 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
12230 * regrename.c (build_def_use): Likewise.
12231 * regstat.c (dump_reg_info): Likewise.
12232 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
12233 (find_reloads, find_reloads_subreg_address): Likewise.
12234 * reload1.c (eliminate_regs_1): Likewise.
12235 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
12236 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
12237 (simplify_binary_operation_1, simplify_subreg): Likewise.
12238 * targhooks.c (default_function_arg_padding): Likewise.
12239 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
12240 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
12241 (verify_gimple_assign_ternary): Likewise.
12242 * tree-inline.c (estimate_move_cost): Likewise.
12243 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12244 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
12245 (get_address_cost_ainc): Likewise.
12246 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
12247 (vect_supportable_dr_alignment): Likewise.
12248 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12249 (vectorizable_reduction): Likewise.
12250 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
12251 (vectorizable_operation, vectorizable_load): Likewise.
12252 * tree.c (build_same_sized_truth_vector_type): Likewise.
12253 * valtrack.c (cleanup_auto_inc_dec): Likewise.
12254 * var-tracking.c (emit_note_insn_var_location): Likewise.
12255 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
12256 (ADDR_VEC_ALIGN): Likewise.
12257
12258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12259 Alan Hayward <alan.hayward@arm.com>
12260 David Sherwood <david.sherwood@arm.com>
12261
12262 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
12263 unsigned short.
12264 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12265 or if measurement_type is polynomial.
12266 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
12267 * combine.c (make_extraction): Likewise.
12268 * dse.c (find_shift_sequence): Likewise.
12269 * dwarf2out.c (mem_loc_descriptor): Likewise.
12270 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
12271 (extract_bit_field, extract_low_bits): Likewise.
12272 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
12273 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
12274 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
12275 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
12276 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12277 * reload.c (find_reloads): Likewise.
12278 * reload1.c (alter_reg): Likewise.
12279 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
12280 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
12281 * tree-if-conv.c (predicate_mem_writes): Likewise.
12282 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
12283 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
12284 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
12285 * valtrack.c (dead_debug_insert_temp): Likewise.
12286 * varasm.c (mergeable_constant_section): Likewise.
12287 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
12288
12289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12290 Alan Hayward <alan.hayward@arm.com>
12291 David Sherwood <david.sherwood@arm.com>
12292
12293 * expr.c (expand_assignment): Cope with polynomial mode sizes
12294 when assigning to a CONCAT.
12295
12296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12297 Alan Hayward <alan.hayward@arm.com>
12298 David Sherwood <david.sherwood@arm.com>
12299
12300 * machmode.h (mode_precision): Change from unsigned short to
12301 poly_uint16_pod.
12302 (mode_to_precision): Return a poly_uint16 rather than an unsigned
12303 short.
12304 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
12305 or if measurement_type is not polynomial.
12306 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
12307 in which the mode is already known to be a scalar_int_mode.
12308 * genmodes.c (emit_mode_precision): Change the type of mode_precision
12309 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
12310 initializer.
12311 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12312 for GET_MODE_PRECISION.
12313 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12314 for GET_MODE_PRECISION.
12315 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
12316 as polynomial.
12317 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
12318 (expand_field_assignment, make_extraction): Likewise.
12319 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
12320 (get_last_value): Likewise.
12321 * convert.c (convert_to_integer_1): Likewise.
12322 * cse.c (cse_insn): Likewise.
12323 * expr.c (expand_expr_real_1): Likewise.
12324 * lra-constraints.c (simplify_operand_subreg): Likewise.
12325 * optabs-query.c (can_atomic_load_p): Likewise.
12326 * optabs.c (expand_atomic_load): Likewise.
12327 (expand_atomic_store): Likewise.
12328 * ree.c (combine_reaching_defs): Likewise.
12329 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
12330 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
12331 * tree.h (type_has_mode_precision_p): Likewise.
12332 * ubsan.c (instrument_si_overflow): Likewise.
12333
12334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12335 Alan Hayward <alan.hayward@arm.com>
12336 David Sherwood <david.sherwood@arm.com>
12337
12338 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
12339 polynomial numbers of units.
12340 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
12341 (valid_vector_subparts_p): New function.
12342 (build_vector_type): Remove temporary shim and take the number
12343 of units as a poly_uint64 rather than an int.
12344 (build_opaque_vector_type): Take the number of units as a
12345 poly_uint64 rather than an int.
12346 * tree.c (build_vector_from_ctor): Handle polynomial
12347 TYPE_VECTOR_SUBPARTS.
12348 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
12349 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
12350 (build_vector_from_val): If the number of units is variable,
12351 use build_vec_duplicate_cst for constant operands and
12352 VEC_DUPLICATE_EXPR otherwise.
12353 (make_vector_type): Remove temporary is_constant ().
12354 (build_vector_type, build_opaque_vector_type): Take the number of
12355 units as a poly_uint64 rather than an int.
12356 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12357 VECTOR_CST_NELTS.
12358 * cfgexpand.c (expand_debug_expr): Likewise.
12359 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12360 (store_constructor, expand_expr_real_1): Likewise.
12361 (const_scalar_mask_from_tree): Likewise.
12362 * fold-const-call.c (fold_const_reduction): Likewise.
12363 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12364 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12365 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12366 (fold_relational_const): Likewise.
12367 (native_interpret_vector): Likewise. Change the size from an
12368 int to an unsigned int.
12369 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12370 TYPE_VECTOR_SUBPARTS.
12371 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12372 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12373 duplicating a non-constant operand into a variable-length vector.
12374 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12375 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12376 * ipa-icf.c (sem_variable::equals): Likewise.
12377 * match.pd: Likewise.
12378 * omp-simd-clone.c (simd_clone_subparts): Likewise.
12379 * print-tree.c (print_node): Likewise.
12380 * stor-layout.c (layout_type): Likewise.
12381 * targhooks.c (default_builtin_vectorization_cost): Likewise.
12382 * tree-cfg.c (verify_gimple_comparison): Likewise.
12383 (verify_gimple_assign_binary): Likewise.
12384 (verify_gimple_assign_ternary): Likewise.
12385 (verify_gimple_assign_single): Likewise.
12386 * tree-pretty-print.c (dump_generic_node): Likewise.
12387 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12388 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12389 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12390 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12391 (vect_shift_permute_load_chain): Likewise.
12392 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12393 (expand_vector_condition, optimize_vector_constructor): Likewise.
12394 (lower_vec_perm, get_compute_type): Likewise.
12395 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12396 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12397 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12398 (vect_recog_mask_conversion_pattern): Likewise.
12399 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12400 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12401 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12402 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
12403 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
12404 (vectorizable_shift, vectorizable_operation, vectorizable_store)
12405 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
12406 (supportable_widening_operation): Likewise.
12407 (supportable_narrowing_operation): Likewise.
12408 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
12409 Likewise.
12410 * varasm.c (output_constant): Likewise.
12411
12412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12413 Alan Hayward <alan.hayward@arm.com>
12414 David Sherwood <david.sherwood@arm.com>
12415
12416 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
12417 so that both the length == 3 and length != 3 cases set up their
12418 own permute vectors. Add comments explaining why we know the
12419 number of elements is constant.
12420 (vect_permute_load_chain): Likewise.
12421
12422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12423 Alan Hayward <alan.hayward@arm.com>
12424 David Sherwood <david.sherwood@arm.com>
12425
12426 * machmode.h (mode_nunits): Change from unsigned char to
12427 poly_uint16_pod.
12428 (ONLY_FIXED_SIZE_MODES): New macro.
12429 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
12430 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
12431 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
12432 New typedefs.
12433 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
12434 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
12435 or if measurement_type is not polynomial.
12436 * genmodes.c (ZERO_COEFFS): New macro.
12437 (emit_mode_nunits_inline): Make mode_nunits_inline return a
12438 poly_uint16.
12439 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
12440 Use ZERO_COEFFS when emitting initializers.
12441 * data-streamer.h (bp_pack_poly_value): New function.
12442 (bp_unpack_poly_value): Likewise.
12443 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12444 for GET_MODE_NUNITS.
12445 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12446 for GET_MODE_NUNITS.
12447 * tree.c (make_vector_type): Remove temporary shim and make
12448 the real function take the number of units as a poly_uint64
12449 rather than an int.
12450 (build_vector_type_for_mode): Handle polynomial nunits.
12451 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
12452 * emit-rtl.c (const_vec_series_p_1): Likewise.
12453 (gen_rtx_CONST_VECTOR): Likewise.
12454 * fold-const.c (test_vec_duplicate_folding): Likewise.
12455 * genrecog.c (validate_pattern): Likewise.
12456 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
12457 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12458 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
12459 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
12460 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
12461 * rtlanal.c (subreg_get_info): Likewise.
12462 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12463 (vect_grouped_load_supported): Likewise.
12464 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
12465 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
12466 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12467 (simplify_const_unary_operation, simplify_binary_operation_1)
12468 (simplify_const_binary_operation, simplify_ternary_operation)
12469 (test_vector_ops_duplicate, test_vector_ops): Likewise.
12470 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
12471 instead of CONST_VECTOR_NUNITS.
12472 * varasm.c (output_constant_pool_2): Likewise.
12473 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
12474 explicit-encoded elements in the XVEC for variable-length vectors.
12475
12476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12477
12478 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
12479
12480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12481 Alan Hayward <alan.hayward@arm.com>
12482 David Sherwood <david.sherwood@arm.com>
12483
12484 * coretypes.h (fixed_size_mode): Declare.
12485 (fixed_size_mode_pod): New typedef.
12486 * builtins.h (target_builtins::x_apply_args_mode)
12487 (target_builtins::x_apply_result_mode): Change type to
12488 fixed_size_mode_pod.
12489 * builtins.c (apply_args_size, apply_result_size, result_vector)
12490 (expand_builtin_apply_args_1, expand_builtin_apply)
12491 (expand_builtin_return): Update accordingly.
12492
12493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12494
12495 * cse.c (hash_rtx_cb): Hash only the encoded elements.
12496 * cselib.c (cselib_hash_rtx): Likewise.
12497 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
12498 CONST_VECTOR encoding.
12499
12500 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12501 Jeff Law <law@redhat.com>
12502
12503 PR target/83641
12504 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
12505 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
12506 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
12507 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
12508
12509 PR target/83641
12510 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
12511 explicitly probe *sp in a noreturn function if there were any callee
12512 register saves or frame pointer is needed.
12513
12514 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12515
12516 PR debug/83621
12517 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
12518 BLKmode for ternary, binary or unary expressions.
12519
12520 PR debug/83645
12521 * var-tracking.c (delete_vta_debug_insn): New inline function.
12522 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
12523 insns from get_insns () to NULL instead of each bb separately.
12524 Use delete_vta_debug_insn. No longer static.
12525 (vt_debug_insns_local, variable_tracking_main_1): Adjust
12526 delete_vta_debug_insns callers.
12527 * rtl.h (delete_vta_debug_insns): Declare.
12528 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
12529 instead of variable_tracking_main.
12530
12531 2018-01-03 Martin Sebor <msebor@redhat.com>
12532
12533 PR tree-optimization/83603
12534 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
12535 arguments past the endof the argument list in functions declared
12536 without a prototype.
12537 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
12538 Avoid checking when arguments are null.
12539
12540 2018-01-03 Martin Sebor <msebor@redhat.com>
12541
12542 PR c/83559
12543 * doc/extend.texi (attribute const): Fix a typo.
12544 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
12545 issuing -Wsuggest-attribute for void functions.
12546
12547 2018-01-03 Martin Sebor <msebor@redhat.com>
12548
12549 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
12550 offset_int::from instead of wide_int::to_shwi.
12551 (maybe_diag_overlap): Remove assertion.
12552 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
12553 * gimple-ssa-sprintf.c (format_directive): Same.
12554 (parse_directive): Same.
12555 (sprintf_dom_walker::compute_format_length): Same.
12556 (try_substitute_return_value): Same.
12557
12558 2018-01-03 Jeff Law <law@redhat.com>
12559
12560 PR middle-end/83654
12561 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
12562 non-constant residual for zero at runtime and avoid probing in
12563 that case. Reorganize code for trailing problem to mirror handling
12564 of the residual.
12565
12566 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12567
12568 PR tree-optimization/83501
12569 * tree-ssa-strlen.c (get_string_cst): New.
12570 (handle_char_store): Call get_string_cst.
12571
12572 2018-01-03 Martin Liska <mliska@suse.cz>
12573
12574 PR tree-optimization/83593
12575 * tree-ssa-strlen.c: Include tree-cfg.h.
12576 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
12577 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
12578 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
12579 to false.
12580 (strlen_dom_walker::before_dom_children): Call
12581 gimple_purge_dead_eh_edges. Dump tranformation with details
12582 dump flags.
12583 (strlen_dom_walker::before_dom_children): Update call by adding
12584 new argument cleanup_eh.
12585 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
12586
12587 2018-01-03 Martin Liska <mliska@suse.cz>
12588
12589 PR ipa/83549
12590 * cif-code.def (VARIADIC_THUNK): New enum value.
12591 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
12592 thunks.
12593
12594 2018-01-03 Jan Beulich <jbeulich@suse.com>
12595
12596 * sse.md (mov<mode>_internal): Tighten condition for when to use
12597 vmovdqu<ssescalarsize> for TI and OI modes.
12598
12599 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12600
12601 Update copyright years.
12602
12603 2018-01-03 Martin Liska <mliska@suse.cz>
12604
12605 PR ipa/83594
12606 * ipa-visibility.c (function_and_variable_visibility): Skip
12607 functions with noipa attribure.
12608
12609 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12610
12611 * gcc.c (process_command): Update copyright notice dates.
12612 * gcov-dump.c (print_version): Ditto.
12613 * gcov.c (print_version): Ditto.
12614 * gcov-tool.c (print_version): Ditto.
12615 * gengtype.c (create_file): Ditto.
12616 * doc/cpp.texi: Bump @copying's copyright year.
12617 * doc/cppinternals.texi: Ditto.
12618 * doc/gcc.texi: Ditto.
12619 * doc/gccint.texi: Ditto.
12620 * doc/gcov.texi: Ditto.
12621 * doc/install.texi: Ditto.
12622 * doc/invoke.texi: Ditto.
12623
12624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12625
12626 * vector-builder.h (vector_builder::m_full_nelts): Change from
12627 unsigned int to poly_uint64.
12628 (vector_builder::full_nelts): Update prototype accordingly.
12629 (vector_builder::new_vector): Likewise.
12630 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
12631 (vector_builder::operator ==): Likewise.
12632 (vector_builder::finalize): Likewise.
12633 * int-vector-builder.h (int_vector_builder::int_vector_builder):
12634 Take the number of elements as a poly_uint64 rather than an
12635 unsigned int.
12636 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
12637 from unsigned int to poly_uint64.
12638 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
12639 (vec_perm_indices::new_vector): Likewise.
12640 (vec_perm_indices::length): Likewise.
12641 (vec_perm_indices::nelts_per_input): Likewise.
12642 (vec_perm_indices::input_nelts): Likewise.
12643 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
12644 number of elements per input as a poly_uint64 rather than an
12645 unsigned int. Use the original encoding for variable-length
12646 vectors, rather than clamping each individual element.
12647 For the second and subsequent elements in each pattern,
12648 clamp the step and base before clamping their sum.
12649 (vec_perm_indices::series_p): Handle polynomial element counts.
12650 (vec_perm_indices::all_in_range_p): Likewise.
12651 (vec_perm_indices_to_tree): Likewise.
12652 (vec_perm_indices_to_rtx): Likewise.
12653 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
12654 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
12655 (tree_vector_builder::new_binary_operation): Handle polynomial
12656 element counts. Return false if we need to know the number
12657 of elements at compile time.
12658 * fold-const.c (fold_vec_perm): Punt if the number of elements
12659 isn't known at compile time.
12660
12661 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12662
12663 * vec-perm-indices.h (vec_perm_builder): Change element type
12664 from HOST_WIDE_INT to poly_int64.
12665 (vec_perm_indices::element_type): Update accordingly.
12666 (vec_perm_indices::clamp): Handle polynomial element_types.
12667 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12668 (vec_perm_indices::all_in_range_p): Likewise.
12669 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
12670 than shwi trees.
12671 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
12672 polynomial vec_perm_indices element types.
12673 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
12674 * fold-const.c (fold_vec_perm): Likewise.
12675 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
12676 * tree-vect-generic.c (lower_vec_perm): Likewise.
12677 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12678 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
12679 element type to HOST_WIDE_INT.
12680
12681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12682 Alan Hayward <alan.hayward@arm.com>
12683 David Sherwood <david.sherwood@arm.com>
12684
12685 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
12686 rather than an int. Use plus_constant.
12687 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
12688 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
12689
12690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12691 Alan Hayward <alan.hayward@arm.com>
12692 David Sherwood <david.sherwood@arm.com>
12693
12694 * calls.c (emit_call_1, expand_call): Change struct_value_size from
12695 a HOST_WIDE_INT to a poly_int64.
12696
12697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12698 Alan Hayward <alan.hayward@arm.com>
12699 David Sherwood <david.sherwood@arm.com>
12700
12701 * calls.c (load_register_parameters): Cope with polynomial
12702 mode sizes. Require a constant size for BLKmode parameters
12703 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
12704 forces a parameter to be padded at the lsb end in order to
12705 fill a complete number of words, require the parameter size
12706 to be ordered wrt UNITS_PER_WORD.
12707
12708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12709 Alan Hayward <alan.hayward@arm.com>
12710 David Sherwood <david.sherwood@arm.com>
12711
12712 * reload1.c (spill_stack_slot_width): Change element type
12713 from unsigned int to poly_uint64_pod.
12714 (alter_reg): Treat mode sizes as polynomial.
12715
12716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12717 Alan Hayward <alan.hayward@arm.com>
12718 David Sherwood <david.sherwood@arm.com>
12719
12720 * reload.c (complex_word_subreg_p): New function.
12721 (reload_inner_reg_of_subreg, push_reload): Use it.
12722
12723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12724 Alan Hayward <alan.hayward@arm.com>
12725 David Sherwood <david.sherwood@arm.com>
12726
12727 * lra-constraints.c (process_alt_operands): Reject matched
12728 operands whose sizes aren't ordered.
12729 (match_reload): Refer to this check here.
12730
12731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12732 Alan Hayward <alan.hayward@arm.com>
12733 David Sherwood <david.sherwood@arm.com>
12734
12735 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
12736 that the mode size is in the set {1, 2, 4, 8, 16}.
12737
12738 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12739 Alan Hayward <alan.hayward@arm.com>
12740 David Sherwood <david.sherwood@arm.com>
12741
12742 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
12743 Use plus_constant instead of gen_rtx_PLUS.
12744
12745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12746 Alan Hayward <alan.hayward@arm.com>
12747 David Sherwood <david.sherwood@arm.com>
12748
12749 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
12750 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
12751 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
12752 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
12753 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
12754 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
12755 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
12756 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
12757 * config/i386/i386.c (ix86_push_rounding): ...this new function.
12758 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
12759 a poly_int64.
12760 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
12761 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
12762 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
12763 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
12764 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
12765 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
12766 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
12767 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
12768 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
12769 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
12770 function.
12771 * expr.c (emit_move_resolve_push): Treat the input and result
12772 of PUSH_ROUNDING as a poly_int64.
12773 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
12774 (emit_push_insn): Likewise.
12775 * lra-eliminations.c (mark_not_eliminable): Likewise.
12776 * recog.c (push_operand): Likewise.
12777 * reload1.c (elimination_effects): Likewise.
12778 * rtlanal.c (nonzero_bits1): Likewise.
12779 * calls.c (store_one_arg): Likewise. Require the padding to be
12780 known at compile time.
12781
12782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12783 Alan Hayward <alan.hayward@arm.com>
12784 David Sherwood <david.sherwood@arm.com>
12785
12786 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
12787 Use plus_constant instead of gen_rtx_PLUS.
12788
12789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12790 Alan Hayward <alan.hayward@arm.com>
12791 David Sherwood <david.sherwood@arm.com>
12792
12793 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
12794 rather than an int.
12795
12796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12797 Alan Hayward <alan.hayward@arm.com>
12798 David Sherwood <david.sherwood@arm.com>
12799
12800 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
12801 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
12802 via stack temporaries. Treat the mode size as polynomial too.
12803
12804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12805 Alan Hayward <alan.hayward@arm.com>
12806 David Sherwood <david.sherwood@arm.com>
12807
12808 * expr.c (expand_expr_real_2): When handling conversions involving
12809 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
12810 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
12811 as a poly_uint64 too.
12812
12813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12814 Alan Hayward <alan.hayward@arm.com>
12815 David Sherwood <david.sherwood@arm.com>
12816
12817 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
12818
12819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12820 Alan Hayward <alan.hayward@arm.com>
12821 David Sherwood <david.sherwood@arm.com>
12822
12823 * combine.c (can_change_dest_mode): Handle polynomial
12824 REGMODE_NATURAL_SIZE.
12825 * expmed.c (store_bit_field_1): Likewise.
12826 * expr.c (store_constructor): Likewise.
12827 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
12828 and polynomial REGMODE_NATURAL_SIZE.
12829 (gen_lowpart_common): Likewise.
12830 * reginfo.c (record_subregs_of_mode): Likewise.
12831 * rtlanal.c (read_modify_subreg_p): Likewise.
12832
12833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12834 Alan Hayward <alan.hayward@arm.com>
12835 David Sherwood <david.sherwood@arm.com>
12836
12837 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
12838 numbers of elements.
12839
12840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12841 Alan Hayward <alan.hayward@arm.com>
12842 David Sherwood <david.sherwood@arm.com>
12843
12844 * match.pd: Cope with polynomial numbers of vector elements.
12845
12846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12847 Alan Hayward <alan.hayward@arm.com>
12848 David Sherwood <david.sherwood@arm.com>
12849
12850 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
12851 in a POINTER_PLUS_EXPR.
12852
12853 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12854 Alan Hayward <alan.hayward@arm.com>
12855 David Sherwood <david.sherwood@arm.com>
12856
12857 * omp-simd-clone.c (simd_clone_subparts): New function.
12858 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
12859 (ipa_simd_modify_function_body): Likewise.
12860
12861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12862 Alan Hayward <alan.hayward@arm.com>
12863 David Sherwood <david.sherwood@arm.com>
12864
12865 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
12866 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
12867 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
12868 (expand_vector_condition, vector_element): Likewise.
12869 (subparts_gt): New function.
12870 (get_compute_type): Use subparts_gt.
12871 (count_type_subparts): Delete.
12872 (expand_vector_operations_1): Use subparts_gt instead of
12873 count_type_subparts.
12874
12875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12876 Alan Hayward <alan.hayward@arm.com>
12877 David Sherwood <david.sherwood@arm.com>
12878
12879 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
12880 (vect_compile_time_alias): ...this new function. Do the calculation
12881 on poly_ints rather than trees.
12882 (vect_prune_runtime_alias_test_list): Update call accordingly.
12883
12884 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12885 Alan Hayward <alan.hayward@arm.com>
12886 David Sherwood <david.sherwood@arm.com>
12887
12888 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
12889 numbers of units.
12890 (vect_schedule_slp_instance): Likewise.
12891
12892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12893 Alan Hayward <alan.hayward@arm.com>
12894 David Sherwood <david.sherwood@arm.com>
12895
12896 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
12897 constant and extern definitions for variable-length vectors.
12898 (vect_get_constant_vectors): Note that the number of units
12899 is known to be constant.
12900
12901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12902 Alan Hayward <alan.hayward@arm.com>
12903 David Sherwood <david.sherwood@arm.com>
12904
12905 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
12906 of units as polynomial. Choose between WIDE and NARROW based
12907 on multiple_p.
12908
12909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12910 Alan Hayward <alan.hayward@arm.com>
12911 David Sherwood <david.sherwood@arm.com>
12912
12913 * tree-vect-stmts.c (simd_clone_subparts): New function.
12914 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
12915
12916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12917 Alan Hayward <alan.hayward@arm.com>
12918 David Sherwood <david.sherwood@arm.com>
12919
12920 * tree-vect-stmts.c (vectorizable_call): Treat the number of
12921 vectors as polynomial. Use build_index_vector for
12922 IFN_GOMP_SIMD_LANE.
12923
12924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12925 Alan Hayward <alan.hayward@arm.com>
12926 David Sherwood <david.sherwood@arm.com>
12927
12928 * tree-vect-stmts.c (get_load_store_type): Treat the number of
12929 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
12930 for variable-length vectors.
12931 (vectorizable_mask_load_store): Treat the number of units as
12932 polynomial, asserting that it is constant if the condition has
12933 already been enforced.
12934 (vectorizable_store, vectorizable_load): Likewise.
12935
12936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12937 Alan Hayward <alan.hayward@arm.com>
12938 David Sherwood <david.sherwood@arm.com>
12939
12940 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
12941 of units as polynomial. Punt if we can't tell at compile time
12942 which vector contains the final result.
12943
12944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12945 Alan Hayward <alan.hayward@arm.com>
12946 David Sherwood <david.sherwood@arm.com>
12947
12948 * tree-vect-loop.c (vectorizable_induction): Treat the number
12949 of units as polynomial. Punt on SLP inductions. Use an integer
12950 VEC_SERIES_EXPR for variable-length integer reductions. Use a
12951 cast of such a series for variable-length floating-point
12952 reductions.
12953
12954 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12955 Alan Hayward <alan.hayward@arm.com>
12956 David Sherwood <david.sherwood@arm.com>
12957
12958 * tree.h (build_index_vector): Declare.
12959 * tree.c (build_index_vector): New function.
12960 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
12961 of units as polynomial, forcibly converting it to a constant if
12962 vectorizable_reduction has already enforced the condition.
12963 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
12964 to create a {1,2,3,...} vector.
12965 (vectorizable_reduction): Treat the number of units as polynomial.
12966 Choose vectype_in based on the largest scalar element size rather
12967 than the smallest number of units. Enforce the restrictions
12968 relied on above.
12969
12970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12971 Alan Hayward <alan.hayward@arm.com>
12972 David Sherwood <david.sherwood@arm.com>
12973
12974 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
12975 number of units as polynomial.
12976
12977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12978 Alan Hayward <alan.hayward@arm.com>
12979 David Sherwood <david.sherwood@arm.com>
12980
12981 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
12982 * target.def (autovectorize_vector_sizes): Return the vector sizes
12983 by pointer, using vector_sizes rather than a bitmask.
12984 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
12985 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
12986 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
12987 Likewise.
12988 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
12989 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
12990 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
12991 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
12992 * omp-general.c (omp_max_vf): Likewise.
12993 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12994 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
12995 * tree-vect-loop.c (vect_analyze_loop): Likewise.
12996 * tree-vect-slp.c (vect_slp_bb): Likewise.
12997 * doc/tm.texi: Regenerate.
12998 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
12999 to a poly_uint64.
13000 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13001 the vector size as a poly_uint64 rather than an unsigned int.
13002 (current_vector_size): Change from an unsigned int to a poly_uint64.
13003 (get_vectype_for_scalar_type): Update accordingly.
13004 * tree.h (build_truth_vector_type): Take the size and number of
13005 units as a poly_uint64 rather than an unsigned int.
13006 (build_vector_type): Add a temporary overload that takes
13007 the number of units as a poly_uint64 rather than an unsigned int.
13008 * tree.c (make_vector_type): Likewise.
13009 (build_truth_vector_type): Take the number of units as a poly_uint64
13010 rather than an unsigned int.
13011
13012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13013 Alan Hayward <alan.hayward@arm.com>
13014 David Sherwood <david.sherwood@arm.com>
13015
13016 * target.def (get_mask_mode): Take the number of units and length
13017 as poly_uint64s rather than unsigned ints.
13018 * targhooks.h (default_get_mask_mode): Update accordingly.
13019 * targhooks.c (default_get_mask_mode): Likewise.
13020 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13021 * doc/tm.texi: Regenerate.
13022
13023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13024 Alan Hayward <alan.hayward@arm.com>
13025 David Sherwood <david.sherwood@arm.com>
13026
13027 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13028 * omp-general.c (omp_max_vf): Likewise.
13029 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13030 (expand_omp_simd): Handle polynomial safelen.
13031 * omp-low.c (omplow_simd_context): Add a default constructor.
13032 (omplow_simd_context::max_vf): Change from int to poly_uint64.
13033 (lower_rec_simd_input_clauses): Update accordingly.
13034 (lower_rec_input_clauses): Likewise.
13035
13036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13037 Alan Hayward <alan.hayward@arm.com>
13038 David Sherwood <david.sherwood@arm.com>
13039
13040 * tree-vectorizer.h (vect_nunits_for_cost): New function.
13041 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13042 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13043 (vect_analyze_slp_cost): Likewise.
13044 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13045 (vect_model_load_cost): Likewise.
13046
13047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13048 Alan Hayward <alan.hayward@arm.com>
13049 David Sherwood <david.sherwood@arm.com>
13050
13051 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13052 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13053 from an unsigned int * to a poly_uint64_pod *.
13054 (calculate_unrolling_factor): New function.
13055 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
13056
13057 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13058 Alan Hayward <alan.hayward@arm.com>
13059 David Sherwood <david.sherwood@arm.com>
13060
13061 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13062 from an unsigned int to a poly_uint64.
13063 (_loop_vec_info::slp_unrolling_factor): Likewise.
13064 (_loop_vec_info::vectorization_factor): Change from an int
13065 to a poly_uint64.
13066 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13067 (vect_get_num_vectors): New function.
13068 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13069 (vect_get_num_copies): Use vect_get_num_vectors.
13070 (vect_analyze_data_ref_dependences): Change max_vf from an int *
13071 to an unsigned int *.
13072 (vect_analyze_data_refs): Change min_vf from an int * to a
13073 poly_uint64 *.
13074 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13075 than an unsigned HOST_WIDE_INT.
13076 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13077 (vect_analyze_data_ref_dependence): Change max_vf from an int *
13078 to an unsigned int *.
13079 (vect_analyze_data_ref_dependences): Likewise.
13080 (vect_compute_data_ref_alignment): Handle polynomial vf.
13081 (vect_enhance_data_refs_alignment): Likewise.
13082 (vect_prune_runtime_alias_test_list): Likewise.
13083 (vect_shift_permute_load_chain): Likewise.
13084 (vect_supportable_dr_alignment): Likewise.
13085 (dependence_distance_ge_vf): Take the vectorization factor as a
13086 poly_uint64 rather than an unsigned HOST_WIDE_INT.
13087 (vect_analyze_data_refs): Change min_vf from an int * to a
13088 poly_uint64 *.
13089 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13090 vfm1 as a poly_uint64 rather than an int. Make the same change
13091 for the returned bound_scalar.
13092 (vect_gen_vector_loop_niters): Handle polynomial vf.
13093 (vect_do_peeling): Likewise. Update call to
13094 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13095 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13096 be constant.
13097 * tree-vect-loop.c (vect_determine_vectorization_factor)
13098 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13099 (vect_get_known_peeling_cost): Likewise.
13100 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13101 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13102 (vect_transform_loop): Likewise. Use the lowest possible VF when
13103 updating the upper bounds of the loop.
13104 (vect_min_worthwhile_factor): Make static. Return an unsigned int
13105 rather than an int.
13106 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13107 polynomial unroll factors.
13108 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13109 (vect_make_slp_decision): Likewise.
13110 (vect_supported_load_permutation_p): Likewise, and polynomial
13111 vf too.
13112 (vect_analyze_slp_cost): Handle polynomial vf.
13113 (vect_slp_analyze_node_operations): Likewise.
13114 (vect_slp_analyze_bb_1): Likewise.
13115 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13116 than an unsigned HOST_WIDE_INT.
13117 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13118 (vectorizable_load): Handle polynomial vf.
13119 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13120 a poly_uint64.
13121 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13122
13123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13124 Alan Hayward <alan.hayward@arm.com>
13125 David Sherwood <david.sherwood@arm.com>
13126
13127 * match.pd: Handle bit operations involving three constants
13128 and try to fold one pair.
13129
13130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13131
13132 * tree-vect-loop-manip.c: Include gimple-fold.h.
13133 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13134 niters_maybe_zero parameters. Handle other cases besides a step of 1.
13135 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13136 Add a path that uses a step of VF instead of 1, but disable it
13137 for now.
13138 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13139 and niters_no_overflow parameters. Update calls to
13140 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13141 Create a new SSA name if the latter choses to use a ste other
13142 than zero, and return it via niters_vector_mult_vf_var.
13143 * tree-vect-loop.c (vect_transform_loop): Update calls to
13144 vect_do_peeling, vect_gen_vector_loop_niters and
13145 slpeel_make_loop_iterate_ntimes.
13146 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13147 (vect_gen_vector_loop_niters): Update declarations after above changes.
13148
13149 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
13150
13151 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13152 128-bit round to integer instructions.
13153 (ceil<mode>2): Likewise.
13154 (btrunc<mode>2): Likewise.
13155 (round<mode>2): Likewise.
13156
13157 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13158
13159 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13160 unaligned VSX load/store on P8/P9.
13161 (expand_block_clear): Allow the use of unaligned VSX
13162 load/store on P8/P9.
13163
13164 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13165
13166 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13167 New function.
13168 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13169 swap associated with both a load and a store.
13170
13171 2018-01-02 Andrew Waterman <andrew@sifive.com>
13172
13173 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13174 * config/riscv/riscv.md (clear_cache): Use it.
13175
13176 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
13177
13178 * web.c: Remove out-of-date comment.
13179
13180 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13181
13182 * expr.c (fixup_args_size_notes): Check that any existing
13183 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13184 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13185 (emit_single_push_insn): ...here.
13186
13187 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13188
13189 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13190 (const_vector_encoded_nelts): New function.
13191 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13192 (const_vector_int_elt, const_vector_elt): Declare.
13193 * emit-rtl.c (const_vector_int_elt_1): New function.
13194 (const_vector_elt): Likewise.
13195 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
13196 of CONST_VECTOR_ELT.
13197
13198 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13199
13200 * expr.c: Include rtx-vector-builder.h.
13201 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
13202 directly on the tree encoding.
13203 (const_vector_from_tree): Likewise.
13204 * optabs.c: Include rtx-vector-builder.h.
13205 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
13206 sequence of "u" values.
13207 * vec-perm-indices.c: Include rtx-vector-builder.h.
13208 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
13209 directly on the vec_perm_indices encoding.
13210
13211 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13212
13213 * doc/rtl.texi (const_vector): Describe new encoding scheme.
13214 * Makefile.in (OBJS): Add rtx-vector-builder.o.
13215 * rtx-vector-builder.h: New file.
13216 * rtx-vector-builder.c: Likewise.
13217 * rtl.h (rtx_def::u2): Add a const_vector field.
13218 (CONST_VECTOR_NPATTERNS): New macro.
13219 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
13220 (CONST_VECTOR_DUPLICATE_P): Likewise.
13221 (CONST_VECTOR_STEPPED_P): Likewise.
13222 (CONST_VECTOR_ENCODED_ELT): Likewise.
13223 (const_vec_duplicate_p): Check for a duplicated vector encoding.
13224 (unwrap_const_vec_duplicate): Likewise.
13225 (const_vec_series_p): Check for a non-duplicated vector encoding.
13226 Say that the function only returns true for integer vectors.
13227 * emit-rtl.c: Include rtx-vector-builder.h.
13228 (gen_const_vec_duplicate_1): Delete.
13229 (gen_const_vector): Call gen_const_vec_duplicate instead of
13230 gen_const_vec_duplicate_1.
13231 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
13232 (gen_const_vec_duplicate): Use rtx_vector_builder.
13233 (gen_const_vec_series): Likewise.
13234 (gen_rtx_CONST_VECTOR): Likewise.
13235 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
13236 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13237 Build a new vector rather than modifying a CONST_VECTOR in-place.
13238 (handle_special_swappables): Update call accordingly.
13239 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
13240 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13241 Build a new vector rather than modifying a CONST_VECTOR in-place.
13242 (handle_special_swappables): Update call accordingly.
13243
13244 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13245
13246 * simplify-rtx.c (simplify_const_binary_operation): Use
13247 CONST_VECTOR_ELT instead of XVECEXP.
13248
13249 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13250
13251 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
13252 the selector elements to be different from the data elements
13253 if the selector is a VECTOR_CST.
13254 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
13255 ssizetype for the selector.
13256
13257 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13258
13259 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
13260 before testing each element individually.
13261 * tree-vect-generic.c (lower_vec_perm): Likewise.
13262
13263 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13264
13265 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
13266 * selftest-run-tests.c (selftest::run_tests): Call it.
13267 * vector-builder.h (vector_builder::operator ==): New function.
13268 (vector_builder::operator !=): Likewise.
13269 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
13270 (vec_perm_indices::all_from_input_p): New function.
13271 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13272 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
13273 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
13274 instead of reading the VECTOR_CST directly. Detect whether both
13275 vector inputs are the same before constructing the vec_perm_indices,
13276 and update the number of inputs argument accordingly. Use the
13277 utility functions added above. Only construct sel2 if we need to.
13278
13279 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13280
13281 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
13282 the broadcast of the low byte.
13283 (expand_mult_highpart): Use an explicit encoding for the permutes.
13284 * optabs-query.c (can_mult_highpart_p): Likewise.
13285 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13286 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13287 (vectorizable_bswap): Likewise.
13288 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
13289 explicit encoding for the power-of-2 permutes.
13290 (vect_permute_store_chain): Likewise.
13291 (vect_grouped_load_supported): Likewise.
13292 (vect_permute_load_chain): Likewise.
13293
13294 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13295
13296 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
13297 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
13298 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
13299 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13300 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13301 (vect_gen_perm_mask_any): Likewise.
13302
13303 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13304
13305 * int-vector-builder.h: New file.
13306 * vec-perm-indices.h: Include int-vector-builder.h.
13307 (vec_perm_indices): Redefine as an int_vector_builder.
13308 (auto_vec_perm_indices): Delete.
13309 (vec_perm_builder): Redefine as a stand-alone class.
13310 (vec_perm_indices::vec_perm_indices): New function.
13311 (vec_perm_indices::clamp): Likewise.
13312 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
13313 (vec_perm_indices::new_vector): New function.
13314 (vec_perm_indices::new_expanded_vector): Update for new
13315 vec_perm_indices class.
13316 (vec_perm_indices::rotate_inputs): New function.
13317 (vec_perm_indices::all_in_range_p): Operate directly on the
13318 encoded form, without computing elided elements.
13319 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
13320 encoding. Update for new vec_perm_indices class.
13321 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
13322 the given vec_perm_builder.
13323 (expand_vec_perm_var): Update vec_perm_builder constructor.
13324 (expand_mult_highpart): Use vec_perm_builder instead of
13325 auto_vec_perm_indices.
13326 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
13327 vec_perm_indices instead of auto_vec_perm_indices. Use a single
13328 or double series encoding as appropriate.
13329 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
13330 vec_perm_indices instead of auto_vec_perm_indices.
13331 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13332 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13333 (vect_permute_store_chain): Likewise.
13334 (vect_grouped_load_supported): Likewise.
13335 (vect_permute_load_chain): Likewise.
13336 (vect_shift_permute_load_chain): Likewise.
13337 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13338 (vect_transform_slp_perm_load): Likewise.
13339 (vect_schedule_slp_instance): Likewise.
13340 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13341 (vectorizable_mask_load_store): Likewise.
13342 (vectorizable_bswap): Likewise.
13343 (vectorizable_store): Likewise.
13344 (vectorizable_load): Likewise.
13345 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
13346 vec_perm_indices instead of auto_vec_perm_indices. Use
13347 tree_to_vec_perm_builder to read the vector from a tree.
13348 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
13349 vec_perm_builder instead of a vec_perm_indices.
13350 (have_whole_vector_shift): Use vec_perm_builder and
13351 vec_perm_indices instead of auto_vec_perm_indices. Leave the
13352 truncation to calc_vec_perm_mask_for_shift.
13353 (vect_create_epilog_for_reduction): Likewise.
13354 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13355 from auto_vec_perm_indices to vec_perm_indices.
13356 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13357 instead of changing individual elements.
13358 (aarch64_vectorize_vec_perm_const): Use new_vector to install
13359 the vector in d.perm.
13360 * config/arm/arm.c (expand_vec_perm_d::perm): Change
13361 from auto_vec_perm_indices to vec_perm_indices.
13362 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13363 instead of changing individual elements.
13364 (arm_vectorize_vec_perm_const): Use new_vector to install
13365 the vector in d.perm.
13366 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13367 Update vec_perm_builder constructor.
13368 (rs6000_expand_interleave): Likewise.
13369 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13370 (rs6000_expand_interleave): Likewise.
13371
13372 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13373
13374 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13375 to qimode could truncate the indices.
13376 * optabs.c (expand_vec_perm_var): Likewise.
13377
13378 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13379
13380 * Makefile.in (OBJS): Add vec-perm-indices.o.
13381 * vec-perm-indices.h: New file.
13382 * vec-perm-indices.c: Likewise.
13383 * target.h (vec_perm_indices): Replace with a forward class
13384 declaration.
13385 (auto_vec_perm_indices): Move to vec-perm-indices.h.
13386 * optabs.h: Include vec-perm-indices.h.
13387 (expand_vec_perm): Delete.
13388 (selector_fits_mode_p, expand_vec_perm_var): Declare.
13389 (expand_vec_perm_const): Declare.
13390 * target.def (vec_perm_const_ok): Replace with...
13391 (vec_perm_const): ...this new hook.
13392 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13393 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13394 * doc/tm.texi: Regenerate.
13395 * optabs.def (vec_perm_const): Delete.
13396 * doc/md.texi (vec_perm_const): Likewise.
13397 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13398 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13399 expand_vec_perm for constant permutation vectors. Assert that
13400 the mode of variable permutation vectors is the integer equivalent
13401 of the mode that is being permuted.
13402 * optabs-query.h (selector_fits_mode_p): Declare.
13403 * optabs-query.c: Include vec-perm-indices.h.
13404 (selector_fits_mode_p): New function.
13405 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
13406 is defined, instead of checking whether the vec_perm_const_optab
13407 exists. Use targetm.vectorize.vec_perm_const instead of
13408 targetm.vectorize.vec_perm_const_ok. Check whether the indices
13409 fit in the vector mode before using a variable permute.
13410 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
13411 vec_perm_indices instead of an rtx.
13412 (expand_vec_perm): Replace with...
13413 (expand_vec_perm_const): ...this new function. Take the selector
13414 as a vec_perm_indices rather than an rtx. Also take the mode of
13415 the selector. Update call to shift_amt_for_vec_perm_mask.
13416 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
13417 Use vec_perm_indices::new_expanded_vector to expand the original
13418 selector into bytes. Check whether the indices fit in the vector
13419 mode before using a variable permute.
13420 (expand_vec_perm_var): Make global.
13421 (expand_mult_highpart): Use expand_vec_perm_const.
13422 * fold-const.c: Includes vec-perm-indices.h.
13423 * tree-ssa-forwprop.c: Likewise.
13424 * tree-vect-data-refs.c: Likewise.
13425 * tree-vect-generic.c: Likewise.
13426 * tree-vect-loop.c: Likewise.
13427 * tree-vect-slp.c: Likewise.
13428 * tree-vect-stmts.c: Likewise.
13429 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
13430 Delete.
13431 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
13432 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
13433 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
13434 (aarch64_vectorize_vec_perm_const): ...this new function.
13435 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13436 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13437 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
13438 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
13439 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13440 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13441 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
13442 into...
13443 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
13444 check for NEON modes.
13445 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
13446 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
13447 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
13448 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
13449 into...
13450 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
13451 the old VEC_PERM_CONST conditions.
13452 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
13453 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
13454 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
13455 (ia64_vectorize_vec_perm_const_ok): Merge into...
13456 (ia64_vectorize_vec_perm_const): ...this new function.
13457 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
13458 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
13459 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
13460 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
13461 * config/mips/mips.c (mips_expand_vec_perm_const)
13462 (mips_vectorize_vec_perm_const_ok): Merge into...
13463 (mips_vectorize_vec_perm_const): ...this new function.
13464 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
13465 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
13466 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
13467 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
13468 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
13469 (rs6000_expand_vec_perm_const): Delete.
13470 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
13471 Delete.
13472 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13473 (altivec_expand_vec_perm_const_le): Take each operand individually.
13474 Operate on constant selectors rather than rtxes.
13475 (altivec_expand_vec_perm_const): Likewise. Update call to
13476 altivec_expand_vec_perm_const_le.
13477 (rs6000_expand_vec_perm_const): Delete.
13478 (rs6000_vectorize_vec_perm_const_ok): Delete.
13479 (rs6000_vectorize_vec_perm_const): New function.
13480 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13481 an element count and rtx array.
13482 (rs6000_expand_extract_even): Update call accordingly.
13483 (rs6000_expand_interleave): Likewise.
13484 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
13485 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
13486 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
13487 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
13488 (rs6000_expand_vec_perm_const): Delete.
13489 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13490 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13491 (altivec_expand_vec_perm_const_le): Take each operand individually.
13492 Operate on constant selectors rather than rtxes.
13493 (altivec_expand_vec_perm_const): Likewise. Update call to
13494 altivec_expand_vec_perm_const_le.
13495 (rs6000_expand_vec_perm_const): Delete.
13496 (rs6000_vectorize_vec_perm_const_ok): Delete.
13497 (rs6000_vectorize_vec_perm_const): New function. Remove stray
13498 reference to the SPE evmerge intructions.
13499 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13500 an element count and rtx array.
13501 (rs6000_expand_extract_even): Update call accordingly.
13502 (rs6000_expand_interleave): Likewise.
13503 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
13504 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
13505 new function.
13506 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13507
13508 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13509
13510 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
13511 vector mode and that that mode matches the mode of the data
13512 being permuted.
13513 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
13514 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
13515 directly using expand_vec_perm_1 when forcing selectors into
13516 registers.
13517 (expand_vec_perm_var): New function, split out from expand_vec_perm.
13518
13519 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13520
13521 * optabs-query.h (can_vec_perm_p): Delete.
13522 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
13523 * optabs-query.c (can_vec_perm_p): Split into...
13524 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
13525 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
13526 particular selector is valid.
13527 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13528 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13529 (vect_grouped_load_supported): Likewise.
13530 (vect_shift_permute_load_chain): Likewise.
13531 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13532 (vect_transform_slp_perm_load): Likewise.
13533 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13534 (vectorizable_bswap): Likewise.
13535 (vect_gen_perm_mask_checked): Likewise.
13536 * fold-const.c (fold_ternary_loc): Likewise. Don't take
13537 implementations of variable permutation vectors into account
13538 when deciding which selector to use.
13539 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
13540 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
13541 with a false third argument.
13542 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
13543 to test whether the constant selector is valid and can_vec_perm_var_p
13544 to test whether a variable selector is valid.
13545
13546 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13547
13548 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
13549 * optabs-query.c (can_vec_perm_p): Likewise.
13550 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
13551 instead of vec_perm_indices.
13552 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
13553 (vect_gen_perm_mask_checked): Likewise,
13554 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
13555 (vect_gen_perm_mask_checked): Likewise,
13556
13557 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13558
13559 * optabs-query.h (qimode_for_vec_perm): Declare.
13560 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
13561 (qimode_for_vec_perm): ...this new function.
13562 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
13563
13564 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13565
13566 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
13567 does not have a conditional at the top.
13568
13569 2018-01-02 Richard Biener <rguenther@suse.de>
13570
13571 * ipa-inline.c (big_speedup_p): Fix expression.
13572
13573 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13574
13575 PR target/81616
13576 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
13577 for generic 4->6.
13578
13579 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13580
13581 PR target/81616
13582 Generic tuning.
13583 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
13584 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
13585 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
13586 cond_taken_branch_cost 3->4.
13587
13588 2018-01-01 Jakub Jelinek <jakub@redhat.com>
13589
13590 PR tree-optimization/83581
13591 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
13592 TODO_cleanup_cfg if any changes have been made.
13593
13594 PR middle-end/83608
13595 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
13596 convert_modes if target mode has the right side, but different mode
13597 class.
13598
13599 PR middle-end/83609
13600 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
13601 last argument when extracting from CONCAT. If either from_real or
13602 from_imag is NULL, use expansion through memory. If result is not
13603 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
13604 the parts directly to inner mode, if even that fails, use expansion
13605 through memory.
13606
13607 PR middle-end/83623
13608 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
13609 check for bswap in mode rather than HImode and use that in expand_unop
13610 too.
13611 \f
13612 Copyright (C) 2018 Free Software Foundation, Inc.
13613
13614 Copying and distribution of this file, with or without modification,
13615 are permitted in any medium without royalty provided the copyright
13616 notice and this notice are preserved.