summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-22 12:46:07 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-22 12:46:07 +0000
commitac875fa40bf5429aff0612943d8c5705c4e11bb5 (patch)
tree6254ef8bed13933fcdfb55163f89625f1932c652 /gcc/builtins.c
parent3efb5d22322a504342153f3d64f1a3a209c3fe40 (diff)
downloadgcc-ac875fa40bf5429aff0612943d8c5705c4e11bb5.tar.gz
gcc/
* machmode.h (bitwise_mode_for_mode): Declare. * stor-layout.h (bitwise_type_for_mode): Likewise. * stor-layout.c (bitwise_mode_for_mode): New function. (bitwise_type_for_mode): Likewise. * builtins.c (fold_builtin_memory_op): Use it instead of int_mode_for_mode and build_nonstandard_integer_type. gcc/testsuite/ * gcc.dg/memcpy-5.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index dd57b1ae42a..42e4af263ab 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -8921,29 +8921,11 @@ fold_builtin_memory_op (location_t loc, tree dest, tree src,
if (FLOAT_MODE_P (TYPE_MODE (desttype))
|| TREE_CODE (desttype) == BOOLEAN_TYPE
|| TREE_CODE (desttype) == ENUMERAL_TYPE)
- {
- /* A more suitable int_mode_for_mode would return a vector
- integer mode for a vector float mode or a integer complex
- mode for a float complex mode if there isn't a regular
- integer mode covering the mode of desttype. */
- enum machine_mode mode = int_mode_for_mode (TYPE_MODE (desttype));
- if (mode == BLKmode)
- desttype = NULL_TREE;
- else
- desttype = build_nonstandard_integer_type (GET_MODE_BITSIZE (mode),
- 1);
- }
+ desttype = bitwise_type_for_mode (TYPE_MODE (desttype));
if (FLOAT_MODE_P (TYPE_MODE (srctype))
|| TREE_CODE (srctype) == BOOLEAN_TYPE
|| TREE_CODE (srctype) == ENUMERAL_TYPE)
- {
- enum machine_mode mode = int_mode_for_mode (TYPE_MODE (srctype));
- if (mode == BLKmode)
- srctype = NULL_TREE;
- else
- srctype = build_nonstandard_integer_type (GET_MODE_BITSIZE (mode),
- 1);
- }
+ srctype = bitwise_type_for_mode (TYPE_MODE (srctype));
if (!srctype)
srctype = desttype;
if (!desttype)