diff mbox

wide-int, bfin

Message ID 6E68FD2A-7813-4537-9F98-B528D0AE8473@comcast.net
State New
Headers show

Commit Message

Mike Stump Nov. 23, 2013, 7:20 p.m. UTC
Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch.    This patch covers the bfin port.

Ok?
* config/bfin/bfin.c
	(bfin_local_alignment): Use wide-int interfaces.
	(bfin_can_use_doloop_p): Likewise.

Comments

Bernd Schmidt Nov. 25, 2013, 1:16 p.m. UTC | #1
On 11/23/2013 08:20 PM, Mike Stump wrote:
> Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch.    This patch covers the bfin port.
> 
> Ok?

I haven't seen any updates on the compile-time regressions with the
wide-int patches (but may have overlooked them in the flood). bfin and
reload parts are conditionally approved if new numbers are posted and
there's consensus that they are acceptable.


Bernd
diff mbox

Patch

diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index d7af939..88fe426 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3288,8 +3288,8 @@  bfin_local_alignment (tree type, unsigned align)
      memcpy can use 32 bit loads/stores.  */
   if (TYPE_SIZE (type)
       && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
-      && (TREE_INT_CST_LOW (TYPE_SIZE (type)) > 8
-	  || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 32)
+      && wi::gtu_p (TYPE_SIZE (type), 8)
+      && align < 32)
     return 32;
   return align;
 }
@@ -3371,15 +3371,14 @@  find_prev_insn_start (rtx insn)
 /* Implement TARGET_CAN_USE_DOLOOP_P.  */
 
 static bool
-bfin_can_use_doloop_p (double_int, double_int iterations_max,
+bfin_can_use_doloop_p (const widest_int &, const widest_int &iterations_max,
 		       unsigned int, bool)
 {
   /* Due to limitations in the hardware (an initial loop count of 0
      does not loop 2^32 times) we must avoid to generate a hardware
      loops when we cannot rule out this case.  */
   if (!flag_unsafe_loop_optimizations
-      && (iterations_max.high != 0
-	  || iterations_max.low >= 0xFFFFFFFF))
+      && wi::geu_p (iterations_max, 0xFFFFFFFF))
     return false;
   return true;
 }