RISC-V: Add naked function support.
[official-gcc.git] / gcc / ChangeLog
blob3662659fee064b15a26dceb45338836a77de86fb
1 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
2             Jim Wilson  <jimw@sifive.com>
4         * config/riscv/riscv-protos.h (riscv_output_return): New.
5         * config/riscv/riscv.c (struct machine_function): New naked_p field.
6         (riscv_attribute_table, riscv_output_return),
7         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
8         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
9         (riscv_compute_frame_info): Only compute frame->mask if not a naked
10         function.
11         (riscv_expand_prologue): Add early return for naked function.
12         (riscv_expand_epilogue): Likewise.
13         (riscv_function_ok_for_sibcall): Return false for naked function.
14         (riscv_set_current_function): New.
15         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
16         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18         * doc/extend.texi (RISC-V Function Attributes): New.
20 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23         check for 128-bit long double before checking TCmode.
24         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25         128-bit long doubles before checking TFmode or TCmode.
26         (FLOAT128_IBM_P): Likewise.
28 2018-01-10  Martin Sebor  <msebor@redhat.com>
30         PR tree-optimization/83671
31         * builtins.c (c_strlen): Unconditionally return zero for the empty
32         string.
33         Use -Warray-bounds for warnings.
34         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
35         for non-constant array indices with COMPONENT_REF, arrays of
36         arrays, and pointers to arrays.
37         (gimple_fold_builtin_strlen): Determine and set length range for
38         non-constant character arrays.
40 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
42         PR middle-end/81897
43         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
44         empty blocks.
46 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
48         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
50 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
52         PR target/83399
53         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
54         VECTOR_MEM_ALTIVEC_OR_VSX_P.
55         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
56         indexed_or_indirect_operand predicate.
57         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
58         (*vsx_le_perm_load_v8hi): Likewise.
59         (*vsx_le_perm_load_v16qi): Likewise.
60         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
61         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
62         (*vsx_le_perm_store_v8hi): Likewise.
63         (*vsx_le_perm_store_v16qi): Likewise.
64         (eight unnamed splitters): Likewise.
66 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
68         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
69         * config/rs6000/emmintrin.h: Likewise.
70         * config/rs6000/mmintrin.h: Likewise.
71         * config/rs6000/xmmintrin.h: Likewise.
73 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
75         PR c++/43486
76         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
77         "public_flag".
78         * tree.c (tree_nop_conversion): Return true for location wrapper
79         nodes.
80         (maybe_wrap_with_location): New function.
81         (selftest::check_strip_nops): New function.
82         (selftest::test_location_wrappers): New function.
83         (selftest::tree_c_tests): Call it.
84         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
85         (maybe_wrap_with_location): New decl.
86         (EXPR_LOCATION_WRAPPER_P): New macro.
87         (location_wrapper_p): New inline function.
88         (tree_strip_any_location_wrapper): New inline function.
90 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
92         PR target/83735
93         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
94         stack_realign_offset for the largest alignment of stack slot
95         actually used.
96         (ix86_find_max_used_stack_alignment): New function.
97         (ix86_finalize_stack_frame_flags): Use it.  Set
98         max_used_stack_alignment if we don't realign stack.
99         * config/i386/i386.h (machine_function): Add
100         max_used_stack_alignment.
102 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
104         * config/arm/arm.opt (-mbranch-cost): New option.
105         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
106         account.
108 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
110         PR target/83629
111         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
112         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
114 2018-01-10  Richard Biener  <rguenther@suse.de>
116         PR debug/83765
117         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
118         early out so it also covers the case where we have a non-NULL
119         origin.
121 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
123         PR tree-optimization/83753
124         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
125         for non-strided grouped accesses if the number of elements is 1.
127 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
129         PR target/81616
130         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
131         * i386.h (TARGET_USE_GATHER): Define.
132         * x86-tune.def (X86_TUNE_USE_GATHER): New.
134 2018-01-10  Martin Liska  <mliska@suse.cz>
136         PR bootstrap/82831
137         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
138         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
139         partitioning.
140         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
141         CLEANUP_NO_PARTITIONING is not set.
143 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
145         * doc/rtl.texi: Remove documentation of (const ...) wrappers
146         for vectors, as a partial revert of r254296.
147         * rtl.h (const_vec_p): Delete.
148         (const_vec_duplicate_p): Don't test for vector CONSTs.
149         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
150         * expmed.c (make_tree): Likewise.
152         Revert:
153         * common.md (E, F): Use CONSTANT_P instead of checking for
154         CONST_VECTOR.
155         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
156         checking for CONST_VECTOR.
158 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
160         PR middle-end/83575
161         * predict.c (force_edge_cold): Handle in more sane way edges
162         with no prediction.
164 2018-01-09  Carl Love  <cel@us.ibm.com>
166         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
167         V4SI, V4SF types.
168         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
169         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
170         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
171         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
172         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
173         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
174         * config/rs6000/rs6000-protos.h: Add extern defition for
175         rs6000_generate_float2_double_code.
176         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
177         function.
178         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
179         (float2_v2df): Add define_expand.
181 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
183         PR target/83628
184         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
185         op_mode in the force_to_mode call.
187 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
189         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
190         instead of checking each element individually.
191         (aarch64_evpc_uzp): Likewise.
192         (aarch64_evpc_zip): Likewise.
193         (aarch64_evpc_ext): Likewise.
194         (aarch64_evpc_rev): Likewise.
195         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
196         instead of checking each element individually.  Return true without
197         generating rtl if
198         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
199         whether all selected elements come from the same input, instead of
200         checking each element individually.  Remove calls to gen_rtx_REG,
201         start_sequence and end_sequence and instead assert that no rtl is
202         generated.
204 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
206         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
207         order of HIGH and CONST checks.
209 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
211         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
212         if the destination isn't an SSA_NAME.
214 2018-01-09  Richard Biener  <rguenther@suse.de>
216         PR tree-optimization/83668
217         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
218         move prologue...
219         (canonicalize_loop_form): ... here, renamed from ...
220         (canonicalize_loop_closed_ssa_form): ... this and amended to
221         swap successor edges for loop exit blocks to make us use
222         the RPO order we need for initial schedule generation.
224 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
226         PR tree-optimization/64811
227         * match.pd: When optimizing comparisons with Inf, avoid
228         introducing or losing exceptions from comparisons with NaN.
230 2018-01-09  Martin Liska  <mliska@suse.cz>
232         PR sanitizer/82517
233         * asan.c (shadow_mem_size): Add gcc_assert.
235 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
237         Don't save registers in main().
239         PR target/83738
240         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
241         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
242         * config/avr/avr.c (avr_set_current_function): Don't error if
243         naked, OS_task or OS_main are specified at the same time.
244         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
245         OS_main.
246         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
247         attribute.
248         * common/config/avr/avr-common.c (avr_option_optimization_table):
249         Switch on -mmain-is-OS_task for optimizing compilations.
251 2018-01-09  Richard Biener  <rguenther@suse.de>
253         PR tree-optimization/83572
254         * graphite.c: Include cfganal.h.
255         (graphite_transform_loops): Connect infinite loops to exit
256         and remove fake edges at the end.
258 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
260         * ipa-inline.c (edge_badness): Revert accidental checkin.
262 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
264         PR ipa/80763
265         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
266         symbols; not inline clones.
268 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
270         PR target/83507
271         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
272         hard registers.  Formatting fixes.
274         PR preprocessor/83722
275         * gcc.c (try_generate_repro): Pass
276         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
277         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
278         do_report_bug.
280 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
281             Kito Cheng  <kito.cheng@gmail.com>
283         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
284         (riscv_leaf_function_p): Delete.
285         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
287 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
289         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
290         function.
291         (do_ifelse): New function.
292         (do_isel): New function.
293         (do_sub3): New function.
294         (do_add3): New function.
295         (do_load_mask_compare): New function.
296         (do_overlap_load_compare): New function.
297         (expand_compare_loop): New function.
298         (expand_block_compare): Call expand_compare_loop() when appropriate.
299         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
300         option description.
301         (-mblock-compare-inline-loop-limit): New option.
303 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
305         PR target/83677
306         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
307         Reverse order of second and third operands in first alternative.
308         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
309         of first and second elements in UNSPEC_VPERMR vector.
310         (altivec_expand_vec_perm_le): Likewise.
312 2017-01-08  Jeff Law  <law@redhat.com>
314         PR rtl-optimizatin/81308
315         * tree-switch-conversion.c (cfg_altered): New file scoped static.
316         (process_switch): If group_case_labels makes a change, then set
317         cfg_altered.
318         (pass_convert_switch::execute): If a switch is converted, then
319         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
321         PR rtl-optimization/81308
322         * recog.c (split_all_insns): Conditionally cleanup the CFG after
323         splitting insns.
325 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
327         PR target/83663 - Revert r255946
328         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
329         generation for cases where splatting a value is not useful.
330         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
331         across a vec_duplicate and a paradoxical subreg forming a vector
332         mode to a vec_concat.
334 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
336         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
337         -march=armv8.3-a variants.
338         * config/arm/t-multilib: Likewise.
339         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
341 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
343         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
344         to generate rtl.
345         (cceq_ior_compare_complement): Give it a name so I can use it, and
346         change boolean_or_operator predicate to boolean_operator so it can
347         be used to generate a crand.
348         (eqne): New code iterator.
349         (bd/bd_neg): New code_attrs.
350         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
351         a single define_insn.
352         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
353         decrement (bdnzt/bdnzf/bdzt/bdzf).
354         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
355         with the new names of the branch decrement patterns, and added the
356         names of the branch decrement conditional patterns.
358 2018-01-08  Richard Biener  <rguenther@suse.de>
360         PR tree-optimization/83563
361         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
362         cache.
364 2018-01-08  Richard Biener  <rguenther@suse.de>
366         PR middle-end/83713
367         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
369 2018-01-08  Richard Biener  <rguenther@suse.de>
371         PR tree-optimization/83685
372         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
373         references to abnormals.
375 2018-01-08  Richard Biener  <rguenther@suse.de>
377         PR lto/83719
378         * dwarf2out.c (output_indirect_strings): Handle empty
379         skeleton_debug_str_hash.
380         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
382 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
384         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
385         (emit_store_direct): Likewise.
386         (arc_trampoline_adjust_address): Likewise.
387         (arc_asm_trampoline_template): New function.
388         (arc_initialize_trampoline): Use asm_trampoline_template.
389         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
390         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
391         * config/arc/arc.md (flush_icache): Delete pattern.
393 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
395         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
396         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
397         munaligned-access.
399 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
401         PR target/83681
402         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
403         by not USED_FOR_TARGET.
404         (make_pass_resolve_sw_modes): Likewise.
406 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
408         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
409         USED_FOR_TARGET.
411 2018-01-08  Richard Biener  <rguenther@suse.de>
413         PR middle-end/83580
414         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
416 2018-01-08  Richard Biener  <rguenther@suse.de>
418         PR middle-end/83517
419         * match.pd ((t * 2) / 2) -> t): Add missing :c.
421 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
423         PR middle-end/81897
424         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
425         basic blocks with a small number of successors.
426         (convert_control_dep_chain_into_preds): Improve handling of
427         forwarder blocks.
428         (dump_predicates): Split apart into...
429         (dump_pred_chain): ...here...
430         (dump_pred_info): ...and here.
431         (can_one_predicate_be_invalidated_p): Add debugging printfs.
432         (can_chain_union_be_invalidated_p): Improve check for invalidation
433         of paths.
434         (uninit_uses_cannot_happen): Avoid unnecessary if
435         convert_control_dep_chain_into_preds yielded nothing.
437 2018-01-06  Martin Sebor  <msebor@redhat.com>
439         PR tree-optimization/83640
440         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
441         subtracting negative offset from size.
442         (builtin_access::overlap): Adjust offset bounds of the access to fall
443         within the size of the object if possible.
445 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
447         PR rtl-optimization/83699
448         * expmed.c (extract_bit_field_1): Restrict the vector usage of
449         extract_bit_field_as_subreg to cases in which the extracted
450         value is also a vector.
452         * lra-constraints.c (process_alt_operands): Test for the equivalence
453         substitutions when detecting a possible reload cycle.
455 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
457         PR debug/83480
458         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
459         by default if flag_selective_schedling{,2}.  Formatting fixes.
461         PR rtl-optimization/83682
462         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
463         if it has non-VECTOR_MODE element mode.
464         (vec_duplicate_p): Likewise.
466         PR middle-end/83694
467         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
468         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
470 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
472         PR target/83604
473         * config/i386/i386-builtin.def
474         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
475         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
476         Require also OPTION_MASK_ISA_AVX512F in addition to
477         OPTION_MASK_ISA_GFNI.
478         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
479         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
480         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
481         to OPTION_MASK_ISA_GFNI.
482         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
483         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
484         OPTION_MASK_ISA_AVX512BW.
485         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
486         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
487         addition to OPTION_MASK_ISA_GFNI.
488         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
489         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
490         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
491         to OPTION_MASK_ISA_GFNI.
492         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
493         a requirement for all ISAs rather than any of them with a few
494         exceptions.
495         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
496         processing.
497         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
498         bitmasks to be enabled with 3 exceptions, instead of requiring any
499         enabled ISA with lots of exceptions.
500         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
501         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
502         Change avx512bw in isa attribute to avx512f.
503         * config/i386/sgxintrin.h: Add license boilerplate.
504         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
505         to __AVX512F__ and __AVX512VL to __AVX512VL__.
506         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
507         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
508         defined.
509         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
510         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
511         temporarily sse2 rather than sse if not enabled already.
513         PR target/83604
514         * config/i386/sse.md (VI248_VLBW): Rename to ...
515         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
516         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
517         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
518         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
519         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
520         mode iterator instead of VI248_VLBW.
522 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
524         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
525         (record_modified): Skip clobbers; add debug output.
526         (param_change_prob): Use sreal frequencies.
528 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
530         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
531         punt for user-aligned variables.
533 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
535         * tree-chrec.c (chrec_contains_symbols): Return true for
536         POLY_INT_CST.
538 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
540         PR target/82439
541         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
542         of (x|y) == x for BICS pattern.
544 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
546         PR tree-optimization/83605
547         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
548         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
549         can throw.
551 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
553         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
554         * config/epiphany/rtems.h: New file.
556 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
557             Uros Bizjak  <ubizjak@gmail.com>
559         PR target/83554
560         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
561         QIreg_operand instead of register_operand predicate.
562         * config/i386/i386.c (ix86_rop_should_change_byte_p,
563         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
564         comments instead of -fmitigate[-_]rop.
566 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
568         PR bootstrap/81926
569         * cgraphunit.c (symbol_table::compile): Switch to text_section
570         before calling assembly_start debug hook.
571         * run-rtl-passes.c (run_rtl_passes): Likewise.
572         Include output.h.
574 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
576         * tree-vrp.c (extract_range_from_binary_expr_1): Check
577         range_int_cst_p rather than !symbolic_range_p before calling
578         extract_range_from_multiplicative_op_1.
580 2017-01-04  Jeff Law  <law@redhat.com>
582         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
583         redundant test in assertion.
585 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
587         * doc/rtl.texi: Document machine_mode wrapper classes.
589 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
591         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
592         using tree_to_uhwi.
594 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
596         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
597         the VEC_PERM_EXPR fold to fail.
599 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
601         PR debug/83585
602         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
603         to switched_sections.
605 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
607         PR target/83680
608         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
609         test for d.testing.
611 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
613         PR target/83387
614         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
615         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
617 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
619         PR debug/83666
620         * cfgexpand.c (expand_dbeug_expr) <case BIT_FIELD_REF>: Punt if mode
621         is BLKmode and bitpos not zero or mode change is needed.
623 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
625         PR target/83675
626         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
627         TARGET_VIS2.
629 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
631         PR target/83628
632         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
633         instead of MULT rtx.  Update all corresponding splitters.
634         (*saddl_se): Ditto.
635         (*ssub<modesuffix>): Ditto.
636         (*ssubl_se): Ditto.
637         (*cmp_sadd_di): Update split patterns.
638         (*cmp_sadd_si): Ditto.
639         (*cmp_sadd_sidi): Ditto.
640         (*cmp_ssub_di): Ditto.
641         (*cmp_ssub_si): Ditto.
642         (*cmp_ssub_sidi): Ditto.
643         * config/alpha/predicates.md (const23_operand): New predicate.
644         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
645         Look for ASHIFT, not MULT inner operand.
646         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
648 2018-01-04  Martin Liska  <mliska@suse.cz>
650         PR gcov-profile/83669
651         * gcov.c (output_intermediate_file): Add version to intermediate
652         gcov file.
653         * doc/gcov.texi: Document new field 'version' in intermediate
654         file format. Fix location of '-k' option of gcov command.
656 2018-01-04  Martin Liska  <mliska@suse.cz>
658         PR ipa/82352
659         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
661 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
663         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
665 2018-01-03  Martin Sebor  <msebor@redhat.com>
667         PR tree-optimization/83655
668         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
669         checking calls with invalid arguments.
671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
673         * tree-vect-stmts.c (vect_get_store_rhs): New function.
674         (vectorizable_mask_load_store): Delete.
675         (vectorizable_call): Return false for masked loads and stores.
676         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
677         instead of gimple_assign_rhs1.
678         (vectorizable_load): Handle IFN_MASK_LOAD.
679         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
681 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
683         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
684         split out from..,
685         (vectorizable_mask_load_store): ...here.
686         (vectorizable_load): ...and here.
688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
690         * tree-vect-stmts.c (vect_build_all_ones_mask)
691         (vect_build_zero_merge_argument): New functions, split out from...
692         (vectorizable_load): ...here.
694 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
696         * tree-vect-stmts.c (vect_check_store_rhs): New function,
697         split out from...
698         (vectorizable_mask_load_store): ...here.
699         (vectorizable_store): ...and here.
701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
703         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
704         split out from...
705         (vectorizable_mask_load_store): ...here.
707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
709         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
710         (vect_model_store_cost): Take a vec_load_store_type instead of a
711         vect_def_type.
712         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
713         (vect_model_store_cost): Take a vec_load_store_type instead of a
714         vect_def_type.
715         (vectorizable_mask_load_store): Update accordingly.
716         (vectorizable_store): Likewise.
717         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
721         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
722         IFN_MASK_LOAD calls here rather than...
723         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
726             Alan Hayward  <alan.hayward@arm.com>
727             David Sherwood  <david.sherwood@arm.com>
729         * expmed.c (extract_bit_field_1): For vector extracts,
730         fall back to extract_bit_field_as_subreg if vec_extract
731         isn't available.
733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
734             Alan Hayward  <alan.hayward@arm.com>
735             David Sherwood  <david.sherwood@arm.com>
737         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
738         they are variable or constant sized.
739         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
740         slots for constant-sized data.
742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
743             Alan Hayward  <alan.hayward@arm.com>
744             David Sherwood  <david.sherwood@arm.com>
746         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
747         handling COND_EXPRs with boolean comparisons, try to find a better
748         basis for the mask type than the boolean itself.
750 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
752         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
753         is calculated and how it can be overridden.
754         * genmodes.c (max_bitsize_mode_any_mode): New variable.
755         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
756         if defined.
757         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
758         if nonzero.
760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
761             Alan Hayward  <alan.hayward@arm.com>
762             David Sherwood  <david.sherwood@arm.com>
764         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
765         Remove the mode argument.
766         (aarch64_simd_valid_immediate): Remove the mode and inverse
767         arguments.
768         * config/aarch64/iterators.md (bitsize): New iterator.
769         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
770         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
771         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
772         aarch64_simd_valid_immediate.
773         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
774         (aarch64_reg_or_bic_imm): Likewise.
775         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
776         with an insn_type enum and msl with a modifier_type enum.
777         Replace element_width with a scalar_mode.  Change the shift
778         to unsigned int.  Add constructors for scalar_float_mode and
779         scalar_int_mode elements.
780         (aarch64_vect_float_const_representable_p): Delete.
781         (aarch64_can_const_movi_rtx_p)
782         (aarch64_simd_scalar_immediate_valid_for_move)
783         (aarch64_simd_make_constant): Update call to
784         aarch64_simd_valid_immediate.
785         (aarch64_advsimd_valid_immediate_hs): New function.
786         (aarch64_advsimd_valid_immediate): Likewise.
787         (aarch64_simd_valid_immediate): Remove mode and inverse
788         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
789         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
790         and aarch64_float_const_representable_p on the result.
791         (aarch64_output_simd_mov_immediate): Remove mode argument.
792         Update call to aarch64_simd_valid_immediate and use of
793         simd_immediate_info.
794         (aarch64_output_scalar_simd_mov_immediate): Update call
795         accordingly.
797 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
798             Alan Hayward  <alan.hayward@arm.com>
799             David Sherwood  <david.sherwood@arm.com>
801         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
802         (mode_nunits): Likewise CONST_MODE_NUNITS.
803         * machmode.def (ADJUST_NUNITS): Document.
804         * genmodes.c (mode_data::need_nunits_adj): New field.
805         (blank_mode): Update accordingly.
806         (adj_nunits): New variable.
807         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
808         parameter.
809         (emit_mode_size_inline): Set need_bytesize_adj for all modes
810         listed in adj_nunits.
811         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
812         listed in adj_nunits.  Don't emit case statements for such modes.
813         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
814         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
815         nothing if adj_nunits is nonnull.
816         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
817         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
818         (emit_mode_fbit): Update use of print_maybe_const_decl.
819         (emit_move_size): Likewise.  Treat the array as non-const
820         if adj_nunits.
821         (emit_mode_adjustments): Handle adj_nunits.
823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
825         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
826         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
827         (VECTOR_MODES): Use it.
828         (make_vector_modes): Take the prefix as an argument.
830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
831             Alan Hayward  <alan.hayward@arm.com>
832             David Sherwood  <david.sherwood@arm.com>
834         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
835         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
836         for MODE_VECTOR_BOOL.
837         * machmode.def (VECTOR_BOOL_MODE): Document.
838         * genmodes.c (VECTOR_BOOL_MODE): New macro.
839         (make_vector_bool_mode): New function.
840         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
841         MODE_VECTOR_BOOL.
842         * lto-streamer-in.c (lto_input_mode_table): Likewise.
843         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
844         Likewise.
845         * stor-layout.c (int_mode_for_mode): Likewise.
846         * tree.c (build_vector_type_for_mode): Likewise.
847         * varasm.c (output_constant_pool_2): Likewise.
848         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
849         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
850         for MODE_VECTOR_BOOL.
851         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
852         of mode class checks.
853         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
854         instead of a list of mode class checks.
855         (expand_vector_scalar_condition): Likewise.
856         (type_for_widest_vector_mode): Handle BImode as an inner mode.
858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
859             Alan Hayward  <alan.hayward@arm.com>
860             David Sherwood  <david.sherwood@arm.com>
862         * machmode.h (mode_size): Change from unsigned short to
863         poly_uint16_pod.
864         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
865         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
866         or if measurement_type is not polynomial.
867         (fixed_size_mode::includes_p): Check for constant-sized modes.
868         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
869         return a poly_uint16 rather than an unsigned short.
870         (emit_mode_size): Change the type of mode_size from unsigned short
871         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
872         (emit_mode_adjustments): Cope with polynomial vector sizes.
873         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
874         for GET_MODE_SIZE.
875         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
876         for GET_MODE_SIZE.
877         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
878         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
879         * caller-save.c (setup_save_areas): Likewise.
880         (replace_reg_with_saved_mem): Likewise.
881         * calls.c (emit_library_call_value_1): Likewise.
882         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
883         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
884         (gen_lowpart_for_combine): Likewise.
885         * convert.c (convert_to_integer_1): Likewise.
886         * cse.c (equiv_constant, cse_insn): Likewise.
887         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
888         (cselib_subst_to_values): Likewise.
889         * dce.c (word_dce_process_block): Likewise.
890         * df-problems.c (df_word_lr_mark_ref): Likewise.
891         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
892         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
893         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
894         (rtl_for_decl_location): Likewise.
895         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
896         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
897         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
898         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
899         (expand_expr_real_1): Likewise.
900         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
901         (pad_below): Likewise.
902         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
903         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
904         * ira.c (get_subreg_tracking_sizes): Likewise.
905         * ira-build.c (ira_create_allocno_objects): Likewise.
906         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
907         (ira_sort_regnos_for_alter_reg): Likewise.
908         * ira-costs.c (record_operand_costs): Likewise.
909         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
910         (resolve_simple_move): Likewise.
911         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
912         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
913         (lra_constraints): Likewise.
914         (CONST_POOL_OK_P): Reject variable-sized modes.
915         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
916         (add_pseudo_to_slot, lra_spill): Likewise.
917         * omp-low.c (omp_clause_aligned_alignment): Likewise.
918         * optabs-query.c (get_best_extraction_insn): Likewise.
919         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
920         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
921         (expand_mult_highpart, valid_multiword_target_p): Likewise.
922         * recog.c (offsettable_address_addr_space_p): Likewise.
923         * regcprop.c (maybe_mode_change): Likewise.
924         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
925         * regrename.c (build_def_use): Likewise.
926         * regstat.c (dump_reg_info): Likewise.
927         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
928         (find_reloads, find_reloads_subreg_address): Likewise.
929         * reload1.c (eliminate_regs_1): Likewise.
930         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
931         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
932         (simplify_binary_operation_1, simplify_subreg): Likewise.
933         * targhooks.c (default_function_arg_padding): Likewise.
934         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
935         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
936         (verify_gimple_assign_ternary): Likewise.
937         * tree-inline.c (estimate_move_cost): Likewise.
938         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
939         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
940         (get_address_cost_ainc): Likewise.
941         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
942         (vect_supportable_dr_alignment): Likewise.
943         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
944         (vectorizable_reduction): Likewise.
945         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
946         (vectorizable_operation, vectorizable_load): Likewise.
947         * tree.c (build_same_sized_truth_vector_type): Likewise.
948         * valtrack.c (cleanup_auto_inc_dec): Likewise.
949         * var-tracking.c (emit_note_insn_var_location): Likewise.
950         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
951         (ADDR_VEC_ALIGN): Likewise.
953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
954             Alan Hayward  <alan.hayward@arm.com>
955             David Sherwood  <david.sherwood@arm.com>
957         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
958         unsigned short.
959         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
960         or if measurement_type is polynomial.
961         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
962         * combine.c (make_extraction): Likewise.
963         * dse.c (find_shift_sequence): Likewise.
964         * dwarf2out.c (mem_loc_descriptor): Likewise.
965         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
966         (extract_bit_field, extract_low_bits): Likewise.
967         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
968         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
969         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
970         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
971         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
972         * reload.c (find_reloads): Likewise.
973         * reload1.c (alter_reg): Likewise.
974         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
975         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
976         * tree-if-conv.c (predicate_mem_writes): Likewise.
977         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
978         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
979         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
980         * valtrack.c (dead_debug_insert_temp): Likewise.
981         * varasm.c (mergeable_constant_section): Likewise.
982         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
984 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
985             Alan Hayward  <alan.hayward@arm.com>
986             David Sherwood  <david.sherwood@arm.com>
988         * expr.c (expand_assignment): Cope with polynomial mode sizes
989         when assigning to a CONCAT.
991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
992             Alan Hayward  <alan.hayward@arm.com>
993             David Sherwood  <david.sherwood@arm.com>
995         * machmode.h (mode_precision): Change from unsigned short to
996         poly_uint16_pod.
997         (mode_to_precision): Return a poly_uint16 rather than an unsigned
998         short.
999         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
1000         or if measurement_type is not polynomial.
1001         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
1002         in which the mode is already known to be a scalar_int_mode.
1003         * genmodes.c (emit_mode_precision): Change the type of mode_precision
1004         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
1005         initializer.
1006         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
1007         for GET_MODE_PRECISION.
1008         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
1009         for GET_MODE_PRECISION.
1010         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
1011         as polynomial.
1012         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
1013         (expand_field_assignment, make_extraction): Likewise.
1014         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
1015         (get_last_value): Likewise.
1016         * convert.c (convert_to_integer_1): Likewise.
1017         * cse.c (cse_insn): Likewise.
1018         * expr.c (expand_expr_real_1): Likewise.
1019         * lra-constraints.c (simplify_operand_subreg): Likewise.
1020         * optabs-query.c (can_atomic_load_p): Likewise.
1021         * optabs.c (expand_atomic_load): Likewise.
1022         (expand_atomic_store): Likewise.
1023         * ree.c (combine_reaching_defs): Likewise.
1024         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
1025         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
1026         * tree.h (type_has_mode_precision_p): Likewise.
1027         * ubsan.c (instrument_si_overflow): Likewise.
1029 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1030             Alan Hayward  <alan.hayward@arm.com>
1031             David Sherwood  <david.sherwood@arm.com>
1033         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
1034         polynomial numbers of units.
1035         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
1036         (valid_vector_subparts_p): New function.
1037         (build_vector_type): Remove temporary shim and take the number
1038         of units as a poly_uint64 rather than an int.
1039         (build_opaque_vector_type): Take the number of units as a
1040         poly_uint64 rather than an int.
1041         * tree.c (build_vector_from_ctor): Handle polynomial
1042         TYPE_VECTOR_SUBPARTS.
1043         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
1044         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
1045         (build_vector_from_val): If the number of units is variable,
1046         use build_vec_duplicate_cst for constant operands and
1047         VEC_DUPLICATE_EXPR otherwise.
1048         (make_vector_type): Remove temporary is_constant ().
1049         (build_vector_type, build_opaque_vector_type): Take the number of
1050         units as a poly_uint64 rather than an int.
1051         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
1052         VECTOR_CST_NELTS.
1053         * cfgexpand.c (expand_debug_expr): Likewise.
1054         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
1055         (store_constructor, expand_expr_real_1): Likewise.
1056         (const_scalar_mask_from_tree): Likewise.
1057         * fold-const-call.c (fold_const_reduction): Likewise.
1058         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
1059         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
1060         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
1061         (fold_relational_const): Likewise.
1062         (native_interpret_vector): Likewise.  Change the size from an
1063         int to an unsigned int.
1064         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
1065         TYPE_VECTOR_SUBPARTS.
1066         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
1067         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
1068         duplicating a non-constant operand into a variable-length vector.
1069         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
1070         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
1071         * ipa-icf.c (sem_variable::equals): Likewise.
1072         * match.pd: Likewise.
1073         * omp-simd-clone.c (simd_clone_subparts): Likewise.
1074         * print-tree.c (print_node): Likewise.
1075         * stor-layout.c (layout_type): Likewise.
1076         * targhooks.c (default_builtin_vectorization_cost): Likewise.
1077         * tree-cfg.c (verify_gimple_comparison): Likewise.
1078         (verify_gimple_assign_binary): Likewise.
1079         (verify_gimple_assign_ternary): Likewise.
1080         (verify_gimple_assign_single): Likewise.
1081         * tree-pretty-print.c (dump_generic_node): Likewise.
1082         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
1083         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
1084         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
1085         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
1086         (vect_shift_permute_load_chain): Likewise.
1087         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
1088         (expand_vector_condition, optimize_vector_constructor): Likewise.
1089         (lower_vec_perm, get_compute_type): Likewise.
1090         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1091         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
1092         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
1093         (vect_recog_mask_conversion_pattern): Likewise.
1094         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
1095         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
1096         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1097         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
1098         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
1099         (vectorizable_shift, vectorizable_operation, vectorizable_store)
1100         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
1101         (supportable_widening_operation): Likewise.
1102         (supportable_narrowing_operation): Likewise.
1103         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
1104         Likewise.
1105         * varasm.c (output_constant): Likewise.
1107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1108             Alan Hayward  <alan.hayward@arm.com>
1109             David Sherwood  <david.sherwood@arm.com>
1111         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
1112         so that both the length == 3 and length != 3 cases set up their
1113         own permute vectors.  Add comments explaining why we know the
1114         number of elements is constant.
1115         (vect_permute_load_chain): Likewise.
1117 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1118             Alan Hayward  <alan.hayward@arm.com>
1119             David Sherwood  <david.sherwood@arm.com>
1121         * machmode.h (mode_nunits): Change from unsigned char to
1122         poly_uint16_pod.
1123         (ONLY_FIXED_SIZE_MODES): New macro.
1124         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
1125         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
1126         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
1127         New typedefs.
1128         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
1129         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
1130         or if measurement_type is not polynomial.
1131         * genmodes.c (ZERO_COEFFS): New macro.
1132         (emit_mode_nunits_inline): Make mode_nunits_inline return a
1133         poly_uint16.
1134         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
1135         Use ZERO_COEFFS when emitting initializers.
1136         * data-streamer.h (bp_pack_poly_value): New function.
1137         (bp_unpack_poly_value): Likewise.
1138         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
1139         for GET_MODE_NUNITS.
1140         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
1141         for GET_MODE_NUNITS.
1142         * tree.c (make_vector_type): Remove temporary shim and make
1143         the real function take the number of units as a poly_uint64
1144         rather than an int.
1145         (build_vector_type_for_mode): Handle polynomial nunits.
1146         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
1147         * emit-rtl.c (const_vec_series_p_1): Likewise.
1148         (gen_rtx_CONST_VECTOR): Likewise.
1149         * fold-const.c (test_vec_duplicate_folding): Likewise.
1150         * genrecog.c (validate_pattern): Likewise.
1151         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
1152         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
1153         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
1154         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
1155         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
1156         * rtlanal.c (subreg_get_info): Likewise.
1157         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
1158         (vect_grouped_load_supported): Likewise.
1159         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
1160         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
1161         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1162         (simplify_const_unary_operation, simplify_binary_operation_1)
1163         (simplify_const_binary_operation, simplify_ternary_operation)
1164         (test_vector_ops_duplicate, test_vector_ops): Likewise.
1165         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
1166         instead of CONST_VECTOR_NUNITS.
1167         * varasm.c (output_constant_pool_2): Likewise.
1168         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
1169         explicit-encoded elements in the XVEC for variable-length vectors.
1171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1173         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
1175 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1176             Alan Hayward  <alan.hayward@arm.com>
1177             David Sherwood  <david.sherwood@arm.com>
1179         * coretypes.h (fixed_size_mode): Declare.
1180         (fixed_size_mode_pod): New typedef.
1181         * builtins.h (target_builtins::x_apply_args_mode)
1182         (target_builtins::x_apply_result_mode): Change type to
1183         fixed_size_mode_pod.
1184         * builtins.c (apply_args_size, apply_result_size, result_vector)
1185         (expand_builtin_apply_args_1, expand_builtin_apply)
1186         (expand_builtin_return): Update accordingly.
1188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1190         * cse.c (hash_rtx_cb): Hash only the encoded elements.
1191         * cselib.c (cselib_hash_rtx): Likewise.
1192         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
1193         CONST_VECTOR encoding.
1195 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
1196             Jeff Law  <law@redhat.com>
1198         PR target/83641
1199         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
1200         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
1201         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
1202         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
1204         PR target/83641
1205         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
1206         explicitly probe *sp in a noreturn function if there were any callee
1207         register saves or frame pointer is needed.
1209 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1211         PR debug/83621
1212         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
1213         BLKmode for ternary, binary or unary expressions.
1215         PR debug/83645
1216         * var-tracking.c (delete_vta_debug_insn): New inline function.
1217         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
1218         insns from get_insns () to NULL instead of each bb separately.
1219         Use delete_vta_debug_insn.  No longer static.
1220         (vt_debug_insns_local, variable_tracking_main_1): Adjust
1221         delete_vta_debug_insns callers.
1222         * rtl.h (delete_vta_debug_insns): Declare.
1223         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
1224         instead of variable_tracking_main.
1226 2018-01-03  Martin Sebor  <msebor@redhat.com>
1228         PR tree-optimization/83603
1229         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
1230         arguments past the endof the argument list in functions declared
1231         without a prototype.
1232         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
1233         Avoid checking when arguments are null.
1235 2018-01-03  Martin Sebor  <msebor@redhat.com>
1237         PR c/83559
1238         * doc/extend.texi (attribute const): Fix a typo.
1239         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
1240         issuing -Wsuggest-attribute for void functions.
1242 2018-01-03  Martin Sebor  <msebor@redhat.com>
1244         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
1245         offset_int::from instead of wide_int::to_shwi.
1246         (maybe_diag_overlap): Remove assertion.
1247         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
1248         * gimple-ssa-sprintf.c (format_directive): Same.
1249         (parse_directive): Same.
1250         (sprintf_dom_walker::compute_format_length): Same.
1251         (try_substitute_return_value): Same.
1253 2017-01-03  Jeff Law  <law@redhat.com>
1255         PR middle-end/83654
1256         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
1257         non-constant residual for zero at runtime and avoid probing in
1258         that case.  Reorganize code for trailing problem to mirror handling
1259         of the residual.
1261 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1263         PR tree-optimization/83501
1264         * tree-ssa-strlen.c (get_string_cst): New.
1265         (handle_char_store): Call get_string_cst.
1267 2018-01-03  Martin Liska  <mliska@suse.cz>
1269         PR tree-optimization/83593
1270         * tree-ssa-strlen.c: Include tree-cfg.h.
1271         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
1272         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
1273         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
1274         to false.
1275         (strlen_dom_walker::before_dom_children): Call
1276         gimple_purge_dead_eh_edges. Dump tranformation with details
1277         dump flags.
1278         (strlen_dom_walker::before_dom_children): Update call by adding
1279         new argument cleanup_eh.
1280         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
1282 2018-01-03  Martin Liska  <mliska@suse.cz>
1284         PR ipa/83549
1285         * cif-code.def (VARIADIC_THUNK): New enum value.
1286         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
1287         thunks.
1289 2018-01-03  Jan Beulich  <jbeulich@suse.com>
1291         * sse.md (mov<mode>_internal): Tighten condition for when to use
1292         vmovdqu<ssescalarsize> for TI and OI modes.
1294 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1296         Update copyright years.
1298 2018-01-03  Martin Liska  <mliska@suse.cz>
1300         PR ipa/83594
1301         * ipa-visibility.c (function_and_variable_visibility): Skip
1302         functions with noipa attribure.
1304 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1306         * gcc.c (process_command): Update copyright notice dates.
1307         * gcov-dump.c (print_version): Ditto.
1308         * gcov.c (print_version): Ditto.
1309         * gcov-tool.c (print_version): Ditto.
1310         * gengtype.c (create_file): Ditto.
1311         * doc/cpp.texi: Bump @copying's copyright year.
1312         * doc/cppinternals.texi: Ditto.
1313         * doc/gcc.texi: Ditto.
1314         * doc/gccint.texi: Ditto.
1315         * doc/gcov.texi: Ditto.
1316         * doc/install.texi: Ditto.
1317         * doc/invoke.texi: Ditto.
1319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1321         * vector-builder.h (vector_builder::m_full_nelts): Change from
1322         unsigned int to poly_uint64.
1323         (vector_builder::full_nelts): Update prototype accordingly.
1324         (vector_builder::new_vector): Likewise.
1325         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
1326         (vector_builder::operator ==): Likewise.
1327         (vector_builder::finalize): Likewise.
1328         * int-vector-builder.h (int_vector_builder::int_vector_builder):
1329         Take the number of elements as a poly_uint64 rather than an
1330         unsigned int.
1331         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
1332         from unsigned int to poly_uint64.
1333         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
1334         (vec_perm_indices::new_vector): Likewise.
1335         (vec_perm_indices::length): Likewise.
1336         (vec_perm_indices::nelts_per_input): Likewise.
1337         (vec_perm_indices::input_nelts): Likewise.
1338         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
1339         number of elements per input as a poly_uint64 rather than an
1340         unsigned int.  Use the original encoding for variable-length
1341         vectors, rather than clamping each individual element.
1342         For the second and subsequent elements in each pattern,
1343         clamp the step and base before clamping their sum.
1344         (vec_perm_indices::series_p): Handle polynomial element counts.
1345         (vec_perm_indices::all_in_range_p): Likewise.
1346         (vec_perm_indices_to_tree): Likewise.
1347         (vec_perm_indices_to_rtx): Likewise.
1348         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
1349         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
1350         (tree_vector_builder::new_binary_operation): Handle polynomial
1351         element counts.  Return false if we need to know the number
1352         of elements at compile time.
1353         * fold-const.c (fold_vec_perm): Punt if the number of elements
1354         isn't known at compile time.
1356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1358         * vec-perm-indices.h (vec_perm_builder): Change element type
1359         from HOST_WIDE_INT to poly_int64.
1360         (vec_perm_indices::element_type): Update accordingly.
1361         (vec_perm_indices::clamp): Handle polynomial element_types.
1362         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
1363         (vec_perm_indices::all_in_range_p): Likewise.
1364         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
1365         than shwi trees.
1366         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
1367         polynomial vec_perm_indices element types.
1368         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
1369         * fold-const.c (fold_vec_perm): Likewise.
1370         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
1371         * tree-vect-generic.c (lower_vec_perm): Likewise.
1372         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
1373         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
1374         element type to HOST_WIDE_INT.
1376 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1377             Alan Hayward  <alan.hayward@arm.com>
1378             David Sherwood  <david.sherwood@arm.com>
1380         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
1381         rather than an int.  Use plus_constant.
1382         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
1383         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
1385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1386             Alan Hayward  <alan.hayward@arm.com>
1387             David Sherwood  <david.sherwood@arm.com>
1389         * calls.c (emit_call_1, expand_call): Change struct_value_size from
1390         a HOST_WIDE_INT to a poly_int64.
1392 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1393             Alan Hayward  <alan.hayward@arm.com>
1394             David Sherwood  <david.sherwood@arm.com>
1396         * calls.c (load_register_parameters): Cope with polynomial
1397         mode sizes.  Require a constant size for BLKmode parameters
1398         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
1399         forces a parameter to be padded at the lsb end in order to
1400         fill a complete number of words, require the parameter size
1401         to be ordered wrt UNITS_PER_WORD.
1403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1404             Alan Hayward  <alan.hayward@arm.com>
1405             David Sherwood  <david.sherwood@arm.com>
1407         * reload1.c (spill_stack_slot_width): Change element type
1408         from unsigned int to poly_uint64_pod.
1409         (alter_reg): Treat mode sizes as polynomial.
1411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1412             Alan Hayward  <alan.hayward@arm.com>
1413             David Sherwood  <david.sherwood@arm.com>
1415         * reload.c (complex_word_subreg_p): New function.
1416         (reload_inner_reg_of_subreg, push_reload): Use it.
1418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1419             Alan Hayward  <alan.hayward@arm.com>
1420             David Sherwood  <david.sherwood@arm.com>
1422         * lra-constraints.c (process_alt_operands): Reject matched
1423         operands whose sizes aren't ordered.
1424         (match_reload): Refer to this check here.
1426 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1427             Alan Hayward  <alan.hayward@arm.com>
1428             David Sherwood  <david.sherwood@arm.com>
1430         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
1431         that the mode size is in the set {1, 2, 4, 8, 16}.
1433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1434             Alan Hayward  <alan.hayward@arm.com>
1435             David Sherwood  <david.sherwood@arm.com>
1437         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
1438         Use plus_constant instead of gen_rtx_PLUS.
1440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1441             Alan Hayward  <alan.hayward@arm.com>
1442             David Sherwood  <david.sherwood@arm.com>
1444         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
1445         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
1446         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
1447         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
1448         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
1449         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
1450         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
1451         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
1452         * config/i386/i386.c (ix86_push_rounding): ...this new function.
1453         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
1454         a poly_int64.
1455         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
1456         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
1457         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
1458         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
1459         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
1460         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
1461         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
1462         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
1463         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
1464         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
1465         function.
1466         * expr.c (emit_move_resolve_push): Treat the input and result
1467         of PUSH_ROUNDING as a poly_int64.
1468         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
1469         (emit_push_insn): Likewise.
1470         * lra-eliminations.c (mark_not_eliminable): Likewise.
1471         * recog.c (push_operand): Likewise.
1472         * reload1.c (elimination_effects): Likewise.
1473         * rtlanal.c (nonzero_bits1): Likewise.
1474         * calls.c (store_one_arg): Likewise.  Require the padding to be
1475         known at compile time.
1477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1478             Alan Hayward  <alan.hayward@arm.com>
1479             David Sherwood  <david.sherwood@arm.com>
1481         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
1482         Use plus_constant instead of gen_rtx_PLUS.
1484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1485             Alan Hayward  <alan.hayward@arm.com>
1486             David Sherwood  <david.sherwood@arm.com>
1488         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
1489         rather than an int.
1491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1492             Alan Hayward  <alan.hayward@arm.com>
1493             David Sherwood  <david.sherwood@arm.com>
1495         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
1496         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
1497         via stack temporaries.  Treat the mode size as polynomial too.
1499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1500             Alan Hayward  <alan.hayward@arm.com>
1501             David Sherwood  <david.sherwood@arm.com>
1503         * expr.c (expand_expr_real_2): When handling conversions involving
1504         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
1505         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
1506         as a poly_uint64 too.
1508 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1509             Alan Hayward  <alan.hayward@arm.com>
1510             David Sherwood  <david.sherwood@arm.com>
1512         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
1514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1515             Alan Hayward  <alan.hayward@arm.com>
1516             David Sherwood  <david.sherwood@arm.com>
1518         * combine.c (can_change_dest_mode): Handle polynomial
1519         REGMODE_NATURAL_SIZE.
1520         * expmed.c (store_bit_field_1): Likewise.
1521         * expr.c (store_constructor): Likewise.
1522         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
1523         and polynomial REGMODE_NATURAL_SIZE.
1524         (gen_lowpart_common): Likewise.
1525         * reginfo.c (record_subregs_of_mode): Likewise.
1526         * rtlanal.c (read_modify_subreg_p): Likewise.
1528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1529             Alan Hayward  <alan.hayward@arm.com>
1530             David Sherwood  <david.sherwood@arm.com>
1532         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
1533         numbers of elements.
1535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1536             Alan Hayward  <alan.hayward@arm.com>
1537             David Sherwood  <david.sherwood@arm.com>
1539         * match.pd: Cope with polynomial numbers of vector elements.
1541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1542             Alan Hayward  <alan.hayward@arm.com>
1543             David Sherwood  <david.sherwood@arm.com>
1545         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
1546         in a POINTER_PLUS_EXPR.
1548 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1549             Alan Hayward  <alan.hayward@arm.com>
1550             David Sherwood  <david.sherwood@arm.com>
1552         * omp-simd-clone.c (simd_clone_subparts): New function.
1553         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
1554         (ipa_simd_modify_function_body): Likewise.
1556 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1557             Alan Hayward  <alan.hayward@arm.com>
1558             David Sherwood  <david.sherwood@arm.com>
1560         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
1561         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
1562         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
1563         (expand_vector_condition, vector_element): Likewise.
1564         (subparts_gt): New function.
1565         (get_compute_type): Use subparts_gt.
1566         (count_type_subparts): Delete.
1567         (expand_vector_operations_1): Use subparts_gt instead of
1568         count_type_subparts.
1570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1571             Alan Hayward  <alan.hayward@arm.com>
1572             David Sherwood  <david.sherwood@arm.com>
1574         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
1575         (vect_compile_time_alias): ...this new function.  Do the calculation
1576         on poly_ints rather than trees.
1577         (vect_prune_runtime_alias_test_list): Update call accordingly.
1579 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1580             Alan Hayward  <alan.hayward@arm.com>
1581             David Sherwood  <david.sherwood@arm.com>
1583         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
1584         numbers of units.
1585         (vect_schedule_slp_instance): Likewise.
1587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1588             Alan Hayward  <alan.hayward@arm.com>
1589             David Sherwood  <david.sherwood@arm.com>
1591         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
1592         constant and extern definitions for variable-length vectors.
1593         (vect_get_constant_vectors): Note that the number of units
1594         is known to be constant.
1596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1597             Alan Hayward  <alan.hayward@arm.com>
1598             David Sherwood  <david.sherwood@arm.com>
1600         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
1601         of units as polynomial.  Choose between WIDE and NARROW based
1602         on multiple_p.
1604 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1605             Alan Hayward  <alan.hayward@arm.com>
1606             David Sherwood  <david.sherwood@arm.com>
1608         * tree-vect-stmts.c (simd_clone_subparts): New function.
1609         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
1611 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1612             Alan Hayward  <alan.hayward@arm.com>
1613             David Sherwood  <david.sherwood@arm.com>
1615         * tree-vect-stmts.c (vectorizable_call): Treat the number of
1616         vectors as polynomial.  Use build_index_vector for
1617         IFN_GOMP_SIMD_LANE.
1619 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1620             Alan Hayward  <alan.hayward@arm.com>
1621             David Sherwood  <david.sherwood@arm.com>
1623         * tree-vect-stmts.c (get_load_store_type): Treat the number of
1624         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
1625         for variable-length vectors.
1626         (vectorizable_mask_load_store): Treat the number of units as
1627         polynomial, asserting that it is constant if the condition has
1628         already been enforced.
1629         (vectorizable_store, vectorizable_load): Likewise.
1631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1632             Alan Hayward  <alan.hayward@arm.com>
1633             David Sherwood  <david.sherwood@arm.com>
1635         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
1636         of units as polynomial.  Punt if we can't tell at compile time
1637         which vector contains the final result.
1639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1640             Alan Hayward  <alan.hayward@arm.com>
1641             David Sherwood  <david.sherwood@arm.com>
1643         * tree-vect-loop.c (vectorizable_induction): Treat the number
1644         of units as polynomial.  Punt on SLP inductions.  Use an integer
1645         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
1646         cast of such a series for variable-length floating-point
1647         reductions.
1649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1650             Alan Hayward  <alan.hayward@arm.com>
1651             David Sherwood  <david.sherwood@arm.com>
1653         * tree.h (build_index_vector): Declare.
1654         * tree.c (build_index_vector): New function.
1655         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
1656         of units as polynomial, forcibly converting it to a constant if
1657         vectorizable_reduction has already enforced the condition.
1658         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
1659         to create a {1,2,3,...} vector.
1660         (vectorizable_reduction): Treat the number of units as polynomial.
1661         Choose vectype_in based on the largest scalar element size rather
1662         than the smallest number of units.  Enforce the restrictions
1663         relied on above.
1665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1666             Alan Hayward  <alan.hayward@arm.com>
1667             David Sherwood  <david.sherwood@arm.com>
1669         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
1670         number of units as polynomial.
1672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1673             Alan Hayward  <alan.hayward@arm.com>
1674             David Sherwood  <david.sherwood@arm.com>
1676         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
1677         * target.def (autovectorize_vector_sizes): Return the vector sizes
1678         by pointer, using vector_sizes rather than a bitmask.
1679         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
1680         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
1681         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
1682         Likewise.
1683         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
1684         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
1685         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
1686         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
1687         * omp-general.c (omp_max_vf): Likewise.
1688         * omp-low.c (omp_clause_aligned_alignment): Likewise.
1689         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
1690         * tree-vect-loop.c (vect_analyze_loop): Likewise.
1691         * tree-vect-slp.c (vect_slp_bb): Likewise.
1692         * doc/tm.texi: Regenerate.
1693         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
1694         to a poly_uint64.
1695         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
1696         the vector size as a poly_uint64 rather than an unsigned int.
1697         (current_vector_size): Change from an unsigned int to a poly_uint64.
1698         (get_vectype_for_scalar_type): Update accordingly.
1699         * tree.h (build_truth_vector_type): Take the size and number of
1700         units as a poly_uint64 rather than an unsigned int.
1701         (build_vector_type): Add a temporary overload that takes
1702         the number of units as a poly_uint64 rather than an unsigned int.
1703         * tree.c (make_vector_type): Likewise.
1704         (build_truth_vector_type): Take the number of units as a poly_uint64
1705         rather than an unsigned int.
1707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1708             Alan Hayward  <alan.hayward@arm.com>
1709             David Sherwood  <david.sherwood@arm.com>
1711         * target.def (get_mask_mode): Take the number of units and length
1712         as poly_uint64s rather than unsigned ints.
1713         * targhooks.h (default_get_mask_mode): Update accordingly.
1714         * targhooks.c (default_get_mask_mode): Likewise.
1715         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
1716         * doc/tm.texi: Regenerate.
1718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1719             Alan Hayward  <alan.hayward@arm.com>
1720             David Sherwood  <david.sherwood@arm.com>
1722         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
1723         * omp-general.c (omp_max_vf): Likewise.
1724         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
1725         (expand_omp_simd): Handle polynomial safelen.
1726         * omp-low.c (omplow_simd_context): Add a default constructor.
1727         (omplow_simd_context::max_vf): Change from int to poly_uint64.
1728         (lower_rec_simd_input_clauses): Update accordingly.
1729         (lower_rec_input_clauses): Likewise.
1731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1732             Alan Hayward  <alan.hayward@arm.com>
1733             David Sherwood  <david.sherwood@arm.com>
1735         * tree-vectorizer.h (vect_nunits_for_cost): New function.
1736         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
1737         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
1738         (vect_analyze_slp_cost): Likewise.
1739         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
1740         (vect_model_load_cost): Likewise.
1742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1743             Alan Hayward  <alan.hayward@arm.com>
1744             David Sherwood  <david.sherwood@arm.com>
1746         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
1747         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
1748         from an unsigned int * to a poly_uint64_pod *.
1749         (calculate_unrolling_factor): New function.
1750         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
1752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1753             Alan Hayward  <alan.hayward@arm.com>
1754             David Sherwood  <david.sherwood@arm.com>
1756         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
1757         from an unsigned int to a poly_uint64.
1758         (_loop_vec_info::slp_unrolling_factor): Likewise.
1759         (_loop_vec_info::vectorization_factor): Change from an int
1760         to a poly_uint64.
1761         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
1762         (vect_get_num_vectors): New function.
1763         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
1764         (vect_get_num_copies): Use vect_get_num_vectors.
1765         (vect_analyze_data_ref_dependences): Change max_vf from an int *
1766         to an unsigned int *.
1767         (vect_analyze_data_refs): Change min_vf from an int * to a
1768         poly_uint64 *.
1769         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
1770         than an unsigned HOST_WIDE_INT.
1771         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1772         (vect_analyze_data_ref_dependence): Change max_vf from an int *
1773         to an unsigned int *.
1774         (vect_analyze_data_ref_dependences): Likewise.
1775         (vect_compute_data_ref_alignment): Handle polynomial vf.
1776         (vect_enhance_data_refs_alignment): Likewise.
1777         (vect_prune_runtime_alias_test_list): Likewise.
1778         (vect_shift_permute_load_chain): Likewise.
1779         (vect_supportable_dr_alignment): Likewise.
1780         (dependence_distance_ge_vf): Take the vectorization factor as a
1781         poly_uint64 rather than an unsigned HOST_WIDE_INT.
1782         (vect_analyze_data_refs): Change min_vf from an int * to a
1783         poly_uint64 *.
1784         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
1785         vfm1 as a poly_uint64 rather than an int.  Make the same change
1786         for the returned bound_scalar.
1787         (vect_gen_vector_loop_niters): Handle polynomial vf.
1788         (vect_do_peeling): Likewise.  Update call to
1789         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
1790         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
1791         be constant.
1792         * tree-vect-loop.c (vect_determine_vectorization_factor)
1793         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
1794         (vect_get_known_peeling_cost): Likewise.
1795         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
1796         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
1797         (vect_transform_loop): Likewise.  Use the lowest possible VF when
1798         updating the upper bounds of the loop.
1799         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
1800         rather than an int.
1801         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
1802         polynomial unroll factors.
1803         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
1804         (vect_make_slp_decision): Likewise.
1805         (vect_supported_load_permutation_p): Likewise, and polynomial
1806         vf too.
1807         (vect_analyze_slp_cost): Handle polynomial vf.
1808         (vect_slp_analyze_node_operations): Likewise.
1809         (vect_slp_analyze_bb_1): Likewise.
1810         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
1811         than an unsigned HOST_WIDE_INT.
1812         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
1813         (vectorizable_load): Handle polynomial vf.
1814         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
1815         a poly_uint64.
1816         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
1818 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1819             Alan Hayward  <alan.hayward@arm.com>
1820             David Sherwood  <david.sherwood@arm.com>
1822         * match.pd: Handle bit operations involving three constants
1823         and try to fold one pair.
1825 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1827         * tree-vect-loop-manip.c: Include gimple-fold.h.
1828         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
1829         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
1830         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
1831         Add a path that uses a step of VF instead of 1, but disable it
1832         for now.
1833         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
1834         and niters_no_overflow parameters.  Update calls to
1835         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
1836         Create a new SSA name if the latter choses to use a ste other
1837         than zero, and return it via niters_vector_mult_vf_var.
1838         * tree-vect-loop.c (vect_transform_loop): Update calls to
1839         vect_do_peeling, vect_gen_vector_loop_niters and
1840         slpeel_make_loop_iterate_ntimes.
1841         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
1842         (vect_gen_vector_loop_niters): Update declarations after above changes.
1844 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
1846         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
1847         128-bit round to integer instructions.
1848         (ceil<mode>2): Likewise.
1849         (btrunc<mode>2): Likewise.
1850         (round<mode>2): Likewise.
1852 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
1854         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
1855         unaligned VSX load/store on P8/P9.
1856         (expand_block_clear): Allow the use of unaligned VSX
1857         load/store on P8/P9.
1859 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1861         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
1862         New function.
1863         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
1864         swap associated with both a load and a store.
1866 2018-01-02  Andrew Waterman  <andrew@sifive.com>
1868         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
1869         * config/riscv/riscv.md (clear_cache): Use it.
1871 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
1873         * web.c: Remove out-of-date comment.
1875 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1877         * expr.c (fixup_args_size_notes): Check that any existing
1878         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
1879         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
1880         (emit_single_push_insn): ...here.
1882 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1884         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
1885         (const_vector_encoded_nelts): New function.
1886         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
1887         (const_vector_int_elt, const_vector_elt): Declare.
1888         * emit-rtl.c (const_vector_int_elt_1): New function.
1889         (const_vector_elt): Likewise.
1890         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
1891         of CONST_VECTOR_ELT.
1893 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1895         * expr.c: Include rtx-vector-builder.h.
1896         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
1897         directly on the tree encoding.
1898         (const_vector_from_tree): Likewise.
1899         * optabs.c: Include rtx-vector-builder.h.
1900         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
1901         sequence of "u" values.
1902         * vec-perm-indices.c: Include rtx-vector-builder.h.
1903         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
1904         directly on the vec_perm_indices encoding.
1906 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1908         * doc/rtl.texi (const_vector): Describe new encoding scheme.
1909         * Makefile.in (OBJS): Add rtx-vector-builder.o.
1910         * rtx-vector-builder.h: New file.
1911         * rtx-vector-builder.c: Likewise.
1912         * rtl.h (rtx_def::u2): Add a const_vector field.
1913         (CONST_VECTOR_NPATTERNS): New macro.
1914         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
1915         (CONST_VECTOR_DUPLICATE_P): Likewise.
1916         (CONST_VECTOR_STEPPED_P): Likewise.
1917         (CONST_VECTOR_ENCODED_ELT): Likewise.
1918         (const_vec_duplicate_p): Check for a duplicated vector encoding.
1919         (unwrap_const_vec_duplicate): Likewise.
1920         (const_vec_series_p): Check for a non-duplicated vector encoding.
1921         Say that the function only returns true for integer vectors.
1922         * emit-rtl.c: Include rtx-vector-builder.h.
1923         (gen_const_vec_duplicate_1): Delete.
1924         (gen_const_vector): Call gen_const_vec_duplicate instead of
1925         gen_const_vec_duplicate_1.
1926         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
1927         (gen_const_vec_duplicate): Use rtx_vector_builder.
1928         (gen_const_vec_series): Likewise.
1929         (gen_rtx_CONST_VECTOR): Likewise.
1930         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
1931         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
1932         Build a new vector rather than modifying a CONST_VECTOR in-place.
1933         (handle_special_swappables): Update call accordingly.
1934         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
1935         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
1936         Build a new vector rather than modifying a CONST_VECTOR in-place.
1937         (handle_special_swappables): Update call accordingly.
1939 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1941         * simplify-rtx.c (simplify_const_binary_operation): Use
1942         CONST_VECTOR_ELT instead of XVECEXP.
1944 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1946         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
1947         the selector elements to be different from the data elements
1948         if the selector is a VECTOR_CST.
1949         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
1950         ssizetype for the selector.
1952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1954         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
1955         before testing each element individually.
1956         * tree-vect-generic.c (lower_vec_perm): Likewise.
1958 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1960         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
1961         * selftest-run-tests.c (selftest::run_tests): Call it.
1962         * vector-builder.h (vector_builder::operator ==): New function.
1963         (vector_builder::operator !=): Likewise.
1964         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
1965         (vec_perm_indices::all_from_input_p): New function.
1966         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
1967         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
1968         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
1969         instead of reading the VECTOR_CST directly.  Detect whether both
1970         vector inputs are the same before constructing the vec_perm_indices,
1971         and update the number of inputs argument accordingly.  Use the
1972         utility functions added above.  Only construct sel2 if we need to.
1974 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1976         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
1977         the broadcast of the low byte.
1978         (expand_mult_highpart): Use an explicit encoding for the permutes.
1979         * optabs-query.c (can_mult_highpart_p): Likewise.
1980         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
1981         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
1982         (vectorizable_bswap): Likewise.
1983         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
1984         explicit encoding for the power-of-2 permutes.
1985         (vect_permute_store_chain): Likewise.
1986         (vect_grouped_load_supported): Likewise.
1987         (vect_permute_load_chain): Likewise.
1989 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
1991         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
1992         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
1993         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
1994         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
1995         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
1996         (vect_gen_perm_mask_any): Likewise.
1998 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2000         * int-vector-builder.h: New file.
2001         * vec-perm-indices.h: Include int-vector-builder.h.
2002         (vec_perm_indices): Redefine as an int_vector_builder.
2003         (auto_vec_perm_indices): Delete.
2004         (vec_perm_builder): Redefine as a stand-alone class.
2005         (vec_perm_indices::vec_perm_indices): New function.
2006         (vec_perm_indices::clamp): Likewise.
2007         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
2008         (vec_perm_indices::new_vector): New function.
2009         (vec_perm_indices::new_expanded_vector): Update for new
2010         vec_perm_indices class.
2011         (vec_perm_indices::rotate_inputs): New function.
2012         (vec_perm_indices::all_in_range_p): Operate directly on the
2013         encoded form, without computing elided elements.
2014         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
2015         encoding.  Update for new vec_perm_indices class.
2016         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
2017         the given vec_perm_builder.
2018         (expand_vec_perm_var): Update vec_perm_builder constructor.
2019         (expand_mult_highpart): Use vec_perm_builder instead of
2020         auto_vec_perm_indices.
2021         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
2022         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
2023         or double series encoding as appropriate.
2024         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
2025         vec_perm_indices instead of auto_vec_perm_indices.
2026         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
2027         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
2028         (vect_permute_store_chain): Likewise.
2029         (vect_grouped_load_supported): Likewise.
2030         (vect_permute_load_chain): Likewise.
2031         (vect_shift_permute_load_chain): Likewise.
2032         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
2033         (vect_transform_slp_perm_load): Likewise.
2034         (vect_schedule_slp_instance): Likewise.
2035         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
2036         (vectorizable_mask_load_store): Likewise.
2037         (vectorizable_bswap): Likewise.
2038         (vectorizable_store): Likewise.
2039         (vectorizable_load): Likewise.
2040         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
2041         vec_perm_indices instead of auto_vec_perm_indices.  Use
2042         tree_to_vec_perm_builder to read the vector from a tree.
2043         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
2044         vec_perm_builder instead of a vec_perm_indices.
2045         (have_whole_vector_shift): Use vec_perm_builder and
2046         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
2047         truncation to calc_vec_perm_mask_for_shift.
2048         (vect_create_epilog_for_reduction): Likewise.
2049         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
2050         from auto_vec_perm_indices to vec_perm_indices.
2051         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
2052         instead of changing individual elements.
2053         (aarch64_vectorize_vec_perm_const): Use new_vector to install
2054         the vector in d.perm.
2055         * config/arm/arm.c (expand_vec_perm_d::perm): Change
2056         from auto_vec_perm_indices to vec_perm_indices.
2057         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
2058         instead of changing individual elements.
2059         (arm_vectorize_vec_perm_const): Use new_vector to install
2060         the vector in d.perm.
2061         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
2062         Update vec_perm_builder constructor.
2063         (rs6000_expand_interleave): Likewise.
2064         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
2065         (rs6000_expand_interleave): Likewise.
2067 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2069         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
2070         to qimode could truncate the indices.
2071         * optabs.c (expand_vec_perm_var): Likewise.
2073 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2075         * Makefile.in (OBJS): Add vec-perm-indices.o.
2076         * vec-perm-indices.h: New file.
2077         * vec-perm-indices.c: Likewise.
2078         * target.h (vec_perm_indices): Replace with a forward class
2079         declaration.
2080         (auto_vec_perm_indices): Move to vec-perm-indices.h.
2081         * optabs.h: Include vec-perm-indices.h.
2082         (expand_vec_perm): Delete.
2083         (selector_fits_mode_p, expand_vec_perm_var): Declare.
2084         (expand_vec_perm_const): Declare.
2085         * target.def (vec_perm_const_ok): Replace with...
2086         (vec_perm_const): ...this new hook.
2087         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
2088         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
2089         * doc/tm.texi: Regenerate.
2090         * optabs.def (vec_perm_const): Delete.
2091         * doc/md.texi (vec_perm_const): Likewise.
2092         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
2093         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
2094         expand_vec_perm for constant permutation vectors.  Assert that
2095         the mode of variable permutation vectors is the integer equivalent
2096         of the mode that is being permuted.
2097         * optabs-query.h (selector_fits_mode_p): Declare.
2098         * optabs-query.c: Include vec-perm-indices.h.
2099         (selector_fits_mode_p): New function.
2100         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
2101         is defined, instead of checking whether the vec_perm_const_optab
2102         exists.  Use targetm.vectorize.vec_perm_const instead of
2103         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
2104         fit in the vector mode before using a variable permute.
2105         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
2106         vec_perm_indices instead of an rtx.
2107         (expand_vec_perm): Replace with...
2108         (expand_vec_perm_const): ...this new function.  Take the selector
2109         as a vec_perm_indices rather than an rtx.  Also take the mode of
2110         the selector.  Update call to shift_amt_for_vec_perm_mask.
2111         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
2112         Use vec_perm_indices::new_expanded_vector to expand the original
2113         selector into bytes.  Check whether the indices fit in the vector
2114         mode before using a variable permute.
2115         (expand_vec_perm_var): Make global.
2116         (expand_mult_highpart): Use expand_vec_perm_const.
2117         * fold-const.c: Includes vec-perm-indices.h.
2118         * tree-ssa-forwprop.c: Likewise.
2119         * tree-vect-data-refs.c: Likewise.
2120         * tree-vect-generic.c: Likewise.
2121         * tree-vect-loop.c: Likewise.
2122         * tree-vect-slp.c: Likewise.
2123         * tree-vect-stmts.c: Likewise.
2124         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
2125         Delete.
2126         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
2127         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
2128         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
2129         (aarch64_vectorize_vec_perm_const): ...this new function.
2130         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2131         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2132         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
2133         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
2134         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2135         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2136         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
2137         into...
2138         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
2139         check for NEON modes.
2140         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
2141         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
2142         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
2143         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
2144         into...
2145         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
2146         the old VEC_PERM_CONST conditions.
2147         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
2148         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
2149         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
2150         (ia64_vectorize_vec_perm_const_ok): Merge into...
2151         (ia64_vectorize_vec_perm_const): ...this new function.
2152         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
2153         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
2154         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
2155         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
2156         * config/mips/mips.c (mips_expand_vec_perm_const)
2157         (mips_vectorize_vec_perm_const_ok): Merge into...
2158         (mips_vectorize_vec_perm_const): ...this new function.
2159         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
2160         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
2161         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
2162         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
2163         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
2164         (rs6000_expand_vec_perm_const): Delete.
2165         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
2166         Delete.
2167         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2168         (altivec_expand_vec_perm_const_le): Take each operand individually.
2169         Operate on constant selectors rather than rtxes.
2170         (altivec_expand_vec_perm_const): Likewise.  Update call to
2171         altivec_expand_vec_perm_const_le.
2172         (rs6000_expand_vec_perm_const): Delete.
2173         (rs6000_vectorize_vec_perm_const_ok): Delete.
2174         (rs6000_vectorize_vec_perm_const): New function.
2175         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
2176         an element count and rtx array.
2177         (rs6000_expand_extract_even): Update call accordingly.
2178         (rs6000_expand_interleave): Likewise.
2179         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
2180         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
2181         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
2182         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
2183         (rs6000_expand_vec_perm_const): Delete.
2184         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
2185         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2186         (altivec_expand_vec_perm_const_le): Take each operand individually.
2187         Operate on constant selectors rather than rtxes.
2188         (altivec_expand_vec_perm_const): Likewise.  Update call to
2189         altivec_expand_vec_perm_const_le.
2190         (rs6000_expand_vec_perm_const): Delete.
2191         (rs6000_vectorize_vec_perm_const_ok): Delete.
2192         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
2193         reference to the SPE evmerge intructions.
2194         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
2195         an element count and rtx array.
2196         (rs6000_expand_extract_even): Update call accordingly.
2197         (rs6000_expand_interleave): Likewise.
2198         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
2199         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
2200         new function.
2201         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2203 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2205         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
2206         vector mode and that that mode matches the mode of the data
2207         being permuted.
2208         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
2209         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
2210         directly using expand_vec_perm_1 when forcing selectors into
2211         registers.
2212         (expand_vec_perm_var): New function, split out from expand_vec_perm.
2214 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2216         * optabs-query.h (can_vec_perm_p): Delete.
2217         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
2218         * optabs-query.c (can_vec_perm_p): Split into...
2219         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
2220         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
2221         particular selector is valid.
2222         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
2223         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
2224         (vect_grouped_load_supported): Likewise.
2225         (vect_shift_permute_load_chain): Likewise.
2226         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
2227         (vect_transform_slp_perm_load): Likewise.
2228         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
2229         (vectorizable_bswap): Likewise.
2230         (vect_gen_perm_mask_checked): Likewise.
2231         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
2232         implementations of variable permutation vectors into account
2233         when deciding which selector to use.
2234         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
2235         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
2236         with a false third argument.
2237         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
2238         to test whether the constant selector is valid and can_vec_perm_var_p
2239         to test whether a variable selector is valid.
2241 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2243         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
2244         * optabs-query.c (can_vec_perm_p): Likewise.
2245         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
2246         instead of vec_perm_indices.
2247         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
2248         (vect_gen_perm_mask_checked): Likewise,
2249         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
2250         (vect_gen_perm_mask_checked): Likewise,
2252 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
2254         * optabs-query.h (qimode_for_vec_perm): Declare.
2255         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
2256         (qimode_for_vec_perm): ...this new function.
2257         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
2259 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
2261         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
2262         does not have a conditional at the top.
2264 2018-01-02  Richard Biener  <rguenther@suse.de>
2266         * ipa-inline.c (big_speedup_p): Fix expression.
2268 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
2270         PR target/81616
2271         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
2272         for generic 4->6.
2274 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
2276         PR target/81616
2277         Generic tuning.
2278         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
2279         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
2280         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
2281         cond_taken_branch_cost 3->4.
2283 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
2285         PR tree-optimization/83581
2286         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
2287         TODO_cleanup_cfg if any changes have been made.
2289         PR middle-end/83608
2290         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
2291         convert_modes if target mode has the right side, but different mode
2292         class.
2294         PR middle-end/83609
2295         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
2296         last argument when extracting from CONCAT.  If either from_real or
2297         from_imag is NULL, use expansion through memory.  If result is not
2298         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
2299         the parts directly to inner mode, if even that fails, use expansion
2300         through memory.
2302         PR middle-end/83623
2303         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
2304         check for bswap in mode rather than HImode and use that in expand_unop
2305         too.
2307 Copyright (C) 2018 Free Software Foundation, Inc.
2309 Copying and distribution of this file, with or without modification,
2310 are permitted in any medium without royalty provided the copyright
2311 notice and this notice are preserved.