mirror of
https://github.com/LIV2/bebbo-gcc.git
synced 2025-12-06 00:23:32 +00:00
lower cost for a bit test in a compare
This commit is contained in:
parent
bdfbc089f6
commit
0b183a61db
@ -88,7 +88,13 @@ m68k_68000_10_costs (rtx x, machine_mode mode, int outer_code,
|
||||
case LE:
|
||||
case LT:
|
||||
case CC0:
|
||||
return false;
|
||||
case ZERO_EXTRACT:
|
||||
if (outer_code == COMPARE && GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 1)
|
||||
{
|
||||
*total = 2;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case POST_INC:
|
||||
case TRUNCATE:
|
||||
|
||||
@ -106,7 +106,10 @@ m68k_68020_costs (rtx x, machine_mode mode, int outer_code, int opno,
|
||||
return true;
|
||||
case SIGN_EXTRACT:
|
||||
case ZERO_EXTRACT:
|
||||
*total = 8;
|
||||
if (outer_code == COMPARE && GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 1)
|
||||
*total = 2;
|
||||
else;
|
||||
*total = 8;
|
||||
return true;
|
||||
case TRUNCATE:
|
||||
case ZERO_EXTEND:
|
||||
|
||||
@ -106,8 +106,11 @@ m68k_68030_costs (rtx x, machine_mode mode, int outer_code, int opno,
|
||||
return true;
|
||||
case SIGN_EXTRACT:
|
||||
case ZERO_EXTRACT:
|
||||
*total = 10;
|
||||
return true;
|
||||
if (outer_code == COMPARE && GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 1)
|
||||
*total = 2;
|
||||
else;
|
||||
*total = 10;
|
||||
return true;
|
||||
case TRUNCATE:
|
||||
case ZERO_EXTEND:
|
||||
*total = GET_MODE_SIZE(mode) > 2 ? 4 : 2;
|
||||
|
||||
@ -103,7 +103,10 @@ __m68k_68040_costs (rtx x, machine_mode mode, int outer_code, int opno,
|
||||
return true;
|
||||
case SIGN_EXTRACT:
|
||||
case ZERO_EXTRACT:
|
||||
*total = 4;
|
||||
if (outer_code == COMPARE && GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) == 1)
|
||||
*total = 2;
|
||||
else;
|
||||
*total = 4;
|
||||
return true;
|
||||
case TRUNCATE:
|
||||
case ZERO_EXTEND:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user