1 2018-05-22 Luis Machado <luis.machado@linaro.org>
3 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5 2018-05-22 Martin Sebor <msebor@redhat.com>
7 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12 * config/aarch64/aarch64-ldpstp.md: Replace uses of
13 aarch64_mem_pair_operand with memory_operand and delete operand swapping
15 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16 Add check for legitimate_address.
17 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18 (aarch64_swap_ldrstr_operands): New.
19 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
22 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25 * config/aarch64/aarch64.md: New patterns to generate stp
27 (store_pair_sw, store_pair_dw): New patterns to generate stp for
28 single words and double words.
29 (load_pair_sw, load_pair_dw): Likewise.
30 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
32 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
34 * config/aarch64/aarch64-ldpstp.md: Modify peephole
35 for different mode ldpstp and add peephole for merged zero stores.
37 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
39 (aarch64_gen_store_pair): Rename calls to match new patterns.
40 (aarch64_gen_load_pair): Rename calls to match new patterns.
41 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
42 (load_pair<DREG:mode><DREG2:mode>): ... This.
43 (store_pair<mode>): Rename to...
44 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
45 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
47 (V_INT_EQUIV): Handle SImode.
48 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
51 2018-05-22 Martin Sebor <msebor@redhat.com>
54 * calls.c (maybe_warn_nonstring_arg): Use string length to set
55 or ajust the presumed bound on an operation to avoid unnecessary
58 2018-05-22 Martin Sebor <msebor@redhat.com>
60 PR tree-optimization/85826
61 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
62 assuming that a DECL necesarily has a constant size.
64 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
67 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
69 2018-05-22 Richard Biener <rguenther@suse.de>
71 PR tree-optimization/85834
72 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
73 non-constant and non-zero memset arguments.
75 2018-05-22 Martin Liska <mliska@suse.cz>
78 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
80 2018-05-22 Richard Biener <rguenther@suse.de>
82 PR tree-optimization/85863
83 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
84 comparisons when vectype is specified.
85 (vectorizable_condition): Do not specify vectype for
86 vect_is_simple_cond when SLP vectorizing.
88 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
91 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
92 define __ibm128 as long double.
93 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
94 as a distinct type when IEEE 128-bit support is enabled.
95 (init_float128_ieee): Fix up conversions between IFmode and IEEE
96 128-bit types to use the correct functions.
97 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
98 convert between 128-bit floating point types that have different
99 modes but the same representation, instead of using gen_lowpart to
101 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
103 (IFKF_reg): New attributes to give the register constraints for
105 (extend<mode>tf2_internal): New insns to mark an explicit
106 conversion between 128-bit floating point types that have a
107 different mode but share the same representation.
109 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
111 PR tree-optimization/85814
112 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
113 a null return from get_strinfo when unsharing the next
114 strinfo in the chain.
116 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
119 * varasm.c (weak_finish): Clean up weak_decls.
121 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
123 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
124 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
125 UNSPEC_UADALP values.
126 * config/aarch64/iterators.md (ABAL): New int iterator.
129 (sur): Add mappings for the above.
130 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
132 (aarch64_<sur>abal<mode>_4): Likewise.
133 (aarch64_<sur>adalp<mode>_3): Likewise.
134 (<sur>sadv16qi): New define_expand.
136 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
138 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
139 (*movdf_internal): Ditto.
140 (*rcpsf2_sse): Ditto.
141 (*rsqrtsf2_sse): Ditto.
142 (*sqrt<mode>2_sse): Ditto.
144 2018-05-21 Tamar Christina <tamar.christina@arm.com>
146 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
148 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
149 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
150 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
151 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
153 * config/aarch64/arm_neon.h: Likewise.
154 * config/aarch64/iterators.md (VQ_I): New.
156 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
158 * config.gcc: Add arc/t-multilib-linux to tmake_file for
160 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
163 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
165 * config/nds32/constraints.md (S): New constraint.
166 * config/nds32/nds32.md (call_internal): Use constraint S.
167 (call_value_internal): Likewise.
168 (sibcall_internal): Likewise.
169 (sibcall_value_internal): Likewise.
171 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
172 Chung-Ju Wu <jasonwucj@gmail.com>
174 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
177 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
178 Chung-Ju Wu <jasonwucj@gmail.com>
180 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
181 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
182 (nds32_rtx_costs_impl): Simplify.
183 (nds32_address_cost_impl): Simplify.
184 (nds32_init_rtx_costs): New function.
185 (nds32_rtx_costs_speed_prefer): Likewise.
186 (nds32_rtx_costs_size_prefer): Likewise.
187 (nds32_address_cost_speed_prefer): Likewise.
188 (nds32_address_cost_speed_fwprop): Likewise.
189 (nds32_address_cost_size_prefer): Likewise.
190 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
191 * config/nds32/nds32.c (nds32_option_override): Use
192 nds32_init_rtx_costs function.
194 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
196 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
197 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
198 (TARGET_PIPELINE_N8): Likewise.
199 (TARGET_PIPELINE_N10): Likewise.
200 (TARGET_PIPELINE_N13): Likewise.
201 (TARGET_PIPELINE_GRAYWOLF): Likewise.
203 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
205 * config/nds32/nds32-fpu.md: Update copyright year.
207 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
209 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
211 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
213 * config/nds32/nds32.c
214 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
215 * config/nds32/nds32.opt (minline-asm-r15): New option.
217 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
219 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
221 * config/nds32/nds32.md (abssi2): New pattern.
223 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
225 * config/i386/i386.md (rex64namesuffix): New mode attribute.
226 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
227 Merge insn pattern from sse_cvtsi2ss<round_name> and
228 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
229 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
230 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
231 using SWI48 mode iterator.
232 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
233 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
234 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
235 pattern from sse_cvttss2si<round_saeonly_name>
236 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
237 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
238 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
239 using SWI48 mode iterator.
240 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
241 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
242 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
243 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
244 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
245 using SWI48 mode iterator.
246 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
247 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
248 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
249 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
250 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
252 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
253 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
254 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
255 pattern from sse_cvttsd2si<round_saeonly_name>
256 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
258 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
260 * config/nds32/nds32-md-auxiliary.c
261 (nds32_valid_smw_lwm_base_p): Refine.
262 (nds32_output_smw_single_word): Refine.
263 (nds32_output_smw_double_word): New.
264 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
266 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
268 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
269 (nds32_output_stack_pop): Refine.
270 (nds32_expand_unaligned_load): Refine.
271 (nds32_expand_unaligned_store): Refine.
273 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
274 Chung-Ju Wu <jasonwucj@gmail.com>
276 * config/nds32/constants.md: Add TP_REGNUM constant.
277 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
278 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
280 * config/nds32/nds32-doubleword.md: Consider flag_pic.
281 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
282 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
283 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
284 and PIC code generation.
285 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
287 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
289 * config/nds32/nds32.md: Support TLS and PIC.
290 * config/nds32/nds32.c: Support TLS and PIC.
291 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
292 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
295 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
297 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
300 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
301 Chung-Ju Wu <jasonwucj@gmail.com>
303 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
304 * config/nds32/nds32-md-auxiliary.c
305 (symbolic_reference_mentioned_p): New.
306 (nds32_legitimize_ict_address): New.
307 (nds32_expand_ict_move): New.
308 (nds32_indirect_call_referenced_p): New.
309 (nds32_symbol_binds_local_p): Delete.
310 (nds32_long_call_p): Modify.
311 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
312 * config/nds32/nds32-protos.h
313 (symbolic_reference_mentioned_p): Declare.
314 (nds32_legitimize_ict_address): Declare.
315 (nds32_expand_ict_move): Declare.
316 (nds32_indirect_call_referenced_p): Declare.
317 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
318 (nds32_relax_group): Use nds32_ict_const_p as condition.
319 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
320 (nds32_asm_file_start): Output ict_model directive in asm code.
321 (nds32_legitimate_address_p): Consider indirect call.
322 (nds32_print_operand): Consider indirect call.
323 (nds32_print_operand_address): Consider indirect call.
324 (nds32_insert_attributes): Handle "indirect_call" attribute.
325 (TARGET_LEGITIMATE_ADDRESS_P): Define.
326 (TARGET_LEGITIMATE_CONSTANT_P): Define.
327 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
328 (TARGET_DELEGITIMIZE_ADDRESS): Define.
329 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
330 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
331 (TARGET_ICT_MODEL_SMALL): Define.
332 (TARGET_ICT_MODEL_LARGE): Define.
333 * config/nds32/nds32.md (movsi): Consider ict model.
334 (call, call_value): Consider ict model.
335 (sibcall, sibcall_value): Consider ict model.
336 * config/nds32/nds32.opt (mict-model): New option.
337 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
340 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
341 Monk Chiang <sh.chiang04@gmail.com>
342 Jim Wilson <jimw@sifive.com>
344 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
345 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
346 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
347 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
348 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
349 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
350 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
351 compute save_libcall_adjustment properly.
352 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
353 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
354 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
355 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
356 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
357 (ABI_SPEC): Handle mabi=ilp32e.
358 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
360 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
361 <-march>: Add rv32e as an example.
363 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
366 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
367 (intra_create_variable_infos): Handle C++ constructors.
369 2018-05-18 Martin Liska <mliska@suse.cz>
371 * passes.def: Remove a redundant pass.
373 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
376 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
378 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
380 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
382 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
384 (armv2, armv2a, armv3, armv3m): Delete architectures.
385 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
386 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
387 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
389 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
390 (*mulsidi3adddi): Likewise.
391 (mulsidi3): Likewise.
392 (*mulsidi3_nov6): Likewise.
393 (umulsidi3): Likewise.
394 (umulsidi3_nov6): Likewise.
395 (umaddsidi4): Likewise.
396 (*umulsidi3adddi): Likewise.
397 (smulsi3_highpart): Likewise.
398 (*smulsi3_highpart_nov6): Likewise.
399 (umulsi3_highpart): Likewise.
400 (*umulsi3_highpart_nov6): Likewise.
401 * config/arm/arm.h (arm_arch3m): Delete.
402 * config/arm/arm.c (arm_arch3m): Delete.
403 (arm_option_override_internal): Update armv3-related comment.
404 (arm_configure_build_target): Delete use of isa_bit_mode32.
405 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
406 (arm_rtx_costs_internal): Delete check of arm_arch3m.
407 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
410 * config/arm/arm-protos.h (arm_arch3m): Delete.
411 * config/arm/arm-tables.opt: Regenerate.
412 * config/arm/arm-tune.md: Likewise.
413 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
414 deleted architectures.
416 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
418 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
419 (armv5t, armv5te): New features.
420 (ARMv5, ARMv5e): Delete fgroups.
421 (ARMv5t, ARMv5te): Adjust for above changes.
423 (armv5, armv5e): Delete arches.
424 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
426 (*call_reg_arm): Likewise.
427 (*call_value_reg_armv5): Likewise.
428 (*call_value_reg_arm): Likewise.
429 (*call_symbol): Likewise.
430 (*call_value_symbol): Likewise.
431 (*sibcall_insn): Likewise.
432 (*sibcall_value_insn): Likewise.
434 (prefetch): Likewise.
435 (define_split and define_peephole2 dependent on arm_arch5):
437 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
439 (TARGET_ARM_QBIT): Likewise.
440 (TARGET_DSP_MULTIPLY): Likewise.
441 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
442 (arm_arch5, arm_arch5e): Delete.
443 (arm_arch5t, arm_arch5te): Declare.
444 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
445 (arm_arch5t): Declare.
446 (arm_option_reconfigure_globals): Update for the above.
447 (arm_options_perform_arch_sanity_checks): Update comment, replace
448 use of arm_arch5 with arm_arch5t.
449 (use_return_insn): Likewise.
450 (arm_emit_call_insn): Likewise.
451 (output_return_instruction): Likewise.
452 (arm_final_prescan_insn): Likewise.
453 (arm_coproc_builtin_available): Likewise.
454 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
455 arm_arch5e with arm_arch5t and arm_arch5te.
456 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
457 (arm_arch5t, arm_arch5te): Declare.
458 * config/arm/arm-tables.opt: Regenerate.
459 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
460 * config/arm/t-multilib: Likewise.
461 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
462 instead of arm_arch5.
463 (*call_reg_thumb1): Likewise.
464 (*call_value_reg_thumb1_v5): Likewise.
465 (*call_value_reg_thumb1): Likewise.
466 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
468 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
470 2018-05-18 Martin Liska <mliska@suse.cz>
472 PR gcov-profile/84846
473 * doc/gcov.texi: Document -t option of gcov tool.
475 2018-05-18 Martin Liska <mliska@suse.cz>
477 PR gcov-profile/84846
478 * gcov.c (print_usage): Add new -t option.
479 (process_args): Handle the option.
480 (generate_results): Use stdout as output when requested by
483 2018-05-18 Martin Liska <mliska@suse.cz>
485 PR gcov-profile/84846
486 * coverage.c (coverage_init): Write PWD to .gcno file.
487 * doc/gcov.texi: Document how working directory is printed.
488 * gcov-dump.c (dump_gcov_file): Print PWD.
489 * gcov.c (output_intermediate_file): Likewise.
490 (read_graph_file): Read PWD string.
491 (output_lines): Print PWD.
493 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
496 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
497 for retval and return false if all args to phi are zero.
499 2018-05-18 Richard Biener <rguenther@suse.de>
501 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
503 (evrp_dom_walker::before_dom_children): Call it.
505 2018-05-18 Richard Biener <rguenther@suse.de>
507 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
508 results when processing array refs with variable index.
510 2018-05-18 Toon Moene <toon@moene.org>
512 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
513 directly after that of -floop-interchange. Indicate that both
514 options are enabled by default when specifying -O3.
516 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
518 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
519 iterator. Delete separate integer-mode vec_set<mode> expander.
520 (aarch64_simd_vec_setv2di): Delete.
521 (vec_setv2di): Delete.
522 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
523 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
524 the "w, r" alternative.
526 2018-05-18 Martin Liska <mliska@suse.cz>
528 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
529 * tree-pass.h (make_pass_lower_switch_O0): New function.
530 * tree-switch-conversion.c (node_has_low_bound): Remove.
531 (node_has_high_bound): Likewise.
532 (node_is_bounded): Likewise.
533 (class pass_lower_switch): Make it a template type and create
535 (pass_lower_switch::execute): Add template argument.
536 (make_pass_lower_switch): New function.
537 (make_pass_lower_switch_O0): New function.
538 (do_jump_if_equal): Remove.
539 (emit_case_nodes): Simplify to just handle all 3 cases and leave
540 all the hard work to tree optimization passes.
542 2018-05-18 Martin Liska <mliska@suse.cz>
544 * dbgcnt.c (limit_low): Renamed from limit.
545 (limit_high): New variable.
546 (dbg_cnt_is_enabled): Check for upper limit.
547 (dbg_cnt): Adjust dumping.
548 (dbg_cnt_set_limit_by_index): Add new argument for high
550 (dbg_cnt_set_limit_by_name): Likewise.
551 (dbg_cnt_process_single_pair): Parse new format.
552 (dbg_cnt_process_opt): Use strtok.
553 (dbg_cnt_list_all_counters): Remove 'value' and add
555 * doc/invoke.texi: Document changes.
557 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
559 * doc/sourcebuild.texi (scalar_all_fma): Document.
560 * tree.def (FMA_EXPR): Delete.
561 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
562 * internal-fn.c (ternary_direct): New macro.
563 (expand_ternary_optab_fn): Likewise.
564 (direct_ternary_optab_supported_p): Likewise.
565 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
566 * builtins.c (fold_builtin_fma): Delete.
567 (fold_builtin_3): Don't call it.
568 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
569 * expr.c (expand_expr_real_2): Likewise.
570 * fold-const.c (operand_equal_p): Likewise.
571 (fold_ternary_loc): Likewise.
572 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
573 * gimple.c (DEFTREECODE): Likewise.
574 * gimplify.c (gimplify_expr): Likewise.
575 * optabs-tree.c (optab_for_tree_code): Likewise.
576 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
577 * tree-eh.c (operation_could_trap_p): Likewise.
578 (stmt_could_throw_1_p): Likewise.
579 * tree-inline.c (estimate_operator_cost): Likewise.
580 * tree-pretty-print.c (dump_generic_node): Likewise.
581 (op_code_prio): Likewise.
582 * tree-ssa-loop-im.c (stmt_cost): Likewise.
583 * tree-ssa-operands.c (get_expr_operands): Likewise.
584 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
585 * fold-const-call.h (fold_fma): Delete.
586 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
587 CFN_FNMA and CFN_FNMS.
589 * genmatch.c (combined_fn): New enum.
590 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
591 (commutative_op): New function.
592 (commutate): Use it. Handle more than 2 operands.
593 (dt_operand::gen_gimple_expr): Use commutative_op.
594 (parser::parse_expr): Allow :c to be used with non-binary
595 operators if the commutative operand is known.
596 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
597 CFN_FMS, CFN_FNMA and CFN_FNMS.
598 (backprop::process_assign_use): Remove FMA_EXPR handling.
599 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
600 (gen_hsa_fma): New function.
601 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
602 IFN_FNMA and IFN_FNMS.
603 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
604 * gimple-fold.h (follow_all_ssa_edges): Declare.
605 * gimple-fold.c (follow_all_ssa_edges): New function.
606 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
607 gimple_build interface and use follow_all_ssa_edges to fold the result.
608 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
609 instead of checking for optabs directly.
610 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
611 rather than FMA_EXPRs.
612 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
613 call to IFN_FMA instead of an FMA_EXPR.
615 2018-05-17 Jim Wilson <jimw@sifive.com>
617 * expr.c (do_tablejump): When converting index to Pmode, if we have a
618 sign extended promoted subreg, and the range does not have the sign bit
619 set, then do a sign extend.
621 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
622 test, check for sign extended subreg and/or constant operands, and
623 do a sign extend in that case.
625 2018-05-17 Steve Ellcey <sellcey@cavium.com>
627 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
628 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
630 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
631 Change logics_shift_reg to logics_shift_imm.
632 (thunderx2t99_fp_loadpair_basic): Delete.
633 (thunderx2t99_fp_storepair_basic): Delete.
634 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
635 (thunderx2t99_asimd_polynomial): Delete.
636 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
637 and neon_fp_mul_d_scalar_q.
638 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
639 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
640 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
641 (thunderx2t99_asimd_lut): Add missing tbl types.
642 (thunderx2t99_asimd_ext): Delete.
643 (thunderx2t99_asimd_load1_1_mult): Delete.
644 (thunderx2t99_asimd_load1_2_mult): Delete.
645 (thunderx2t99_asimd_load1_ldp): New.
646 (thunderx2t99_asimd_load1): New.
647 (thunderx2t99_asimd_load2): Add missing *load2* types.
648 (thunderx2t99_asimd_load3): New.
649 (thunderx2t99_asimd_load4): New.
650 (thunderx2t99_asimd_store1_1_mult): Delete.
651 (thunderx2t99_asimd_store1_2_mult): Delete.
652 (thunderx2t99_asimd_store2_mult): Delete.
653 (thunderx2t99_asimd_store2_onelane): Delete.
654 (thunderx2t99_asimd_store_stp): New.
655 (thunderx2t99_asimd_store1): New.
656 (thunderx2t99_asimd_store2): New.
657 (thunderx2t99_asimd_store3): New.
658 (thunderx2t99_asimd_store4): New.
660 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
662 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
663 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
665 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
666 Segher Boessenkool <segher@kernel.crashing.org>
669 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
672 2018-05-17 Richard Biener <rguenther@suse.de>
674 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
675 for pruning loop and prune defs feeding only already visited PHIs.
677 2018-05-17 Richard Biener <rguenther@suse.de>
679 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
681 2018-05-17 Bin Cheng <bin.cheng@arm.com>
682 Richard Biener <rguenther@suse.de>
684 PR tree-optimization/85793
685 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
686 for VMAT_ELEMENTWISE.
688 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
690 * internal-fn.h (lookup_internal_fn): Declare
691 * internal-fn.c (lookup_internal_fn): New function.
692 * gimple.c (gimple_build_call_from_tree): Handle calls to
694 * gimple-pretty-print.c (dump_gimple_call): Print "." before
695 internal function names.
696 * tree-pretty-print.c (dump_generic_node): Likewise.
697 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
699 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
701 * gimple-fold.h (gimple_build): Make the function forms take
702 combined_fn rather than built_in_function.
703 (gimple_simplify): Likewise.
704 * gimple-match-head.c (gimple_simplify): Likewise.
705 * gimple-fold.c (gimple_build): Likewise.
706 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
707 rather than gimple_build_call_internal.
708 (get_initial_defs_for_reduction): Likewise.
709 (vect_create_epilog_for_reduction): Likewise.
710 (vectorizable_live_operation): Likewise.
712 2018-05-17 Martin Liska <mliska@suse.cz>
714 * gimple-ssa-sprintf.c (format_directive): Do not use
715 space in between 'G_' and '('.
717 2018-05-17 Jakub Jelinek <jakub@redhat.com>
720 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
721 even if the mask is not all ones.
724 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
726 (ix86_gimple_fold_builtin): Likewise.
729 * config/i386/i386.c: Include tree-vector-builder.h.
730 (ix86_vector_shift_count): New function.
731 (ix86_fold_builtin): Fold shift builtins by scalar count.
732 (ix86_gimple_fold_builtin): Likewise.
734 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
735 _mm512_setzero): New intrinsics.
737 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
738 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
740 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
741 code generation for cases where splatting a value is not useful.
742 * simplify-rtx.c (simplify_ternary_operation): Simplify
743 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
744 mode to a vec_concat.
746 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
748 * config.gcc: Support "goldmont-plus".
749 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
751 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
752 PROCESSOR_GOLDMONT_PLUS.
753 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
754 (processor_target_table): Add "goldmont-plus".
755 (PTA_GOLDMONT_PLUS): Define.
756 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
757 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
758 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
759 (fold_builtin_cpu): Add "goldmont-plus".
760 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
761 (ix86_option_override_internal): Add "goldmont-plus".
762 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
763 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
764 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
765 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
767 2018-05-17 Richard Biener <rguenther@suse.de>
769 PR tree-optimization/85757
770 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
771 remove defs that only feed that PHI from further processing.
773 2018-05-16 Jim Wilson <jimw@sifive.com>
775 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
777 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
779 2018-05-16 Mark Wielaard <mark@klomp.org>
781 * dwarf2out.c (count_index_strings): New function.
782 (output_indirect_strings): Call count_index_strings and generate
783 header for dwarf_version >= 5.
785 2018-05-16 Mark Wielaard <mark@klomp.org>
787 * dwarf2out.c (dwarf_FORM): New function.
788 (set_indirect_string): Use dwarf_FORM.
789 (reset_indirect_string): Likewise.
790 (size_of_die): Likewise.
791 (value_format): Likewise.
792 (output_die): Likewise.
793 (add_skeleton_AT_string): Likewise.
794 (output_macinfo_op): Likewise.
795 (index_string): Likewise.
796 (output_index_string_offset): Likewise.
797 (output_index_string): Likewise.
798 (count_index_strings): Likewise.
800 2018-05-16 Carl Love <cel@us.ibm.com>
802 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
803 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
805 2018-05-16 Martin Jambor <mjambor@suse.cz>
807 * ipa-prop.c (ipa_free_all_edge_args): Remove.
808 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
810 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
812 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
813 (fnma<mode>4): Likewise.
814 (fms<mode>4): Likewise.
815 (fnms<mode>4): Likewise.
816 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
817 (aarch64_fnma<mode>4): Likewise.
818 (aarch64_fms<mode>4): Likewise.
819 (aarch64_fnms<mode>4): Likewise.
820 (aarch64_fnmadd<mode>4): Likewise.
822 2018-05-16 Jason Merrill <jason@redhat.com>
824 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
826 2018-05-16 Richard Biener <rguenther@suse.de>
828 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
829 (dump_stmt_cost): Declare.
830 (add_stmt_cost): Dump cost we add.
831 (add_stmt_costs): New function.
832 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
834 (vect_analyze_stmt): Adjust prototype.
835 (vectorizable_condition): Likewise.
836 (vectorizable_live_operation): Likewise.
837 (vectorizable_reduction): Likewise.
838 (vectorizable_induction): Likewise.
839 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
840 cost vector to pass to vectorizable_ and record afterwards.
841 (vect_model_reduction_cost): Take cost vector argument and adjust.
842 (vect_model_induction_cost): Likewise.
843 (vectorizable_reduction): Likewise.
844 (vectorizable_induction): Likewise.
845 (vectorizable_live_operation): Likewise.
846 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
847 SLP_TREE_NUMBER_OF_VEC_STMTS.
848 (vect_analyze_slp_cost_1): Remove.
849 (vect_analyze_slp_cost): Likewise.
850 (vect_slp_analyze_node_operations): Take visited args and
851 a target cost vector. Avoid processing already visited stmt sets.
852 (vect_slp_analyze_operations): Use a local cost vector to gather
853 costs and register those of non-discarded instances.
854 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
855 (vect_schedule_slp_instance): Remove copying of
856 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
858 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
859 adding cost. Record cost entry location.
860 (vect_prologue_cost_for_slp_op): Function to compute cost of
861 a constant or invariant generated for SLP vect in the prologue,
862 split out from vect_analyze_slp_cost_1.
863 (vect_model_simple_cost): Make static. Adjust for SLP costing.
864 (vect_model_promotion_demotion_cost): Likewise.
865 (vect_model_store_cost): Likewise, make static.
866 (vect_model_load_cost): Likewise.
867 (vectorizable_bswap): Add cost vector arg and adjust.
868 (vectorizable_call): Likewise.
869 (vectorizable_simd_clone_call): Likewise.
870 (vectorizable_conversion): Likewise.
871 (vectorizable_assignment): Likewise.
872 (vectorizable_shift): Likewise.
873 (vectorizable_operation): Likewise.
874 (vectorizable_store): Likewise.
875 (vectorizable_load): Likewise.
876 (vectorizable_condition): Likewise.
877 (vectorizable_comparison): Likewise.
878 (can_vectorize_live_stmts): Likewise.
879 (vect_analyze_stmt): Likewise.
880 (vect_transform_stmt): Adjust calls to vectorizable_*.
881 * tree-vectorizer.c: Include gimple-pretty-print.h.
882 (dump_stmt_cost): New function.
884 2018-05-16 Richard Biener <rguenther@suse.de>
886 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
887 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
888 * tree-ssa-dse.c: Include tree-ssa-loop.h.
889 (check_name): New callback.
890 (dse_classify_store): Track cycles via a visited bitmap of PHI
891 defs and simplify handling of in-loop and across loop dead stores
892 and properly fail for loop-variant refs. Handle byte-tracking with
893 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
896 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
898 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
899 (vect_get_mask_type_for_stmt): Likewise.
900 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
902 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
903 to determine the statement's vector type and the vector type that
904 should be used for calculating nunits. Deal with cases in which
905 the type has to be deferred.
906 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
907 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
908 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
909 (vect_determine_vf_for_stmt): New functions, split out from...
910 (vect_determine_vectorization_factor): ...here.
911 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
912 (vect_get_mask_type_for_stmt): New functions, split out from
913 vect_determine_vectorization_factor.
915 2018-05-16 Richard Biener <rguenther@suse.de>
917 * tree-cfg.c (verify_gimple_assign_ternary): Properly
918 verify the [VEC_]COND_EXPR embedded comparison.
920 2018-05-15 Martin Sebor <msebor@redhat.com>
922 PR tree-optimization/85753
923 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
924 RECORD_TYPE in addition to ARRAY_TYPE.
926 2018-05-15 Martin Sebor <msebor@redhat.com>
929 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
931 2018-05-15 Richard Biener <rguenther@suse.de>
933 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
934 add by_clobber_p one. Change algorithm to collect all defs
935 representing uses we need to walk and try reducing them to
936 a single one before failing.
937 (dse_dom_walker::dse_optimize_stmt): Adjust.
939 2018-05-13 Mark Wielaard <mark@klomp.org>
941 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
942 (size_of_loc_descr): Likewise.
943 (output_loc_operands): Likewise.
944 (output_loc_operands_raw): Likewise.
945 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
946 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
947 (hash_loc_operands): Likewise.
948 (compare_loc_operands): Likewise.
950 2018-05-14 Mark Wielaard <mark@klomp.org>
952 * dwarf2out.c (count_index_addrs): New function.
953 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
955 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
957 PR tree-optimization/83648
958 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
959 return value as malloc candidate.
961 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
964 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
965 as true in call to suggest_attribute.
967 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
969 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
972 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
974 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
976 (aarch64_crypto_aesd_fused): Likewise.
978 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
980 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
981 (movsi_aarch64): Likewise.
982 (load_pairsi): Likewise.
983 (load_pairdi): Likewise.
984 (store_pairsi): Likewise.
985 (store_pairdi): Likewise.
986 (load_pairsf): Likewise.
987 (load_pairdf): Likewise.
988 (store_pairsf): Likewise.
989 (store_pairdf): Likewise.
990 (zero_extend): Likewise.
991 (trunc): Swap alternatives.
992 (fcvt_target): Add '?' to prefer w over r.
994 2018-05-14 Jakub Jelinek <jakub@redhat.com>
997 * config/i386/i386.md: Disallow non-commutative arithmetics in
998 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
999 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
1000 in the peephole2 before it.
1002 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
1004 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1005 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1006 (ix86_handle_option): Handle -mcldemote.
1007 * config.gcc: New header.
1008 * config/i386/cldemoteintrin.h: New file.
1009 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1010 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1012 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1013 OPTION_MASK_ISA_CLDEMOTE.
1014 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1015 (ix86_valid_target_attribute_inner_p): Ditto.
1016 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1017 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1018 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1019 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1020 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1022 * config/i386/i386.opt: Add -mcldemote.
1023 * config/i386/x86intrin.h: New header.
1024 * doc/invoke.texi: Add -mcldemote.
1026 2018-05-14 Richard Biener <rguenther@suse.de>
1028 * doc/match-and-simplify.texi: Adjust :s documentation.
1030 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
1032 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1033 intended memcpy size.
1034 (REORDER_45): Likewise.
1036 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
1038 * sort.cc: New file.
1039 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1040 * vec.c (qsort_chk): Use gcc_qsort.
1041 * Makefile.in (OBJS-libcommon): Add sort.o.
1042 (build/sort.o): New target. Use it...
1043 (BUILD_RTL): ... here, and...
1044 (build/gencfn-macros): ... here, and...
1045 (build/genmatch): ... here.
1047 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
1048 Chung-Ju Wu <jasonwucj@gmail.com>
1050 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1051 * config/nds32/nds32-graywolf.md: New file.
1052 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1053 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1055 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1056 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1057 * config/nds32/nds32.md (pipeline_model): Add graywolf.
1058 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1059 * config/nds32/pipelines.md: Include n15 settings.
1061 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
1062 Chung-Ju Wu <jasonwucj@gmail.com>
1064 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1065 * config/nds32/nds32-n13.md: New file.
1066 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1067 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1069 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1070 * config/nds32/nds32.md (pipeline_model): Add n13.
1071 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1072 * config/nds32/pipelines.md: Include n13 settings.
1074 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
1075 Chung-Ju Wu <jasonwucj@gmail.com>
1077 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1078 * config/nds32/nds32-n10.md: New file.
1079 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1080 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1082 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1083 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1084 * config/nds32/nds32.md (pipeline_model): Add n10.
1085 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1086 * config/nds32/pipelines.md: Include n10 settings.
1088 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
1089 Kito Cheng <kito.cheng@gmail.com>
1090 Chung-Ju Wu <jasonwucj@gmail.com>
1092 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1093 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1094 Add enum values for DSP extension instructions.
1095 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1097 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1098 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1100 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1101 * config/nds32/nds32-dspext.md: New file for DSP implementation.
1102 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1103 * config/nds32/nds32-intrinsic.md: Likewise.
1104 * config/nds32/nds32_intrinsic.h: Likewise.
1105 * config/nds32/nds32-md-auxiliary.c: Likewise.
1106 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1107 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1108 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1109 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1110 * config/nds32/nds32-protos.h: New declarations for DSP extension.
1111 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1112 TYPE_DMAC in switch statement.
1113 * config/nds32/nds32.c: New checking and implementation for DSP
1114 extension instructions.
1115 * config/nds32/nds32.h: Likewise.
1116 * config/nds32/nds32.md: Likewise.
1117 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1118 * config/nds32/predicates.md: Implement new predicates for DSP
1121 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1123 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1124 Reformat alternatives and attributes so it is easier to identify
1125 which constraints/attributes go with which instruction.
1126 (mov<mode>_hardfloat32, FMOVE64): Likewise.
1127 (mov<mode>_softfloat32, FMOVE64): Likewise.
1128 (mov<mode>_hardfloat64, FMOVE64): Likewise.
1129 (mov<mode>_softfloat64, FMOVE64): Likewise.
1131 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
1133 * doc/extend.texi (PowerPC Built-in Functions): Rename this
1135 (Basic PowerPC Built-in Functions): The new name of the
1136 subsection previously known as "PowerPC Built-in Functions".
1137 (Basic PowerPC Built-in Functions Available on all Configurations):
1139 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1140 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1141 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1142 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1144 2018-05-11 Martin Jambor <mjambor@suse.cz>
1147 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1150 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
1153 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1155 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
1157 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1158 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1159 (ix86_handle_option): Handle -mwaitpkg.
1160 * config.gcc: New header.
1161 * config/i386/cpuid.h (bit_WAITPKG): New bit.
1162 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1163 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1165 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1166 OPTION_MASK_ISA_WAITPKG.
1167 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1168 (ix86_option_override_internal): Add PTA_WAITPKG.
1169 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1170 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1171 IX86_BUILTIN_TPAUSE.
1172 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1173 __builtin_ia32_umwait and __builtin_ia32_tpause.
1174 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1175 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1176 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1177 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1178 UNSPECV_TPAUSE): New.
1179 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1180 * config/i386/i386.opt: Add -mwaitpkg.
1181 * config/i386/waitpkgintrin.h: New file.
1182 * config/i386/x86intrin.h: New header.
1183 * doc/invoke.texi: Add -mwaitpkg.
1185 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
1188 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1190 (cortex-m0): Use armv6s-m isa.
1191 (cortex-m0plus): Likewise.
1192 (cortex-m1): Likewise.
1193 (cortex-m0.small-multiply): Likewise.
1194 (cortex-m0plus.small-multiply): Likewise.
1195 (cortex-m1.small-multiply): Likewise.
1197 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
1198 Jakub Jelinek <jakub@redhat.com>
1200 PR tree-optimization/85692
1201 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1202 source permute as well.
1204 2018-05-11 Martin Liska <mliska@suse.cz>
1207 * doc/extend.texi: Document LLVM style format for no_sanitize
1210 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
1212 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1213 mode_supports_vsx_dform_quad to mode_supports_dq_form.
1214 (mode_supports_vsx_dform_quad): Likewise.
1215 (mode_supports_vmx_dform): Move these functions to be next to the
1216 other mode_supports functions.
1217 (mode_supports_dq_form): Likewise.
1218 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1219 mode_supports_dq_form.
1220 (reg_offset_addressing_ok_p): Likewise.
1221 (offsettable_ok_by_alignment): Likewise.
1222 (rs6000_legitimate_offset_address_p): Likewise.
1223 (legitimate_lo_sum_address_p): Likewise.
1224 (rs6000_legitimize_address): Likewise.
1225 (rs6000_legitimize_reload_address): Likewise.
1226 (rs6000_secondary_reload_inner): Likewise.
1227 (rs6000_preferred_reload_class): Likewise.
1228 (rs6000_output_move_128bit): Likewise.
1230 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
1232 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1233 Generate SImode target register for null target.
1234 <case IX86_BUILTIN_XGETBV>: Ditto.
1235 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1236 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1238 2018-05-10 Carl Love <cel@us.ibm.com>
1240 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1241 dcbtt and dcbtstt if operands[2] is 0.
1243 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
1246 * config/i386/sse.md (usadv64qi): New expander.
1248 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
1250 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1251 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1252 -maltivec=be support.
1253 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1254 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1255 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1256 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1257 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1258 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1259 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1260 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1261 altivec_vsumsws): Adjust.
1262 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1263 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1264 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1266 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1267 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1268 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1269 (altivec_lve<VI_char>x): Delete expand.
1270 (*altivec_lve<VI_char>x_internal): Rename to...
1271 (altivec_lve<VI_char>x): ... this.
1272 (altivec_lvxl_<mode>): Delete expand.
1273 (*altivec_lvxl_<mode>_internal): Rename to ...
1274 (altivec_lvxl_<mode>): ... this.
1275 (altivec_stvxl_<mode>): Delete expand.
1276 (*altivec_stvxl_<mode>_internal): Rename to ...
1277 (altivec_stvxl_<mode>): ... this.
1278 (altivec_stve<VI_char>x): Delete expand.
1279 (*altivec_stve<VI_char>x_internal): Rename to ...
1280 (altivec_stve<VI_char>x): ... this.
1281 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1282 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1283 reduc_plus_scal_<mode>): Adjust.
1284 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1286 (rs6000_cpu_cpp_builtins): Adjust.
1287 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1288 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1289 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1290 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1291 -maltivec=be support.
1292 (rs6000_split_vec_extract_var): Adjust.
1293 (rs6000_split_v4si_init): Adjust.
1294 (swap_selector_for_mode): Delete.
1295 (altivec_expand_lvx_be, altivec_expand_stvx_be,
1296 altivec_expand_stvex_be): Delete.
1297 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1298 -maltivec=be support.
1299 (rs6000_gimple_fold_builtin): Ditto.
1300 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1302 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1303 (TARGET_DIRECT_MOVE_64BIT): Adjust.
1304 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1305 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1306 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1307 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1308 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1309 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1310 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1311 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1312 anonymous split): Adjust.
1313 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1314 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1316 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1318 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1319 when --with-gxx-include-dir is also specified.
1320 * configure: Regenerate.
1322 2018-05-09 Jim Wilson <jimw@sifive.com>
1325 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1326 * config/riscv/t-withmultilib: New.
1327 * config/riscv/withmultilib.h: New.
1328 * doc/install.texi: Document RISC-V --with-multilib-list support.
1330 2018-05-09 Richard Biener <rguenther@suse.de>
1332 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1334 (vect_bb_vectorization_profitable_p): Adjust. Compute
1335 actual scalar cost using the cost vector and the add_stmt_cost
1338 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1340 PR rtl-optimization/85645
1341 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1342 in the REG_CFA_REGISTER note for LR, don't leave it empty.
1344 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1346 PR rtl-optimization/85645
1347 * shrink-wrap.c (spread_components): Return a boolean saying if
1348 anything was changed.
1349 (try_shrink_wrapping_separate): Iterate spread_components until
1350 nothing changes anymore.
1352 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1354 PR rtl-optimization/85645
1355 * regrename.c (build_def_use): Also kill the chains that include the
1356 destination of a REG_CFA_REGISTER note.
1358 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
1360 PR rtl-optimization/85645
1361 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
1362 insn that has a REG_CFA_REGISTER note.
1364 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
1366 * cfgexpand.c (expand_clobber): New function.
1367 (expand_gimple_stmt_1): Use it.
1368 * tree-vect-stmts.c (vect_clobber_variable): New function,
1370 (vectorizable_simd_clone_call): ...here.
1371 (vectorizable_store): Emit a clobber either side of an
1372 IFN_STORE_LANES sequence.
1373 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
1375 2018-05-09 Tom de Vries <tom@codesourcery.com>
1378 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
1379 (define_insn "trap_if_false"): Add exit after trap.
1381 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
1383 PR rtl-optimization/85638
1384 * bb-reorder.c: Include common/common-target.h.
1385 (create_forwarder_block): New function extracted from...
1386 (fix_up_crossing_landing_pad): ...here. Rename into...
1387 (dw2_fix_up_crossing_landing_pad): ...this.
1388 (sjlj_fix_up_crossing_landing_pad): New function.
1389 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
1390 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
1391 from both partitions and exit the loop after one iteration.
1393 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
1396 * doc/extend.texi (PowerPC Built-in Functions): Rename this
1398 (Basic PowerPC Built-in Functions): The new name of the
1399 subsection previously known as "PowerPC Built-in Functions".
1400 (Basic PowerPC Built-in Functions Available on all Configurations):
1402 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1404 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1406 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1408 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1411 2018-05-08 Jim Wilson <jimw@sifive.com>
1413 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
1414 (LD_EMUL_SUFFIX): New.
1415 (LINK_SPEC): Use it.
1417 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
1419 * doc/extend.texi (PowerPC Built-in Functions): Rename this
1421 (Basic PowerPC Built-in Functions): The new name of the
1422 subsection previously known as "PowerPC Built-in Functions".
1423 (Basic PowerPC Built-in Functions Available on all Configurations):
1425 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1427 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1429 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1431 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1434 2018-05-08 Jakub Jelinek <jakub@redhat.com>
1437 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
1438 after cmpelim optimization.
1440 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
1442 * config.gcc: Support "goldmont".
1443 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
1444 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1446 * config/i386/i386.c (m_GOLDMONT): Define.
1447 (processor_target_table): Add "goldmont".
1448 (PTA_GOLDMONT): Define.
1449 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
1450 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
1451 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
1452 (fold_builtin_cpu): Add "goldmont".
1453 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
1454 (ix86_option_override_internal): Add "goldmont".
1455 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
1456 (processor_type): Add PROCESSOR_GOLDMONT.
1457 * config/i386/i386.md: Add CPU "glm".
1458 * config/i386/glm.md: New file.
1459 * config/i386/x86-tune.def: Add m_GOLDMONT.
1460 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
1462 2018-05-08 Jakub Jelinek <jakub@redhat.com>
1465 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
1467 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
1468 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
1469 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
1472 * config/i386/i386.c (ix86_fold_builtin): Handle
1473 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
1476 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
1477 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
1479 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
1482 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
1483 (check_arch): Likewise.
1484 (check_fpu): Return the result rather than printing it.
1485 (end arch): Fix operator precedence.
1486 (end cpu): Likewise.
1487 (END): Print the result from check_fpu.
1489 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1490 Alan Hayward <alan.hayward@arm.com>
1491 David Sherwood <david.sherwood@arm.com>
1493 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
1494 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
1495 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
1496 (*fcmuo<mode>_and): New patterns.
1498 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1500 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
1501 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
1502 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
1503 (cmp_op, sve_imm_con): New code attributes.
1504 (SVE_COND_INT_CMP, imm_con): Delete.
1505 (cmp_op): Remove above unspecs from int attribute.
1506 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
1508 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
1509 comparison-specific unspecs.
1510 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
1511 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
1512 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
1513 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
1514 (*vec_fcm<cmp_op><mode>): Rename to...
1515 (*fcm<cmp_op><mode>): ...this and adjust likewise.
1516 (*vec_fcmuo<mode>): Rename to...
1517 (*fcmuo<mode>): ...this and adjust likewise.
1518 (*pred_fcm<cmp_op><mode>): New pattern.
1519 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1520 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1522 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1524 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1525 (aarch64_emit_sve_predicated_cond): New function.
1526 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1527 (aarch64_emit_unspec_cond_or): Replace with...
1528 (aarch64_emit_sve_or_conds): ...this new function. Use
1529 aarch64_emit_sve_ptrue_op for the individual comparisons and
1530 aarch64_emit_binop to OR them together.
1531 (aarch64_emit_inverted_unspec_cond): Replace with...
1532 (aarch64_emit_sve_inverted_cond): ...this new function. Use
1533 aarch64_emit_sve_ptrue_op for the comparison and
1534 aarch64_emit_unop to invert the result.
1535 (aarch64_expand_sve_vec_cmp_float): Update after the above
1536 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
1538 2018-05-07 Nathan Sidwell <nathan@acm.org>
1540 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1541 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1542 (Backwards Compatibility): Likewise.
1544 2018-05-07 Luis Machado <luis.machado@linaro.org>
1548 2018-05-07 Luis Machado <luis.machado@linaro.org>
1550 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1551 <prefetch_dynamic_strides>: New const bool field.
1552 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1553 prefetch_dynamic_strides.
1554 (exynosm1_prefetch_tune): Likewise.
1555 (thunderxt88_prefetch_tune): Likewise.
1556 (thunderx_prefetch_tune): Likewise.
1557 (thunderx2t99_prefetch_tune): Likewise.
1558 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1559 (aarch64_override_options_internal): Update to set
1560 PARAM_PREFETCH_DYNAMIC_STRIDES.
1561 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1562 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1563 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1564 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1565 prefetch-dynamic-strides setting.
1567 2018-05-07 Luis Machado <luis.machado@linaro.org>
1569 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1570 <minimum_stride>: New const int field.
1571 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1572 minimum_stride field.
1573 (exynosm1_prefetch_tune): Likewise.
1574 (thunderxt88_prefetch_tune): Likewise.
1575 (thunderx_prefetch_tune): Likewise.
1576 (thunderx2t99_prefetch_tune): Likewise.
1577 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1578 (aarch64_override_options_internal): Update to set
1579 PARAM_PREFETCH_MINIMUM_STRIDE.
1580 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1581 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1582 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1583 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1584 stride is constant and is below the minimum stride threshold.
1586 2018-05-07 Luis Machado <luis.machado@linaro.org>
1588 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
1591 2018-05-07 Luis Machado <luis.machado@linaro.org>
1593 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1594 <prefetch_dynamic_strides>: New const bool field.
1595 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1596 prefetch_dynamic_strides.
1597 (exynosm1_prefetch_tune): Likewise.
1598 (thunderxt88_prefetch_tune): Likewise.
1599 (thunderx_prefetch_tune): Likewise.
1600 (thunderx2t99_prefetch_tune): Likewise.
1601 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1602 (aarch64_override_options_internal): Update to set
1603 PARAM_PREFETCH_DYNAMIC_STRIDES.
1604 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1605 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1606 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1607 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1608 prefetch-dynamic-strides setting.
1610 2018-05-07 Luis Machado <luis.machado@linaro.org>
1612 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1613 <minimum_stride>: New const int field.
1614 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1615 minimum_stride field.
1616 (exynosm1_prefetch_tune): Likewise.
1617 (thunderxt88_prefetch_tune): Likewise.
1618 (thunderx_prefetch_tune): Likewise.
1619 (thunderx2t99_prefetch_tune): Likewise.
1620 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1621 (aarch64_override_options_internal): Update to set
1622 PARAM_PREFETCH_MINIMUM_STRIDE.
1623 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1624 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1625 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1626 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1627 stride is constant and is below the minimum stride threshold.
1629 2018-05-06 Jakub Jelinek <jakub@redhat.com>
1632 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
1633 the type is addressable. Don't force op into register if it has
1636 2018-05-05 Roland McGrath <mcgrathr@google.com>
1639 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
1640 any section for which we don't know a specific type it should have,
1641 regardless of name. Previously this was done only for the exact
1642 names ".init_array", ".fini_array", and ".preinit_array".
1643 (default_elf_asm_named_section): Add comment about
1644 relationship with default_section_type_flags and SECTION_NOTYPE.
1645 (get_section): Don't consider it a type conflict if one side has
1646 SECTION_NOTYPE and the other doesn't, as long as neither has the
1647 SECTION_BSS et al used in the default_section_type_flags logic.
1649 2018-05-05 Tom de Vries <tom@codesourcery.com>
1652 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
1653 (workaround_barsyncs): New function.
1654 (nvptx_reorg): Use workaround_barsyncs.
1655 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
1656 (define_expand "nvptx_membar_cta"): New define_expand.
1657 (define_insn "*nvptx_membar_cta"): New insn.
1659 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
1661 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
1662 To improve optimization opportunities.
1663 * builtin-types.def: The new needed builtin types for the above.
1665 2018-05-04 Richard Biener <rguenther@suse.de>
1667 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
1668 * gimple-ssa-store-merging.c
1669 (imm_store_chain_info::output_merged_store): Remove redundant create,
1670 release split_store vector contents on failure.
1671 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
1672 scalar stmt vector on cache hit.
1674 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
1676 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
1678 * config.gcc (powerpc-xilinx-eabi*): Remove.
1679 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
1681 (fusion_addis_mem_combo_load): Ditto.
1682 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
1684 (rs6000_cpu_cpp_builtins): Ditto.
1685 * config/rs6000/rs6000-linux.c
1686 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
1687 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
1688 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
1690 (rs6000_setup_reg_addr_masks): Ditto.
1691 (rs6000_init_hard_regno_mode_ok): Ditto.
1692 (rs6000_option_override_internal): Ditto.
1693 (legitimate_lo_sum_address_p): Ditto.
1694 (rs6000_legitimize_address): Ditto.
1695 (rs6000_legitimize_reload_address): Ditto.
1696 (rs6000_legitimate_address_p): Ditto.
1697 (abi_v4_pass_in_fpr): Ditto.
1698 (setup_incoming_varargs): Ditto.
1699 (rs6000_gimplify_va_arg): Ditto.
1700 (rs6000_split_multireg_move): Ditto.
1701 (rs6000_savres_strategy): Ditto.
1702 (rs6000_emit_prologue_components): Ditto.
1703 (rs6000_emit_epilogue_components): Ditto.
1704 (rs6000_emit_prologue): Ditto.
1705 (rs6000_emit_epilogue): Ditto.
1706 (rs6000_elf_file_end): Ditto.
1707 (rs6000_function_value): Ditto.
1708 (rs6000_libcall_value): Ditto.
1709 * config/rs6000/rs6000.h: Ditto.
1710 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
1711 (TARGET_MINMAX): ... this. New.
1712 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
1713 * config/rs6000/rs6000.md: Remove Xilinx FP support.
1714 (*movsi_internal1_single): Delete.
1715 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
1716 mfpu=, mxilinx-fpu): Delete.
1717 * config/rs6000/singlefp.h: Delete.
1718 * config/rs6000/sysv4.h: Remove Xilinx FP support.
1719 * config/rs6000/t-rs6000: Ditto.
1720 * config/rs6000/t-xilinx: Delete.
1721 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
1722 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
1723 (VStype_simple): Delete.
1724 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
1725 * config/rs6000/xfpu.h: Delete.
1726 * config/rs6000/xfpu.md: Delete.
1727 * config/rs6000/xilinx.h: Delete.
1728 * config/rs6000/xilinx.opt: Delete.
1729 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
1730 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
1732 2018-05-04 Tom de Vries <tom@codesourcery.com>
1735 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
1738 2018-05-04 Richard Biener <rguenther@suse.de>
1741 * tree-complex.c (update_complex_assignment): We are always in SSA form.
1742 (expand_complex_div_wide): Likewise.
1743 (expand_complex_operations_1): Likewise.
1744 (expand_complex_libcall): Preserve EH info of the original stmt.
1745 (tree_lower_complex): Handle removed blocks.
1746 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
1747 on complex multiplication and division libcall builtins.
1749 2018-05-04 Richard Biener <rguenther@suse.de>
1752 * fold-const.c (negate_expr_p): Restrict negation of operand
1753 zero of a division to when we know that can happen without
1755 (fold_negate_expr_1): Likewise.
1757 2018-05-04 Jakub Jelinek <jakub@redhat.com>
1760 * real.h (real_nextafter): Declare.
1761 * real.c (real_nextafter): New function.
1762 * fold-const-call.c (fold_const_nextafter): New function.
1763 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
1764 CASE_CFN_NEXTTOWARD.
1765 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
1766 even when arg1_mode is different from arg0_mode.
1768 2018-05-03 Nathan Sidwell <nathan@acm.org>
1770 * doc/extend.texi (Deprecated Features): Remove
1772 (Backwards Compatibility): Likewise.
1773 * doc/invoke.texi (C++ Language Options): Likewise.
1774 (C++ Dialect Options): Likewise.
1776 2018-05-03 Jakub Jelinek <jakub@redhat.com>
1779 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
1780 _mm512_mask_mullox_epi64): New intrinsics.
1782 2018-05-03 Tom de Vries <tom@codesourcery.com>
1785 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1786 dump files): Add offload-tree.
1788 2018-05-03 Richard Biener <rguenther@suse.de>
1790 PR tree-optimization/85615
1791 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
1792 to loops not nested in BBs loop father to avoid creating multi-entry
1795 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1797 PR tree-optimization/70291
1798 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
1799 arguments. Change return type to tree. Emit libcall as a new
1800 statement rather than replacing existing one when inplace_p is true.
1801 (expand_complex_multiplication_components): New function.
1802 (expand_complex_multiplication): Expand floating-point complex
1803 multiplication using the above.
1804 (expand_complex_division): Rename inner_type parameter to type.
1805 Update expand_complex_libcall call-site.
1806 (expand_complex_operations_1): Update expand_complex_multiplication
1807 and expand_complex_division call-sites.
1809 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1812 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1813 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1814 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
1815 the highest significant bit of the shift count mask is clear. In
1816 check whether and[sq]i3 is needed verify that all significant bits
1817 of the shift count other than the highest are set.
1819 2018-05-02 Tom de Vries <tom@codesourcery.com>
1822 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
1823 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
1824 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
1825 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
1826 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
1827 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
1828 __builtin_goacc_parlevel_size.
1830 2018-05-02 Richard Biener <rguenther@suse.de>
1832 PR tree-optimization/85597
1833 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
1834 do not use split vect_get_vec_defs call but call vect_get_slp_defs
1837 2018-05-02 Tom de Vries <tom@codesourcery.com>
1840 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1841 dump files): Add ltrans-tree.
1843 2018-05-02 Tom de Vries <tom@codesourcery.com>
1846 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1847 dump files): Add wpa-ipa.
1849 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
1851 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
1852 powerpc*-*-linux*paired* target.
1853 * config/rs6000/750cl.h: Delete.
1854 * config/rs6000/paired.h: Delete.
1855 * config/rs6000/paired.md: Delete.
1856 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
1858 * config/rs6000/rs6000-builtin.def: Remove paired float support.
1859 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
1860 comment. Remove paired float support.
1861 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
1862 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1864 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
1865 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
1867 * config/rs6000/rs6000.c: Remove paired float support.
1868 (paired_expand_vector_init, paired_expand_vector_move,
1869 paired_emit_vector_compare, paired_emit_vector_cond_expr,
1870 (paired_expand_lv_builtin, paired_expand_stv_builtin,
1871 paired_expand_builtin, paired_expand_predicate_builtin,
1872 paired_init_builtins): Delete.
1873 * config/rs6000/rs6000.h: Remove paired float support.
1874 * config/rs6000/rs6000.md: Remove paired float support.
1875 (move_from_CR_ov_bit): Delete.
1876 * config/rs6000/rs6000.opt (mpaired): Delete.
1877 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
1878 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
1880 2018-05-02 Richard Biener <rguenther@suse.de>
1883 * gimplify.c (gimplify_save_expr): When in SSA form allow
1884 SAVE_EXPRs to compute to SSA vars.
1886 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1889 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1890 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1891 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
1892 clobber operands[2], instead use a new pseudo. Formatting fixes.
1894 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
1896 PR tree-optimization/85586
1897 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
1898 exit early for statements in the same group if the accesses are
1901 2018-05-02 Tom de Vries <tom@codesourcery.com>
1904 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
1907 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
1909 PR tree-optimization/85143
1910 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
1912 2018-05-01 Tom de Vries <tom@codesourcery.com>
1915 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
1916 not found" error message.
1918 2018-05-01 Tom de Vries <tom@codesourcery.com>
1921 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
1922 * vec.c (test_ordered_remove_if): New function.
1923 (vec_c_tests): Call test_ordered_remove_if.
1924 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
1925 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
1926 * tree-vect-patterns.c (vect_pattern_recog_1): Use
1927 VEC_ORDERED_REMOVE_IF.
1929 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1931 PR tree-optimization/82665
1932 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
1933 pointer subtraction where arguments come from a memchr call.
1935 2018-05-01 Jakub Jelinek <jakub@redhat.com>
1937 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
1938 --push-state --as-needed and --pop-state instead of --as-needed and
1939 --no-as-needed if ld supports it.
1940 * configure: Regenerated.
1943 * doc/install.texi2html: Replace _002d with - and _002a with * in
1944 generated html files using sed.
1946 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1949 * gcc-rich-location.c (blank_line_before_p): New function.
1950 (use_new_line): New function.
1951 (gcc_rich_location::add_fixit_insert_formatted): New function.
1952 * gcc-rich-location.h
1953 (gcc_rich_location::add_fixit_insert_formatted): New function.
1955 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1957 * selftest.c (assert_streq): Rename "expected" and "actual" to
1958 "val1" and "val2". Extend NULL-handling to cover both inputs
1959 symmetrically, while still requiring both to be non-NULL for a pass.
1960 * selftest.h (assert_streq): Rename "expected" and "actual" to
1962 (ASSERT_EQ): Likewise.
1963 (ASSERT_EQ_AT): Likewise.
1964 (ASSERT_KNOWN_EQ): Likewise.
1965 (ASSERT_KNOWN_EQ_AT): Likewise.
1966 (ASSERT_NE): Likewise.
1967 (ASSERT_MAYBE_NE): Likewise.
1968 (ASSERT_MAYBE_NE_AT): Likewise.
1969 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
1970 the assertion to pass.
1971 (ASSERT_STREQ_AT): Likewise.
1973 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1975 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
1976 interaction with -pie.
1978 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1980 * selftest.h: Fix alphabetization of per-source-file selftest
1983 2018-04-30 Jason Merrill <jason@redhat.com>
1985 PR c++/61982 - dead stores to destroyed objects.
1986 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
1989 2018-04-30 Jason Merrill <jason@redhat.com>
1991 * tree.c (build_clobber): New.
1992 * tree.h: Declare it.
1993 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
1995 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1997 * diagnostic-show-locus.c (layout::layout): Update for
1998 location_get_source_line returning a char_span.
1999 (struct char_span): Move to input.h.
2000 (struct correction): Update for fields in char_span becoming
2002 (struct source_line): Update for location_get_source_line
2003 returning a char_span.
2004 (layout::print_line): Likewise.
2005 * edit-context.c (edited_file::print_content): Likewise.
2006 (edited_file::print_diff_hunk): Likewise.
2007 (edited_file::print_run_of_changed_lines): Likewise.
2008 (edited_file::get_num_lines): Likewise.
2009 (edited_line::edited_line): Likewise.
2010 * final.c (asm_show_source): Likewise.
2011 * input.c (location_get_source_line): Convert return type
2012 from const char * to char_span, losing the final "line_len"
2014 (dump_location_info): Update for the above.
2015 (get_substring_ranges_for_loc): Likewise. Use a char_span
2016 when handling the literal within the line.
2017 (test_reading_source_line): Update for location_get_source_line
2018 returning a char_span.
2019 * input.h (class char_span): Move here from
2020 diagnostic-show-locus.c, converting from a struct to a class.
2021 Make data members private.
2022 (char_span::operator bool): New.
2023 (char_span::length): New.
2024 (char_span::get_buffer): New.
2025 (char_span::operator[]): New.
2026 (char_span::subspan): Make const.
2027 (char_span::xstrdup): New.
2028 (location_get_source_line): Convert return type from const char *
2029 to char_span, losing the final "line_size" param.
2031 2018-04-30 Jan Hubicka <jh@suse.cz>
2033 * lto-wrapper.c (ltrans_priorities): New static var.
2034 (cmp_priority): New.
2035 (run_gcc): Read priorities and if doing parallel build order
2036 the Makefile by them.
2038 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2040 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2042 2018-04-30 Richard Biener <rguenther@suse.de>
2044 * tree-cfg.c (verify_address): Remove base argument, add
2045 flag whether to check TREE_ADDRESSABLE and do that.
2046 (verify_expr): Remove.
2047 (verify_types_in_gimple_reference): Add pieces from verify_expr.
2048 (verify_gimple_assign_single): Likewise.
2049 (verify_gimple_switch): Likewise.
2050 (verify_expr_location_1): Dereference tp once. Add (disabled)
2051 piece from verify_expr.
2052 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2054 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
2056 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2058 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
2060 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2061 (small_data_pattern): Likewise.
2062 (arc_rewrite_small_data): Likewise.
2063 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2064 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2065 (get_symbol_alignment): New function.
2066 (legitimate_small_data_address_p): Likewise.
2067 (legitimate_scaled_address): Update, call
2068 legitimate_small_data_address_p.
2069 (output_sdata): New static variable.
2070 (arc_print_operand): Update how we handle small data operands.
2071 (arc_print_operand_address): Likewise.
2072 (arc_legitimate_address_p): Update, use
2073 legitimate_small_data_address_p.
2074 (arc_rewrite_small_data_p): Remove.
2075 (arc_rewrite_small_data_1): Likewise.
2076 (arc_rewrite_small_data): Likewise.
2077 (small_data_pattern): Likewise.
2078 (compact_sda_memory_operand): Update to use
2079 legitimate_small_data_address_p and get_symbol_alignment.
2080 (prepare_move_operands): Don't rewite sdata pattern.
2081 (prepare_extend_operands): Remove.
2082 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2084 (zero_extendqisi2): Likewise.
2085 (zero_extendhisi2): Likewise.
2086 (extendqihi2): Likewise.
2087 (extendqisi2): Likewise.
2088 (extendhisi2): Likewise.
2092 * config/arc/constraints.md (Usd): Change it to memory constraint.
2094 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
2096 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2097 as source of std instructions.
2098 * config/arc/arc.md (movsi_insn): Update pattern predicate to
2099 allow 6-bit constants as source for store instructions.
2100 (movdi_insn): Update instruction pattern to allow 6-bit constants
2101 as source for store instructions.
2103 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
2105 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2107 2018-04-30 Nathan Sidwell <nathan@acm.org>
2108 Sandra Loosemore <sandra@codesourcery.com>
2110 * dumpfile.c (dump_open): Allow '-' for stdout.
2111 * doc/invoke.texi (Developer Options): Document dump filename
2112 determination early. Document stdin/stdout selection.
2114 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
2116 Microblaze Target: PIC data text relative
2118 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2119 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2121 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2122 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2123 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2124 New addressing mode for data-text relative position indepenedent code.
2125 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2126 'ADDRESS_SYMBOLIC_TXT_REL'.
2127 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2128 (microblaze_legitimate_pic_operand): Exclude function calls from
2129 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2130 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2132 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2133 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2134 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2135 for 'address + offset'.
2136 (microblaze_expand_prologue): Add new function prologue call for
2138 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2139 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2140 table in case of TARGET_PIC_DATA_TEXT_REL.
2141 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2142 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2143 Add new macros 'UNSPEC_TEXT',
2144 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2145 + exclude function calls from 'UNSPEC_PLT' in case of data text
2147 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2148 new target hook for generating address diff vector tables in case of
2150 * doc/tm.texi : Regenerate.
2151 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2152 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2153 of addr diff vector generation.
2154 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2155 target hook definition.
2156 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2157 Add default function for generate_pic_addr_diff_vec -> flag_pic.
2158 * doc/invoke.texi (Add new pic option): Add new microblaze pic
2159 option for data text relative.
2161 2018-04-30 Richard Biener <rguenther@suse.de>
2163 * tree-chrec.h (evolution_function_is_constant_p): Remove
2165 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2167 2018-04-30 Richard Biener <rguenther@suse.de>
2170 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2172 2018-04-30 Richard Biener <rguenther@suse.de>
2174 PR tree-optimization/28364
2175 PR tree-optimization/85275
2176 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2177 copying first exit test.
2179 2018-04-28 Mark Wielaard <mark@klomp.org>
2181 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2183 (dwarf_AT): Handle DW_AT_addr_base.
2184 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2186 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
2189 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2190 (*ashl<dwi>3_doubleword_mask_1): Ditto.
2191 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2192 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2194 2018-04-28 Richard Biener <rguenther@suse.de>
2196 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2197 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2198 to reflect use. Only add interesting stmts.
2200 2018-04-27 Martin Jambor <mjambor@suse.cz>
2203 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2204 the jump function allows for passing through aggregate values.
2206 2018-04-27 David Malcolm <dmalcolm@redhat.com>
2208 * input.h (in_system_header_at): Convert from macro to inline
2210 (from_macro_expansion_at): Likewise.
2211 (from_macro_definition_at): Likewise.
2213 2018-04-27 Jeff Law <law@redhat.com>
2215 * config.gcc: Mark tile* targets as deprecated/obsolete.
2217 2018-04-27 Richard Biener <rguenther@suse.de>
2219 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2222 2018-04-27 Richard Biener <rguenther@suse.de>
2224 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2226 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
2228 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2229 with Yd constraint. Set "preferred_for_speed" attribute from
2230 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2232 (*movdi_internal): Ditto.
2233 (movti_interunit splitters): Remove
2234 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2235 (movdi_interunit splitters): Ditto.
2236 * config/i386/constraints.md (Ye): Remove.
2237 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2239 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2242 * config/aarch64/constraints.md (Usg): Limit to 31.
2245 2018-04-27 Jakub Jelinek <jakub@redhat.com>
2247 PR tree-optimization/85529
2248 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2249 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2250 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2251 zero extension or masking of the MSB bit.
2252 (optimize_range_tests): Add FIRST_BB argument, pass it through
2253 to optimize_range_tests_var_bound.
2254 (maybe_optimize_range_tests, reassociate_bb): Adjust
2255 optimize_range_tests callers.
2257 2018-04-26 Richard Biener <rguenther@suse.de>
2258 Jakub Jelinek <jakub@redhat.com>
2260 * cgraph.h (symbol_table): Just declare debug method here.
2261 * symtab.c (symbol_table::debug): Define.
2263 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
2265 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2267 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
2269 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2270 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2271 (*movdi_internal): Substitute Yi and Yj constraint with x
2272 and Ym and Yn constraint with y constraint. Update "isa"
2273 attribute and set "preferred_for_speed" attribute from
2274 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2275 (*movsi_internal): Ditto.
2276 (*movdf_internal): Ditto.
2277 (*movsf_internal): Ditto.
2278 (*zero_extendsidi2): Ditto.
2279 * config/i386/sse.md (vec_set<mode>_0): Ditto.
2280 (sse2_loadld): Ditto.
2281 (*vec_extract<ssevecmodelower>_0): Ditto.
2282 (*vec_extractv4si_0_zext_sse4): Ditto.
2283 (vec_concatv2di): Ditto.
2284 (*vec_dup<mode>): Ditto.
2285 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2286 * config/i386/constraints.md (Yi): Remove.
2291 2018-04-26 Nathan Sidwell <nathan@acm.org>
2293 * dumpfile.c (dump_open): New.
2294 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2295 (dump_finish): Detect stdio/stderr by value not name.
2297 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
2299 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2301 2018-04-26 Tom de Vries <tom@codesourcery.com>
2304 * config/nvptx/nvptx.c (verify_neutering_jumps)
2305 (verify_neutering_labels): New function
2306 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2308 2018-04-26 Tom de Vries <tom@codesourcery.com>
2311 * config/nvptx/nvptx.c (needs_neutering_p): New function.
2312 (nvptx_single): Use needs_neutering_p to skip over insns that do not
2315 2018-04-26 Richard Biener <rguenther@suse.de>
2316 Tom de Vries <tom@codesourcery.com>
2319 * lto-streamer-out.c (output_function): Fixup loops if required to match
2320 discovery done in the reader.
2322 2018-04-26 Richard Biener <rguenther@suse.de>
2324 PR tree-optimization/85116
2325 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2326 have a loop exit from the single latch predecessor. Remove
2327 case of header with just condition.
2328 (ch_base::copy_headers): Exclude infinite loops from any
2330 (pass_ch::execute): Record exits.
2332 2018-04-26 Richard Biener <rguenther@suse.de>
2334 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2335 prologue cost vector and pass it to vect_get_load_cost.
2336 (vect_get_peeling_costs_all_drs): Likewise.
2337 (vect_peeling_hash_get_lowest_cost): Likewise.
2338 (vect_enhance_data_refs_alignment): Likewise.
2340 2018-04-26 Richard Biener <rguenther@suse.de>
2343 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2344 checking of integer<->pointer conversions.
2345 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2346 sign-/zero-extending pointer types.
2347 (expand_omp_for_static_chunk): Likewise.
2349 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
2350 Jean Lee <xiaoyur347@gmail.com>
2352 * config/mips/mips.c (mips_asan_shadow_offset): New function.
2353 (TARGET_ASAN_SHADOW_OFFSET): Define.
2354 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2355 true for -fsanitize=address.
2357 2018-04-25 Mark Wielaard <mark@klomp.org>
2359 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
2362 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2364 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
2365 than "alu", remove explicit "memory" and "imm_disp" attributes.
2366 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
2369 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
2370 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
2371 gen_lowpart_no_emit.
2373 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
2376 * config/i386/i386.c (ix86_expand_builtin): Change memory
2377 operand to XI, extend p0 to Pmode.
2378 * config/i386/i386.md: Change unspec volatile and operand
2379 1 mode to XI, change operand 0 mode to P.
2381 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2383 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
2384 GET_MODE_MASK before any checking.
2385 (nds32_can_use_bset_p): Likewise.
2386 (nds32_can_use_btgl_p): Likewise.
2388 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2390 * config/nds32/nds32-doubleword.md: New define_split pattern for
2391 illegal register number.
2393 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2395 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2397 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
2399 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2401 2018-04-25 Richard Biener <rguenther@suse.de>
2403 * lto-streamer.h (LTO_major_version): Bump to 8.
2405 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2407 * BASE-VER: Set to 9.0.0.
2409 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
2411 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
2412 in __abskf2 and __powikf2.
2414 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2417 * config/aarch64/constraints.md (Usg, Usj): New constraints.
2418 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
2419 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
2420 Use the above on operand 2. Reindent.
2421 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2423 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2426 * common/config/i386/i386-common.c (ix86_handle_option): Don't
2428 * config/i386/i386.opt (mcet): Removed.
2429 * doc/install.texi: Remove -mcet documentation.
2430 * doc/invoke.texi: Likewise.
2432 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2435 * doc/install.texi: Remove -mcet from bootstrap-cet.
2437 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2440 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
2441 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
2445 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
2446 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
2447 containing a CONST_VECTOR.
2449 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
2451 * doc/install.texi: Update newlib dependency for nvptx.
2453 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2456 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
2457 instead of INTVAL when shifting x left.
2459 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
2461 PR tree-optimization/85478
2462 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
2463 vect_grouped_store_supported for single element vectors.
2465 2018-04-24 Richard Biener <rguenther@suse.de>
2468 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2469 load cost increase to the case of non-constant step.
2471 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2474 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
2475 destination if any_malformed_asm.
2477 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
2480 * expr.c (store_field): In the bitfield case, if the value comes from
2481 a function call and is returned in registers by means of a PARALLEL,
2482 do not change the mode of the temporary unless BLKmode and VOIDmode.
2484 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
2486 PR rtl-optimization/85423
2487 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
2488 dependencies to debug insns when the previous insn is non-debug.
2490 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2492 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
2493 enums into a single definition.
2494 (fls): Fix predicates and printing.
2497 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2499 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
2500 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
2501 and short u6 immediate.
2502 (check_if_valid_sleep_operand): Remove.
2503 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2505 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2507 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
2508 flag_always_save_lp condition.
2509 * config/nds32/nds32.opt (malways-save-lp): New option.
2511 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2513 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
2514 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2515 * config/nds32/nds32.h
2516 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2517 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2519 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2521 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2522 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2524 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2525 Chung-Ju Wu <jasonwucj@gmail.com>
2527 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2529 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2530 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2532 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2534 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2536 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2538 * config/nds32/nds32-protos.h (nds32_data_alignment,
2539 nds32_local_alignment): Declare.
2540 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2541 nds32_local_alignment): New functions.
2542 (TARGET_CONSTANT_ALIGNMENT): Define.
2543 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2545 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2547 * config/nds32/nds32.c
2548 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2549 (TARGET_MODES_TIEABLE_P): Likewise.
2551 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2553 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2556 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
2557 Chung-Ju Wu <jasonwucj@gmail.com>
2559 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2560 for unaligned access.
2561 * config/nds32/nds32-intrinsic.c: Implementation of expanding
2563 * config/nds32/nds32-intrinsic.md: Likewise.
2564 * config/nds32/nds32_intrinsic.h: Likewise.
2565 * config/nds32/nds32.h (nds32_builtins): Likewise.
2566 * config/nds32/nds32.opt (munaligned-access): New option.
2567 * config/nds32/nds32.c (nds32_asm_file_start): Display
2568 flag_unaligned_access status.
2570 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2572 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
2573 -mno-relax is present.
2574 * config/riscv/linux.h (LINK_SPEC): Ditto.
2576 2018-04-20 Martin Sebor <msebor@redhat.com>
2579 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
2581 (gimple_fold_builtin_stxcpy_chk): Same.
2582 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2584 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
2587 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
2588 __powikf2 when long double is IEEE 128-bit.
2590 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2592 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
2593 step to make sure stack always aligned.
2595 2018-04-20 Carl Love <cel@us.ibm.com>
2598 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
2599 size check for arg0.
2601 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
2602 Tom de Vries <tom@codesourcery.com>
2605 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
2606 Emit insns for calls too.
2607 (nvptx_find_par): Always look for worker-level predecessor insn.
2608 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
2610 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
2611 (nvptx_process_pars): Propagate frames for calls.
2613 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
2616 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
2618 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
2619 (ix86_handle_option): Don't handle OPT_mibt.
2620 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
2622 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
2624 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
2625 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
2626 (ix86_target_macros): Define __CET__ with flag_cf_protection
2627 for -fcf-protection.
2628 * config/i386/i386.c (isa2_opts): Remove -mibt.
2629 * config/i386/i386.h (TARGET_IBT): Removed.
2630 (TARGET_IBT_P): Likewise.
2631 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
2632 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
2633 * config/i386/i386.opt (mcet): Update help message.
2636 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
2637 -mcet as an alias for -mshstk.
2639 2018-04-20 Richard Biener <rguenther@suse.de>
2642 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
2643 complexity by forcing a single use of the multiply operand.
2645 2018-04-20 Martin Jambor <mjambor@suse.cz>
2648 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
2649 recursion dependency to only apply to non-clones.
2651 2018-04-20 Martin Jambor <mjambor@suse.cz>
2654 * ipa-cp.c (create_specialized_node): Check that clones of
2655 self-recursive edges exist during IPA-CP.
2657 2018-04-19 Toon Moene <toon@moene.org>
2659 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
2662 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2664 PR tree-optimization/85467
2665 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
2666 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
2667 VECTOR_CST element to type.
2669 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2672 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
2673 * config/i386/i386.md (builtin_setjmp_setup): Removed.
2674 (builtin_longjmp): Likewise.
2675 (save_stack_nonlocal): New pattern.
2676 (restore_stack_nonlocal): Likewise.
2678 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2681 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2682 Replace ASM_OUTPUT_LABEL with fprintf.
2684 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2687 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2688 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
2689 * config/i386/i386-c.c (ix86_target_macros_internal): Also
2690 define __IBT__ and __SHSTK__ for -fcf-protection.
2691 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
2693 (ix86_trampoline_init): Likewise.
2694 (x86_output_mi_thunk): Likewise.
2695 (ix86_notrack_prefixed_insn_p): Likewise.
2696 (ix86_option_override_internal): Don't disallow -fcf-protection.
2697 * config/i386/i386.md (rdssp<mode>): Also enable for
2699 (incssp<mode>): Likewise.
2700 (nop_endbr): Likewise.
2701 * config/i386/i386.opt (mcet): Change help message to built-in
2705 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
2706 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
2707 enable CET built-in functions.
2709 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
2711 * common/config/i386/i386-common.c
2712 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
2713 OPTION_MASK_ISA_MOVDIRI_UNSET,
2714 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
2715 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
2716 * config.gcc (movdirintrin.h): New header.
2717 * config/i386/cpuid.h (bit_MOVDIRI,
2718 bit_MOVDIR64B): New bits.
2719 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
2721 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
2722 (VOID, PVOID, PCVOID)): New function types.
2723 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
2724 __builtin_ia32_directstoreu_u64,
2725 __builtin_ia32_movdir64b): New builtins.
2726 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
2727 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
2729 (ix86_valid_target_attribute_inner_p): Ditto.
2730 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
2731 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
2732 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
2733 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
2734 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
2735 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
2736 (movdiri<mode>, movdir64b_<mode>): New.
2737 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
2738 * config/i386/immintrin.h: Include movdirintrin.h.
2739 * config/i386/movdirintrin.h: New file.
2740 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
2742 2018-04-19 Richard Biener <rguenther@suse.de>
2745 * cfg.c (clear_bb_flags): When loop state says we have
2746 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
2748 2018-04-19 Richard Biener <rguenther@suse.de>
2750 PR tree-optimization/84737
2751 * tree-vect-data-refs.c (vect_copy_ref_info): New function
2752 copying restrict info.
2753 (vect_setup_realignment): Use it.
2754 * tree-vectorizer.h (vect_copy_ref_info): Declare.
2755 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
2756 the first DR to all generated stores.
2757 (vectorizable_load): Likewise for loads.
2759 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2761 PR tree-optimization/85446
2762 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
2763 the integral and pointer types to have the same precision.
2765 * doc/install.texi: Document --disable-cet being the default and
2768 2018-04-18 Martin Liska <mliska@suse.cz>
2770 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
2773 2018-04-18 Martin Liska <mliska@suse.cz>
2776 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
2779 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2780 arguments if they are comparable.
2782 2018-04-18 Martin Liska <mliska@suse.cz>
2785 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
2788 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
2791 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
2794 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
2795 ENDBR after calling __morestack.
2797 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2800 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
2801 by using gcc_base_ver to generate a gcc_driver_version, and use
2802 it when generating GCC_DRIVER_NAME.
2803 * configure: Regenerate.
2805 2018-04-18 Jakub Jelinek <jakub@redhat.com>
2808 * config.gcc: Obsolete powerpc*-*-*spe*.
2810 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2813 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
2814 (stabstr_D): Change type of unum from unsigned int to
2815 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
2818 2018-04-17 Jim Wilson <jimw@sifive.com>
2821 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
2822 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
2823 Set arg_pointer_offset after using pretend_args_size.
2825 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2827 PR rtl-optimization/85431
2828 * dse.c (record_store): Ignore zero width stores.
2831 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
2832 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
2833 __builtin_stack_restore rather than after it.
2834 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
2835 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
2836 argument instead of virtual_dynamic_stack_rtx.
2838 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
2840 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
2842 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2843 Add note to error message to explain internal mapping of overloaded
2844 built-in function name to non-overloaded built-in function name.
2845 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
2848 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
2851 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
2852 where the inputs overlap with the output.
2854 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2856 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
2857 (=v, v) alternative and explicit "memory" attribute.
2858 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
2859 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2861 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
2862 "sselog1" type instead of "sselog".
2863 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
2864 "sselog". Remove explicit "memory" attribute.
2865 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
2866 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2868 (vec_extract_hi_v32hi): Merge all alternatives into one, use
2869 "sselog1" type instead of "sselog". Remove explicit "memory"
2871 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
2872 use "sselog1" type instead of "sselog". Remove explicit "memory"
2874 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
2875 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2877 (vec_extract_hi_v64qi): Merge all alternatives into one, use
2878 "sselog1" type instead of "sselog". Remove explicit "memory"
2880 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
2881 use "sselog1" type instead of "sselog". Remove explicit "memory"
2885 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
2888 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
2891 2018-04-17 Martin Jambor <mjambor@suse.cz>
2894 * ipa-cp.c (create_specialized_node): Call
2895 expand_all_artificial_thunks if necessary.
2897 2018-04-17 Martin Liska <mliska@suse.cz>
2900 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
2901 in message, remote space in between '_G' and '('.
2903 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2906 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
2907 avx512f_vmcmp<mode>3<round_saeonly_name>,
2908 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
2909 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
2910 avx512f_rndscale<mode><round_saeonly_name>,
2911 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
2912 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
2913 Use %<iptr>2 instead of %2 for -masm=intel.
2914 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
2915 avx512f_vcvttss2usi<round_saeonly_name>,
2916 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
2918 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
2919 avx512f_vcvttsd2usi<round_saeonly_name>,
2920 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
2921 Use %q1 instead of %1 for -masm=intel.
2922 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
2923 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
2924 of %3 for -masm=intel.
2925 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
2927 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
2929 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
2931 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
2932 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
2934 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
2936 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
2937 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
2938 %g1 and one with %0 and %1.
2939 (avx512er_vmrcp28<mode><round_saeonly_name>,
2940 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
2942 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
2943 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
2944 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
2945 of %0 and %{%4%} for -masm=intel.
2946 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
2947 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
2948 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
2949 order of %0 and %{%5%}%{z%} for -masm=intel.
2951 2018-04-17 Jan Hubicka <jh@suse.cz>
2954 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2956 2018-04-17 Martin Liska <mliska@suse.cz>
2959 * multiple_target.c (create_dispatcher_calls): Set apostrophes
2960 for target_clone error message. Make default implementation
2961 clone to be a local declaration.
2962 (separate_attrs): Add new argument and check for an empty
2964 (expand_target_clones): Handle it.
2965 (ipa_target_clone): Make redirection just for target_clones
2968 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
2969 Tom de Vries <tom@codesourcery.com>
2972 * omp-expand.c (expand_oacc_for): Add dummy false branch for
2973 tiled basic blocks without omp continue statements.
2975 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
2978 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
2979 vec_extract expression as having side effects to make sure it gets
2982 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
2985 * config/i386/i386.c (get_builtin_code_for_version): Check
2988 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
2991 * gcc/config.gcc: Support "skylake".
2992 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
2994 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
2995 (processor_target_table): Add "skylake".
2996 (ix86_option_override_internal): Add "skylake".
2997 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
2998 PROCESSOR_CANNONLAKE.
2999 (get_builtin_code_for_version): Fix priority for
3000 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3001 PROCESSOR_SKYLAKE-AVX512.
3002 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3003 (processor_type): Add PROCESSOR_SKYLAKE.
3005 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
3006 Jason Merrill <jason@redhat.com>
3009 * convert.c (convert_to_integer_1): Use direct recursion for
3010 enumeral types and types with a precision less than the number
3011 of bits in their mode.
3013 2018-04-16 Julia Koval <julia.koval@intel.com>
3016 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3017 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3019 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
3022 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3023 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3024 and -mno-direct-move.
3026 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
3029 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3030 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3031 Ensure negative shifts result in {0}.
3033 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
3035 PR rtl-optimization/79916
3036 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3037 regs (if any) to define how to gnerate SD moves when LRA is in
3040 2018-04-13 Jakub Jelinek <jakub@redhat.com>
3042 PR rtl-optimization/85393
3043 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3044 * except.c (expand_dw2_landing_pad_for_region): Make static.
3045 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3046 a label and unconditional jump to old_bb, rather than
3047 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3050 PR rtl-optimization/85376
3051 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3052 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3053 instead of a specific value.
3055 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
3056 Bin Cheng <bin.cheng@arm.com>
3058 PR tree-optimization/82965
3059 PR tree-optimization/83991
3060 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3061 by_profile_only parameter.
3062 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3063 information if the loop was predicted to iterate too many times.
3064 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3066 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
3069 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3072 2018-04-13 Martin Liska <mliska@suse.cz>
3073 Jakub Jelinek <jakub@redhat.com>
3076 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3077 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3078 * builtins.c (expand_builtin_memory_copy_args): Use
3079 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3080 handle dest_addr == pc_rtx.
3082 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
3085 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3086 asked to not generate direct moves.
3087 (fix_trunc<mode>si2_stfiwx): Similar.
3088 (fix_trunc<mode>si2_internal): Similar.
3090 2018-04-12 Jakub Jelinek <jakub@redhat.com>
3093 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3094 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3095 lookup if dest in some wider mode is known to be const0_rtx and
3096 if so, record permanent equivalence for it to be ZERO_EXTEND of
3097 the narrower mode destination.
3099 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
3101 * lto-streamer-out.c (output_function): Revert 259346.
3102 * omp-expand.c (expand_oacc_for): Likewise.
3104 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
3106 PR rtl-optimization/85354
3107 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3108 * sel-sched.c (sel_global_init): ... here.
3110 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
3113 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3114 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3115 mode for PE-COFF targets.
3116 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3117 (i386_pe_asm_lto_end): Likewise.
3118 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3119 (TARGET_ASM_LTO_END): Likewise.
3120 * config/i386/winnt.c (saved_debug_info_level): New static variable.
3121 (i386_pe_asm_lto_start): New function.
3122 (i386_pe_asm_lto_end): Likewise.
3124 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
3125 Richard Biener <rguenther@suse.de>
3128 * lto-streamer-out.c (output_function): Fix CFG loop state before
3130 * omp-expand.c (expand_oacc_for): Handle calls to internal
3131 functions like regular functions.
3133 2018-04-12 Richard Biener <rguenther@suse.de>
3136 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3137 for the early LTO debug to properly generate references to it
3138 during DIE emission. Do not re-use that for the skeleton for
3140 (dwarf2out_early_finish): Likewise.
3142 2018-04-12 Jakub Jelinek <jakub@redhat.com>
3145 * config/i386/sse.md
3146 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3147 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3148 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3149 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3150 and output is a reg, avoid creating invalid lowpart subreg, but
3151 instead split into a 512-bit move. Don't split if not AVX512VL,
3152 input is xmm16+ reg and output is a mem.
3153 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3154 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3155 xmm16+ reg and output is a mem.
3157 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3159 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3160 also for flag_dwarf2_cfi_asm.
3162 2018-04-12 Jakub Jelinek <jakub@redhat.com>
3164 PR rtl-optimization/85342
3165 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3166 a bool scalar var inside of the loop instead. Don't try to update
3167 recog_data.operand after failed apply_change_group.
3169 2018-04-12 Tom de Vries <tom@codesourcery.com>
3172 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3173 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
3174 array with flexible array member as array without given dimension.
3175 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3176 argument for undefined param to true.
3178 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
3181 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3182 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3183 from PowerPC section.
3184 * config/rs6000/sysv4.opt (mcall-): Improve help text.
3185 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3186 help text that is too long.
3187 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3188 help text that is too long.
3189 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3190 help text that is too long.
3192 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
3194 * config/alpha/alpha.md (stack_probe_internal): Rename
3195 from "probe_stack". Update all callers.
3197 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3199 PR rtl-optimization/84566
3200 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3201 sched_macro_fuse_insns.
3203 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3206 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3207 (compute_block_dependences): ... from here.
3209 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3211 PR tree-optimization/85331
3212 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3213 from int to HOST_WIDE_INT.
3215 2018-04-11 Martin Jambor <mjambor@suse.cz>
3218 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3219 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3220 not the same as the source val.
3221 (cgraph_edge_brings_value_p): New parameter.
3222 (gather_edges_for_value): Pass destination value to
3223 cgraph_edge_brings_value_p.
3224 (perhaps_add_new_callers): Likewise.
3225 (get_info_about_necessary_edges): Likewise and exclude values brought
3226 only by self-recursive edges.
3227 (create_specialized_node): Redirect only clones of self-calling edges.
3228 (+self_recursive_pass_through_p): New function.
3229 (find_more_scalar_values_for_callers_subset): Use it.
3230 (find_aggregate_values_for_callers_subset): Likewise.
3231 (known_aggs_to_agg_replacement_list): Removed.
3232 (decide_whether_version_node): Re-calculate known constants for all
3233 remaining context clones.
3235 2018-04-11 Richard Biener <rguenther@suse.de>
3238 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3239 from early DWARF output.
3240 (dwarf2out_early_finish): Output line info unconditionally into
3241 early DWARF and add reference to it.
3243 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3246 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3247 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3248 other than V2DFmode using iptr mode attribute.
3249 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3251 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
3253 PR rtl-optimization/84659
3254 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3256 2018-04-11 Jakub Jelinek <jakub@redhat.com>
3259 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3261 (output_loc_list): Pass address of a dummy size variable even in the
3262 locview handling loop.
3263 (index_location_lists): Add comment on why skip_loc_list_entry can't
3266 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
3269 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3272 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
3275 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3276 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3277 and -mstring-compare-inline-limit.
3279 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3282 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3283 for stack clash protection in a register whenever we need it to be in
3286 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3288 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3289 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3291 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
3294 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3296 (mlong-double-): Ditto.
3297 * config/rs6000/sysv4.opt (msdata=): Ditto.
3298 (mtls-size=): Ditto.
3300 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
3302 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3303 erroneous entries for
3304 "vector int vec_ldl (int, long int *)", and
3305 "vector unsigned int vec_ldl (int, unsigned long int *)".
3306 Add comments and entries for
3307 "vector bool char vec_ldl (int, bool char *)",
3308 "vector bool short vec_ldl (int, bool short *)",
3309 "vector bool int vec_ldl (int, bool int *)",
3310 "vector bool long long vec_ldl (int, bool long long *)",
3311 "vector pixel vec_ldl (int, pixel *)",
3312 "vector long long vec_ldl (int, long long *)",
3313 "vector unsigned long long vec_ldl (int, unsigned long long *)".
3314 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3315 type tree bool_long_long_type_node and correct definition of
3316 bool_V2DI_type_node to make reference to this new type tree.
3317 (rs6000_mangle_type): Replace erroneous reference to
3318 bool_long_type_node with bool_long_long_type_node.
3319 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3320 comments to emphasize sign distinctions for char and int types and
3321 replace RS6000_BTI_bool_long constant with
3322 RS6000_BTI_bool_long_long constant. Also add comment to restrict
3323 use of RS6000_BTI_pixel.
3324 (bool_long_type_node): Remove this macro definition.
3325 (bool_long_long_type_node): New macro definition
3327 2018-04-10 Jakub Jelinek <jakub@redhat.com>
3329 PR rtl-optimization/85300
3330 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3331 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3332 simplify_unary_operation fails.
3334 2018-04-10 Martin Liska <mliska@suse.cz>
3336 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3337 cgraph_edge and ipa_ref.
3339 2018-04-10 Jakub Jelinek <jakub@redhat.com>
3343 * config/i386/sse.md
3344 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3345 computation of the VEC_MERGE selector from mask.
3346 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3347 Fix decoding of the VEC_MERGE selector into mask.
3349 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
3351 PR tree-optimization/85286
3352 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3354 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
3356 * final.c (final_1): Set insn_last_address as well as
3357 insn_current_address.
3359 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3362 * explow.c (emit_stack_probe): Call validize_mem on memory location
3363 before passing it to gen_probe_stack. Create address operand and
3364 legitimize it for the probe_stack_address case.
3366 2018-04-09 Jan Hubicka <jh@suse.cz>
3369 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
3370 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
3371 * tree.c (free_lang_data_in_type): Fix handling of binfos;
3373 (free_lang_data): Rebuild type inheritance graph.
3375 2018-04-09 Martin Sebor <msebor@redhat.com>
3377 * invoke.texi (-finline-small-functions): Mention other optimization
3379 (-findirect-inlining, -fpartial-inlining): Same.
3380 (-finline-functions-called-once): Same.
3381 (-freorder-blocks-and-partition): Same.
3383 2018-04-09 Jan Hubicka <jh@suse.cz>
3386 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
3387 jumps; choose last target that matches the criteria (i.e.
3388 no partition changes for non-crossing jumps).
3389 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
3390 support for redirecting crossing jumps to non-crossing.
3392 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
3394 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
3395 also for naked functions.
3397 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
3399 * config/arc/arc.md (add_shift): New pattern.
3400 (add_shift2): Likewise.
3401 (sub_shift): Likewise.
3402 (sub_shift_cmp0_noout): Likewise.
3403 (compare_si_ashiftsi): Likewise.
3404 (xbfu_cmp0_noout): New combine pattern.
3405 (xbfu_cmp0"): Likewise.
3406 (movsi_set_cc_insn): Place the predicable variant first.
3407 (commutative_binary_cmp0_noout): Remove clobber.
3408 (commutative_binary_cmp0): New pattern.
3409 (noncommutative_binary_cmp0): Likewise.
3410 (noncommutative_binary_cmp0_noout): Likewise.
3411 (noncommutative_binary_comparison_result_used): Removed.
3412 (rsub_cmp0): New pattern.
3413 (rsub_cmp0_noout): Likewise.
3414 (extzvsi): Changed, keep only meaningful variants.
3415 (SQH, SEZ): New iterators.
3416 (SQH_postfix): New mode attribute.
3417 (SEZ_prefix): New code attribute.
3418 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
3419 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
3420 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
3422 (noncommutative_operator): Check the availability of barrel
3425 2018-04-09 Richard Biener <rguenther@suse.de>
3427 PR tree-optimization/85284
3428 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
3429 Only use the niter constraining form of simple_iv when the exit
3432 2018-04-09 Tom de Vries <tom@codesourcery.com>
3435 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3436 (define_expand "*memory_barrier"): New define_expand.
3437 (define_insn "memory_barrier"): New insn.
3439 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3441 PR rtl-optimization/80463
3442 PR rtl-optimization/83972
3443 PR rtl-optimization/83480
3445 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
3446 correct producer for the insn.
3447 (tidy_control_flow): Fixup seqnos in case of debug insns.
3449 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3451 PR rtl-optimization/83913
3453 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
3454 different sched-times when merging exprs.
3456 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3458 PR rtl-optimization/83962
3460 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
3461 tidy_fallthru_edge and tidy_control_flow.
3463 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
3465 PR rtl-optimization/83530
3467 * sel-sched.c (force_next_insn): New global variable.
3468 (remove_insn_for_debug): When force_next_insn is true, also leave only
3469 next insn in the ready list.
3470 (sel_sched_region): When the region wasn't scheduled, make another pass
3471 over it with force_next_insn set to 1.
3473 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3475 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
3477 * config/nds32/constants.md (unspec_volatile_element): Add enum values
3478 for interrupt control.
3479 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3480 functions for interrupt control.
3481 * config/nds32/nds32-intrinsic.md: Likewise.
3482 * config/nds32/nds32_intrinsic.h: Likewise.
3483 * config/nds32/nds32.h (nds32_builtins): Likewise.
3485 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3487 * config/nds32/nds32.c (nds32_init_machine_status,
3488 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
3489 strict_aligned_p field.
3490 (nds32_expand_to_rtl_hook): New function.
3491 (TARGET_EXPAND_TO_RTL_HOOK): Define.
3492 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
3494 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3495 Chung-Ju Wu <jasonwucj@gmail.com>
3497 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
3498 * config/nds32/nds32-n7.md: New file.
3499 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
3500 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
3502 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
3503 * config/nds32/nds32.md (pipeline_model): Add n7.
3504 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
3505 * config/nds32/pipelines.md: Include n7 settings.
3507 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3508 Chung-Ju Wu <jasonwucj@gmail.com>
3510 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
3511 * config/nds32/nds32-e8.md: New file.
3512 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
3513 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3515 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3516 * config/nds32/nds32.md (pipeline_model): Add e8.
3517 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3518 * config/nds32/pipelines.md: Include e8 settings.
3520 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3521 Chung-Ju Wu <jasonwucj@gmail.com>
3523 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3524 * config/nds32/nds32-n8.md: New file.
3525 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3526 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3528 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3529 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3530 * config/nds32/nds32.md (pipeline_model): Add n8.
3531 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3532 * config/nds32/pipelines.md: Include n8 settings.
3534 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3535 Chung-Ju Wu <jasonwucj@gmail.com>
3537 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3538 * config/nds32/nds32-n9-2r1w.md: New file.
3539 * config/nds32/nds32-n9-3r2w.md: New file.
3540 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3541 nds32_register_ports): New or modify for cpu n9.
3542 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3544 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3545 * config/nds32/nds32-utils.c: New file.
3546 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3547 TARGET_MUL_SLOW): Define.
3548 * config/nds32/nds32.md (pipeline_model): New attribute.
3549 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3550 New options that support cpu n9.
3551 * config/nds32/pipelines.md: Include n9 settings.
3552 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3554 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3556 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3557 information if necessary.
3558 (output_cond_branch_compare_zero): Likewise.
3559 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3560 (nds32_target_alignment): Refine for alignment.
3561 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3562 (FUNCTION_BOUNDARY): Modify.
3563 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3565 * config/nds32/nds32.opt (malways-align, malign-functions): New.
3567 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3569 * config/nds32/constants.md (unspec_volatile_element): Add values for
3570 TLB operation and data prefetch.
3571 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3572 functions for TLB operation and data prefetch.
3573 * config/nds32/nds32-intrinsic.md: Likewise.
3574 * config/nds32/nds32_intrinsic.h: Likewise.
3575 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
3576 (nds32_print_operand): Likewise.
3577 * config/nds32/nds32.h (nds32_builtins): Likewise.
3579 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
3580 Andrew Pinski <pinsika@gcc.gnu.org>
3583 * match.pd: Use constant_boolean_node of correct type instead of
3584 boolean_true_node or boolean_false_node for simplifying
3585 pointer comparisons to zero.
3587 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3589 PR tree-optimization/80021
3590 * tree.c (verify_type_variant): Make error call in verify_variant_match
3591 translatable and remove final full stop.
3593 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3595 * config/nds32/constants.md (unspec_volatile_element): Add
3596 UNSPEC_VOLATILE_EH_RETURN.
3597 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
3598 nds32_output_stack_pop): Support dwarf exception handling process.
3599 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
3600 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
3601 exception handling process.
3602 (nds32_compute_stack_frame): Likewise.
3603 (nds32_return_addr_rtx): Likewise.
3604 (nds32_initial_elimination_offset): Likewise.
3605 (nds32_expand_prologue): Likewise.
3606 (nds32_expand_epilogue): Likewise.
3607 (nds32_dynamic_chain_address): New function.
3608 * config/nds32/nds32.h (machine_function): Add fields for dwarf
3610 (DYNAMIC_CHAIN_ADDRESS): Define.
3611 (EH_RETURN_DATA_REGNO): Define.
3612 (EH_RETURN_STACKADJ_RTX): Define.
3613 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
3614 patterns for dwarf exception handling.
3616 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3618 * config/nds32/nds32.h: Clean up obsolete macros.
3620 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3622 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3623 Add enum values for particular instructions.
3624 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3625 particular intrinsic functions.
3626 * config/nds32/nds32-intrinsic.md: Likewise.
3627 * config/nds32/nds32_intrinsic.h: Likewise.
3628 * config/nds32/nds32.h (nds32_builtins): Likewise.
3629 * config/nds32/nds32.md (type): Add pbsad and pbsada.
3630 (btst, ave): New patterns for particular instructions.
3632 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3634 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3635 Add enum values for atomic load/store and memory sync.
3636 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
3638 * config/nds32/nds32-intrinsic.md: Likewise.
3639 * config/nds32/nds32_intrinsic.h: Likewise.
3640 * config/nds32/nds32.h (nds32_builtins): Likewise.
3642 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3644 PR tree-optimization/85257
3645 * fold-const.c (native_encode_vector): If not all elts could fit
3646 and off is -1, return 0 rather than offset.
3647 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
3648 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
3649 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
3650 adjust buffer in native_interpret_expr call.
3652 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3654 * config/nds32/constants.md (unspec_volatile_element): Add cache
3655 control enum values.
3656 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
3657 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
3658 * config/nds32/nds32.c (nds32_cctl_names): New.
3659 (nds32_print_operand): Handle cache control register names.
3660 * config/nds32/nds32.h (nds32_builtins): New enum values.
3661 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
3663 * config/nds32/nds32.md (type): Add mmu.
3664 * config/nds32/pipelines.md (simple_insn): Add mmu.
3666 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3668 * config/nds32/nds32.md (type): Remove call.
3669 * config/nds32/pipelines.md (simple_insn): Likewise.
3671 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3673 * config/nds32/constants.md (unspec_volatile_element): Add
3674 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
3675 UNSPEC_VOLATILE_FMFCFG.
3676 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
3677 description for fmfcfg and fmfcsr.
3678 (bdesc_1arg): Add fmtcsr.
3679 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
3680 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
3681 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
3682 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
3683 unspec_fmfcfg): New patterns.
3684 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
3685 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
3686 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
3687 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
3688 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
3689 __nds32__fmfcfg): Define.
3691 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3693 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
3694 intrinsic register names.
3695 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
3696 intrinsic register enum values and macros.
3698 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3700 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
3701 for load/store addressing form.
3702 (nds32_print_operand_address): Likewise.
3704 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
3707 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
3708 based on LABEL_REF. Remove useless assertion.
3709 (pic_address_needs_scratch): Fix formatting.
3710 (sparc_legitimize_pic_address): Minor tweaks.
3711 (sparc_delegitimize_address): Adjust assertion accordingly.
3712 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
3713 into symbolic_operand.
3714 (movsi_high_pic_label_ref): Likewise.
3715 (movsi_lo_sum_pic_label_ref): Likewise.
3716 (movdi_pic_label_ref): Likewise.
3717 (movdi_high_pic_label_ref): Likewise.
3718 (movdi_lo_sum_pic_label_ref): Likewise.
3720 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
3722 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
3723 custom LIB_SPEC setup.
3725 2018-04-06 Ruslan Bukin <br@bsdpad.com>
3726 Kito Cheng <kito.cheng@gmail.com>
3728 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
3729 * config/riscv/freebsd.h: New.
3731 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3733 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
3734 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
3737 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3738 Kito Cheng <kito.cheng@gmail.com>
3740 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
3741 nds32_output_call, nds32_symbol_binds_local_p): New functions.
3742 * config/nds32/nds32-protos.h (nds32_output_call,
3743 nds32_output_return): Declare.
3744 * config/nds32/nds32.md: Refine all the call and return patterns.
3746 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3749 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
3750 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
3752 PR rtl-optimization/84872
3753 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
3754 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
3757 2018-04-06 Tamar Christina <tamar.christina@arm.com>
3759 * expr.c (copy_blkmode_to_reg): Revert 254862.
3760 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
3762 2018-04-06 Richard Biener <rguenther@suse.de>
3765 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
3766 after seeing a component reference with an adjacent field. Treat
3767 refs to arrays at struct end of external decls similar to
3768 refs to unconstrained commons.
3770 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3773 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
3774 look through SAVE_EXPRs with non-side-effects argument. Adjust
3776 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
3779 2018-04-06 Richard Biener <rguenther@suse.de>
3782 * alias.c (find_base_term): New wrapper around find_base_term
3783 unwinding CSELIB_VAL_PTR changes.
3784 (find_base_term): Do not restore CSELIB_VAL_PTR during the
3787 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3789 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
3791 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
3792 constant definitions.
3793 ("nop"): lr 0,0 -> nopr r0
3794 ("nop_lr0", "nop_lr1"): New insn definitions.
3796 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3798 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
3799 NDS32_V3PUSH_AVAILABLE_P macro.
3801 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
3802 Chung-Ju Wu <jasonwucj@gmail.com>
3804 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
3805 (nds32*-*-*): Add float and fpu_config into supported_defaults.
3806 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
3807 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
3808 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
3809 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
3810 * config/nds32/constraints.md: New constraints and checking for hard
3811 float configuration.
3812 * config/nds32/iterators.md: New mode iterator and attribute for hard
3813 float configuration.
3814 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
3816 * config/nds32/nds32-fpu.md: New file.
3817 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
3818 deal with hard float code generation.
3819 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
3821 (abi_type, float_reg_number): New enum type.
3822 * config/nds32/nds32-predicates.c: New predicates for hard float.
3823 * config/nds32/nds32-protos.h: Declare functions for hard float.
3824 * config/nds32/nds32.c: Implementation for hard float configuration.
3825 * config/nds32/nds32.h: Definitions for hard float configuration.
3826 * config/nds32/nds32.md: Include hard float machine description and
3827 modify patterns for hard float configuration.
3828 * config/nds32/nds32.opt: New options for hard float configuration.
3829 * config/nds32/predicates.md: New predicates for hard float
3832 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3834 * common/config/nds32/nds32-common.c
3835 (nds32_option_optimization_table): Enable -mreleax-hint by default.
3837 2018-04-05 Jakub Jelinek <jakub@redhat.com>
3840 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
3841 CONSTRUCTOR_ELT (ctor, ...)->value.
3843 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
3846 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
3848 2018-04-05 Tom de Vries <tom@codesourcery.com>
3851 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
3854 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3855 Kito Cheng <kito.cheng@gmail.com>
3857 * config/nds32/constraints.md (U33): Fine-tune checking condition.
3858 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
3859 * config/nds32/nds32.h (nds32_16bit_address_type): Add
3860 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
3862 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3863 Kito Cheng <kito.cheng@gmail.com>
3865 * config/nds32/constraints.md (Ufe): New memory constraint.
3866 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
3867 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
3868 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
3870 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
3871 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
3873 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3875 * config/nds32/nds32.md: Use optimize_size in the condition for
3876 alu-shift instructions.
3878 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3880 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
3882 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3884 * config/nds32/nds32.md (negsi2): Refine pattern.
3886 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3887 Chung-Ju Wu <jasonwucj@gmail.com>
3889 * config/nds32/iterators.md (shift_rotate): New code iterator.
3890 (shift): New code attribute.
3891 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
3892 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
3893 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
3894 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
3895 bit-wise operations.
3896 (andsi3, *andsi3): Ditto.
3897 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
3898 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
3899 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
3900 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
3901 nds32_ior_operand, nds32_xor_operand): New predicates.
3903 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3905 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
3906 (addsi3, subsi3): ... this.
3908 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3910 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
3912 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3914 * config/nds32/nds32.md: Adjust indention.
3916 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3918 * config/nds32/nds32.md (feature): New attribute.
3920 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3922 * config/nds32/nds32.md (subtype): New attribute.
3924 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
3927 * config/arm/arm-builtins.c (arm_expand_builtin): Change
3928 expansion to perform a bitwise AND of the argument followed by a
3929 boolean negation of the result.
3931 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
3933 PR rtl-optimization/84878
3934 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
3935 the basic block. Assert the use reference is not artificial and that
3936 it has an associated insn.
3938 2018-04-04 Michael Matz <matz@suse.de>
3940 * builtins.c (compute_objsize): Pass correct operand
3941 to array_at_struct_end_p.
3943 2018-04-04 Richard Biener <rguenther@suse.de>
3946 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
3947 from contexts for DINFO_LEVEL_TERSE and below.
3949 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3951 * config/nds32/nds32-doubleword.md (move_<mode>): Require
3952 resiter_operand condition.
3953 * config/nds32/nds32.md (*move<mode>): Ditto.
3955 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3956 Monk Chiang <sh.chiang04@gmail.com>
3958 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
3960 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3962 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
3964 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3965 Kito Cheng <kito.cheng@gmail.com>
3967 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
3968 nds32_cond_code_str, output_cond_branch,
3969 output_cond_branch_compare_zero, nds32_expand_cbranch,
3970 nds32_expand_cstore, nds32_expand_movcc,
3971 nds32_output_cbranchsi4_equality_zero,
3972 nds32_output_cbranchsi4_equality_reg,
3973 nds32_output_cbranchsi4_equality_reg_or_const_int,
3974 nds32_output_cbranchsi4_greater_less_zero: New functions.
3975 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
3976 nds32_expand_cstore, nds32_expand_movcc,
3977 nds32_output_cbranchsi4_equality_zero,
3978 nds32_output_cbranchsi4_equality_reg,
3979 nds32_output_cbranchsi4_equality_reg_or_const_int,
3980 nds32_output_cbranchsi4_greater_less_zero): Declare.
3981 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
3982 nds32_rimm11s_operand): New predicates.
3983 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
3984 * config/nds32/nds32.md: Rewrite all the branch and conditional move
3987 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3989 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
3990 * config/nds32/nds32.md: Ditto.
3991 * config/nds32/pipelines.md: Ditto.
3993 2018-04-04 Richard Biener <rguenther@suse.de>
3995 PR tree-optimization/85168
3996 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
3997 propagating abnormals.
3999 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4001 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4003 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4004 Kito Cheng <kito.cheng@gmail.com>
4006 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4007 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4008 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4009 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4010 * config/nds32/nds32.md (sibcall_internal): New.
4011 (sibcall_register): Remove.
4012 (sibcall_immediate): Remove.
4013 (sibcall_value_internal): New.
4014 (sibcall_value_register): Remove.
4015 (sibcall_value_immediate): Remove.
4016 * config/nds32/predicates.md (nds32_general_register_operand): New.
4017 (nds32_call_address_operand): New.
4019 2018-04-03 Jakub Jelinek <jakub@redhat.com>
4021 PR rtl-optimization/85167
4022 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4023 bb_defs if *split_p, instead preinitialize it to NULL.
4025 PR tree-optimization/85156
4026 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4027 evaluating the argument multiple times.
4029 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
4031 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4033 (_mm_cvtpd_ps): Likewise.
4034 (_mm_cvttpd_epi32): Likewise.
4035 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4036 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4037 vector, pixel, and bool following altivec.h include.
4039 2018-04-03 Martin Sebor <msebor@redhat.com>
4041 * doc/extend.texi (Common Function Attributes): Clarify.
4042 (const attribute): Likewise.
4043 (pure attribute): Likewise.
4045 2018-04-03 Jakub Jelinek <jakub@redhat.com>
4048 * config/i386/i386.c (ix86_expand_vector_set): Use
4049 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
4051 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
4053 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4054 instructions when changing rounding bits to preserve precision bits
4055 in the x87 control word.
4057 2018-04-03 Martin Liska <mliska@suse.cz>
4059 PR tree-optimization/82491
4060 * rtl.h (strip_offset_and_add): Replace += suboffset with
4061 poly_uint64 () + suboffset.
4063 2018-03-29 Martin Liska <mliska@suse.cz>
4064 Martin Jambor <mjambor@suse.cz>
4067 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4068 param_type is not an integral or pointer type.
4070 2018-04-03 Richard Biener <rguenther@suse.de>
4072 * sese.h (recompute_all_dominators): Remove.
4074 2018-04-02 Martin Sebor <msebor@redhat.com>
4076 * doc/invoke.texi (-Wrestrict): Fix typos.
4078 2018-04-02 Jim Wilson <jimw@sifive.com>
4080 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4081 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4082 (<optab>di3, <optab>si3_extend): Likewise.
4083 (<optab>si3_mask, <optab>si3_mask_1): New.
4084 (<optab>di3_mask, <optab>di3_mask_1): New.
4085 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4086 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4087 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4089 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
4091 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4094 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
4096 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4097 (nds32_canonicalize_comparison): New function.
4099 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
4100 Kito Cheng <kito.cheng@gmail.com>
4101 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4103 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4104 * config/nds32/constants.md (unspec_volatile_element): Add
4105 UNSPEC_VOLATILE_RELAX_GROUP.
4106 * config/nds32/nds32-relax-opt.c: New file.
4107 * config/nds32/nds32-predicates.c
4108 (nds32_symbol_load_store_p): New function.
4109 * config/nds32/nds32-protos.h
4110 (nds32_symbol_load_store_p): Declare function.
4111 (make_pass_nds32_relax_opt): Declare new rtl pass function.
4112 * config/nds32/nds32.c
4113 (nds32_register_pass): New function to register pass.
4114 (nds32_register_passes): New function to register passes.
4115 * config/nds32/nds32.md (relax_group): New pattern.
4116 * config/nds32/nds32.opt (mrelax-hint): New option.
4117 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4119 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
4121 * config/nds32/t-nds32: Modify files dependency.
4123 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
4125 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4126 (PROFILE_HOOK): Define its implementation.
4128 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
4130 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4131 type and 32-bit size.
4133 2018-04-01 Jakub Jelinek <jakub@redhat.com>
4136 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4137 (V_128_256): New mode iterator.
4138 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4139 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4140 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4142 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4143 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4145 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
4148 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4149 NaN inputs correctly.
4151 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
4154 * config/rs6000/vsx.md (??r): New mode attribute.
4155 (*vsx_mov<mode>_64bit): Use it.
4156 (*vsx_mov<mode>_32bit): Likewise.
4158 2018-03-30 Martin Sebor <msebor@redhat.com>
4160 PR tree-optimization/84818
4161 * builtins.c (check_access): Use warning_n.
4163 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4166 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4168 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4171 2018-03-30 Julia Koval <julia.koval@intel.com>
4174 * x86-tune.def (movx, partial_reg_dependency): Enable for
4177 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
4180 * lra-constraints.c (process_alt_operands): Move setting
4181 this_alternative_matches below.
4183 2018-03-29 Martin Liska <mliska@suse.cz>
4186 * doc/invoke.texi: Document how LTO works with debug info.
4187 Describe auto-load support of binutils. Mention 'x86-64'
4188 as valid option value of -march option.
4190 2018-03-29 Jakub Jelinek <jakub@redhat.com>
4192 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4195 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4196 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4197 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4200 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
4203 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4204 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4205 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4206 for RS6000_BTM_POWERPC64.
4207 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4208 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4209 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4214 2018-03-28 Carl Love <cel@us.ibm.com>
4217 2017-09-27 Carl Love <cel@us.ibm.com>
4219 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4220 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4221 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4224 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4226 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4227 instead of __vector bool.
4228 (_mm_max_pu8): Likewise.
4229 (_mm_min_pi16): Likewise.
4231 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
4234 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4235 (DIVWEUO): Likewise.
4237 (DIVDEUO): Likewise.
4238 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4239 DIVWEUO and DIVDEUO.
4240 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4241 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4242 (div_extend): Likewise.
4243 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4245 (__builtin_divweuo): Likewise.
4246 (__builtin_divdeo): Likewise.
4247 (__builtin_divdeuo): Likewise.
4249 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4252 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4253 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4255 PR tree-optimization/82004
4256 * gimple-match-head.c (optimize_pow_to_exp): New function.
4257 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4258 Don't fold to exp if optimize_pow_to_exp is false.
4260 2018-03-28 Martin Liska <mliska@suse.cz>
4263 * calls.c (initialize_argument_information): Fix trailing space.
4264 * common.opt: Fix typo and provide better explanation for
4265 -fsanitize-coverage option.
4266 * config/i386/i386.opt: Fix typo.
4268 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4269 Martin Liska <mliska@suse.cz>
4272 * gimplify.c (asan_poison_variable): Don't do the check for
4273 gimplify_omp_ctxp here.
4274 (gimplify_decl_expr): Do it here.
4275 (gimplify_target_expr): Likewise.
4277 2018-03-28 Martin Liska <mliska@suse.cz>
4280 * config/i386/i386.c (ix86_function_arg_advance): Do not call
4281 chkp_type_bounds_count if MPX is not enabled.
4283 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
4285 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4287 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4290 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4291 function to create the function decl for complex long double
4292 multiply and divide for -mabi=ieeelongdouble.
4293 (init_float128_ieee): Call it.
4295 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
4298 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4299 -fcf-protection=branch -mibt.
4300 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4302 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4305 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4307 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
4310 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4311 extern array declarations.
4313 2018-03-27 Richard Biener <rguenther@suse.de>
4316 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4317 explicit single_use checks.
4319 2018-03-27 Richard Biener <rguenther@suse.de>
4321 PR tree-optimization/85082
4322 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4325 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4327 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4328 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4329 Turn on fasynchronous-unwind-tables and funwind-tables.
4331 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
4334 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4335 (*bmi_blsr_<mode>_ccz): Ditto.
4337 2018-03-26 Tom de Vries <tom@codesourcery.com>
4339 PR tree-optimization/85063
4340 * omp-general.c (offloading_function_p): New function. Factor out
4342 * omp-offload.c (pass_omp_target_link::gate): ... here.
4343 * omp-general.h (offloading_function_p): Declare.
4344 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4345 with attribute omp declare target for offloading functions.
4347 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
4349 PR tree-optimization/84005
4350 * tree-data-ref.h (get_base_for_alignment): Declare.
4351 * tree-data-ref.c (get_base_for_alignment_1): New function.
4352 (get_base_for_alignment): Likewise.
4353 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4354 get_base_for_alignment to find a suitable base object, instead
4355 of always using drb->base_address.
4357 2018-03-23 Jakub Jelinek <jakub@redhat.com>
4360 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
4361 known size by default.
4363 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
4366 * lra-constraints.c (process_alt_operands): Don't match BLKmode
4367 and non BLKmode operands.
4369 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4372 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
4373 Clean up attributes.
4375 2018-03-23 Richard Biener <rguenther@suse.de>
4378 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
4379 we are going to emit early debug for LTO.
4381 2018-03-23 Jakub Jelinek <jakub@redhat.com>
4384 * function.c (match_asm_constraints_1): Don't optimize if input
4385 doesn't satisfy general_operand predicate for output's mode.
4388 * alias.c (write_dependence_p): Don't require for x_canonicalized
4389 non-VOIDmode if x has VOIDmode.
4392 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
4393 just don't try to optimize it rather than assert it never happens.
4395 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4397 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
4398 macro expansions for definition of ST_INTERNAL_<mode> and
4399 LD_INTERNAL_<mode> builtins.
4400 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
4402 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
4404 (altivec_expand_st_builtin): Likewise.
4405 (altivec_expand_builtin): Remove calls to deleted functions.
4406 (rs6000_address_for_altivec): Delete this function.
4407 * config/rs6000/vector.md: Remove expands for
4408 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
4410 2018-03-22 Sudakshina Das <sudi.das@arm.com>
4413 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
4414 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
4415 re-computing once computed.
4416 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
4417 (arm_init_machine_status): Initialize
4418 machine->static_chain_stack_bytes.
4420 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4423 * doc/extend.texi: Add four new prototypes for vec_ld.
4424 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
4425 definitions for more logical presentation.
4426 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
4427 entries for V1TI variants of __builtin_altivec_ld builtin.
4428 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
4429 handling of V1TI variant of LVX icode pattern.
4430 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
4431 (rs6000_gimple_fold_builtin): Likewise.
4432 (altivec_init_builtins): Add code to define
4433 __builtin_altivec_lvx_v1ti function.
4435 2018-03-22 Jakub Jelinek <jakub@redhat.com>
4438 * function.c (match_asm_constraints_1): Don't do the optimization
4439 if input isn't a REG, SUBREG, MEM or constant.
4441 2018-03-22 Tom de Vries <tom@codesourcery.com>
4443 PR tree-optimization/84956
4444 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
4445 bb_has_abnormal_pred.
4447 2018-03-22 Jakub Jelinek <jakub@redhat.com>
4450 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
4451 DECL_INITIAL (decl) to decl at the end.
4452 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
4455 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4457 * doc/extend.texi (__builtin_tgmath): Document when complex
4458 integer types are treated as _Complex _Float64.
4460 2018-03-21 Tom de Vries <tom@codesourcery.com>
4462 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
4464 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4466 PR tree-optimization/84960
4467 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
4468 if it is ENTRY block, move them into single succ of ENTRY in that case.
4470 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
4472 PR tree-optimization/84811
4473 * poly-int.h (poly_span_traits): Remove the T3 parameter and
4474 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
4475 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
4476 (known_subrange_p): Update accordingly. Cast each value involved
4477 in the size comparison, rather than casting the result of the
4480 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4482 PR tree-optimization/84982
4483 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
4484 by flipping the least significant bit rather than all bits from
4485 bitpos to bitpos + bitsize - 1.
4487 2018-03-21 Nathan Sidwell <nathan@acm.org>
4489 * doc/extend.texi (Deprecated Features): Remove mention of
4490 long-deleted deprecations.
4492 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4495 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
4496 * configure: Regenerate.
4498 2018-03-21 Tom de Vries <tom@codesourcery.com>
4500 PR tree-optimization/83126
4501 * tree-parloops.c (num_phis): New function.
4502 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
4504 2018-03-21 Nathan Sidwell <nathan@acm.org>
4506 * doc/extend.texi (Deprecated Features): Update deprecated flags,
4507 mention anon-struct/union members and trailing attributes.
4509 2018-03-21 Bin Cheng <bin.cheng@arm.com>
4511 PR tree-optimization/84969
4512 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
4513 builtin memset partitions if they set different rhs values.
4515 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4517 PR rtl-optimization/84989
4518 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4519 VEC_DUPLICATE with scalar result mode.
4521 2018-03-21 Martin Liska <mliska@suse.cz>
4524 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4525 not intended return statement.
4527 2018-03-21 Martin Liska <mliska@suse.cz>
4530 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4531 (chkp_find_bound_slots_1): Limit number of iterations.
4533 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
4536 * Minor grammar fixes for x86 options.
4538 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4541 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4542 holding REG_CFA_RESTORE notes, instead turn them into a USE.
4544 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
4547 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4548 (altivec_lvx_<mode>_1op): Likewise.
4549 (altivec_stvx_<mode>_2op): Likewise.
4550 (altivec_stvx_<mode>_1op): Likewise.
4551 (altivec_lvx_<VM2:mode>): New define_expand.
4552 (altivec_stvx_<VM2:mode>): Likewise.
4553 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4554 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4555 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4556 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4557 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4558 (rs6000_gen_lvx): Likewise.
4559 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4560 (altivec_expand_stv_builtin): Likewise.
4561 (altivec_expand_builtin): Likewise.
4562 * config/rs6000/vector.md: Likewise.
4564 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4567 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
4570 2018-03-20 Richard Biener <rguenther@suse.de>
4573 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
4574 sign-conversions as zero, fall back to standard scalar_stmt
4577 2018-03-20 Martin Liska <mliska@suse.cz>
4580 * predict.c (rebuild_frequencies): Handle case when we have
4581 PROFILE_ABSENT, but flag_guess_branch_prob is false.
4583 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4586 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
4587 flag_section_anchors.
4588 * varasm.c (use_blocks_for_decl_p): Remove hack for
4589 dw2_force_const_mem.
4592 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
4594 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
4595 be created, use lowpart_subreg of operands[0] rather than operands[0]
4597 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
4598 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
4599 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
4600 and n constraint instead of aarch64_shift_imm_di and Usd.
4601 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
4602 (*aarch64_<optab>_reg_minus<mode>3): ... this.
4604 2018-03-20 Sudakshina Das <sudi.das@arm.com>
4607 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
4608 to favor GPR over NEON registers.
4609 (<shift>di3_neon): Likewise.
4611 2018-03-20 Tom de Vries <tom@codesourcery.com>
4614 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
4615 (nvptx_process_pars): Emit bar.sync asap and alap.
4617 2018-03-20 Tom de Vries <tom@codesourcery.com>
4620 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
4621 seen_label if seen_label is already set.
4623 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4626 * config/i386/i386.c (fold_builtin_cpu): For features above 31
4627 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
4628 Use 1U instead of 1. Formatting fixes.
4631 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
4632 instead of TREE_TYPE (s1) for the return value.
4634 2018-03-19 Jakub Jelinek <jakub@redhat.com>
4636 PR tree-optimization/84946
4637 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
4638 bitsize + bitsize in poly_uint64 rather than poly_int64.
4641 * dwarf2asm.c: Include fold-const.c.
4642 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
4643 of decl rather than decl itself.
4645 PR rtl-optimization/84643
4646 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
4648 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
4651 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
4652 calling assemble_variable.
4654 2018-03-19 Sudakshina Das <sudi.das@arm.com>
4657 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
4658 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
4660 2018-03-19 Jim Wilson <jimw@sifive.com>
4663 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
4664 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
4665 (riscv_first_stack_step): Likewise.
4666 (riscv_option_override): Use STACK_BOUNDARY instead of
4668 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
4670 (BIGGEST_ALIGNMENT): Set to 128.
4671 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
4672 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
4675 2018-03-19 Richard Biener <rguenther@suse.de>
4677 PR tree-optimization/84933
4678 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
4679 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
4681 2018-03-19 Richard Biener <rguenther@suse.de>
4683 PR tree-optimization/84859
4684 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
4685 (cond_if_else_store_replacement): Perform sinking operation on
4686 single-store BBs regardless of MAX_STORES_TO_SINK setting.
4687 Generalize what a BB with a single eligible store is.
4689 2018-03-19 Richard Biener <rguenther@suse.de>
4691 PR tree-optimization/84929
4692 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
4693 chrec_is_positive against non-chrec arg.
4695 2018-03-19 Tamar Christina <tamar.christina@arm.com>
4698 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
4700 2018-03-18 Martin Liska <mliska@suse.cz>
4702 PR rtl-optimization/84635
4703 * regrename.c (build_def_use): Use matches_mode only when
4706 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
4708 PR tree-optimization/84913
4709 * tree-vect-loop.c (vectorizable_reduction): Don't try to
4710 vectorize chains of COND_EXPRs.
4712 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4714 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
4716 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4718 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
4720 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4722 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
4724 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4725 Kito Cheng <kito.cheng@gmail.com>
4727 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
4728 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
4729 (nds32_adjust_reg_alloc_order): New function.
4730 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
4732 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
4734 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
4735 nds32_print_operand, nds32_print_operand_address): Use
4736 HOST_WIDE_INT_PRINT_DEC instead.
4738 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4740 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
4742 2018-03-17 Jakub Jelinek <jakub@redhat.com>
4745 * config/i386/i386.c (initial_ix86_tune_features,
4746 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
4748 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
4749 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
4750 rather than 1u << ix86_tune. Formatting fix.
4751 (ix86_option_override_internal): Change ix86_arch_mask from
4752 unsigned int to unsigned HOST_WIDE_INT, initialize to
4753 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
4754 (ix86_function_specific_restore): Likewise.
4756 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4759 * postreload.c (reload_combine_recognize_pattern): Perform
4760 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
4761 truncate_int_for_mode the result for the destination's mode.
4764 * hsa-gen.c (mem_type_for_type): Fix comment typo.
4765 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
4767 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4770 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
4773 * lra-assigns.c (lra_split_hard_reg_for): Don't use
4774 regno_allocno_class_array and sorted_pseudos.
4775 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
4776 insns where regno is used.
4778 2018-03-16 Martin Liska <mliska@suse.cz>
4781 * multiple_target.c (create_dispatcher_calls): Redirect
4782 reference in the symbol table.
4784 2018-03-16 Martin Liska <mliska@suse.cz>
4787 * multiple_target.c (create_dispatcher_calls): Redirect also
4790 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4794 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
4795 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
4796 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
4798 2018-03-16 Julia Koval <julia.koval@intel.com>
4800 * doc/invoke.texi (Skylake Server): Add CLWB.
4801 Cannonlake): Remove CLWB.
4803 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4805 PR tree-optimization/84841
4806 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
4808 (FLOAT_ONE_CONST_TYPE): Define.
4809 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
4810 (sort_by_operand_rank): Put entries with higher constant_type last
4811 rather than first to match comments.
4813 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
4815 * config/nios2/nios2.md (movsi_internal): Fix thinko in
4818 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4821 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
4822 check and use address of target always.
4824 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
4827 * config/i386/i386.c (indirect_thunk_needed): Update comments.
4828 (indirect_thunk_bnd_needed): Likewise.
4829 (indirect_thunks_used): Likewise.
4830 (indirect_thunks_bnd_used): Likewise.
4831 (indirect_return_needed): New.
4832 (indirect_return_bnd_needed): Likewise.
4833 (output_indirect_thunk_function): Add a bool argument for
4835 (output_indirect_thunk_function): Don't generate alias for
4836 function return thunk.
4837 (ix86_code_end): Call output_indirect_thunk_function to generate
4838 function return thunks.
4839 (ix86_output_function_return): Set indirect_return_bnd_needed
4840 and indirect_return_needed instead of indirect_thunk_bnd_needed
4841 and indirect_thunk_needed.
4843 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
4845 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
4846 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
4847 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
4849 2018-03-15 David Malcolm <dmalcolm@redhat.com>
4850 Paul Hua <paul.hua.gm@gmail.com>
4853 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
4855 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
4857 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
4858 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
4861 2018-03-15 Tamar Christina <tamar.christina@arm.com>
4864 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4865 instead of GET_MODE_SIZE when comparing Units.
4867 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4870 * varasm.c (hash_section): Return an unchangeble hash value
4871 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
4872 Return !aarch64_can_use_per_function_literal_pools_p ().
4874 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4877 * optabs.c (emit_conditional_move): Pass address of cmode's copy
4878 rather than address of cmode as last argument to prepare_cmp_insn.
4880 2018-03-15 Julia Koval <julia.koval@intel.com>
4882 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
4883 F_AVX512VNNI, F_AVX512BITALG): New.
4885 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
4888 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
4889 insn for floating-point loads and stores.
4891 2018-03-14 Carl Love <cel@us.ibm.com>
4893 * config/rs6000/rs6000-c.c: Add macro definitions for
4894 ALTIVEC_BUILTIN_VEC_PERMXOR.
4895 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
4896 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
4897 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
4898 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
4900 * config/doc/extend.texi: Add prototypes for vec_permxor.
4902 2018-03-14 David Malcolm <dmalcolm@redhat.com>
4905 * diagnostic-show-locus.c (class layout_point): Convert m_line
4906 from int to linenum_type.
4907 (line_span::comparator): Use linenum "compare" function when
4908 comparing line numbers.
4909 (test_line_span): New function.
4910 (layout_range::contains_point): Convert param "row" from int to
4912 (layout_range::intersects_line_p): Likewise.
4913 (layout::will_show_line_p): Likewise.
4914 (layout::print_source_line): Likewise.
4915 (layout::should_print_annotation_line_p): Likewise.
4916 (layout::print_annotation_line): Likewise.
4917 (layout::print_leading_fixits): Likewise.
4918 (layout::annotation_line_showed_range_p): Likewise.
4919 (struct line_corrections): Likewise for field m_row.
4920 (line_corrections::line_corrections): Likewise for param "row".
4921 (layout::print_trailing_fixits): Likewise.
4922 (layout::get_state_at_point): Likewise.
4923 (layout::get_x_bound_for_row): Likewise.
4924 (layout::print_line): Likewise.
4925 (diagnostic_show_locus): Likewise for locals "last_line" and
4927 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
4928 * input.c (selftest::test_linenum_comparisons): New function.
4929 (selftest::input_c_tests): Call it.
4930 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
4931 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
4932 * selftest.h (ASSERT_GT): New macro.
4933 (ASSERT_GT_AT): New macro.
4934 (ASSERT_LT): New macro.
4935 (ASSERT_LT_AT): New macro.
4937 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
4939 PR rtl-optimization/84780
4940 * combine.c (distribute_links): Don't make a link based on pc_rtx.
4942 2018-03-14 Martin Liska <mliska@suse.cz>
4944 * tree.c (record_node_allocation_statistics): Use
4945 get_stats_node_kind.
4946 (get_stats_node_kind): New function extracted from
4947 record_node_allocation_statistics.
4948 (free_node): Use get_stats_node_kind.
4950 2018-03-14 Richard Biener <rguenther@suse.de>
4952 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
4953 that the value-set of ANTIC_IN doesn't grow.
4956 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4958 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4959 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4961 2018-03-14 Julia Koval <julia.koval@intel.com>
4963 * config.gcc (icelake-client, icelake-server): New.
4965 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
4966 (initial_ix86_arch_features): Ditto.
4967 (PTA_SKYLAKE): Add SGX.
4968 (PTA_ICELAKE): Remove.
4969 (PTA_ICELAKE_CLIENT): New.
4970 (PTA_ICELAKE_SERVER): New.
4971 (ix86_option_override_internal): Split up icelake on icelake client and
4973 (get_builtin_code_for_version): Ditto.
4974 (fold_builtin_cpu): Ditto.
4975 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
4976 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
4977 * config/i386/i386.h (processor_type): Ditto.
4978 * doc/invoke.texi: Ditto.
4980 2018-03-14 Jakub Jelinek <jakub@redhat.com>
4983 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
4984 INTEGER_CST offset, add it together with bitpos / 8 and
4985 sign extend based on POINTER_SIZE.
4989 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
4992 * config/i386/constraints.md (Yc): New register constraint.
4993 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
4994 Use Yc constraint for alternative 2 of operand 0. Remove
4995 preferred_for_speed attribute.
4997 2018-03-14 Richard Biener <rguenther@suse.de>
4999 PR tree-optimization/84830
5000 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5001 with the old one to avoid oscillations.
5003 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
5006 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5008 (assign_by_spills): Return a flag of reload assignment failure.
5009 Do not process the reload assignment failures. Do not spill other
5010 reload pseudos if they has the same reg class. Update n if
5012 (lra_assign): Add a return arg. Set up from the result of
5013 assign_by_spills call.
5014 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5015 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5016 usage_insns if it is not NULL.
5017 (spill_hard_reg_in_range): New function.
5018 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5019 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5020 function prototypes.
5021 (lra_assign): Change prototype.
5022 * lra.c (lra): Add code to deal with fails by splitting hard reg
5025 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
5027 * config/riscv/riscv.opt (mrelax): New option.
5028 * config/riscv/riscv.c (riscv_file_start): Emit ".option
5029 "norelax" when riscv_mrelax is disabled.
5030 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5032 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
5035 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5036 reassociation for int modes.
5038 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
5040 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5041 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5043 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5044 * config/aarch64/aarch64-sve.md
5045 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5046 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5047 (*extend<mode><Vwide>2): Rename to...
5048 (aarch64_sve_extend<mode><Vwide>2): ...this.
5049 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5050 renaming the old pattern to...
5051 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
5053 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5054 define_expand, renaming the old pattern to...
5055 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5056 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5057 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5058 account when deciding which SVE instruction the optab should use.
5059 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5061 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
5063 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5064 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5065 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5066 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5067 (tlsdesc_small_<mode>): Turn a define_expand and use
5068 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
5069 (tlsdesc_small_advsimd_<mode>): ...this.
5070 (tlsdesc_small_sve_<mode>): New pattern.
5072 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
5074 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5075 (UNSPEC_UMUL_HIGHPART): New constants.
5076 (MUL_HIGHPART): New int iteraor.
5077 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5078 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5080 (*<su>mul<mode>3_highpart): New define_insn.
5082 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
5085 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5088 2018-03-13 Martin Liska <mliska@suse.cz>
5091 * (sem_item_optimizer::sem_item_optimizer): Initialize new
5093 (sem_item_optimizer::~sem_item_optimizer): Release it.
5094 (sem_item_optimizer::merge_classes): Register variable aliases.
5095 (sem_item_optimizer::fixup_pt_set): New function.
5096 (sem_item_optimizer::fixup_points_to_sets): Likewise.
5097 * ipa-icf.h: Declare new variables and functions.
5099 2018-03-13 Jakub Jelinek <jakub@redhat.com>
5102 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5103 integer_pow2p@2 and test integer_pow2p in condition.
5104 (A < 0 ? C : 0): Similarly for @1.
5107 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5108 characters starting at p contain '\0' character, don't look beyond
5112 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5113 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5116 * reg-stack.c (change_stack): Change update_end var from int to
5117 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5118 also call set_block_for_insn on the newly added insns and rescan.
5121 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5122 on the last operand.
5125 * tree.c (stabilize_reference_1): Return save_expr (e) for
5126 STATEMENT_LIST even if it doesn't have side-effects.
5128 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
5130 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5132 2018-03-12 Renlin Li <renlin.li@arm.com>
5134 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5135 aarch64_output_scalar_simd_mov_immediate.
5137 2018-03-12 Martin Sebor <msebor@redhat.com>
5139 PR tree-optimization/83456
5140 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5141 for perfectly overlapping calls to memcpy.
5142 (gimple_fold_builtin_memory_chk): Same.
5143 (gimple_fold_builtin_strcpy): Handle no-warning.
5144 (gimple_fold_builtin_stxcpy_chk): Same.
5145 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5147 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
5149 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5150 parameter. Use it for SFmode.
5151 (rs6000_function_arg_advance_1): Adjust.
5152 (rs6000_function_arg): Adjust.
5153 (rs6000_gimplify_va_arg): Pass false for that new parameter.
5155 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
5157 PR rtl-optimization/84169
5158 PR rtl-optimization/84780
5159 * combine.c (can_combine_p): Check for a 2-insn combination whether
5160 the destination register is used between the two insns, too.
5162 2018-03-12 Richard Biener <rguenther@suse.de>
5164 PR tree-optimization/84803
5165 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5166 for refs DR analysis didn't process.
5168 2018-03-12 Richard Biener <rguenther@suse.de>
5170 PR tree-optimization/84777
5171 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5172 force-vectorize loops ignore whether we are optimizing for size.
5174 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
5176 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5177 (TARGET_MD_ASM_ADJUST): Define.
5179 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
5180 Kito Cheng <kito.cheng@gmail.com>
5181 Chung-Ju Wu <jasonwucj@gmail.com>
5183 * config/nds32/nds32.c (nds32_compute_stack_frame,
5184 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5185 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5186 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5187 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5188 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5189 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5190 * config/nds32/nds32.md (prologue, epilogue): Use macro
5191 NDS32_V3PUSH_AVAILABLE_P to do checking.
5193 2018-03-11 Jakub Jelinek <jakub@redhat.com>
5196 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5197 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5198 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
5199 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
5200 addition of most attributes on !orig_type_die or the attribute not
5201 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5203 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5204 Chung-Ju Wu <jasonwucj@gmail.com>
5206 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5208 * config/nds32/nds32.opt (mvh): New option.
5210 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5211 Chung-Ju Wu <jasonwucj@gmail.com>
5213 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5215 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5216 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5219 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
5220 Chung-Ju Wu <jasonwucj@gmail.com>
5222 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5224 * config/nds32/nds32-multiple.md (strlensi): New pattern.
5225 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5227 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
5228 Kito Cheng <kito.cheng@gmail.com>
5229 Chung-Ju Wu <jasonwucj@gmail.com>
5231 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5232 UNSPEC_FFMISM and UNSPEC_FLMISM.
5233 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5234 for ffb, ffmism and flmism.
5235 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5236 (unspec_ffmism): Ditto.
5237 (unspec_flmism): Ditto.
5238 (nds32_expand_builtin_impl): Check if string extension is available.
5239 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5240 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5242 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
5245 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
5248 * lra-assigns.c (assign_by_spills): Return a flag of reload
5249 assignment failure. Do not process the reload assignment
5250 failures. Do not spill other reload pseudos if they has the same
5252 (lra_assign): Add a return arg. Set up from the result of
5253 assign_by_spills call.
5254 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5255 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5256 usage_insns if it is not NULL.
5257 (spill_hard_reg_in_range): New function.
5258 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5259 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5260 function prototypes.
5261 (lra_assign): Change prototype.
5262 * lra.c (lra): Add code to deal with fails by splitting hard reg
5265 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
5268 * config/i386/i386.opt: Replace Enforcment with Enforcement.
5270 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
5273 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5274 (dw_val_node): Add val_symbolic_view.
5275 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5276 (symview_upper_bound): New.
5277 (new_line_info_table): Initialize symviews_since_reset.
5278 (dwarf2out_source_line): Count symviews_since_reset and set
5279 symview_upper_bound.
5280 (dw_val_equal_p): Handle symview.
5281 (add_AT_symview): New.
5282 (print_dw_val): Handle symview.
5283 (attr_checksum, attr_checksum_ordered): Likewise.
5284 (same_dw_val_p, size_of_die): Likewise.
5285 (value_format, output_die): Likewise.
5286 (add_high_low_attributes): Use add_AT_symview for entry_view.
5287 (dwarf2out_finish): Reset symview_upper_bound, clear
5290 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
5293 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5294 Add strict argument and use it.
5295 (rs6000_split_multireg_move): Update for new strict argument.
5296 (mem_operand_gpr): Disallow all non-offsettable addresses.
5297 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5299 2018-03-09 Jakub Jelinek <jakub@redhat.com>
5302 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5303 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5304 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5307 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5308 decl, use remap_type if we want to use the type.
5310 2018-03-09 Martin Sebor <msebor@redhat.com>
5312 PR tree-optimization/84526
5313 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5315 (builtin_access::generic_overlap): Be prepared to handle non-array
5318 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
5320 PR rtl-optimization/84682
5321 * lra-constraints.c (process_address_1): Check is_address flag
5322 for address constraints.
5323 (process_alt_operands): Likewise.
5324 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5325 preprocess_constraints.
5326 * recog.h (preprocess_constraints): Add oploc parameter.
5328 * recog.c (preprocess_constraints): Test address_operand for
5329 CT_ADDRESS constraints.
5331 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
5334 * lra-assigns.c (assign_by_spills): Return a flag of reload
5335 assignment failure. Do not process the reload assignment
5336 failures. Do not spill other reload pseudos if they has the same
5338 (lra_assign): Add a return arg. Set up from the result of
5339 assign_by_spills call.
5340 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5341 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5342 usage_insns if it is not NULL.
5343 (spill_hard_reg_in_range): New function.
5344 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5345 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5346 function prototypes.
5347 (lra_assign): Change prototype.
5348 * lra.c (lra): Add code to deal with fails by splitting hard reg
5351 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5354 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5355 Accept complain bool parameter. Only emit errors if it is true.
5356 (arm_parse_cpu_option_name): Likewise.
5357 (arm_target_thumb_only): Adjust callers of the above.
5358 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
5359 prototype to take a default true bool parameter.
5360 (arm_parse_arch_option_name): Likewise.
5362 2018-03-09 David Malcolm <dmalcolm@redhat.com>
5363 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5367 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
5368 * configure: Regenerate.
5369 * configure.ac ("linker --version-script option"): New.
5370 ("linker soname option"): New.
5372 2018-03-09 Richard Biener <rguenther@suse.de>
5374 PR tree-optimization/84775
5375 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
5376 immediate uses of predicate stmts and mark them modified.
5379 PR tree-optimization/84178
5380 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5382 (version_loop_for_if_conversion): Delay update_ssa call.
5383 (tree_if_conversion): Delay update_ssa until after predicate
5386 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
5389 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
5390 when the function accesses prior frames.
5392 2018-03-08 Jakub Jelinek <jakub@redhat.com>
5395 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
5396 gen_llsym, otherwise call maybe_gen_llsym.
5399 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
5400 has ',' character inside of it.
5402 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5405 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
5406 as clobbering CC_REGNUM.
5408 2018-03-08 Richard Biener <rguenther@suse.de>
5411 * tree-scalar-evolution.c: Include tree-into-ssa.h.
5412 (follow_copies_to_constant): Do not follow SSA names registered
5415 2018-03-08 Richard Biener <rguenther@suse.de>
5417 PR tree-optimization/84178
5418 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5420 (version_loop_for_if_conversion): Delay update_ssa call.
5421 (tree_if_conversion): Delay update_ssa until after predicate
5424 2018-03-08 David Malcolm <dmalcolm@redhat.com>
5426 PR tree-optimization/84178
5427 * tree-if-conv.c (release_bb_predicate): Remove the
5428 the assertion that the stmts have NULL use_ops.
5429 Discard the statements, asserting that they haven't
5430 yet been added to a BB.
5432 2018-03-08 Richard Biener <rguenther@suse.de>
5434 PR tree-optimization/84746
5435 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
5436 (phi_translate): Pass in destination ANTIC_OUT set.
5437 (phi_translate_1): Likewise. For a simplified result lookup
5438 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
5439 (phi_translate_set): Adjust.
5440 (do_pre_regular_insertion): Likewise.
5441 (do_pre_partial_partial_insertion): Likewise.
5443 2018-03-08 Martin Liska <mliska@suse.cz>
5445 PR gcov-profile/84735
5446 * doc/gcov.texi: Document usage of profile files.
5447 * gcov-io.h: Document changes in the format.
5449 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
5453 * dwarf2out.c (struct dw_line_info_table): Update comments for
5455 (FORCE_RESET_NEXT_VIEW): New.
5456 (FORCE_RESETTING_VIEW_P): New.
5457 (RESETTING_VIEW_P): Check for -1 too.
5458 (ZERO_VIEW_P): Likewise.
5459 (new_line_info_table): Force-reset next view.
5460 (dwarf2out_begin_function): Likewise.
5461 (dwarf2out_source_line): Simplify zero_view_p initialization.
5462 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
5463 view directly. Omit view when omitting .loc at line 0.
5465 2018-03-08 Jakub Jelinek <jakub@redhat.com>
5467 PR tree-optimization/84740
5468 * tree-switch-conversion.c (process_switch): Call build_constructors
5469 only if info.phi_count is non-zero.
5471 PR tree-optimization/84739
5472 * tree-tailcall.c (find_tail_calls): Check call arguments against
5473 DECL_ARGUMENTS (current_function_decl) rather than
5474 DECL_ARGUMENTS (func) when checking for tail recursion.
5476 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5478 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
5479 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
5480 Volker Reichelt's entry and add entries for people that perform
5481 GCC fuzzy testing and report numerous bugs.
5483 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
5486 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
5487 readonly data in sdata, if that is disabled.
5488 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
5489 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
5490 -mreadonly-in-sdata option.
5492 2018-03-07 Martin Sebor <msebor@redhat.com>
5494 PR tree-optimization/84468
5495 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
5496 basic block when looking for nul assignment.
5498 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
5501 * except.h (output_function_exception_table): Adjust prototype.
5502 * except.c (output_function_exception_table): Remove FNNAME parameter
5503 and add SECTION parameter. Ouput one part of the table at a time.
5504 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
5505 the first part of the exception table and emit unwind directives.
5506 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
5507 (i386_pe_seh_cold_init): Likewise.
5508 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
5509 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
5510 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
5511 (ix86_output_call_insn): Emit a nop in one more case for SEH.
5512 * config/i386/winnt.c: Include except.h.
5513 (struct seh_frame_state): Add reg_offset, after_prologue and
5514 in_cold_section fields.
5515 (i386_pe_seh_end_prologue): Set seh->after_prologue.
5516 (i386_pe_seh_cold_init): New function.
5517 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5518 to seh->in_cold_section.
5519 (seh_emit_push): Record the offset of the push.
5520 (seh_emit_save): Record the offet of the save.
5521 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5522 Test seh->after_prologue to disregard the epilogue.
5523 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5524 (i386_pe_end_cold_function): New function.
5526 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5529 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5530 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5533 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5535 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5536 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5539 * multiple_target.c: Include tree-inline.h and intl.h.
5540 (expand_target_clones): Diagnose and fail if node->definition and
5541 !tree_versionable_function_p (node->decl).
5543 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
5545 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5547 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5548 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5549 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5551 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5554 * combine.c (try_combine): Use reg_or_subregno instead of handling
5555 just paradoxical SUBREGs and REGs.
5557 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
5559 * config/arc/arc.c (arc_finalize_pic): Remove function.
5560 (arc_must_save_register): We use single base PIC register, remove
5561 checks to save/restore the PIC register.
5562 (arc_expand_prologue): Likewise.
5563 * config/arc/arc-protos.h (arc_set_default_type_attributes):
5565 (arc_verify_short): Likewise.
5566 (arc_attr_type): Likewise.
5567 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
5568 (walk_stores): Likewise.
5569 (arc_address_cost): Make it static.
5570 (arc_verify_short): Likewise.
5571 (branch_dest): Likewise.
5572 (arc_attr_type): Likewise.
5573 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
5574 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
5575 (arc_final_prescan_insn): Remove inserting the nops due to
5576 hardware hazards. It is done in reorg step.
5577 (insn_length_variant_t): Remove.
5578 (insn_length_parameters_t): Likewise.
5579 (arc_insn_length_parameters): Likewise.
5580 (arc_get_insn_variants): Likewise.
5581 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
5583 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5586 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
5589 PR tree-optimization/84687
5590 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
5592 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
5594 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5596 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
5597 Rename to ppc_speculation_barrier.
5598 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
5599 __builtin_ppc_speculation_barrier.
5601 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5604 * combine.c (combine_simplify_rtx): Don't try to simplify if
5605 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
5608 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
5610 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
5611 to 32 bytes when compiling for POWER9.
5613 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5616 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
5617 regparm >= 3 with no arg reg available also for calls with
5618 flag_force_indirect_call. Pass decl to ix86_function_regparm.
5621 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
5623 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
5625 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
5628 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
5630 2018-03-05 Richard Biener <rguenther@suse.de>
5632 PR tree-optimization/84486
5633 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
5634 When inserting a __builtin_assume_aligned call set the LHS
5635 SSA name alignment info accordingly.
5637 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
5639 PR tree-optimization/84114
5640 * config/aarch64/aarch64.c (aarch64_reassociation_width)
5641 Avoid reassociation of FLOAT_MODE addition.
5643 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
5645 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
5646 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
5647 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
5648 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
5649 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
5650 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
5651 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
5653 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
5654 __builtin_ia32_wbinvd): New builtins.
5655 (SPECIAL_ARGS2): New.
5656 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
5657 (SPECIAL_ARGS2): New.
5658 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
5659 (ix86_valid_target_attribute_inner_p): Ditto.
5660 (ix86_init_mmx_sse_builtins): Add special_args2.
5661 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
5662 TARGET_WBNOINVD_P): New.
5663 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
5664 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
5665 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
5666 * config/i386/immintrin.h (_wbinvd): New intrinsic.
5667 * config/i386/pconfigintrin.h: New file.
5668 * config/i386/wbnoinvdintrin.h: Ditto.
5669 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
5670 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
5672 2018-03-05 Richard Biener <rguenther@suse.de>
5674 PR tree-optimization/84670
5675 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5677 (BB_VISITED_WITH_VISITED_SUCCS): New define.
5678 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5679 (compute_antic_aux): Only assert the number of values in ANTIC_IN
5680 doesn't grow if all successors (recursively) were visited at least
5683 2018-03-05 Richard Biener <rguenther@suse.de>
5685 PR tree-optimization/84650
5686 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
5687 if executed in the loop pipeline.
5689 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
5691 * doc/configfiles.texi (Configuration Files): Move info about
5692 conditionalizing $target-protos.h to...
5693 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
5694 differs from $target-protos.h.
5696 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
5697 Chung-Ju Wu <jasonwucj@gmail.com>
5699 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
5700 * config/nds32/nds32-multiple.md (setmemsi): Define.
5701 * config/nds32/nds32-memory-manipulation.c
5702 (nds32_gen_dup_4_byte_to_word_value): New.
5703 (emit_setmem_word_loop): New.
5704 (emit_setmem_byte_loop): New.
5705 (nds32_expand_setmem_loop): New.
5706 (nds32_expand_setmem_loop_v3m): New.
5707 (nds32_expand_setmem_unroll): New.
5708 (nds32_expand_setmem): New.
5710 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5711 Chung-Ju Wu <jasonwucj@gmail.com>
5713 * config/nds32/nds32-memory-manipulation.c
5714 (nds32_emit_load_store): New.
5715 (nds32_emit_post_inc_load_store): New.
5716 (nds32_emit_mem_move): New.
5717 (nds32_emit_mem_move_block): New.
5718 (nds32_expand_movmemsi_loop_unknown_size): New.
5719 (nds32_expand_movmemsi_loop_known_size): New.
5720 (nds32_expand_movmemsi_loop): New.
5721 (nds32_expand_movmemsi_unroll): New.
5722 (nds32_expand_movmemqi): Rename ...
5723 (nds32_expand_movmemsi): ... to this.
5724 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
5725 (movmemsi): ... to this.
5726 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
5727 (nds32_expand_movmemsi): ... to this.
5729 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5730 Monk Chiang <sh.chiang04@gmail.com>
5731 Chung-Ju Wu <jasonwucj@gmail.com>
5733 * config/nds32/nds32-protos.h
5734 (nds32_expand_load_multiple): New arguments.
5735 (nds32_expand_store_multiple): Ditto.
5736 (nds32_valid_multiple_load_store): Rename ...
5737 (nds32_valid_multiple_load_store_p): ... to this.
5738 * config/nds32/nds32-memory-manipulation.c
5739 (nds32_expand_load_multiple): Refine implementation.
5740 (nds32_expand_store_multiple): Ditto.
5741 * config/nds32/nds32-multiple.md
5742 (load_multiple): Update nds32_expand_load_multiple interface.
5743 (store_multiple): Update nds32_expand_store_multiple interface.
5744 * config/nds32/nds32-predicates.c
5745 (nds32_valid_multiple_load_store): Rename ...
5746 (nds32_valid_multiple_load_store_p): ... to this and refine
5748 * config/nds32/predicates.md
5749 (nds32_load_multiple_and_update_address_operation): New predicate.
5750 (nds32_store_multiple_and_update_address_operation): New predicate.
5752 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5753 Chung-Ju Wu <jasonwucj@gmail.com>
5755 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
5756 (combo): New attribute.
5757 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
5759 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
5761 * config/nds32/nds32.opt: Change -mcmodel= default value.
5763 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
5764 Monk Chiang <sh.chiang04@gmail.com>
5765 Chung-Ju Wu <jasonwucj@gmail.com>
5767 * config/nds32/constants.md (unspec_element): New enum.
5768 * config/nds32/constraints.md (Umw): New constraint.
5769 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
5770 * config/nds32/nds32-intrinsic.md: Likewise.
5771 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
5772 (nds32_valid_smw_lwm_base_p): New.
5773 (nds32_output_smw_single_word): New.
5774 (nds32_output_lmw_single_word): New.
5775 (nds32_expand_unaligned_load): New.
5776 (nds32_expand_unaligned_store): New.
5777 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
5778 (nds32_output_smw_single_word): Declare.
5779 (nds32_output_lmw_single_word): Declare.
5780 (nds32_expand_unaligned_load): Declare.
5781 (nds32_expand_unaligned_store): Declare.
5782 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
5783 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
5784 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
5785 NDS32_BUILTIN_UASTORE_DW.
5786 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
5789 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
5790 Kito Cheng <kito.cheng@gmail.com>
5791 Chung-Ju Wu <jasonwucj@gmail.com>
5793 * config/nds32/nds32-intrinsic.c
5794 (nds32_expand_builtin_null_ftype_reg): Delete.
5795 (nds32_expand_builtin_reg_ftype_imm): Ditto.
5796 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
5797 (nds32_read_argument): New.
5798 (nds32_legitimize_target): Ditto.
5799 (nds32_legitimize_argument): Ditto.
5800 (nds32_check_constant_argument): Ditto.
5801 (nds32_expand_unop_builtin): Ditto.
5802 (nds32_expand_unopimm_builtin): Ditto.
5803 (nds32_expand_binop_builtin): Ditto.
5804 (nds32_builtin_decl_impl): Ditto.
5805 (builtin_description): Ditto.
5806 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
5807 (nds32_init_builtins_impl): Ditto.
5808 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
5809 (nds32_builtin_decl): New.
5810 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
5811 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
5813 2018-03-02 Jeff Law <law@redhat.com>
5815 * reorg.c (stop_search_p): Handle DEBUG_INSN.
5816 (redundant_insn, fill_simple_delay_slots): Likewise.
5817 (fill_slots_from_thread): Likewise.
5818 * resource.c (mark_referenced_resources): Likewise.
5819 (mark_set_resources, find_dead_or_set_registers): Likewise.
5821 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5823 * substring-locations.h (format_warning_va): Formatting fix for
5825 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
5827 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
5828 * substring-locations.c: Include intl.h.
5829 (format_warning_va): Turned into small wrapper around
5830 format_warning_n_va, renamed to ...
5831 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
5832 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
5834 (format_warning_at_substring_n): New function.
5835 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
5836 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
5837 format_warning_at_substring with just a shorter name instead of
5838 const function pointer.
5839 (fmtwarn_n): New function.
5840 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
5841 appropriate, get rid of all the fmtstr temporaries, move conditionals
5842 with G_() wrapped string literals directly into fmtwarn arguments,
5843 cast dir.len to (int), formatting fixes.
5845 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5847 * doc/invoke.texi: Remove "Cilk Plus" references.
5849 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5850 Richard Biener <rguenther@suse.de>
5853 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
5854 for error or warning attributes if CALL_FROM_THUNK_P is set.
5857 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5860 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
5861 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
5864 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
5865 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
5867 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
5868 instead of -1U in last predictors element's probability member.
5870 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5873 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5874 arguments if they are comparable.
5876 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5878 PR tree-optimization/84634
5879 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
5880 masks and masked_loop_p with a single loop_masks, making sure it's
5881 null for bb vectorization.
5883 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5885 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5886 (vect_analyze_data_ref_access): Use loop->safe_len rather than
5887 loop->force_vectorize to check whether there is no alias.
5889 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5892 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
5894 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
5896 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
5897 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
5898 instead of a loop around prev_real_insn.
5899 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
5903 * config/i386/i386.c (ix86_print_operand): Use conditional
5904 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
5907 2018-03-02 Richard Biener <rguenther@suse.de>
5909 PR tree-optimization/84427
5910 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
5911 (bitmap_set_subtract_values): Rewrite to handle multiple
5914 (prune_clobbered_mems): Likewise.
5915 (phi_translate): Take edge instead of pred/phiblock.
5916 (phi_translate_1): Likewise.
5917 (phi_translate_set): Likewise. Insert all translated
5918 exprs for a value into the set, keeping possibly multiple
5919 expressions per value.
5920 (compute_antic_aux): Adjust for phi_translate changes.
5921 When intersecting union the expressions and prune those
5922 not in the final value set, keeping possibly multiple
5923 expressions per value. Do not use value-insertion
5924 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
5925 all expressions. Add verification that the value-sets
5926 only shrink during iteration.
5927 (compute_partial_antic_aux): Adjust for the phi_translate changes.
5928 (do_pre_regular_insertion): Likewise.
5929 (do_pre_partial_partial_insertion): Likewise.
5931 2018-03-02 Richard Biener <rguenther@suse.de>
5934 * config/darwin.c (saved_debug_info_level): New static global.
5935 (darwin_asm_lto_start): Disable debug info generation for LTO out.
5936 (darwin_asm_lto_end): Restore debug info generation settings.
5938 2018-03-01 Martin Liska <mliska@suse.cz>
5941 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
5944 2018-03-01 Richard Biener <rguenther@suse.de>
5947 * dwarf2out.c (gen_variable_die): Properly handle late VLA
5948 type annotation with LTO when debug was disabled at compile-time.
5950 2018-03-01 Matthew Fortune <mfortune@gmail.com>
5952 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
5954 (mips_final_postscan_insn): Likewise.
5956 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
5958 PR rtl-optimization/84528
5959 * alias.c (init_alias_target): Add commentary.
5960 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
5961 a unique base value if the frame pointer is not eliminated
5962 to the stack pointer.
5964 2018-03-01 Tom de Vries <tom@codesourcery.com>
5966 PR rtl-optimization/83327
5967 * lra-int.h (hard_regs_spilled_into): Declare.
5968 * lra.c (hard_regs_spilled_into): Define.
5969 (init_reg_info): Init hard_regs_spilled_into.
5970 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
5971 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
5972 (process_bb_lives): Handle hard_regs_spilled_into.
5973 (lra_create_live_ranges_1): Before doing liveness propagation, clear
5974 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
5976 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
5978 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
5979 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
5980 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
5981 * config/rs6000/aix72.h: New file.
5983 2018-02-28 Jakub Jelinek <jakub@redhat.com>
5985 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
5986 instead of warning_at with conditional singular and plural messages
5990 * stor-layout.c (update_alignment_for_field): For
5991 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
5992 && !DECL_PACKED (field), do the alignment update, just use
5993 only desired_align instead of MAX (type_align, desired_align)
5995 (place_field): Don't do known_align < desired_align handling
5996 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
5997 is non-NULL, instead do it after rli->prev_field handling and
5998 only if not within a bitfield word. For DECL_PACKED (field)
5999 use type_align of BITS_PER_UNIT.
6001 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6003 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6004 superfluous parentheses and trailing spaces.
6006 2018-02-28 Richard Biener <rguenther@suse.de>
6008 PR tree-optimization/84584
6009 * graphite-scop-detection.c (scop_detection::add_scop): Discard
6010 SCoPs with fake exit edge.
6012 2018-02-28 Martin Liska <mliska@suse.cz>
6015 * timevar.c (timer::print): Fix format to properly print 100%
6018 2018-02-28 Richard Biener <rguenther@suse.de>
6021 * genmatch.c (capture_info::walk_match): Do not mark
6022 captured expressions without operands as expr_p given
6023 they act more like predicates and should be subject to
6024 "lost tail" side-effect preserving.
6026 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
6028 PR rtl-optimization/81611
6029 * auto-inc-dec.c (attempt_change): Move dead note from
6030 mem_insn if it's the next use of regno
6031 (find_address): Take address use of reg holding
6032 non-incremented value. Add parm to limit search to the named
6034 (merge_in_block): Attempt to use a mem insn that is the next
6035 use of the original regno.
6037 2018-02-27 Martin Sebor <msebor@redhat.com>
6040 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6041 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6043 2018-02-27 Martin Sebor <msebor@redhat.com>
6045 PR translation/84207
6046 * diagnostic-core.h (warning_n, error_n, inform_n): Change
6047 n argument to unsigned HOST_WIDE_INT.
6048 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6049 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
6050 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6051 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6053 2018-02-27 Richard Biener <rguenther@suse.de>
6055 PR tree-optimization/84512
6056 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6057 Do not use the estimate returned from record_stmt_cost for
6058 the scalar iteration cost but sum properly using add_stmt_cost.
6060 2018-02-27 Richard Biener <rguenther@suse.de>
6062 PR tree-optimization/84466
6063 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6064 Adjust last change to less strictly validate use operands.
6066 2018-02-27 Martin Liska <mliska@suse.cz>
6068 PR gcov-profile/84548
6069 * gcov.c (process_file): Allow partial overlap and consider it
6070 also as group functions.
6071 (output_lines): Properly calculate range of lines for a group.
6073 2018-02-27 Martin Liska <mliska@suse.cz>
6075 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6076 'ggc' suffixes. Change first column width.
6077 (timer::print): Fix formatting of the column.
6079 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
6081 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6082 preserve inline entry blocks for the sake of debug inline
6083 entry point markers alone.
6084 (remove_unused_locals): Suggest in comments a better place to
6085 force the preservation of inline entry blocks that are
6086 otherwise unused, but do not preserve them.
6088 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
6090 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6092 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
6095 * config/i386/constraints.md (Bs): Replace
6096 ix86_indirect_branch_register with
6097 TARGET_INDIRECT_BRANCH_REGISTER.
6099 * config/i386/i386.md (indirect_jump): Likewise.
6100 (tablejump): Likewise.
6101 (*sibcall_memory): Likewise.
6102 (*sibcall_value_memory): Likewise.
6103 Peepholes of indirect call and jump via memory: Likewise.
6104 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6105 (*sibcall_value_GOT_32): Likewise.
6106 * config/i386/predicates.md (indirect_branch_operand): Likewise.
6107 (GOT_memory_operand): Likewise.
6108 (call_insn_operand): Likewise.
6109 (sibcall_insn_operand): Likewise.
6110 (GOT32_symbol_operand): Likewise.
6111 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6113 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
6115 PR rtl-optimization/83496
6116 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6117 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
6118 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6119 redundant insn, if any.
6120 (relax_delay_slots): Likewise.
6121 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6123 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
6125 PR tree-optimization/83965
6126 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6127 that grouped statements are part of a reduction chain. Return
6128 true if the statement is not marked as a reduction itself but
6130 (vect_recog_dot_prod_pattern): Don't check whether the statement
6131 is part of a group here.
6132 (vect_recog_sad_pattern): Likewise.
6133 (vect_recog_widen_sum_pattern): Likewise.
6135 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
6138 * final.c (rest_of_clean_state): Also look for calls inside sequences.
6140 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
6143 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6145 (ix86_output_indirect_function_return): New prototype.
6146 (ix86_split_simple_return_pop_internal): Likewise.
6147 * config/i386/i386.c (indirect_return_via_cx): New.
6148 (indirect_return_via_cx_bnd): Likewise.
6149 (indirect_thunk_name): Handle return va CX_REG.
6150 (output_indirect_thunk_function): Create alias for
6151 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6152 (ix86_output_indirect_jmp): Remove the bool argument.
6153 (ix86_output_indirect_function_return): New function.
6154 (ix86_split_simple_return_pop_internal): Likewise.
6155 * config/i386/i386.md (*indirect_jump): Don't pass false
6156 to ix86_output_indirect_jmp.
6157 (*tablejump_1): Likewise.
6158 (simple_return_pop_internal): Change it to define_insn_and_split.
6159 Call ix86_split_simple_return_pop_internal to split it for
6161 (simple_return_indirect_internal): Call
6162 ix86_output_indirect_function_return instead of
6163 ix86_output_indirect_jmp.
6165 2018-02-26 Jakub Jelinek <jakub@redhat.com>
6168 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6169 memset and value initialization afterwards.
6171 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
6173 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6175 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6178 * common/config/aarch64/aarch64-common.c
6179 (aarch_option_optimization_table[]): Switch
6180 off fomit-frame-pointer
6182 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
6183 Chung-Ju Wu <jasonwucj@gmail.com>
6185 * config/nds32/nds32-multiple.md (load_multiple): Disallow
6187 (store_multiple): Ditto.
6189 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
6191 * config.gcc: Add --with-cpu support for nds32 target.
6192 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6193 * config/nds32/nds32.opt: Add -mcpu= option.
6195 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
6197 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6198 isel=yes): Warn for these deprecated options.
6200 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
6202 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6203 ISA_2_5_MASKS_EMBEDDED.
6205 2018-02-23 Jakub Jelinek <jakub@redhat.com>
6207 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6208 p->max as pointers rather than using iterative_hash_expr.
6210 2018-02-23 Carl Love <cel@us.ibm.com>
6212 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6213 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6215 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6216 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6217 P8V_BUILTIN_VEC_VUNSIGNED2.
6219 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
6222 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6223 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6225 * lra-constraints.c (curr_insn_transform): Set up
6226 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
6228 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6229 * lra-eliminations.c (spill_pseudos): Ditto.
6230 (process_insn_for_elimination): Ditto.
6231 * lra-lives.c (reg_early_clobber_p): Use the new macros.
6232 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6233 LRA_NON_CLOBBERED_ALT.
6235 2018-02-22 Martin Sebor <msebor@redhat.com>
6237 PR tree-optimization/84480
6238 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6239 to maybe_diag_stxncpy_trunc. Call it.
6240 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6241 from gimple_fold_builtin_strcpy. Print inlining stack.
6242 (handle_builtin_stxncpy): Print inlining stack.
6243 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6245 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
6248 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6249 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6250 and -fcheck-pointer-bounds are used together.
6251 (indirect_thunk_prefix): New enum.
6252 (indirect_thunk_need_prefix): New function.
6253 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
6254 "_nt" instead of "_bnd" for NOTRACK prefix.
6255 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6256 (output_indirect_thunk_function): Likewise.
6258 (ix86_code_end): Update output_indirect_thunk_function calls.
6259 (ix86_output_indirect_branch_via_reg): Replace
6260 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6261 (ix86_output_indirect_branch_via_push): Likewise.
6262 (ix86_output_function_return): Likewise.
6263 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6264 incompatible with -fcf-protection=branch and
6265 -fcheck-pointer-bounds.
6267 2018-02-22 Steve Ellcey <sellcey@cavium.com>
6270 * config/aarch64/aarch64.c (aarch64_print_address_internal):
6271 Change gcc_assert call to output_operand_lossage.
6273 2018-02-22 Steve Ellcey <sellcey@cavium.com>
6275 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6277 2018-02-22 DJ Delorie <dj@redhat.com>
6278 Sebastian Perta <sebastian.perta@renesas.com>
6279 Oleg Endo <olegendo@gcc.gnu.org>
6281 * config/rx/rx.c (rx_rtx_costs): New function.
6282 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6284 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
6286 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6288 2018-02-22 Martin Liska <mliska@suse.cz>
6291 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6292 Add "native" as a possible value.
6294 2018-02-22 Martin Liska <mliska@suse.cz>
6297 * config/i386/i386.c (ix86_option_override_internal):
6298 Add "native" as a possible value for -march and -mtune.
6300 2018-02-22 Jakub Jelinek <jakub@redhat.com>
6303 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6304 to all type variants.
6306 PR tree-optimization/84503
6307 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6308 width as info->bitpos + info->bitsize - start.
6309 (merged_store_group::merge_overlapping): Simplify width computation.
6310 (check_no_overlap): New function.
6311 (imm_store_chain_info::try_coalesce_bswap): Compute expected
6312 start + width and last_order of the group, fail if check_no_overlap
6314 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6315 to group if check_no_overlap fails.
6317 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
6319 * config/rs6000/altivec.md: Delete contraint arguments to
6320 define_expand, define_split, and define_peephole2, and in
6321 define_insn_and_split if always unused.
6322 * config/rs6000/darwin.md: Ditto.
6323 * config/rs6000/dfp.md: Ditto.
6324 * config/rs6000/rs6000.md: Ditto.
6325 * config/rs6000/sync.md: Ditto.
6326 * config/rs6000/vector.md: Ditto.
6327 * config/rs6000/vsx.md: Ditto.
6329 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
6331 * config/rs6000/altivec.md: Write output control strings as braced
6332 blocks instead of double-quoted strings.
6333 * config/rs6000/darwin.md: Ditto.
6334 * config/rs6000/rs6000.md: Ditto.
6335 * config/rs6000/vector.md: Ditto.
6336 * config/rs6000/vsx.md: Ditto.
6338 2018-02-21 Jason Merrill <jason@redhat.com>
6340 PR c++/84314 - ICE with templates and fastcall attribute.
6341 * attribs.c (build_type_attribute_qual_variant): Remove assert.
6343 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
6345 * ipa-cp.c (determine_versionability): Fix comment typos.
6347 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
6350 * ipa-cp.c (determine_versionability): Do not version functions caling
6353 2018-02-21 Martin Liska <mliska@suse.cz>
6356 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
6357 Add "native" as a possible value.
6358 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
6359 the macro when native cpu detection is available.
6361 2018-02-21 Martin Liska <mliska@suse.cz>
6364 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
6365 Add "native" as a possible value.
6366 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
6367 when native cpu detection is available.
6369 2018-02-21 Jakub Jelinek <jakub@redhat.com>
6370 Martin Sebor <msebor@redhat.com>
6372 PR tree-optimization/84478
6373 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
6375 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
6376 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
6377 support which is conservatively correct, for 2 only stay conservative
6378 for maxlen. Formatting and comment capitalization fixes. Add STRICT
6379 argument to the 2 argument get_range_strlen, adjust 6 arg
6380 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
6382 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
6383 (gimple_fold_builtin_strlen): Pass true as last argument to
6386 2018-02-20 Martin Sebor <msebor@redhat.com>
6389 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
6390 (builtin_memref::set_base_and_offset): Same. Handle inner references.
6391 (builtin_memref::builtin_memref): Factor out parts into
6392 set_base_and_offset and call it.
6394 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
6397 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
6398 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
6399 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
6400 search at the associated MODE_INT.
6402 2018-02-20 Jeff Law <law@redhat.com>
6405 PR tree-optimization/81592
6407 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
6408 for range data rather than using global data.
6409 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
6410 range data rather than using global data.
6411 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
6412 pass it to children as needed.
6413 (struct directive::fmtresult): Similarly.
6414 (struct directive::set_width): Similarly.
6415 (struct directive::set_precision): Similarly.
6416 (format_integer, format_directive, parse_directive): Similarly.
6417 (format_none): Accept unnamed vr_values parameter.
6418 (format_percent, format_floating, format_character): Similarly.
6419 (format_string, format_plain): Similarly.
6420 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
6421 the EVRP range analyzer for range data rather than using global data.
6422 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
6423 gimple-ssa-evrp-analyze.h
6424 (class sprintf_dom_walker): Add after_dom_children member function.
6425 Add evrp_range_analyzer member.
6426 (sprintf_dom_walker::before_dom_children): Call into the EVRP
6427 range analyzer as needed.
6428 (sprintf_dom_walker::after_dom_children): New member function.
6429 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
6431 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
6432 (evrp_range_analyzer::pop_to_marker): Likewise.
6434 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
6436 PR tree-optimization/84419
6437 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
6438 with the required type if its current type is compatible but
6441 2018-02-20 Jakub Jelinek <jakub@redhat.com>
6444 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
6445 after vectorization.
6447 2018-02-20 Martin Liska <mliska@suse.cz>
6450 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
6451 possible values if we don't have a hint.
6453 2018-02-20 Martin Liska <mliska@suse.cz>
6457 * final.c (shorten_branches): Build align_tab array with one
6459 * opts.c (finish_options): Add alignment option limit check.
6460 (MAX_CODE_ALIGN): Likewise.
6461 (MAX_CODE_ALIGN_VALUE): Likewise.
6462 * doc/invoke.texi: Document maximum allowed option value for
6463 all -falign-* options.
6465 2018-02-19 Jakub Jelinek <jakub@redhat.com>
6468 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6469 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6470 * var-tracking.c (emit_note_insn_var_location): Remove all references
6471 to NOTE_INSN_CALL_ARG_LOCATION.
6472 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
6473 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
6474 Use copy_rtx_if_shared.
6475 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
6476 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
6477 (dwarf2out_var_location): Remove handling of
6478 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
6480 * final.c (final_scan_insn): Remove all references to
6481 NOTE_INSN_CALL_ARG_LOCATION.
6482 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
6483 before dumping final insns.
6484 * except.c (emit_note_eh_region_end): Remove all references to
6485 NOTE_INSN_CALL_ARG_LOCATION.
6486 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
6487 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
6488 * config/arc/arc.c (hwloop_optimize): Likewise.
6489 * config/arm/arm.c (create_fix_barrier): Likewise.
6490 * config/s390/s390.c (s390_chunkify_start): Likewise.
6491 * config/sh/sh.c (find_barrier): Likewise.
6492 * config/i386/i386.c (rest_of_insert_endbranch,
6493 ix86_seh_fixup_eh_fallthru): Likewise.
6494 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
6495 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
6496 * config/frv/frv.c (frv_function_prologue): Likewise.
6497 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
6499 (note_outside_basic_block_p): Remove all references to
6500 NOTE_INSN_CALL_ARG_LOCATION.
6501 * gengtype.c (adjust_field_rtx_def): Likewise.
6502 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
6504 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
6505 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
6508 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
6511 PR tree-optimization/84452
6512 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
6513 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6516 2018-02-19 Martin Liska <mliska@suse.cz>
6519 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6521 2018-02-19 Martin Liska <mliska@suse.cz>
6522 Richard Sandiford <richard.sandiford@linaro.org>
6524 PR tree-optimization/82491
6525 * gimple-fold.c (get_base_constructor): Make earlier bail out
6528 2018-02-19 Carl Love <cel@us.ibm.com>
6530 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6531 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6533 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6534 P8V_BUILTIN_VEC_NEG.
6536 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
6538 * config/rl78/rl78.md (movdf): New define expand.
6540 2018-02-19 Martin Liska <mliska@suse.cz>
6543 * doc/invoke.texi: Fix typo.
6544 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6546 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
6548 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6549 handle rs6000_single_float and rs6000_double_float specially for
6552 2018-02-16 Jeff Law <law@redhat.com>
6554 * config/rx/rx.c (add_pop_cfi_notes): New function.;
6557 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6560 * ipa-inline.c (inline_small_functions): Fix a typo.
6562 2018-02-16 Nathan Sidwell <nathan@acm.org>
6564 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
6566 2018-02-16 Carl Love <cel@us.ibm.com>
6568 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
6569 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
6570 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
6571 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
6572 expansion to P8V_BUILTIN_VEC_FLOAT2.
6574 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
6576 PR rtl-optimization/70023
6577 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
6578 src_regno into account.
6580 2018-02-16 Carl Love <cel@us.ibm.com>
6582 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
6583 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
6584 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
6585 * config/rs6000/rs6000.c: Remove case statements for
6586 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
6587 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
6588 and P9V_BUILTIN_VEC_VINSERT4B.
6589 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
6590 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
6591 * config/rs6000/vsx.md:
6592 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
6595 2018-02-16 Carl Love <cel@us.ibm.com>
6597 * config/rs6000/altivec.h: Add builtin names vec_extract4b
6599 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
6601 * config/rs6000/rs6000-c.c: Add the definitions for
6602 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
6603 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
6604 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
6605 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
6606 definition for insert4b and define insn *insert3b_internal.
6607 * doc/extend.texi: Add documentation for vec_extract4b.
6609 2018-02-16 Nathan Sidwell <nathan@acm.org>
6611 * doc/extend.texi (Backwards Compatibility): Mention friend
6612 injection. Note for-scope is deprecated.
6613 * doc/invoke.texi (-ffriend-injection): Deprecate.
6615 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
6617 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
6618 that moved to I2, also allow destinations that are a paradoxical
6619 subreg (instead of a normal reg).
6621 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
6624 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
6627 2018-02-16 Richard Biener <rguenther@suse.de>
6629 PR tree-optimization/84037
6630 PR tree-optimization/84016
6632 * config/i386/i386.c (ix86_builtin_vectorization_cost):
6633 Adjust vec_construct for the fact we need additional higher latency
6634 128bit inserts for AVX256 and AVX512 vector builds.
6635 (ix86_add_stmt_cost): Scale vector construction cost for
6638 2018-02-16 Richard Biener <rguenther@suse.de>
6640 PR tree-optimization/84417
6641 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
6642 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
6643 (non_rewritable_lvalue_p): Likewise, use poly-ints.
6645 2018-02-16 Martin Liska <mliska@suse.cz>
6648 * internal-fn.def (ASAN_CHECK): Set proper flags.
6649 (ASAN_MARK): Likewise.
6651 2018-02-16 Julia Koval <julia.koval@intel.com>
6653 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
6654 from PTA_CANNONLAKE.
6656 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6659 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
6660 Use ++iter rather than iter++ for std::list iterators.
6661 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
6662 defer deleting them until all nodes in the forest are processed. Do
6663 free even leaf nodes. Change to_process into auto_vec.
6666 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
6667 * vec.h (vec_default_construct): Use memset instead of placement new
6668 if BROKEN_VALUE_INITIALIZATION is defined.
6669 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
6670 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
6673 PR rtl-optimization/83723
6674 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
6675 * lra.c (lra_substitute_pseudo): Likewise. If true, use
6676 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
6678 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
6680 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
6682 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
6684 PR rtl-optimization/81443
6685 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
6686 from inner REGs to paradoxical SUBREGs.
6688 2018-02-16 Richard Biener <rguenther@suse.de>
6690 PR tree-optimization/84399
6691 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6692 For operands we can analyze at their definition make sure we can
6693 analyze them at each use as well.
6695 2018-02-16 Richard Biener <rguenther@suse.de>
6697 PR tree-optimization/84190
6698 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
6699 volatile accesses if the decl isn't volatile.
6701 2018-02-15 Jason Merrill <jason@redhat.com>
6703 PR c++/84314 - ICE with templates and fastcall attribute.
6704 * attribs.c (build_type_attribute_qual_variant): Don't clobber
6705 TYPE_CANONICAL on an existing type.
6707 2018-02-15 Jakub Jelinek <jakub@redhat.com>
6709 PR tree-optimization/84383
6710 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
6711 dstoff nor call operand_equal_p if dstbase is NULL.
6713 PR tree-optimization/84334
6714 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
6715 also a CONSTANT_CLASS_P, punt.
6717 2018-02-14 Jim Wilson <jimw@sifive.com>
6719 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
6720 first SMALL_OPERAND check. New local min_second_step. Move assert
6721 to where locals are set. Add TARGET_RVC support.
6722 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
6724 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
6726 * doc/invoke.texi: Correct -Wformat-overflow code sample.
6728 2018-02-14 Martin Sebor <msebor@redhat.com>
6730 PR tree-optimization/83698
6731 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
6732 arrays constrain the offset range to their bounds.
6733 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
6734 (builtin_access::overlap): Avoid setting the size of overlap if it's
6736 (maybe_diag_overlap): Also consider arrays when deciding what values
6737 of offsets to include in diagnostics.
6739 2018-02-14 Martin Sebor <msebor@redhat.com>
6742 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
6743 that correspond to the kind of a declaration.
6745 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
6748 * config/pa/pa.md: Load address of PIC label using the linkage table
6749 if the label is nonlocal.
6751 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
6753 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
6754 warning message if user requests -maltivec=be.
6755 * doc/invoke.texi: Document deprecation of -maltivec=be.
6757 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
6760 * config/rs6000/rs6000-c.c: Update definitions for
6761 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
6762 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
6764 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6767 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
6768 add _get_ssp intrinsics. Remove argument from
6769 __builtin_ia32_rdssp[d|q].
6770 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
6771 * config/i386/i386-builtin.def: Remove argument from
6772 __builtin_ia32_rdssp[d|q].
6773 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
6774 ix86_expand_special_args_builtin for _rdssp[d|q].
6775 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
6776 Clear register before usage.
6777 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
6778 Add documentation for new _get_ssp and _inc_ssp intrinsics.
6780 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
6782 PR tree-optimization/84357
6783 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
6784 operand 1 of an ARRAY_REF too.
6786 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
6789 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
6790 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6792 (set_of_reg): New struct.
6793 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
6794 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
6795 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6797 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
6798 Split into bitclr, bitset, bitinvert patterns if appropriate.
6799 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
6800 use rx_fuse_in_memory_bitop.
6801 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
6802 to named insn, correct maximum insn length.
6804 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
6807 * machmode.def: Define a complex mode for PARTIAL_INT.
6808 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
6810 * doc/rtl.texi: Document CSPImode.
6811 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
6813 (msp430_hard_regno_nregs_with_padding): Likewise.
6815 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
6818 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
6820 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
6822 PR rtl-optimization/84169
6823 * combine.c (try_combine): New variable split_i2i3. Set it to true if
6824 we generated a parallel as new i3 and we split that to new i2 and i3
6825 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
6826 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
6827 those to i2, not i1. Partially rewrite this scan code.
6829 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6832 * stor-layout.c (place_field): For variable length fields, adjust
6833 offset_align afterwards not just based on the field's alignment,
6834 but also on the size.
6837 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
6838 of exps and logs in the use_exp2 case.
6840 2018-02-13 Jeff Law <law@redhat.com>
6842 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
6845 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
6848 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
6852 * common.opt (gas-loc-support, gas-locview-support): New.
6853 (ginline-points, ginternal-reset-location-views): New.
6854 * doc/invoke.texi: Document them. Use @itemx where intended.
6855 (gvariable-location-views): Adjust.
6856 * target.def (reset_location_view): New.
6857 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
6858 (TARGET_RESET_LOCATION_VIEW): New.
6859 * doc/tm.texi: Rebuilt.
6860 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
6861 (dwarf2out_default_as_locview_support): New.
6862 (output_asm_line_debug_info): Use option variables.
6863 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
6864 (output_loc_list): Likewise.
6865 (add_high_low_attributes): Check option variables.
6866 Don't output entry view attribute in strict mode.
6867 (gen_inlined_subroutine_die): Check option variables.
6868 (dwarf2out_inline_entry): Likewise.
6869 (init_sections_and_labels): Likewise.
6870 (dwarf2out_early_finish): Likewise.
6871 (maybe_reset_location_view): New, from...
6872 (dwarf2out_var_location): ... here. Call it.
6873 * debug.h (dwarf2out_default_as_loc_support): Declare.
6874 (dwarf2out_default_as_locview_support): Declare.
6875 * hooks.c (hook_int_rtx_insn_0): New.
6876 * hooks.h (hook_int_rtx_insn_0): Declare.
6877 * toplev.c (process_options): Take -gas-loc-support and
6878 -gas-locview-support from dwarf2out. Enable
6879 -gvariable-location-views by default only with locview
6880 assembler support. Enable -ginternal-reset-location-views by
6881 default only if the target defines the corresponding hook.
6882 Enable -ginline-points by default if location views are
6883 enabled; force it disabled if statement frontiers are
6885 * tree-inline.c (expand_call_inline): Check option variables.
6886 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6888 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6890 PR tree-optimization/84321
6891 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
6892 handling. Also check whether the anti-range contains any values
6893 that satisfy the mask; switch to a VR_RANGE if not.
6895 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
6898 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
6900 2018-02-13 Martin Jambor <mjambor@suse.cz>
6903 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
6904 of call statements, also set location of a load to a temporary.
6906 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
6908 * config/rl78/rl78.c (add_vector_labels): New function.
6909 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
6910 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
6911 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
6912 which checks that no arguments are passed.
6913 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
6914 * doc/extend.texi: Documentation for the new attribute.
6916 2018-02-13 Andreas Schwab <schwab@suse.de>
6918 * config/riscv/linux.h (CPP_SPEC): Define.
6920 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6923 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
6924 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
6925 OPTION_MASK_ISA_AES as first argument to def_builtin_const
6926 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
6927 instead of OPTION_MASK_ISA_PCLMUL as first argument to
6928 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
6929 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
6930 temporarily for AES and PCLMUL builtins.
6932 PR tree-optimization/84339
6933 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
6934 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
6938 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
6939 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
6940 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
6942 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
6944 * omp-simd-clone.h: New file.
6945 * omp-simd-clone.c: Include omp-simd-clone.h.
6946 (expand_simd_clones): No longer static.
6947 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
6948 cgraph.h and omp-simd-clone.h.
6949 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
6950 (vect_recog_widen_shift_pattern): Formatting fix.
6951 (vect_pattern_recog_1): Don't check optab for calls.
6954 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
6955 operands[2] into a REG before using gen_lowpart on it.
6957 2018-02-12 Jeff Law <law@redhat.com>
6960 * config/sh/sh.c (find_barrier): Consider a sibling call
6963 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
6964 successfully back substituting a reg.
6966 2018-02-12 Richard Biener <rguenther@suse.de>
6968 PR tree-optimization/84037
6969 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
6970 parameter, move visited init to caller.
6971 (vect_slp_analyze_operations): Separate cost from validity
6972 check, initialize visited once for all instances.
6973 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
6975 * tree-vect-stmts.c (vect_model_simple_cost): Make early
6977 (vect_model_promotion_demotion_cost): Likewise.
6978 (vectorizable_bswap): Guard cost modeling with !slp_node
6979 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
6981 (vectorizable_call): Likewise.
6982 (vectorizable_conversion): Likewise.
6983 (vectorizable_assignment): Likewise.
6984 (vectorizable_shift): Likewise.
6985 (vectorizable_operation): Likewise.
6986 (vectorizable_store): Likewise.
6987 (vectorizable_load): Likewise.
6988 (vectorizable_condition): Likewise.
6989 (vectorizable_comparison): Likewise.
6991 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
6994 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
6995 (ASAN_MARK): Fix fnspec to account for return value, change pointer
6996 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
6998 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
7001 * params.def (inline-min-speedup): Increase from 8 to 15.
7002 (max-inline-insns-auto): Decrease from 40 to 30.
7003 * ipa-split.c (consider_split): Add some buffer for function to
7004 be considered inlining candidate.
7005 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7008 2018-02-12 Richard Biener <rguenther@suse.de>
7010 PR tree-optimization/84037
7011 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7012 matched stmts if we cannot swap the non-matched ones.
7014 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
7016 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7017 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7018 _mm_maskz_scalef_round_ss): New intrinsics.
7019 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7020 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7021 __builtin_ia32_scalefss_round): Remove.
7022 (__builtin_ia32_scalefsd_mask_round,
7023 __builtin_ia32_scalefss_mask_round): New intrinsics.
7024 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7025 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7026 ((match_operand:VF_128 2 "<round_nimm_predicate>"
7027 "<round_constraint>")): Changed to ...
7028 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7029 "<round_scalar_constraint>")): ... this.
7030 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7031 %0, %1, %2<round_op3>}"): Changed to ...
7032 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7033 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7034 %2<round_scalar_mask_op3>}"): ... this.
7035 * config/i386/subst.md (round_scalar_nimm_predicate): New.
7037 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
7039 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7040 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7041 (_mm_maskz_sqrt_round_ss): New intrinsics.
7042 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7043 (__builtin_ia32_sqrtsd_mask_round)
7044 (__builtin_ia32_sqrtss_mask_round): New builtins.
7045 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7046 (__builtin_ia32_sqrtss_round): Remove.
7047 (__builtin_ia32_sqrtsd_mask_round)
7048 (__builtin_ia32_sqrtss_mask_round): New builtins.
7049 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7050 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7051 ((match_operand:VF_128 1 "vector_operand"
7052 "xBm,<round_constraint>")): Changed to ...
7053 ((match_operand:VF_128 1 "vector_operand"
7054 "xBm,<round_scalar_constraint>")): ... this.
7055 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7056 %0, %2, %<iptr>1<round_op3>}): Changed to ...
7057 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7058 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7059 %<iptr>1<round_scalar_mask_op3>}): ... this.
7060 ((set_attr "prefix" "<round_prefix>")): Changed to ...
7061 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7063 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
7066 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7067 Cast vec_cmpeq result to correct type.
7068 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7069 Cast vec_cmpgt result to correct type.
7071 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
7073 * final.c (final_scan_insn_1): Renamed from...
7074 (final_scan_insn): ... this. New wrapper, to recover
7075 seen from the outermost call in recursive ones.
7076 * config/sparc/sparc.c (output_return): Drop seen from call.
7077 (output_sibcall): Likewise.
7078 * config/visium/visium.c (output_branch): Likewise.
7080 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
7082 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7085 2018-02-10 Alan Modra <amodra@gmail.com>
7088 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7089 Specify LR as an input.
7091 2018-02-10 Jakub Jelinek <jakub@redhat.com>
7094 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7095 remove_member_access_dummy_vars): New functions.
7096 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7097 lower_omp_1, execute_lower_omp): Use them.
7099 PR rtl-optimization/84308
7100 * shrink-wrap.c (spread_components): Release todo vector.
7102 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
7104 PR rtl-optimization/57193
7105 * ira-color.c (struct allocno_color_data): Add member
7106 conflict_allocno_hard_prefs.
7107 (update_conflict_allocno_hard_prefs): New.
7108 (bucket_allocno_compare_func): Add a preference based on
7109 conflict_allocno_hard_prefs.
7110 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7111 (color_allocnos): Remove a dead code. Initiate
7112 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
7114 2018-02-09 Jakub Jelinek <jakub@redhat.com>
7117 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7118 constraint from =wa to wa. Avoid a subreg on the output operand,
7119 instead use a pseudo and subreg it in a move.
7120 (p9_xxbrd_<mode>): Changed to ...
7121 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7122 (p9_xxbrd_v2df): New expander.
7123 (p9_xxbrw_<mode>): Changed to ...
7124 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7125 (p9_xxbrw_v4sf): New expander.
7127 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
7129 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7131 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
7134 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7135 multiply in 32-bit mode.
7136 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7137 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7140 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
7142 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7143 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7144 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7145 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7147 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
7150 * dwarf2out.c (is_trivial_indirect_ref): New function.
7151 (dwarf2out_late_global_decl): Do not generate a location
7152 attribute for variables that have a non-trivial DECL_VALUE_EXPR
7153 and that are not defined in the current unit.
7155 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
7157 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7158 instead of a libcall for UNORDERED.
7160 2018-02-09 Tamar Christina <tamar.christina@arm.com>
7163 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7164 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7166 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7169 * config/s390/s390.c (s390_set_current_function): Invoke
7170 s390_indirect_branch_settings also if fndecl didn't change.
7172 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
7174 * config/rs6000/rs6000.md (blockage): Set length to zero.
7176 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
7178 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7180 2018-02-09 Jakub Jelinek <jakub@redhat.com>
7183 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7184 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7188 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7189 PARALLEL incoming that failed vt_get_decl_and_offset check.
7192 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7193 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7195 (get_variable_section): For decls in named .bss* sections pass true as
7196 second argument to bss_initializer_p.
7198 2018-02-09 Marek Polacek <polacek@redhat.com>
7199 Jakub Jelinek <jakub@redhat.com>
7202 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7203 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
7204 Sync some changes from cxx_fold_indirect_ref.
7206 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
7208 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7210 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7211 (BLOCK_INLINE_ENTRY_LABEL): New.
7212 (dwarf2out_var_location): Disregard inline entry markers.
7213 (inline_entry_data): New struct.
7214 (inline_entry_data_hasher): New hashtable type.
7215 (inline_entry_data_hasher::hash): New.
7216 (inline_entry_data_hasher::equal): New.
7217 (inline_entry_data_table): New variable.
7218 (add_high_low_attributes): Add DW_AT_entry_pc and
7219 DW_AT_GNU_entry_view attributes if a pending entry is found
7220 in inline_entry_data_table. Add old entry_pc attribute only
7221 if debug nonbinding markers are disabled.
7222 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7223 markers are enabled.
7224 (block_within_block_p, dwarf2out_inline_entry): New.
7225 (dwarf2out_finish): Check that no entries remained in
7226 inline_entry_data_table.
7227 * final.c (reemit_insn_block_notes): Handle inline entry notes.
7228 (final_scan_insn, notice_source_line): Likewise.
7229 (rest_of_clean_state): Skip inline entry markers.
7230 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7232 * gimple.c (gimple_build_debug_inline_entry): New.
7233 * gimple.h (enum gimple_debug_subcode): Add
7234 GIMPLE_DEBUG_INLINE_ENTRY.
7235 (gimple_build_debug_inline_entry): Declare.
7236 (gimple_debug_inline_entry_p): New.
7237 (gimple_debug_nonbind_marker_p): Adjust.
7238 * insn-notes.def (INLINE_ENTRY): New.
7239 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7240 inline entry marker notes.
7241 (print_insn): Likewise.
7242 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7243 (INSN_DEBUG_MARKER_KIND): Likewise.
7244 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7245 * tree-inline.c (expand_call_inline): Build and insert
7246 debug_inline_entry stmt.
7247 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7248 inline entry blocks early, if nonbind markers are enabled.
7249 (dump_scope_block): Dump fragment info.
7250 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7251 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7252 (gimple_build_debug_inline_entry): New.
7253 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7254 Enable/disable inline entry points too.
7255 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7256 (DEBUG_INSN): Describe inline entry markers.
7258 * common.opt (gvariable-location-views): New.
7259 (gvariable-location-views=incompat5): New.
7260 * config.in: Rebuilt.
7261 * configure: Rebuilt.
7262 * configure.ac: Test assembler for view support.
7263 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7264 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7265 * dwarf2out.c (var_loc_view): New typedef.
7266 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7267 (dwarf2out_locviews_in_attribute): New.
7268 (dwarf2out_locviews_in_loclist): New.
7269 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7270 (enum dw_line_info_opcode): Add LI_adv_address.
7271 (struct dw_line_info_table): Add view.
7272 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7273 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7274 (zero_view_p): New variable.
7275 (ZERO_VIEW_P): New macro.
7276 (output_asm_line_debug_info): New.
7277 (struct var_loc_node): Add view.
7278 (add_AT_view_list, AT_loc_list): New.
7279 (add_var_loc_to_decl): Add view param. Test it against last.
7280 (new_loc_list): Add view params. Record them.
7281 (AT_loc_list_ptr): Handle loc and view lists.
7282 (view_list_to_loc_list_val_node): New.
7283 (print_dw_val): Handle dw_val_class_view_list.
7284 (size_of_die): Likewise.
7285 (value_format): Likewise.
7286 (loc_list_has_views): New.
7287 (gen_llsym): Set vl_symbol too.
7288 (maybe_gen_llsym, skip_loc_list_entry): New.
7289 (dwarf2out_maybe_output_loclist_view_pair): New.
7290 (output_loc_list): Output view list or entries too.
7291 (output_view_list_offset): New.
7292 (output_die): Handle dw_val_class_view_list.
7293 (output_dwarf_version): New.
7294 (output_compilation_unit_header): Use it.
7295 (output_skeleton_debug_sections): Likewise.
7296 (output_rnglists, output_line_info): Likewise.
7297 (output_pubnames, output_aranges): Update version comments.
7298 (output_one_line_info_table): Output view numbers in asm comments.
7299 (dw_loc_list): Determine current endview, pass it to new_loc_list.
7300 Call maybe_gen_llsym.
7301 (loc_list_from_tree_1): Adjust.
7302 (add_AT_location_description): Create view list attribute if
7303 needed, check it's absent otherwise.
7304 (convert_cfa_to_fb_loc_list): Adjust.
7305 (maybe_emit_file): Call output_asm_line_debug_info for test.
7306 (dwarf2out_var_location): Reset views as needed. Precompute
7307 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
7308 attribute. Set view.
7309 (new_line_info_table): Reset next view.
7310 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7311 (dwarf2out_source_line): Likewise. Output view resets and labels to
7312 the assembler, or select appropriate line info opcodes.
7313 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7314 (optimize_string_length): Catch it. Adjust.
7315 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
7316 dw_val_class_view_list, and remove it if no longer needed.
7317 (hash_loc_list): Hash view numbers.
7318 (loc_list_hasher::equal): Compare them.
7319 (optimize_location_lists): Check whether a view list symbol is
7320 needed, and whether the locview attribute is present, and
7321 whether they match. Remove the locview attribute if no longer
7323 (index_location_lists): Call skip_loc_list_entry for test.
7324 (dwarf2out_finish): Call output_asm_line_debug_info for test.
7325 Use output_dwarf_version.
7326 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7327 (struct dw_val_node): Add val_view_list.
7328 * final.c (SEEN_NEXT_VIEW): New.
7329 (set_next_view_needed): New.
7330 (clear_next_view_needed): New.
7331 (maybe_output_next_view): New.
7332 (final_start_function): Rename to...
7333 (final_start_function_1): ... this. Take pointer to FIRST,
7334 add SEEN parameter. Emit param bindings in the initial view.
7335 (final_start_function): Reintroduce SEEN-less interface.
7336 (final): Rename to...
7337 (final_1): ... this. Take SEEN parameter. Output final pending
7338 next view at the end.
7339 (final): Reintroduce seen-less interface.
7340 (final_scan_insn): Output pending next view before switching
7341 sections or ending a block. Mark the next view as needed when
7342 outputting variable locations. Notify debug backend of section
7343 changes, and of location view changes.
7344 (rest_of_handle_final): Adjust.
7345 * toplev.c (process_options): Autodetect value for debug variable
7346 location views option. Warn on incompat5 without -gdwarf-5.
7347 * doc/invoke.texi (gvariable-location-views): New.
7348 (gvariable-location-views=incompat5): New.
7349 (gno-variable-location-views): New.
7351 2018-02-08 David Malcolm <dmalcolm@redhat.com>
7353 PR tree-optimization/84136
7354 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7355 that the result of find_edge is non-NULL.
7357 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
7360 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
7361 storing integer register in SImode. Fix cost of 256 and 512
7362 byte aligned SSE register store.
7364 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
7366 * config/i386/i386.c (ix86_multiplication_cost): Fix
7367 multiplication cost for TARGET_AVX512DQ.
7369 2018-02-08 Marek Polacek <polacek@redhat.com>
7371 PR tree-optimization/84238
7372 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
7375 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7377 PR tree-optimization/84265
7378 * tree-vect-stmts.c (vectorizable_store): Don't treat
7379 VMAT_CONTIGUOUS accesses as grouped.
7380 (vectorizable_load): Likewise.
7382 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7384 PR tree-optimization/81635
7385 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
7386 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
7387 (test_round_for_mask): New functions.
7388 (wide_int_cc_tests): Call test_round_for_mask.
7389 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
7390 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
7391 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
7392 range returned by get_range_info.
7394 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
7397 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
7398 * symtab.c: Include builtins.h
7399 (symtab_node::output_to_lto_symbol_table_p): Move here
7400 from lto-streamer-out.c:output_symbol_p.
7401 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
7402 (output_symbol_p): Move all logic to symtab.c
7403 (produce_symtab): Update.
7405 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7407 * config/s390/s390-opts.h (enum indirect_branch): Define.
7408 * config/s390/s390-protos.h (s390_return_addr_from_memory)
7409 (s390_indirect_branch_via_thunk)
7410 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
7411 (enum s390_indirect_branch_type): Define.
7412 * config/s390/s390.c (struct s390_frame_layout, struct
7413 machine_function): Remove.
7414 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
7415 (indirect_branch_table_label_no, indirect_branch_table_name):
7417 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
7418 (enum s390_indirect_branch_option): Define.
7419 (s390_return_addr_from_memory): New function.
7420 (s390_handle_string_attribute): New function.
7421 (s390_attribute_table): Add new attribute handler.
7422 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
7423 (s390_indirect_branch_via_thunk): New function.
7424 (s390_indirect_branch_via_inline_thunk): New function.
7425 (s390_function_ok_for_sibcall): When jumping via thunk disallow
7426 sibling call optimization for non z10 compiles.
7427 (s390_emit_call): Force indirect branch target to be a single
7428 register. Add r1 clobber for non-z10 compiles.
7429 (s390_emit_epilogue): Emit return jump via return_use expander.
7430 (s390_reorg): Handle JUMP_INSNs as execute targets.
7431 (s390_option_override_internal): Perform validity checks for the
7432 new command line options.
7433 (s390_indirect_branch_attrvalue): New function.
7434 (s390_indirect_branch_settings): New function.
7435 (s390_set_current_function): Invoke s390_indirect_branch_settings.
7436 (s390_output_indirect_thunk_function): New function.
7437 (s390_code_end): Implement target hook.
7438 (s390_case_values_threshold): Implement target hook.
7439 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
7441 * config/s390/s390.h (struct s390_frame_layout)
7442 (struct machine_function): Move here from s390.c.
7443 (TARGET_INDIRECT_BRANCH_NOBP_RET)
7444 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
7445 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
7446 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
7447 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
7448 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
7449 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
7450 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
7451 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
7452 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
7453 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
7454 (mnemonic attribute): Add values which aren't recognized
7456 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
7457 pattern for branch conversion. Fix mnemonic attribute.
7458 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
7459 indirect branch via thunk if requested.
7460 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
7461 ("*indirect_jump"): Disable for branch conversion using out of
7463 ("indirect_jump_via_thunk<mode>_z10")
7464 ("indirect_jump_via_thunk<mode>")
7465 ("indirect_jump_via_inlinethunk<mode>_z10")
7466 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
7467 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
7468 ("casesi_jump_via_inlinethunk<mode>_z10")
7469 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7470 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7471 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
7472 ("*indirect2_jump"): Disable for branch conversion.
7473 ("casesi_jump"): Turn into expander and expand patterns for branch
7475 ("return_use"): New expander.
7476 ("*return"): Emit return via thunk and rename it to ...
7477 ("*return<mode>"): ... this one.
7478 * config/s390/s390.opt: Add new options and and enum for the
7481 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7483 * lra-constraints.c (match_reload): Unconditionally use
7484 gen_lowpart_SUBREG, rather than selecting between that
7485 and equivalent gen_rtx_SUBREG code.
7487 2018-02-08 Richard Biener <rguenther@suse.de>
7489 PR tree-optimization/84233
7490 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
7491 changed flag instead of boguously re-using phi_inserted.
7493 2018-02-08 Martin Jambor <mjambor@suse.cz>
7495 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
7496 static local variables.
7498 2018-02-08 Richard Biener <rguenther@suse.de>
7500 PR tree-optimization/84278
7501 * tree-vect-stmts.c (vectorizable_store): When looking for
7502 smaller vector types to perform grouped strided loads/stores
7503 make sure the mode is supported by the target.
7504 (vectorizable_load): Likewise.
7506 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7508 * config/aarch64/aarch64.c (aarch64_components_for_bb):
7509 Increase LDP/STP opportunities by adding adjacent callee-saves.
7511 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7513 PR rtl-optimization/84068
7514 PR rtl-optimization/83459
7515 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7517 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
7519 PR tree-optimization/84224
7520 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7521 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7524 2018-02-07 Iain Sandoe <iain@codesourcery.com>
7527 * config/rs6000/altivec.md (*restore_world): Remove LR use.
7528 * config/rs6000/predicates.md (restore_world_operation): Adjust op
7529 count, remove one USE.
7531 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
7533 * doc/install.texi (Configuration): Document the
7534 --with-long-double-format={ibm,ieee} PowerPC configuration
7538 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7539 Convert from define_expand to be define_insn_and_split. Rework
7540 float/double/_Float128 conversions to QI/HI/SImode to work with
7541 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
7542 conversions to QI/HImode types did a store and then a load to
7543 truncate the value. For conversions to VSX registers, don't split
7544 the insn, instead emit the code directly. Use the code iterator
7545 any_fix to combine signed and unsigned conversions.
7546 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7547 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7548 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7549 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7550 (fix_<mode>di2_hw): Likewise.
7551 (fixuns_<mode>di2_hw): Likewise.
7552 (fix_<mode>si2_hw): Likewise.
7553 (fixuns_<mode>si2_hw): Likewise.
7554 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7555 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7556 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7557 fix<uns>_trunc<SFDF:mode>si2_p8.
7558 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7560 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7561 (fix<uns>_<mode>_mem): Likewise.
7562 (fctiw<u>z_<mode>_mem): Likewise.
7563 (fix<uns>_<mode>_mem): Likewise.
7564 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
7565 the register allocator from doing a direct move to the GPRs to do
7566 a store, and instead use the ISA 3.0 store byte/half-word from
7567 vector register instruction. For IEEE 128-bit floating point,
7568 also optimize stores of 32-bit ints.
7569 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
7571 2018-02-07 Alan Hayward <alan.hayward@arm.com>
7573 * genextract.c (push_pathstr_operand): New function to support
7575 (walk_rtx): Call push_pathstr_operand.
7576 (print_path): Support [a-zA-Z].
7578 2018-02-07 Richard Biener <rguenther@suse.de>
7580 PR tree-optimization/84037
7581 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
7582 (cse_and_gimplify_to_preheader): Declare.
7583 (vect_get_place_in_interleaving_chain): Likewise.
7584 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
7586 (_loop_vec_info::~_loop_vec_info): Delete it.
7587 (cse_and_gimplify_to_preheader): New function.
7588 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
7589 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
7590 (vectorizable_load): Likewise. For grouped stores always base
7591 the IV on the first element.
7592 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
7593 condition before gimplifying.
7595 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7597 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
7598 *DIV_EXPR and *MOD_EXPR.
7600 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
7603 * config/i386/i386.c (ix86_option_override_internal): Mask out
7604 the CF_SET bit when checking -fcf-protection.
7606 2018-02-07 Tom de Vries <tom@codesourcery.com>
7609 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
7612 2018-02-07 Richard Biener <rguenther@suse.de>
7614 PR tree-optimization/84204
7615 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7618 PR tree-optimization/84205
7619 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
7620 special-case isl_ast_op_zdiv_r.
7622 PR tree-optimization/84223
7623 * graphite-scop-detection.c (gather_bbs::before_dom_children):
7624 Only add conditions from within the region.
7625 (gather_bbs::after_dom_children): Adjust.
7627 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
7630 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
7631 * config/avr/avr.md: Only post-reload split REG-REG moves if
7632 either register is GENERAL_REG_P.
7634 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7636 PR tree-optimization/84235
7637 * tree-ssa-scopedtables.c
7638 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
7639 if the subtraction is performed in floating point type where NaNs are
7640 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
7641 build 1. Formatting fix.
7643 2018-02-06 Jakub Jelinek <jakub@redhat.com>
7646 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
7647 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
7648 and skip it regardless of bb boundaries. Use CALL_P macro,
7649 don't test INSN_P (insn) together with CALL_P or JUMP_P check
7650 unnecessarily, formatting fix.
7652 2018-02-06 Michael Collison <michael.collison@arm.com>
7654 * config/arm/thumb2.md:
7655 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
7656 (*thumb_mov_notscc): Ditto.
7658 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
7661 * config/rs6000/rs6000.md (su code attribute): Use "u" for
7662 unsigned_fix, not "s".
7664 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7666 * configure.ac (gcc_fn_eh_frame_ro): New function.
7667 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
7668 correct .eh_frame permissions.
7669 * configure: Regenerate.
7671 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
7673 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
7676 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7678 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7679 Display warning message for -mno-speculate-indirect-jumps.
7681 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
7683 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
7685 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
7687 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
7689 PR tree-optimization/84225
7690 * tree-eh.c (find_trapping_overflow): Only call
7691 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
7693 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7696 * config/i386/i386.c: Reimplement the check of possible options
7697 -mibt/-mshstk conbination. Change error messages.
7698 * doc/invoke.texi: Fix a typo: remove extra '='.
7700 2018-02-06 Marek Polacek <polacek@redhat.com>
7702 PR tree-optimization/84228
7703 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
7705 2018-02-06 Tamar Christina <tamar.christina@arm.com>
7708 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
7709 emitted arch directives.
7710 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
7711 __ARM_FEATURE_COPROC before changing architectures.
7713 2018-02-06 Richard Biener <rguenther@suse.de>
7715 * config/i386/i386.c (print_reg): Fix typo.
7716 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
7718 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
7720 * configure: Regenerate.
7722 2018-02-05 Martin Sebor <msebor@redhat.com>
7724 PR tree-optimization/83369
7725 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
7728 2018-02-05 Martin Liska <mliska@suse.cz>
7730 * doc/invoke.texi: Cherry-pick upstream r323995.
7732 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
7734 * ira.c (ira_init_register_move_cost): Adjust comment.
7736 2018-02-05 Martin Liska <mliska@suse.cz>
7738 PR gcov-profile/84137
7739 * doc/gcov.texi: Fix typo in documentation.
7741 2018-02-05 Martin Liska <mliska@suse.cz>
7743 PR gcov-profile/83879
7744 * doc/gcov.texi: Document necessity of --dynamic-list-data when
7745 using dlopen functionality.
7747 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
7749 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
7750 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
7751 _mm_maskz_range_ss, _mm_mask_range_round_ss,
7752 _mm_maskz_range_round_ss): New intrinsics.
7753 (__builtin_ia32_rangesd128_round)
7754 (__builtin_ia32_rangess128_round): Remove.
7755 (__builtin_ia32_rangesd128_mask_round,
7756 __builtin_ia32_rangess128_mask_round): New builtins.
7757 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
7758 __builtin_ia32_rangess128_round): Remove.
7759 (__builtin_ia32_rangesd128_mask_round,
7760 __builtin_ia32_rangess128_mask_round): New builtins.
7761 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
7762 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
7763 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
7764 "<round_saeonly_constraint>")): Changed to ...
7765 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
7766 "<round_saeonly_scalar_constraint>")): ... this.
7767 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
7768 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
7769 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
7770 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
7771 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
7773 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
7775 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
7777 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
7778 Remove all values except native, 8540 and 8548.
7780 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
7782 * config/i386/i386.c (ix86_output_function_return): Pass
7783 INVALID_REGNUM, instead of -1, as invalid register number to
7784 indirect_thunk_name and output_indirect_thunk.
7786 2018-02-02 Julia Koval <julia.koval@intel.com>
7788 * config.gcc: Add -march=icelake.
7789 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
7790 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
7791 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
7792 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
7793 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
7794 (processor_target_table): Add icelake.
7795 (ix86_option_override_internal): Handle new PTAs.
7796 (get_builtin_code_for_version): Handle icelake.
7797 (M_INTEL_COREI7_ICELAKE): New.
7798 (fold_builtin_cpu): Handle icelake.
7799 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
7800 * doc/invoke.texi: Add -march=icelake.
7802 2018-02-02 Julia Koval <julia.koval@intel.com>
7804 * config/i386/i386.c (ix86_option_override_internal): Change flags type
7805 to wide_int_bitmask.
7806 * wide-int-bitmask.h: New.
7808 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7811 * config/i386/i386.md: Replace Pmode with word_mode in
7812 builtin_setjmp_setup and builtin_longjmp to support x32.
7814 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
7818 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
7820 (rs6000_supported_cpu_names): New static variable.
7821 (linux_cpu_translation_table): Likewise.
7822 (elf_platform) <cpu>: Define new static variable and use it.
7823 Translate kernel AT_PLATFORM name to canonical name if needed.
7824 Error if platform name is unknown.
7826 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
7829 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
7831 2018-02-01 Jeff Law <law@redhat.com>
7834 * config/i386/i386.c (release_scratch_register_on_entry): Add new
7835 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
7836 the scratch if RELEASE_VIA_POP is false.
7837 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
7838 If we have to save a temporary register, decrement SIZE appropriately.
7839 Pass new arguments to release_scratch_register_on_entry.
7840 (ix86_adjust_stack_and_probe): Likewise.
7841 (ix86_emit_probe_stack_range): Pass new arguments to
7842 release_scratch_register_on_entry.
7844 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
7846 PR rtl-optimization/84157
7847 * combine.c (change_zero_ext): Use REG_P predicate in
7848 front of HARD_REGISTER_P predicate.
7850 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
7852 * config/avr/avr.c (avr_option_override): Move disabling of
7853 -fdelete-null-pointer-checks to...
7854 * common/config/avr/avr-common.c (avr_option_optimization_table):
7857 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7859 PR tree-optimization/81635
7860 * tree-data-ref.c (split_constant_offset_1): For types that
7861 wrap on overflow, try to use range info to prove that wrapping
7864 2018-02-01 Renlin Li <renlin.li@arm.com>
7867 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7869 (aarch64_register_move_cost): Likewise.
7870 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
7872 (REG_CLASS_NAMES): Likewise.
7873 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
7874 TAILCALL_ADDR_REGS. Remove IP registers.
7875 * config/aarch64/aarch64.md (Ucs): Update register constraint.
7877 2018-02-01 Richard Biener <rguenther@suse.de>
7879 * domwalk.h (dom_walker::dom_walker): Add additional constructor
7880 for specifying RPO order and allow NULL for that.
7881 * domwalk.c (dom_walker::dom_walker): Likewise.
7882 (dom_walker::walk): Handle NULL RPO order.
7883 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
7885 (rewrite_update_dom_walker): Likewise.
7886 (mark_def_dom_walker): Likewise.
7888 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7890 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
7891 (aarch64_maybe_expand_sve_subreg_move): Declare.
7892 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
7893 * config/aarch64/predicates.md (aarch64_any_register_operand): New
7895 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
7896 that are semantically a reverse operation.
7897 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
7898 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
7899 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
7901 (aarch64_can_change_mode_class): For big-endian, forbid changes
7902 between two SVE modes if they have different element sizes.
7904 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7906 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
7907 the TImode handling for big-endian targets.
7909 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7911 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
7912 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
7914 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
7915 Remove BSWAP handing for big-endian targets and use the form of
7916 LD1RQ appropariate for the mode.
7918 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7920 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
7921 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
7924 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7927 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
7928 check for operands that need to go through aarch64_sve_reload_be.
7930 2018-02-01 Jakub Jelinek <jakub@redhat.com>
7932 PR tree-optimization/81661
7933 PR tree-optimization/84117
7934 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
7935 * tree-eh.c: Include gimplify.h.
7936 (find_trapping_overflow, replace_trapping_overflow,
7937 rewrite_to_non_trapping_overflow): New functions.
7938 * tree-vect-loop.c: Include tree-eh.h.
7939 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
7940 * tree-data-ref.c: Include tree-eh.h.
7941 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
7943 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
7945 PR rtl-optimization/84123
7946 * combine.c (change_zero_ext): Check if hard register satisfies
7947 can_change_dest_mode before calling gen_lowpart_SUBREG.
7949 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
7952 * ira.c (ira_init_register_move_cost): Remove assert.
7954 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7956 PR rtl-optimization/84071
7957 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
7958 * doc/tm.texi: Regenerate.
7960 2018-01-31 Richard Biener <rguenther@suse.de>
7962 PR tree-optimization/84132
7963 * tree-data-ref.c (analyze_miv_subscript): Properly
7964 check whether evolution_function_is_affine_multivariate_p
7965 before calling gcd_of_steps_may_divide_p.
7967 2018-01-31 Julia Koval <julia.koval@intel.com>
7970 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
7971 * config/i386/i386.md (rdpid_rex64) New.
7972 (rdpid): Make 32bit only.
7974 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
7977 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
7978 an IDENTIFIER_NODE for FUNCTION_TYPE's.
7980 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7983 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7985 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7987 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7989 PR rtl-optimization/84071
7990 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
7991 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
7993 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7995 * config/arc/arc.c (arc_handle_aux_attribute): New function.
7996 (arc_attribute_table): Add 'aux' attribute.
7997 (arc_in_small_data_p): Consider aux like variables.
7998 (arc_is_aux_reg_p): New function.
7999 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8000 (arc_get_aux_arg): New function.
8001 (prepare_move_operands): Handle aux-register access.
8002 (arc_handle_aux_attribute): New function.
8003 * doc/extend.texi (ARC Variable attributes): Add subsection.
8005 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
8007 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8008 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8009 (arc_attribute_table): Add 'uncached' attribute.
8010 (arc_print_operand): Print '.di' flag for uncached memory
8012 (arc_in_small_data_p): Do not consider for small data the uncached
8014 (arc_is_uncached_mem_p): New function.
8015 * config/arc/predicates.md (compact_store_memory_operand): Check
8016 for uncached memory accesses.
8017 (nonvol_nonimm_operand): Likewise.
8018 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8020 2018-01-31 Jakub Jelinek <jakub@redhat.com>
8023 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8024 falign-loops=): Add Optimization flag.
8026 2018-01-30 Jeff Law <law@redhat.com>
8029 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8030 INT_REGISTERS_SAVED. Check it prior to calling
8031 get_scratch_register_on_entry.
8032 (ix86_adjust_stack_and_probe): Similarly.
8033 (ix86_emit_probe_stack_range): Similarly.
8034 (ix86_expand_prologue): Corresponding changes.
8036 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8039 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8040 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8042 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
8045 * lra-constraints.c (curr_insn_transform): Process AND in the
8048 2018-01-30 Jakub Jelinek <jakub@redhat.com>
8050 PR rtl-optimization/83986
8051 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8052 dependence against last_pending_memory_flush in addition to
8055 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
8057 PR tree-optimization/81611
8058 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8061 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8064 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8067 2018-01-30 Richard Biener <rguenther@suse.de>
8068 Jakub Jelinek <jakub@redhat.com>
8070 PR tree-optimization/84111
8071 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8072 inner loops added during recursion, as they don't have up-to-date
8075 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
8078 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8079 (can_inline_edge_by_limits_p): ... here.
8080 (can_early_inline_edge_p, check_callers,
8081 update_caller_keys, update_callee_keys, recursive_inlining,
8082 add_new_edges_to_heap, speculation_useful_p,
8083 inline_small_functions,
8084 inline_small_functions, flatten_function,
8085 inline_to_all_callers_1): Update.
8087 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
8089 * profile-count.c (profile_count::combine_with_ipa_count): Handle
8092 2018-01-30 Richard Biener <rguenther@suse.de>
8094 PR tree-optimization/83008
8095 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8096 invariant and constant vector uses in stmts when they need
8099 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8102 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8103 * configure: Regenerate.
8105 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
8107 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8109 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8110 Use gen_rtx_REG rather than gen_lowpart.
8112 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
8114 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8115 rather than 0 when creating partial subregs.
8117 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
8119 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8122 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
8125 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8126 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8127 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8128 flags. This restores the settings used before the 2017-07-24.
8129 Turning off pre increment/decrement/modify allows IVOPTS to
8130 optimize DF/SF loops where the index is an int.
8132 2018-01-29 Richard Biener <rguenther@suse.de>
8133 Kelvin Nilsen <kelvin@gcc.gnu.org>
8136 * tree-vect-stmts.c (vectorizable_call): Don't call
8137 targetm.vectorize_builtin_md_vectorized_function if callee is
8140 2018-01-22 Carl Love <cel@us.ibm.com>
8142 * doc/extend.tex: Fix typo in second arg in
8143 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8145 2018-01-29 Richard Biener <rguenther@suse.de>
8147 PR tree-optimization/84086
8148 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8149 (flush_ssaname_freelist): When SSA names were released reset
8150 the SCEV hash table.
8152 2018-01-29 Richard Biener <rguenther@suse.de>
8154 PR tree-optimization/84057
8155 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8156 removed paths when removing edges.
8158 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
8160 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8161 -mfunction-return=@var{choice}.
8163 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
8166 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8168 (layout::print_source_line): Likewise.
8169 (test_get_line_width_without_trailing_whitespace): Add test cases.
8171 2018-01-27 Jakub Jelinek <jakub@redhat.com>
8174 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8177 2018-01-26 Jim Wilson <jimw@sifive.com>
8179 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8181 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8184 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8186 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8187 and CMP + SUB-immediate -> SUBS.
8189 2018-01-26 Martin Sebor <msebor@redhat.com>
8191 PR tree-optimization/83896
8192 * tree-ssa-strlen.c (get_string_len): Rename...
8193 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
8194 Avoid assuming length is constant.
8195 (handle_char_store): Use HOST_WIDE_INT for string length.
8197 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
8200 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8201 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8203 2018-01-26 Richard Biener <rguenther@suse.de>
8205 PR rtl-optimization/84003
8206 * dse.c (record_store): Only record redundant stores when
8207 the earlier store aliases at least all accesses the later one does.
8209 2018-01-26 Jakub Jelinek <jakub@redhat.com>
8211 PR rtl-optimization/83985
8212 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8213 REG_CFA_RESTORE insns.
8214 (delete_unmarked_insns): Don't ignore separate shrink wrapping
8215 REG_CFA_RESTORE insns here.
8218 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8219 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8221 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8223 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8224 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8225 (arc_init): Likewise.
8226 (arc_override_options): Likewise.
8227 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8229 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8231 * config/arc/arc.h (TARGET_DBNZ): Define.
8232 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8233 properly set the tune attribute.
8234 (dbnz): Use TARGET_DBNZ guard.
8235 * config/arc/arc.opt (mtune): Add core3 option.
8237 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8239 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8240 recognize new pic like addresses.
8241 (arc_delegitimize_address): Clean up.
8243 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8245 * config/arc/arc-arches.def: Option mrf16 valid for all
8247 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8248 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8249 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8250 * config/arc/arc-tables.opt: Regenerate.
8251 * config/arc/arc.c (arc_conditional_register_usage): Handle
8252 reduced register file case.
8253 (arc_file_start): Set must have build attributes.
8254 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8256 * config/arc/arc.opt (mrf16): Add new option.
8257 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8258 * config/arc/genmultilib.awk: Handle new mrf16 option.
8259 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8260 * config/arc/t-multilib: Regenerate.
8261 * doc/invoke.texi (ARC Options): Document mrf16 option.
8263 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8265 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8266 * config/arc/arc.c (arc_handle_secure_attribute): New function.
8267 (arc_attribute_table): Add 'secure_call' attribute.
8268 (arc_print_operand): Print secure call operand.
8269 (arc_function_ok_for_sibcall): Don't optimize tail calls when
8271 (arc_is_secure_call_p): New function. * config/arc/arc.md
8272 (call_i): Add support for sjli instruction.
8273 (call_value_i): Likewise.
8274 * config/arc/constraints.md (Csc): New constraint.
8276 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
8277 John Eric Martin <John.Martin@emmicro-us.com>
8279 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8280 * config/arc/arc.c (_arc_jli_section): New struct.
8281 (arc_jli_section): New type.
8282 (rc_jli_sections): New static variable.
8283 (arc_handle_jli_attribute): New function.
8284 (arc_attribute_table): Add jli_always and jli_fixed attribute.
8285 (arc_file_end): New function.
8286 (TARGET_ASM_FILE_END): Define.
8287 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8288 (arc_add_jli_section): New function.
8289 (jli_call_scan): Likewise.
8290 (arc_reorg): Call jli_call_scan.
8291 (arc_output_addsi): Remove 'S' from printing asm operand.
8292 (arc_is_jli_call_p): New function.
8293 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8295 (movhi_insn): Likewise.
8296 (movsi_insn): Likewise.
8297 (movsi_set_cc_insn): Likewise.
8298 (loadqi_update): Likewise.
8299 (load_zeroextendqisi_update): Likewise.
8300 (load_signextendqisi_update): Likewise.
8301 (loadhi_update): Likewise.
8302 (load_zeroextendhisi_update): Likewise.
8303 (load_signextendhisi_update): Likewise.
8304 (loadsi_update): Likewise.
8305 (loadsf_update): Likewise.
8306 (movsicc_insn): Likewise.
8307 (bset_insn): Likewise.
8308 (bxor_insn): Likewise.
8309 (bclr_insn): Likewise.
8310 (bmsk_insn): Likewise.
8311 (bicsi3_insn): Likewise.
8312 (cmpsi_cc_c_insn): Likewise.
8313 (movsi_ne): Likewise.
8314 (movsi_cond_exec): Likewise.
8315 (clrsbsi2): Likewise.
8326 (call_i): Remove 'S' asm letter, add jli instruction.
8327 (call_value_i): Likewise.
8328 * config/arc/arc.op (mjli-always): New option.
8329 * config/arc/constraints.md (Cji): New constraint.
8330 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8332 (subsf3_fpx): Likewise.
8333 (mulsf3_fpx): Likewise.
8334 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8336 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8338 * doc/invoke.texi (ARC): Document mjli-always option.
8340 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
8342 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
8343 avoid addition with 0 and use incw and decw where possible.
8345 2018-01-26 Richard Biener <rguenther@suse.de>
8347 PR tree-optimization/81082
8348 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8349 association if it requires casting to unsigned.
8350 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8351 from fold_plusminus_mult_expr to catch important cases late when
8352 range info is available.
8354 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8356 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
8357 * configure.ac (hidden_linkonce): New test.
8358 * configure: Regenerate.
8359 * config.in: Regenerate.
8361 2018-01-26 Julia Koval <julia.koval@intel.com>
8363 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
8364 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
8365 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
8366 _mm_mask_bitshuffle_epi64_mask): Fix type.
8367 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
8368 USI_FTYPE_V4DI_V4DI_USI): Remove.
8369 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
8370 __builtin_ia32_vpshufbitqmb256_mask,
8371 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
8372 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
8373 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
8375 2018-01-26 Alan Modra <amodra@gmail.com>
8378 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
8379 UNSPEC_VBPERMQ. Sort other unspecs.
8381 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
8383 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
8385 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
8388 * predict.c (drop_profile): Do not push/pop cfun; update also
8390 (handle_missing_profiles): Fix logic looking for zero profiles.
8392 2018-01-25 Jakub Jelinek <jakub@redhat.com>
8395 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
8396 on functions with #pragma omp declare simd or functions with simd
8398 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
8399 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
8400 Remove trailing \n from warning_at calls.
8402 2018-01-25 Tom de Vries <tom@codesourcery.com>
8405 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8406 for neutered workers.
8408 2018-01-24 Joseph Myers <joseph@codesourcery.com>
8411 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
8412 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
8414 2018-01-24 Jeff Law <law@redhat.com>
8417 * i386.c (get_probe_interval): Move to earlier point.
8418 (ix86_compute_frame_layout): If -fstack-clash-protection and
8419 the frame is larger than the probe interval, then use pushes
8420 to save registers rather than reg->mem moves.
8421 (ix86_expand_prologue): Remove conditional for int_registers_saved
8424 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
8427 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
8428 min/max for never referenced object.
8430 2018-01-24 Jakub Jelinek <jakub@redhat.com>
8433 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
8435 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
8436 attributes from DECL_ATTRIBUTES (decl) without affecting
8437 DECL_ATTRIBUTES (current_function_decl).
8438 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
8439 functions with non-NULL DECL_ABSTRACT_ORIGIN.
8441 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
8443 PR tree-optimization/83979
8444 * fold-const.c (fold_comparison): Use constant_boolean_node
8445 instead of boolean_{true,false}_node.
8447 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
8449 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
8452 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8454 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8455 Simplify the clause that sets the length attribute.
8456 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8457 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
8458 clause that sets the length attribute.
8459 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8461 2018-01-24 Tom de Vries <tom@codesourcery.com>
8464 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
8465 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
8466 Add strict parameter.
8467 (prevent_branch_around_nothing): Insert dummy insn between branch to
8468 label and label with no ptx insn inbetween.
8469 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8471 2018-01-24 Tom de Vries <tom@codesourcery.com>
8474 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8475 for neutered threads in warp.
8476 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
8478 2018-01-24 Richard Biener <rguenther@suse.de>
8480 PR tree-optimization/83176
8481 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
8484 2018-01-24 Richard Biener <rguenther@suse.de>
8486 PR tree-optimization/82819
8487 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
8488 code generating pluses that are no-ops in the target precision.
8490 2018-01-24 Richard Biener <rguenther@suse.de>
8493 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
8495 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8497 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
8498 to merge probabilities.
8499 * predict.c (probably_never_executed): Also mark as cold functions
8500 with global 0 profile and guessed local profile.
8501 * profile-count.c (profile_probability::combine_with_count): New
8503 * profile-count.h (profile_probability::operator*,
8504 profile_probability::operator*=, profile_probability::operator/,
8505 profile_probability::operator/=): Reduce precision to adjusted
8506 and set value to guessed on contradictory divisions.
8507 (profile_probability::combine_with_freq): Remove.
8508 (profile_probability::combine_wiht_count): Declare.
8509 (profile_count::force_nonzero):: Set to adjusted.
8510 (profile_count::probability_in):: Set quality to adjusted.
8511 * tree-ssa-tail-merge.c (replace_block_by): Use
8514 2018-01-23 Andrew Waterman <andrew@sifive.com>
8515 Jim Wilson <jimw@sifive.com>
8517 * config/riscv/riscv.c (riscv_stack_boundary): New.
8518 (riscv_option_override): Set riscv_stack_boundary. Handle
8519 riscv_preferred_stack_boundary_arg.
8520 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8521 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8522 (STACK_BOUNDARY): Set to riscv_stack_boundary.
8523 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8524 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8525 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8527 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
8530 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8531 of struct ix86_frame.
8532 (ix86_expand_epilogue): Likewise. Add a local variable for
8533 the reg_save_offset field in struct ix86_frame.
8535 2018-01-23 Bin Cheng <bin.cheng@arm.com>
8537 PR tree-optimization/82604
8538 * tree-loop-distribution.c (enum partition_kind): New enum item
8539 PKIND_PARTIAL_MEMSET.
8540 (partition_builtin_p): Support above new enum item.
8541 (generate_code_for_partition): Ditto.
8542 (compute_access_range): Differentiate cases that equality can be
8543 proven at all loops, the innermost loops or no loops.
8544 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8545 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
8546 (finalize_partitions, distribute_loop): Don't fuse partition of
8547 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8548 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8551 2018-01-23 Martin Liska <mliska@suse.cz>
8553 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8554 order to ignore the predictor.
8555 (PRED_POLYMORPHIC_CALL): Likewise.
8556 (PRED_RECURSIVE_CALL): Likewise.
8558 2018-01-23 Martin Liska <mliska@suse.cz>
8560 * tree-profile.c (tree_profiling): Print function header to
8561 aware reader which function we are working on.
8562 * value-prof.c (gimple_find_values_to_profile): Do not print
8563 not interesting value histograms.
8565 2018-01-23 Martin Liska <mliska@suse.cz>
8567 * profile-count.h (enum profile_quality): Add
8568 profile_uninitialized as the first value. Do not number values
8569 as they are zero based.
8570 (profile_count::verify): Update sanity check.
8571 (profile_probability::verify): Likewise.
8573 2018-01-23 Nathan Sidwell <nathan@acm.org>
8575 * doc/invoke.texi (ffor-scope): Deprecate.
8577 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8579 PR tree-optimization/83510
8580 * domwalk.c (set_all_edges_as_executable): New function.
8581 (dom_walker::dom_walker): Convert bool param
8582 "skip_unreachable_blocks" to enum reachability. Move setup of
8583 edge flags to set_all_edges_as_executable and only do it when
8584 reachability is REACHABLE_BLOCKS.
8585 * domwalk.h (enum dom_walker::reachability): New enum.
8586 (dom_walker::dom_walker): Convert bool param
8587 "skip_unreachable_blocks" to enum reachability.
8588 (set_all_edges_as_executable): New decl.
8589 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
8590 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
8592 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
8593 but converting true to REACHABLE_BLOCKS.
8594 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
8596 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
8597 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
8598 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
8600 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
8601 if check_all_array_refs will be called.
8603 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8605 * tree.c (selftest::test_location_wrappers): Add more test
8608 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8610 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
8611 (selftest::test_bit_in_range): Likewise.
8613 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8616 * doc/sourcebuild.texi (vect_float): Say that the selector
8617 only describes the situation when -funsafe-math-optimizations is on.
8618 (vect_float_strict): Document.
8620 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8622 PR tree-optimization/83965
8623 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8624 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
8625 instead of checking only for a reduction.
8626 (vect_recog_widen_sum_pattern): Likewise.
8628 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8630 * predict.c (probably_never_executed): Only use precise profile info.
8631 (compute_function_frequency): Skip after inlining hack since we now
8632 have quality checking.
8634 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8636 * profile-count.h (profile_probability::very_unlikely,
8637 profile_probability::unlikely, profile_probability::even): Set
8638 precision to guessed.
8640 2018-01-23 Richard Biener <rguenther@suse.de>
8642 PR tree-optimization/83963
8643 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
8644 Properly terminate dominator walk when crossing the exit edge not
8645 when visiting its source block.
8647 2018-01-23 Jakub Jelinek <jakub@redhat.com>
8650 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
8651 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
8653 2018-01-22 Jakub Jelinek <jakub@redhat.com>
8655 PR tree-optimization/83957
8656 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
8657 semicolon after for body surrounded by braces.
8659 PR tree-optimization/83081
8660 * profile-count.h (profile_probability::split): New method.
8661 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
8662 Use profile_probability::split.
8663 (do_compare_rtx_and_jump): Fix adjustment of probabilities
8664 when splitting a single conditional jump into 2.
8666 2018-01-22 David Malcolm <dmalcolm@redhat.com>
8668 PR tree-optimization/69452
8669 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
8672 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8674 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
8675 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
8676 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
8678 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8680 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
8681 * config/rl78/rl78.md (movdi): New define_expand.
8682 * config/rl78/rl78.c (rl78_split_movdi): New function.
8684 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
8687 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
8689 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
8690 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
8691 128-bit to produce an UNSPEC move to get the double word with the
8692 signbit and then a shift directly to do signbit.
8693 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
8694 implementation with a new version that just does either a direct
8695 move or a regular move. Move memory interface to separate insns.
8696 Move insns so they are next to the expander.
8697 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
8698 with signbit move. Split big and little endian case.
8699 (signbit<mode>2_dm_mem_le): Likewise.
8700 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
8701 (signbit<mode>2_dm2): Likewise.
8703 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8705 * config/rl78/rl78.md (anddi3): New define_expand.
8707 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8709 * config/rl78/rl78.md (umindi3): New define_expand.
8711 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8713 * config/rl78/rl78.md (smindi3): New define_expand.
8715 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8717 * config/rl78/rl78.md (smaxdi3): New define_expand.
8719 2018-01-22 Carl Love <cel@us.ibm.com>
8721 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
8722 LVX_V1TI): Add macro expansion.
8723 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
8724 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
8725 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
8726 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
8727 Change check to determine if the instruction is a byte reversing
8728 entry. Fix typo in comment.
8729 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
8730 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
8731 Add def_builtin calls for new builtins.
8732 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
8733 Add define_insn expansion.
8735 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8737 * config/rl78/rl78.md (umaxdi3): New define_expand.
8739 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8741 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
8742 for non-QImode registers.
8744 2018-01-22 Richard Biener <rguenther@suse.de>
8746 PR tree-optimization/83963
8747 * graphite-scop-detection.c (scop_detection::get_sese): Delay
8748 including the loop exit block.
8749 (scop_detection::merge_sese): Likewise.
8750 (scop_detection::add_scop): Do it here instead.
8752 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8754 * doc/sourcebuild.texi (arm_softfloat): Document.
8756 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
8759 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
8760 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
8761 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
8763 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8764 David Edelsohn <dje.gcc@gmail.com>
8767 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8768 Change "crset eq" to "crset 2".
8769 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8770 (*call_indirect_aix<mode>_nospec): Likewise.
8771 (*call_value_indirect_aix<mode>_nospec): Likewise.
8772 (*call_indirect_elfv2<mode>_nospec): Likewise.
8773 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
8774 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
8775 change assembly output from . to $.
8776 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8777 (indirect_jump<mode>_nospec): Change assembly output from . to $.
8778 (*tablejump<mode>_internal1_nospec): Likewise.
8780 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
8783 * config/sh/sh_optimize_sett_clrt.cc:
8784 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
8786 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
8788 PR tree-optimization/83940
8789 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
8790 offset_dt to vect_constant_def rather than vect_unknown_def_type.
8791 (vect_check_load_store_mask): Add a mask_dt_out parameter and
8792 use it to pass back the definition type.
8793 (vect_check_store_rhs): Likewise rhs_dt_out.
8794 (vect_build_gather_load_calls): Add a mask_dt argument and use
8795 it instead of a call to vect_is_simple_use.
8796 (vectorizable_store): Update calls to vect_check_load_store_mask
8797 and vect_check_store_rhs. Use the dt returned by the latter instead
8798 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
8799 instead of calls to vect_is_simple_use. Pass the scalar rather
8800 than the vector operand to vect_is_simple_use when handling
8801 second and subsequent copies of an rhs value.
8802 (vectorizable_load): Update calls to vect_check_load_store_mask
8803 and vect_build_gather_load_calls. Use the cached mask_dt and
8804 gs_info.offset_dt instead of calls to vect_is_simple_use.
8806 2018-01-20 Jakub Jelinek <jakub@redhat.com>
8809 * tree-emutls.c: Include gimplify.h.
8810 (lower_emutls_2): New function.
8811 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
8812 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
8813 it before further processing.
8816 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
8817 UINTVAL (trueop1) instead of INTVAL (op1).
8819 2018-01-19 Jakub Jelinek <jakub@redhat.com>
8823 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
8824 INCOMING_FRAME_SP_OFFSET if not defined.
8825 (scan_trace): Add ENTRY argument. If true and
8826 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
8827 emit a note to adjust the CFA offset.
8828 (create_cfi_notes): Adjust scan_trace callers.
8829 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
8830 INCOMING_FRAME_SP_OFFSET in the CIE.
8831 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
8832 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
8834 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
8835 * doc/tm.texi: Regenerated.
8837 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8839 PR rtl-optimization/83147
8840 * lra-constraints.c (remove_inheritance_pseudos): Use
8841 lra_substitute_pseudo_within_insn.
8843 2018-01-19 Tom de Vries <tom@codesourcery.com>
8844 Cesar Philippidis <cesar@codesourcery.com>
8847 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
8849 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
8852 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
8853 spaces for function labels.
8855 2018-01-19 Martin Liska <mliska@suse.cz>
8857 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
8858 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
8859 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
8860 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
8861 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
8862 (PRED_CONST_RETURN): Change from 69 to 65.
8863 (PRED_NULL_RETURN): Change from 91 to 71.
8864 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
8865 (PRED_LOOP_GUARD): Change from 66 to 73.
8867 2018-01-19 Martin Liska <mliska@suse.cz>
8869 * predict.c (predict_insn_def): Add new assert.
8870 (struct branch_predictor): Change type to signed integer.
8871 (test_prediction_value_range): Amend test to cover
8873 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
8874 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
8875 (PRED_LOOP_ITERATIONS_MAX): Likewise.
8876 (PRED_LOOP_IV_COMPARE): Likewise.
8877 * predict.h (PROB_UNINITIALIZED): Define new constant.
8879 2018-01-19 Martin Liska <mliska@suse.cz>
8881 * predict.c (dump_prediction): Add new format for
8882 analyze_brprob.py script which is enabled with -details
8884 * profile-count.h (precise_p): New function.
8886 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8888 PR tree-optimization/83922
8889 * tree-vect-loop.c (vect_verify_full_masking): Return false if
8890 there are no statements that need masking.
8891 (vect_active_double_reduction_p): New function.
8892 (vect_analyze_loop_operations): Use it when handling phis that
8893 are not in the loop header.
8895 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8897 PR tree-optimization/83914
8898 * tree-vect-loop.c (vectorizable_induction): Don't convert
8899 init_expr or apply the peeling adjustment for inductions
8900 that are nested within the vectorized loop.
8902 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8904 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
8907 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8911 * function.h (gimplify_parameters): Add gimple_seq * argument.
8912 * function.c: Include gimple.h and options.h.
8913 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
8914 for the added local temporaries if needed.
8915 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
8916 if there are any parameter cleanups, wrap whole body into a
8917 try/finally with the cleanups.
8919 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
8922 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8923 Use GET_MODE_CLASS for scalar floating point.
8925 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8929 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8930 Fix call of call_cgraph_insertion_hooks.
8932 2018-01-18 Martin Sebor <msebor@redhat.com>
8934 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
8936 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8939 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
8942 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
8945 * common.opt: (-ffile-prefix-map): New option.
8946 * opts.c (common_handle_option): Defer it.
8947 * opts-global.c (handle_common_deferred_options): Handle it.
8948 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
8949 * file-prefix-map.h: New file.
8950 (remap_debug_filename, add_debug_prefix_map): ...here.
8951 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
8952 * final.c (debug_prefix_map, add_debug_prefix_map
8953 remap_debug_filename): Move to...
8954 * file-prefix-map.c: New file.
8955 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
8956 generalize, get rid of alloca(), use strrchr() instead of strchr().
8957 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
8958 Implement in terms of add_prefix_map().
8959 (remap_macro_filename, remap_debug_filename): Implement in term of
8961 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
8962 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
8963 * dbxout.c: Include file-prefix-map.h.
8964 * varasm.c: Likewise.
8965 * vmsdbgout.c: Likewise.
8966 * xcoffout.c: Likewise.
8967 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
8968 * doc/cppopts.texi (-fmacro-prefix-map): Document.
8969 * doc/invoke.texi (-ffile-prefix-map): Document.
8970 (-fdebug-prefix-map): Update description.
8972 2018-01-18 Martin Liska <mliska@suse.cz>
8974 * config/i386/i386.c (indirect_thunk_name): Document that also
8976 (output_indirect_thunk): Document why both instructions
8977 (pause and lfence) are generated.
8979 2018-01-18 Richard Biener <rguenther@suse.de>
8981 PR tree-optimization/83887
8982 * graphite-scop-detection.c
8983 (scop_detection::get_nearest_dom_with_single_entry): Remove.
8984 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
8985 (scop_detection::merge_sese): Re-implement with a flood-fill
8986 algorithm that properly finds a SESE region if it exists.
8988 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8991 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
8992 pointer_diff optimizations use view_convert instead of convert.
8994 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8996 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8997 Generate different code for -mno-speculate-indirect-jumps.
8998 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8999 (*call_indirect_aix<mode>): Disable for
9000 -mno-speculate-indirect-jumps.
9001 (*call_indirect_aix<mode>_nospec): New define_insn.
9002 (*call_value_indirect_aix<mode>): Disable for
9003 -mno-speculate-indirect-jumps.
9004 (*call_value_indirect_aix<mode>_nospec): New define_insn.
9005 (*sibcall_nonlocal_sysv<mode>): Generate different code for
9006 -mno-speculate-indirect-jumps.
9007 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9009 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9011 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9012 long double type, set the flags for noting the default long double
9013 type, even if we don't pass or return a long double type.
9015 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
9018 * ipa-inline.c (flatten_function): Do not overwrite final inlining
9021 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
9023 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9024 support for merge[hl].
9025 (fold_mergehl_helper): New helper function.
9026 (tree-vector-builder.h): New #include for tree_vector_builder usage.
9027 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9028 (altivec_vmrglw_direct): Add xxmrglw insn.
9030 2018-01-17 Andrew Waterman <andrew@sifive.com>
9032 * config/riscv/riscv.c (riscv_conditional_register_usage): If
9033 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9035 2018-01-17 David Malcolm <dmalcolm@redhat.com>
9038 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9039 call the lto_location_cache before reading the
9040 DECL_SOURCE_LOCATION of the types.
9042 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
9043 Richard Sandiford <richard.sandiford@linaro.org>
9045 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9046 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9047 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9048 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9049 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9051 * config/aarch64/constraints.md (aarch64_movti_operand):
9053 * config/aarch64/predicates.md (Uti): Add new constraint.
9055 2018-01-17 Carl Love <cel@us.ibm.com>
9057 * config/rs6000/vsx.md (define_expand xl_len_r,
9058 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9059 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9061 (define_expand, define_insn): Move the shift left from the
9062 define_insn to the define_expand for lxvl and stxvl instructions.
9063 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9064 and XL_LEN_R definitions to PURE.
9066 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
9068 * config/i386/i386.c (indirect_thunk_name): Declare regno
9069 as unsigned int. Compare regno with INVALID_REGNUM.
9070 (output_indirect_thunk): Ditto.
9071 (output_indirect_thunk_function): Ditto.
9072 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
9073 in the call to output_indirect_thunk_function.
9075 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
9078 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9079 rather than the size of inner_type to determine the stack slot size
9080 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9082 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
9085 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9088 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
9090 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9091 endian Linux systems to optionally enable multilibs for selecting
9092 the long double type if the user configured an explicit type.
9093 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9094 have no long double multilibs if not defined.
9095 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9096 warn if the user used -mabi={ieee,ibm}longdouble and we built
9097 multilibs for long double.
9098 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9099 appropriate multilib option.
9100 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9102 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9103 for building long double multilibs.
9104 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9106 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
9108 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9111 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9113 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9116 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9119 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9122 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
9124 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9125 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9127 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9129 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9130 different rtl trees depending on TARGET_64BIT.
9131 (rs6000_gen_lvx): Likewise.
9133 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
9135 * config/visium/visium.md (nop): Tweak comment.
9136 (hazard_nop): Likewise.
9138 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9140 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9141 -mspeculate-indirect-jumps.
9142 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9143 for -mno-speculate-indirect-jumps.
9144 (*call_indirect_elfv2<mode>_nospec): New define_insn.
9145 (*call_value_indirect_elfv2<mode>): Disable for
9146 -mno-speculate-indirect-jumps.
9147 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9148 (indirect_jump): Emit different RTL for
9149 -mno-speculate-indirect-jumps.
9150 (*indirect_jump<mode>): Disable for
9151 -mno-speculate-indirect-jumps.
9152 (*indirect_jump<mode>_nospec): New define_insn.
9153 (tablejump): Emit different RTL for
9154 -mno-speculate-indirect-jumps.
9155 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9156 (tablejumpsi_nospec): New define_expand.
9157 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9158 (tablejumpdi_nospec): New define_expand.
9159 (*tablejump<mode>_internal1): Disable for
9160 -mno-speculate-indirect-jumps.
9161 (*tablejump<mode>_internal1_nospec): New define_insn.
9162 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9165 2018-01-16 Artyom Skrobov tyomitch@gmail.com
9167 * caller-save.c (insert_save): Drop unnecessary parameter. All
9170 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9171 Richard Biener <rguenth@suse.de>
9174 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9175 return early, inline manually is_gimple_sizepos. Make sure if we
9176 call gimplify_expr we don't end up with a gimple constant.
9177 * tree.c (variably_modified_type_p): Don't return true for
9178 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
9179 * gimplify.h (is_gimple_sizepos): Remove.
9181 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9183 PR tree-optimization/83857
9184 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9185 vectorizable_live_operation for pure SLP statements.
9186 (vectorizable_live_operation): Handle PHIs.
9188 2018-01-16 Richard Biener <rguenther@suse.de>
9190 PR tree-optimization/83867
9191 * tree-vect-stmts.c (vect_transform_stmt): Precompute
9192 nested_in_vect_loop_p since the scalar stmt may get invalidated.
9194 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9197 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9198 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9199 If off is not INTEGER_CST, issue a may not be aligned warning
9200 rather than isn't aligned. Use isn%'t rather than isn't.
9201 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9203 <case MULT_EXPR>: Improve the case when bottom and one of the
9204 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9205 operand, in that case check if the other operand is multiple of
9206 bottom divided by the INTEGER_CST operand.
9208 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9211 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9212 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9213 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9214 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9215 * config/pa/pa.c (pa_function_arg_advance): Likewise.
9216 (pa_function_arg, pa_arg_partial_bytes): Likewise.
9217 (pa_function_arg_size): New function.
9219 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9221 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9222 in a separate statement.
9224 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
9226 PR tree-optimization/83847
9227 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9228 group gathers and scatters.
9230 2018-01-16 Jakub Jelinek <jakub@redhat.com>
9232 PR rtl-optimization/86620
9233 * params.def (max-sched-ready-insns): Bump minimum value to 1.
9235 PR rtl-optimization/83213
9236 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9237 to last if both are JUMP_INSNs.
9239 PR tree-optimization/83843
9240 * gimple-ssa-store-merging.c
9241 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9242 store_immediate_info for bswap/nop orig_stores.
9244 2018-01-15 Andrew Waterman <andrew@sifive.com>
9246 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9248 <UDIV>: Increase cost if !TARGET_DIV.
9250 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
9252 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9253 (define_attr "cr_logical_3op"): New.
9254 (cceq_ior_compare): Adjust.
9255 (cceq_ior_compare_complement): Adjust.
9256 (*cceq_rev_compare): Adjust.
9257 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9258 (is_cracked_insn): Adjust.
9259 (insn_must_be_first_in_group): Adjust.
9260 * config/rs6000/40x.md: Adjust.
9261 * config/rs6000/440.md: Adjust.
9262 * config/rs6000/476.md: Adjust.
9263 * config/rs6000/601.md: Adjust.
9264 * config/rs6000/603.md: Adjust.
9265 * config/rs6000/6xx.md: Adjust.
9266 * config/rs6000/7450.md: Adjust.
9267 * config/rs6000/7xx.md: Adjust.
9268 * config/rs6000/8540.md: Adjust.
9269 * config/rs6000/cell.md: Adjust.
9270 * config/rs6000/e300c2c3.md: Adjust.
9271 * config/rs6000/e500mc.md: Adjust.
9272 * config/rs6000/e500mc64.md: Adjust.
9273 * config/rs6000/e5500.md: Adjust.
9274 * config/rs6000/e6500.md: Adjust.
9275 * config/rs6000/mpc.md: Adjust.
9276 * config/rs6000/power4.md: Adjust.
9277 * config/rs6000/power5.md: Adjust.
9278 * config/rs6000/power6.md: Adjust.
9279 * config/rs6000/power7.md: Adjust.
9280 * config/rs6000/power8.md: Adjust.
9281 * config/rs6000/power9.md: Adjust.
9282 * config/rs6000/rs64.md: Adjust.
9283 * config/rs6000/titan.md: Adjust.
9285 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9287 * config/i386/predicates.md (indirect_branch_operand): Rewrite
9288 ix86_indirect_branch_register logic.
9290 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9292 * config/i386/constraints.md (Bs): Update
9293 ix86_indirect_branch_register check. Don't check
9294 ix86_indirect_branch_register with GOT_memory_operand.
9296 * config/i386/predicates.md (GOT_memory_operand): Don't check
9297 ix86_indirect_branch_register here.
9298 (GOT32_symbol_operand): Likewise.
9300 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9302 * config/i386/predicates.md (constant_call_address_operand):
9303 Rewrite ix86_indirect_branch_register logic.
9304 (sibcall_insn_operand): Likewise.
9306 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9308 * config/i386/constraints.md (Bs): Replace
9309 ix86_indirect_branch_thunk_register with
9310 ix86_indirect_branch_register.
9312 * config/i386/i386.md (indirect_jump): Likewise.
9313 (tablejump): Likewise.
9314 (*sibcall_memory): Likewise.
9315 (*sibcall_value_memory): Likewise.
9316 Peepholes of indirect call and jump via memory: Likewise.
9317 * config/i386/i386.opt: Likewise.
9318 * config/i386/predicates.md (indirect_branch_operand): Likewise.
9319 (GOT_memory_operand): Likewise.
9320 (call_insn_operand): Likewise.
9321 (sibcall_insn_operand): Likewise.
9322 (GOT32_symbol_operand): Likewise.
9324 2018-01-15 Jakub Jelinek <jakub@redhat.com>
9327 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9328 type rather than type addr's type points to.
9329 (expand_omp_atomic_mutex): Likewise.
9330 (expand_omp_atomic): Likewise.
9332 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
9335 * config/i386/i386.c (output_indirect_thunk_function): Use
9336 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9337 for __x86_return_thunk.
9339 2018-01-15 Richard Biener <rguenther@suse.de>
9342 * expmed.c (extract_bit_field_1): Fix typo.
9344 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9347 * config/arm/iterators.md (VF): New mode iterator.
9348 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9349 Remove integer-related logic from pattern.
9350 (neon_vabd<mode>_3): Likewise.
9352 2018-01-15 Jakub Jelinek <jakub@redhat.com>
9355 * common.opt (fstrict-overflow): No longer an alias.
9356 (fwrapv-pointer): New option.
9357 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
9358 also for pointer types based on flag_wrapv_pointer.
9359 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
9360 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
9361 opts->x_flag_wrapv got set.
9362 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
9363 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
9364 POINTER_TYPE_OVERFLOW_UNDEFINED.
9365 * match.pd: Likewise in address comparison pattern.
9366 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
9368 2018-01-15 Richard Biener <rguenther@suse.de>
9371 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
9372 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
9373 Reset type names to their identifier if their TYPE_DECL doesn't
9374 have linkage (and thus is used for ODR and devirt).
9375 (save_debug_info_for_decl): Remove.
9376 (save_debug_info_for_type): Likewise.
9377 (add_tree_to_fld_list): Adjust.
9378 * tree-pretty-print.c (dump_generic_node): Make dumping of
9379 type names more robust.
9381 2018-01-15 Richard Biener <rguenther@suse.de>
9383 * BASE-VER: Bump to 8.0.1.
9385 2018-01-14 Martin Sebor <msebor@redhat.com>
9388 * builtins.c (check_access): Avoid warning when the no-warning bit
9391 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
9393 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
9394 * ira-color (allocno_hard_regs_compare): Likewise.
9396 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
9399 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
9400 Use .pushsection/.popsection.
9402 2018-01-14 Martin Sebor <msebor@redhat.com>
9405 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
9407 2018-01-14 Jakub Jelinek <jakub@redhat.com>
9409 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
9410 entry from extra_headers.
9411 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
9412 extra_headers, make the list bitwise identical to the i?86-*-* one.
9414 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9416 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
9417 -mcmodel=large with -mindirect-branch=thunk,
9418 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
9419 -mfunction-return=thunk-extern.
9420 * doc/invoke.texi: Document -mcmodel=large is incompatible with
9421 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
9422 -mfunction-return=thunk and -mfunction-return=thunk-extern.
9424 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9426 * config/i386/i386.c (print_reg): Print the name of the full
9427 integer register without '%'.
9428 (ix86_print_operand): Handle 'V'.
9429 * doc/extend.texi: Document 'V' modifier.
9431 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9433 * config/i386/constraints.md (Bs): Disallow memory operand for
9434 -mindirect-branch-register.
9436 * config/i386/predicates.md (indirect_branch_operand): Likewise.
9437 (GOT_memory_operand): Likewise.
9438 (call_insn_operand): Likewise.
9439 (sibcall_insn_operand): Likewise.
9440 (GOT32_symbol_operand): Likewise.
9441 * config/i386/i386.md (indirect_jump): Call convert_memory_address
9442 for -mindirect-branch-register.
9443 (tablejump): Likewise.
9444 (*sibcall_memory): Likewise.
9445 (*sibcall_value_memory): Likewise.
9446 Disallow peepholes of indirect call and jump via memory for
9447 -mindirect-branch-register.
9448 (*call_pop): Replace m with Bw.
9449 (*call_value_pop): Likewise.
9450 (*sibcall_pop_memory): Replace m with Bs.
9451 * config/i386/i386.opt (mindirect-branch-register): New option.
9452 * doc/invoke.texi: Document -mindirect-branch-register option.
9454 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9456 * config/i386/i386-protos.h (ix86_output_function_return): New.
9457 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
9458 set function_return_type.
9459 (indirect_thunk_name): Add ret_p to indicate thunk for function
9461 (output_indirect_thunk_function): Pass false to
9462 indirect_thunk_name.
9463 (ix86_output_indirect_branch_via_reg): Likewise.
9464 (ix86_output_indirect_branch_via_push): Likewise.
9465 (output_indirect_thunk_function): Create alias for function
9466 return thunk if regno < 0.
9467 (ix86_output_function_return): New function.
9468 (ix86_handle_fndecl_attribute): Handle function_return.
9469 (ix86_attribute_table): Add function_return.
9470 * config/i386/i386.h (machine_function): Add
9471 function_return_type.
9472 * config/i386/i386.md (simple_return_internal): Use
9473 ix86_output_function_return.
9474 (simple_return_internal_long): Likewise.
9475 * config/i386/i386.opt (mfunction-return=): New option.
9476 (indirect_branch): Mention -mfunction-return=.
9477 * doc/extend.texi: Document function_return function attribute.
9478 * doc/invoke.texi: Document -mfunction-return= option.
9480 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9482 * config/i386/i386-opts.h (indirect_branch): New.
9483 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
9484 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
9485 with local indirect jump when converting indirect call and jump.
9486 (ix86_set_indirect_branch_type): New.
9487 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
9488 (indirectlabelno): New.
9489 (indirect_thunk_needed): Likewise.
9490 (indirect_thunk_bnd_needed): Likewise.
9491 (indirect_thunks_used): Likewise.
9492 (indirect_thunks_bnd_used): Likewise.
9493 (INDIRECT_LABEL): Likewise.
9494 (indirect_thunk_name): Likewise.
9495 (output_indirect_thunk): Likewise.
9496 (output_indirect_thunk_function): Likewise.
9497 (ix86_output_indirect_branch_via_reg): Likewise.
9498 (ix86_output_indirect_branch_via_push): Likewise.
9499 (ix86_output_indirect_branch): Likewise.
9500 (ix86_output_indirect_jmp): Likewise.
9501 (ix86_code_end): Call output_indirect_thunk_function if needed.
9502 (ix86_output_call_insn): Call ix86_output_indirect_branch if
9504 (ix86_handle_fndecl_attribute): Handle indirect_branch.
9505 (ix86_attribute_table): Add indirect_branch.
9506 * config/i386/i386.h (machine_function): Add indirect_branch_type
9507 and has_local_indirect_jump.
9508 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
9510 (tablejump): Likewise.
9511 (*indirect_jump): Use ix86_output_indirect_jmp.
9512 (*tablejump_1): Likewise.
9513 (simple_return_indirect_internal): Likewise.
9514 * config/i386/i386.opt (mindirect-branch=): New option.
9515 (indirect_branch): New.
9518 (thunk-inline): Likewise.
9519 (thunk-extern): Likewise.
9520 * doc/extend.texi: Document indirect_branch function attribute.
9521 * doc/invoke.texi: Document -mindirect-branch= option.
9523 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
9526 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9528 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
9530 * ipa-inline.c (want_inline_small_function_p): Return false if
9531 inlining has already failed with CIF_FINAL_ERROR.
9532 (update_caller_keys): Call want_inline_small_function_p before
9534 (update_callee_keys): Likewise.
9536 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9538 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9540 (rs6000_quadword_masked_address_p): Likewise.
9541 (quad_aligned_load_p): Likewise.
9542 (quad_aligned_store_p): Likewise.
9543 (const_load_sequence_p): Add comment to describe the outer-most loop.
9544 (mimic_memory_attributes_and_flags): New function.
9545 (rs6000_gen_stvx): Likewise.
9546 (replace_swapped_aligned_store): Likewise.
9547 (rs6000_gen_lvx): Likewise.
9548 (replace_swapped_aligned_load): Likewise.
9549 (replace_swapped_load_constant): Capitalize argument name in
9550 comment describing this function.
9551 (rs6000_analyze_swaps): Add a third pass to search for vector loads
9552 and stores that access quad-word aligned addresses and replace
9553 with stvx or lvx instructions when appropriate.
9554 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9555 New function prototype.
9556 (rs6000_quadword_masked_address_p): Likewise.
9557 (rs6000_gen_lvx): Likewise.
9558 (rs6000_gen_stvx): Likewise.
9559 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9560 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9561 when memory address is aligned.
9562 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9563 this split to select lvx instruction when memory address is aligned.
9564 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
9565 instruction when memory address is aligned.
9566 (*vsx_le_perm_load_v16qi): Likewise.
9567 (four unnamed splitters): Modify to select the stvx instruction
9568 when memory is aligned.
9570 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
9572 * predict.c (determine_unlikely_bbs): Handle correctly BBs
9573 which appears in the queue multiple times.
9575 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9576 Alan Hayward <alan.hayward@arm.com>
9577 David Sherwood <david.sherwood@arm.com>
9579 * tree-vectorizer.h (vec_lower_bound): New structure.
9580 (_loop_vec_info): Add check_nonzero and lower_bounds.
9581 (LOOP_VINFO_CHECK_NONZERO): New macro.
9582 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
9583 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
9584 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
9585 fields. Make seg_len the distance travelled, not including the
9587 (dr_direction_indicator): Declare.
9588 (dr_zero_step_indicator): Likewise.
9589 (dr_known_forward_stride_p): Likewise.
9590 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
9592 (runtime_alias_check_p): Allow runtime alias checks with
9594 (operator ==): Compare access_size and align.
9595 (prune_runtime_alias_test_list): Rework for new distinction between
9596 the access_size and seg_len.
9597 (create_intersect_range_checks_index): Likewise. Cope with polynomial
9599 (get_segment_min_max): New function.
9600 (create_intersect_range_checks): Use it.
9601 (dr_step_indicator): New function.
9602 (dr_direction_indicator): Likewise.
9603 (dr_zero_step_indicator): Likewise.
9604 (dr_known_forward_stride_p): Likewise.
9605 * tree-loop-distribution.c (data_ref_segment_size): Return
9606 DR_STEP * (niters - 1).
9607 (compute_alias_check_pairs): Update call to the dr_with_seg_len
9609 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
9610 (vect_preserves_scalar_order_p): New function, split out from...
9611 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
9612 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
9613 (vect_vfa_access_size): New function.
9614 (vect_vfa_align): Likewise.
9615 (vect_compile_time_alias): Take access_size_a and access_b arguments.
9616 (dump_lower_bound): New function.
9617 (vect_check_lower_bound): Likewise.
9618 (vect_small_gap_p): Likewise.
9619 (vectorizable_with_step_bound_p): Likewise.
9620 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
9621 depencies if the vectorization factor is 1. Convert the checks
9622 for nonzero steps into checks on the bounds of DR_STEP. Try using
9623 a bunds check for variable steps if the minimum required step is
9624 relatively small. Update calls to the dr_with_seg_len
9625 constructor and to vect_compile_time_alias.
9626 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
9628 (vect_loop_versioning): Call it.
9629 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
9631 (vect_estimate_min_profitable_iters): Account for any bounds checks.
9633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9634 Alan Hayward <alan.hayward@arm.com>
9635 David Sherwood <david.sherwood@arm.com>
9637 * doc/sourcebuild.texi (vect_scatter_store): Document.
9638 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
9640 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
9642 * genopinit.c (main): Add supports_vec_scatter_store and
9643 supports_vec_scatter_store_cached to target_optabs.
9644 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
9645 IFN_MASK_SCATTER_STORE.
9646 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
9648 * internal-fn.h (internal_store_fn_p): Declare.
9649 (internal_fn_stored_value_index): Likewise.
9650 * internal-fn.c (scatter_store_direct): New macro.
9651 (expand_scatter_store_optab_fn): New function.
9652 (direct_scatter_store_optab_supported_p): New macro.
9653 (internal_store_fn_p): New function.
9654 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
9655 IFN_MASK_SCATTER_STORE.
9656 (internal_fn_mask_index): Likewise.
9657 (internal_fn_stored_value_index): New function.
9658 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
9660 * optabs-query.h (supports_vec_scatter_store_p): Declare.
9661 * optabs-query.c (supports_vec_scatter_store_p): New function.
9662 * tree-vectorizer.h (vect_get_store_rhs): Declare.
9663 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
9664 true for scatter stores.
9665 (vect_gather_scatter_fn_p): Handle scatter stores too.
9666 (vect_check_gather_scatter): Consider using scatter stores if
9667 supports_vec_scatter_store_p.
9668 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
9670 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9671 internal_fn_stored_value_index.
9672 (check_load_store_masking): Handle scatter stores too.
9673 (vect_get_store_rhs): Make public.
9674 (vectorizable_call): Use internal_store_fn_p.
9675 (vectorizable_store): Handle scatter store internal functions.
9676 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
9677 when deciding whether the end of the group has been reached.
9678 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
9679 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
9680 (mask_scatter_store<mode>): New insns.
9682 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9683 Alan Hayward <alan.hayward@arm.com>
9684 David Sherwood <david.sherwood@arm.com>
9686 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
9687 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
9688 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
9690 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
9691 Use vect_truncate_gather_scatter_offset if we can't treat the
9692 operation as a normal gather load or scatter store.
9693 (get_group_load_store_type): Take the gather_scatter_info
9694 as argument. Try using a gather load or scatter store for
9695 single-element groups.
9696 (get_load_store_type): Update calls to get_group_load_store_type
9697 and vect_use_strided_gather_scatters_p.
9699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9700 Alan Hayward <alan.hayward@arm.com>
9701 David Sherwood <david.sherwood@arm.com>
9703 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
9704 optional tree argument.
9705 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
9707 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
9708 but continue to use the current value as a fallback.
9709 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
9710 to compare the updates.
9711 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
9712 (get_load_store_type): Use it when handling a strided access.
9713 (vect_get_strided_load_store_ops): New function.
9714 (vect_get_data_ptr_increment): Likewise.
9715 (vectorizable_load): Handle strided gather loads. Always pass
9716 a step to vect_create_data_ref_ptr and bump_vector_ptr.
9718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9719 Alan Hayward <alan.hayward@arm.com>
9720 David Sherwood <david.sherwood@arm.com>
9722 * doc/md.texi (gather_load@var{m}): Document.
9723 (mask_gather_load@var{m}): Likewise.
9724 * genopinit.c (main): Add supports_vec_gather_load and
9725 supports_vec_gather_load_cached to target_optabs.
9726 * optabs-tree.c (init_tree_optimization_optabs): Use
9727 ggc_cleared_alloc to allocate target_optabs.
9728 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
9729 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
9731 * internal-fn.h (internal_load_fn_p): Declare.
9732 (internal_gather_scatter_fn_p): Likewise.
9733 (internal_fn_mask_index): Likewise.
9734 (internal_gather_scatter_fn_supported_p): Likewise.
9735 * internal-fn.c (gather_load_direct): New macro.
9736 (expand_gather_load_optab_fn): New function.
9737 (direct_gather_load_optab_supported_p): New macro.
9738 (direct_internal_fn_optab): New function.
9739 (internal_load_fn_p): Likewise.
9740 (internal_gather_scatter_fn_p): Likewise.
9741 (internal_fn_mask_index): Likewise.
9742 (internal_gather_scatter_fn_supported_p): Likewise.
9743 * optabs-query.c (supports_at_least_one_mode_p): New function.
9744 (supports_vec_gather_load_p): Likewise.
9745 * optabs-query.h (supports_vec_gather_load_p): Declare.
9746 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
9747 and memory_type field.
9748 (NUM_PATTERNS): Bump to 15.
9749 * tree-vect-data-refs.c: Include internal-fn.h.
9750 (vect_gather_scatter_fn_p): New function.
9751 (vect_describe_gather_scatter_call): Likewise.
9752 (vect_check_gather_scatter): Try using internal functions for
9753 gather loads. Recognize existing calls to a gather load function.
9754 (vect_analyze_data_refs): Consider using gather loads if
9755 supports_vec_gather_load_p.
9756 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
9757 (vect_get_gather_scatter_offset_type): Likewise.
9758 (vect_convert_mask_for_vectype): Likewise.
9759 (vect_add_conversion_to_patterm): Likewise.
9760 (vect_try_gather_scatter_pattern): Likewise.
9761 (vect_recog_gather_scatter_pattern): New pattern recognizer.
9762 (vect_vect_recog_func_ptrs): Add it.
9763 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9764 internal_fn_mask_index and internal_gather_scatter_fn_p.
9765 (check_load_store_masking): Take the gather_scatter_info as an
9766 argument and handle gather loads.
9767 (vect_get_gather_scatter_ops): New function.
9768 (vectorizable_call): Check internal_load_fn_p.
9769 (vectorizable_load): Likewise. Handle gather load internal
9771 (vectorizable_store): Update call to check_load_store_masking.
9772 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
9773 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
9774 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
9775 (aarch64_gather_scale_operand_d): New predicates.
9776 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
9777 (mask_gather_load<mode>): New insns.
9779 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9780 Alan Hayward <alan.hayward@arm.com>
9781 David Sherwood <david.sherwood@arm.com>
9783 * optabs.def (fold_left_plus_optab): New optab.
9784 * doc/md.texi (fold_left_plus_@var{m}): Document.
9785 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
9786 * internal-fn.c (fold_left_direct): Define.
9787 (expand_fold_left_optab_fn): Likewise.
9788 (direct_fold_left_optab_supported_p): Likewise.
9789 * fold-const-call.c (fold_const_fold_left): New function.
9790 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
9791 * tree-parloops.c (valid_reduction_p): New function.
9792 (gather_scalar_reductions): Use it.
9793 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
9794 (vect_finish_replace_stmt): Declare.
9795 * tree-vect-loop.c (fold_left_reduction_fn): New function.
9796 (needs_fold_left_reduction_p): New function, split out from...
9797 (vect_is_simple_reduction): ...here. Accept reductions that
9798 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
9799 (vect_force_simple_reduction): Also store the reduction type in
9800 the assignment's STMT_VINFO_REDUC_TYPE.
9801 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
9802 (merge_with_identity): New function.
9803 (vect_expand_fold_left): Likewise.
9804 (vectorize_fold_left_reduction): Likewise.
9805 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
9806 scalar phi in place for it. Check for target support and reject
9807 cases that would reassociate the operation. Defer the transform
9808 phase to vectorize_fold_left_reduction.
9809 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
9810 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
9811 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
9813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9815 * tree-if-conv.c (predicate_mem_writes): Remove redundant
9816 call to ifc_temp_var.
9818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9819 Alan Hayward <alan.hayward@arm.com>
9820 David Sherwood <david.sherwood@arm.com>
9822 * target.def (legitimize_address_displacement): Take the original
9823 offset as a poly_int.
9824 * targhooks.h (default_legitimize_address_displacement): Update
9826 * targhooks.c (default_legitimize_address_displacement): Likewise.
9827 * doc/tm.texi: Regenerate.
9828 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
9829 as an argument, moving assert of ad->disp == ad->disp_term to...
9830 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
9831 Try calling targetm.legitimize_address_displacement before expanding
9832 the address rather than afterwards, and adjust for the new interface.
9833 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9834 Match the new hook interface. Handle SVE addresses.
9835 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
9838 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9840 * Makefile.in (OBJS): Add early-remat.o.
9841 * target.def (select_early_remat_modes): New hook.
9842 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
9843 * doc/tm.texi: Regenerate.
9844 * targhooks.h (default_select_early_remat_modes): Declare.
9845 * targhooks.c (default_select_early_remat_modes): New function.
9846 * timevar.def (TV_EARLY_REMAT): New timevar.
9847 * passes.def (pass_early_remat): New pass.
9848 * tree-pass.h (make_pass_early_remat): Declare.
9849 * early-remat.c: New file.
9850 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
9852 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
9854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9855 Alan Hayward <alan.hayward@arm.com>
9856 David Sherwood <david.sherwood@arm.com>
9858 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
9859 vfm1 with a bound_epilog parameter.
9860 (vect_do_peeling): Update calls accordingly, and move the prologue
9861 call earlier in the function. Treat the base bound_epilog as 0 for
9862 fully-masked loops and retain vf - 1 for other loops. Add 1 to
9863 this base when peeling for gaps.
9864 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
9865 with fully-masked loops.
9866 (vect_estimate_min_profitable_iters): Handle the single peeled
9867 iteration in that case.
9869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9870 Alan Hayward <alan.hayward@arm.com>
9871 David Sherwood <david.sherwood@arm.com>
9873 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
9874 single-element interleaving even if the size is not a power of 2.
9875 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
9876 accesses for single-element interleaving if the group size is
9879 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9880 Alan Hayward <alan.hayward@arm.com>
9881 David Sherwood <david.sherwood@arm.com>
9883 * doc/md.texi (fold_extract_last_@var{m}): Document.
9884 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
9885 * optabs.def (fold_extract_last_optab): New optab.
9886 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
9887 * internal-fn.c (fold_extract_direct): New macro.
9888 (expand_fold_extract_optab_fn): Likewise.
9889 (direct_fold_extract_optab_supported_p): Likewise.
9890 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
9891 * tree-vect-loop.c (vect_model_reduction_cost): Handle
9892 EXTRACT_LAST_REDUCTION.
9893 (get_initial_def_for_reduction): Do not create an initial vector
9894 for EXTRACT_LAST_REDUCTION reductions.
9895 (vectorizable_reduction): Leave the scalar phi in place for
9896 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
9897 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
9898 epilogue code for EXTRACT_LAST_REDUCTION and defer the
9899 transform phase to vectorizable_condition.
9900 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
9902 (vect_finish_stmt_generation): ...here.
9903 (vect_finish_replace_stmt): New function.
9904 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
9905 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
9907 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
9909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9910 Alan Hayward <alan.hayward@arm.com>
9911 David Sherwood <david.sherwood@arm.com>
9913 * doc/md.texi (extract_last_@var{m}): Document.
9914 * optabs.def (extract_last_optab): New optab.
9915 * internal-fn.def (EXTRACT_LAST): New internal function.
9916 * internal-fn.c (cond_unary_direct): New macro.
9917 (expand_cond_unary_optab_fn): Likewise.
9918 (direct_cond_unary_optab_supported_p): Likewise.
9919 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
9920 loops using EXTRACT_LAST.
9921 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
9922 (extract_last_<mode>): ...this optab.
9923 (vec_extract<mode><Vel>): Update accordingly.
9925 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9926 Alan Hayward <alan.hayward@arm.com>
9927 David Sherwood <david.sherwood@arm.com>
9929 * target.def (empty_mask_is_expensive): New hook.
9930 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
9931 * doc/tm.texi: Regenerate.
9932 * targhooks.h (default_empty_mask_is_expensive): Declare.
9933 * targhooks.c (default_empty_mask_is_expensive): New function.
9934 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
9935 if the target says that empty masks are expensive.
9936 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
9938 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
9940 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9941 Alan Hayward <alan.hayward@arm.com>
9942 David Sherwood <david.sherwood@arm.com>
9944 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
9945 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
9946 (vect_use_loop_mask_for_alignment_p): New function.
9947 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
9948 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
9949 niters_skip argument. Make sure that the first niters_skip elements
9950 of the first iteration are inactive.
9951 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
9952 Update call to vect_set_loop_masks_directly.
9953 (get_misalign_in_elems): New function, split out from...
9954 (vect_gen_prolog_loop_niters): ...here.
9955 (vect_update_init_of_dr): Take a code argument that specifies whether
9956 the adjustment should be added or subtracted.
9957 (vect_update_init_of_drs): Likewise.
9958 (vect_prepare_for_masked_peels): New function.
9959 (vect_do_peeling): Skip prologue peeling if we're using a mask
9960 instead. Update call to vect_update_inits_of_drs.
9961 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9963 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
9964 alignment. Do not include the number of peeled iterations in
9965 the minimum threshold in that case.
9966 (vectorizable_induction): Adjust the start value down by
9967 LOOP_VINFO_MASK_SKIP_NITERS iterations.
9968 (vect_transform_loop): Call vect_prepare_for_masked_peels.
9969 Take the number of skipped iterations into account when calculating
9971 * tree-vect-stmts.c (vect_gen_while_not): New function.
9973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9974 Alan Hayward <alan.hayward@arm.com>
9975 David Sherwood <david.sherwood@arm.com>
9977 * doc/sourcebuild.texi (vect_fully_masked): Document.
9978 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
9980 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
9982 (vect_analyze_loop_2): ...here. Don't check the vectorization
9983 factor against the number of loop iterations if the loop is
9986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9987 Alan Hayward <alan.hayward@arm.com>
9988 David Sherwood <david.sherwood@arm.com>
9990 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
9991 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
9992 (dump_groups): Update accordingly.
9993 (iv_use::mem_type): New member variable.
9994 (address_p): New function.
9995 (record_use): Add a mem_type argument and initialize the new
9997 (record_group_use): Add a mem_type argument. Use address_p.
9998 Remove obsolete null checks of base_object. Update call to record_use.
9999 (find_interesting_uses_op): Update call to record_group_use.
10000 (find_interesting_uses_cond): Likewise.
10001 (find_interesting_uses_address): Likewise.
10002 (get_mem_type_for_internal_fn): New function.
10003 (find_address_like_use): Likewise.
10004 (find_interesting_uses_stmt): Try find_address_like_use before
10005 calling find_interesting_uses_op.
10006 (addr_offset_valid_p): Use the iv mem_type field as the type
10007 of the addressed memory.
10008 (add_autoinc_candidates): Likewise.
10009 (get_address_cost): Likewise.
10010 (split_small_address_groups_p): Use address_p.
10011 (split_address_groups): Likewise.
10012 (add_iv_candidate_for_use): Likewise.
10013 (autoinc_possible_for_pair): Likewise.
10014 (rewrite_groups): Likewise.
10015 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10016 (determine_group_iv_cost): Update after split of USE_ADDRESS.
10017 (get_alias_ptr_type_for_ptr_address): New function.
10018 (rewrite_use_address): Rewrite address uses in calls that were
10019 identified by find_address_like_use.
10021 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10022 Alan Hayward <alan.hayward@arm.com>
10023 David Sherwood <david.sherwood@arm.com>
10025 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10027 * gimple-expr.h (is_gimple_addressable: Likewise.
10028 * gimple-expr.c (is_gimple_address): Likewise.
10029 * internal-fn.c (expand_call_mem_ref): New function.
10030 (expand_mask_load_optab_fn): Use it.
10031 (expand_mask_store_optab_fn): Likewise.
10033 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10034 Alan Hayward <alan.hayward@arm.com>
10035 David Sherwood <david.sherwood@arm.com>
10037 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10038 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10039 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10040 (cond_umax@var{mode}): Document.
10041 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10042 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10043 (cond_umin_optab, cond_umax_optab): New optabs.
10044 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10045 (COND_IOR, COND_XOR): New internal functions.
10046 * internal-fn.h (get_conditional_internal_fn): Declare.
10047 * internal-fn.c (cond_binary_direct): New macro.
10048 (expand_cond_binary_optab_fn): Likewise.
10049 (direct_cond_binary_optab_supported_p): Likewise.
10050 (get_conditional_internal_fn): New function.
10051 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10052 Cope with reduction statements that are vectorized as calls rather
10054 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10055 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10056 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10057 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10058 (UNSPEC_COND_EOR): New unspecs.
10059 (optab): Add mappings for them.
10060 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10061 (sve_int_op, sve_fp_op): New int attributes.
10063 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10064 Alan Hayward <alan.hayward@arm.com>
10065 David Sherwood <david.sherwood@arm.com>
10067 * optabs.def (while_ult_optab): New optab.
10068 * doc/md.texi (while_ult@var{m}@var{n}): Document.
10069 * internal-fn.def (WHILE_ULT): New internal function.
10070 * internal-fn.h (direct_internal_fn_supported_p): New override
10071 that takes two types as argument.
10072 * internal-fn.c (while_direct): New macro.
10073 (expand_while_optab_fn): New function.
10074 (convert_optab_supported_p): Likewise.
10075 (direct_while_optab_supported_p): New macro.
10076 * wide-int.h (wi::udiv_ceil): New function.
10077 * tree-vectorizer.h (rgroup_masks): New structure.
10078 (vec_loop_masks): New typedef.
10079 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10080 and fully_masked_p.
10081 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10082 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10083 (vect_max_vf): New function.
10084 (slpeel_make_loop_iterate_ntimes): Delete.
10085 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10086 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10087 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10088 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10089 internal-fn.h, stor-layout.h and optabs-query.h.
10090 (vect_set_loop_mask): New function.
10091 (add_preheader_seq): Likewise.
10092 (add_header_seq): Likewise.
10093 (interleave_supported_p): Likewise.
10094 (vect_maybe_permute_loop_masks): Likewise.
10095 (vect_set_loop_masks_directly): Likewise.
10096 (vect_set_loop_condition_masked): Likewise.
10097 (vect_set_loop_condition_unmasked): New function, split out from
10098 slpeel_make_loop_iterate_ntimes.
10099 (slpeel_make_loop_iterate_ntimes): Rename to..
10100 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
10101 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10102 (vect_do_peeling): Update call accordingly.
10103 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10105 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10106 mask_compare_type, can_fully_mask_p and fully_masked_p.
10107 (release_vec_loop_masks): New function.
10108 (_loop_vec_info): Use it to free the loop masks.
10109 (can_produce_all_loop_masks_p): New function.
10110 (vect_get_max_nscalars_per_iter): Likewise.
10111 (vect_verify_full_masking): Likewise.
10112 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10113 retries, and free the mask rgroups before retrying. Check loop-wide
10114 reasons for disallowing fully-masked loops. Make the final decision
10115 about whether use a fully-masked loop or not.
10116 (vect_estimate_min_profitable_iters): Do not assume that peeling
10117 for the number of iterations will be needed for fully-masked loops.
10118 (vectorizable_reduction): Disable fully-masked loops.
10119 (vectorizable_live_operation): Likewise.
10120 (vect_halve_mask_nunits): New function.
10121 (vect_double_mask_nunits): Likewise.
10122 (vect_record_loop_mask): Likewise.
10123 (vect_get_loop_mask): Likewise.
10124 (vect_transform_loop): Handle the case in which the final loop
10125 iteration might handle a partial vector. Call vect_set_loop_condition
10126 instead of slpeel_make_loop_iterate_ntimes.
10127 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10128 (check_load_store_masking): New function.
10129 (prepare_load_store_mask): Likewise.
10130 (vectorizable_store): Handle fully-masked loops.
10131 (vectorizable_load): Likewise.
10132 (supportable_widening_operation): Use vect_halve_mask_nunits for
10134 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10135 (vect_gen_while): New function.
10136 * config/aarch64/aarch64.md (umax<mode>3): New expander.
10137 (aarch64_uqdec<mode>): New insn.
10139 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10140 Alan Hayward <alan.hayward@arm.com>
10141 David Sherwood <david.sherwood@arm.com>
10143 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10144 (reduc_xor_scal_optab): New optabs.
10145 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10146 (reduc_xor_scal_@var{m}): Document.
10147 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10148 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10149 internal functions.
10150 * fold-const-call.c (fold_const_call): Handle them.
10151 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10152 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10153 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10154 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10155 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10156 (UNSPEC_XORV): New unspecs.
10157 (optab): Add entries for them.
10158 (BITWISEV): New int iterator.
10159 (bit_reduc_op): New int attributes.
10161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10162 Alan Hayward <alan.hayward@arm.com>
10163 David Sherwood <david.sherwood@arm.com>
10165 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10166 * internal-fn.def (VEC_SHL_INSERT): New internal function.
10167 * optabs.def (vec_shl_insert_optab): New optab.
10168 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10169 (duplicate_and_interleave): Likewise.
10170 * tree-vect-loop.c: Include internal-fn.h.
10171 (neutral_op_for_slp_reduction): New function, split out from
10172 get_initial_defs_for_reduction.
10173 (get_initial_def_for_reduction): Handle option 2 for variable-length
10174 vectors by loading the neutral value into a vector and then shifting
10175 the initial value into element 0.
10176 (get_initial_defs_for_reduction): Replace the code argument with
10177 the neutral value calculated by neutral_op_for_slp_reduction.
10178 Use gimple_build_vector for constant-length vectors.
10179 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10180 but the first group_size elements have a neutral value.
10181 Use duplicate_and_interleave otherwise.
10182 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10183 Update call to get_initial_defs_for_reduction. Handle SLP
10184 reductions for variable-length vectors by creating one vector
10185 result for each scalar result, with the elements associated
10186 with other scalar results stubbed out with the neutral value.
10187 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10188 Require IFN_VEC_SHL_INSERT for double reductions on
10189 variable-length vectors, or SLP reductions that have
10190 a neutral value. Require can_duplicate_and_interleave_p
10191 support for variable-length unchained SLP reductions if there
10192 is no neutral value, such as for MIN/MAX reductions. Also require
10193 the number of vector elements to be a multiple of the number of
10194 SLP statements when doing variable-length unchained SLP reductions.
10195 Update call to vect_create_epilog_for_reduction.
10196 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10197 and remove initial values.
10198 (duplicate_and_interleave): Make public.
10199 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10200 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10202 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10203 Alan Hayward <alan.hayward@arm.com>
10204 David Sherwood <david.sherwood@arm.com>
10206 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10207 (can_duplicate_and_interleave_p): New function.
10208 (vect_get_and_check_slp_defs): Take the vector of statements
10209 rather than just the current one. Remove excess parentheses.
10210 Restriction rejectinon of vect_constant_def and vect_external_def
10211 for variable-length vectors to boolean types, or types for which
10212 can_duplicate_and_interleave_p is false.
10213 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10214 (duplicate_and_interleave): New function.
10215 (vect_get_constant_vectors): Use gimple_build_vector for
10216 constant-length vectors and suitable variable-length constant
10217 vectors. Use duplicate_and_interleave for other variable-length
10218 vectors. Don't defer the update when inserting new statements.
10220 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10221 Alan Hayward <alan.hayward@arm.com>
10222 David Sherwood <david.sherwood@arm.com>
10224 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10225 min_profitable_iters doesn't go negative.
10227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10228 Alan Hayward <alan.hayward@arm.com>
10229 David Sherwood <david.sherwood@arm.com>
10231 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10232 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10233 * optabs.def (vec_mask_load_lanes_optab): New optab.
10234 (vec_mask_store_lanes_optab): Likewise.
10235 * internal-fn.def (MASK_LOAD_LANES): New internal function.
10236 (MASK_STORE_LANES): Likewise.
10237 * internal-fn.c (mask_load_lanes_direct): New macro.
10238 (mask_store_lanes_direct): Likewise.
10239 (expand_mask_load_optab_fn): Handle masked operations.
10240 (expand_mask_load_lanes_optab_fn): New macro.
10241 (expand_mask_store_optab_fn): Handle masked operations.
10242 (expand_mask_store_lanes_optab_fn): New macro.
10243 (direct_mask_load_lanes_optab_supported_p): Likewise.
10244 (direct_mask_store_lanes_optab_supported_p): Likewise.
10245 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10247 (vect_load_lanes_supported): Likewise.
10248 * tree-vect-data-refs.c (strip_conversion): New function.
10249 (can_group_stmts_p): Likewise.
10250 (vect_analyze_data_ref_accesses): Use it instead of checking
10251 for a pair of assignments.
10252 (vect_store_lanes_supported): Take a masked_p parameter.
10253 (vect_load_lanes_supported): Likewise.
10254 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10255 vect_store_lanes_supported and vect_load_lanes_supported.
10256 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10257 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10258 parameter. Don't allow gaps for masked accesses.
10259 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
10260 and vect_load_lanes_supported.
10261 (get_load_store_type): Take a masked_p parameter and update
10262 call to get_group_load_store_type.
10263 (vectorizable_store): Update call to get_load_store_type.
10264 Handle IFN_MASK_STORE_LANES.
10265 (vectorizable_load): Update call to get_load_store_type.
10266 Handle IFN_MASK_LOAD_LANES.
10268 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10269 Alan Hayward <alan.hayward@arm.com>
10270 David Sherwood <david.sherwood@arm.com>
10272 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10274 * config/aarch64/aarch64-protos.h
10275 (aarch64_sve_struct_memory_operand_p): Declare.
10276 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10277 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10278 (VPRED, vpred): Handle SVE structure modes.
10279 * config/aarch64/constraints.md (Utx): New constraint.
10280 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10281 (aarch64_sve_struct_nonimmediate_operand): New predicates.
10282 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10283 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10284 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10285 structure modes. Split into pieces after RA.
10286 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10287 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10289 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10290 SVE structure modes.
10291 (aarch64_classify_address): Likewise.
10292 (sizetochar): Move earlier in file.
10293 (aarch64_print_operand): Handle SVE register lists.
10294 (aarch64_array_mode): New function.
10295 (aarch64_sve_struct_memory_operand_p): Likewise.
10296 (TARGET_ARRAY_MODE): Redefine.
10298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10299 Alan Hayward <alan.hayward@arm.com>
10300 David Sherwood <david.sherwood@arm.com>
10302 * target.def (array_mode): New target hook.
10303 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10304 * doc/tm.texi: Regenerate.
10305 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10306 * hooks.c (hook_optmode_mode_uhwi_none): New function.
10307 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10308 targetm.array_mode.
10309 * stor-layout.c (mode_for_array): Likewise. Support polynomial
10312 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10313 Alan Hayward <alan.hayward@arm.com>
10314 David Sherwood <david.sherwood@arm.com>
10316 * fold-const.c (fold_binary_loc): Check the argument types
10317 rather than the result type when testing for a vector operation.
10319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10321 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10322 * doc/tm.texi: Regenerate.
10324 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10325 Alan Hayward <alan.hayward@arm.com>
10326 David Sherwood <david.sherwood@arm.com>
10328 * doc/invoke.texi (-msve-vector-bits=): Document new option.
10329 (sve): Document new AArch64 extension.
10330 * doc/md.texi (w): Extend the description of the AArch64
10331 constraint to include SVE vectors.
10332 (Upl, Upa): Document new AArch64 predicate constraints.
10333 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10335 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10336 (msve-vector-bits=): New option.
10337 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10338 SVE when these are disabled.
10339 (sve): New extension.
10340 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10341 modes. Adjust their number of units based on aarch64_sve_vg.
10342 (MAX_BITSIZE_MODE_ANY_MODE): Define.
10343 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10344 aarch64_addr_query_type.
10345 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10346 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10347 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10348 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10349 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10350 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10351 (aarch64_simd_imm_zero_p): Delete.
10352 (aarch64_check_zero_based_sve_index_immediate): Declare.
10353 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10354 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10355 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10356 (aarch64_sve_float_mul_immediate_p): Likewise.
10357 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10358 rather than an rtx.
10359 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
10360 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
10361 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
10362 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
10363 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
10364 (aarch64_regmode_natural_size): Likewise.
10365 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
10366 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
10368 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
10369 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
10370 for VG and the SVE predicate registers.
10371 (V_ALIASES): Add a "z"-prefixed alias.
10372 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
10373 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
10374 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
10375 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
10376 (REG_CLASS_NAMES): Add entries for them.
10377 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
10378 and the predicate registers.
10379 (aarch64_sve_vg): Declare.
10380 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
10381 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
10382 (REGMODE_NATURAL_SIZE): Define.
10383 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
10385 * config/aarch64/aarch64.c: Include cfgrtl.h.
10386 (simd_immediate_info): Add a constructor for series vectors,
10387 and an associated step field.
10388 (aarch64_sve_vg): New variable.
10389 (aarch64_dbx_register_number): Handle VG and the predicate registers.
10390 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
10391 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
10392 (VEC_ANY_DATA, VEC_STRUCT): New constants.
10393 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
10394 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
10395 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
10396 (aarch64_get_mask_mode): New functions.
10397 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
10398 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
10399 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
10400 predicate modes and predicate registers. Explicitly restrict
10401 GPRs to modes of 16 bytes or smaller. Only allow FP registers
10402 to store a vector mode if it is recognized by
10403 aarch64_classify_vector_mode.
10404 (aarch64_regmode_natural_size): New function.
10405 (aarch64_hard_regno_caller_save_mode): Return the original mode
10407 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
10408 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
10409 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
10410 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
10412 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
10413 does not overlap dest if the function is frame-related. Handle
10415 (aarch64_split_add_offset): New function.
10416 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
10417 them aarch64_add_offset.
10418 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
10419 and update call to aarch64_sub_sp.
10420 (aarch64_add_cfa_expression): New function.
10421 (aarch64_expand_prologue): Pass extra temporary registers to the
10422 functions above. Handle the case in which we need to emit new
10423 DW_CFA_expressions for registers that were originally saved
10424 relative to the stack pointer, but now have to be expressed
10425 relative to the frame pointer.
10426 (aarch64_output_mi_thunk): Pass extra temporary registers to the
10428 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
10429 IP0 and IP1 values for SVE frames.
10430 (aarch64_expand_vec_series): New function.
10431 (aarch64_expand_sve_widened_duplicate): Likewise.
10432 (aarch64_expand_sve_const_vector): Likewise.
10433 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
10434 Handle SVE constants. Use emit_move_insn to move a force_const_mem
10435 into the register, rather than emitting a SET directly.
10436 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
10437 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
10438 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
10439 (offset_9bit_signed_scaled_p): New functions.
10440 (aarch64_replicate_bitmask_imm): New function.
10441 (aarch64_bitmask_imm): Use it.
10442 (aarch64_cannot_force_const_mem): Reject expressions involving
10443 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
10444 (aarch64_classify_index): Handle SVE indices, by requiring
10445 a plain register index with a scale that matches the element size.
10446 (aarch64_classify_address): Handle SVE addresses. Assert that
10447 the mode of the address is VOIDmode or an integer mode.
10448 Update call to aarch64_classify_symbol.
10449 (aarch64_classify_symbolic_expression): Update call to
10450 aarch64_classify_symbol.
10451 (aarch64_const_vec_all_in_range_p): New function.
10452 (aarch64_print_vector_float_operand): Likewise.
10453 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
10454 "vN" for FP registers with SVE modes. Handle (const ...) vectors
10455 and the FP immediates 1.0 and 0.5.
10456 (aarch64_print_address_internal): Handle SVE addresses.
10457 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
10458 (aarch64_regno_regclass): Handle predicate registers.
10459 (aarch64_secondary_reload): Handle big-endian reloads of SVE
10461 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
10462 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
10463 (aarch64_convert_sve_vector_bits): New function.
10464 (aarch64_override_options): Use it to handle -msve-vector-bits=.
10465 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10466 rather than an rtx.
10467 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
10468 Handle SVE vector and predicate modes. Accept VL-based constants
10469 that need only one temporary register, and VL offsets that require
10470 no temporary registers.
10471 (aarch64_conditional_register_usage): Mark the predicate registers
10472 as fixed if SVE isn't available.
10473 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
10474 Return true for SVE vector and predicate modes.
10475 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
10476 rather than an unsigned int. Handle SVE modes.
10477 (aarch64_preferred_simd_mode): Update call accordingly. Handle
10479 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
10481 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10482 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10483 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10484 (aarch64_sve_float_mul_immediate_p): New functions.
10485 (aarch64_sve_valid_immediate): New function.
10486 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
10487 Explicitly reject structure modes. Check for INDEX constants.
10488 Handle PTRUE and PFALSE constants.
10489 (aarch64_check_zero_based_sve_index_immediate): New function.
10490 (aarch64_simd_imm_zero_p): Delete.
10491 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
10492 vector modes. Accept constants in the range of CNT[BHWD].
10493 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
10494 ask for an Advanced SIMD mode.
10495 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
10496 (aarch64_simd_vector_alignment): Handle SVE predicates.
10497 (aarch64_vectorize_preferred_vector_alignment): New function.
10498 (aarch64_simd_vector_alignment_reachable): Use it instead of
10500 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
10501 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
10503 (MAX_VECT_LEN): Delete.
10504 (expand_vec_perm_d): Add a vec_flags field.
10505 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
10506 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
10507 (aarch64_evpc_ext): Don't apply a big-endian lane correction
10509 (aarch64_evpc_rev): Rename to...
10510 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
10511 (aarch64_evpc_rev_global): New function.
10512 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
10513 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10515 (aarch64_evpc_sve_tbl): New function.
10516 (aarch64_expand_vec_perm_const_1): Update after rename of
10517 aarch64_evpc_rev. Handle SVE permutes too, trying
10518 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10519 than aarch64_evpc_tbl.
10520 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10521 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10522 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10523 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10524 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10525 (aarch64_expand_sve_vcond): New functions.
10526 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10527 of aarch64_vector_mode_p.
10528 (aarch64_dwarf_poly_indeterminate_value): New function.
10529 (aarch64_compute_pressure_classes): Likewise.
10530 (aarch64_can_change_mode_class): Likewise.
10531 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10532 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10533 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10534 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10535 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10536 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10537 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10538 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10540 (Dn, Dl, Dr): Accept const as well as const_vector.
10541 (Dz): Likewise. Compare against CONST0_RTX.
10542 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10543 of "vector" where appropriate.
10544 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10545 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10546 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10547 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10548 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10549 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10550 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10551 (v_int_equiv): Extend to SVE modes.
10552 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10554 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10555 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10556 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10557 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10558 (SVE_COND_FP_CMP): New int iterators.
10559 (perm_hilo): Handle the new unpack unspecs.
10560 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10562 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10563 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10564 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
10565 (aarch64_equality_operator, aarch64_constant_vector_operand)
10566 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
10567 (aarch64_sve_nonimmediate_operand): Likewise.
10568 (aarch64_sve_general_operand): Likewise.
10569 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
10570 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
10571 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
10572 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
10573 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
10574 (aarch64_sve_float_arith_immediate): Likewise.
10575 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
10576 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
10577 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
10578 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
10579 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
10580 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
10581 (aarch64_sve_float_arith_operand): Likewise.
10582 (aarch64_sve_float_arith_with_sub_operand): Likewise.
10583 (aarch64_sve_float_mul_operand): Likewise.
10584 (aarch64_sve_vec_perm_operand): Likewise.
10585 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
10586 (aarch64_mov_operand): Accept const_poly_int and const_vector.
10587 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
10588 as well as const_vector.
10589 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
10590 in file. Use CONST0_RTX and CONSTM1_RTX.
10591 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
10592 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
10593 Use aarch64_simd_imm_zero.
10594 * config/aarch64/aarch64-sve.md: New file.
10595 * config/aarch64/aarch64.md: Include it.
10596 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
10597 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
10598 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
10599 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
10600 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
10601 (sve): New attribute.
10602 (enabled): Disable instructions with the sve attribute unless
10604 (movqi, movhi): Pass CONST_POLY_INT operaneds through
10605 aarch64_expand_mov_immediate.
10606 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
10607 CNT[BHSD] immediates.
10608 (movti): Split CONST_POLY_INT moves into two halves.
10609 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
10610 Split additions that need a temporary here if the destination
10611 is the stack pointer.
10612 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
10613 (*add<mode>3_poly_1): New instruction.
10614 (set_clobber_cc): New expander.
10616 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10618 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
10619 parameter and use it instead of GET_MODE_SIZE (innermode). Use
10620 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
10621 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
10622 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
10623 Change innermode from fixed_mode_size to machine_mode.
10624 (simplify_subreg): Update call accordingly. Handle a constant-sized
10625 subreg of a variable-length CONST_VECTOR.
10627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10628 Alan Hayward <alan.hayward@arm.com>
10629 David Sherwood <david.sherwood@arm.com>
10631 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
10632 (add_offset_to_base): New function, split out from...
10633 (create_mem_ref): ...here. When handling a scale other than 1,
10634 check first whether the address is valid without the offset.
10635 Add it into the base if so, leaving the index and scale as-is.
10637 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10640 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
10641 fold_for_warn before checking if arg2 is INTEGER_CST.
10643 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
10645 * config/rs6000/predicates.md (load_multiple_operation): Delete.
10646 (store_multiple_operation): Delete.
10647 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
10648 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
10649 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
10650 guarded by TARGET_STRING.
10651 (rs6000_output_load_multiple): Delete.
10652 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
10653 OPTION_MASK_STRING / TARGET_STRING handling.
10654 (print_operand) <'N', 'O'>: Add comment that these are unused now.
10655 (const rs6000_opt_masks) <"string">: Change mask to 0.
10656 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
10657 (MASK_STRING): Delete.
10658 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
10660 (load_multiple): Delete.
10667 (store_multiple): Delete.
10674 (movmemsi_8reg): Delete.
10675 (corresponding unnamed define_insn): Delete.
10676 (movmemsi_6reg): Delete.
10677 (corresponding unnamed define_insn): Delete.
10678 (movmemsi_4reg): Delete.
10679 (corresponding unnamed define_insn): Delete.
10680 (movmemsi_2reg): Delete.
10681 (corresponding unnamed define_insn): Delete.
10682 (movmemsi_1reg): Delete.
10683 (corresponding unnamed define_insn): Delete.
10684 * config/rs6000/rs6000.opt (mno-string): New.
10685 (mstring): Replace by deprecation warning stub.
10686 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
10688 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10690 * regrename.c (regrename_do_replace): If replacing the same
10691 reg multiple times, try to reuse last created gen_raw_REG.
10694 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
10695 main to workaround a bug in GDB.
10697 2018-01-12 Tom de Vries <tom@codesourcery.com>
10700 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
10702 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
10704 PR rtl-optimization/80481
10705 * ira-color.c (get_cap_member): New function.
10706 (allocnos_conflict_by_live_ranges_p): Use it.
10707 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
10708 (setup_slot_coalesced_allocno_live_ranges): Ditto.
10710 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
10713 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
10714 (*saddl_se_1): Ditto.
10715 (*ssubsi_1): Ditto.
10716 (*ssubl_se_1): Ditto.
10718 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10720 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
10721 rather than wi::to_widest for DR_INITs.
10722 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
10723 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
10724 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
10726 (vect_analyze_group_access_1): Note that here.
10728 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10730 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
10731 polynomial type sizes.
10733 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10735 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
10736 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
10737 (gimple_add_tmp_var): Likewise.
10739 2018-01-12 Martin Liska <mliska@suse.cz>
10741 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
10742 (gimple_alloc_sizes): Likewise.
10743 (dump_gimple_statistics): Use PRIu64 in printf format.
10744 * gimple.h: Change uint64_t to int.
10746 2018-01-12 Martin Liska <mliska@suse.cz>
10748 * tree-core.h: Use uint64_t instead of int.
10749 * tree.c (tree_node_counts): Likewise.
10750 (tree_node_sizes): Likewise.
10751 (dump_tree_statistics): Use PRIu64 in printf format.
10753 2018-01-12 Martin Liska <mliska@suse.cz>
10755 * Makefile.in: As qsort_chk is implemented in vec.c, add
10756 vec.o to linkage of gencfn-macros.
10757 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
10758 passing the info to record_node_allocation_statistics.
10759 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
10761 * ggc-common.c (struct ggc_usage): Add operator== and use
10762 it in operator< and compare function.
10763 * mem-stats.h (struct mem_usage): Likewise.
10764 * vec.c (struct vec_usage): Remove operator< and compare
10765 function. Can be simply inherited.
10767 2018-01-12 Martin Jambor <mjambor@suse.cz>
10770 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
10771 * tree-ssa-math-opts.c: Include domwalk.h.
10772 (convert_mult_to_fma_1): New function.
10773 (fma_transformation_info): New type.
10774 (fma_deferring_state): Likewise.
10775 (cancel_fma_deferring): New function.
10776 (result_of_phi): Likewise.
10777 (last_fma_candidate_feeds_initial_phi): Likewise.
10778 (convert_mult_to_fma): Added deferring logic, split actual
10779 transformation to convert_mult_to_fma_1.
10780 (math_opts_dom_walker): New type.
10781 (math_opts_dom_walker::after_dom_children): New method, body moved
10782 here from pass_optimize_widening_mul::execute, added deferring logic
10784 (pass_optimize_widening_mul::execute): Moved most of code to
10785 math_opts_dom_walker::after_dom_children.
10786 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
10787 * config/i386/i386.c (ix86_option_override_internal): Added
10788 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
10790 2018-01-12 Richard Biener <rguenther@suse.de>
10793 * dwarf2out.c (gen_variable_die): Do not reset old_die for
10794 inline instance vars.
10796 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
10799 * config/rx/rx.c (rx_is_restricted_memory_address):
10800 Handle SUBREG case.
10802 2018-01-12 Richard Biener <rguenther@suse.de>
10804 PR tree-optimization/80846
10805 * target.def (split_reduction): New target hook.
10806 * targhooks.c (default_split_reduction): New function.
10807 * targhooks.h (default_split_reduction): Declare.
10808 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
10809 target requests first reduce vectors by combining low and high
10811 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
10812 (get_vectype_for_scalar_type_and_size): Export.
10813 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
10814 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
10815 * doc/tm.texi: Regenerate.
10816 * config/i386/i386.c (ix86_split_reduction): Implement
10817 TARGET_VECTORIZE_SPLIT_REDUCTION.
10819 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10822 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
10823 in PIC mode except for TARGET_VXWORKS_RTP.
10824 * config/sparc/sparc.c: Include cfgrtl.h.
10825 (TARGET_INIT_PIC_REG): Define.
10826 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
10827 (sparc_pic_register_p): New predicate.
10828 (sparc_legitimate_address_p): Use it.
10829 (sparc_legitimize_pic_address): Likewise.
10830 (sparc_delegitimize_address): Likewise.
10831 (sparc_mode_dependent_address_p): Likewise.
10832 (gen_load_pcrel_sym): Remove 4th parameter.
10833 (load_got_register): Adjust call to above. Remove obsolete stuff.
10834 (sparc_expand_prologue): Do not call load_got_register here.
10835 (sparc_flat_expand_prologue): Likewise.
10836 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
10837 (sparc_use_pseudo_pic_reg): New function.
10838 (sparc_init_pic_reg): Likewise.
10839 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10840 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
10842 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
10844 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
10845 Add item for branch_cost.
10847 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10849 PR rtl-optimization/83565
10850 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
10851 not extend the result to a larger mode for rotate operations.
10852 (num_sign_bit_copies1): Likewise.
10854 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10857 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
10859 Use values-Xc.o for -pedantic.
10860 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
10862 2018-01-12 Martin Liska <mliska@suse.cz>
10865 * ipa-devirt.c (final_warning_record::grow_type_warnings):
10867 (possible_polymorphic_call_targets): Use it.
10868 (ipa_devirt): Likewise.
10870 2018-01-12 Martin Liska <mliska@suse.cz>
10872 * profile-count.h (enum profile_quality): Use 0 as invalid
10873 enum value of profile_quality.
10875 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
10877 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
10878 -mext-string options.
10880 2018-01-12 Richard Biener <rguenther@suse.de>
10882 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
10883 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
10884 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
10886 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
10888 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10890 * configure.ac (--with-long-double-format): Add support for the
10891 configuration option to change the default long double format on
10893 * config.gcc (powerpc*-linux*-*): Likewise.
10894 * configure: Regenerate.
10895 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
10896 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
10897 used without modification.
10899 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10901 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
10902 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
10903 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
10904 MISC_BUILTIN_SPEC_BARRIER.
10905 (rs6000_init_builtins): Likewise.
10906 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
10908 (speculation_barrier): New define_insn.
10909 * doc/extend.texi: Document __builtin_speculation_barrier.
10911 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10914 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
10915 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
10916 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
10918 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
10919 integral modes instead of "ss" and "sd".
10920 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
10921 vectors with 32-bit and 64-bit elements.
10922 (vecdupssescalarmodesuffix): New mode attribute.
10923 (vec_dup<mode>): Use it.
10925 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
10928 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
10929 frame if argument is passed on stack.
10931 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10934 * ree.c (combine_reaching_defs): Optimize also
10935 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
10936 reg2=any_extend(exp); reg1=reg2;, formatting fix.
10938 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10940 PR middle-end/83189
10941 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
10943 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10945 PR middle-end/83718
10946 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
10947 after they are computed.
10949 2018-01-11 Bin Cheng <bin.cheng@arm.com>
10951 PR tree-optimization/83695
10952 * gimple-loop-linterchange.cc
10953 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
10954 reset cached scev information after interchange.
10955 (pass_linterchange::execute): Remove call to scev_reset_htab.
10957 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10959 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
10960 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
10961 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
10962 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
10963 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
10964 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
10965 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
10966 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
10967 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
10968 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
10969 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
10970 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
10971 (V_lane_reg): Likewise.
10972 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
10974 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
10975 (vfmal_lane_low<mode>_intrinsic,
10976 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
10977 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
10978 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
10979 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
10980 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
10981 vfmsl_lane_high<mode>_intrinsic): New define_insns.
10983 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10985 * config/arm/arm-cpus.in (fp16fml): New feature.
10986 (ALL_SIMD): Add fp16fml.
10987 (armv8.2-a): Add fp16fml as an option.
10988 (armv8.3-a): Likewise.
10989 (armv8.4-a): Add fp16fml as part of fp16.
10990 * config/arm/arm.h (TARGET_FP16FML): Define.
10991 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
10993 * config/arm/arm-modes.def (V2HF): Define.
10994 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
10995 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
10996 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
10997 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
10998 vfmsl_low, vfmsl_high): New set of builtins.
10999 * config/arm/iterators.md (PLUSMINUS): New code iterator.
11000 (vfml_op): New code attribute.
11001 (VFMLHALVES): New int iterator.
11002 (VFML, VFMLSEL): New mode attributes.
11003 (V_reg): Define mapping for V2HF.
11004 (V_hi, V_lo): New mode attributes.
11005 (VF_constraint): Likewise.
11006 (vfml_half, vfml_half_selector): New int attributes.
11007 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11009 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11010 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11012 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11013 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11014 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11015 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
11017 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11018 Document new effective target and option set.
11020 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11022 * config/arm/arm-cpus.in (armv8_4): New feature.
11023 (ARMv8_4a): New fgroup.
11024 (armv8.4-a): New arch.
11025 * config/arm/arm-tables.opt: Regenerate.
11026 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11027 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11028 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11029 Add matching rules for -march=armv8.4-a and extensions.
11030 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11032 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
11035 * config/rx/rx.md (BW): New mode attribute.
11036 (sync_lock_test_and_setsi): Add mode suffix to insn output.
11038 2018-01-11 Richard Biener <rguenther@suse.de>
11040 PR tree-optimization/83435
11041 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11042 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11043 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11045 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11046 Alan Hayward <alan.hayward@arm.com>
11047 David Sherwood <david.sherwood@arm.com>
11049 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11051 (aarch64_classify_address): Initialize it. Track polynomial offsets.
11052 (aarch64_print_address_internal): Use it to check for a zero offset.
11054 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11055 Alan Hayward <alan.hayward@arm.com>
11056 David Sherwood <david.sherwood@arm.com>
11058 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11059 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11060 Return a poly_int64 rather than a HOST_WIDE_INT.
11061 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11062 rather than a HOST_WIDE_INT.
11063 * config/aarch64/aarch64.h (aarch64_frame): Protect with
11064 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
11065 hard_fp_offset, frame_size, initial_adjust, callee_offset and
11066 final_offset from HOST_WIDE_INT to poly_int64.
11067 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11068 to_constant when getting the number of units in an Advanced SIMD
11070 (aarch64_builtin_vectorized_function): Check for a constant number
11072 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11074 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11075 attribute instead of GET_MODE_NUNITS.
11076 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11077 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11078 GET_MODE_SIZE for fixed-size registers.
11079 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11080 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11081 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11082 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11083 (aarch64_print_operand, aarch64_print_address_internal)
11084 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11085 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11086 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11087 Handle polynomial GET_MODE_SIZE.
11088 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
11089 wider than SImode without modification.
11090 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11091 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11092 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11093 passing and returning SVE modes.
11094 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11095 rather than GEN_INT.
11096 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11097 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11098 (aarch64_allocate_and_probe_stack_space): Likewise.
11099 (aarch64_layout_frame): Cope with polynomial offsets.
11100 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11101 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
11102 polynomial offsets.
11103 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11104 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11105 poly_int64 rather than a HOST_WIDE_INT.
11106 (aarch64_get_separate_components, aarch64_process_components)
11107 (aarch64_expand_prologue, aarch64_expand_epilogue)
11108 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11109 (aarch64_anchor_offset): New function, split out from...
11110 (aarch64_legitimize_address): ...here.
11111 (aarch64_builtin_vectorization_cost): Handle polynomial
11112 TYPE_VECTOR_SUBPARTS.
11113 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11115 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11116 number of elements from the PARALLEL rather than the mode.
11117 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11118 rather than GET_MODE_BITSIZE.
11119 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11120 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11121 (aarch64_expand_vec_perm_const_1): Handle polynomial
11122 d->perm.length () and d->perm elements.
11123 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
11124 Apply to_constant to d->perm elements.
11125 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11126 polynomial CONST_VECTOR_NUNITS.
11127 (aarch64_move_pointer): Take amount as a poly_int64 rather
11129 (aarch64_progress_pointer): Avoid temporary variable.
11130 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11131 the mode attribute instead of GET_MODE.
11133 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11134 Alan Hayward <alan.hayward@arm.com>
11135 David Sherwood <david.sherwood@arm.com>
11137 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11138 x exists before using it.
11139 (aarch64_add_constant_internal): Rename to...
11140 (aarch64_add_offset_1): ...this. Replace regnum with separate
11141 src and dest rtxes. Handle the case in which they're different,
11142 including when the offset is zero. Replace scratchreg with an rtx.
11143 Use 2 additions if there is no spare register into which we can
11144 move a 16-bit constant.
11145 (aarch64_add_constant): Delete.
11146 (aarch64_add_offset): Replace reg with separate src and dest
11147 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
11148 Use aarch64_add_offset_1.
11149 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11150 an rtx rather than an int. Take the delta as a poly_int64
11151 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
11152 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11153 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11154 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11155 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11156 and aarch64_add_sp.
11157 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11158 aarch64_add_constant.
11160 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11162 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11163 Use scalar_float_mode.
11165 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11167 * config/aarch64/aarch64-simd.md
11168 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11169 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11170 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11171 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11172 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11173 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11174 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11175 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11176 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11177 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11179 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11182 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11183 targ_options->x_arm_arch_string is non NULL.
11185 2018-01-11 Tamar Christina <tamar.christina@arm.com>
11187 * config/aarch64/aarch64.h
11188 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
11190 2018-01-11 Sudakshina Das <sudi.das@arm.com>
11193 * expmed.c (emit_store_flag_force): Swap if const op0
11194 and change VOIDmode to mode of op0.
11196 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11198 PR rtl-optimization/83761
11199 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11200 than bytes to mode_for_size.
11202 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11204 PR middle-end/83189
11205 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11206 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11209 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11211 PR middle-end/83575
11212 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11213 when in layout mode.
11214 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11215 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11218 2018-01-10 Michael Collison <michael.collison@arm.com>
11220 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11221 * config/aarch64/aarch64-option-extension.def: Add
11222 AARCH64_OPT_EXTENSION of 'fp16fml'.
11223 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11224 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11225 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11226 * config/aarch64/constraints.md (Ui7): New constraint.
11227 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11228 (VFMLA_SEL_W): Ditto.
11231 (VFMLA16_LOW): New int iterator.
11232 (VFMLA16_HIGH): Ditto.
11233 (UNSPEC_FMLAL): New unspec.
11234 (UNSPEC_FMLSL): Ditto.
11235 (UNSPEC_FMLAL2): Ditto.
11236 (UNSPEC_FMLSL2): Ditto.
11237 (f16mac): New code attribute.
11238 * config/aarch64/aarch64-simd-builtins.def
11239 (aarch64_fmlal_lowv2sf): Ditto.
11240 (aarch64_fmlsl_lowv2sf): Ditto.
11241 (aarch64_fmlalq_lowv4sf): Ditto.
11242 (aarch64_fmlslq_lowv4sf): Ditto.
11243 (aarch64_fmlal_highv2sf): Ditto.
11244 (aarch64_fmlsl_highv2sf): Ditto.
11245 (aarch64_fmlalq_highv4sf): Ditto.
11246 (aarch64_fmlslq_highv4sf): Ditto.
11247 (aarch64_fmlal_lane_lowv2sf): Ditto.
11248 (aarch64_fmlsl_lane_lowv2sf): Ditto.
11249 (aarch64_fmlal_laneq_lowv2sf): Ditto.
11250 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11251 (aarch64_fmlalq_lane_lowv4sf): Ditto.
11252 (aarch64_fmlsl_lane_lowv4sf): Ditto.
11253 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11254 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11255 (aarch64_fmlal_lane_highv2sf): Ditto.
11256 (aarch64_fmlsl_lane_highv2sf): Ditto.
11257 (aarch64_fmlal_laneq_highv2sf): Ditto.
11258 (aarch64_fmlsl_laneq_highv2sf): Ditto.
11259 (aarch64_fmlalq_lane_highv4sf): Ditto.
11260 (aarch64_fmlsl_lane_highv4sf): Ditto.
11261 (aarch64_fmlalq_laneq_highv4sf): Ditto.
11262 (aarch64_fmlsl_laneq_highv4sf): Ditto.
11263 * config/aarch64/aarch64-simd.md:
11264 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11265 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11266 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11267 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11268 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11269 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11270 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11271 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11272 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11273 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11274 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11275 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11276 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11277 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11278 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11279 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11280 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11281 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11282 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11283 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11284 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11285 (vfmlsl_low_u32): Ditto.
11286 (vfmlalq_low_u32): Ditto.
11287 (vfmlslq_low_u32): Ditto.
11288 (vfmlal_high_u32): Ditto.
11289 (vfmlsl_high_u32): Ditto.
11290 (vfmlalq_high_u32): Ditto.
11291 (vfmlslq_high_u32): Ditto.
11292 (vfmlal_lane_low_u32): Ditto.
11293 (vfmlsl_lane_low_u32): Ditto.
11294 (vfmlal_laneq_low_u32): Ditto.
11295 (vfmlsl_laneq_low_u32): Ditto.
11296 (vfmlalq_lane_low_u32): Ditto.
11297 (vfmlslq_lane_low_u32): Ditto.
11298 (vfmlalq_laneq_low_u32): Ditto.
11299 (vfmlslq_laneq_low_u32): Ditto.
11300 (vfmlal_lane_high_u32): Ditto.
11301 (vfmlsl_lane_high_u32): Ditto.
11302 (vfmlal_laneq_high_u32): Ditto.
11303 (vfmlsl_laneq_high_u32): Ditto.
11304 (vfmlalq_lane_high_u32): Ditto.
11305 (vfmlslq_lane_high_u32): Ditto.
11306 (vfmlalq_laneq_high_u32): Ditto.
11307 (vfmlslq_laneq_high_u32): Ditto.
11308 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11309 (AARCH64_FL_FOR_ARCH8_4): New.
11310 (AARCH64_ISA_F16FML): New ISA flag.
11311 (TARGET_F16FML): New feature flag for fp16fml.
11312 (doc/invoke.texi): Document new fp16fml option.
11314 2018-01-10 Michael Collison <michael.collison@arm.com>
11316 * config/aarch64/aarch64-builtins.c:
11317 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11318 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11319 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11320 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11321 (AARCH64_ISA_SHA3): New ISA flag.
11322 (TARGET_SHA3): New feature flag for sha3.
11323 * config/aarch64/iterators.md (sha512_op): New int attribute.
11324 (CRYPTO_SHA512): New int iterator.
11325 (UNSPEC_SHA512H): New unspec.
11326 (UNSPEC_SHA512H2): Ditto.
11327 (UNSPEC_SHA512SU0): Ditto.
11328 (UNSPEC_SHA512SU1): Ditto.
11329 * config/aarch64/aarch64-simd-builtins.def
11330 (aarch64_crypto_sha512hqv2di): New builtin.
11331 (aarch64_crypto_sha512h2qv2di): Ditto.
11332 (aarch64_crypto_sha512su0qv2di): Ditto.
11333 (aarch64_crypto_sha512su1qv2di): Ditto.
11334 (aarch64_eor3qv8hi): Ditto.
11335 (aarch64_rax1qv2di): Ditto.
11336 (aarch64_xarqv2di): Ditto.
11337 (aarch64_bcaxqv8hi): Ditto.
11338 * config/aarch64/aarch64-simd.md:
11339 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11340 (aarch64_crypto_sha512su0qv2di): Ditto.
11341 (aarch64_crypto_sha512su1qv2di): Ditto.
11342 (aarch64_eor3qv8hi): Ditto.
11343 (aarch64_rax1qv2di): Ditto.
11344 (aarch64_xarqv2di): Ditto.
11345 (aarch64_bcaxqv8hi): Ditto.
11346 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11347 (vsha512h2q_u64): Ditto.
11348 (vsha512su0q_u64): Ditto.
11349 (vsha512su1q_u64): Ditto.
11350 (veor3q_u16): Ditto.
11351 (vrax1q_u64): Ditto.
11352 (vxarq_u64): Ditto.
11353 (vbcaxq_u16): Ditto.
11354 * config/arm/types.md (crypto_sha512): New type attribute.
11355 (crypto_sha3): Ditto.
11356 (doc/invoke.texi): Document new sha3 option.
11358 2018-01-10 Michael Collison <michael.collison@arm.com>
11360 * config/aarch64/aarch64-builtins.c:
11361 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
11362 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11363 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
11364 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
11365 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
11366 (AARCH64_ISA_SM4): New ISA flag.
11367 (TARGET_SM4): New feature flag for sm4.
11368 * config/aarch64/aarch64-simd-builtins.def
11369 (aarch64_sm3ss1qv4si): Ditto.
11370 (aarch64_sm3tt1aq4si): Ditto.
11371 (aarch64_sm3tt1bq4si): Ditto.
11372 (aarch64_sm3tt2aq4si): Ditto.
11373 (aarch64_sm3tt2bq4si): Ditto.
11374 (aarch64_sm3partw1qv4si): Ditto.
11375 (aarch64_sm3partw2qv4si): Ditto.
11376 (aarch64_sm4eqv4si): Ditto.
11377 (aarch64_sm4ekeyqv4si): Ditto.
11378 * config/aarch64/aarch64-simd.md:
11379 (aarch64_sm3ss1qv4si): Ditto.
11380 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
11381 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
11382 (aarch64_sm4eqv4si): Ditto.
11383 (aarch64_sm4ekeyqv4si): Ditto.
11384 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
11385 (sm3part_op): Ditto.
11386 (CRYPTO_SM3TT): Ditto.
11387 (CRYPTO_SM3PART): Ditto.
11388 (UNSPEC_SM3SS1): New unspec.
11389 (UNSPEC_SM3TT1A): Ditto.
11390 (UNSPEC_SM3TT1B): Ditto.
11391 (UNSPEC_SM3TT2A): Ditto.
11392 (UNSPEC_SM3TT2B): Ditto.
11393 (UNSPEC_SM3PARTW1): Ditto.
11394 (UNSPEC_SM3PARTW2): Ditto.
11395 (UNSPEC_SM4E): Ditto.
11396 (UNSPEC_SM4EKEY): Ditto.
11397 * config/aarch64/constraints.md (Ui2): New constraint.
11398 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
11399 * config/arm/types.md (crypto_sm3): New type attribute.
11400 (crypto_sm4): Ditto.
11401 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
11402 (vsm3tt1aq_u32): Ditto.
11403 (vsm3tt1bq_u32): Ditto.
11404 (vsm3tt2aq_u32): Ditto.
11405 (vsm3tt2bq_u32): Ditto.
11406 (vsm3partw1q_u32): Ditto.
11407 (vsm3partw2q_u32): Ditto.
11408 (vsm4eq_u32): Ditto.
11409 (vsm4ekeyq_u32): Ditto.
11410 (doc/invoke.texi): Document new sm4 option.
11412 2018-01-10 Michael Collison <michael.collison@arm.com>
11414 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
11415 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
11416 (AARCH64_FL_FOR_ARCH8_4): New.
11417 (AARCH64_FL_V8_4): New flag.
11418 (doc/invoke.texi): Document new armv8.4-a option.
11420 2018-01-10 Michael Collison <michael.collison@arm.com>
11422 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11423 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
11424 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
11425 * config/aarch64/aarch64-option-extension.def: Add
11426 AARCH64_OPT_EXTENSION of 'sha2'.
11427 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
11428 (crypto): Disable sha2 and aes if crypto disabled.
11429 (crypto): Enable aes and sha2 if enabled.
11430 (simd): Disable sha2 and aes if simd disabled.
11431 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
11433 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
11434 (TARGET_SHA2): New feature flag for sha2.
11435 (TARGET_AES): New feature flag for aes.
11436 * config/aarch64/aarch64-simd.md:
11437 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
11438 conditional on TARGET_AES.
11439 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
11440 (aarch64_crypto_sha1hsi): Make pattern conditional
11442 (aarch64_crypto_sha1hv4si): Ditto.
11443 (aarch64_be_crypto_sha1hv4si): Ditto.
11444 (aarch64_crypto_sha1su1v4si): Ditto.
11445 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
11446 (aarch64_crypto_sha1su0v4si): Ditto.
11447 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
11448 (aarch64_crypto_sha256su0v4si): Ditto.
11449 (aarch64_crypto_sha256su1v4si): Ditto.
11450 (doc/invoke.texi): Document new aes and sha2 options.
11452 2018-01-10 Martin Sebor <msebor@redhat.com>
11454 PR tree-optimization/83781
11455 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
11458 2018-01-11 Martin Sebor <msebor@gmail.com>
11459 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11461 PR tree-optimization/83501
11462 PR tree-optimization/81703
11464 * tree-ssa-strlen.c (get_string_cst): Rename...
11465 (get_string_len): ...to this. Handle global constants.
11466 (handle_char_store): Adjust.
11468 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
11469 Jim Wilson <jimw@sifive.com>
11471 * config/riscv/riscv-protos.h (riscv_output_return): New.
11472 * config/riscv/riscv.c (struct machine_function): New naked_p field.
11473 (riscv_attribute_table, riscv_output_return),
11474 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
11475 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
11476 (riscv_compute_frame_info): Only compute frame->mask if not a naked
11478 (riscv_expand_prologue): Add early return for naked function.
11479 (riscv_expand_epilogue): Likewise.
11480 (riscv_function_ok_for_sibcall): Return false for naked function.
11481 (riscv_set_current_function): New.
11482 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
11483 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
11484 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
11485 * doc/extend.texi (RISC-V Function Attributes): New.
11487 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11489 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
11490 check for 128-bit long double before checking TCmode.
11491 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
11492 128-bit long doubles before checking TFmode or TCmode.
11493 (FLOAT128_IBM_P): Likewise.
11495 2018-01-10 Martin Sebor <msebor@redhat.com>
11497 PR tree-optimization/83671
11498 * builtins.c (c_strlen): Unconditionally return zero for the empty
11500 Use -Warray-bounds for warnings.
11501 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
11502 for non-constant array indices with COMPONENT_REF, arrays of
11503 arrays, and pointers to arrays.
11504 (gimple_fold_builtin_strlen): Determine and set length range for
11505 non-constant character arrays.
11507 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
11509 PR middle-end/81897
11510 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
11513 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
11515 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11517 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11520 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11521 VECTOR_MEM_ALTIVEC_OR_VSX_P.
11522 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11523 indexed_or_indirect_operand predicate.
11524 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11525 (*vsx_le_perm_load_v8hi): Likewise.
11526 (*vsx_le_perm_load_v16qi): Likewise.
11527 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11528 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11529 (*vsx_le_perm_store_v8hi): Likewise.
11530 (*vsx_le_perm_store_v16qi): Likewise.
11531 (eight unnamed splitters): Likewise.
11533 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11535 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11536 * config/rs6000/emmintrin.h: Likewise.
11537 * config/rs6000/mmintrin.h: Likewise.
11538 * config/rs6000/xmmintrin.h: Likewise.
11540 2018-01-10 David Malcolm <dmalcolm@redhat.com>
11543 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11545 * tree.c (tree_nop_conversion): Return true for location wrapper
11547 (maybe_wrap_with_location): New function.
11548 (selftest::check_strip_nops): New function.
11549 (selftest::test_location_wrappers): New function.
11550 (selftest::tree_c_tests): Call it.
11551 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11552 (maybe_wrap_with_location): New decl.
11553 (EXPR_LOCATION_WRAPPER_P): New macro.
11554 (location_wrapper_p): New inline function.
11555 (tree_strip_any_location_wrapper): New inline function.
11557 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
11560 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11561 stack_realign_offset for the largest alignment of stack slot
11563 (ix86_find_max_used_stack_alignment): New function.
11564 (ix86_finalize_stack_frame_flags): Use it. Set
11565 max_used_stack_alignment if we don't realign stack.
11566 * config/i386/i386.h (machine_function): Add
11567 max_used_stack_alignment.
11569 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
11571 * config/arm/arm.opt (-mbranch-cost): New option.
11572 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
11575 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
11578 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
11579 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
11581 2018-01-10 Richard Biener <rguenther@suse.de>
11584 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
11585 early out so it also covers the case where we have a non-NULL
11588 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11590 PR tree-optimization/83753
11591 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
11592 for non-strided grouped accesses if the number of elements is 1.
11594 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11597 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
11598 * i386.h (TARGET_USE_GATHER): Define.
11599 * x86-tune.def (X86_TUNE_USE_GATHER): New.
11601 2018-01-10 Martin Liska <mliska@suse.cz>
11604 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
11605 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
11607 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
11608 CLEANUP_NO_PARTITIONING is not set.
11610 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11612 * doc/rtl.texi: Remove documentation of (const ...) wrappers
11613 for vectors, as a partial revert of r254296.
11614 * rtl.h (const_vec_p): Delete.
11615 (const_vec_duplicate_p): Don't test for vector CONSTs.
11616 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
11617 * expmed.c (make_tree): Likewise.
11620 * common.md (E, F): Use CONSTANT_P instead of checking for
11622 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
11623 checking for CONST_VECTOR.
11625 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11627 PR middle-end/83575
11628 * predict.c (force_edge_cold): Handle in more sane way edges
11629 with no prediction.
11631 2018-01-09 Carl Love <cel@us.ibm.com>
11633 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
11635 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
11636 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
11637 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
11638 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
11639 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
11640 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
11641 * config/rs6000/rs6000-protos.h: Add extern defition for
11642 rs6000_generate_float2_double_code.
11643 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
11645 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
11646 (float2_v2df): Add define_expand.
11648 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
11651 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
11652 op_mode in the force_to_mode call.
11654 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11656 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
11657 instead of checking each element individually.
11658 (aarch64_evpc_uzp): Likewise.
11659 (aarch64_evpc_zip): Likewise.
11660 (aarch64_evpc_ext): Likewise.
11661 (aarch64_evpc_rev): Likewise.
11662 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
11663 instead of checking each element individually. Return true without
11665 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
11666 whether all selected elements come from the same input, instead of
11667 checking each element individually. Remove calls to gen_rtx_REG,
11668 start_sequence and end_sequence and instead assert that no rtl is
11671 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11673 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
11674 order of HIGH and CONST checks.
11676 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11678 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
11679 if the destination isn't an SSA_NAME.
11681 2018-01-09 Richard Biener <rguenther@suse.de>
11683 PR tree-optimization/83668
11684 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
11686 (canonicalize_loop_form): ... here, renamed from ...
11687 (canonicalize_loop_closed_ssa_form): ... this and amended to
11688 swap successor edges for loop exit blocks to make us use
11689 the RPO order we need for initial schedule generation.
11691 2018-01-09 Joseph Myers <joseph@codesourcery.com>
11693 PR tree-optimization/64811
11694 * match.pd: When optimizing comparisons with Inf, avoid
11695 introducing or losing exceptions from comparisons with NaN.
11697 2018-01-09 Martin Liska <mliska@suse.cz>
11700 * asan.c (shadow_mem_size): Add gcc_assert.
11702 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
11704 Don't save registers in main().
11707 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
11708 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
11709 * config/avr/avr.c (avr_set_current_function): Don't error if
11710 naked, OS_task or OS_main are specified at the same time.
11711 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
11713 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
11715 * common/config/avr/avr-common.c (avr_option_optimization_table):
11716 Switch on -mmain-is-OS_task for optimizing compilations.
11718 2018-01-09 Richard Biener <rguenther@suse.de>
11720 PR tree-optimization/83572
11721 * graphite.c: Include cfganal.h.
11722 (graphite_transform_loops): Connect infinite loops to exit
11723 and remove fake edges at the end.
11725 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11727 * ipa-inline.c (edge_badness): Revert accidental checkin.
11729 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11732 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
11733 symbols; not inline clones.
11735 2018-01-09 Jakub Jelinek <jakub@redhat.com>
11738 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
11739 hard registers. Formatting fixes.
11741 PR preprocessor/83722
11742 * gcc.c (try_generate_repro): Pass
11743 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
11744 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
11747 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
11748 Kito Cheng <kito.cheng@gmail.com>
11750 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
11751 (riscv_leaf_function_p): Delete.
11752 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
11754 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11756 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
11758 (do_ifelse): New function.
11759 (do_isel): New function.
11760 (do_sub3): New function.
11761 (do_add3): New function.
11762 (do_load_mask_compare): New function.
11763 (do_overlap_load_compare): New function.
11764 (expand_compare_loop): New function.
11765 (expand_block_compare): Call expand_compare_loop() when appropriate.
11766 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
11767 option description.
11768 (-mblock-compare-inline-loop-limit): New option.
11770 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11773 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
11774 Reverse order of second and third operands in first alternative.
11775 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
11776 of first and second elements in UNSPEC_VPERMR vector.
11777 (altivec_expand_vec_perm_le): Likewise.
11779 2018-01-08 Jeff Law <law@redhat.com>
11781 PR rtl-optimizatin/81308
11782 * tree-switch-conversion.c (cfg_altered): New file scoped static.
11783 (process_switch): If group_case_labels makes a change, then set
11785 (pass_convert_switch::execute): If a switch is converted, then
11786 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
11788 PR rtl-optimization/81308
11789 * recog.c (split_all_insns): Conditionally cleanup the CFG after
11792 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
11794 PR target/83663 - Revert r255946
11795 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
11796 generation for cases where splatting a value is not useful.
11797 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
11798 across a vec_duplicate and a paradoxical subreg forming a vector
11799 mode to a vec_concat.
11801 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11803 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
11804 -march=armv8.3-a variants.
11805 * config/arm/t-multilib: Likewise.
11806 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
11808 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11810 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
11812 (cceq_ior_compare_complement): Give it a name so I can use it, and
11813 change boolean_or_operator predicate to boolean_operator so it can
11814 be used to generate a crand.
11815 (eqne): New code iterator.
11816 (bd/bd_neg): New code_attrs.
11817 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
11818 a single define_insn.
11819 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
11820 decrement (bdnzt/bdnzf/bdzt/bdzf).
11821 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
11822 with the new names of the branch decrement patterns, and added the
11823 names of the branch decrement conditional patterns.
11825 2018-01-08 Richard Biener <rguenther@suse.de>
11827 PR tree-optimization/83563
11828 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
11831 2018-01-08 Richard Biener <rguenther@suse.de>
11833 PR middle-end/83713
11834 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
11836 2018-01-08 Richard Biener <rguenther@suse.de>
11838 PR tree-optimization/83685
11839 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
11840 references to abnormals.
11842 2018-01-08 Richard Biener <rguenther@suse.de>
11845 * dwarf2out.c (output_indirect_strings): Handle empty
11846 skeleton_debug_str_hash.
11847 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
11849 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11851 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
11852 (emit_store_direct): Likewise.
11853 (arc_trampoline_adjust_address): Likewise.
11854 (arc_asm_trampoline_template): New function.
11855 (arc_initialize_trampoline): Use asm_trampoline_template.
11856 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
11857 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
11858 * config/arc/arc.md (flush_icache): Delete pattern.
11860 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11862 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
11863 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
11866 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11869 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
11870 by not USED_FOR_TARGET.
11871 (make_pass_resolve_sw_modes): Likewise.
11873 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11875 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
11878 2018-01-08 Richard Biener <rguenther@suse.de>
11880 PR middle-end/83580
11881 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
11883 2018-01-08 Richard Biener <rguenther@suse.de>
11885 PR middle-end/83517
11886 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11888 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
11890 PR middle-end/81897
11891 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
11892 basic blocks with a small number of successors.
11893 (convert_control_dep_chain_into_preds): Improve handling of
11895 (dump_predicates): Split apart into...
11896 (dump_pred_chain): ...here...
11897 (dump_pred_info): ...and here.
11898 (can_one_predicate_be_invalidated_p): Add debugging printfs.
11899 (can_chain_union_be_invalidated_p): Improve check for invalidation
11901 (uninit_uses_cannot_happen): Avoid unnecessary if
11902 convert_control_dep_chain_into_preds yielded nothing.
11904 2018-01-06 Martin Sebor <msebor@redhat.com>
11906 PR tree-optimization/83640
11907 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
11908 subtracting negative offset from size.
11909 (builtin_access::overlap): Adjust offset bounds of the access to fall
11910 within the size of the object if possible.
11912 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
11914 PR rtl-optimization/83699
11915 * expmed.c (extract_bit_field_1): Restrict the vector usage of
11916 extract_bit_field_as_subreg to cases in which the extracted
11917 value is also a vector.
11919 * lra-constraints.c (process_alt_operands): Test for the equivalence
11920 substitutions when detecting a possible reload cycle.
11922 2018-01-06 Jakub Jelinek <jakub@redhat.com>
11925 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
11926 by default if flag_selective_schedling{,2}. Formatting fixes.
11928 PR rtl-optimization/83682
11929 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
11930 if it has non-VECTOR_MODE element mode.
11931 (vec_duplicate_p): Likewise.
11933 PR middle-end/83694
11934 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
11935 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
11937 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11940 * config/i386/i386-builtin.def
11941 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
11942 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
11943 Require also OPTION_MASK_ISA_AVX512F in addition to
11944 OPTION_MASK_ISA_GFNI.
11945 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
11946 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
11947 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
11948 to OPTION_MASK_ISA_GFNI.
11949 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
11950 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
11951 OPTION_MASK_ISA_AVX512BW.
11952 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
11953 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
11954 addition to OPTION_MASK_ISA_GFNI.
11955 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
11956 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
11957 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
11958 to OPTION_MASK_ISA_GFNI.
11959 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
11960 a requirement for all ISAs rather than any of them with a few
11962 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
11964 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
11965 bitmasks to be enabled with 3 exceptions, instead of requiring any
11966 enabled ISA with lots of exceptions.
11967 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
11968 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
11969 Change avx512bw in isa attribute to avx512f.
11970 * config/i386/sgxintrin.h: Add license boilerplate.
11971 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
11972 to __AVX512F__ and __AVX512VL to __AVX512VL__.
11973 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
11974 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
11976 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
11977 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
11978 temporarily sse2 rather than sse if not enabled already.
11981 * config/i386/sse.md (VI248_VLBW): Rename to ...
11982 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
11983 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
11984 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
11985 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
11986 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
11987 mode iterator instead of VI248_VLBW.
11989 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
11991 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
11992 (record_modified): Skip clobbers; add debug output.
11993 (param_change_prob): Use sreal frequencies.
11995 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11997 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
11998 punt for user-aligned variables.
12000 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
12002 * tree-chrec.c (chrec_contains_symbols): Return true for
12005 2018-01-05 Sudakshina Das <sudi.das@arm.com>
12008 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12009 of (x|y) == x for BICS pattern.
12011 2018-01-05 Jakub Jelinek <jakub@redhat.com>
12013 PR tree-optimization/83605
12014 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12015 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12018 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
12020 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12021 * config/epiphany/rtems.h: New file.
12023 2018-01-04 Jakub Jelinek <jakub@redhat.com>
12024 Uros Bizjak <ubizjak@gmail.com>
12027 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12028 QIreg_operand instead of register_operand predicate.
12029 * config/i386/i386.c (ix86_rop_should_change_byte_p,
12030 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12031 comments instead of -fmitigate[-_]rop.
12033 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12036 * cgraphunit.c (symbol_table::compile): Switch to text_section
12037 before calling assembly_start debug hook.
12038 * run-rtl-passes.c (run_rtl_passes): Likewise.
12041 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12043 * tree-vrp.c (extract_range_from_binary_expr_1): Check
12044 range_int_cst_p rather than !symbolic_range_p before calling
12045 extract_range_from_multiplicative_op_1.
12047 2018-01-04 Jeff Law <law@redhat.com>
12049 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12050 redundant test in assertion.
12052 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12054 * doc/rtl.texi: Document machine_mode wrapper classes.
12056 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12058 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12059 using tree_to_uhwi.
12061 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12063 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12064 the VEC_PERM_EXPR fold to fail.
12066 2018-01-04 Jakub Jelinek <jakub@redhat.com>
12069 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12070 to switched_sections.
12072 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12075 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12076 test for d.testing.
12078 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
12081 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12082 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12084 2018-01-04 Jakub Jelinek <jakub@redhat.com>
12087 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12088 is BLKmode and bitpos not zero or mode change is needed.
12090 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12093 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12096 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
12099 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12100 instead of MULT rtx. Update all corresponding splitters.
12101 (*saddl_se): Ditto.
12102 (*ssub<modesuffix>): Ditto.
12103 (*ssubl_se): Ditto.
12104 (*cmp_sadd_di): Update split patterns.
12105 (*cmp_sadd_si): Ditto.
12106 (*cmp_sadd_sidi): Ditto.
12107 (*cmp_ssub_di): Ditto.
12108 (*cmp_ssub_si): Ditto.
12109 (*cmp_ssub_sidi): Ditto.
12110 * config/alpha/predicates.md (const23_operand): New predicate.
12111 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12112 Look for ASHIFT, not MULT inner operand.
12113 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12115 2018-01-04 Martin Liska <mliska@suse.cz>
12117 PR gcov-profile/83669
12118 * gcov.c (output_intermediate_file): Add version to intermediate
12120 * doc/gcov.texi: Document new field 'version' in intermediate
12121 file format. Fix location of '-k' option of gcov command.
12123 2018-01-04 Martin Liska <mliska@suse.cz>
12126 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12128 2018-01-04 Jakub Jelinek <jakub@redhat.com>
12130 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12132 2018-01-03 Martin Sebor <msebor@redhat.com>
12134 PR tree-optimization/83655
12135 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12136 checking calls with invalid arguments.
12138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12140 * tree-vect-stmts.c (vect_get_store_rhs): New function.
12141 (vectorizable_mask_load_store): Delete.
12142 (vectorizable_call): Return false for masked loads and stores.
12143 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
12144 instead of gimple_assign_rhs1.
12145 (vectorizable_load): Handle IFN_MASK_LOAD.
12146 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12150 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12152 (vectorizable_mask_load_store): ...here.
12153 (vectorizable_load): ...and here.
12155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12157 * tree-vect-stmts.c (vect_build_all_ones_mask)
12158 (vect_build_zero_merge_argument): New functions, split out from...
12159 (vectorizable_load): ...here.
12161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12163 * tree-vect-stmts.c (vect_check_store_rhs): New function,
12165 (vectorizable_mask_load_store): ...here.
12166 (vectorizable_store): ...and here.
12168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12170 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12172 (vectorizable_mask_load_store): ...here.
12174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12176 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12177 (vect_model_store_cost): Take a vec_load_store_type instead of a
12179 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12180 (vect_model_store_cost): Take a vec_load_store_type instead of a
12182 (vectorizable_mask_load_store): Update accordingly.
12183 (vectorizable_store): Likewise.
12184 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12188 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12189 IFN_MASK_LOAD calls here rather than...
12190 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12192 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12193 Alan Hayward <alan.hayward@arm.com>
12194 David Sherwood <david.sherwood@arm.com>
12196 * expmed.c (extract_bit_field_1): For vector extracts,
12197 fall back to extract_bit_field_as_subreg if vec_extract
12200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12201 Alan Hayward <alan.hayward@arm.com>
12202 David Sherwood <david.sherwood@arm.com>
12204 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12205 they are variable or constant sized.
12206 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12207 slots for constant-sized data.
12209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12210 Alan Hayward <alan.hayward@arm.com>
12211 David Sherwood <david.sherwood@arm.com>
12213 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12214 handling COND_EXPRs with boolean comparisons, try to find a better
12215 basis for the mask type than the boolean itself.
12217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12219 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12220 is calculated and how it can be overridden.
12221 * genmodes.c (max_bitsize_mode_any_mode): New variable.
12222 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12224 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12228 Alan Hayward <alan.hayward@arm.com>
12229 David Sherwood <david.sherwood@arm.com>
12231 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12232 Remove the mode argument.
12233 (aarch64_simd_valid_immediate): Remove the mode and inverse
12235 * config/aarch64/iterators.md (bitsize): New iterator.
12236 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12237 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12238 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12239 aarch64_simd_valid_immediate.
12240 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12241 (aarch64_reg_or_bic_imm): Likewise.
12242 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12243 with an insn_type enum and msl with a modifier_type enum.
12244 Replace element_width with a scalar_mode. Change the shift
12245 to unsigned int. Add constructors for scalar_float_mode and
12246 scalar_int_mode elements.
12247 (aarch64_vect_float_const_representable_p): Delete.
12248 (aarch64_can_const_movi_rtx_p)
12249 (aarch64_simd_scalar_immediate_valid_for_move)
12250 (aarch64_simd_make_constant): Update call to
12251 aarch64_simd_valid_immediate.
12252 (aarch64_advsimd_valid_immediate_hs): New function.
12253 (aarch64_advsimd_valid_immediate): Likewise.
12254 (aarch64_simd_valid_immediate): Remove mode and inverse
12255 arguments. Rewrite to use the above. Use const_vec_duplicate_p
12256 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12257 and aarch64_float_const_representable_p on the result.
12258 (aarch64_output_simd_mov_immediate): Remove mode argument.
12259 Update call to aarch64_simd_valid_immediate and use of
12260 simd_immediate_info.
12261 (aarch64_output_scalar_simd_mov_immediate): Update call
12264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12265 Alan Hayward <alan.hayward@arm.com>
12266 David Sherwood <david.sherwood@arm.com>
12268 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12269 (mode_nunits): Likewise CONST_MODE_NUNITS.
12270 * machmode.def (ADJUST_NUNITS): Document.
12271 * genmodes.c (mode_data::need_nunits_adj): New field.
12272 (blank_mode): Update accordingly.
12273 (adj_nunits): New variable.
12274 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12276 (emit_mode_size_inline): Set need_bytesize_adj for all modes
12277 listed in adj_nunits.
12278 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12279 listed in adj_nunits. Don't emit case statements for such modes.
12280 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12281 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
12282 nothing if adj_nunits is nonnull.
12283 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12284 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12285 (emit_mode_fbit): Update use of print_maybe_const_decl.
12286 (emit_move_size): Likewise. Treat the array as non-const
12288 (emit_mode_adjustments): Handle adj_nunits.
12290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12292 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12293 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12294 (VECTOR_MODES): Use it.
12295 (make_vector_modes): Take the prefix as an argument.
12297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12298 Alan Hayward <alan.hayward@arm.com>
12299 David Sherwood <david.sherwood@arm.com>
12301 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12302 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12303 for MODE_VECTOR_BOOL.
12304 * machmode.def (VECTOR_BOOL_MODE): Document.
12305 * genmodes.c (VECTOR_BOOL_MODE): New macro.
12306 (make_vector_bool_mode): New function.
12307 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12309 * lto-streamer-in.c (lto_input_mode_table): Likewise.
12310 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12312 * stor-layout.c (int_mode_for_mode): Likewise.
12313 * tree.c (build_vector_type_for_mode): Likewise.
12314 * varasm.c (output_constant_pool_2): Likewise.
12315 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12316 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
12317 for MODE_VECTOR_BOOL.
12318 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12319 of mode class checks.
12320 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12321 instead of a list of mode class checks.
12322 (expand_vector_scalar_condition): Likewise.
12323 (type_for_widest_vector_mode): Handle BImode as an inner mode.
12325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12326 Alan Hayward <alan.hayward@arm.com>
12327 David Sherwood <david.sherwood@arm.com>
12329 * machmode.h (mode_size): Change from unsigned short to
12331 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12332 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12333 or if measurement_type is not polynomial.
12334 (fixed_size_mode::includes_p): Check for constant-sized modes.
12335 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12336 return a poly_uint16 rather than an unsigned short.
12337 (emit_mode_size): Change the type of mode_size from unsigned short
12338 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
12339 (emit_mode_adjustments): Cope with polynomial vector sizes.
12340 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12342 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12344 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12345 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12346 * caller-save.c (setup_save_areas): Likewise.
12347 (replace_reg_with_saved_mem): Likewise.
12348 * calls.c (emit_library_call_value_1): Likewise.
12349 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12350 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12351 (gen_lowpart_for_combine): Likewise.
12352 * convert.c (convert_to_integer_1): Likewise.
12353 * cse.c (equiv_constant, cse_insn): Likewise.
12354 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12355 (cselib_subst_to_values): Likewise.
12356 * dce.c (word_dce_process_block): Likewise.
12357 * df-problems.c (df_word_lr_mark_ref): Likewise.
12358 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
12359 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
12360 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
12361 (rtl_for_decl_location): Likewise.
12362 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
12363 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
12364 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
12365 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
12366 (expand_expr_real_1): Likewise.
12367 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
12368 (pad_below): Likewise.
12369 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12370 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
12371 * ira.c (get_subreg_tracking_sizes): Likewise.
12372 * ira-build.c (ira_create_allocno_objects): Likewise.
12373 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
12374 (ira_sort_regnos_for_alter_reg): Likewise.
12375 * ira-costs.c (record_operand_costs): Likewise.
12376 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
12377 (resolve_simple_move): Likewise.
12378 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
12379 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
12380 (lra_constraints): Likewise.
12381 (CONST_POOL_OK_P): Reject variable-sized modes.
12382 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
12383 (add_pseudo_to_slot, lra_spill): Likewise.
12384 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12385 * optabs-query.c (get_best_extraction_insn): Likewise.
12386 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12387 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
12388 (expand_mult_highpart, valid_multiword_target_p): Likewise.
12389 * recog.c (offsettable_address_addr_space_p): Likewise.
12390 * regcprop.c (maybe_mode_change): Likewise.
12391 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
12392 * regrename.c (build_def_use): Likewise.
12393 * regstat.c (dump_reg_info): Likewise.
12394 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
12395 (find_reloads, find_reloads_subreg_address): Likewise.
12396 * reload1.c (eliminate_regs_1): Likewise.
12397 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
12398 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
12399 (simplify_binary_operation_1, simplify_subreg): Likewise.
12400 * targhooks.c (default_function_arg_padding): Likewise.
12401 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
12402 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
12403 (verify_gimple_assign_ternary): Likewise.
12404 * tree-inline.c (estimate_move_cost): Likewise.
12405 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12406 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
12407 (get_address_cost_ainc): Likewise.
12408 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
12409 (vect_supportable_dr_alignment): Likewise.
12410 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12411 (vectorizable_reduction): Likewise.
12412 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
12413 (vectorizable_operation, vectorizable_load): Likewise.
12414 * tree.c (build_same_sized_truth_vector_type): Likewise.
12415 * valtrack.c (cleanup_auto_inc_dec): Likewise.
12416 * var-tracking.c (emit_note_insn_var_location): Likewise.
12417 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
12418 (ADDR_VEC_ALIGN): Likewise.
12420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12421 Alan Hayward <alan.hayward@arm.com>
12422 David Sherwood <david.sherwood@arm.com>
12424 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
12426 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12427 or if measurement_type is polynomial.
12428 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
12429 * combine.c (make_extraction): Likewise.
12430 * dse.c (find_shift_sequence): Likewise.
12431 * dwarf2out.c (mem_loc_descriptor): Likewise.
12432 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
12433 (extract_bit_field, extract_low_bits): Likewise.
12434 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
12435 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
12436 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
12437 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
12438 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12439 * reload.c (find_reloads): Likewise.
12440 * reload1.c (alter_reg): Likewise.
12441 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
12442 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
12443 * tree-if-conv.c (predicate_mem_writes): Likewise.
12444 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
12445 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
12446 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
12447 * valtrack.c (dead_debug_insert_temp): Likewise.
12448 * varasm.c (mergeable_constant_section): Likewise.
12449 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
12451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12452 Alan Hayward <alan.hayward@arm.com>
12453 David Sherwood <david.sherwood@arm.com>
12455 * expr.c (expand_assignment): Cope with polynomial mode sizes
12456 when assigning to a CONCAT.
12458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12459 Alan Hayward <alan.hayward@arm.com>
12460 David Sherwood <david.sherwood@arm.com>
12462 * machmode.h (mode_precision): Change from unsigned short to
12464 (mode_to_precision): Return a poly_uint16 rather than an unsigned
12466 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
12467 or if measurement_type is not polynomial.
12468 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
12469 in which the mode is already known to be a scalar_int_mode.
12470 * genmodes.c (emit_mode_precision): Change the type of mode_precision
12471 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
12473 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12474 for GET_MODE_PRECISION.
12475 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12476 for GET_MODE_PRECISION.
12477 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
12479 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
12480 (expand_field_assignment, make_extraction): Likewise.
12481 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
12482 (get_last_value): Likewise.
12483 * convert.c (convert_to_integer_1): Likewise.
12484 * cse.c (cse_insn): Likewise.
12485 * expr.c (expand_expr_real_1): Likewise.
12486 * lra-constraints.c (simplify_operand_subreg): Likewise.
12487 * optabs-query.c (can_atomic_load_p): Likewise.
12488 * optabs.c (expand_atomic_load): Likewise.
12489 (expand_atomic_store): Likewise.
12490 * ree.c (combine_reaching_defs): Likewise.
12491 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
12492 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
12493 * tree.h (type_has_mode_precision_p): Likewise.
12494 * ubsan.c (instrument_si_overflow): Likewise.
12496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12497 Alan Hayward <alan.hayward@arm.com>
12498 David Sherwood <david.sherwood@arm.com>
12500 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
12501 polynomial numbers of units.
12502 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
12503 (valid_vector_subparts_p): New function.
12504 (build_vector_type): Remove temporary shim and take the number
12505 of units as a poly_uint64 rather than an int.
12506 (build_opaque_vector_type): Take the number of units as a
12507 poly_uint64 rather than an int.
12508 * tree.c (build_vector_from_ctor): Handle polynomial
12509 TYPE_VECTOR_SUBPARTS.
12510 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
12511 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
12512 (build_vector_from_val): If the number of units is variable,
12513 use build_vec_duplicate_cst for constant operands and
12514 VEC_DUPLICATE_EXPR otherwise.
12515 (make_vector_type): Remove temporary is_constant ().
12516 (build_vector_type, build_opaque_vector_type): Take the number of
12517 units as a poly_uint64 rather than an int.
12518 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12520 * cfgexpand.c (expand_debug_expr): Likewise.
12521 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12522 (store_constructor, expand_expr_real_1): Likewise.
12523 (const_scalar_mask_from_tree): Likewise.
12524 * fold-const-call.c (fold_const_reduction): Likewise.
12525 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12526 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12527 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12528 (fold_relational_const): Likewise.
12529 (native_interpret_vector): Likewise. Change the size from an
12530 int to an unsigned int.
12531 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12532 TYPE_VECTOR_SUBPARTS.
12533 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12534 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12535 duplicating a non-constant operand into a variable-length vector.
12536 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12537 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12538 * ipa-icf.c (sem_variable::equals): Likewise.
12539 * match.pd: Likewise.
12540 * omp-simd-clone.c (simd_clone_subparts): Likewise.
12541 * print-tree.c (print_node): Likewise.
12542 * stor-layout.c (layout_type): Likewise.
12543 * targhooks.c (default_builtin_vectorization_cost): Likewise.
12544 * tree-cfg.c (verify_gimple_comparison): Likewise.
12545 (verify_gimple_assign_binary): Likewise.
12546 (verify_gimple_assign_ternary): Likewise.
12547 (verify_gimple_assign_single): Likewise.
12548 * tree-pretty-print.c (dump_generic_node): Likewise.
12549 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12550 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12551 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12552 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12553 (vect_shift_permute_load_chain): Likewise.
12554 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12555 (expand_vector_condition, optimize_vector_constructor): Likewise.
12556 (lower_vec_perm, get_compute_type): Likewise.
12557 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12558 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12559 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12560 (vect_recog_mask_conversion_pattern): Likewise.
12561 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12562 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12563 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12564 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
12565 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
12566 (vectorizable_shift, vectorizable_operation, vectorizable_store)
12567 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
12568 (supportable_widening_operation): Likewise.
12569 (supportable_narrowing_operation): Likewise.
12570 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
12572 * varasm.c (output_constant): Likewise.
12574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12575 Alan Hayward <alan.hayward@arm.com>
12576 David Sherwood <david.sherwood@arm.com>
12578 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
12579 so that both the length == 3 and length != 3 cases set up their
12580 own permute vectors. Add comments explaining why we know the
12581 number of elements is constant.
12582 (vect_permute_load_chain): Likewise.
12584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12585 Alan Hayward <alan.hayward@arm.com>
12586 David Sherwood <david.sherwood@arm.com>
12588 * machmode.h (mode_nunits): Change from unsigned char to
12590 (ONLY_FIXED_SIZE_MODES): New macro.
12591 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
12592 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
12593 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
12595 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
12596 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
12597 or if measurement_type is not polynomial.
12598 * genmodes.c (ZERO_COEFFS): New macro.
12599 (emit_mode_nunits_inline): Make mode_nunits_inline return a
12601 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
12602 Use ZERO_COEFFS when emitting initializers.
12603 * data-streamer.h (bp_pack_poly_value): New function.
12604 (bp_unpack_poly_value): Likewise.
12605 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12606 for GET_MODE_NUNITS.
12607 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12608 for GET_MODE_NUNITS.
12609 * tree.c (make_vector_type): Remove temporary shim and make
12610 the real function take the number of units as a poly_uint64
12611 rather than an int.
12612 (build_vector_type_for_mode): Handle polynomial nunits.
12613 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
12614 * emit-rtl.c (const_vec_series_p_1): Likewise.
12615 (gen_rtx_CONST_VECTOR): Likewise.
12616 * fold-const.c (test_vec_duplicate_folding): Likewise.
12617 * genrecog.c (validate_pattern): Likewise.
12618 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
12619 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12620 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
12621 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
12622 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
12623 * rtlanal.c (subreg_get_info): Likewise.
12624 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12625 (vect_grouped_load_supported): Likewise.
12626 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
12627 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
12628 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12629 (simplify_const_unary_operation, simplify_binary_operation_1)
12630 (simplify_const_binary_operation, simplify_ternary_operation)
12631 (test_vector_ops_duplicate, test_vector_ops): Likewise.
12632 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
12633 instead of CONST_VECTOR_NUNITS.
12634 * varasm.c (output_constant_pool_2): Likewise.
12635 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
12636 explicit-encoded elements in the XVEC for variable-length vectors.
12638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12640 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
12642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12643 Alan Hayward <alan.hayward@arm.com>
12644 David Sherwood <david.sherwood@arm.com>
12646 * coretypes.h (fixed_size_mode): Declare.
12647 (fixed_size_mode_pod): New typedef.
12648 * builtins.h (target_builtins::x_apply_args_mode)
12649 (target_builtins::x_apply_result_mode): Change type to
12650 fixed_size_mode_pod.
12651 * builtins.c (apply_args_size, apply_result_size, result_vector)
12652 (expand_builtin_apply_args_1, expand_builtin_apply)
12653 (expand_builtin_return): Update accordingly.
12655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12657 * cse.c (hash_rtx_cb): Hash only the encoded elements.
12658 * cselib.c (cselib_hash_rtx): Likewise.
12659 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
12660 CONST_VECTOR encoding.
12662 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12663 Jeff Law <law@redhat.com>
12666 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
12667 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
12668 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
12669 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
12672 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
12673 explicitly probe *sp in a noreturn function if there were any callee
12674 register saves or frame pointer is needed.
12676 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12679 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
12680 BLKmode for ternary, binary or unary expressions.
12683 * var-tracking.c (delete_vta_debug_insn): New inline function.
12684 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
12685 insns from get_insns () to NULL instead of each bb separately.
12686 Use delete_vta_debug_insn. No longer static.
12687 (vt_debug_insns_local, variable_tracking_main_1): Adjust
12688 delete_vta_debug_insns callers.
12689 * rtl.h (delete_vta_debug_insns): Declare.
12690 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
12691 instead of variable_tracking_main.
12693 2018-01-03 Martin Sebor <msebor@redhat.com>
12695 PR tree-optimization/83603
12696 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
12697 arguments past the endof the argument list in functions declared
12698 without a prototype.
12699 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
12700 Avoid checking when arguments are null.
12702 2018-01-03 Martin Sebor <msebor@redhat.com>
12705 * doc/extend.texi (attribute const): Fix a typo.
12706 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
12707 issuing -Wsuggest-attribute for void functions.
12709 2018-01-03 Martin Sebor <msebor@redhat.com>
12711 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
12712 offset_int::from instead of wide_int::to_shwi.
12713 (maybe_diag_overlap): Remove assertion.
12714 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
12715 * gimple-ssa-sprintf.c (format_directive): Same.
12716 (parse_directive): Same.
12717 (sprintf_dom_walker::compute_format_length): Same.
12718 (try_substitute_return_value): Same.
12720 2018-01-03 Jeff Law <law@redhat.com>
12722 PR middle-end/83654
12723 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
12724 non-constant residual for zero at runtime and avoid probing in
12725 that case. Reorganize code for trailing problem to mirror handling
12728 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12730 PR tree-optimization/83501
12731 * tree-ssa-strlen.c (get_string_cst): New.
12732 (handle_char_store): Call get_string_cst.
12734 2018-01-03 Martin Liska <mliska@suse.cz>
12736 PR tree-optimization/83593
12737 * tree-ssa-strlen.c: Include tree-cfg.h.
12738 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
12739 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
12740 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
12742 (strlen_dom_walker::before_dom_children): Call
12743 gimple_purge_dead_eh_edges. Dump tranformation with details
12745 (strlen_dom_walker::before_dom_children): Update call by adding
12746 new argument cleanup_eh.
12747 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
12749 2018-01-03 Martin Liska <mliska@suse.cz>
12752 * cif-code.def (VARIADIC_THUNK): New enum value.
12753 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
12756 2018-01-03 Jan Beulich <jbeulich@suse.com>
12758 * sse.md (mov<mode>_internal): Tighten condition for when to use
12759 vmovdqu<ssescalarsize> for TI and OI modes.
12761 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12763 Update copyright years.
12765 2018-01-03 Martin Liska <mliska@suse.cz>
12768 * ipa-visibility.c (function_and_variable_visibility): Skip
12769 functions with noipa attribure.
12771 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12773 * gcc.c (process_command): Update copyright notice dates.
12774 * gcov-dump.c (print_version): Ditto.
12775 * gcov.c (print_version): Ditto.
12776 * gcov-tool.c (print_version): Ditto.
12777 * gengtype.c (create_file): Ditto.
12778 * doc/cpp.texi: Bump @copying's copyright year.
12779 * doc/cppinternals.texi: Ditto.
12780 * doc/gcc.texi: Ditto.
12781 * doc/gccint.texi: Ditto.
12782 * doc/gcov.texi: Ditto.
12783 * doc/install.texi: Ditto.
12784 * doc/invoke.texi: Ditto.
12786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12788 * vector-builder.h (vector_builder::m_full_nelts): Change from
12789 unsigned int to poly_uint64.
12790 (vector_builder::full_nelts): Update prototype accordingly.
12791 (vector_builder::new_vector): Likewise.
12792 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
12793 (vector_builder::operator ==): Likewise.
12794 (vector_builder::finalize): Likewise.
12795 * int-vector-builder.h (int_vector_builder::int_vector_builder):
12796 Take the number of elements as a poly_uint64 rather than an
12798 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
12799 from unsigned int to poly_uint64.
12800 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
12801 (vec_perm_indices::new_vector): Likewise.
12802 (vec_perm_indices::length): Likewise.
12803 (vec_perm_indices::nelts_per_input): Likewise.
12804 (vec_perm_indices::input_nelts): Likewise.
12805 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
12806 number of elements per input as a poly_uint64 rather than an
12807 unsigned int. Use the original encoding for variable-length
12808 vectors, rather than clamping each individual element.
12809 For the second and subsequent elements in each pattern,
12810 clamp the step and base before clamping their sum.
12811 (vec_perm_indices::series_p): Handle polynomial element counts.
12812 (vec_perm_indices::all_in_range_p): Likewise.
12813 (vec_perm_indices_to_tree): Likewise.
12814 (vec_perm_indices_to_rtx): Likewise.
12815 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
12816 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
12817 (tree_vector_builder::new_binary_operation): Handle polynomial
12818 element counts. Return false if we need to know the number
12819 of elements at compile time.
12820 * fold-const.c (fold_vec_perm): Punt if the number of elements
12821 isn't known at compile time.
12823 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12825 * vec-perm-indices.h (vec_perm_builder): Change element type
12826 from HOST_WIDE_INT to poly_int64.
12827 (vec_perm_indices::element_type): Update accordingly.
12828 (vec_perm_indices::clamp): Handle polynomial element_types.
12829 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12830 (vec_perm_indices::all_in_range_p): Likewise.
12831 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
12833 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
12834 polynomial vec_perm_indices element types.
12835 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
12836 * fold-const.c (fold_vec_perm): Likewise.
12837 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
12838 * tree-vect-generic.c (lower_vec_perm): Likewise.
12839 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12840 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
12841 element type to HOST_WIDE_INT.
12843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12844 Alan Hayward <alan.hayward@arm.com>
12845 David Sherwood <david.sherwood@arm.com>
12847 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
12848 rather than an int. Use plus_constant.
12849 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
12850 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
12852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12853 Alan Hayward <alan.hayward@arm.com>
12854 David Sherwood <david.sherwood@arm.com>
12856 * calls.c (emit_call_1, expand_call): Change struct_value_size from
12857 a HOST_WIDE_INT to a poly_int64.
12859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12860 Alan Hayward <alan.hayward@arm.com>
12861 David Sherwood <david.sherwood@arm.com>
12863 * calls.c (load_register_parameters): Cope with polynomial
12864 mode sizes. Require a constant size for BLKmode parameters
12865 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
12866 forces a parameter to be padded at the lsb end in order to
12867 fill a complete number of words, require the parameter size
12868 to be ordered wrt UNITS_PER_WORD.
12870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12871 Alan Hayward <alan.hayward@arm.com>
12872 David Sherwood <david.sherwood@arm.com>
12874 * reload1.c (spill_stack_slot_width): Change element type
12875 from unsigned int to poly_uint64_pod.
12876 (alter_reg): Treat mode sizes as polynomial.
12878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12879 Alan Hayward <alan.hayward@arm.com>
12880 David Sherwood <david.sherwood@arm.com>
12882 * reload.c (complex_word_subreg_p): New function.
12883 (reload_inner_reg_of_subreg, push_reload): Use it.
12885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12886 Alan Hayward <alan.hayward@arm.com>
12887 David Sherwood <david.sherwood@arm.com>
12889 * lra-constraints.c (process_alt_operands): Reject matched
12890 operands whose sizes aren't ordered.
12891 (match_reload): Refer to this check here.
12893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12894 Alan Hayward <alan.hayward@arm.com>
12895 David Sherwood <david.sherwood@arm.com>
12897 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
12898 that the mode size is in the set {1, 2, 4, 8, 16}.
12900 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12901 Alan Hayward <alan.hayward@arm.com>
12902 David Sherwood <david.sherwood@arm.com>
12904 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
12905 Use plus_constant instead of gen_rtx_PLUS.
12907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12908 Alan Hayward <alan.hayward@arm.com>
12909 David Sherwood <david.sherwood@arm.com>
12911 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
12912 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
12913 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
12914 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
12915 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
12916 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
12917 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
12918 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
12919 * config/i386/i386.c (ix86_push_rounding): ...this new function.
12920 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
12922 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
12923 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
12924 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
12925 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
12926 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
12927 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
12928 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
12929 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
12930 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
12931 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
12933 * expr.c (emit_move_resolve_push): Treat the input and result
12934 of PUSH_ROUNDING as a poly_int64.
12935 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
12936 (emit_push_insn): Likewise.
12937 * lra-eliminations.c (mark_not_eliminable): Likewise.
12938 * recog.c (push_operand): Likewise.
12939 * reload1.c (elimination_effects): Likewise.
12940 * rtlanal.c (nonzero_bits1): Likewise.
12941 * calls.c (store_one_arg): Likewise. Require the padding to be
12942 known at compile time.
12944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12945 Alan Hayward <alan.hayward@arm.com>
12946 David Sherwood <david.sherwood@arm.com>
12948 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
12949 Use plus_constant instead of gen_rtx_PLUS.
12951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12952 Alan Hayward <alan.hayward@arm.com>
12953 David Sherwood <david.sherwood@arm.com>
12955 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
12956 rather than an int.
12958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12959 Alan Hayward <alan.hayward@arm.com>
12960 David Sherwood <david.sherwood@arm.com>
12962 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
12963 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
12964 via stack temporaries. Treat the mode size as polynomial too.
12966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12967 Alan Hayward <alan.hayward@arm.com>
12968 David Sherwood <david.sherwood@arm.com>
12970 * expr.c (expand_expr_real_2): When handling conversions involving
12971 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
12972 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
12973 as a poly_uint64 too.
12975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12976 Alan Hayward <alan.hayward@arm.com>
12977 David Sherwood <david.sherwood@arm.com>
12979 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
12981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12982 Alan Hayward <alan.hayward@arm.com>
12983 David Sherwood <david.sherwood@arm.com>
12985 * combine.c (can_change_dest_mode): Handle polynomial
12986 REGMODE_NATURAL_SIZE.
12987 * expmed.c (store_bit_field_1): Likewise.
12988 * expr.c (store_constructor): Likewise.
12989 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
12990 and polynomial REGMODE_NATURAL_SIZE.
12991 (gen_lowpart_common): Likewise.
12992 * reginfo.c (record_subregs_of_mode): Likewise.
12993 * rtlanal.c (read_modify_subreg_p): Likewise.
12995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12996 Alan Hayward <alan.hayward@arm.com>
12997 David Sherwood <david.sherwood@arm.com>
12999 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13000 numbers of elements.
13002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13003 Alan Hayward <alan.hayward@arm.com>
13004 David Sherwood <david.sherwood@arm.com>
13006 * match.pd: Cope with polynomial numbers of vector elements.
13008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13009 Alan Hayward <alan.hayward@arm.com>
13010 David Sherwood <david.sherwood@arm.com>
13012 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13013 in a POINTER_PLUS_EXPR.
13015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13016 Alan Hayward <alan.hayward@arm.com>
13017 David Sherwood <david.sherwood@arm.com>
13019 * omp-simd-clone.c (simd_clone_subparts): New function.
13020 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13021 (ipa_simd_modify_function_body): Likewise.
13023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13024 Alan Hayward <alan.hayward@arm.com>
13025 David Sherwood <david.sherwood@arm.com>
13027 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13028 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13029 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13030 (expand_vector_condition, vector_element): Likewise.
13031 (subparts_gt): New function.
13032 (get_compute_type): Use subparts_gt.
13033 (count_type_subparts): Delete.
13034 (expand_vector_operations_1): Use subparts_gt instead of
13035 count_type_subparts.
13037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13038 Alan Hayward <alan.hayward@arm.com>
13039 David Sherwood <david.sherwood@arm.com>
13041 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13042 (vect_compile_time_alias): ...this new function. Do the calculation
13043 on poly_ints rather than trees.
13044 (vect_prune_runtime_alias_test_list): Update call accordingly.
13046 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13047 Alan Hayward <alan.hayward@arm.com>
13048 David Sherwood <david.sherwood@arm.com>
13050 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13052 (vect_schedule_slp_instance): Likewise.
13054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13055 Alan Hayward <alan.hayward@arm.com>
13056 David Sherwood <david.sherwood@arm.com>
13058 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13059 constant and extern definitions for variable-length vectors.
13060 (vect_get_constant_vectors): Note that the number of units
13061 is known to be constant.
13063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13064 Alan Hayward <alan.hayward@arm.com>
13065 David Sherwood <david.sherwood@arm.com>
13067 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13068 of units as polynomial. Choose between WIDE and NARROW based
13071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13072 Alan Hayward <alan.hayward@arm.com>
13073 David Sherwood <david.sherwood@arm.com>
13075 * tree-vect-stmts.c (simd_clone_subparts): New function.
13076 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13079 Alan Hayward <alan.hayward@arm.com>
13080 David Sherwood <david.sherwood@arm.com>
13082 * tree-vect-stmts.c (vectorizable_call): Treat the number of
13083 vectors as polynomial. Use build_index_vector for
13084 IFN_GOMP_SIMD_LANE.
13086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13087 Alan Hayward <alan.hayward@arm.com>
13088 David Sherwood <david.sherwood@arm.com>
13090 * tree-vect-stmts.c (get_load_store_type): Treat the number of
13091 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13092 for variable-length vectors.
13093 (vectorizable_mask_load_store): Treat the number of units as
13094 polynomial, asserting that it is constant if the condition has
13095 already been enforced.
13096 (vectorizable_store, vectorizable_load): Likewise.
13098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13099 Alan Hayward <alan.hayward@arm.com>
13100 David Sherwood <david.sherwood@arm.com>
13102 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13103 of units as polynomial. Punt if we can't tell at compile time
13104 which vector contains the final result.
13106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13107 Alan Hayward <alan.hayward@arm.com>
13108 David Sherwood <david.sherwood@arm.com>
13110 * tree-vect-loop.c (vectorizable_induction): Treat the number
13111 of units as polynomial. Punt on SLP inductions. Use an integer
13112 VEC_SERIES_EXPR for variable-length integer reductions. Use a
13113 cast of such a series for variable-length floating-point
13116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13117 Alan Hayward <alan.hayward@arm.com>
13118 David Sherwood <david.sherwood@arm.com>
13120 * tree.h (build_index_vector): Declare.
13121 * tree.c (build_index_vector): New function.
13122 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13123 of units as polynomial, forcibly converting it to a constant if
13124 vectorizable_reduction has already enforced the condition.
13125 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
13126 to create a {1,2,3,...} vector.
13127 (vectorizable_reduction): Treat the number of units as polynomial.
13128 Choose vectype_in based on the largest scalar element size rather
13129 than the smallest number of units. Enforce the restrictions
13132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13133 Alan Hayward <alan.hayward@arm.com>
13134 David Sherwood <david.sherwood@arm.com>
13136 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13137 number of units as polynomial.
13139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13140 Alan Hayward <alan.hayward@arm.com>
13141 David Sherwood <david.sherwood@arm.com>
13143 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13144 * target.def (autovectorize_vector_sizes): Return the vector sizes
13145 by pointer, using vector_sizes rather than a bitmask.
13146 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13147 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13148 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13150 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13151 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13152 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13153 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13154 * omp-general.c (omp_max_vf): Likewise.
13155 * omp-low.c (omp_clause_aligned_alignment): Likewise.
13156 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13157 * tree-vect-loop.c (vect_analyze_loop): Likewise.
13158 * tree-vect-slp.c (vect_slp_bb): Likewise.
13159 * doc/tm.texi: Regenerate.
13160 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13162 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13163 the vector size as a poly_uint64 rather than an unsigned int.
13164 (current_vector_size): Change from an unsigned int to a poly_uint64.
13165 (get_vectype_for_scalar_type): Update accordingly.
13166 * tree.h (build_truth_vector_type): Take the size and number of
13167 units as a poly_uint64 rather than an unsigned int.
13168 (build_vector_type): Add a temporary overload that takes
13169 the number of units as a poly_uint64 rather than an unsigned int.
13170 * tree.c (make_vector_type): Likewise.
13171 (build_truth_vector_type): Take the number of units as a poly_uint64
13172 rather than an unsigned int.
13174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13175 Alan Hayward <alan.hayward@arm.com>
13176 David Sherwood <david.sherwood@arm.com>
13178 * target.def (get_mask_mode): Take the number of units and length
13179 as poly_uint64s rather than unsigned ints.
13180 * targhooks.h (default_get_mask_mode): Update accordingly.
13181 * targhooks.c (default_get_mask_mode): Likewise.
13182 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13183 * doc/tm.texi: Regenerate.
13185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13186 Alan Hayward <alan.hayward@arm.com>
13187 David Sherwood <david.sherwood@arm.com>
13189 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13190 * omp-general.c (omp_max_vf): Likewise.
13191 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13192 (expand_omp_simd): Handle polynomial safelen.
13193 * omp-low.c (omplow_simd_context): Add a default constructor.
13194 (omplow_simd_context::max_vf): Change from int to poly_uint64.
13195 (lower_rec_simd_input_clauses): Update accordingly.
13196 (lower_rec_input_clauses): Likewise.
13198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13199 Alan Hayward <alan.hayward@arm.com>
13200 David Sherwood <david.sherwood@arm.com>
13202 * tree-vectorizer.h (vect_nunits_for_cost): New function.
13203 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13204 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13205 (vect_analyze_slp_cost): Likewise.
13206 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13207 (vect_model_load_cost): Likewise.
13209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13210 Alan Hayward <alan.hayward@arm.com>
13211 David Sherwood <david.sherwood@arm.com>
13213 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13214 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13215 from an unsigned int * to a poly_uint64_pod *.
13216 (calculate_unrolling_factor): New function.
13217 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
13219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13220 Alan Hayward <alan.hayward@arm.com>
13221 David Sherwood <david.sherwood@arm.com>
13223 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13224 from an unsigned int to a poly_uint64.
13225 (_loop_vec_info::slp_unrolling_factor): Likewise.
13226 (_loop_vec_info::vectorization_factor): Change from an int
13228 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13229 (vect_get_num_vectors): New function.
13230 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13231 (vect_get_num_copies): Use vect_get_num_vectors.
13232 (vect_analyze_data_ref_dependences): Change max_vf from an int *
13233 to an unsigned int *.
13234 (vect_analyze_data_refs): Change min_vf from an int * to a
13236 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13237 than an unsigned HOST_WIDE_INT.
13238 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13239 (vect_analyze_data_ref_dependence): Change max_vf from an int *
13240 to an unsigned int *.
13241 (vect_analyze_data_ref_dependences): Likewise.
13242 (vect_compute_data_ref_alignment): Handle polynomial vf.
13243 (vect_enhance_data_refs_alignment): Likewise.
13244 (vect_prune_runtime_alias_test_list): Likewise.
13245 (vect_shift_permute_load_chain): Likewise.
13246 (vect_supportable_dr_alignment): Likewise.
13247 (dependence_distance_ge_vf): Take the vectorization factor as a
13248 poly_uint64 rather than an unsigned HOST_WIDE_INT.
13249 (vect_analyze_data_refs): Change min_vf from an int * to a
13251 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13252 vfm1 as a poly_uint64 rather than an int. Make the same change
13253 for the returned bound_scalar.
13254 (vect_gen_vector_loop_niters): Handle polynomial vf.
13255 (vect_do_peeling): Likewise. Update call to
13256 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13257 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13259 * tree-vect-loop.c (vect_determine_vectorization_factor)
13260 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13261 (vect_get_known_peeling_cost): Likewise.
13262 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13263 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13264 (vect_transform_loop): Likewise. Use the lowest possible VF when
13265 updating the upper bounds of the loop.
13266 (vect_min_worthwhile_factor): Make static. Return an unsigned int
13267 rather than an int.
13268 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13269 polynomial unroll factors.
13270 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13271 (vect_make_slp_decision): Likewise.
13272 (vect_supported_load_permutation_p): Likewise, and polynomial
13274 (vect_analyze_slp_cost): Handle polynomial vf.
13275 (vect_slp_analyze_node_operations): Likewise.
13276 (vect_slp_analyze_bb_1): Likewise.
13277 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13278 than an unsigned HOST_WIDE_INT.
13279 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13280 (vectorizable_load): Handle polynomial vf.
13281 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13283 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13286 Alan Hayward <alan.hayward@arm.com>
13287 David Sherwood <david.sherwood@arm.com>
13289 * match.pd: Handle bit operations involving three constants
13290 and try to fold one pair.
13292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13294 * tree-vect-loop-manip.c: Include gimple-fold.h.
13295 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13296 niters_maybe_zero parameters. Handle other cases besides a step of 1.
13297 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13298 Add a path that uses a step of VF instead of 1, but disable it
13300 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13301 and niters_no_overflow parameters. Update calls to
13302 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13303 Create a new SSA name if the latter choses to use a ste other
13304 than zero, and return it via niters_vector_mult_vf_var.
13305 * tree-vect-loop.c (vect_transform_loop): Update calls to
13306 vect_do_peeling, vect_gen_vector_loop_niters and
13307 slpeel_make_loop_iterate_ntimes.
13308 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13309 (vect_gen_vector_loop_niters): Update declarations after above changes.
13311 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
13313 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13314 128-bit round to integer instructions.
13315 (ceil<mode>2): Likewise.
13316 (btrunc<mode>2): Likewise.
13317 (round<mode>2): Likewise.
13319 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13321 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13322 unaligned VSX load/store on P8/P9.
13323 (expand_block_clear): Allow the use of unaligned VSX
13324 load/store on P8/P9.
13326 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13328 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13330 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13331 swap associated with both a load and a store.
13333 2018-01-02 Andrew Waterman <andrew@sifive.com>
13335 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13336 * config/riscv/riscv.md (clear_cache): Use it.
13338 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
13340 * web.c: Remove out-of-date comment.
13342 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13344 * expr.c (fixup_args_size_notes): Check that any existing
13345 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13346 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13347 (emit_single_push_insn): ...here.
13349 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13351 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13352 (const_vector_encoded_nelts): New function.
13353 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13354 (const_vector_int_elt, const_vector_elt): Declare.
13355 * emit-rtl.c (const_vector_int_elt_1): New function.
13356 (const_vector_elt): Likewise.
13357 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
13358 of CONST_VECTOR_ELT.
13360 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13362 * expr.c: Include rtx-vector-builder.h.
13363 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
13364 directly on the tree encoding.
13365 (const_vector_from_tree): Likewise.
13366 * optabs.c: Include rtx-vector-builder.h.
13367 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
13368 sequence of "u" values.
13369 * vec-perm-indices.c: Include rtx-vector-builder.h.
13370 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
13371 directly on the vec_perm_indices encoding.
13373 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13375 * doc/rtl.texi (const_vector): Describe new encoding scheme.
13376 * Makefile.in (OBJS): Add rtx-vector-builder.o.
13377 * rtx-vector-builder.h: New file.
13378 * rtx-vector-builder.c: Likewise.
13379 * rtl.h (rtx_def::u2): Add a const_vector field.
13380 (CONST_VECTOR_NPATTERNS): New macro.
13381 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
13382 (CONST_VECTOR_DUPLICATE_P): Likewise.
13383 (CONST_VECTOR_STEPPED_P): Likewise.
13384 (CONST_VECTOR_ENCODED_ELT): Likewise.
13385 (const_vec_duplicate_p): Check for a duplicated vector encoding.
13386 (unwrap_const_vec_duplicate): Likewise.
13387 (const_vec_series_p): Check for a non-duplicated vector encoding.
13388 Say that the function only returns true for integer vectors.
13389 * emit-rtl.c: Include rtx-vector-builder.h.
13390 (gen_const_vec_duplicate_1): Delete.
13391 (gen_const_vector): Call gen_const_vec_duplicate instead of
13392 gen_const_vec_duplicate_1.
13393 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
13394 (gen_const_vec_duplicate): Use rtx_vector_builder.
13395 (gen_const_vec_series): Likewise.
13396 (gen_rtx_CONST_VECTOR): Likewise.
13397 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
13398 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13399 Build a new vector rather than modifying a CONST_VECTOR in-place.
13400 (handle_special_swappables): Update call accordingly.
13401 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
13402 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13403 Build a new vector rather than modifying a CONST_VECTOR in-place.
13404 (handle_special_swappables): Update call accordingly.
13406 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13408 * simplify-rtx.c (simplify_const_binary_operation): Use
13409 CONST_VECTOR_ELT instead of XVECEXP.
13411 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13413 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
13414 the selector elements to be different from the data elements
13415 if the selector is a VECTOR_CST.
13416 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
13417 ssizetype for the selector.
13419 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13421 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
13422 before testing each element individually.
13423 * tree-vect-generic.c (lower_vec_perm): Likewise.
13425 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13427 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
13428 * selftest-run-tests.c (selftest::run_tests): Call it.
13429 * vector-builder.h (vector_builder::operator ==): New function.
13430 (vector_builder::operator !=): Likewise.
13431 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
13432 (vec_perm_indices::all_from_input_p): New function.
13433 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13434 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
13435 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
13436 instead of reading the VECTOR_CST directly. Detect whether both
13437 vector inputs are the same before constructing the vec_perm_indices,
13438 and update the number of inputs argument accordingly. Use the
13439 utility functions added above. Only construct sel2 if we need to.
13441 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13443 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
13444 the broadcast of the low byte.
13445 (expand_mult_highpart): Use an explicit encoding for the permutes.
13446 * optabs-query.c (can_mult_highpart_p): Likewise.
13447 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13448 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13449 (vectorizable_bswap): Likewise.
13450 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
13451 explicit encoding for the power-of-2 permutes.
13452 (vect_permute_store_chain): Likewise.
13453 (vect_grouped_load_supported): Likewise.
13454 (vect_permute_load_chain): Likewise.
13456 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13458 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
13459 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
13460 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
13461 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13462 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13463 (vect_gen_perm_mask_any): Likewise.
13465 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13467 * int-vector-builder.h: New file.
13468 * vec-perm-indices.h: Include int-vector-builder.h.
13469 (vec_perm_indices): Redefine as an int_vector_builder.
13470 (auto_vec_perm_indices): Delete.
13471 (vec_perm_builder): Redefine as a stand-alone class.
13472 (vec_perm_indices::vec_perm_indices): New function.
13473 (vec_perm_indices::clamp): Likewise.
13474 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
13475 (vec_perm_indices::new_vector): New function.
13476 (vec_perm_indices::new_expanded_vector): Update for new
13477 vec_perm_indices class.
13478 (vec_perm_indices::rotate_inputs): New function.
13479 (vec_perm_indices::all_in_range_p): Operate directly on the
13480 encoded form, without computing elided elements.
13481 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
13482 encoding. Update for new vec_perm_indices class.
13483 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
13484 the given vec_perm_builder.
13485 (expand_vec_perm_var): Update vec_perm_builder constructor.
13486 (expand_mult_highpart): Use vec_perm_builder instead of
13487 auto_vec_perm_indices.
13488 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
13489 vec_perm_indices instead of auto_vec_perm_indices. Use a single
13490 or double series encoding as appropriate.
13491 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
13492 vec_perm_indices instead of auto_vec_perm_indices.
13493 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13494 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13495 (vect_permute_store_chain): Likewise.
13496 (vect_grouped_load_supported): Likewise.
13497 (vect_permute_load_chain): Likewise.
13498 (vect_shift_permute_load_chain): Likewise.
13499 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13500 (vect_transform_slp_perm_load): Likewise.
13501 (vect_schedule_slp_instance): Likewise.
13502 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13503 (vectorizable_mask_load_store): Likewise.
13504 (vectorizable_bswap): Likewise.
13505 (vectorizable_store): Likewise.
13506 (vectorizable_load): Likewise.
13507 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
13508 vec_perm_indices instead of auto_vec_perm_indices. Use
13509 tree_to_vec_perm_builder to read the vector from a tree.
13510 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
13511 vec_perm_builder instead of a vec_perm_indices.
13512 (have_whole_vector_shift): Use vec_perm_builder and
13513 vec_perm_indices instead of auto_vec_perm_indices. Leave the
13514 truncation to calc_vec_perm_mask_for_shift.
13515 (vect_create_epilog_for_reduction): Likewise.
13516 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13517 from auto_vec_perm_indices to vec_perm_indices.
13518 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13519 instead of changing individual elements.
13520 (aarch64_vectorize_vec_perm_const): Use new_vector to install
13521 the vector in d.perm.
13522 * config/arm/arm.c (expand_vec_perm_d::perm): Change
13523 from auto_vec_perm_indices to vec_perm_indices.
13524 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13525 instead of changing individual elements.
13526 (arm_vectorize_vec_perm_const): Use new_vector to install
13527 the vector in d.perm.
13528 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13529 Update vec_perm_builder constructor.
13530 (rs6000_expand_interleave): Likewise.
13531 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13532 (rs6000_expand_interleave): Likewise.
13534 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13536 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13537 to qimode could truncate the indices.
13538 * optabs.c (expand_vec_perm_var): Likewise.
13540 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13542 * Makefile.in (OBJS): Add vec-perm-indices.o.
13543 * vec-perm-indices.h: New file.
13544 * vec-perm-indices.c: Likewise.
13545 * target.h (vec_perm_indices): Replace with a forward class
13547 (auto_vec_perm_indices): Move to vec-perm-indices.h.
13548 * optabs.h: Include vec-perm-indices.h.
13549 (expand_vec_perm): Delete.
13550 (selector_fits_mode_p, expand_vec_perm_var): Declare.
13551 (expand_vec_perm_const): Declare.
13552 * target.def (vec_perm_const_ok): Replace with...
13553 (vec_perm_const): ...this new hook.
13554 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13555 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13556 * doc/tm.texi: Regenerate.
13557 * optabs.def (vec_perm_const): Delete.
13558 * doc/md.texi (vec_perm_const): Likewise.
13559 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13560 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13561 expand_vec_perm for constant permutation vectors. Assert that
13562 the mode of variable permutation vectors is the integer equivalent
13563 of the mode that is being permuted.
13564 * optabs-query.h (selector_fits_mode_p): Declare.
13565 * optabs-query.c: Include vec-perm-indices.h.
13566 (selector_fits_mode_p): New function.
13567 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
13568 is defined, instead of checking whether the vec_perm_const_optab
13569 exists. Use targetm.vectorize.vec_perm_const instead of
13570 targetm.vectorize.vec_perm_const_ok. Check whether the indices
13571 fit in the vector mode before using a variable permute.
13572 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
13573 vec_perm_indices instead of an rtx.
13574 (expand_vec_perm): Replace with...
13575 (expand_vec_perm_const): ...this new function. Take the selector
13576 as a vec_perm_indices rather than an rtx. Also take the mode of
13577 the selector. Update call to shift_amt_for_vec_perm_mask.
13578 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
13579 Use vec_perm_indices::new_expanded_vector to expand the original
13580 selector into bytes. Check whether the indices fit in the vector
13581 mode before using a variable permute.
13582 (expand_vec_perm_var): Make global.
13583 (expand_mult_highpart): Use expand_vec_perm_const.
13584 * fold-const.c: Includes vec-perm-indices.h.
13585 * tree-ssa-forwprop.c: Likewise.
13586 * tree-vect-data-refs.c: Likewise.
13587 * tree-vect-generic.c: Likewise.
13588 * tree-vect-loop.c: Likewise.
13589 * tree-vect-slp.c: Likewise.
13590 * tree-vect-stmts.c: Likewise.
13591 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
13593 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
13594 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
13595 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
13596 (aarch64_vectorize_vec_perm_const): ...this new function.
13597 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13598 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13599 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
13600 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
13601 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13602 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13603 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
13605 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
13606 check for NEON modes.
13607 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
13608 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
13609 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
13610 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
13612 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
13613 the old VEC_PERM_CONST conditions.
13614 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
13615 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
13616 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
13617 (ia64_vectorize_vec_perm_const_ok): Merge into...
13618 (ia64_vectorize_vec_perm_const): ...this new function.
13619 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
13620 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
13621 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
13622 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
13623 * config/mips/mips.c (mips_expand_vec_perm_const)
13624 (mips_vectorize_vec_perm_const_ok): Merge into...
13625 (mips_vectorize_vec_perm_const): ...this new function.
13626 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
13627 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
13628 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
13629 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
13630 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
13631 (rs6000_expand_vec_perm_const): Delete.
13632 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
13634 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13635 (altivec_expand_vec_perm_const_le): Take each operand individually.
13636 Operate on constant selectors rather than rtxes.
13637 (altivec_expand_vec_perm_const): Likewise. Update call to
13638 altivec_expand_vec_perm_const_le.
13639 (rs6000_expand_vec_perm_const): Delete.
13640 (rs6000_vectorize_vec_perm_const_ok): Delete.
13641 (rs6000_vectorize_vec_perm_const): New function.
13642 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13643 an element count and rtx array.
13644 (rs6000_expand_extract_even): Update call accordingly.
13645 (rs6000_expand_interleave): Likewise.
13646 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
13647 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
13648 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
13649 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
13650 (rs6000_expand_vec_perm_const): Delete.
13651 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13652 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13653 (altivec_expand_vec_perm_const_le): Take each operand individually.
13654 Operate on constant selectors rather than rtxes.
13655 (altivec_expand_vec_perm_const): Likewise. Update call to
13656 altivec_expand_vec_perm_const_le.
13657 (rs6000_expand_vec_perm_const): Delete.
13658 (rs6000_vectorize_vec_perm_const_ok): Delete.
13659 (rs6000_vectorize_vec_perm_const): New function. Remove stray
13660 reference to the SPE evmerge intructions.
13661 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13662 an element count and rtx array.
13663 (rs6000_expand_extract_even): Update call accordingly.
13664 (rs6000_expand_interleave): Likewise.
13665 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
13666 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
13668 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13670 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13672 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
13673 vector mode and that that mode matches the mode of the data
13675 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
13676 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
13677 directly using expand_vec_perm_1 when forcing selectors into
13679 (expand_vec_perm_var): New function, split out from expand_vec_perm.
13681 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13683 * optabs-query.h (can_vec_perm_p): Delete.
13684 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
13685 * optabs-query.c (can_vec_perm_p): Split into...
13686 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
13687 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
13688 particular selector is valid.
13689 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13690 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13691 (vect_grouped_load_supported): Likewise.
13692 (vect_shift_permute_load_chain): Likewise.
13693 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13694 (vect_transform_slp_perm_load): Likewise.
13695 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13696 (vectorizable_bswap): Likewise.
13697 (vect_gen_perm_mask_checked): Likewise.
13698 * fold-const.c (fold_ternary_loc): Likewise. Don't take
13699 implementations of variable permutation vectors into account
13700 when deciding which selector to use.
13701 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
13702 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
13703 with a false third argument.
13704 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
13705 to test whether the constant selector is valid and can_vec_perm_var_p
13706 to test whether a variable selector is valid.
13708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13710 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
13711 * optabs-query.c (can_vec_perm_p): Likewise.
13712 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
13713 instead of vec_perm_indices.
13714 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
13715 (vect_gen_perm_mask_checked): Likewise,
13716 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
13717 (vect_gen_perm_mask_checked): Likewise,
13719 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13721 * optabs-query.h (qimode_for_vec_perm): Declare.
13722 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
13723 (qimode_for_vec_perm): ...this new function.
13724 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
13726 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13728 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
13729 does not have a conditional at the top.
13731 2018-01-02 Richard Biener <rguenther@suse.de>
13733 * ipa-inline.c (big_speedup_p): Fix expression.
13735 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13738 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
13741 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13745 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
13746 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
13747 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
13748 cond_taken_branch_cost 3->4.
13750 2018-01-01 Jakub Jelinek <jakub@redhat.com>
13752 PR tree-optimization/83581
13753 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
13754 TODO_cleanup_cfg if any changes have been made.
13756 PR middle-end/83608
13757 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
13758 convert_modes if target mode has the right side, but different mode
13761 PR middle-end/83609
13762 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
13763 last argument when extracting from CONCAT. If either from_real or
13764 from_imag is NULL, use expansion through memory. If result is not
13765 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
13766 the parts directly to inner mode, if even that fails, use expansion
13769 PR middle-end/83623
13770 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
13771 check for bswap in mode rather than HImode and use that in expand_unop
13774 Copyright (C) 2018 Free Software Foundation, Inc.
13776 Copying and distribution of this file, with or without modification,
13777 are permitted in any medium without royalty provided the copyright
13778 notice and this notice are preserved.