This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21463] min/max and references
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2005 17:38:10 -0000
- Subject: [Bug tree-optimization/21463] min/max and references
- References: <20050509083649.21463.tbptbp@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-24 17:38 -------
On the mainline we get:
_ZN5foo_tIfE7bar_refEff:
.LFB661:
ucomiss 4(%rdi), %xmm1
leaq -8(%rsp), %rdx
leaq 4(%rdi), %rax
movss %xmm0, -4(%rsp)
movss %xmm1, -8(%rsp)
cmova %rdx, %rax
ucomiss (%rdi), %xmm1
movss (%rax), %xmm0
minss -4(%rsp), %xmm0
cmova %rdi, %rdx
movss (%rdx), %xmm1
maxss %xmm1, %xmm0
ret
But on the tree level, there are a couple of issues.
The first is that, we have
a_1 = &b_2->c;
temp_3 = *a_1;
...
use a_1
Which really should be converted to
temp_3 = b_2->c;
Which will help.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21463