r209489 - Fix a bug in xmmintrin.h.

Chandler Carruth chandlerc at google.com
Thu May 22 22:00:57 PDT 2014


On Thu, May 22, 2014 at 10:50 PM, Akira Hatanaka <ahatanaka at apple.com>wrote:

> If this was a fix for clang’s code (IR) generation or an llvm
> optimization, it would make sense to test the IR. I felt it was a little
> odd to test the IR for a fix in one of the header files, since the mistake
> doesn’t involve clang’s code-gen.
>
> If I were to write an IR test, I would probably check the string
> “_mm_packs_pi32”. I don’t know if this is possible, but wouldn’t it be
> better to somehow test the string “_mm_packs_pi32” in the source code
> (using clang -E)?
>

I think its better to avoid the reflexive test that just verifies the text
in the header appears in the macro expansion. Instead it seems useful to
test that Clang forms the expected IR primitives when *using* the intel
intrinsics. For example, test/CodeGen/arm-neon-misc.c. A better example
*should* be test/CodeGen/aarch64-neon-intrinsics.c, but that one (yikes!)
goes all the way to testing ARM assembly rather than the LLVM IR.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140522/c3da2fb1/attachment.html>


More information about the cfe-commits mailing list