PATCH: Remove goto for vec_concat and vec_interleave
H.J. Lu
hjl.tools@gmail.com
Wed May 21 15:21:00 GMT 2008
This patch removes goto for vec_concat and vec_interleave in
ix86_expand_vector_init_general. The main benefit is the new
code is easier to extend. I am testing it on Linux/Intel64. OK
for trunk?
Thanks.
H.J.
---
2008-05-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_expand_vector_init_general): Remove
goto for vec_concat and vec_interleave.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 135673)
+++ config/i386/i386.c (working copy)
@@ -24324,21 +24324,13 @@ ix86_expand_vector_init_general (bool mm
case V2SImode:
if (!mmx_ok && !TARGET_SSE)
break;
-
- n = 2;
- goto vec_concat;
+ /* FALLTHRU */
case V4SFmode:
case V4SImode:
- n = 4;
- goto vec_concat;
-
case V2DFmode:
case V2DImode:
- n = 2;
- goto vec_concat;
-
-vec_concat:
+ n = GET_MODE_SIZE (mode) / GET_MODE_SIZE (GET_MODE_INNER (mode));
for (i = 0; i < n; i++)
ops[i] = XVECEXP (vals, 0, i);
ix86_expand_vector_init_concat (mode, target, ops, n);
@@ -24347,18 +24339,13 @@ vec_concat:
case V16QImode:
if (!TARGET_SSE4_1)
break;
-
- n = 16;
- goto vec_interleave;
+ /* FALLTHRU */
case V8HImode:
if (!TARGET_SSE2)
break;
- n = 8;
- goto vec_interleave;
-
-vec_interleave:
+ n = GET_MODE_SIZE (mode) / GET_MODE_SIZE (GET_MODE_INNER (mode));
for (i = 0; i < n; i++)
ops[i] = XVECEXP (vals, 0, i);
ix86_expand_vector_init_interleave (mode, target, ops, n >> 1);
More information about the Gcc-patches
mailing list