diff mbox

[9/11] Fix units mismatch in comparison

Message ID 4E0E060F.2030103@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt July 1, 2011, 5:38 p.m. UTC
A bug fix discovered while working on the other patches. Previously,
this was a comparison of a GET_MODE_BITSIZE vs a GET_MODE_SIZE value.
After the other patches, it's GET_MODE_PRECISION vs GET_MODE_SIZE, which
is just as wrong, so change it.


Bernd
* rtlanal.c (nonzero_bits1): Don't compare GET_MODE_SIZE against
	a bitsize.

Comments

Richard Henderson July 6, 2011, 6:25 p.m. UTC | #1
On 07/01/2011 10:38 AM, Bernd Schmidt wrote:
> 	* rtlanal.c (nonzero_bits1): Don't compare GET_MODE_SIZE against
> 	a bitsize.

Ok.


r~
diff mbox

Patch

Index: baseline-trunk/gcc/rtlanal.c
===================================================================
--- baseline-trunk.orig/gcc/rtlanal.c
+++ baseline-trunk/gcc/rtlanal.c
@@ -3993,7 +3993,7 @@  nonzero_bits1 (const_rtx x, enum machine
 	nonzero = 1;
 #endif
 
-      if (GET_MODE_SIZE (GET_MODE (x)) < mode_width)
+      if (GET_MODE_PRECISION (GET_MODE (x)) < mode_width)
 	nonzero |= (GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x)));
       break;