summaryrefslogtreecommitdiff
path: root/gcc/cfgloopanal.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-16 17:16:25 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-16 17:16:25 +0000
commit9b03e6794a6496755edef2e2ceb4cf4e68a313ef (patch)
treea192947f5361f11b60ac0e1c25f61e8c3c0526b8 /gcc/cfgloopanal.c
parent88e11d8fa8d2451929de21763bc199da31323ca5 (diff)
downloadgcc-9b03e6794a6496755edef2e2ceb4cf4e68a313ef.tar.gz
PR bootstrap/12269
* simplify-rtx.c (simplify_gen_relational): Allow the cmp_mode argument to be VOIDmode, taking the mode of the comparison from the operands. Only call simplify_relational_operation if we know the mode of the comparison. Honor FLOAT_STORE_FLAG_VALUE if comparison has a floating point result. Ensure that the result is always of the specified mode. (simplify_replace_rtx): Simplify call to simplify_gen_relational. (simplify_unary_operation): Ensure the correct mode and cmp_mode are always passed to simplify_gen_relational. Simplify NOT of comparison operator in any mode, not just BImode. (simplify_ternary_operation): Correct tests on the return value of simplify_relational_operation to use const_true_rtx, not const1_rtx. Abort if it ever returns a non-constant result. * cfgloopanal.c (count_strange_loop_iterations): Use the function simplify_relational_operation, not simplify_gen_relational, if we're only interested in constant comparisons and will ignore non-constant results. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopanal.c')
-rw-r--r--gcc/cfgloopanal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 68dd9282333..57c3baceff4 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -470,7 +470,7 @@ count_strange_loop_iterations (rtx init, rtx lim, enum rtx_code cond,
/* If we are able to prove that we don't pass the first test, we are
done. */
- rqmt = simplify_gen_relational (cond, SImode, mode, init, lim);
+ rqmt = simplify_relational_operation (cond, mode, init, lim);
if (rqmt == const0_rtx)
return const0_rtx;
@@ -560,7 +560,7 @@ count_strange_loop_iterations (rtx init, rtx lim, enum rtx_code cond,
/* If this is const_true_rtx and we did not take a conservative approximation
of after_wrap above, we might iterate the calculation (but of course we
would have to take care about infinite cases). Ignore this for now. */
- rqmt = simplify_gen_relational (cond, SImode, mode, after_wrap, lim);
+ rqmt = simplify_relational_operation (cond, mode, after_wrap, lim);
if (rqmt != const0_rtx)
return NULL_RTX;