* [HSA] Add support for unordered comparions codes
@ 2015-08-28 14:53 Martin Jambor
0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2015-08-28 14:53 UTC (permalink / raw)
To: GCC Patches
Hi,
I've committed the following simple patch to the branch to add missing
support for unordered compariosn codes.
Martin
2015-08-28 Martin Jambor <mjambor@suse.cz>
* hsa-gen.c (gen_hsa_cmp_insn_from_gimple): Add unordered
comparison codes.
(gen_hsa_insns_for_operation_assignment): Likewise.
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index 213b564..92df7e4 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -2236,6 +2236,31 @@ gen_hsa_cmp_insn_from_gimple (enum tree_code code, tree lhs, tree rhs,
case NE_EXPR:
compare = BRIG_COMPARE_NE;
break;
+ case UNORDERED_EXPR:
+ compare = BRIG_COMPARE_NAN;
+ break;
+ case ORDERED_EXPR:
+ compare = BRIG_COMPARE_NUM;
+ break;
+ case UNLT_EXPR:
+ compare = BRIG_COMPARE_LTU;
+ break;
+ case UNLE_EXPR:
+ compare = BRIG_COMPARE_LEU;
+ break;
+ case UNGT_EXPR:
+ compare = BRIG_COMPARE_GTU;
+ break;
+ case UNGE_EXPR:
+ compare = BRIG_COMPARE_GEU;
+ break;
+ case UNEQ_EXPR:
+ compare = BRIG_COMPARE_EQU;
+ break;
+ case LTGT_EXPR:
+ compare = BRIG_COMPARE_NEU;
+ break;
+
default:
sorry ("Support for HSA does not implement comparison tree code %s\n",
get_tree_code_name (code));
@@ -2494,6 +2519,14 @@ gen_hsa_insns_for_operation_assignment (gimple assign, hsa_bb *hbb,
case GE_EXPR:
case EQ_EXPR:
case NE_EXPR:
+ case UNORDERED_EXPR:
+ case ORDERED_EXPR:
+ case UNLT_EXPR:
+ case UNLE_EXPR:
+ case UNGT_EXPR:
+ case UNGE_EXPR:
+ case UNEQ_EXPR:
+ case LTGT_EXPR:
{
hsa_op_reg *dest = hsa_reg_for_gimple_ssa (gimple_assign_lhs (assign),
ssa_map);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-28 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28 14:53 [HSA] Add support for unordered comparions codes Martin Jambor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).