diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2014-05-06 16:25:05 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2014-05-06 16:25:05 +0000 |
commit | 807e902eea17f3132488c256c963823976b2348c (patch) | |
tree | e5e1af94eb1502ba893bd6ce4a11f68877ff62a9 /gcc/combine.c | |
parent | 6122336c832dc4dfedc49279549caddce86306ff (diff) | |
download | gcc-807e902eea17f3132488c256c963823976b2348c.zip gcc-807e902eea17f3132488c256c963823976b2348c.tar.gz gcc-807e902eea17f3132488c256c963823976b2348c.tar.bz2 |
Merge in wide-int.
From-SVN: r210113
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 1096bad..a2f42c5 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2671,22 +2671,15 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, offset = -1; } - if (offset >= 0 - && (GET_MODE_PRECISION (GET_MODE (SET_DEST (temp))) - <= HOST_BITS_PER_DOUBLE_INT)) + if (offset >= 0) { - double_int m, o, i; rtx inner = SET_SRC (PATTERN (i3)); rtx outer = SET_SRC (temp); - o = rtx_to_double_int (outer); - i = rtx_to_double_int (inner); - - m = double_int::mask (width); - i &= m; - m = m.llshift (offset, HOST_BITS_PER_DOUBLE_INT); - i = i.llshift (offset, HOST_BITS_PER_DOUBLE_INT); - o = o.and_not (m) | i; + wide_int o + = wi::insert (std::make_pair (outer, GET_MODE (SET_DEST (temp))), + std::make_pair (inner, GET_MODE (dest)), + offset, width); combine_merges++; subst_insn = i3; @@ -2699,7 +2692,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, resulting insn the new pattern for I3. Then skip to where we validate the pattern. Everything was set up above. */ SUBST (SET_SRC (temp), - immed_double_int_const (o, GET_MODE (SET_DEST (temp)))); + immed_wide_int_const (o, GET_MODE (SET_DEST (temp)))); newpat = PATTERN (i2); @@ -5139,7 +5132,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy) if (! x) x = gen_rtx_CLOBBER (mode, const0_rtx); } - else if (CONST_INT_P (new_rtx) + else if (CONST_SCALAR_INT_P (new_rtx) && GET_CODE (x) == ZERO_EXTEND) { x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x), |