I'll check that out and update the patch.<div><br></div><div>Thanks,</div><div><br></div><div>  Filipe<br><br>On Wednesday, May 7, 2014, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6 May 2014 21:52, Filipe Cabecinhas<br>
<<a href="javascript:;" onclick="_e(event, 'cvml', 'filcab+llvm.phabricator@gmail.com')">filcab+llvm.phabricator@gmail.com</a>> wrote:<br>
> Ah, I hadn't thought of that.<br>
> But it seems that the gcc manual explicitly says they're functions and that<br>
> they're available:<br>
> <a href="http://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/X86-Built-in-Functions.html#X86-Built-in-Functions" target="_blank">http://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/X86-Built-in-Functions.html#X86-Built-in-Functions</a><br>

> I'm not sure, but I suppose we should keep them if they're documented as<br>
> available, right? Or are we not maintaining compatibility here (our manual<br>
> doesn't mention these builtins, AFAICT)?<br>
<br>
We should keep them, but it seems valid to implement them as macros.<br>
We don't support doing anything with the intrinsics other than calling<br>
them. For example:<br>
<br>
void *f = __builtin_ia32_pblendw256;<br>
<br>
causes<br>
<br>
test.c:3:11: error: builtin functions must be directly called<br>
<br>
with clang. GCC is not as user friendly and simply fails at link time<br>
with an undefined reference to the intrinsic.<br>
<br>
> I also don't see any other intrinsic doing the same (which doesn't mean we<br>
> can't start now, obviously).<br>
<br>
We do it for some altivec intrinsics.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div>