aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2015-06-12 01:59:31 -0400
committerDJ Delorie <dj@gcc.gnu.org>2015-06-12 01:59:31 -0400
commit44c42705d0210d2759aa76de325fbfede5905d53 (patch)
tree6d2d376897e616c704b816e61e2d7c8868c884cc /gcc/lto
parent1b92614483f4393a90e4359c5b0365eb9d366927 (diff)
downloadgcc-44c42705d0210d2759aa76de325fbfede5905d53.zip
gcc-44c42705d0210d2759aa76de325fbfede5905d53.tar.gz
gcc-44c42705d0210d2759aa76de325fbfede5905d53.tar.bz2
lto-lang.c (lto_type_for_size): Include intN types.
* lto-lang.c (lto_type_for_size): Include intN types. (lto_type_for_mode): Likewise. From-SVN: r224408
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-lang.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 5d0e888..9665bf0 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-12 DJ Delorie <dj@redhat.com>
+
+ * lto-lang.c (lto_type_for_size): Include intN types.
+ (lto_type_for_mode): Likewise.
+
2015-06-08 Jan Hubicka <hubicka@ucw.cz>
* lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index f9c908a..349abef 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -830,6 +830,8 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
static tree
lto_type_for_size (unsigned precision, int unsignedp)
{
+ int i;
+
if (precision == TYPE_PRECISION (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
@@ -847,6 +849,12 @@ lto_type_for_size (unsigned precision, int unsignedp)
? long_long_unsigned_type_node
: long_long_integer_type_node;
+ for (i = 0; i < NUM_INT_N_ENTS; i ++)
+ if (int_n_enabled_p[i]
+ && precision == int_n_data[i].bitsize)
+ return (unsignedp ? int_n_trees[i].unsigned_type
+ : int_n_trees[i].signed_type);
+
if (precision <= TYPE_PRECISION (intQI_type_node))
return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
@@ -876,6 +884,7 @@ static tree
lto_type_for_mode (machine_mode mode, int unsigned_p)
{
tree t;
+ int i;
if (mode == TYPE_MODE (integer_type_node))
return unsigned_p ? unsigned_type_node : integer_type_node;
@@ -892,6 +901,12 @@ lto_type_for_mode (machine_mode mode, int unsigned_p)
if (mode == TYPE_MODE (long_long_integer_type_node))
return unsigned_p ? long_long_unsigned_type_node : long_long_integer_type_node;
+ for (i = 0; i < NUM_INT_N_ENTS; i ++)
+ if (int_n_enabled_p[i]
+ && mode == int_n_data[i].m)
+ return (unsigned_p ? int_n_trees[i].unsigned_type
+ : int_n_trees[i].signed_type);
+
if (mode == QImode)
return unsigned_p ? unsigned_intQI_type_node : intQI_type_node;