diff options
Diffstat (limited to 'gcc/rtlhooks.c')
-rw-r--r-- | gcc/rtlhooks.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index 8939b21bdb5..432b286c1d8 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -43,11 +43,9 @@ gen_lowpart_general (enum machine_mode mode, rtx x) if (result) return result; - /* If it's a REG, it must be a hard reg that's not valid in MODE. */ - else if (REG_P (x) - /* Or we could have a subreg of a floating point value. */ - || (GET_CODE (x) == SUBREG - && FLOAT_MODE_P (GET_MODE (SUBREG_REG (x))))) + /* Handle SUBREGs and hard REGs that were rejected by + simplify_gen_subreg. */ + else if (REG_P (x) || GET_CODE (x) == SUBREG) { result = gen_lowpart_common (mode, copy_to_reg (x)); gcc_assert (result != 0); |