Commit d5861a7a by David Edelsohn

rs6000.c (rs6000_rtx_costs): Fix mask_operand and mask64_operand thinkos.

	* config/rs6000/rs6000.c (rs6000_rtx_costs): Fix mask_operand
	and mask64_operand thinkos.  Handle ZERO_EXTRACT.  Handle
	SIGN_EXTEND / ZERO_EXTEND of MEM.  Handle rlwinm patterns.

From-SVN: r85604
parent 0a2b72a6
2004-08-05 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_rtx_costs): Fix mask_operand
and mask64_operand thinkos. Handle ZERO_EXTRACT. Handle
SIGN_EXTEND / ZERO_EXTEND of MEM. Handle rlwinm patterns.
2004-08-05 Joseph S. Myers <jsm@polyomino.org.uk> 2004-08-05 Joseph S. Myers <jsm@polyomino.org.uk>
* config/linux.h, config/i386/linux.h, config/sparc/linux.h: * config/linux.h, config/i386/linux.h, config/sparc/linux.h:
...@@ -286,7 +292,7 @@ ...@@ -286,7 +292,7 @@
* config/i386/xmmintrin.h: Include <mm_malloc.h>. * config/i386/xmmintrin.h: Include <mm_malloc.h>.
2004-08-03 H.J. Lu <hongjiu.lu@intel.com> 2004-08-03 H.J. Lu <hongjiu.lu@intel.com>
Tanguy Fautrà <tfautre@pandora.be> Tanguy Fautr <tfautre@pandora.be>
* config/i386/pmm_malloc.h: New file. * config/i386/pmm_malloc.h: New file.
......
...@@ -16533,12 +16533,13 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, ...@@ -16533,12 +16533,13 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
|| (outer_code == AND || (outer_code == AND
&& (CONST_OK_FOR_LETTER_P (INTVAL (x), 'K') && (CONST_OK_FOR_LETTER_P (INTVAL (x), 'K')
|| CONST_OK_FOR_LETTER_P (INTVAL (x), 'L') || CONST_OK_FOR_LETTER_P (INTVAL (x), 'L')
|| CONST_OK_FOR_LETTER_P (INTVAL (x), 'T'))) || mask_operand (x, VOIDmode)))
|| outer_code == ASHIFT || outer_code == ASHIFT
|| outer_code == ASHIFTRT || outer_code == ASHIFTRT
|| outer_code == LSHIFTRT || outer_code == LSHIFTRT
|| outer_code == ROTATE || outer_code == ROTATE
|| outer_code == ROTATERT || outer_code == ROTATERT
|| outer_code == ZERO_EXTRACT
|| (outer_code == MULT || (outer_code == MULT
&& CONST_OK_FOR_LETTER_P (INTVAL (x), 'I')) && CONST_OK_FOR_LETTER_P (INTVAL (x), 'I'))
|| (outer_code == COMPARE || (outer_code == COMPARE
...@@ -16568,7 +16569,7 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, ...@@ -16568,7 +16569,7 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
&& ((outer_code == AND && ((outer_code == AND
&& (CONST_OK_FOR_LETTER_P (INTVAL (x), 'K') && (CONST_OK_FOR_LETTER_P (INTVAL (x), 'K')
|| CONST_OK_FOR_LETTER_P (INTVAL (x), 'L') || CONST_OK_FOR_LETTER_P (INTVAL (x), 'L')
|| CONST_OK_FOR_LETTER_P (INTVAL (x), 'S'))) || mask64_operand (x, DImode)))
|| ((outer_code == IOR || outer_code == XOR) || ((outer_code == IOR || outer_code == XOR)
&& CONST_DOUBLE_HIGH (x) == 0 && CONST_DOUBLE_HIGH (x) == 0
&& (CONST_DOUBLE_LOW (x) && (CONST_DOUBLE_LOW (x)
...@@ -16728,13 +16729,16 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, ...@@ -16728,13 +16729,16 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
case AND: case AND:
case IOR: case IOR:
case XOR: case XOR:
case ZERO_EXTRACT:
*total = COSTS_N_INSNS (1);
return false;
case ASHIFT: case ASHIFT:
case ASHIFTRT: case ASHIFTRT:
case LSHIFTRT: case LSHIFTRT:
case ROTATE: case ROTATE:
case ROTATERT: case ROTATERT:
case SIGN_EXTEND: /* Handle mul_highpart. */
case ZERO_EXTEND:
if (outer_code == TRUNCATE if (outer_code == TRUNCATE
&& GET_CODE (XEXP (x, 0)) == MULT) && GET_CODE (XEXP (x, 0)) == MULT)
{ {
...@@ -16744,7 +16748,18 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, ...@@ -16744,7 +16748,18 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
*total = rs6000_cost->mulsi; *total = rs6000_cost->mulsi;
return true; return true;
} }
*total = COSTS_N_INSNS (1); else if (outer_code == AND)
*total = 0;
else
*total = COSTS_N_INSNS (1);
return false;
case SIGN_EXTEND:
case ZERO_EXTEND:
if (GET_CODE (XEXP (x, 0)) == MEM)
*total = 0;
else
*total = COSTS_N_INSNS (1);
return false; return false;
case COMPARE: case COMPARE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment