[cfe-commits] r110096 - in /cfe/trunk: include/clang/Basic/BuiltinsX86.def test/CodeGen/builtins-x86.c

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Aug 2 21:10:38 PDT 2010


Hi Chris,

> Hey Bruno,
>
> Is __builtin_ia32_addpd256 just a simple add?  We've preferred to not add builtins for operations that can be trivially matched from LLVM IR.  The Clang header for AVX should just define the Xmmintrin.h functions in terms of "+" on extended vectors (for example).  The other headers in clang/lib/Headers are implemented the same way.
>
> We still need to have builtins for really crazy stuff of course.

That's the idea, and what I tried to explain in the commit message.
I'm adding everything first as
builtins because it's easier to do so with some scripts I've created
to help me adding this stuff.
The next step is to fine tune (add the trivial matching and also gen
IR in the way it's done in
CGBultins.cpp) wherever it's possible and remove the unnecessary builtins.

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the cfe-commits mailing list