From ff0765200c2e107d15c78b53cf2b215a6a7638c8 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 19 Sep 2002 23:39:34 +0000 Subject: [PATCH] fix subreg optimization bug introduced 2002-05-25 fix subreg optimization bug introduced 2002-05-25 * combine.c (simplify_set): When optimizing a subreg src with a cc0 dest, use GET_MODE (src) for mask instead of inner_mode. From-SVN: r57323 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9da276c6810..0b22646cb6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-19 Jim Wilson + + * combine.c (simplify_set): When optimizing a subreg src with a + cc0 dest, use GET_MODE (src) for mask instead of inner_mode. + 2002-09-19 Dale Johannesen * combine.c (make_extraction): Don't create invalid subreg. diff --git a/gcc/combine.c b/gcc/combine.c index c72d81e891c..23136194bf0 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5229,7 +5229,7 @@ simplify_set (x) if (GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_WIDE_INT && (nonzero_bits (inner, inner_mode) < ((unsigned HOST_WIDE_INT) 1 - << (GET_MODE_BITSIZE (inner_mode) - 1)))) + << (GET_MODE_BITSIZE (GET_MODE (src)) - 1)))) { SUBST (SET_SRC (x), inner); src = SET_SRC (x);