[clang] [X86] Finely handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

Freddy Ye via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 16:47:31 PST 2024


================
@@ -34,6 +34,60 @@ __m128 test_mm_andnot_ps(__m128 A, __m128 B) {
   return _mm_andnot_ps(A, B);
 }
 
+__m128 test_mm_cmp_ps_eq_oq(__m128 a, __m128 b) {
+  // CHECK-LABEL: test_mm_cmp_ps_eq_oq
+  // CHECK: fcmp oeq <4 x float> %{{.*}}, %{{.*}}
+  return _mm_cmp_ps(a, b, _CMP_EQ_OQ);
----------------
FreddyLeaf wrote:

These condition codes are [0,7], so they won't throw errors. What about adding 8 more tests to avx-builtins.c with condition codes of [8,15]?

https://github.com/llvm/llvm-project/pull/84136


More information about the cfe-commits mailing list