This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix typo/thinko in recent tree-ssa-dse.c change
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Jul 2018 17:58:56 -0600
- Subject: [committed] Fix typo/thinko in recent tree-ssa-dse.c change
I meant to mask off low bits in the head trim and wrote...
- *trim_head &= (UNITS_PER_WORD - 1);
Which, of course is wrong as it's missing the bit-not.
This led to a regression on at least one 32bit target for pr30375's
testcase.
This patch adds the missing bit-not. It fixes the regression on i686.
I was briefly worried because a couple of libgomp tests failed. But
after deeper investigation it turns out they can fail due to resource
limitations. I re-ran those tests independently and with a much lower
parallelism factor and they all passed.
Installed on the trunk after bootstrapping x86_64 and regression testing
x86_64 and the -m32 multilib.
Jeff
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index ebc4a1e..4cb8c0f8 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -260,7 +260,7 @@ compute_trims (ao_ref *ref, sbitmap live, int *trim_head, int *trim_tail,
/* If more than a word remains, then make sure to keep the
starting point at least word aligned. */
if (last_live - first_live > UNITS_PER_WORD)
- *trim_head &= (UNITS_PER_WORD - 1);
+ *trim_head &= ~(UNITS_PER_WORD - 1);
if ((*trim_head || *trim_tail)
&& dump_file && (dump_flags & TDF_DETAILS))