[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 5 09:02:25 PDT 2018


craig.topper added inline comments.


================
Comment at: test/CodeGen/target-features-error-2.c:39
 __m128d need_avx(__m128d a, __m128d b) {
   return _mm_cmp_sd(a, b, 0); // expected-error {{'__builtin_ia32_cmpsd' needs target feature avx}}
 }
----------------
GBuella wrote:
> craig.topper wrote:
> > The 4 compare functions here are basically the same for the purpose of this check. What value do we get by testing all 4 of them?
> Which four more specifically?
_mm_cmp_ps, _mm_cmp_ss, _mm_cmp_pd, _mm_cmp_sd. Or the cases for NEED_AVX_2-5. They're all basically checking the same thing. There is nothing different about the command lines other than the -D NEED_AVX


https://reviews.llvm.org/D46541





More information about the cfe-commits mailing list