creating 80/128bit FP constants?

How do I emit 80/128 bit FP constants. There is one ConstantFP::get
function which takes a double and another that takes a StringRef. Does
the StringRef version somehow do what I want?

Use the one that takes an APFloat.

Ciao, Duncan.

APFloat then offers the float/double/string constructors, and various
operations. I'm still not sure on how I can get a 80/128 bit float. Is
there an example somewhere?

There are example in unittests/ADT/APFloatTest.cpp

Create 80-bit FP (on x8664, it is corresponding to “long double” in C/C++):

APFloat(APFloat::x87DoubleExtended, “0xf.fffffffp+28”);

Create 128-bit:
I don’t know if llvm have run-time lib support for quadruple-precision FP arithmetic.