aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/lto-lang.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/lto/lto-lang.cc b/gcc/lto/lto-lang.cc
index 7018dfa..1b2a4a6 100644
--- a/gcc/lto/lto-lang.cc
+++ b/gcc/lto/lto-lang.cc
@@ -1004,6 +1004,11 @@ lto_type_for_mode (machine_mode mode, int unsigned_p)
if (mode == TYPE_MODE (long_double_type_node))
return long_double_type_node;
+ for (i = 0; i < NUM_FLOATN_NX_TYPES; i++)
+ if (FLOATN_NX_TYPE_NODE (i) != NULL_TREE
+ && mode == TYPE_MODE (FLOATN_NX_TYPE_NODE (i)))
+ return FLOATN_NX_TYPE_NODE (i);
+
if (mode == TYPE_MODE (void_type_node))
return void_type_node;
@@ -1029,6 +1034,11 @@ lto_type_for_mode (machine_mode mode, int unsigned_p)
if (mode == TYPE_MODE (complex_long_double_type_node))
return complex_long_double_type_node;
+ for (i = 0; i < NUM_FLOATN_NX_TYPES; i++)
+ if (COMPLEX_FLOATN_NX_TYPE_NODE (i) != NULL_TREE
+ && mode == TYPE_MODE (COMPLEX_FLOATN_NX_TYPE_NODE (i)))
+ return COMPLEX_FLOATN_NX_TYPE_NODE (i);
+
if (mode == TYPE_MODE (complex_integer_type_node) && !unsigned_p)
return complex_integer_type_node;
@@ -1154,9 +1164,13 @@ lto_type_for_mode (machine_mode mode, int unsigned_p)
}
for (t = registered_builtin_types; t; t = TREE_CHAIN (t))
- if (TYPE_MODE (TREE_VALUE (t)) == mode)
- return TREE_VALUE (t);
-
+ {
+ tree type = TREE_VALUE (t);
+ if (TYPE_MODE (type) == mode
+ && VECTOR_TYPE_P (type) == VECTOR_MODE_P (mode)
+ && !!unsigned_p == !!TYPE_UNSIGNED (type))
+ return type;
+ }
return NULL_TREE;
}