From b15e4689e6b6c582c89d57eeb79fedc8b6081aeb Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 26 Feb 2016 18:42:06 +0100 Subject: [hsa] Satisfy conditional move operand type constrains 2016-02-26 Martin Jambor * hsa.h (is_a_helper): New overload for hsa_op_immed for hsa_op_with_type operands. (hsa_unsigned_type_for_type): Declare. * hsa.c (hsa_unsigned_type_for_type): New function. * hsa-gen.c (gen_hsa_binary_operation): Use hsa_unsigned_type_for_type. (gen_hsa_insns_for_operation_assignment): Satisfy constrains of the finalizer. Do not emit extra move. From-SVN: r233749 --- gcc/hsa.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/hsa.c') diff --git a/gcc/hsa.c b/gcc/hsa.c index f0b3205..9537e29 100644 --- a/gcc/hsa.c +++ b/gcc/hsa.c @@ -472,6 +472,14 @@ hsa_bittype_for_type (BrigType16_t t) return hsa_bittype_for_bitsize (hsa_type_bit_size (t)); } +/* Return HSA unsigned integer type with the same size as the type T. */ + +BrigType16_t +hsa_unsigned_type_for_type (BrigType16_t t) +{ + return hsa_uint_for_bitsize (hsa_type_bit_size (t)); +} + /* Return true if and only if TYPE is a floating point number type. */ bool -- cgit v1.1