On 5/8/05, Steven Bosscher <[EMAIL PROTECTED]> wrote:
> Hi,
Hello,

> I have looked at the GCSE CPROP passes with CSE path following
> disabled ("-O1 -fgcse --param max-cse-path-length=1").  The input
> code are the cc1-i files from 20040726 (with checking enabled).
While that discussion flies way above my head, it seems to be about
gcse and i have enough grievance about it to jump in.

I've just pinged PR19680 (because it's still there) and just for the
sake of it i've tried the newly reported PR21463 with -fno-gcse and
it's quite interesting.

as reported, with gcse:
0000000000400610 <foo_t<float>::bar_ref(float, float)>:
  400610:       ucomiss 0x4(%rdi),%xmm1
  400614:       lea    0x4(%rdi),%rax
  400618:       lea    0xfffffffffffffff8(%rsp),%rdx
  40061d:       movss  %xmm0,0xfffffffffffffffc(%rsp)
  400623:       movss  %xmm1,0xfffffffffffffff8(%rsp)
  400629:       movaps %xmm1,%xmm2
  40062c:       cmova  %rdx,%rax
  400630:       movss  (%rax),%xmm1
  400634:       ucomiss %xmm1,%xmm0
  400637:       ja     400641 <foo_t<float>::bar_ref(float, float)+0x31>
  400639:       lea    0xfffffffffffffffc(%rsp),%rax
  40063e:       movaps %xmm0,%xmm1
  400641:       ucomiss (%rdi),%xmm2
  400644:       cmova  %rdi,%rdx
  400648:       movss  (%rdx),%xmm0
  40064c:       ucomiss %xmm0,%xmm1
  40064f:       jbe    400655 <foo_t<float>::bar_ref(float, float)+0x45>
  400651:       movss  (%rax),%xmm0
  400655:       repz retq

without:
0000000000400610 <foo_t<float>::bar_ref(float, float)>:
  400610:       movss  %xmm0,0xfffffffffffffffc(%rsp)
  400616:       lea    0xfffffffffffffff8(%rsp),%rcx
  40061b:       lea    0x4(%rdi),%rax
  40061f:       movss  %xmm1,0xfffffffffffffff8(%rsp)
  400625:       lea    0xfffffffffffffffc(%rsp),%rdx
  40062a:       ucomiss 0x4(%rdi),%xmm1
  40062e:       cmova  %rcx,%rax
  400632:       ucomiss (%rax),%xmm0
  400635:       cmovbe %rdx,%rax
  400639:       ucomiss (%rdi),%xmm1
  40063c:       movss  (%rax),%xmm0
  400640:       cmovbe %rcx,%rdi
  400644:       ucomiss (%rdi),%xmm0
  400647:       cmova  %rax,%rdi
  40064b:       movss  (%rdi),%xmm0
  40064f:       retq

Again, sorry for hijacking that thread, but gcse is a convenient
scapegoat for most of my performance/codegen problems and i'd like to
know if there's mid-term hope.

Regards,
Thierry.

Reply via email to