]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_expand_setcc): Annotate the floating point comparison sequence with...
authorRoger Sayle <roger@eyesopen.com>
Mon, 6 Oct 2003 23:18:31 +0000 (23:18 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 6 Oct 2003 23:18:31 +0000 (23:18 +0000)
* 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

gcc/ChangeLog
gcc/config/i386/i386.c

index b0a81bc511bb50c622422f7cf007edb8f3042298..cbd783f40e25494110999057677d1ad867399b25 100644 (file)
@@ -1,3 +1,9 @@
+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
index 1c606df7694c2add18aa67a8c7716ed7c6a946fa..67285f94ea0a5328784b5b950ac5c6b22dab55b3 100644 (file)
@@ -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 */
 }