diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-10-19 20:52:34 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2013-10-19 20:52:34 +0000 |
commit | d7d1451a798ea1e6f241f6058327c9160202b44f (patch) | |
tree | 3d37c2b2f7dc496e70e90978f1b7f0a683b1e1c3 /gcc/config | |
parent | 7aa14ddbd7eb90ff4cff00baba826ebf82f328b4 (diff) | |
download | gcc-d7d1451a798ea1e6f241f6058327c9160202b44f.zip gcc-d7d1451a798ea1e6f241f6058327c9160202b44f.tar.gz gcc-d7d1451a798ea1e6f241f6058327c9160202b44f.tar.bz2 |
rs6000.c (vspltis_constant): Make sure we check all elements for both endian flavors.
2013-10-19 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (vspltis_constant): Make sure we check
all elements for both endian flavors.
From-SVN: r203863
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7dc68fd..e054585 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4981,15 +4981,16 @@ vspltis_constant (rtx op, unsigned step, unsigned copies) /* Check if VAL is present in every STEP-th element, and the other elements are filled with its most significant bit. */ - for (i = 0; i < nunits - 1; ++i) + for (i = 1; i < nunits; ++i) { HOST_WIDE_INT desired_val; - if (((BYTES_BIG_ENDIAN ? i + 1 : i) & (step - 1)) == 0) + unsigned elt = BYTES_BIG_ENDIAN ? nunits - 1 - i : i; + if ((i & (step - 1)) == 0) desired_val = val; else desired_val = msb_val; - if (desired_val != const_vector_elt_as_int (op, i)) + if (desired_val != const_vector_elt_as_int (op, elt)) return false; } |