GMP and clang bugginess

Torbjörn Granlund tg at gmplib.org
Mon May 25 11:14:03 UTC 2015


Marc Glisse <marc.glisse at inria.fr> writes:

  Now I've found it (and reported
  https://llvm.org/bugs/show_bug.cgi?id=23646 ). Note that the same (?)
  instruction is spelled differently in the same file:
  
  	bc+	12, 28, L(9)
  vs.
  	blt+	cr7, L(24)
  
  (there is also a mix of using "7" vs "cr7")
  and llvm is happy with the second form.

I suppose the bc form (which is the generic conditional branch form on
PPC) was chosen since there is arithmetic on the branch register bits
just before.  The meaning of a branch register bit then is not a simple
"less than".

This is old code, it can surely be improved.  Avoiding branch forms
which are absent from clang is good, unless we worsen the GMP code
quality.


Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list