Commit bc038ad5 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/27567 (__builtin_memcpy generates redundant stores/moves.)

	PR middle-end/27567
	* builtins.c (fold_builtin_memcpy, fold_builtin_memmove): Remove.
	(fold_builtin_mempcpy): Rename to...
	(fold_builtin_memory_op): ... this.  Optimize one element copy
	into an assignment.
	(fold_builtin_memset, fold_builtin_bzero, fold_builtin_bcopy): New
	functions.
	(expand_builtin_strcpy, expand_builtin_strncpy): Handle COMPOUND_EXPR.
	(expand_builtin_memcpy, expand_builtin_mempcpy,
	expand_builtin_memmove): Likewise.  Use fold_builtin_memory_op.
	(fold_builtin_1): Handle BUILT_IN_MEMSET, BUILT_IN_BZERO and
	BUILT_IN_BCOPY.  Use fold_builtin_memory_op for
	BUILT_IN_MEM{CPY,PCPY,MOVE}.

From-SVN: r116656
parent 07515729
2006-09-02 Jakub Jelinek <jakub@redhat.com>
PR middle-end/27567
* builtins.c (fold_builtin_memcpy, fold_builtin_memmove): Remove.
(fold_builtin_mempcpy): Rename to...
(fold_builtin_memory_op): ... this. Optimize one element copy
into an assignment.
(fold_builtin_memset, fold_builtin_bzero, fold_builtin_bcopy): New
functions.
(expand_builtin_strcpy, expand_builtin_strncpy): Handle COMPOUND_EXPR.
(expand_builtin_memcpy, expand_builtin_mempcpy,
expand_builtin_memmove): Likewise. Use fold_builtin_memory_op.
(fold_builtin_1): Handle BUILT_IN_MEMSET, BUILT_IN_BZERO and
BUILT_IN_BCOPY. Use fold_builtin_memory_op for
BUILT_IN_MEM{CPY,PCPY,MOVE}.
2006-09-01 DJ Delorie <dj@redhat.com>
* config/m32c/cond.md (cbranch<mode>4): Defer splitting until after reload.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment