tree itype = TREE_TYPE (loop->v);
if (POINTER_TYPE_P (itype))
- itype
- = lang_hooks.types.type_for_size (TYPE_PRECISION (itype), 0);
+ itype = signed_type_for (itype);
t = build_int_cst (itype, (loop->cond_code == LT_EXPR ? -1 : 1));
t = fold_build2_loc (loc,
PLUS_EXPR, itype,
tree itype = TREE_TYPE (fd->loops[i].v);
if (POINTER_TYPE_P (itype))
- itype = lang_hooks.types.type_for_size (TYPE_PRECISION (itype), 0);
+ itype = signed_type_for (itype);
t = build_int_cst (itype, (fd->loops[i].cond_code == LT_EXPR
? -1 : 1));
t = fold_build2 (PLUS_EXPR, itype,
&& TYPE_PRECISION (type) != TYPE_PRECISION (fd->iter_type))
{
/* Avoid casting pointers to integer of a different size. */
- tree itype
- = lang_hooks.types.type_for_size (TYPE_PRECISION (type), 0);
+ tree itype = signed_type_for (type);
t1 = fold_convert (fd->iter_type, fold_convert (itype, fd->loop.n2));
t0 = fold_convert (fd->iter_type, fold_convert (itype, fd->loop.n1));
}
if (bias)
t = fold_build2 (MINUS_EXPR, fd->iter_type, t, bias);
if (POINTER_TYPE_P (type))
- t = fold_convert (lang_hooks.types.type_for_size (TYPE_PRECISION (type),
- 0), t);
+ t = fold_convert (signed_type_for (type), t);
t = fold_convert (type, t);
t = force_gimple_operand_gsi (&gsi, t, false, NULL_TREE,
false, GSI_CONTINUE_LINKING);
if (bias)
t = fold_build2 (MINUS_EXPR, fd->iter_type, t, bias);
if (POINTER_TYPE_P (type))
- t = fold_convert (lang_hooks.types.type_for_size (TYPE_PRECISION (type),
- 0), t);
+ t = fold_convert (signed_type_for (type), t);
t = fold_convert (type, t);
iend = force_gimple_operand_gsi (&gsi, t, true, NULL_TREE,
false, GSI_CONTINUE_LINKING);
tree vtype = TREE_TYPE (fd->loops[i].v), itype;
itype = vtype;
if (POINTER_TYPE_P (vtype))
- itype = lang_hooks.types.type_for_size (TYPE_PRECISION (vtype), 0);
+ itype = signed_type_for (vtype);
t = fold_build2 (TRUNC_MOD_EXPR, type, tem, counts[i]);
t = fold_convert (itype, t);
t = fold_build2 (MULT_EXPR, itype, t,
itype = type = TREE_TYPE (fd->loop.v);
if (POINTER_TYPE_P (type))
- itype = lang_hooks.types.type_for_size (TYPE_PRECISION (type), 0);
+ itype = signed_type_for (type);
entry_bb = region->entry;
cont_bb = region->cont;
itype = type = TREE_TYPE (fd->loop.v);
if (POINTER_TYPE_P (type))
- itype = lang_hooks.types.type_for_size (TYPE_PRECISION (type), 0);
+ itype = signed_type_for (type);
entry_bb = region->entry;
se = split_block (entry_bb, last_stmt (entry_bb));
? size_int (-TYPE_VECTOR_SUBPARTS (vectype) + 1) : NULL_TREE;
tree start_addr = vect_create_addr_base_for_vector_ref (dr_stmt,
&new_stmts, offset, loop);
- tree ptr_type = TREE_TYPE (start_addr);
- tree size = TYPE_SIZE (ptr_type);
- tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
+ tree type = unsigned_type_for (TREE_TYPE (start_addr));
tree vectype_size_minus_1 = build_int_cst (type, vectype_align - 1);
tree elem_size_log =
build_int_cst (type, exact_log2 (vectype_align/nelements));
int mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
tree mask_cst;
unsigned int i;
- tree psize;
tree int_ptrsize_type;
char tmp_name[20];
tree or_tmp_name = NULL_TREE;
all zeros followed by all ones. */
gcc_assert ((mask != 0) && ((mask & (mask+1)) == 0));
- /* CHECKME: what is the best integer or unsigned type to use to hold a
- cast from a pointer value? */
- psize = TYPE_SIZE (ptr_type_node);
- int_ptrsize_type
- = lang_hooks.types.type_for_size (tree_low_cst (psize, 1), 0);
+ int_ptrsize_type = signed_type_for (ptr_type_node);
/* Create expression (mask & (dr_1 || ... || dr_n)) where dr_i is the address
of the first vector of the i'th data reference. */