diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-08-08 17:59:47 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-08-08 18:02:07 +0800 |
commit | 0b76eed807691ef39e9c7e37d662dd4a9362f412 (patch) | |
tree | 61bf5f96237a233b75a5a18b98b7a68ad9d18275 /gcc-4.6/gcc/cse.c | |
parent | 57cfd7a03820d1241333e059feda0ab04829f575 (diff) | |
download | toolchain_gcc-0b76eed807691ef39e9c7e37d662dd4a9362f412.tar.gz toolchain_gcc-0b76eed807691ef39e9c7e37d662dd4a9362f412.tar.bz2 toolchain_gcc-0b76eed807691ef39e9c7e37d662dd4a9362f412.zip |
Backport fix to bug 50380: cc1 hangs eating 100% CPU
This seems to affect MIPS GCC 4.6 only
Change-Id: Idb1cf411396d909a40e1b6fcbfb5729879b6cf59
Related:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380
http://gcc.gnu.org/viewcvs/trunk/gcc/cse.c?r1=177852&r2=182498&pathrev=182498
Diffstat (limited to 'gcc-4.6/gcc/cse.c')
-rw-r--r-- | gcc-4.6/gcc/cse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc-4.6/gcc/cse.c b/gcc-4.6/gcc/cse.c index 078977fbc..760911424 100644 --- a/gcc-4.6/gcc/cse.c +++ b/gcc-4.6/gcc/cse.c @@ -3054,6 +3054,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 |