summaryrefslogtreecommitdiff
path: root/gcc/graphite-clast-to-gimple.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 16:39:47 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 16:39:47 +0000
commitd23456ee6e7a65946ccc7fefd7f6f45b1bfb3c24 (patch)
tree62bf01a6d9429070dae6e2ddd858ecae30dad4a6 /gcc/graphite-clast-to-gimple.c
parent0812914835fc52792631d284676a263031c04a4d (diff)
downloadgcc-d23456ee6e7a65946ccc7fefd7f6f45b1bfb3c24.tar.gz
Use smallest_mode_for_size for computing the precision types of new graphite IVs.
2010-06-02 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (gcc_type_for_interval): Use smallest_mode_for_size for computing the precision types of new graphite IVs. Do not call lang_hooks.types.type_for_size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-clast-to-gimple.c')
-rw-r--r--gcc/graphite-clast-to-gimple.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index b0e1a94bc25..3240c37f8cf 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -478,6 +478,7 @@ gcc_type_for_interval (mpz_t low, mpz_t up, tree old_type)
bool unsigned_p = true;
int precision, prec_up, prec_int;
tree type;
+ enum machine_mode mode;
gcc_assert (value_le (low, up));
@@ -490,7 +491,16 @@ gcc_type_for_interval (mpz_t low, mpz_t up, tree old_type)
prec_int = precision_for_interval (low, up);
precision = prec_up > prec_int ? prec_up : prec_int;
- type = lang_hooks.types.type_for_size (precision, unsigned_p);
+ if (precision > BITS_PER_WORD)
+ {
+ gloog_error = true;
+ return integer_type_node;
+ }
+
+ mode = smallest_mode_for_size (precision, MODE_INT);
+ precision = GET_MODE_PRECISION (mode);
+ type = build_nonstandard_integer_type (precision, unsigned_p);
+
if (!type)
{
gloog_error = true;