From 59e6d62be2c980adfc375702792afb141a1f1a1b Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Wed, 29 Jan 2020 11:35:07 +0000 Subject: [PATCH] Add LTGT operator support for amdgcn Fixes ICE in testcase gcc.dg/pr81228.c 2020-01-30 Andrew Stubbs gcc/ * config/gcn/gcn.c (print_operand): Handle LTGT. * config/gcn/predicates.md (gcn_fp_compare_operator): Allow ltgt. --- gcc/ChangeLog | 5 +++++ gcc/config/gcn/gcn.c | 3 +++ gcc/config/gcn/predicates.md | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab1161bf438..7132bf00d0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-30 Andrew Stubbs + + * config/gcn/gcn.c (print_operand): Handle LTGT. + * config/gcn/predicates.md (gcn_fp_compare_operator): Allow ltgt. + 2020-01-30 Richard Biener * tree-pretty-print.c (dump_generic_node): Wrap VECTOR_CST diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index c78df1d5e3e..a39e9f3fbd6 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -5929,6 +5929,9 @@ print_operand (FILE *file, rtx x, int code) case UNORDERED: s = "_u_"; break; + case LTGT: + s = "_lg_"; + break; default: output_operand_lossage ("invalid %%xn code"); return; diff --git a/gcc/config/gcn/predicates.md b/gcc/config/gcn/predicates.md index 2f904b1f131..7bf763a4ba5 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")) + (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu,ordered,unordered,ltgt")) (define_predicate "unary_operator" (match_code "not,popcount")) -- 2.30.2