[llvm-commits] [llvm] r125393 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/InstCombine/bitcast-vec-uniform.ll test/Transforms/InstCombine/fold-vector-select.ll

Frits van Bommel fvbommel at gmail.com
Mon Feb 14 14:25:28 PST 2011


On Mon, Feb 14, 2011 at 10:56 PM, Rotem, Nadav <nadav.rotem at intel.com> wrote:
> I started by looking at adding alone support for constants. I started by adding support for float/double inside the Constant function. A change to APFloat is also possible but more complex. What do you think ?

No need to go messing around with floats and doubles and
reinterpret_casts (or changing APFloat).
APFloat has a constructor that takes an APInt and initializes the
floating-point value with those bits (just be careful with 'fp128' vs
'ppc_fp128' values, that's what the second parameter is for).



More information about the llvm-commits mailing list