Index: include/clang/Basic/BuiltinsX86.def =================================================================== --- include/clang/Basic/BuiltinsX86.def +++ include/clang/Basic/BuiltinsX86.def @@ -1719,6 +1719,8 @@ TARGET_BUILTIN(__builtin_ia32_movddup512_mask, "V8dV8dV8dUc","","avx512f") TARGET_BUILTIN(__builtin_ia32_movddup128_mask, "V2dV2dV2dUc","","avx512vl") TARGET_BUILTIN(__builtin_ia32_movddup256_mask, "V4dV4dV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vcomisd, "iV2dV2dIiIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcomiss, "iV4fV4fIiIi","","avx512f") #undef BUILTIN #undef TARGET_BUILTIN Index: lib/Headers/avx512fintrin.h =================================================================== --- lib/Headers/avx512fintrin.h +++ lib/Headers/avx512fintrin.h @@ -3695,6 +3695,14 @@ (__mmask8) __U); } +#define _mm_comi_round_sd(__A, __B, __P, __R) __extension__ ({\ +__builtin_ia32_vcomisd ((__v2df) (__A), (__v2df) (__B), ( __P), ( __R));\ +}) + +#define _mm_comi_round_ss( __A, __B, __P, __R) __extension__ ({\ +__builtin_ia32_vcomiss ((__v4sf) (__A), (__v4sf) (__B), ( __P), ( __R));\ +}) + #undef __DEFAULT_FN_ATTRS Index: test/CodeGen/avx512f-builtins.c =================================================================== --- test/CodeGen/avx512f-builtins.c +++ test/CodeGen/avx512f-builtins.c @@ -2364,4 +2364,14 @@ return _mm512_maskz_movedup_pd(__U, __A); } +int test_mm_comi_round_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_comi_round_sd + // CHECK: @llvm.x86.avx512.vcomi.sd + return _mm_comi_round_sd(__A, __B, 5, 3); +} +int test_mm_comi_round_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_comi_round_ss + // CHECK: @llvm.x86.avx512.vcomi.ss + return _mm_comi_round_ss(__A, __B, 5, 3); +}