[cfe-commits] [PATCH] Change cmp_XY x86/AVX builtin definition from static inline to macro in avxintrin.h

John McCall rjmccall at apple.com
Thu Apr 7 00:46:23 PDT 2011

On Apr 7, 2011, at 12:42 AM, Syoyo Fujita wrote:

>>> Is there any good way to write a such host-dependent test in clang
>>> test-framework?
>>> I'm ready to write a test if a guideline is provided.
>> Eli suggested looking at test/CodeGen/mmx_builtins.c, which does
>> similar sorts of things.
> mmx-builtins.c tests asm output, but in my patch I'd like to test LLVM
> IR outout.

This is easy;  just turn the -S in the RUN line into an -emit-llvm.  That
will also avoid any AVX-related bugs in the backend.

The main thing is that there are several portability workarounds in that
test, like the #define, that you'll want to borrow for your test.


More information about the cfe-commits mailing list