From: Kwok Cheung Yeung Date: Fri, 3 Apr 2020 10:03:35 +0000 (-0700) Subject: amdgcn: Support unordered floating-point comparison operators X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c;p=gcc.git amdgcn: Support unordered floating-point comparison operators 2020-04-03 Kwok Cheung Yeung gcc/ * config/gcn/gcn.c (print_operand): Handle unordered comparison operators. * config/gcn/predicates.md (gcn_fp_compare_operator): Add unordered comparison operators. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 472ce173ed2..11510ac9411 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-04-03 Kwok Cheung Yeung + + * 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 PR tree-optimization/94443 diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index 12438cf6eb4..38b5b98c7c8 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 7bf763a4ba5..91e5ca1111c 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"))