diff options
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index db76174..da99321 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2113,6 +2113,7 @@ static tree gimple_signed_or_unsigned_type (bool unsignedp, tree type) { tree type1; + int i; type1 = TYPE_MAIN_VARIANT (type); if (type1 == signed_char_type_node @@ -2130,10 +2131,15 @@ gimple_signed_or_unsigned_type (bool unsignedp, tree type) return unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node; - if (int128_integer_type_node && (type1 == int128_integer_type_node || type1 == int128_unsigned_type_node)) - return unsignedp - ? int128_unsigned_type_node - : int128_integer_type_node; + + for (i = 0; i < NUM_INT_N_ENTS; i ++) + if (int_n_enabled_p[i] + && (type1 == int_n_trees[i].unsigned_type + || type1 == int_n_trees[i].signed_type)) + return unsignedp + ? int_n_trees[i].unsigned_type + : int_n_trees[i].signed_type; + #if HOST_BITS_PER_WIDE_INT >= 64 if (type1 == intTI_type_node || type1 == unsigned_intTI_type_node) return unsignedp ? unsigned_intTI_type_node : intTI_type_node; @@ -2246,10 +2252,14 @@ gimple_signed_or_unsigned_type (bool unsignedp, tree type) return (unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node); - if (int128_integer_type_node && TYPE_OK (int128_integer_type_node)) - return (unsignedp - ? int128_unsigned_type_node - : int128_integer_type_node); + + for (i = 0; i < NUM_INT_N_ENTS; i ++) + if (int_n_enabled_p[i] + && TYPE_MODE (type) == int_n_data[i].m + && TYPE_PRECISION (type) == int_n_data[i].bitsize) + return unsignedp + ? int_n_trees[i].unsigned_type + : int_n_trees[i].signed_type; #if HOST_BITS_PER_WIDE_INT >= 64 if (TYPE_OK (intTI_type_node)) |