amdgcn: Support unordered floating-point comparison operators
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 3 Apr 2020 10:03:35 +0000 (03:03 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 3 Apr 2020 10:12:28 +0000 (03:12 -0700)
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.

gcc/ChangeLog
gcc/config/gcn/gcn.c
gcc/config/gcn/predicates.md

index 472ce173ed2b1e9125867d3e91c1af78630d6c75..11510ac941141277c31f08e0905ff10f29040f98 100644 (file)
@@ -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
index 12438cf6eb4fc713ecad6b8753c419aaa32ec4d3..38b5b98c7c83a651e2beebc2c2cb8619c3615666 100644 (file)
@@ -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;
index 7bf763a4ba5b6b4cbd6180c4138a8358c809d683..91e5ca1111c5aae1176cd880309d0790922665da 100644 (file)
   (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"))