From: Richard Kenner Date: Sun, 14 Mar 1993 14:37:43 +0000 (-0500) Subject: (simplify_plus_minus): Reject "simplifications" that are too complex X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7463703395236ab469763dc332aaa7b615547fbf;p=gcc.git (simplify_plus_minus): Reject "simplifications" that are too complex in form. From-SVN: r3733 --- diff --git a/gcc/cse.c b/gcc/cse.c index 799f31a746a..9187d6f938c 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -4015,7 +4015,17 @@ simplify_plus_minus (code, mode, op0, op1) ncode = MINUS; tem = simplify_binary_operation (ncode, mode, lhs, rhs); - if (tem) + + /* If we got a simple object, a SUBREG of a simple + object, or a NEG, use it. Otherwise, we either got nothing + or we got something (like a NOT), which can cause an + infinite loop. */ + + if (tem != 0 + && ((GET_CODE (tem) == SUBREG + && GET_RTX_CLASS (GET_CODE (SUBREG_REG (tem))) == 'o') + || GET_CODE (tem) == NEG + || GET_RTX_CLASS (GET_CODE (tem)) == 'o')) { ops[i] = tem, ops[j] = 0; negs[i] = negs[i] && negs[j];