summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-18 18:30:24 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-18 18:30:24 +0000
commitdea049dca0cc1d48b7d2c5d5b227a03f6972d556 (patch)
treedcf8ba6562e72efc25294c86c33f5f6a398ca59f /gcc/explow.c
parent069a05d1dee193f4df79d3e4b3bc067ebced3954 (diff)
downloadgcc-dea049dca0cc1d48b7d2c5d5b227a03f6972d556.tar.gz
* combine.c (if_then_else_cond): Canonicalize BImode true to
STORE_FLAG_VALUE. * explow.c (trunc_int_for_mode): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36507 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index ce7118eeb17..b2763e3abf0 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -52,6 +52,10 @@ trunc_int_for_mode (c, mode)
{
int width = GET_MODE_BITSIZE (mode);
+ /* Canonicalize BImode to 0 and STORE_FLAG_VALUE. */
+ if (mode == BImode)
+ return c & 1 ? STORE_FLAG_VALUE : 0;
+
/* We clear out all bits that don't belong in MODE, unless they and our
sign bit are all one. So we get either a reasonable negative
value or a reasonable unsigned value. */