diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-07-22 00:36:52 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-07-22 00:36:52 +0000 |
commit | 87d9741e4e6ff884ec5e34b19d46bd17051dec63 (patch) | |
tree | 775d4ddb99f9b3f93365bd8925c483c84331fcc2 /gcc/optabs.c | |
parent | 32d0e51b548705973cc92c97069e56ad7095022f (diff) | |
download | gcc-87d9741e4e6ff884ec5e34b19d46bd17051dec63.zip gcc-87d9741e4e6ff884ec5e34b19d46bd17051dec63.tar.gz gcc-87d9741e4e6ff884ec5e34b19d46bd17051dec63.tar.bz2 |
combine.c (if_then_else_cond): Simplify the comparison of rtx against -1, 0, and 1.
* combine.c (if_then_else_cond): Simplify the comparison of
rtx against -1, 0, and 1.
* loop.c (check_dbra_loop): Likewise.
* optabs.c (emit_conditional_move): Likewise.
(emit_conditional_add): Likewise.
* config/i386/i386.md (*movsi_or): Likewise.
(*movdi_or_rex6): Likewise.
From-SVN: r69658
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 9e4ba2b..7a4bd0f 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4259,9 +4259,9 @@ emit_conditional_move (rtx target, enum rtx_code code, rtx op0, rtx op1, /* get_condition will prefer to generate LT and GT even if the old comparison was against zero, so undo that canonicalization here since comparisons against zero are cheaper. */ - if (code == LT && GET_CODE (op1) == CONST_INT && INTVAL (op1) == 1) + if (code == LT && op1 == const1_rtx) code = LE, op1 = const0_rtx; - else if (code == GT && GET_CODE (op1) == CONST_INT && INTVAL (op1) == -1) + else if (code == GT && op1 == constm1_rtx) code = GE, op1 = const0_rtx; if (cmode == VOIDmode) @@ -4400,9 +4400,9 @@ emit_conditional_add (rtx target, enum rtx_code code, rtx op0, rtx op1, /* get_condition will prefer to generate LT and GT even if the old comparison was against zero, so undo that canonicalization here since comparisons against zero are cheaper. */ - if (code == LT && GET_CODE (op1) == CONST_INT && INTVAL (op1) == 1) + if (code == LT && op1 == const1_rtx) code = LE, op1 = const0_rtx; - else if (code == GT && GET_CODE (op1) == CONST_INT && INTVAL (op1) == -1) + else if (code == GT && op1 == constm1_rtx) code = GE, op1 = const0_rtx; if (cmode == VOIDmode) |