#include "tm.h"
#include "ggc.h"
#include "tree.h"
+#include "stor-layout.h"
#include "target.h"
#include "basic-block.h"
#include "gimple-pretty-print.h"
+#include "gimple.h"
#include "gimplify.h"
+#include "gimple-iterator.h"
#include "gimple-ssa.h"
#include "tree-phinodes.h"
#include "ssa-iterators.h"
+#include "stringpool.h"
#include "tree-ssanames.h"
#include "cfgloop.h"
#include "expr.h"
*type_out = NULL_TREE;
/* Catch squaring. */
- if ((host_integerp (exp, 0)
- && tree_low_cst (exp, 0) == 2)
+ if ((tree_fits_shwi_p (exp)
+ && tree_to_shwi (exp) == 2)
|| (TREE_CODE (exp) == REAL_CST
&& REAL_VALUES_EQUAL (TREE_REAL_CST (exp), dconst2)))
{
if (TREE_CODE (def) == INTEGER_CST)
{
- if (!host_integerp (def, 1)
- || (unsigned HOST_WIDE_INT) tree_low_cst (def, 1)
- >= GET_MODE_PRECISION (TYPE_MODE (type))
+ if (!tree_fits_uhwi_p (def)
+ || tree_to_uhwi (def) >= GET_MODE_PRECISION (TYPE_MODE (type))
|| integer_zerop (def))
return NULL;
def2 = build_int_cst (stype,
GET_MODE_PRECISION (TYPE_MODE (type))
- - tree_low_cst (def, 1));
+ - tree_to_uhwi (def));
}
else
{
return pattern_stmt;
}
- if (!host_integerp (oprnd1, TYPE_UNSIGNED (itype))
- || integer_zerop (oprnd1)
- || prec > HOST_BITS_PER_WIDE_INT)
+ if (prec > HOST_BITS_PER_WIDE_INT
+ || integer_zerop (oprnd1))
return NULL;
if (!can_mult_highpart_p (TYPE_MODE (vectype), TYPE_UNSIGNED (itype)))
{
unsigned HOST_WIDE_INT mh, ml;
int pre_shift, post_shift;
- unsigned HOST_WIDE_INT d = tree_low_cst (oprnd1, 1)
- & GET_MODE_MASK (TYPE_MODE (itype));
+ unsigned HOST_WIDE_INT d = (TREE_INT_CST_LOW (oprnd1)
+ & GET_MODE_MASK (TYPE_MODE (itype)));
tree t1, t2, t3, t4;
if (d >= ((unsigned HOST_WIDE_INT) 1 << (prec - 1)))
{
unsigned HOST_WIDE_INT ml;
int post_shift;
- HOST_WIDE_INT d = tree_low_cst (oprnd1, 0);
+ HOST_WIDE_INT d = TREE_INT_CST_LOW (oprnd1);
unsigned HOST_WIDE_INT abs_d;
bool add = false;
tree t1, t2, t3, t4;
else
t3 = t2;
- double_int oprnd0_min, oprnd0_max;
+ widest_int oprnd0_min, oprnd0_max;
int msb = 1;
if (get_range_info (oprnd0, &oprnd0_min, &oprnd0_max) == VR_RANGE)
{
- if (!oprnd0_min.is_negative ())
+ if (!wi::neg_p (oprnd0_min))
msb = 0;
- else if (oprnd0_max.is_negative ())
+ else if (wi::neg_p (oprnd0_max))
msb = -1;
}