This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
tree-ssa/20030807-4.c
- From: Richard Henderson <rth at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Feb 2004 23:54:09 -0800
- Subject: tree-ssa/20030807-4.c
Um, how is it that you expect two if's here?
cppchar_t i = 0, overflow = 0;
while (*pstr < limit)
{
overflow |= i ^ (i << 4 >> 4);
i = arf ();
}
if (overflow | (i != (i & mask)))
I don't see anything that proves that overflow must
contain a non-zero value. The IFs that I see in the
current dom3 are:
if (T.3<D1069>_15 < limit<D1056>_16) goto <L0>; else goto <L2>;
The while loop. Clearly needed.
if (T.9<D1077>_17 != i<D1060>_1) goto <L12>; else goto <L7>;
Implementing (i != (i & mask)). We seem to be
somewhat schitzophrenic about doing
T = (x != 0)
vs
if (x != 0)
T = 1
else
T = 0
We should probably pick one or the other, and
canonicalize on it. I'm not sure what's better
for either rtl or tree-ssa optimizers.
Anyway, we thread the true edge going out,
which means we're left with ...
if (overflow<D1061>_2 != 0) goto <L12>; else goto <L13>;
This check. We do skip the OR.
You say at
http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00704.html
only that a patch is "in testing". Did it ever get done?
I might assume the test should be xfailed, but given the
above I'm not sure that it shouldn't just be deleted.
What did you have in mind, exactly?
r~