diff options
author | Richard Henderson <rth@cygnus.com> | 2000-09-18 11:30:24 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-09-18 11:30:24 -0700 |
commit | 1f3f36d154896f68c1c35420121782ed236da177 (patch) | |
tree | dcf8ba6562e72efc25294c86c33f5f6a398ca59f /gcc/combine.c | |
parent | 5bd60ce6de2d4e0b0e7975c04772393b76b97909 (diff) | |
download | gcc-1f3f36d154896f68c1c35420121782ed236da177.zip gcc-1f3f36d154896f68c1c35420121782ed236da177.tar.gz gcc-1f3f36d154896f68c1c35420121782ed236da177.tar.bz2 |
combine.c (if_then_else_cond): Canonicalize BImode true to STORE_FLAG_VALUE.
* combine.c (if_then_else_cond): Canonicalize BImode true to
STORE_FLAG_VALUE.
* explow.c (trunc_int_for_mode): Likewise.
From-SVN: r36507
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 033bfac..b8ac09b 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7418,6 +7418,14 @@ if_then_else_cond (x, ptrue, pfalse) || ((cond0 = get_last_value (x)) != 0 && CONSTANT_P (cond0))) ; + /* If we're in BImode, canonicalize on 0 and STORE_FLAG_VALUE, as that + will be least confusing to the rest of the compiler. */ + else if (mode == BImode) + { + *ptrue = GEN_INT (STORE_FLAG_VALUE), *pfalse = const0_rtx; + return x; + } + /* If X is known to be either 0 or -1, those are the true and false values when testing X. */ else if (x == constm1_rtx || x == const0_rtx |