diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-07-02 19:40:30 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-07-02 12:40:30 -0700 |
commit | e4950e42af5b71476c43f30056a1e3aaac7aa36a (patch) | |
tree | 56f116be67ba56c1e25f3fe21e0199e7d7b3078d /gcc/rtlhooks.c | |
parent | 22f70bffdd485129dfdba38a880b22781449269e (diff) | |
download | gcc-e4950e42af5b71476c43f30056a1e3aaac7aa36a.tar.gz |
rtlhooks.c (gen_lowpart_if_possible): Check for invalid subreg before calling gen_lowpart_SUBREG.
2007-07-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
* rtlhooks.c (gen_lowpart_if_possible): Check for
invalid subreg before calling gen_lowpart_SUBREG.
From-SVN: r126230
Diffstat (limited to 'gcc/rtlhooks.c')
-rw-r--r-- | gcc/rtlhooks.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index ece7198f9a2..79fcb445309 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -161,7 +161,9 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x) return new; } - else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode) + else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode + && validate_subreg (mode, GET_MODE (x), x, + subreg_lowpart_offset (mode, GET_MODE (x)))) return gen_lowpart_SUBREG (mode, x); else return 0; |