From 1dff18a181b02355cbea5ebcc2c5d0b92ec64d0c Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 3 Apr 2020 03:03:35 -0700 Subject: [PATCH] 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. --- gcc/ChangeLog | 7 +++++++ gcc/config/gcn/gcn.c | 15 +++++++++++++++ gcc/config/gcn/predicates.md | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) 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")) -- 2.30.2