summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-17 13:38:52 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-17 13:38:52 +0000
commit9b9797f8f9ba4c5328fb78bfc72cf0201f1e56fb (patch)
tree75d377706c5bda2c9430d089ea6e0d131fae5352 /gcc/ifcvt.c
parentae1b4595ea4c869d9d963f9e0cb4f23cb79c6105 (diff)
downloadgcc-9b9797f8f9ba4c5328fb78bfc72cf0201f1e56fb.tar.gz
* ifcvt.c (noce_try_addcc): Handle ifs with 'else' case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 21794b36aab..fe3806066b1 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -884,10 +884,8 @@ noce_try_addcc (struct noce_if_info *if_info)
int subtract, normalize;
if (! no_new_pseudos
- /* Should be no `else' case to worry about. */
- && if_info->b == if_info->x
&& GET_CODE (if_info->a) == PLUS
- && rtx_equal_p (XEXP (if_info->a, 0), if_info->x)
+ && rtx_equal_p (XEXP (if_info->a, 0), if_info->b)
&& (reversed_comparison_code (if_info->cond, if_info->jump)
!= UNKNOWN))
{
@@ -942,7 +940,7 @@ noce_try_addcc (struct noce_if_info *if_info)
if (target)
target = expand_simple_binop (GET_MODE (if_info->x),
subtract ? MINUS : PLUS,
- if_info->x, target, if_info->x,
+ if_info->b, target, if_info->x,
0, OPTAB_WIDEN);
if (target)
{