aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-10-06 23:18:31 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-10-06 23:18:31 +0000
commit3a627503d6aa79272846a53fc33f8cf3b82f3284 (patch)
treebbd520b2a2c9caf1c3a9717cfe855fd3e0c43e5a
parentc37b68d42af9dfe0561541be06879f6cdb0f0532 (diff)
downloadgcc-3a627503d6aa79272846a53fc33f8cf3b82f3284.zip
gcc-3a627503d6aa79272846a53fc33f8cf3b82f3284.tar.gz
gcc-3a627503d6aa79272846a53fc33f8cf3b82f3284.tar.bz2
i386.c (ix86_expand_setcc): Annotate the floating point comparison sequence with a REG_EQUAL note that...
* config/i386/i386.c (ix86_expand_setcc): Annotate the floating point comparison sequence with a REG_EQUAL note that describes the comparison's semantics. From-SVN: r72173
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b0a81bc..cbd783f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2003-10-06 Roger Sayle <roger@eyesopen.com>
+ * config/i386/i386.c (ix86_expand_setcc): Annotate the floating
+ point comparison sequence with a REG_EQUAL note that describes
+ the comparison's semantics.
+
+2003-10-06 Roger Sayle <roger@eyesopen.com>
+
* expr.c (expand_expr <COND_EXPR>): Handle the void type semantics
of COND_EXPR when expanding the "A op 0 ? FOO : A" optimizations.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 1c606df..67285f9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9334,7 +9334,7 @@ ix86_split_fp_branch (enum rtx_code code, rtx op1, rtx op2,
int
ix86_expand_setcc (enum rtx_code code, rtx dest)
{
- rtx ret, tmp, tmpreg;
+ rtx ret, tmp, tmpreg, equiv;
rtx second_test, bypass_test;
if (GET_MODE (ix86_compare_op0) == DImode
@@ -9373,6 +9373,12 @@ ix86_expand_setcc (enum rtx_code code, rtx dest)
emit_insn (gen_iorqi3 (tmp, tmpreg, tmp2));
}
+ /* Attach a REG_EQUAL note describing the comparison result. */
+ equiv = simplify_gen_relational (code, QImode,
+ GET_MODE (ix86_compare_op0),
+ ix86_compare_op0, ix86_compare_op1);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, equiv);
+
return 1; /* DONE */
}