This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Don't treat library calls specially if marked with nobuiltin.
ClosedPublic

Authored by koriakin on May 2 2016, 4:46 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

koriakin retitled this revision from to [SelectionDAG] Don't treat library calls specially if marked with nobuiltin..
koriakin updated this object.
koriakin added a reviewer: resistor.
koriakin set the repository for this revision to rL LLVM.
koriakin added a subscriber: llvm-commits.
filcab added a subscriber: filcab.May 2 2016, 6:13 AM
filcab added inline comments.
test/CodeGen/SystemZ/memchr-03.ll
4 ↗(On Diff #55802)

Please remove -verify-machineinstrs if it's not required.

filcab added a comment.May 2 2016, 6:15 AM

Can you give the tests more meaningful names?
Something like strlen-nobuiltin.ll explains what it's testing much better than strlen-03.ll.

Changed names to -nobuiltin.ll, removed -verify-machineinstrs

I see the owner has changed in CODE_OWNERS, so... ping?

Added an x86-64 test for memcmp + fixed comment. Adding any more targets is pointless, since SystemZ is the only one with custom lowering.

This revision was automatically updated to reflect the committed changes.

Hi,

this change breaks OpenCL using mesa (clover) with some library functonis implemneted using builtins:

__attribute__((always_inline)) __attribute__((overloadable)) float copysign(float a, float b) {
    return __builtin_copysignf(a, b)
}

results in kernel build failure:

<unknown>:0:0: in function test_1_copysign_float void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*): unsupported call to function copysignf

Both for R600 (evergreen) and GCN (kaveri)

Hi,

this change breaks OpenCL using mesa (clover) with some library functonis implemneted using builtins:

__attribute__((always_inline)) __attribute__((overloadable)) float copysign(float a, float b) {
    return __builtin_copysignf(a, b)
}

results in kernel build failure:

<unknown>:0:0: in function test_1_copysign_float void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*): unsupported call to function copysignf

Both for R600 (evergreen) and GCN (kaveri)

nvm, libclc was using -fno-builtins and __builtins.

Jan