(gen_lowpart): If gen_lowpart_common fails for a REG, load it into a
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 14 Sep 1995 20:20:28 +0000 (16:20 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 14 Sep 1995 20:20:28 +0000 (16:20 -0400)
pseudo and try again.

From-SVN: r10349

gcc/emit-rtl.c

index 1404770..9600f2f 100644 (file)
@@ -857,6 +857,13 @@ gen_lowpart (mode, x)
 
   if (result)
     return result;
+  else if (GET_CODE (x) == REG)
+    {
+      /* Must be a hard reg that's not valid in MODE.  */
+      result = gen_lowpart_common (mode, copy_to_reg (x));
+      if (result == 0)
+       abort ();
+    }
   else if (GET_CODE (x) == MEM)
     {
       /* The only additional case we can do is MEM.  */