diff options
author | Martin Jambor <mjambor@suse.cz> | 2016-02-26 18:42:06 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2016-02-26 18:42:06 +0100 |
commit | b15e4689e6b6c582c89d57eeb79fedc8b6081aeb (patch) | |
tree | 8379ac80524de2a88452679ab20844956ad1fd06 /gcc/hsa.c | |
parent | 02108bb58c6905cc74eb4833067f39f92f5c9a6e (diff) | |
download | gcc-b15e4689e6b6c582c89d57eeb79fedc8b6081aeb.zip gcc-b15e4689e6b6c582c89d57eeb79fedc8b6081aeb.tar.gz gcc-b15e4689e6b6c582c89d57eeb79fedc8b6081aeb.tar.bz2 |
[hsa] Satisfy conditional move operand type constrains
2016-02-26 Martin Jambor <mjambor@suse.cz>
* 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
Diffstat (limited to 'gcc/hsa.c')
-rw-r--r-- | gcc/hsa.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |