aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.def
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-09-02 10:10:23 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-09-02 10:10:23 +0000
commit000a5f8d23c04cc52f265519fccf37c81b5a0bad (patch)
treef8632068beccb97b70158fa5eb8381b41872c683 /gcc/rtl.def
parent976f9aa1e8b30112c0932b761e815cafcc69641f (diff)
downloadgcc-000a5f8d23c04cc52f265519fccf37c81b5a0bad.zip
gcc-000a5f8d23c04cc52f265519fccf37c81b5a0bad.tar.gz
gcc-000a5f8d23c04cc52f265519fccf37c81b5a0bad.tar.bz2
re PR target/91323 (LTGT rtx produces UCOMISS instead of COMISS)
PR target/91323 * doc/generic.texi (LTGT_EXPR): Merge with other comparison operators. * rtl.def (LTGT): Likewise. Add note about floating-point exceptions. * tree.def (LTGT_EXPR): Likewise. * config/sparc/sparc.c (select_cc_mode): Return CCFPEmode for LTGT. From-SVN: r275303
Diffstat (limited to 'gcc/rtl.def')
-rw-r--r--gcc/rtl.def14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/rtl.def b/gcc/rtl.def
index 63b09b3..c756af8 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -552,20 +552,25 @@ DEF_RTL_EXPR(POST_INC, "post_inc", "e", RTX_AUTOINC)
DEF_RTL_EXPR(PRE_MODIFY, "pre_modify", "ee", RTX_AUTOINC)
DEF_RTL_EXPR(POST_MODIFY, "post_modify", "ee", RTX_AUTOINC)
-/* Comparison operations. The ordered comparisons exist in two
- flavors, signed and unsigned. */
+/* Comparison operations. The first 6 are allowed only for integral,
+floating-point and vector modes. LTGT is only allowed for floating-point
+modes. The last 4 are allowed only for integral and vector modes.
+For floating-point operations, if either operand is a NaN, then NE returns
+true and the remaining operations return false. The operations other than
+EQ and NE may generate an exception on quiet NaNs. */
DEF_RTL_EXPR(NE, "ne", "ee", RTX_COMM_COMPARE)
DEF_RTL_EXPR(EQ, "eq", "ee", RTX_COMM_COMPARE)
DEF_RTL_EXPR(GE, "ge", "ee", RTX_COMPARE)
DEF_RTL_EXPR(GT, "gt", "ee", RTX_COMPARE)
DEF_RTL_EXPR(LE, "le", "ee", RTX_COMPARE)
DEF_RTL_EXPR(LT, "lt", "ee", RTX_COMPARE)
+DEF_RTL_EXPR(LTGT, "ltgt", "ee", RTX_COMM_COMPARE)
DEF_RTL_EXPR(GEU, "geu", "ee", RTX_COMPARE)
DEF_RTL_EXPR(GTU, "gtu", "ee", RTX_COMPARE)
DEF_RTL_EXPR(LEU, "leu", "ee", RTX_COMPARE)
DEF_RTL_EXPR(LTU, "ltu", "ee", RTX_COMPARE)
-/* Additional floating point unordered comparison flavors. */
+/* Additional floating-point unordered comparison flavors. */
DEF_RTL_EXPR(UNORDERED, "unordered", "ee", RTX_COMM_COMPARE)
DEF_RTL_EXPR(ORDERED, "ordered", "ee", RTX_COMM_COMPARE)
@@ -576,9 +581,6 @@ DEF_RTL_EXPR(UNGT, "ungt", "ee", RTX_COMPARE)
DEF_RTL_EXPR(UNLE, "unle", "ee", RTX_COMPARE)
DEF_RTL_EXPR(UNLT, "unlt", "ee", RTX_COMPARE)
-/* This is an ordered NE, ie !UNEQ, ie false for NaN. */
-DEF_RTL_EXPR(LTGT, "ltgt", "ee", RTX_COMM_COMPARE)
-
/* Represents the result of sign-extending the sole operand.
The machine modes of the operand and of the SIGN_EXTEND expression
determine how much sign-extension is going on. */