aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-06-28 15:24:12 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-06-28 15:24:12 -0700
commit505ac5077028e17ceec8612d518ff1dad09f4140 (patch)
tree43b980a2bb90a31b44a746dd9b5a796c342ecdc7 /gcc
parent98843c9206bc57b09354e9a145df5af9b297afdf (diff)
downloadgcc-505ac5077028e17ceec8612d518ff1dad09f4140.zip
gcc-505ac5077028e17ceec8612d518ff1dad09f4140.tar.gz
gcc-505ac5077028e17ceec8612d518ff1dad09f4140.tar.bz2
rtlanal.c (nonzero_bits1): Use the mode of the value for determining integral-ness for comparisons.
* rtlanal.c (nonzero_bits1): Use the mode of the value for determining integral-ness for comparisons. From-SVN: r101395
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/rtlanal.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 34b0960..6332722 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-28 Richard Henderson <rth@redhat.com>
+
+ * rtlanal.c (nonzero_bits1): Use the mode of the value for
+ determining integral-ness for comparisons.
+
2005-06-28 Andrew Pinski <pinskia@physics.uc.edu>
* config/rs6000/rs6000.md (setmemsi): Fix operand 2.
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 25aefd5..6a3be0e 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3657,12 +3657,14 @@ nonzero_bits1 (rtx x, enum machine_mode mode, rtx known_x,
case GE: case GEU: case UNGE:
case LE: case LEU: case UNLE:
case UNORDERED: case ORDERED:
-
/* If this produces an integer result, we know which bits are set.
Code here used to clear bits outside the mode of X, but that is
now done above. */
-
- if (GET_MODE_CLASS (mode) == MODE_INT
+ /* Mind that MODE is the mode the caller wants to look at this
+ operation in, and not the actual operation mode. We can wind
+ up with (subreg:DI (gt:V4HI x y)), and we don't have anything
+ that describes the results of a vector compare. */
+ if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT)
nonzero = STORE_FLAG_VALUE;
break;