/* Perform doloop optimizations
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Based on code by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
This file is part of GCC.
{
case NE:
/* Currently only NE tests against zero and one are supported. */
- if (XEXP (condition, 1) == const1_rtx)
+ noloop = XEXP (condition, 1);
+ if (noloop != const0_rtx)
{
+ gcc_assert (noloop == const1_rtx);
increment_count = true;
- noloop = const1_rtx;
}
- else if (XEXP (condition, 1) == const0_rtx)
- noloop = const0_rtx;
- else
- abort ();
break;
case GE:
/* Currently only GE tests against zero are supported. */
- if (XEXP (condition, 1) != const0_rtx)
- abort ();
+ gcc_assert (XEXP (condition, 1) == const0_rtx);
noloop = constm1_rtx;
/* Abort if an invalid doloop pattern has been generated. */
default:
- abort ();
+ gcc_unreachable ();
}
if (increment_count)