diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-03-11 22:48:36 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2004-03-11 22:48:36 +0000 |
commit | bbe708a3914c49b9124bd2b44a9d62d5640ffd27 (patch) | |
tree | 07534e5cce41f7cf4660e3ee80dff3853f126e1d /gcc/combine.c | |
parent | 0e808055da764187cb050bbfe06baf48dd235184 (diff) | |
download | gcc-bbe708a3914c49b9124bd2b44a9d62d5640ffd27.zip gcc-bbe708a3914c49b9124bd2b44a9d62d5640ffd27.tar.gz gcc-bbe708a3914c49b9124bd2b44a9d62d5640ffd27.tar.bz2 |
combine.c (if_then_else_cond): Check for NULL return value of simplify_gen_subreg.
ChangeLog:
* combine.c (if_then_else_cond): Check for NULL return value of
simplify_gen_subreg.
testsuite/ChangeLog:
* gcc.dg/20040310-1.c: New test.
From-SVN: r79347
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 497e826..c627187 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7378,12 +7378,16 @@ if_then_else_cond (rtx x, rtx *ptrue, rtx *pfalse) && 0 != (cond0 = if_then_else_cond (SUBREG_REG (x), &true0, &false0))) { - *ptrue = simplify_gen_subreg (mode, true0, + true0 = simplify_gen_subreg (mode, true0, + GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); + false0 = simplify_gen_subreg (mode, false0, GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); - *pfalse = simplify_gen_subreg (mode, false0, - GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); - - return cond0; + if (true0 && false0) + { + *ptrue = true0; + *pfalse = false0; + return cond0; + } } /* If X is a constant, this isn't special and will cause confusions |