+2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
+
+ PR rtl-optimization/17931
+ * config/i386/i386.c (ix86_rtx_costs): Handle COMPARE with
+ ZERO_EXTRACT in it.
+
2004-10-12 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_print_operand): Use output_operand_lossage where possible
*total = COSTS_N_INSNS (ix86_cost->add);
return false;
+ case COMPARE:
+ if (GET_CODE (XEXP (x, 0)) == ZERO_EXTRACT
+ && XEXP (XEXP (x, 0), 1) == const1_rtx
+ && GET_CODE (XEXP (XEXP (x, 0), 2)) == CONST_INT
+ && XEXP (x, 1) == const0_rtx)
+ {
+ /* This kind of construct is implemented using test[bwl].
+ Treat it as if we had an AND. */
+ *total = (COSTS_N_INSNS (ix86_cost->add)
+ + rtx_cost (XEXP (XEXP (x, 0), 0), outer_code)
+ + rtx_cost (const1_rtx, outer_code));
+ return true;
+ }
+ return false;
+
case FLOAT_EXTEND:
if (!TARGET_SSE_MATH || !VALID_SSE_REG_MODE (mode))
*total = 0;