diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-05-14 16:07:12 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2006-05-14 16:07:12 +0000 |
commit | 56106c2ed0a3d5e312d14656f475abb9a3de7b9d (patch) | |
tree | c9482de7911e2d5f406f9f233d4fcee8dcd64da2 /gcc | |
parent | c505fc0613bc714188de804f9699ff7810418f7a (diff) | |
download | gcc-56106c2ed0a3d5e312d14656f475abb9a3de7b9d.zip gcc-56106c2ed0a3d5e312d14656f475abb9a3de7b9d.tar.gz gcc-56106c2ed0a3d5e312d14656f475abb9a3de7b9d.tar.bz2 |
re PR rtl-optimization/27538 (execute/20030128-1.c FAILs)
PR rtl-optimization/27538
* combine.c (expand_compound_operation): Call gen_lowpart
before calling simplify_shift_const.
From-SVN: r113763
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/combine.c | 18 |
2 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c6df66..c5ed8fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2006-05-14 Roger Sayle <roger@eyesopen.com> + PR rtl-optimization/27538 + * combine.c (expand_compound_operation): Call gen_lowpart + before calling simplify_shift_const. + +2006-05-14 Roger Sayle <roger@eyesopen.com> + PR rtl-optimization/22563 * expmed.c (store_fixed_bit_field): When using AND and IOR to store a fixed width bitfield, always force the intermediates into psuedos. diff --git a/gcc/combine.c b/gcc/combine.c index ed9c497..33512ec 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5736,14 +5736,16 @@ expand_compound_operation (rtx x) modewidth = GET_MODE_BITSIZE (GET_MODE (x)); if (modewidth + len >= pos) - tem = simplify_shift_const (NULL_RTX, unsignedp ? LSHIFTRT : ASHIFTRT, - GET_MODE (x), - simplify_shift_const (NULL_RTX, ASHIFT, - GET_MODE (x), - XEXP (x, 0), - modewidth - pos - len), - modewidth - len); - + { + enum machine_mode mode = GET_MODE (x); + tem = gen_lowpart (mode, XEXP (x, 0)); + if (!tem || GET_CODE (tem) == CLOBBER) + return x; + tem = simplify_shift_const (NULL_RTX, ASHIFT, mode, + tem, modewidth - pos - len); + tem = simplify_shift_const (NULL_RTX, unsignedp ? LSHIFTRT : ASHIFTRT, + mode, tem, modewidth - len); + } else if (unsignedp && len < HOST_BITS_PER_WIDE_INT) tem = simplify_and_const_int (NULL_RTX, GET_MODE (x), simplify_shift_const (NULL_RTX, LSHIFTRT, |