+2003-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR optimization/8555
+ * config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
+ instead of aborting.
+
2003-02-04 Richard Henderson <rth@redhat.com>
* config/i386/i386.md (UNSPEC_BSF): Remove.
op = simplify_gen_subreg (V2DFmode, operands[3], DFmode, 0);
emit_insn (gen_sse2_unpcklpd (op, op, op));
}
- /* If op2 == op3, op3 will be clobbered before it is used.
- This should be optimized out though. */
+
+ /* If op2 == op3, op3 would be clobbered before it is used. */
if (operands_match_p (operands[2], operands[3]))
- abort ();
+ {
+ emit_move_insn (operands[0], operands[2]);
+ DONE;
+ }
+
PUT_MODE (operands[1], GET_MODE (operands[0]));
if (operands_match_p (operands[0], operands[4]))
operands[6] = operands[4], operands[7] = operands[2];
--- /dev/null
+/* PR optimization/8555 */
+/* { dg-do compile } */
+/* { dg-options "-O -ffast-math -funroll-loops" } */
+/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */
+
+float foo (float *a, int i)
+{
+ int j;
+ float x = a[j = i - 1], y;
+
+ for (j = i; --j >= 0; )
+ if ((y = a[j]) > x)
+ x = y;
+
+ return x;
+}