aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwok Cheung Yeung <kcy@codesourcery.com>2020-04-03 03:03:35 -0700
committerKwok Cheung Yeung <kcy@codesourcery.com>2020-04-03 03:12:28 -0700
commit1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c (patch)
tree02b9fb13073397ae1be38c8b99c998372dc6079e
parent24fe8c8e338e1c820d942b9c7b997a37705eb29e (diff)
downloadgcc-1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c.zip
gcc-1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c.tar.gz
gcc-1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c.tar.bz2
amdgcn: Support unordered floating-point comparison operators
2020-04-03 Kwok Cheung Yeung <kcy@codesourcery.com> gcc/ * config/gcn/gcn.c (print_operand): Handle unordered comparison operators. * config/gcn/predicates.md (gcn_fp_compare_operator): Add unordered comparison operators.
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/gcn/gcn.c15
-rw-r--r--gcc/config/gcn/predicates.md2
3 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 472ce17..11510ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2020-04-03 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * config/gcn/gcn.c (print_operand): Handle unordered comparison
+ operators.
+ * config/gcn/predicates.md (gcn_fp_compare_operator): Add unordered
+ comparison operators.
+
2020-04-03 Kewen Lin <linkw@gcc.gnu.org>
PR tree-optimization/94443
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index 12438cf..38b5b98 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -6007,6 +6007,21 @@ print_operand (FILE *file, rtx x, int code)
case UNORDERED:
s = "_u_";
break;
+ case UNEQ:
+ s = "_nlg_";
+ break;
+ case UNGE:
+ s = "_nlt_";
+ break;
+ case UNGT:
+ s = "_nle_";
+ break;
+ case UNLE:
+ s = "_ngt_";
+ break;
+ case UNLT:
+ s = "_nge_";
+ break;
case LTGT:
s = "_lg_";
break;
diff --git a/gcc/config/gcn/predicates.md b/gcc/config/gcn/predicates.md
index 7bf763a..91e5ca1 100644
--- a/gcc/config/gcn/predicates.md
+++ b/gcc/config/gcn/predicates.md
@@ -165,7 +165,7 @@
(match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu"))
(define_predicate "gcn_fp_compare_operator"
- (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu,ordered,unordered,ltgt"))
+ (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu,ordered,unordered,uneq,unge,ungt,unle,unlt,ltgt"))
(define_predicate "unary_operator"
(match_code "not,popcount"))