diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-06-08 16:48:30 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-06-08 16:48:30 +0000 |
commit | 14b41b5f669b2b35c17f9b4e7add02eaa09d70f0 (patch) | |
tree | f1719139ac3732aeac1c1791417008591e88884f /gcc/tree-ssa-dom.c | |
parent | 33b881ca3a5ced6c254d3570dea2282ed6a7534d (diff) | |
download | gcc-14b41b5f669b2b35c17f9b4e7add02eaa09d70f0.zip gcc-14b41b5f669b2b35c17f9b4e7add02eaa09d70f0.tar.gz gcc-14b41b5f669b2b35c17f9b4e7add02eaa09d70f0.tar.bz2 |
tree-ssa-dom.c (record_conditions): Only record "unordered" conditions from floating point comparisons.
* tree-ssa-dom.c (record_conditions): Only record "unordered"
conditions from floating point comparisons.
From-SVN: r114489
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 59 |
1 files changed, 42 insertions, 17 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 6574f9b..085a5d6 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -950,36 +950,61 @@ record_conditions (struct edge_info *edge_info, tree cond, tree inverted) { case LT_EXPR: case GT_EXPR: - edge_info->max_cond_equivalences = 12; - edge_info->cond_equivalences = XNEWVEC (tree, 12); + if (FLOAT_TYPE_P (TREE_TYPE (op0))) + { + edge_info->max_cond_equivalences = 12; + edge_info->cond_equivalences = XNEWVEC (tree, 12); + build_and_record_new_cond (ORDERED_EXPR, op0, op1, + &edge_info->cond_equivalences[8]); + build_and_record_new_cond (LTGT_EXPR, op0, op1, + &edge_info->cond_equivalences[10]); + } + else + { + edge_info->max_cond_equivalences = 8; + edge_info->cond_equivalences = XNEWVEC (tree, 8); + } + build_and_record_new_cond ((TREE_CODE (cond) == LT_EXPR ? LE_EXPR : GE_EXPR), op0, op1, &edge_info->cond_equivalences[4]); - build_and_record_new_cond (ORDERED_EXPR, op0, op1, - &edge_info->cond_equivalences[6]); build_and_record_new_cond (NE_EXPR, op0, op1, - &edge_info->cond_equivalences[8]); - build_and_record_new_cond (LTGT_EXPR, op0, op1, - &edge_info->cond_equivalences[10]); + &edge_info->cond_equivalences[6]); break; case GE_EXPR: case LE_EXPR: - edge_info->max_cond_equivalences = 6; - edge_info->cond_equivalences = XNEWVEC (tree, 6); - build_and_record_new_cond (ORDERED_EXPR, op0, op1, - &edge_info->cond_equivalences[4]); + if (FLOAT_TYPE_P (TREE_TYPE (op0))) + { + edge_info->max_cond_equivalences = 6; + edge_info->cond_equivalences = XNEWVEC (tree, 6); + build_and_record_new_cond (ORDERED_EXPR, op0, op1, + &edge_info->cond_equivalences[4]); + } + else + { + edge_info->max_cond_equivalences = 4; + edge_info->cond_equivalences = XNEWVEC (tree, 4); + } break; case EQ_EXPR: - edge_info->max_cond_equivalences = 10; - edge_info->cond_equivalences = XNEWVEC (tree, 10); - build_and_record_new_cond (ORDERED_EXPR, op0, op1, - &edge_info->cond_equivalences[4]); + if (FLOAT_TYPE_P (TREE_TYPE (op0))) + { + edge_info->max_cond_equivalences = 10; + edge_info->cond_equivalences = XNEWVEC (tree, 10); + build_and_record_new_cond (ORDERED_EXPR, op0, op1, + &edge_info->cond_equivalences[8]); + } + else + { + edge_info->max_cond_equivalences = 8; + edge_info->cond_equivalences = XNEWVEC (tree, 8); + } build_and_record_new_cond (LE_EXPR, op0, op1, - &edge_info->cond_equivalences[6]); + &edge_info->cond_equivalences[4]); build_and_record_new_cond (GE_EXPR, op0, op1, - &edge_info->cond_equivalences[8]); + &edge_info->cond_equivalences[6]); break; case UNORDERED_EXPR: |