diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-14 09:37:43 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-14 09:37:43 -0500 |
commit | 7463703395236ab469763dc332aaa7b615547fbf (patch) | |
tree | 5661855f10caf1f29978357988097164f23b8b0a /gcc | |
parent | 5931019b79cac956f09601b80f941ad5989f4c75 (diff) | |
download | gcc-7463703395236ab469763dc332aaa7b615547fbf.zip gcc-7463703395236ab469763dc332aaa7b615547fbf.tar.gz gcc-7463703395236ab469763dc332aaa7b615547fbf.tar.bz2 |
(simplify_plus_minus): Reject "simplifications" that are too complex
in form.
From-SVN: r3733
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cse.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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]; |