Commit 8f1ad6b6 by Sandra Loosemore Committed by Sandra Loosemore

re PR rtl-optimization/50380 ([4.6 only] cc1 hangs eating 100% CPU)

2011-12-19  Sandra Loosemore  <sandra@codesourcery.com>
	    Tom de Vries <tom@codesourcery.com>

	PR rtl-opt/50380

	gcc/
	* cse.c (find_comparison_args): Detect fixed point and
	bail early.

	gcc/testsuite/
	* gcc.c-torture/compile/pr50380.c: New testcase.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r182498
parent 1e815d32
2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR rtl-opt/50380
* cse.c (find_comparison_args): Detect fixed point and
bail early.
2011-12-19 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/51411
......@@ -3055,6 +3055,12 @@ find_comparison_args (enum rtx_code code, rtx *parg1, rtx *parg2,
if (! exp_equiv_p (p->exp, p->exp, 1, false))
continue;
/* If it's the same comparison we're already looking at, skip it. */
if (COMPARISON_P (p->exp)
&& XEXP (p->exp, 0) == arg1
&& XEXP (p->exp, 1) == arg2)
continue;
if (GET_CODE (p->exp) == COMPARE
/* Another possibility is that this machine has a compare insn
that includes the comparison code. In that case, ARG1 would
......
2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR rtl-opt/50380
* gcc.c-torture/compile/pr50380.c: New testcase.
2011-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51605
......
/* This test used to get stuck in an infinite loop in find_comparison_args
when compiling for MIPS at -O2. */
__attribute__ ((__noreturn__)) extern void fail (void);
char x;
void foo (const unsigned char y)
{
((void) (__builtin_expect((!! y == y), 1) ? 0 : (fail (), 0)));
x = ! y;
}
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