[cfe-dev] Intrinsics without builtin
Peter Collingbourne
peter at pcc.me.uk
Thu Mar 31 18:07:30 PDT 2011
On Thu, Mar 31, 2011 at 05:05:54PM -0700, Damien Vincent wrote:
> Hi,
>
> I got a solution to use intrinsics without the need of builtin functions from:
> http://wiki.llvm.org/HowTo:_Call_LLVM_intrinsics_from_C_code
...
> However, when I compile the same code, it generates the following call:
>
> %call = tail call i32 @"\01llvm.atomic.cmp.swap.i32"(i32* %add, i32
> %from, i32 %to) nounwind optsize
>
> which looks to me a regular call and not a direct call to the intrinsic.
Hi Damien,
I had the same problem a while back, please see if the attached patches work
for you (apply against clang trunk).
(In the end I decided on a different solution to my problem, which
is why I never sent these patches for approval.)
Thanks,
--
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-not-use-IR-marker-for-LLVM-intrinsics.patch
Type: text/x-diff
Size: 1213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110401/9368f32b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-If-this-is-an-intrinsic-function-set-the-function-s-.patch
Type: text/x-diff
Size: 1195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110401/9368f32b/attachment-0001.patch>
More information about the cfe-dev
mailing list