From 1d9fec7937f45dde5e04cac966a2d9a12f2fc15a Mon Sep 17 00:00:00 2001 From: Yiran Wang Date: Tue, 23 Jun 2015 15:33:17 -0700 Subject: Synchronize with google/gcc-4_9 to r224707 (from r214835) Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d --- gcc-4.9/gcc/tree-ssa-reassoc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc-4.9/gcc/tree-ssa-reassoc.c') diff --git a/gcc-4.9/gcc/tree-ssa-reassoc.c b/gcc-4.9/gcc/tree-ssa-reassoc.c index fce2a6e..60b4dae 100644 --- a/gcc-4.9/gcc/tree-ssa-reassoc.c +++ b/gcc-4.9/gcc/tree-ssa-reassoc.c @@ -2047,7 +2047,7 @@ range_entry_cmp (const void *a, const void *b) else return -1; } - else if (p->high != NULL_TREE) + else if (q->high != NULL_TREE) return 1; /* If both ranges are the same, sort below by ascending idx. */ } @@ -2198,7 +2198,7 @@ optimize_range_tests_xor (enum tree_code opcode, tree type, lowxor = fold_binary (BIT_XOR_EXPR, type, lowi, lowj); if (lowxor == NULL_TREE || TREE_CODE (lowxor) != INTEGER_CST) return false; - if (tree_log2 (lowxor) < 0) + if (!integer_pow2p (lowxor)) return false; highxor = fold_binary (BIT_XOR_EXPR, type, highi, highj); if (!tree_int_cst_equal (lowxor, highxor)) @@ -2245,7 +2245,7 @@ optimize_range_tests_diff (enum tree_code opcode, tree type, tem1 = fold_binary (MINUS_EXPR, type, lowj, lowi); if (tem1 == NULL_TREE || TREE_CODE (tem1) != INTEGER_CST) return false; - if (tree_log2 (tem1) < 0) + if (!integer_pow2p (tem1)) return false; mask = fold_build1 (BIT_NOT_EXPR, type, tem1); @@ -3692,6 +3692,9 @@ acceptable_pow_call (gimple stmt, tree *base, HOST_WIDE_INT *exponent) switch (DECL_FUNCTION_CODE (fndecl)) { CASE_FLT_FN (BUILT_IN_POW): + if (flag_errno_math) + return false; + *base = gimple_call_arg (stmt, 0); arg1 = gimple_call_arg (stmt, 1); -- cgit v1.1