[LLVMdev] PTX builtin functions.

Alberto Magni alberto.magni86 at gmail.com
Wed Nov 16 05:05:20 PST 2011


Dear Justin,

I am trying to add the support for some OpenCL builtin functions to
the PTX backend.
The attached file represent the first stub of a patch for the fmax
builtin function.

The test case I am trying is the following:

define ptx_device float @f(float %x, float %y) {
entry:
  %z = call float @fmax(float %x, float %y)
  ret float %z
}

declare float @fmax(float, float)

But at the moment llc crashes saying that "calls are not supported",
this does not
happens with llvm builtins like llvm.sqrt.f32

Can you please give me a hint on what I am missing, or some general
advice on how
to add builtin functions.

Thank you in advance,

Alberto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmax_stub.patch
Type: text/x-patch
Size: 1962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111116/679cb98e/attachment.bin>


More information about the llvm-dev mailing list