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

Re: Draft "Unsafe fp optimizations" project description.

<<But it could benefit from a subsetted option "-fthumb-nose-at-ieee"
which doesn't worry about -0 or Inf or NaN or denorms.

I actually think this can reasonably be the default, there is nothing in
C which requires -0 semantics??? Then do this stuff only in -mieee mode.

Your list of transformations is interesting

  2818 x/C => x*(1/C)
   477 x relop x => const
   349 x+0 => x
   158 x*0 => 0
   157 x-0 => x
   126 -(x-y) => y-x
    61 0-x => -x
    35 -x + y -> y-x
    19 x - -y => x+y
     8 0/x => 0
     3 x-x => 0

Some of these seem to be value preserving transformations. All of them
are value preserving except for minus zero. I wonder if it is really
appropriate to worry so much about minus zeroes in default mode, it
seems wrong to me.

For the x/C => x*(1/C), it would be interesting to know the distribution
of constants to know how many are idempotent transformations (or does
gcc always transform x/2.0 to x*0.5 [this latter transformation should
definition be done by default].

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