* config/rs6000/rs6000.md (cmpmemsi): New define_expand.
commit4157acef2a31c32c753e4e5eb75d0ba34b4610e6
authoracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Sep 2016 20:34:26 +0000 (23 20:34 +0000)
committeracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Sep 2016 20:34:26 +0000 (23 20:34 +0000)
tree4514af28159ac075418201ffbb487eabd38c5dc8
parentad020996963da0cdfa748fb8f2059fc68048f2c2
* config/rs6000/rs6000.md (cmpmemsi): New define_expand.
* config/rs6000/rs6000.c (expand_block_compare): New function used by
cmpmemsi pattern to do builtin expansion of memcmp ().
(compute_current_alignment): Add helper function for
expand_block_compare used to compute alignment as the compare proceeds.
(select_block_compare_mode): Used by expand_block_compare to select
the mode used for reading the next chunk of bytes in the compare.
(do_load_for_compare): Used by expand_block_compare to emit the load
insns for the compare.
(rs6000_emit_dot_insn): Moved this function to avoid a forward
reference from expand_block_compare ().
* config/rs6000/rs6000-protos.h (expand_block_compare): Add a
prototype for this function.
* config/rs6000/rs6000.opt (mblock-compare-inline-limit): Add a new
target option for controlling how much code inline expansion of
memcmp() will be allowed to generate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240455 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/config/rs6000/rs6000.opt