diff mbox

[rs6000,committed] Most significant bit of zero is not one.

Message ID 1392839061.20991.32.camel@gnopaine
State New
Headers show

Commit Message

Bill Schmidt Feb. 19, 2014, 7:44 p.m. UTC
Hi,

I ran across this obvious error when developing a test case for another
patch.  The value assigned for the most significant bit of a value is
obviously wrong for zero here.  I haven't added a test case because this
will be covered by the test case added for the other patch.

Bootstrapped and tested for powerpc64le-unknown-linux-gnu with no
regressions.  Committed as obvious.

Thanks,
Bill


2014-02-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (vspltis_constant): Fix most significant
	bit of zero.
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 207910)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -5020,7 +5020,7 @@  vspltis_constant (rtx op, unsigned step, unsigned
 
   val = const_vector_elt_as_int (op, BYTES_BIG_ENDIAN ? nunits - 1 : 0);
   splat_val = val;
-  msb_val = val > 0 ? 0 : -1;
+  msb_val = val >= 0 ? 0 : -1;
 
   /* Construct the value to be splatted, if possible.  If not, return 0.  */
   for (i = 2; i <= copies; i *= 2)