Patchwork spill failure after IF-CASE-2 transformation

login
register
mail settings
Submitter Henderson, Stuart
Date Feb. 24, 2012, 9:27 a.m.
Message ID <05E9E85E39C35B4D96ED3A3190E35A10AF0C7F17CA@LIMKCMBX1.ad.analog.com>
Download mbox | patch
Permalink /patch/142764/
State New
Headers show

Comments

Henderson, Stuart - Feb. 24, 2012, 9:27 a.m.
>I think this is a fairly reasonable minimal fix. For 4.8 we could
>experiment whether to always do this, regardless of s_r_c_f_m_p.
>
>Ok if bootstrapped and tested on a primary target (i.e. linux) and
>tested on Blackfin.
>
>
>Bernd

Thanks again, Bernd.

Forwarding to gcc-patches to give people a couple of days to object.

Tested on linux and bfin.

Stu

Patch

diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 8d81c89..e4e13ab 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2295,7 +2295,9 @@  noce_get_condition (rtx jump, rtx *earliest, bool then_else_reversed)

   cond = XEXP (SET_SRC (set), 0);
   tmp = XEXP (cond, 0);
-  if (REG_P (tmp) && GET_MODE_CLASS (GET_MODE (tmp)) == MODE_INT)
+  if (REG_P (tmp) && GET_MODE_CLASS (GET_MODE (tmp)) == MODE_INT
+      && (GET_MODE (tmp) != BImode
+          || !targetm.small_register_classes_for_mode_p (BImode)))
     {
       *earliest = jump;