[lli][compiler-rt][halfType] lli segfaults while executing half type.

Hi all,

I have an LLVM IR (attached) that contain half types. This IR does a simple addition of float and half variables. The half type conversions call “__gnu_h2f_ieee” function from compiler-rt, which means I need to link against compiler-rt.

While I can do this with llc' workflow by using the "--rtlib=compiler-rt" option for clang, I could not find a way to call in compiler-rt libraries while running with lli’.

Is there a way to specify compiler-rt libs for lli?

Currently, lli segfaults while executing the attached IR. So I had posted a bug on this a while back at https://bugs.llvm.org/show_bug.cgi?id=48213, but thought of asking it here since it is a generic issue.

Thanks
Vikram

addHalf.ll (2.55 KB)

A gentle ping!

Hi Vikram,

lli doesn’t handle code that requires runtime support very well yet. On some platforms (e.g. MachO x86-64 and arm64) you can probably add an “-extra-archive /path/to/compiler-rt.a” option to get it working, but that requires that the JIT linker support the native code model (since that’s what compiler rt will be built with.

Things will improve as we bring up more JITLink backends with native code model support, but there isn’t a schedule for that work yet.

– Lang.