diff options
author | Richard Henderson <rth@redhat.com> | 2000-12-14 00:18:57 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-12-14 00:18:57 -0800 |
commit | c53f9f5bda4d612dae76ddc4862923333d206b60 (patch) | |
tree | bc3a5e2ef4998ec4857b36d65538caa075b0807a | |
parent | 34c659e2cfc5c36525ecc0522f28288056eb9456 (diff) | |
download | gcc-c53f9f5bda4d612dae76ddc4862923333d206b60.zip gcc-c53f9f5bda4d612dae76ddc4862923333d206b60.tar.gz gcc-c53f9f5bda4d612dae76ddc4862923333d206b60.tar.bz2 |
alpha.c (alpha_emit_conditional_move): Do not swap comparison operands when that would create non-canonical rtl.
* config/alpha/alpha.c (alpha_emit_conditional_move): Do not swap
comparison operands when that would create non-canonical rtl.
From-SVN: r38247
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 18 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d02842d..4f61099 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-12-14 Richard Henderson <rth@redhat.com> + * config/alpha/alpha.c (alpha_emit_conditional_move): Do not swap + comparison operands when that would create non-canonical rtl. + * config/i386/i386.md (umulsi3_highpart): Remove * from name. (smulsi3_highpart): Likewise. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index d16c58c6..a363be8 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1908,9 +1908,14 @@ alpha_emit_conditional_move (cmp, mode) case GE: case GT: case GEU: case GTU: /* These must be swapped. */ - cmp_code = swap_condition (code); - code = NE; - tem = op0, op0 = op1, op1 = tem; + if (op1 == CONST0_RTX (cmp_mode)) + cmp_code = code, code = NE; + else + { + cmp_code = swap_condition (code); + code = NE; + tem = op0, op0 = op1, op1 = tem; + } break; default: @@ -1958,8 +1963,11 @@ alpha_emit_conditional_move (cmp, mode) case GE: case GT: case GEU: case GTU: /* These must be swapped. */ - code = swap_condition (code); - tem = op0, op0 = op1, op1 = tem; + if (op1 != CONST0_RTX (cmp_mode)) + { + code = swap_condition (code); + tem = op0, op0 = op1, op1 = tem; + } break; default: |