aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-07 09:53:18 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-07 09:53:18 +0000
commit3029ee001838500910ea59138458cdfe14f4bc73 (patch)
tree4f6ee96bfcae70116965086e9e927ad54c03d975
parent406034fa4b563e02d1570ec6d1457688c932536d (diff)
* config/alpha/alpha.c (alpha_emit_conditional_move): Fail
if we discover we need a pseudo and no_new_pseudos is true. * config/alpha/alpha.md (ne:DI insn): New. (trunctfsf2, sne): Emit NE instead of non-canonical LTU. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32998 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/alpha/alpha.md14
3 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 75360a097dc..2ff67110f62 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2000-04-07 Richard Henderson <rth@cygnus.com>
+ * config/alpha/alpha.c (alpha_emit_conditional_move): Fail
+ if we discover we need a pseudo and no_new_pseudos is true.
+ * config/alpha/alpha.md (ne:DI insn): New.
+ (trunctfsf2, sne): Emit NE instead of non-canonical LTU.
+
+2000-04-07 Richard Henderson <rth@cygnus.com>
+
* rtl.def (COND_EXEC): New.
* rtl.h (COND_EXEC_TEST, COND_EXEC_CODE): New.
* tm.texi (MAX_CONDITIONAL_EXECUTE): Document.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index a547a9292ac..7d82f3062b0 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1769,11 +1769,14 @@ alpha_emit_conditional_move (cmp, mode)
&& (op0 == CONST0_RTX (cmp_mode) || op1 == CONST0_RTX (cmp_mode)))
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
- /* We can't put the comparison insides a conditional move;
+ /* We can't put the comparison inside the conditional move;
emit a compare instruction and put that inside the
conditional move. Make sure we emit only comparisons we have;
swap or reverse as necessary. */
+ if (no_new_pseudos)
+ return NULL_RTX;
+
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 03c70036416..5b9dd8e9459 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -2240,7 +2240,7 @@
which prevents rounding error in the final conversion to SFmode. */
emit_insn (gen_rtx_SET (VOIDmode, sticky,
- gen_rtx_LTU (DImode, const0_rtx, lo)));
+ gen_rtx_NE (DImode, lo, const0_rtx)));
emit_insn (gen_iordi3 (hi, hi, sticky));
emit_insn (gen_trunctfdf2 (tmpf, arg));
emit_insn (gen_truncdfsf2 (operands[0], tmpf));
@@ -2497,6 +2497,14 @@
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
+ (ne:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")
+ (const_int 0)))]
+ ""
+ "cmpult $31,%1,%0"
+ [(set_attr "type" "icmp")])
+
+(define_insn ""
+ [(set (match_operand:DI 0 "register_operand" "=r")
(match_operator:DI 1 "alpha_comparison_operator"
[(match_operand:DI 2 "reg_or_0_operand" "rJ")
(match_operand:DI 3 "reg_or_8bit_operand" "rI")]))]
@@ -3314,7 +3322,9 @@
if (alpha_compare.op1 == const0_rtx)
{
- emit_insn (gen_sgtu (operands[0]));
+ operands[1] = gen_rtx_NE (DImode, alpha_compare.op0, alpha_compare.op1);
+ alpha_compare.op0 = alpha_compare.op1 = NULL_RTX;
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
DONE;
}