(j3.2006) BEQ, BNE?

Van Snyder Van.Snyder
Fri Feb 1 15:07:31 EST 2013


On Fri, 2013-02-01 at 10:10 -0700, Keith Bierman wrote:
> The no so obvious thing is what cost(s) that may impose on the
> implementors. Folks who were certain there were fixed numbers of
> intrinsics may have "hard" limits, the interactions with optimization
> and debuggers, etc. Different implementors could face very different
> costs (from what very little I recall of the NAG compiler, once upon a
> time I think it would have been small for Malcolm). For some other
> compilers, not so small (not huge, but the combination of scarce
> development, integration and test resources for most compiler groups
> should never be underestimated. The more highly optimizing the
> environment, the more likely it is that even trivial changes will have
> more considerable impact).

Bob Corbett argued that if one has written

  if ( popcnt(ieor(i,j)) == 0 )
or
  if ( BLE(i,j) .and. BLE(j,i) )
or
  if ( BGE(i,j) .and. BGE(j,i) )
or
  any of the dozen or so other ways to say the same thing,

a competent optimizing compiler will have optimized "the idioms" to an
unsigned test for equality.

How is that "easier" than implementing BEQ and BNE?





More information about the J3 mailing list