This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/55611] Operand swapping for commutative operators
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Dec 2012 22:12:01 +0000
- Subject: [Bug rtl-optimization/55611] Operand swapping for commutative operators
- Auto-submitted: auto-generated
- References: <bug-55611-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55611
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> 2012-12-11 22:12:01 UTC ---
Created attachment 28931
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28931
Use tree code to determine the canonical order
In this patch, I remove the external calls to commutative_operand_precedence,
and I compare GET_CODEs when the current function would say the arguments are
equivalent. This passes bootstrap+testsuite except for one test:
gfortran.dg/pr43229.f90 -O (internal compiler error)
that I killed when it was 12GB.
I also tried the reverse order (just swap x and y in the GET_CODE comparison).
It got a crazy process during stage3 compiling tree-ssa-address.c (I killed it
at 40GB). Before that, I had tried parts of the testsuite with a
non-bootstrapped compiler, and it seemed to pass just fine.