This is the mail archive of the gcc@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]

Re: GCC Benchmarks (coybench), AMD64 and i686, 14 August 2004


Paolo Bonzini wrote:

Now one *would* think that GCC was optimized specially for this benchmark! :-)

Great!


However, for non-cmov case, gcc currently generates one conditional and one nonconditional jump for code "(a < b) ? a : b":

...

      sahf
      ja .L6
      fstp  %st(0)
      jmp .L4
      .p2align 4,,7
.L6:
      fstp  %st(1)
.L4:
      fsincos
      ...

icc in this case generates only one conditional jump:

      ...
      sahf                                                    #63.28
      ja        .L9           # Prob 50%                      #63.28
      fst       %st(1)                                        #63.28
.L9:                                                            #
      fstp      %st(0)                                        #63.28
      fsincos                                                 #63.18

...

Imho even better code could be generated in this case:

      ...
      sahf
      ja .L6
      fxch
.L6:
      fstp  %st(0)
      fsincos
      ...

Uros.


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