summaryrefslogtreecommitdiffstats
path: root/gcc/regrename.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index bd2373cbb5a..e70dae8d139 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1314,6 +1314,10 @@ maybe_mode_change (enum machine_mode orig_mode, enum machine_mode copy_mode,
enum machine_mode new_mode, unsigned int regno,
unsigned int copy_regno ATTRIBUTE_UNUSED)
{
+ if (GET_MODE_SIZE (copy_mode) < GET_MODE_SIZE (orig_mode)
+ && GET_MODE_SIZE (copy_mode) < GET_MODE_SIZE (new_mode))
+ return NULL_RTX;
+
if (orig_mode == new_mode)
return gen_rtx_raw_REG (new_mode, regno);
else if (mode_change_ok (orig_mode, new_mode, regno))
OpenPOWER on IntegriCloud