This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/21463] min/max and references


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]