aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2007-04-24 21:02:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2007-04-24 21:02:21 +0000
commit1965dd3a1f621d899e250ddc84d0d83ba1ada69a (patch)
treeb759a6f1e6fa2ef7f2526805e022dc7441d222d9 /gcc/flow.c
parent438d798f1231f01c92211c76df1cc3b4cf6904a4 (diff)
downloadgcc-1965dd3a1f621d899e250ddc84d0d83ba1ada69a.zip
gcc-1965dd3a1f621d899e250ddc84d0d83ba1ada69a.tar.gz
gcc-1965dd3a1f621d899e250ddc84d0d83ba1ada69a.tar.bz2
* flow.c (elim_reg_cond): Handle a comparison of a subreg.
From-SVN: r124122
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 78c2328..5b0249b 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3437,7 +3437,13 @@ elim_reg_cond (rtx x, unsigned int regno)
if (COMPARISON_P (x))
{
- if (REGNO (XEXP (x, 0)) == regno)
+ rtx reg;
+
+ reg = XEXP (x, 0);
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+ gcc_assert (REG_P (reg));
+ if (REGNO (reg) == regno)
return const0_rtx;
return x;
}