From f4dcb5cb43b68e265512a03a160bdda634818b43 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Dec 2011 23:14:49 +0000 Subject: Tue Dec 13 23:14:49 UTC 2011 --- staging/gcc/gcc-pr49720.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 staging/gcc/gcc-pr49720.patch (limited to 'staging/gcc/gcc-pr49720.patch') diff --git a/staging/gcc/gcc-pr49720.patch b/staging/gcc/gcc-pr49720.patch new file mode 100644 index 000000000..8f50c4120 --- /dev/null +++ b/staging/gcc/gcc-pr49720.patch @@ -0,0 +1,26 @@ +--- trunk/gcc/simplify-rtx.c 2011/10/28 05:55:10 180603 ++++ trunk/gcc/simplify-rtx.c 2011/10/28 06:35:31 180604 +@@ -4352,10 +4352,20 @@ + { + rtx x = XEXP (op0, 0); + rtx c = XEXP (op0, 1); ++ enum rtx_code invcode = op0code == PLUS ? MINUS : PLUS; ++ rtx tem = simplify_gen_binary (invcode, cmp_mode, op1, c); + +- c = simplify_gen_binary (op0code == PLUS ? MINUS : PLUS, +- cmp_mode, op1, c); +- return simplify_gen_relational (code, mode, cmp_mode, x, c); ++ /* Detect an infinite recursive condition, where we oscillate at this ++ simplification case between: ++ A + B == C <---> C - B == A, ++ where A, B, and C are all constants with non-simplifiable expressions, ++ usually SYMBOL_REFs. */ ++ if (GET_CODE (tem) == invcode ++ && CONSTANT_P (x) ++ && rtx_equal_p (c, XEXP (tem, 1))) ++ return NULL_RTX; ++ ++ return simplify_gen_relational (code, mode, cmp_mode, x, tem); + } + + /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is -- cgit v1.2.3-54-g00ecf