On 07/13/2011 07:48 PM, H.J. Lu wrote:
Here is the patch.  OK for trunk?

Again, at least you should explain clearly _why_ you need ignore_address_wrap_around. You said elsewhere x32 should be first clean, then fast.

   if (GET_CODE (x) == SUBREG && SUBREG_PROMOTED_VAR_P (x)
       && GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) >= GET_MODE_SIZE (mode)
       && SUBREG_PROMOTED_UNSIGNED_P (x) == unsignedp)
+    {
+      if (no_emit)
+       x = rtl_hooks.gen_lowpart_no_emit (mode, x);
+      else
+       x = gen_lowpart (mode, x);
+    }
@@ -773,7 +781,10 @@ convert_modes (enum machine_mode mode, enum machine_mode 
oldmode, rtx x, int uns
          return gen_int_mode (val, mode);
        }

-      return gen_lowpart (mode, x);
+      if (no_emit)
+       return rtl_hooks.gen_lowpart_no_emit (mode, x);
+      else
+       return gen_lowpart (mode, x);
     }

These should be

  rtx tem = rtl_hooks.gen_lowpart_no_emit (mode, x);
  if (tem)
    x = tem;

  rtx tem = rtl_hooks.gen_lowpart_no_emit (mode, x);
  if (tem)
    return x;

since the "emitting" case can just reuse the code below. However, see the patch I'm sending now.

Paolo

Reply via email to