[cfe-dev] Unexpected x86/AVX cmpXY builtin codegen

Chris Lattner clattner at apple.com
Sat Mar 26 10:03:29 PDT 2011


On Mar 25, 2011, at 11:39 PM, Syoyo Fujita wrote:

> I am investigating the unexptected x86/AVX cmpXY builtin codegen in clang.
> Actually, this is a problem of how clang handles I-C-E expression.

Great!

> 1) Rewrite cmpXY inline function as macro
> 
> This is the easiest solution for clang, but might lose a compatibility
> with avxintrin.h provided by other parties(e.g. gcc).

This is the right answer.  it is somewhat annoying, but much simpler and better than the alternatives.  _mm_alignr_epi8 and other functions are already implemented this way.

-Chris



More information about the cfe-dev mailing list