http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49572
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-30
09:01:00 UTC ---
> After tuplification, DOM records the type of the LHS of assignment statements
> as the type of the expression. And then it tests the compatibility of these
> types.
Maybe DOM could use the type of the RHS instead in the GIMPLE_SINGLE_RHS case.
On the 4.4 branch, the code generated for the testcase at -O2 is pessimized:
--- old//20030709-2.s 2011-06-30 10:41:30.000000000 +0200
+++ new/20030709-2.s 2011-06-29 12:01:55.000000000 +0200
@@ -8,7 +8,8 @@
movl %esp, %ebp
movl 8(%ebp), %eax
popl %ebp
- cmpl $1, (%eax)
+ movl (%eax), %eax
+ cmpl $1, %eax
sbbl %eax, %eax
ret
.size get_alias_set, .-get_alias_set
but it isn't on the other branches. But DOM is hindered on all branches.