[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add SSE/AVX VPTEST/VTESTPD/VTESTPS intrinsics to be used in constexpr (PR #160428)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 3 05:43:46 PDT 2025
================
@@ -2001,90 +2001,149 @@ int test_mm_testc_pd(__m128d A, __m128d B) {
// CHECK: call {{.*}}i32 @llvm.x86.avx.vtestc.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}})
return _mm_testc_pd(A, B);
}
+TEST_CONSTEXPR(_mm_testc_pd((__m128d)(__v2df){-1.0, -2.0},
+ (__m128d)(__v2df){-3.0, 4.0}) == 1);
+TEST_CONSTEXPR(_mm_testc_pd((__m128d)(__v2df){ 1.0, -2.0},
+ (__m128d)(__v2df){-3.0, 4.0}) == 0);
+TEST_CONSTEXPR(_mm_testc_pd((__m128d)(__v2df){ 1.0, -2.0},
+ (__m128d)(__v2df){ 0.0, 5.0}) == 1);
----------------
RKSimon wrote:
use single line for each TEST_CONSTEXPR
https://github.com/llvm/llvm-project/pull/160428
More information about the cfe-commits
mailing list