diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-09-11 05:28:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-09-11 05:28:36 +0000 |
commit | d233dc1e100d26d096d09f95003a034ef9f33f7d (patch) | |
tree | a91397b29e6e6a6e8e9e9a3efc7843b4a5de20a6 /4.1.1 | |
parent | no longer needed (diff) | |
download | gcc-patches-d233dc1e100d26d096d09f95003a034ef9f33f7d.tar.gz gcc-patches-d233dc1e100d26d096d09f95003a034ef9f33f7d.tar.bz2 gcc-patches-d233dc1e100d26d096d09f95003a034ef9f33f7d.zip |
fix from upstream for #135718
Diffstat (limited to '4.1.1')
-rw-r--r-- | 4.1.1/gentoo/31_all_gcc4-pr28386.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/4.1.1/gentoo/31_all_gcc4-pr28386.patch b/4.1.1/gentoo/31_all_gcc4-pr28386.patch new file mode 100644 index 0000000..679ee65 --- /dev/null +++ b/4.1.1/gentoo/31_all_gcc4-pr28386.patch @@ -0,0 +1,57 @@ +http://bugs.gentoo.org/135718 +http://gcc.gnu.org/PR28386 + +2006-09-05 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR rtl-optimization/28386 + * loop.c (biased_biv_may_wrap_p): Rename to biv_may_wrap_p and + remove 'bias' parameter. + (maybe_eliminate_biv_1): Adjust for above change. + +--- branches/gcc-4_1-branch/gcc/loop.c 2006/09/05 07:05:08 116692 ++++ branches/gcc-4_1-branch/gcc/loop.c 2006/09/05 07:06:46 116693 +@@ -8824,14 +8824,13 @@ + } + + +-/* Return false iff it is provable that biv BL plus BIAS will not wrap +- at any point in its update sequence. Note that at the rtl level we +- may not have information about the signedness of BL; in that case, +- check for both signed and unsigned overflow. */ ++/* Return false iff it is provable that biv BL will not wrap at any point ++ in its update sequence. Note that at the RTL level we may not have ++ information about the signedness of BL; in that case, check for both ++ signed and unsigned overflow. */ + + static bool +-biased_biv_may_wrap_p (const struct loop *loop, struct iv_class *bl, +- unsigned HOST_WIDE_INT bias) ++biv_may_wrap_p (const struct loop *loop, struct iv_class *bl) + { + HOST_WIDE_INT incr; + bool check_signed, check_unsigned; +@@ -8867,12 +8866,12 @@ + mode = GET_MODE (bl->biv->src_reg); + + if (check_unsigned +- && !biased_biv_fits_mode_p (loop, bl, incr, mode, bias)) ++ && !biased_biv_fits_mode_p (loop, bl, incr, mode, 0)) + return true; + + if (check_signed) + { +- bias += (GET_MODE_MASK (mode) >> 1) + 1; ++ unsigned HOST_WIDE_INT bias = (GET_MODE_MASK (mode) >> 1) + 1; + if (!biased_biv_fits_mode_p (loop, bl, incr, mode, bias)) + return true; + } +@@ -10306,8 +10305,7 @@ + valid programs. */ + /* Without lifetime analysis, we don't know how COMPARE will be + used, so we must assume the worst. */ +- if (code != EQ && code != NE +- && biased_biv_may_wrap_p (loop, bl, INTVAL (arg))) ++ if (code != EQ && code != NE && biv_may_wrap_p (loop, bl)) + return 0; + + /* Try to replace with any giv that has constant positive mult_val |