<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 22, 2014 at 10:50 PM, Akira Hatanaka <span dir="ltr"><<a href="mailto:ahatanaka@apple.com" target="_blank">ahatanaka@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>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. </div>
<div><br></div><div>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)?</div>
</blockquote></div><br>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.</div>
</div>