On Feb 11, 2021, Alexandre Oliva <ol...@adacore.com> wrote:

> How does this look?


> for  gcc/ChangeLog

>       PR tree-optimization/94092
>       * builtins.c (try_store_by_multiple_pieces): New.
>       (expand_builtin_memset_args): Use it.  If target_char_cast
>       fails, proceed as for non-constant val.  Pass len's ctz to...
>       * expr.c (clear_storage_hints): ... this.  Try store by
>       multiple pieces after setmem.
>       (clear_storage): Adjust.
>       * expr.h (clear_storage_hints): Likewise.
>       (try_store_by_multiple_pieces): Declare.
>       * tree-loop-distribution.c: Include builtins.h.
>       (generate_memset_builtin): Propagate dst_base alignmen to mem.
>       * tree-ssanames.c (get_nonzero_bits): Zero out low bits of
>       integral types, when a MULT_EXPR INTEGER_CST operand ensures
>       the result will be a multiple of a power of two.

I forgot to mention this passed regstrap on x86_64-linux-gnu, as well as
some cross testing of riscv32-elf.

I've also regstrapped it on x86_64-linux-gnu along with a patch for
testing purposes, that tried try_store_by_multiple_pieces before setmem
in all 3 locations where they are called, which gives me some confidence
that the implementation is reasonably robust.


Is this ok to install?  (if not right now, perhaps in stage1)

-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

Reply via email to