This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix ACATS failures in GCC 3.4
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: roger at eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Feb 04 17:33:49 EST
- Subject: Re: [PATCH] Fix ACATS failures in GCC 3.4
Ahh! Then I believe that its the code in fold that swaps commutative
operands that's at fault. I think those lines should be modified to
read (around 5454 of fold-const.c):
if (commutative_tree_code (code)
&& tree_swap_operands_p (arg0, arg1, true))
return fold (build (code, type, TREE_OPERAND (t, 1),
TREE_OPERAND (t, 0)));
i.e. using "TREE_OPERAND (t, x)" instead of "argx", and therefore
avoiding the problematic loss of type conversions.
Yes, most certainly!
Could you try with this change (and reverting your proposed fix) and
see if it also resolves the ACATS failures?
Indeed, you are probably correct that the code there need only test for
comparisons, not RSHIFT either ...
Of course, you're probably right that there's also an issue with
the MAX_EXPR and MIN_EXPR RTL expanders,
I don't see one: if the tree has inconsistent types, it's a garbage-in,