diff options
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; |