2089 lines · c
1// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64 -target-feature +avx10.2 -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror | FileCheck %s2// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386 -target-feature +avx10.2 -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror | FileCheck %s3 4// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64 -target-feature +avx10.2 -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror -fexperimental-new-constant-interpreter | FileCheck %s5// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386 -target-feature +avx10.2 -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror -fexperimental-new-constant-interpreter | FileCheck %s6 7#include <immintrin.h>8#include "builtin_test_helpers.h"9 10__m256bh test_mm256_setzero_pbh() {11 // CHECK-LABEL: @test_mm256_setzero_pbh12 // CHECK: zeroinitializer13 return _mm256_setzero_pbh();14}15 16__m128bh test_mm_setzero_pbh() {17 // CHECK-LABEL: @test_mm_setzero_pbh18 // CHECK: zeroinitializer19 return _mm_setzero_pbh();20}21 22__m256bh test_mm256_undefined_pbh(void) {23 // CHECK-LABEL: @test_mm256_undefined_pbh24 // CHECK: ret <16 x bfloat> zeroinitializer25 return _mm256_undefined_pbh();26}27 28__m128bh test_mm_undefined_pbh(void) {29 // CHECK-LABEL: @test_mm_undefined_pbh30 // CHECK: ret <8 x bfloat> zeroinitializer31 return _mm_undefined_pbh();32}33 34__bf16 test_mm_cvtsbh_bf16(__m128bh __A) {35 // CHECK-LABEL: @test_mm_cvtsbh_bf1636 // CHECK: extractelement <8 x bfloat> %{{.*}}, i32 037 return _mm_cvtsbh_bf16(__A);38}39 40__bf16 test_mm256_cvtsbh_bf16(__m256bh __A) {41 // CHECK-LABEL: @test_mm256_cvtsbh_bf1642 // CHECK: extractelement <16 x bfloat> %{{.*}}, i32 043 return _mm256_cvtsbh_bf16(__A);44}45 46__m128bh test_mm_set_sbh(__bf16 h) {47 // CHECK-LABEL: @test_mm_set_sbh48 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 049 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 150 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 251 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 352 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 453 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 554 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 655 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 756 return _mm_set_sbh(h);57}58 59__m128bh test_mm_set1_pbh(__bf16 h) {60 // CHECK-LABEL: @test_mm_set1_pbh61 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 062 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 163 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 264 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 365 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 466 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 567 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 668 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 769 return _mm_set1_pbh(h);70}71 72__m256bh test_mm256_set1_pbh(__bf16 h) {73 // CHECK-LABEL: @test_mm256_set1_pbh74 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 075 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 176 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 277 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 378 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 479 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 580 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 681 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 782 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 883 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 984 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1085 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1186 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1287 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1388 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1489 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1590 return _mm256_set1_pbh(h);91}92 93__m128bh test_mm_set_pbh(__bf16 bf1, __bf16 bf2, __bf16 bf3, __bf16 bf4,94 __bf16 bf5, __bf16 bf6, __bf16 bf7, __bf16 bf8) {95 // CHECK-LABEL: @test_mm_set_pbh96 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 097 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 198 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 299 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 3100 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 4101 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 5102 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 6103 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 7104 return _mm_set_pbh(bf1, bf2, bf3, bf4, bf5, bf6, bf7, bf8);105}106 107__m256bh test_mm256_set_pbh(__bf16 bf1, __bf16 bf2, __bf16 bf3, __bf16 bf4,108 __bf16 bf5, __bf16 bf6, __bf16 bf7, __bf16 bf8,109 __bf16 bf9, __bf16 bf10, __bf16 bf11, __bf16 bf12,110 __bf16 bf13, __bf16 bf14, __bf16 bf15, __bf16 bf16) {111 // CHECK-LABEL: @test_mm256_set_pbh112 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 0113 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1114 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 2115 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 3116 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 4117 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 5118 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 6119 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 7120 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 8121 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 9122 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 10123 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 11124 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 12125 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 13126 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 14127 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 15128 return _mm256_set_pbh(bf1, bf2, bf3, bf4, bf5, bf6, bf7, bf8,129 bf9, bf10, bf11, bf12, bf13, bf14, bf15, bf16);130}131 132__m128bh test_mm_setr_pbh(__bf16 bf1, __bf16 bf2, __bf16 bf3, __bf16 bf4,133 __bf16 bf5, __bf16 bf6, __bf16 bf7, __bf16 bf8) {134 // CHECK-LABEL: @test_mm_setr_pbh135 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 0136 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 1137 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 2138 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 3139 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 4140 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 5141 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 6142 // CHECK: insertelement <8 x bfloat> {{.*}}, i32 7143 return _mm_setr_pbh(bf1, bf2, bf3, bf4, bf5, bf6, bf7, bf8);144}145 146__m256bh test_mm256_setr_pbh(__bf16 bf1, __bf16 bf2, __bf16 bf3, __bf16 bf4,147 __bf16 bf5, __bf16 bf6, __bf16 bf7, __bf16 bf8,148 __bf16 bf9, __bf16 bf10, __bf16 bf11, __bf16 bf12,149 __bf16 bf13, __bf16 bf14, __bf16 bf15, __bf16 bf16) {150 // CHECK-LABEL: @test_mm256_setr_pbh151 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 0152 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 1153 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 2154 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 3155 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 4156 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 5157 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 6158 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 7159 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 8160 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 9161 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 10162 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 11163 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 12164 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 13165 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 14166 // CHECK: insertelement <16 x bfloat> {{.*}}, i32 15167 return _mm256_setr_pbh(bf1, bf2, bf3, bf4, bf5, bf6, bf7, bf8,168 bf9, bf10, bf11, bf12, bf13, bf14, bf15, bf16);169}170 171__m128 test_mm_castbf16_ps(__m128bh A) {172 // CHECK-LABEL: test_mm_castbf16_ps173 // CHECK: bitcast <8 x bfloat> %{{.*}} to <4 x float>174 return _mm_castbf16_ps(A);175}176 177__m256 test_mm256_castbf16_ps(__m256bh A) {178 // CHECK-LABEL: test_mm256_castbf16_ps179 // CHECK: bitcast <16 x bfloat> %{{.*}} to <8 x float>180 return _mm256_castbf16_ps(A);181}182 183__m128i test_mm_castbf16_si128(__m128bh A) {184 // CHECK-LABEL: test_mm_castbf16_si128185 // CHECK: bitcast <8 x bfloat> %{{.*}} to <2 x i64>186 return _mm_castbf16_si128(A);187}188 189__m256i test_mm256_castbf16_si256(__m256bh A) {190 // CHECK-LABEL: test_mm256_castbf16_si256191 // CHECK: bitcast <16 x bfloat> %{{.*}} to <4 x i64>192 return _mm256_castbf16_si256(A);193}194 195__m128bh test_mm_castps_pbh(__m128 A) {196 // CHECK-LABEL: test_mm_castps_pbh197 // CHECK: bitcast <4 x float> %{{.*}} to <8 x bfloat>198 return _mm_castps_pbh(A);199}200 201__m256bh test_mm256_castps_pbh(__m256 A) {202 // CHECK-LABEL: test_mm256_castps_pbh203 // CHECK: bitcast <8 x float> %{{.*}} to <16 x bfloat>204 return _mm256_castps_pbh(A);205}206 207__m128bh test_mm_castpd_pbh(__m128d A) {208 // CHECK-LABEL: test_mm_castpd_pbh209 // CHECK: bitcast <2 x double> %{{.*}} to <8 x bfloat>210 return _mm_castpd_pbh(A);211}212 213__m256bh test_mm256_castpd_pbh(__m256d A) {214 // CHECK-LABEL: test_mm256_castpd_pbh215 // CHECK: bitcast <4 x double> %{{.*}} to <16 x bfloat>216 return _mm256_castpd_pbh(A);217}218 219__m128bh test_mm_castsi128_pbh(__m128i A) {220 // CHECK-LABEL: test_mm_castsi128_pbh221 // CHECK: bitcast <2 x i64> %{{.*}} to <8 x bfloat>222 return _mm_castsi128_pbh(A);223}224 225__m256bh test_mm256_castsi256_pbh(__m256i A) {226 // CHECK-LABEL: test_mm256_castsi256_pbh227 // CHECK: bitcast <4 x i64> %{{.*}} to <16 x bfloat>228 return _mm256_castsi256_pbh(A);229}230 231__m128d test_mm_castbf16_pd(__m128bh A) {232 // CHECK-LABEL: test_mm_castbf16_pd233 // CHECK: bitcast <8 x bfloat> %{{.*}} to <2 x double>234 return _mm_castbf16_pd(A);235}236 237__m128bh test_mm256_castbf16256_pbh128(__m256bh __a) {238 // CHECK-LABEL: test_mm256_castbf16256_pbh128239 // CHECK: shufflevector <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>240 return _mm256_castbf16256_pbh128(__a);241}242 243__m256bh test_mm256_castbf16128_pbh256(__m128bh __a) {244 // CHECK-LABEL: test_mm256_castbf16128_pbh256245 // CHECK: shufflevector <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>246 return _mm256_castbf16128_pbh256(__a);247}248 249__m256d test_mm256_castbf16_pd(__m256bh A) {250 // CHECK-LABEL: test_mm256_castbf16_pd251 // CHECK: bitcast <16 x bfloat> %{{.*}} to <4 x double>252 return _mm256_castbf16_pd(A);253}254 255__m256bh test_mm256_zextbf16128_pbh256(__m128bh __a) {256 // CHECK-LABEL: test_mm256_zextbf16128_pbh256257 // CHECK: shufflevector <8 x bfloat> %{{.*}}, <8 x bfloat> {{.*}}, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>258 return _mm256_zextbf16128_pbh256(__a);259}260 261__m128bh test_mm_abs_pbh(__m128bh a) {262 // CHECK-LABEL: @test_mm_abs_pbh263 // CHECK: and <4 x i32>264 return _mm_abs_pbh(a);265}266 267__m256bh test_mm256_abs_pbh(__m256bh a) {268 // CHECK-LABEL: @test_mm256_abs_pbh269 // CHECK: and <8 x i32>270 return _mm256_abs_pbh(a);271}272 273__m256bh test_mm256_loadu_pbh(void *p) {274 // CHECK-LABEL: @test_mm256_loadu_pbh275 // CHECK: load <16 x bfloat>, ptr {{.*}}, align 1{{$}}276 return _mm256_loadu_pbh(p);277}278 279__m128bh test_mm_load_sbh(void const *A) {280 // CHECK-LABEL: test_mm_load_sbh281 // CHECK: %{{.*}} = call <8 x bfloat> @llvm.masked.load.v8bf16.p0(ptr align 1 %{{.*}}, <8 x i1> bitcast (<1 x i8> splat (i8 1) to <8 x i1>), <8 x bfloat> %{{.*}})282 return _mm_load_sbh(A);283}284 285__m256bh test_mm256_load_pbh(void *p) {286 // CHECK-LABEL: @test_mm256_load_pbh287 // CHECK: load <16 x bfloat>, ptr %{{.*}}, align 32288 return _mm256_load_pbh(p);289}290 291__m128bh test_mm_load_pbh(void *p) {292 // CHECK-LABEL: @test_mm_load_pbh293 // CHECK: load <8 x bfloat>, ptr %{{.*}}, align 16294 return _mm_load_pbh(p);295}296 297__m128bh test_mm_loadu_pbh(void *p) {298 // CHECK-LABEL: @test_mm_loadu_pbh299 // CHECK: load <8 x bfloat>, ptr {{.*}}, align 1{{$}}300 return _mm_loadu_pbh(p);301}302 303void test_mm_store_sbh(void *A, __m128bh B) {304 // CHECK-LABEL: test_mm_store_sbh305 // CHECK: extractelement <8 x bfloat> %{{.*}}, i32 0306 // CHECK: store bfloat %{{.*}}, ptr %{{.*}}, align 1{{$}}307 _mm_store_sbh(A, B);308}309 310void test_mm_mask_store_sbh(void *__P, __mmask8 __U, __m128bh __A) {311 // CHECK-LABEL: @test_mm_mask_store_sbh312 // CHECK: call void @llvm.masked.store.v8bf16.p0(<8 x bfloat> %{{.*}}, ptr align 1 %{{.*}}, <8 x i1> %{{.*}})313 _mm_mask_store_sbh(__P, __U, __A);314}315 316void test_mm256_store_pbh(void *p, __m256bh a) {317 // CHECK-LABEL: @test_mm256_store_pbh318 // CHECK: store <16 x bfloat> %{{.*}}, ptr %{{.*}}, align 32319 _mm256_store_pbh(p, a);320}321 322void test_mm_store_pbh(void *p, __m128bh a) {323 // CHECK-LABEL: @test_mm_store_pbh324 // CHECK: store <8 x bfloat> %{{.*}}, ptr %{{.*}}, align 16325 _mm_store_pbh(p, a);326}327 328__m128bh test_mm_mask_load_sbh(__m128bh __A, __mmask8 __U, const void *__W) {329 // CHECK-LABEL: @test_mm_mask_load_sbh330 // CHECK: %{{.*}} = call <8 x bfloat> @llvm.masked.load.v8bf16.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}})331 return _mm_mask_load_sbh(__A, __U, __W);332}333 334__m128bh test_mm_maskz_load_sbh(__mmask8 __U, const void *__W) {335 // CHECK-LABEL: @test_mm_maskz_load_sbh336 // CHECK: %{{.*}} = call <8 x bfloat> @llvm.masked.load.v8bf16.p0(ptr align 1 %{{.*}}, <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}})337 return _mm_maskz_load_sbh(__U, __W);338}339 340void test_mm256_storeu_pbh(void *p, __m256bh a) {341 // CHECK-LABEL: @test_mm256_storeu_pbh342 // CHECK: store <16 x bfloat> %{{.*}}, ptr %{{.*}}, align 1{{$}}343 // CHECK-NEXT: ret void344 _mm256_storeu_pbh(p, a);345}346 347void test_mm_storeu_pbh(void *p, __m128bh a) {348 // CHECK-LABEL: @test_mm_storeu_pbh349 // CHECK: store <8 x bfloat> %{{.*}}, ptr %{{.*}}, align 1{{$}}350 // CHECK-NEXT: ret void351 _mm_storeu_pbh(p, a);352}353 354__m128bh test_mm_move_sbh(__m128bh A, __m128bh B) {355 // CHECK-LABEL: test_mm_move_sbh356 // CHECK: extractelement <8 x bfloat> %{{.*}}, i32 0357 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat %{{.*}}, i32 0358 return _mm_move_sbh(A, B);359}360TEST_CONSTEXPR(match_m128bh(_mm_move_sbh((__m128bh)(__v8bf){1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f}, (__m128bh)(__v8bf){9.0f,10.0f,11.0f,12.0f,13.0f,14.0f,15.0f,16.0f}), 9.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f));361 362__m128bh test_mm_mask_move_sbh(__m128bh __W, __mmask8 __U, __m128bh __A, __m128bh __B) {363 // CHECK-LABEL: @test_mm_mask_move_sbh364 // CHECK: [[EXT:%.*]] = extractelement <8 x bfloat> %{{.*}}, i32 0365 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat [[EXT]], i32 0366 // CHECK: [[A:%.*]] = extractelement <8 x bfloat> [[VEC:%.*]], i64 0367 // CHECK-NEXT: [[B:%.*]] = extractelement <8 x bfloat> %{{.*}}, i64 0368 // CHECK-NEXT: bitcast i8 %{{.*}} to <8 x i1>369 // CHECK-NEXT: extractelement <8 x i1> %{{.*}}, i64 0370 // CHECK-NEXT: [[SEL:%.*]] = select i1 %{{.*}}, bfloat [[A]], bfloat [[B]]371 // CHECK-NEXT: insertelement <8 x bfloat> [[VEC]], bfloat [[SEL]], i64 0372 return _mm_mask_move_sbh(__W, __U, __A, __B);373}374TEST_CONSTEXPR(match_m128bh(_mm_mask_move_sbh((__m128bh)(__v8bf){1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f}, (__mmask8)0x01, (__m128bh)(__v8bf){100.0f,200.0f,300.0f,400.0f,500.0f,600.0f,700.0f,800.0f}, (__m128bh)(__v8bf){9.0f,10.0f,11.0f,12.0f,13.0f,14.0f,15.0f,16.0f}), 9.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f));375 376__m128bh test_mm_maskz_move_sbh(__mmask8 __U, __m128bh __A, __m128bh __B) {377 // CHECK-LABEL: @test_mm_maskz_move_sbh378 // CHECK: [[EXT:%.*]] = extractelement <8 x bfloat> %{{.*}}, i32 0379 // CHECK: insertelement <8 x bfloat> %{{.*}}, bfloat [[EXT]], i32 0380 // CHECK: [[A:%.*]] = extractelement <8 x bfloat> [[VEC:%.*]], i64 0381 // CHECK-NEXT: [[B:%.*]] = extractelement <8 x bfloat> %{{.*}}, i64 0382 // CHECK-NEXT: bitcast i8 %{{.*}} to <8 x i1>383 // CHECK-NEXT: extractelement <8 x i1> %{{.*}}, i64 0384 // CHECK-NEXT: [[SEL:%.*]] = select i1 %{{.*}}, bfloat [[A]], bfloat [[B]]385 // CHECK-NEXT: insertelement <8 x bfloat> [[VEC]], bfloat [[SEL]], i64 0386 return _mm_maskz_move_sbh(__U, __A, __B);387}388 389__m128bh test_mm_mask_blend_pbh(__mmask8 __U, __m128bh __A, __m128bh __W) {390 // CHECK-LABEL: @test_mm_mask_blend_pbh391 // CHECK: %{{.*}} = bitcast i8 %{{.*}} to <8 x i1>392 // CHECK: %{{.*}} = select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}393 return _mm_mask_blend_pbh(__U, __A, __W);394}395 396__m256bh test_mm256_mask_blend_pbh(__mmask16 __U, __m256bh __A, __m256bh __W) {397 // CHECK-LABEL: @test_mm256_mask_blend_pbh398 // CHECK: %{{.*}} = bitcast i16 %{{.*}} to <16 x i1>399 // CHECK: %{{.*}} = select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}400 return _mm256_mask_blend_pbh(__U, __A, __W);401}402 403__m128bh test_mm_permutex2var_pbh(__m128bh __A, __m128i __I, __m128bh __B) {404 // CHECK-LABEL: @test_mm_permutex2var_pbh405 // CHECK: %{{.*}} = bitcast <8 x bfloat> %{{.*}} to <8 x i16>406 // CHECK: %{{.*}} = bitcast <2 x i64> %{{.*}} to <8 x i16>407 // CHECK: %{{.*}} = bitcast <8 x bfloat> %{{.*}} to <8 x i16>408 // CHECK: %{{.*}} = call <8 x i16> @llvm.x86.avx512.vpermi2var.hi.128(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})409 // CHECK: %{{.*}} = bitcast <8 x i16> %{{.*}} to <8 x bfloat>410 return _mm_permutex2var_pbh(__A, __I, __B);411}412 413__m256bh test_mm256_permutex2var_pbh(__m256bh __A, __m256i __I, __m256bh __B) {414 // CHECK-LABEL: @test_mm256_permutex2var_pbh415 // CHECK: %{{.*}} = bitcast <16 x bfloat> %{{.*}} to <16 x i16>416 // CHECK: %{{.*}} = bitcast <4 x i64> %{{.*}} to <16 x i16>417 // CHECK: %{{.*}} = bitcast <16 x bfloat> %{{.*}} to <16 x i16>418 // CHECK: %{{.*}} = call <16 x i16> @llvm.x86.avx512.vpermi2var.hi.256(<16 x i16> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})419 // CHECK: %{{.*}} = bitcast <16 x i16> %{{.*}} to <16 x bfloat>420 return _mm256_permutex2var_pbh(__A, __I, __B);421}422 423__m128bh test_mm_permutexvar_pbh(__m128i __A, __m128bh __B) {424 // CHECK-LABEL: @test_mm_permutexvar_pbh425 // CHECK: %{{.*}} = bitcast <8 x bfloat> %{{.*}} to <8 x i16>426 // CHECK: %{{.*}} = bitcast <2 x i64> %{{.*}} to <8 x i16>427 // CHECK: %{{.*}} = call <8 x i16> @llvm.x86.avx512.permvar.hi.128(<8 x i16> %{{.*}}, <8 x i16> %{{.*}})428 // CHECK: %{{.*}} = bitcast <8 x i16> %{{.*}} to <8 x bfloat>429 return _mm_permutexvar_pbh(__A, __B);430}431 432__m256bh test_mm256_permutexvar_pbh(__m256i __A, __m256bh __B) {433 // CHECK-LABEL: @test_mm256_permutexvar_pbh434 // CHECK: %{{.*}} = bitcast <16 x bfloat> %{{.*}} to <16 x i16>435 // CHECK: %{{.*}} = bitcast <4 x i64> %{{.*}} to <16 x i16>436 // CHECK: %{{.*}} = call <16 x i16> @llvm.x86.avx512.permvar.hi.256(<16 x i16> %{{.*}}, <16 x i16> %{{.*}})437 // CHECK: %{{.*}} = bitcast <16 x i16> %{{.*}} to <16 x bfloat>438 return _mm256_permutexvar_pbh(__A, __B);439}440 441__m256bh test_mm256_add_pbh(__m256bh __A, __m256bh __B) {442 // CHECK-LABEL: @test_mm256_add_pbh443 // CHECK: %{{.*}} = fadd <16 x bfloat> %{{.*}}, %{{.*}}444 return _mm256_add_pbh(__A, __B);445}446 447__m256bh test_mm256_mask_add_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {448 // CHECK: %{{.*}} = fadd <16 x bfloat> %{{.*}}, %{{.*}}449 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}450 return (__m256bh)_mm256_mask_add_pbh(__W, __U, __A, __B);451}452 453__m256bh test_mm256_maskz_add_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {454 // CHECK: %{{.*}} = fadd <16 x bfloat> %{{.*}}, %{{.*}}455 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}456 return _mm256_maskz_add_pbh(__U, __A, __B);457}458 459__m128bh test_mm_add_pbh(__m128bh __A, __m128bh __B) {460 // CHECK-LABEL: @test_mm_add_pbh461 // CHECK: %{{.*}} = fadd <8 x bfloat> %{{.*}}, %{{.*}}462 return _mm_add_pbh(__A, __B);463}464 465__m128bh test_mm_mask_add_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {466 // CHECK: %{{.*}} = fadd <8 x bfloat> %{{.*}}, %{{.*}}467 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}468 return (__m128bh)_mm_mask_add_pbh(__W, __U, __A, __B);469}470 471__m128bh test_mm_maskz_add_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {472 // CHECK: %{{.*}} = fadd <8 x bfloat> %{{.*}}, %{{.*}}473 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}474 return _mm_maskz_add_pbh(__U, __A, __B);475}476 477__m256bh test_mm256_sub_pbh(__m256bh __A, __m256bh __B) {478 // CHECK-LABEL: @test_mm256_sub_pbh479 // CHECK: %{{.*}} = fsub <16 x bfloat> %{{.*}}, %{{.*}}480 return _mm256_sub_pbh(__A, __B);481}482 483__m256bh test_mm256_mask_sub_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {484 // CHECK: %{{.*}} = fsub <16 x bfloat> %{{.*}}, %{{.*}}485 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}486 return (__m256bh)_mm256_mask_sub_pbh(__W, __U, __A, __B);487}488 489__m256bh test_mm256_maskz_sub_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {490 // CHECK: %{{.*}} = fsub <16 x bfloat> %{{.*}}, %{{.*}}491 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}492 return _mm256_maskz_sub_pbh(__U, __A, __B);493}494 495__m128bh test_mm_sub_pbh(__m128bh __A, __m128bh __B) {496 // CHECK-LABEL: @test_mm_sub_pbh497 // CHECK: %{{.*}} = fsub <8 x bfloat> %{{.*}}, %{{.*}}498 return _mm_sub_pbh(__A, __B);499}500 501__m128bh test_mm_mask_sub_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {502 // CHECK: %{{.*}} = fsub <8 x bfloat> %{{.*}}, %{{.*}}503 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}504 return (__m128bh)_mm_mask_sub_pbh(__W, __U, __A, __B);505}506 507__m128bh test_mm_maskz_sub_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {508 // CHECK: %{{.*}} = fsub <8 x bfloat> %{{.*}}, %{{.*}}509 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}510 return _mm_maskz_sub_pbh(__U, __A, __B);511}512 513__m256bh test_mm256_mul_pbh(__m256bh __A, __m256bh __B) {514 // CHECK-LABEL: @test_mm256_mul_pbh515 // CHECK: %{{.*}} = fmul <16 x bfloat> %{{.*}}, %{{.*}}516 return _mm256_mul_pbh(__A, __B);517}518 519__m256bh test_mm256_mask_mul_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {520 // CHECK: %{{.*}} = fmul <16 x bfloat> %{{.*}}, %{{.*}}521 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}522 return (__m256bh)_mm256_mask_mul_pbh(__W, __U, __A, __B);523}524 525__m256bh test_mm256_maskz_mul_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {526 // CHECK: %{{.*}} = fmul <16 x bfloat> %{{.*}}, %{{.*}}527 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}528 return _mm256_maskz_mul_pbh(__U, __A, __B);529}530 531__m128bh test_mm_mul_pbh(__m128bh __A, __m128bh __B) {532 // CHECK-LABEL: @test_mm_mul_pbh533 // CHECK: %{{.*}} = fmul <8 x bfloat> %{{.*}}, %{{.*}}534 return _mm_mul_pbh(__A, __B);535}536 537__m128bh test_mm_mask_mul_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {538 // CHECK: %{{.*}} = fmul <8 x bfloat> %{{.*}}, %{{.*}}539 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}540 return (__m128bh)_mm_mask_mul_pbh(__W, __U, __A, __B);541}542 543__m128bh test_mm_maskz_mul_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {544 // CHECK: %{{.*}} = fmul <8 x bfloat> %{{.*}}, %{{.*}}545 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}546 return _mm_maskz_mul_pbh(__U, __A, __B);547}548 549__m256bh test_mm256_div_pbh(__m256bh __A, __m256bh __B) {550 // CHECK-LABEL: @test_mm256_div_pbh551 // CHECK: %{{.*}} = fdiv <16 x bfloat> %{{.*}}, %{{.*}}552 return _mm256_div_pbh(__A, __B);553}554 555__m256bh test_mm256_mask_div_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {556 // CHECK: %{{.*}} = fdiv <16 x bfloat> %{{.*}}, %{{.*}}557 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}558 return (__m256bh)_mm256_mask_div_pbh(__W, __U, __A, __B);559}560 561__m256bh test_mm256_maskz_div_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {562 // CHECK: %{{.*}} = fdiv <16 x bfloat> %{{.*}}, %{{.*}}563 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}564 return _mm256_maskz_div_pbh(__U, __A, __B);565}566 567__m128bh test_mm_div_pbh(__m128bh __A, __m128bh __B) {568 // CHECK-LABEL: @test_mm_div_pbh569 // CHECK: %{{.*}} = fdiv <8 x bfloat> %{{.*}}, %{{.*}}570 return _mm_div_pbh(__A, __B);571}572 573__m128bh test_mm_mask_div_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {574 // CHECK: %{{.*}} = fdiv <8 x bfloat> %{{.*}}, %{{.*}}575 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}576 return (__m128bh)_mm_mask_div_pbh(__W, __U, __A, __B);577}578 579__m128bh test_mm_maskz_div_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {580 // CHECK: %{{.*}} = fdiv <8 x bfloat> %{{.*}}, %{{.*}}581 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}582 return _mm_maskz_div_pbh(__U, __A, __B);583}584 585__m256bh test_mm256_max_pbh(__m256bh __A, __m256bh __B) {586 // CHECK-LABEL: @test_mm256_max_pbh587 // CHECK: @llvm.x86.avx10.vmaxbf16256(588 return _mm256_max_pbh(__A, __B);589}590 591__m256bh test_mm256_mask_max_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {592 // CHECK: @llvm.x86.avx10.vmaxbf16256593 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}594 return (__m256bh)_mm256_mask_max_pbh(__W, __U, __A, __B);595}596 597__m256bh test_mm256_maskz_max_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {598 // CHECK: @llvm.x86.avx10.vmaxbf16256599 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}600 return _mm256_maskz_max_pbh(__U, __A, __B);601}602 603__m128bh test_mm_max_pbh(__m128bh __A, __m128bh __B) {604 // CHECK-LABEL: @test_mm_max_pbh605 // CHECK: @llvm.x86.avx10.vmaxbf16128(606 return _mm_max_pbh(__A, __B);607}608 609__m128bh test_mm_mask_max_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {610 // CHECK: @llvm.x86.avx10.vmaxbf16128611 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}612 return (__m128bh)_mm_mask_max_pbh(__W, __U, __A, __B);613}614 615__m128bh test_mm_maskz_max_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {616 // CHECK: @llvm.x86.avx10.vmaxbf16128617 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}618 return _mm_maskz_max_pbh(__U, __A, __B);619}620 621__m256bh test_mm256_min_pbh(__m256bh __A, __m256bh __B) {622 // CHECK-LABEL: @test_mm256_min_pbh623 // CHECK: @llvm.x86.avx10.vminbf16256(624 return _mm256_min_pbh(__A, __B);625}626 627__m256bh test_mm256_mask_min_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {628 // CHECK: @llvm.x86.avx10.vminbf16256629 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}630 return (__m256bh)_mm256_mask_min_pbh(__W, __U, __A, __B);631}632 633__m256bh test_mm256_maskz_min_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {634 // CHECK: @llvm.x86.avx10.vminbf16256635 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}636 return _mm256_maskz_min_pbh(__U, __A, __B);637}638 639__m128bh test_mm_min_pbh(__m128bh __A, __m128bh __B) {640 // CHECK-LABEL: @test_mm_min_pbh641 // CHECK: @llvm.x86.avx10.vminbf16128(642 return _mm_min_pbh(__A, __B);643}644 645__m128bh test_mm_mask_min_pbh(__m128bh __W, __mmask16 __U, __m128bh __A, __m128bh __B) {646 // CHECK: @llvm.x86.avx10.vminbf16128647 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}648 return (__m128bh)_mm_mask_min_pbh(__W, __U, __A, __B);649}650 651__m128bh test_mm_maskz_min_pbh(__mmask16 __U, __m128bh __A, __m128bh __B) {652 // CHECK: @llvm.x86.avx10.vminbf16128653 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}654 return _mm_maskz_min_pbh(__U, __A, __B);655}656 657int test_mm_comieq_sbh(__m128bh __A, __m128bh __B) {658 // CHECK-LABEL: test_mm_comieq_sbh659 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16eq(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})660 return _mm_comieq_sbh(__A, __B);661}662 663int test_mm_comilt_sbh(__m128bh __A, __m128bh __B) {664 // CHECK-LABEL: test_mm_comilt_sbh665 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16lt(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})666 return _mm_comilt_sbh(__A, __B);667}668 669int test_mm_comile_sbh(__m128bh __A, __m128bh __B) {670 // CHECK-LABEL: test_mm_comile_sbh671 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16le(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})672 return _mm_comile_sbh(__A, __B);673}674 675int test_mm_comigt_sbh(__m128bh __A, __m128bh __B) {676 // CHECK-LABEL: test_mm_comigt_sbh677 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16gt(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})678 return _mm_comigt_sbh(__A, __B);679}680 681int test_mm_comige_sbh(__m128bh __A, __m128bh __B) {682 // CHECK-LABEL: test_mm_comige_sbh683 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16ge(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})684 return _mm_comige_sbh(__A, __B);685}686 687int test_mm_comineq_sbh(__m128bh __A, __m128bh __B) {688 // CHECK-LABEL: test_mm_comineq_sbh689 // CHECK: %{{.}} = call i32 @llvm.x86.avx10.vcomisbf16neq(<8 x bfloat> %{{.}}, <8 x bfloat> %{{.}})690 return _mm_comineq_sbh(__A, __B);691}692 693__mmask16 test_mm256_cmp_pbh_mask_eq_oq(__m256bh a, __m256bh b) {694 // CHECK-LABEL: @test_mm256_cmp_pbh_mask_eq_oq695 // CHECK: fcmp oeq <16 x bfloat> %{{.*}}, %{{.*}}696 return _mm256_cmp_pbh_mask(a, b, _CMP_EQ_OQ);697}698 699__mmask16 test_mm256_cmp_pbh_mask_lt_os(__m256bh a, __m256bh b) {700 // CHECK-LABEL: test_mm256_cmp_pbh_mask_lt_os701 // CHECK: fcmp olt <16 x bfloat> %{{.*}}, %{{.*}}702 return _mm256_cmp_pbh_mask(a, b, _CMP_LT_OS);703}704 705__mmask16 test_mm256_cmp_pbh_mask_le_os(__m256bh a, __m256bh b) {706 // CHECK-LABEL: test_mm256_cmp_pbh_mask_le_os707 // CHECK: fcmp ole <16 x bfloat> %{{.*}}, %{{.*}}708 return _mm256_cmp_pbh_mask(a, b, _CMP_LE_OS);709}710 711__mmask16 test_mm256_cmp_pbh_mask_unord_q(__m256bh a, __m256bh b) {712 // CHECK-LABEL: test_mm256_cmp_pbh_mask_unord_q713 // CHECK: fcmp uno <16 x bfloat> %{{.*}}, %{{.*}}714 return _mm256_cmp_pbh_mask(a, b, _CMP_UNORD_Q);715}716 717__mmask16 test_mm256_cmp_pbh_mask_neq_uq(__m256bh a, __m256bh b) {718 // CHECK-LABEL: test_mm256_cmp_pbh_mask_neq_uq719 // CHECK: fcmp une <16 x bfloat> %{{.*}}, %{{.*}}720 return _mm256_cmp_pbh_mask(a, b, _CMP_NEQ_UQ);721}722 723__mmask16 test_mm256_cmp_pbh_mask_nlt_us(__m256bh a, __m256bh b) {724 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nlt_us725 // CHECK: fcmp uge <16 x bfloat> %{{.*}}, %{{.*}}726 return _mm256_cmp_pbh_mask(a, b, _CMP_NLT_US);727}728 729__mmask16 test_mm256_cmp_pbh_mask_nle_us(__m256bh a, __m256bh b) {730 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nle_us731 // CHECK: fcmp ugt <16 x bfloat> %{{.*}}, %{{.*}}732 return _mm256_cmp_pbh_mask(a, b, _CMP_NLE_US);733}734 735__mmask16 test_mm256_cmp_pbh_mask_ord_q(__m256bh a, __m256bh b) {736 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ord_q737 // CHECK: fcmp ord <16 x bfloat> %{{.*}}, %{{.*}}738 return _mm256_cmp_pbh_mask(a, b, _CMP_ORD_Q);739}740 741__mmask16 test_mm256_cmp_pbh_mask_eq_uq(__m256bh a, __m256bh b) {742 // CHECK-LABEL: test_mm256_cmp_pbh_mask_eq_uq743 // CHECK: fcmp ueq <16 x bfloat> %{{.*}}, %{{.*}}744 return _mm256_cmp_pbh_mask(a, b, _CMP_EQ_UQ);745}746 747__mmask16 test_mm256_cmp_pbh_mask_nge_us(__m256bh a, __m256bh b) {748 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nge_us749 // CHECK: fcmp ult <16 x bfloat> %{{.*}}, %{{.*}}750 return _mm256_cmp_pbh_mask(a, b, _CMP_NGE_US);751}752 753__mmask16 test_mm256_cmp_pbh_mask_ngt_us(__m256bh a, __m256bh b) {754 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ngt_us755 // CHECK: fcmp ule <16 x bfloat> %{{.*}}, %{{.*}}756 return _mm256_cmp_pbh_mask(a, b, _CMP_NGT_US);757}758 759__mmask16 test_mm256_cmp_pbh_mask_false_oq(__m256bh a, __m256bh b) {760 // CHECK-LABEL: test_mm256_cmp_pbh_mask_false_oq761 // CHECK: fcmp false <16 x bfloat> %{{.*}}, %{{.*}}762 return _mm256_cmp_pbh_mask(a, b, _CMP_FALSE_OQ);763}764 765__mmask16 test_mm256_cmp_pbh_mask_neq_oq(__m256bh a, __m256bh b) {766 // CHECK-LABEL: test_mm256_cmp_pbh_mask_neq_oq767 // CHECK: fcmp one <16 x bfloat> %{{.*}}, %{{.*}}768 return _mm256_cmp_pbh_mask(a, b, _CMP_NEQ_OQ);769}770 771__mmask16 test_mm256_cmp_pbh_mask_ge_os(__m256bh a, __m256bh b) {772 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ge_os773 // CHECK: fcmp oge <16 x bfloat> %{{.*}}, %{{.*}}774 return _mm256_cmp_pbh_mask(a, b, _CMP_GE_OS);775}776 777__mmask16 test_mm256_cmp_pbh_mask_gt_os(__m256bh a, __m256bh b) {778 // CHECK-LABEL: test_mm256_cmp_pbh_mask_gt_os779 // CHECK: fcmp ogt <16 x bfloat> %{{.*}}, %{{.*}}780 return _mm256_cmp_pbh_mask(a, b, _CMP_GT_OS);781}782 783__mmask16 test_mm256_cmp_pbh_mask_true_uq(__m256bh a, __m256bh b) {784 // CHECK-LABEL: test_mm256_cmp_pbh_mask_true_uq785 // CHECK: fcmp true <16 x bfloat> %{{.*}}, %{{.*}}786 return _mm256_cmp_pbh_mask(a, b, _CMP_TRUE_UQ);787}788 789__mmask16 test_mm256_cmp_pbh_mask_eq_os(__m256bh a, __m256bh b) {790 // CHECK-LABEL: test_mm256_cmp_pbh_mask_eq_os791 // CHECK: fcmp oeq <16 x bfloat> %{{.*}}, %{{.*}}792 return _mm256_cmp_pbh_mask(a, b, _CMP_EQ_OS);793}794 795__mmask16 test_mm256_cmp_pbh_mask_lt_oq(__m256bh a, __m256bh b) {796 // CHECK-LABEL: test_mm256_cmp_pbh_mask_lt_oq797 // CHECK: fcmp olt <16 x bfloat> %{{.*}}, %{{.*}}798 return _mm256_cmp_pbh_mask(a, b, _CMP_LT_OQ);799}800 801__mmask16 test_mm256_cmp_pbh_mask_le_oq(__m256bh a, __m256bh b) {802 // CHECK-LABEL: test_mm256_cmp_pbh_mask_le_oq803 // CHECK: fcmp ole <16 x bfloat> %{{.*}}, %{{.*}}804 return _mm256_cmp_pbh_mask(a, b, _CMP_LE_OQ);805}806 807__mmask16 test_mm256_cmp_pbh_mask_unord_s(__m256bh a, __m256bh b) {808 // CHECK-LABEL: test_mm256_cmp_pbh_mask_unord_s809 // CHECK: fcmp uno <16 x bfloat> %{{.*}}, %{{.*}}810 return _mm256_cmp_pbh_mask(a, b, _CMP_UNORD_S);811}812 813__mmask16 test_mm256_cmp_pbh_mask_neq_us(__m256bh a, __m256bh b) {814 // CHECK-LABEL: test_mm256_cmp_pbh_mask_neq_us815 // CHECK: fcmp une <16 x bfloat> %{{.*}}, %{{.*}}816 return _mm256_cmp_pbh_mask(a, b, _CMP_NEQ_US);817}818 819__mmask16 test_mm256_cmp_pbh_mask_nlt_uq(__m256bh a, __m256bh b) {820 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nlt_uq821 // CHECK: fcmp uge <16 x bfloat> %{{.*}}, %{{.*}}822 return _mm256_cmp_pbh_mask(a, b, _CMP_NLT_UQ);823}824 825__mmask16 test_mm256_cmp_pbh_mask_nle_uq(__m256bh a, __m256bh b) {826 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nle_uq827 // CHECK: fcmp ugt <16 x bfloat> %{{.*}}, %{{.*}}828 return _mm256_cmp_pbh_mask(a, b, _CMP_NLE_UQ);829}830 831__mmask16 test_mm256_cmp_pbh_mask_ord_s(__m256bh a, __m256bh b) {832 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ord_s833 // CHECK: fcmp ord <16 x bfloat> %{{.*}}, %{{.*}}834 return _mm256_cmp_pbh_mask(a, b, _CMP_ORD_S);835}836 837__mmask16 test_mm256_cmp_pbh_mask_eq_us(__m256bh a, __m256bh b) {838 // CHECK-LABEL: test_mm256_cmp_pbh_mask_eq_us839 // CHECK: fcmp ueq <16 x bfloat> %{{.*}}, %{{.*}}840 return _mm256_cmp_pbh_mask(a, b, _CMP_EQ_US);841}842 843__mmask16 test_mm256_cmp_pbh_mask_nge_uq(__m256bh a, __m256bh b) {844 // CHECK-LABEL: test_mm256_cmp_pbh_mask_nge_uq845 // CHECK: fcmp ult <16 x bfloat> %{{.*}}, %{{.*}}846 return _mm256_cmp_pbh_mask(a, b, _CMP_NGE_UQ);847}848 849__mmask16 test_mm256_cmp_pbh_mask_ngt_uq(__m256bh a, __m256bh b) {850 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ngt_uq851 // CHECK: fcmp ule <16 x bfloat> %{{.*}}, %{{.*}}852 return _mm256_cmp_pbh_mask(a, b, _CMP_NGT_UQ);853}854 855__mmask16 test_mm256_cmp_pbh_mask_false_os(__m256bh a, __m256bh b) {856 // CHECK-LABEL: test_mm256_cmp_pbh_mask_false_os857 // CHECK: fcmp false <16 x bfloat> %{{.*}}, %{{.*}}858 return _mm256_cmp_pbh_mask(a, b, _CMP_FALSE_OS);859}860 861__mmask16 test_mm256_cmp_pbh_mask_neq_os(__m256bh a, __m256bh b) {862 // CHECK-LABEL: test_mm256_cmp_pbh_mask_neq_os863 // CHECK: fcmp one <16 x bfloat> %{{.*}}, %{{.*}}864 return _mm256_cmp_pbh_mask(a, b, _CMP_NEQ_OS);865}866 867__mmask16 test_mm256_cmp_pbh_mask_ge_oq(__m256bh a, __m256bh b) {868 // CHECK-LABEL: test_mm256_cmp_pbh_mask_ge_oq869 // CHECK: fcmp oge <16 x bfloat> %{{.*}}, %{{.*}}870 return _mm256_cmp_pbh_mask(a, b, _CMP_GE_OQ);871}872 873__mmask16 test_mm256_cmp_pbh_mask_gt_oq(__m256bh a, __m256bh b) {874 // CHECK-LABEL: test_mm256_cmp_pbh_mask_gt_oq875 // CHECK: fcmp ogt <16 x bfloat> %{{.*}}, %{{.*}}876 return _mm256_cmp_pbh_mask(a, b, _CMP_GT_OQ);877}878 879__mmask16 test_mm256_cmp_pbh_mask_true_us(__m256bh a, __m256bh b) {880 // CHECK-LABEL: test_mm256_cmp_pbh_mask_true_us881 // CHECK: fcmp true <16 x bfloat> %{{.*}}, %{{.*}}882 return _mm256_cmp_pbh_mask(a, b, _CMP_TRUE_US);883}884 885__mmask16 test_mm256_mask_cmp_pbh_mask_eq_oq(__mmask16 m, __m256bh a, __m256bh b) {886 // CHECK-LABEL: @test_mm256_mask_cmp_pbh_mask_eq_oq887 // CHECK: fcmp oeq <16 x bfloat> %{{.*}}, %{{.*}}888 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}889 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_OQ);890}891 892__mmask16 test_mm256_mask_cmp_pbh_mask_lt_os(__mmask16 m, __m256bh a, __m256bh b) {893 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_lt_os894 // CHECK: fcmp olt <16 x bfloat> %{{.*}}, %{{.*}}895 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}896 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_LT_OS);897}898 899__mmask16 test_mm256_mask_cmp_pbh_mask_le_os(__mmask16 m, __m256bh a, __m256bh b) {900 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_le_os901 // CHECK: fcmp ole <16 x bfloat> %{{.*}}, %{{.*}}902 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}903 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_LE_OS);904}905 906__mmask16 test_mm256_mask_cmp_pbh_mask_unord_q(__mmask16 m, __m256bh a, __m256bh b) {907 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_unord_q908 // CHECK: fcmp uno <16 x bfloat> %{{.*}}, %{{.*}}909 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}910 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_UNORD_Q);911}912 913__mmask16 test_mm256_mask_cmp_pbh_mask_neq_uq(__mmask16 m, __m256bh a, __m256bh b) {914 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_neq_uq915 // CHECK: fcmp une <16 x bfloat> %{{.*}}, %{{.*}}916 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}917 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_UQ);918}919 920__mmask16 test_mm256_mask_cmp_pbh_mask_nlt_us(__mmask16 m, __m256bh a, __m256bh b) {921 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nlt_us922 // CHECK: fcmp uge <16 x bfloat> %{{.*}}, %{{.*}}923 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}924 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NLT_US);925}926 927__mmask16 test_mm256_mask_cmp_pbh_mask_nle_us(__mmask16 m, __m256bh a, __m256bh b) {928 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nle_us929 // CHECK: fcmp ugt <16 x bfloat> %{{.*}}, %{{.*}}930 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}931 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NLE_US);932}933 934__mmask16 test_mm256_mask_cmp_pbh_mask_ord_q(__mmask16 m, __m256bh a, __m256bh b) {935 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ord_q936 // CHECK: fcmp ord <16 x bfloat> %{{.*}}, %{{.*}}937 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}938 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_ORD_Q);939}940 941__mmask16 test_mm256_mask_cmp_pbh_mask_eq_uq(__mmask16 m, __m256bh a, __m256bh b) {942 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_eq_uq943 // CHECK: fcmp ueq <16 x bfloat> %{{.*}}, %{{.*}}944 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}945 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_UQ);946}947 948__mmask16 test_mm256_mask_cmp_pbh_mask_nge_us(__mmask16 m, __m256bh a, __m256bh b) {949 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nge_us950 // CHECK: fcmp ult <16 x bfloat> %{{.*}}, %{{.*}}951 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}952 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NGE_US);953}954 955__mmask16 test_mm256_mask_cmp_pbh_mask_ngt_us(__mmask16 m, __m256bh a, __m256bh b) {956 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ngt_us957 // CHECK: fcmp ule <16 x bfloat> %{{.*}}, %{{.*}}958 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}959 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NGT_US);960}961 962__mmask16 test_mm256_mask_cmp_pbh_mask_false_oq(__mmask16 m, __m256bh a, __m256bh b) {963 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_false_oq964 // CHECK: fcmp false <16 x bfloat> %{{.*}}, %{{.*}}965 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}966 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_FALSE_OQ);967}968 969__mmask16 test_mm256_mask_cmp_pbh_mask_neq_oq(__mmask16 m, __m256bh a, __m256bh b) {970 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_neq_oq971 // CHECK: fcmp one <16 x bfloat> %{{.*}}, %{{.*}}972 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}973 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_OQ);974}975 976__mmask16 test_mm256_mask_cmp_pbh_mask_ge_os(__mmask16 m, __m256bh a, __m256bh b) {977 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ge_os978 // CHECK: fcmp oge <16 x bfloat> %{{.*}}, %{{.*}}979 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}980 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_GE_OS);981}982 983__mmask16 test_mm256_mask_cmp_pbh_mask_gt_os(__mmask16 m, __m256bh a, __m256bh b) {984 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_gt_os985 // CHECK: fcmp ogt <16 x bfloat> %{{.*}}, %{{.*}}986 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}987 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_GT_OS);988}989 990__mmask16 test_mm256_mask_cmp_pbh_mask_true_uq(__mmask16 m, __m256bh a, __m256bh b) {991 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_true_uq992 // CHECK: fcmp true <16 x bfloat> %{{.*}}, %{{.*}}993 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}994 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_TRUE_UQ);995}996 997__mmask16 test_mm256_mask_cmp_pbh_mask_eq_os(__mmask16 m, __m256bh a, __m256bh b) {998 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_eq_os999 // CHECK: fcmp oeq <16 x bfloat> %{{.*}}, %{{.*}}1000 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1001 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_OS);1002}1003 1004__mmask16 test_mm256_mask_cmp_pbh_mask_lt_oq(__mmask16 m, __m256bh a, __m256bh b) {1005 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_lt_oq1006 // CHECK: fcmp olt <16 x bfloat> %{{.*}}, %{{.*}}1007 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1008 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_LT_OQ);1009}1010 1011__mmask16 test_mm256_mask_cmp_pbh_mask_le_oq(__mmask16 m, __m256bh a, __m256bh b) {1012 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_le_oq1013 // CHECK: fcmp ole <16 x bfloat> %{{.*}}, %{{.*}}1014 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1015 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_LE_OQ);1016}1017 1018__mmask16 test_mm256_mask_cmp_pbh_mask_unord_s(__mmask16 m, __m256bh a, __m256bh b) {1019 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_unord_s1020 // CHECK: fcmp uno <16 x bfloat> %{{.*}}, %{{.*}}1021 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1022 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_UNORD_S);1023}1024 1025__mmask16 test_mm256_mask_cmp_pbh_mask_neq_us(__mmask16 m, __m256bh a, __m256bh b) {1026 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_neq_us1027 // CHECK: fcmp une <16 x bfloat> %{{.*}}, %{{.*}}1028 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1029 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_US);1030}1031 1032__mmask16 test_mm256_mask_cmp_pbh_mask_nlt_uq(__mmask16 m, __m256bh a, __m256bh b) {1033 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nlt_uq1034 // CHECK: fcmp uge <16 x bfloat> %{{.*}}, %{{.*}}1035 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1036 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NLT_UQ);1037}1038 1039__mmask16 test_mm256_mask_cmp_pbh_mask_nle_uq(__mmask16 m, __m256bh a, __m256bh b) {1040 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nle_uq1041 // CHECK: fcmp ugt <16 x bfloat> %{{.*}}, %{{.*}}1042 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1043 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NLE_UQ);1044}1045 1046__mmask16 test_mm256_mask_cmp_pbh_mask_ord_s(__mmask16 m, __m256bh a, __m256bh b) {1047 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ord_s1048 // CHECK: fcmp ord <16 x bfloat> %{{.*}}, %{{.*}}1049 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1050 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_ORD_S);1051}1052 1053__mmask16 test_mm256_mask_cmp_pbh_mask_eq_us(__mmask16 m, __m256bh a, __m256bh b) {1054 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_eq_us1055 // CHECK: fcmp ueq <16 x bfloat> %{{.*}}, %{{.*}}1056 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1057 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_US);1058}1059 1060__mmask16 test_mm256_mask_cmp_pbh_mask_nge_uq(__mmask16 m, __m256bh a, __m256bh b) {1061 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_nge_uq1062 // CHECK: fcmp ult <16 x bfloat> %{{.*}}, %{{.*}}1063 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1064 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NGE_UQ);1065}1066 1067__mmask16 test_mm256_mask_cmp_pbh_mask_ngt_uq(__mmask16 m, __m256bh a, __m256bh b) {1068 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ngt_uq1069 // CHECK: fcmp ule <16 x bfloat> %{{.*}}, %{{.*}}1070 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1071 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NGT_UQ);1072}1073 1074__mmask16 test_mm256_mask_cmp_pbh_mask_false_os(__mmask16 m, __m256bh a, __m256bh b) {1075 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_false_os1076 // CHECK: fcmp false <16 x bfloat> %{{.*}}, %{{.*}}1077 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1078 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_FALSE_OS);1079}1080 1081__mmask16 test_mm256_mask_cmp_pbh_mask_neq_os(__mmask16 m, __m256bh a, __m256bh b) {1082 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_neq_os1083 // CHECK: fcmp one <16 x bfloat> %{{.*}}, %{{.*}}1084 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1085 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_OS);1086}1087 1088__mmask16 test_mm256_mask_cmp_pbh_mask_ge_oq(__mmask16 m, __m256bh a, __m256bh b) {1089 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_ge_oq1090 // CHECK: fcmp oge <16 x bfloat> %{{.*}}, %{{.*}}1091 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1092 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_GE_OQ);1093}1094 1095__mmask16 test_mm256_mask_cmp_pbh_mask_gt_oq(__mmask16 m, __m256bh a, __m256bh b) {1096 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_gt_oq1097 // CHECK: fcmp ogt <16 x bfloat> %{{.*}}, %{{.*}}1098 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1099 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_GT_OQ);1100}1101 1102__mmask16 test_mm256_mask_cmp_pbh_mask_true_us(__mmask16 m, __m256bh a, __m256bh b) {1103 // CHECK-LABEL: test_mm256_mask_cmp_pbh_mask_true_us1104 // CHECK: fcmp true <16 x bfloat> %{{.*}}, %{{.*}}1105 // CHECK: and <16 x i1> %{{.*}}, %{{.*}}1106 return _mm256_mask_cmp_pbh_mask(m, a, b, _CMP_TRUE_US);1107}1108 1109__mmask8 test_mm_cmp_pbh_mask_eq_oq(__m128bh a, __m128bh b) {1110 // CHECK-LABEL: @test_mm_cmp_pbh_mask_eq_oq1111 // CHECK: fcmp oeq <8 x bfloat> %{{.*}}, %{{.*}}1112 return _mm_cmp_pbh_mask(a, b, _CMP_EQ_OQ);1113}1114 1115__mmask8 test_mm_cmp_pbh_mask_lt_os(__m128bh a, __m128bh b) {1116 // CHECK-LABEL: test_mm_cmp_pbh_mask_lt_os1117 // CHECK: fcmp olt <8 x bfloat> %{{.*}}, %{{.*}}1118 return _mm_cmp_pbh_mask(a, b, _CMP_LT_OS);1119}1120 1121__mmask8 test_mm_cmp_pbh_mask_le_os(__m128bh a, __m128bh b) {1122 // CHECK-LABEL: test_mm_cmp_pbh_mask_le_os1123 // CHECK: fcmp ole <8 x bfloat> %{{.*}}, %{{.*}}1124 return _mm_cmp_pbh_mask(a, b, _CMP_LE_OS);1125}1126 1127__mmask8 test_mm_cmp_pbh_mask_unord_q(__m128bh a, __m128bh b) {1128 // CHECK-LABEL: test_mm_cmp_pbh_mask_unord_q1129 // CHECK: fcmp uno <8 x bfloat> %{{.*}}, %{{.*}}1130 return _mm_cmp_pbh_mask(a, b, _CMP_UNORD_Q);1131}1132 1133__mmask8 test_mm_cmp_pbh_mask_neq_uq(__m128bh a, __m128bh b) {1134 // CHECK-LABEL: test_mm_cmp_pbh_mask_neq_uq1135 // CHECK: fcmp une <8 x bfloat> %{{.*}}, %{{.*}}1136 return _mm_cmp_pbh_mask(a, b, _CMP_NEQ_UQ);1137}1138 1139__mmask8 test_mm_cmp_pbh_mask_nlt_us(__m128bh a, __m128bh b) {1140 // CHECK-LABEL: test_mm_cmp_pbh_mask_nlt_us1141 // CHECK: fcmp uge <8 x bfloat> %{{.*}}, %{{.*}}1142 return _mm_cmp_pbh_mask(a, b, _CMP_NLT_US);1143}1144 1145__mmask8 test_mm_cmp_pbh_mask_nle_us(__m128bh a, __m128bh b) {1146 // CHECK-LABEL: test_mm_cmp_pbh_mask_nle_us1147 // CHECK: fcmp ugt <8 x bfloat> %{{.*}}, %{{.*}}1148 return _mm_cmp_pbh_mask(a, b, _CMP_NLE_US);1149}1150 1151__mmask8 test_mm_cmp_pbh_mask_ord_q(__m128bh a, __m128bh b) {1152 // CHECK-LABEL: test_mm_cmp_pbh_mask_ord_q1153 // CHECK: fcmp ord <8 x bfloat> %{{.*}}, %{{.*}}1154 return _mm_cmp_pbh_mask(a, b, _CMP_ORD_Q);1155}1156 1157__mmask8 test_mm_cmp_pbh_mask_eq_uq(__m128bh a, __m128bh b) {1158 // CHECK-LABEL: test_mm_cmp_pbh_mask_eq_uq1159 // CHECK: fcmp ueq <8 x bfloat> %{{.*}}, %{{.*}}1160 return _mm_cmp_pbh_mask(a, b, _CMP_EQ_UQ);1161}1162 1163__mmask8 test_mm_cmp_pbh_mask_nge_us(__m128bh a, __m128bh b) {1164 // CHECK-LABEL: test_mm_cmp_pbh_mask_nge_us1165 // CHECK: fcmp ult <8 x bfloat> %{{.*}}, %{{.*}}1166 return _mm_cmp_pbh_mask(a, b, _CMP_NGE_US);1167}1168 1169__mmask8 test_mm_cmp_pbh_mask_ngt_us(__m128bh a, __m128bh b) {1170 // CHECK-LABEL: test_mm_cmp_pbh_mask_ngt_us1171 // CHECK: fcmp ule <8 x bfloat> %{{.*}}, %{{.*}}1172 return _mm_cmp_pbh_mask(a, b, _CMP_NGT_US);1173}1174 1175__mmask8 test_mm_cmp_pbh_mask_false_oq(__m128bh a, __m128bh b) {1176 // CHECK-LABEL: test_mm_cmp_pbh_mask_false_oq1177 // CHECK: fcmp false <8 x bfloat> %{{.*}}, %{{.*}}1178 return _mm_cmp_pbh_mask(a, b, _CMP_FALSE_OQ);1179}1180 1181__mmask8 test_mm_cmp_pbh_mask_neq_oq(__m128bh a, __m128bh b) {1182 // CHECK-LABEL: test_mm_cmp_pbh_mask_neq_oq1183 // CHECK: fcmp one <8 x bfloat> %{{.*}}, %{{.*}}1184 return _mm_cmp_pbh_mask(a, b, _CMP_NEQ_OQ);1185}1186 1187__mmask8 test_mm_cmp_pbh_mask_ge_os(__m128bh a, __m128bh b) {1188 // CHECK-LABEL: test_mm_cmp_pbh_mask_ge_os1189 // CHECK: fcmp oge <8 x bfloat> %{{.*}}, %{{.*}}1190 return _mm_cmp_pbh_mask(a, b, _CMP_GE_OS);1191}1192 1193__mmask8 test_mm_cmp_pbh_mask_gt_os(__m128bh a, __m128bh b) {1194 // CHECK-LABEL: test_mm_cmp_pbh_mask_gt_os1195 // CHECK: fcmp ogt <8 x bfloat> %{{.*}}, %{{.*}}1196 return _mm_cmp_pbh_mask(a, b, _CMP_GT_OS);1197}1198 1199__mmask8 test_mm_cmp_pbh_mask_true_uq(__m128bh a, __m128bh b) {1200 // CHECK-LABEL: test_mm_cmp_pbh_mask_true_uq1201 // CHECK: fcmp true <8 x bfloat> %{{.*}}, %{{.*}}1202 return _mm_cmp_pbh_mask(a, b, _CMP_TRUE_UQ);1203}1204 1205__mmask8 test_mm_cmp_pbh_mask_eq_os(__m128bh a, __m128bh b) {1206 // CHECK-LABEL: test_mm_cmp_pbh_mask_eq_os1207 // CHECK: fcmp oeq <8 x bfloat> %{{.*}}, %{{.*}}1208 return _mm_cmp_pbh_mask(a, b, _CMP_EQ_OS);1209}1210 1211__mmask8 test_mm_cmp_pbh_mask_lt_oq(__m128bh a, __m128bh b) {1212 // CHECK-LABEL: test_mm_cmp_pbh_mask_lt_oq1213 // CHECK: fcmp olt <8 x bfloat> %{{.*}}, %{{.*}}1214 return _mm_cmp_pbh_mask(a, b, _CMP_LT_OQ);1215}1216 1217__mmask8 test_mm_cmp_pbh_mask_le_oq(__m128bh a, __m128bh b) {1218 // CHECK-LABEL: test_mm_cmp_pbh_mask_le_oq1219 // CHECK: fcmp ole <8 x bfloat> %{{.*}}, %{{.*}}1220 return _mm_cmp_pbh_mask(a, b, _CMP_LE_OQ);1221}1222 1223__mmask8 test_mm_cmp_pbh_mask_unord_s(__m128bh a, __m128bh b) {1224 // CHECK-LABEL: test_mm_cmp_pbh_mask_unord_s1225 // CHECK: fcmp uno <8 x bfloat> %{{.*}}, %{{.*}}1226 return _mm_cmp_pbh_mask(a, b, _CMP_UNORD_S);1227}1228 1229__mmask8 test_mm_cmp_pbh_mask_neq_us(__m128bh a, __m128bh b) {1230 // CHECK-LABEL: test_mm_cmp_pbh_mask_neq_us1231 // CHECK: fcmp une <8 x bfloat> %{{.*}}, %{{.*}}1232 return _mm_cmp_pbh_mask(a, b, _CMP_NEQ_US);1233}1234 1235__mmask8 test_mm_cmp_pbh_mask_nlt_uq(__m128bh a, __m128bh b) {1236 // CHECK-LABEL: test_mm_cmp_pbh_mask_nlt_uq1237 // CHECK: fcmp uge <8 x bfloat> %{{.*}}, %{{.*}}1238 return _mm_cmp_pbh_mask(a, b, _CMP_NLT_UQ);1239}1240 1241__mmask8 test_mm_cmp_pbh_mask_nle_uq(__m128bh a, __m128bh b) {1242 // CHECK-LABEL: test_mm_cmp_pbh_mask_nle_uq1243 // CHECK: fcmp ugt <8 x bfloat> %{{.*}}, %{{.*}}1244 return _mm_cmp_pbh_mask(a, b, _CMP_NLE_UQ);1245}1246 1247__mmask8 test_mm_cmp_pbh_mask_ord_s(__m128bh a, __m128bh b) {1248 // CHECK-LABEL: test_mm_cmp_pbh_mask_ord_s1249 // CHECK: fcmp ord <8 x bfloat> %{{.*}}, %{{.*}}1250 return _mm_cmp_pbh_mask(a, b, _CMP_ORD_S);1251}1252 1253__mmask8 test_mm_cmp_pbh_mask_eq_us(__m128bh a, __m128bh b) {1254 // CHECK-LABEL: test_mm_cmp_pbh_mask_eq_us1255 // CHECK: fcmp ueq <8 x bfloat> %{{.*}}, %{{.*}}1256 return _mm_cmp_pbh_mask(a, b, _CMP_EQ_US);1257}1258 1259__mmask8 test_mm_cmp_pbh_mask_nge_uq(__m128bh a, __m128bh b) {1260 // CHECK-LABEL: test_mm_cmp_pbh_mask_nge_uq1261 // CHECK: fcmp ult <8 x bfloat> %{{.*}}, %{{.*}}1262 return _mm_cmp_pbh_mask(a, b, _CMP_NGE_UQ);1263}1264 1265__mmask8 test_mm_cmp_pbh_mask_ngt_uq(__m128bh a, __m128bh b) {1266 // CHECK-LABEL: test_mm_cmp_pbh_mask_ngt_uq1267 // CHECK: fcmp ule <8 x bfloat> %{{.*}}, %{{.*}}1268 return _mm_cmp_pbh_mask(a, b, _CMP_NGT_UQ);1269}1270 1271__mmask8 test_mm_cmp_pbh_mask_false_os(__m128bh a, __m128bh b) {1272 // CHECK-LABEL: test_mm_cmp_pbh_mask_false_os1273 // CHECK: fcmp false <8 x bfloat> %{{.*}}, %{{.*}}1274 return _mm_cmp_pbh_mask(a, b, _CMP_FALSE_OS);1275}1276 1277__mmask8 test_mm_cmp_pbh_mask_neq_os(__m128bh a, __m128bh b) {1278 // CHECK-LABEL: test_mm_cmp_pbh_mask_neq_os1279 // CHECK: fcmp one <8 x bfloat> %{{.*}}, %{{.*}}1280 return _mm_cmp_pbh_mask(a, b, _CMP_NEQ_OS);1281}1282 1283__mmask8 test_mm_cmp_pbh_mask_ge_oq(__m128bh a, __m128bh b) {1284 // CHECK-LABEL: test_mm_cmp_pbh_mask_ge_oq1285 // CHECK: fcmp oge <8 x bfloat> %{{.*}}, %{{.*}}1286 return _mm_cmp_pbh_mask(a, b, _CMP_GE_OQ);1287}1288 1289__mmask8 test_mm_cmp_pbh_mask_gt_oq(__m128bh a, __m128bh b) {1290 // CHECK-LABEL: test_mm_cmp_pbh_mask_gt_oq1291 // CHECK: fcmp ogt <8 x bfloat> %{{.*}}, %{{.*}}1292 return _mm_cmp_pbh_mask(a, b, _CMP_GT_OQ);1293}1294 1295__mmask8 test_mm_cmp_pbh_mask_true_us(__m128bh a, __m128bh b) {1296 // CHECK-LABEL: test_mm_cmp_pbh_mask_true_us1297 // CHECK: fcmp true <8 x bfloat> %{{.*}}, %{{.*}}1298 return _mm_cmp_pbh_mask(a, b, _CMP_TRUE_US);1299}1300 1301__mmask8 test_mm_mask_cmp_pbh_mask_eq_oq(__mmask8 m, __m128bh a, __m128bh b) {1302 // CHECK-LABEL: @test_mm_mask_cmp_pbh_mask_eq_oq1303 // CHECK: fcmp oeq <8 x bfloat> %{{.*}}, %{{.*}}1304 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1305 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_OQ);1306}1307 1308__mmask8 test_mm_mask_cmp_pbh_mask_lt_os(__mmask8 m, __m128bh a, __m128bh b) {1309 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_lt_os1310 // CHECK: fcmp olt <8 x bfloat> %{{.*}}, %{{.*}}1311 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1312 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_LT_OS);1313}1314 1315__mmask8 test_mm_mask_cmp_pbh_mask_le_os(__mmask8 m, __m128bh a, __m128bh b) {1316 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_le_os1317 // CHECK: fcmp ole <8 x bfloat> %{{.*}}, %{{.*}}1318 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1319 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_LE_OS);1320}1321 1322__mmask8 test_mm_mask_cmp_pbh_mask_unord_q(__mmask8 m, __m128bh a, __m128bh b) {1323 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_unord_q1324 // CHECK: fcmp uno <8 x bfloat> %{{.*}}, %{{.*}}1325 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1326 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_UNORD_Q);1327}1328 1329__mmask8 test_mm_mask_cmp_pbh_mask_neq_uq(__mmask8 m, __m128bh a, __m128bh b) {1330 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_neq_uq1331 // CHECK: fcmp une <8 x bfloat> %{{.*}}, %{{.*}}1332 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1333 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_UQ);1334}1335 1336__mmask8 test_mm_mask_cmp_pbh_mask_nlt_us(__mmask8 m, __m128bh a, __m128bh b) {1337 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nlt_us1338 // CHECK: fcmp uge <8 x bfloat> %{{.*}}, %{{.*}}1339 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1340 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NLT_US);1341}1342 1343__mmask8 test_mm_mask_cmp_pbh_mask_nle_us(__mmask8 m, __m128bh a, __m128bh b) {1344 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nle_us1345 // CHECK: fcmp ugt <8 x bfloat> %{{.*}}, %{{.*}}1346 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1347 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NLE_US);1348}1349 1350__mmask8 test_mm_mask_cmp_pbh_mask_ord_q(__mmask8 m, __m128bh a, __m128bh b) {1351 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ord_q1352 // CHECK: fcmp ord <8 x bfloat> %{{.*}}, %{{.*}}1353 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1354 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_ORD_Q);1355}1356 1357__mmask8 test_mm_mask_cmp_pbh_mask_eq_uq(__mmask8 m, __m128bh a, __m128bh b) {1358 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_eq_uq1359 // CHECK: fcmp ueq <8 x bfloat> %{{.*}}, %{{.*}}1360 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1361 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_UQ);1362}1363 1364__mmask8 test_mm_mask_cmp_pbh_mask_nge_us(__mmask8 m, __m128bh a, __m128bh b) {1365 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nge_us1366 // CHECK: fcmp ult <8 x bfloat> %{{.*}}, %{{.*}}1367 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1368 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NGE_US);1369}1370 1371__mmask8 test_mm_mask_cmp_pbh_mask_ngt_us(__mmask8 m, __m128bh a, __m128bh b) {1372 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ngt_us1373 // CHECK: fcmp ule <8 x bfloat> %{{.*}}, %{{.*}}1374 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1375 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NGT_US);1376}1377 1378__mmask8 test_mm_mask_cmp_pbh_mask_false_oq(__mmask8 m, __m128bh a, __m128bh b) {1379 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_false_oq1380 // CHECK: fcmp false <8 x bfloat> %{{.*}}, %{{.*}}1381 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1382 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_FALSE_OQ);1383}1384 1385__mmask8 test_mm_mask_cmp_pbh_mask_neq_oq(__mmask8 m, __m128bh a, __m128bh b) {1386 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_neq_oq1387 // CHECK: fcmp one <8 x bfloat> %{{.*}}, %{{.*}}1388 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1389 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_OQ);1390}1391 1392__mmask8 test_mm_mask_cmp_pbh_mask_ge_os(__mmask8 m, __m128bh a, __m128bh b) {1393 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ge_os1394 // CHECK: fcmp oge <8 x bfloat> %{{.*}}, %{{.*}}1395 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1396 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_GE_OS);1397}1398 1399__mmask8 test_mm_mask_cmp_pbh_mask_gt_os(__mmask8 m, __m128bh a, __m128bh b) {1400 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_gt_os1401 // CHECK: fcmp ogt <8 x bfloat> %{{.*}}, %{{.*}}1402 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1403 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_GT_OS);1404}1405 1406__mmask8 test_mm_mask_cmp_pbh_mask_true_uq(__mmask8 m, __m128bh a, __m128bh b) {1407 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_true_uq1408 // CHECK: fcmp true <8 x bfloat> %{{.*}}, %{{.*}}1409 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1410 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_TRUE_UQ);1411}1412 1413__mmask8 test_mm_mask_cmp_pbh_mask_eq_os(__mmask8 m, __m128bh a, __m128bh b) {1414 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_eq_os1415 // CHECK: fcmp oeq <8 x bfloat> %{{.*}}, %{{.*}}1416 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1417 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_OS);1418}1419 1420__mmask8 test_mm_mask_cmp_pbh_mask_lt_oq(__mmask8 m, __m128bh a, __m128bh b) {1421 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_lt_oq1422 // CHECK: fcmp olt <8 x bfloat> %{{.*}}, %{{.*}}1423 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1424 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_LT_OQ);1425}1426 1427__mmask8 test_mm_mask_cmp_pbh_mask_le_oq(__mmask8 m, __m128bh a, __m128bh b) {1428 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_le_oq1429 // CHECK: fcmp ole <8 x bfloat> %{{.*}}, %{{.*}}1430 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1431 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_LE_OQ);1432}1433 1434__mmask8 test_mm_mask_cmp_pbh_mask_unord_s(__mmask8 m, __m128bh a, __m128bh b) {1435 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_unord_s1436 // CHECK: fcmp uno <8 x bfloat> %{{.*}}, %{{.*}}1437 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1438 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_UNORD_S);1439}1440 1441__mmask8 test_mm_mask_cmp_pbh_mask_neq_us(__mmask8 m, __m128bh a, __m128bh b) {1442 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_neq_us1443 // CHECK: fcmp une <8 x bfloat> %{{.*}}, %{{.*}}1444 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1445 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_US);1446}1447 1448__mmask8 test_mm_mask_cmp_pbh_mask_nlt_uq(__mmask8 m, __m128bh a, __m128bh b) {1449 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nlt_uq1450 // CHECK: fcmp uge <8 x bfloat> %{{.*}}, %{{.*}}1451 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1452 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NLT_UQ);1453}1454 1455__mmask8 test_mm_mask_cmp_pbh_mask_nle_uq(__mmask8 m, __m128bh a, __m128bh b) {1456 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nle_uq1457 // CHECK: fcmp ugt <8 x bfloat> %{{.*}}, %{{.*}}1458 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1459 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NLE_UQ);1460}1461 1462__mmask8 test_mm_mask_cmp_pbh_mask_ord_s(__mmask8 m, __m128bh a, __m128bh b) {1463 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ord_s1464 // CHECK: fcmp ord <8 x bfloat> %{{.*}}, %{{.*}}1465 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1466 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_ORD_S);1467}1468 1469__mmask8 test_mm_mask_cmp_pbh_mask_eq_us(__mmask8 m, __m128bh a, __m128bh b) {1470 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_eq_us1471 // CHECK: fcmp ueq <8 x bfloat> %{{.*}}, %{{.*}}1472 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1473 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_EQ_US);1474}1475 1476__mmask8 test_mm_mask_cmp_pbh_mask_nge_uq(__mmask8 m, __m128bh a, __m128bh b) {1477 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_nge_uq1478 // CHECK: fcmp ult <8 x bfloat> %{{.*}}, %{{.*}}1479 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1480 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NGE_UQ);1481}1482 1483__mmask8 test_mm_mask_cmp_pbh_mask_ngt_uq(__mmask8 m, __m128bh a, __m128bh b) {1484 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ngt_uq1485 // CHECK: fcmp ule <8 x bfloat> %{{.*}}, %{{.*}}1486 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1487 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NGT_UQ);1488}1489 1490__mmask8 test_mm_mask_cmp_pbh_mask_false_os(__mmask8 m, __m128bh a, __m128bh b) {1491 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_false_os1492 // CHECK: fcmp false <8 x bfloat> %{{.*}}, %{{.*}}1493 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1494 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_FALSE_OS);1495}1496 1497__mmask8 test_mm_mask_cmp_pbh_mask_neq_os(__mmask8 m, __m128bh a, __m128bh b) {1498 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_neq_os1499 // CHECK: fcmp one <8 x bfloat> %{{.*}}, %{{.*}}1500 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1501 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_NEQ_OS);1502}1503 1504__mmask8 test_mm_mask_cmp_pbh_mask_ge_oq(__mmask8 m, __m128bh a, __m128bh b) {1505 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_ge_oq1506 // CHECK: fcmp oge <8 x bfloat> %{{.*}}, %{{.*}}1507 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1508 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_GE_OQ);1509}1510 1511__mmask8 test_mm_mask_cmp_pbh_mask_gt_oq(__mmask8 m, __m128bh a, __m128bh b) {1512 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_gt_oq1513 // CHECK: fcmp ogt <8 x bfloat> %{{.*}}, %{{.*}}1514 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1515 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_GT_OQ);1516}1517 1518__mmask8 test_mm_mask_cmp_pbh_mask_true_us(__mmask8 m, __m128bh a, __m128bh b) {1519 // CHECK-LABEL: test_mm_mask_cmp_pbh_mask_true_us1520 // CHECK: fcmp true <8 x bfloat> %{{.*}}, %{{.*}}1521 // CHECK: and <8 x i1> %{{.*}}, %{{.*}}1522 return _mm_mask_cmp_pbh_mask(m, a, b, _CMP_TRUE_US);1523}1524 1525 1526__mmask16 test_mm256_mask_fpclass_pbh_mask(__mmask16 __U, __m256bh __A) {1527 // CHECK-LABEL: @test_mm256_mask_fpclass_pbh_mask1528 // CHECK: @llvm.x86.avx10.fpclass.bf16.2561529 return _mm256_mask_fpclass_pbh_mask(__U, __A, 4);1530}1531 1532__mmask16 test_mm256_fpclass_pbh_mask(__m256bh __A) {1533 // CHECK-LABEL: @test_mm256_fpclass_pbh_mask1534 // CHECK: @llvm.x86.avx10.fpclass.bf16.2561535 return _mm256_fpclass_pbh_mask(__A, 4);1536}1537 1538__mmask8 test_mm_mask_fpclass_pbh_mask(__mmask8 __U, __m128bh __A) {1539 // CHECK-LABEL: @test_mm_mask_fpclass_pbh_mask1540 // CHECK: @llvm.x86.avx10.fpclass.bf16.1281541 return _mm_mask_fpclass_pbh_mask(__U, __A, 4);1542}1543 1544__mmask8 test_mm_fpclass_pbh_mask(__m128bh __A) {1545 // CHECK-LABEL: @test_mm_fpclass_pbh_mask1546 // CHECK: @llvm.x86.avx10.fpclass.bf16.1281547 return _mm_fpclass_pbh_mask(__A, 4);1548}1549 1550__m256bh test_mm256_scalef_pbh(__m256bh __A, __m256bh __B) {1551 // CHECK-LABEL: @test_mm256_scalef_pbh1552 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.2561553 return _mm256_scalef_pbh(__A, __B);1554}1555 1556__m256bh test_mm256_mask_scalef_pbh(__m256bh __W, __mmask16 __U, __m256bh __A, __m256bh __B) {1557 // CHECK-LABEL: @test_mm256_mask_scalef_pbh1558 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.2561559 return _mm256_mask_scalef_pbh(__W, __U, __A, __B);1560}1561 1562__m256bh test_mm256_maskz_scalef_pbh(__mmask16 __U, __m256bh __A, __m256bh __B) {1563 // CHECK-LABEL: @test_mm256_maskz_scalef_pbh1564 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.2561565 return _mm256_maskz_scalef_pbh(__U, __A, __B);1566}1567 1568__m256bh test_mm256_rcp_pbh(__m256bh __A) {1569 // CHECK-LABEL: @test_mm256_rcp_pbh1570 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.2561571 return _mm256_rcp_pbh(__A);1572}1573 1574__m256bh test_mm256_mask_rcp_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1575 // CHECK-LABEL: @test_mm256_mask_rcp_pbh1576 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.2561577 return (__m256bh)_mm256_mask_rcp_pbh(__W, __U, __A);1578}1579 1580__m256bh test_mm256_maskz_rcp_pbh(__mmask16 __U, __m256bh __A) {1581 // CHECK-LABEL: @test_mm256_maskz_rcp_pbh1582 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.2561583 return _mm256_maskz_rcp_pbh(__U, __A);1584}1585 1586__m256bh test_mm256_getexp_pbh(__m256bh __A) {1587 // CHECK-LABEL: @test_mm256_getexp_pbh1588 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.2561589 return _mm256_getexp_pbh(__A);1590}1591 1592__m256bh test_mm256_mask_getexp_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1593 // CHECK-LABEL: @test_mm256_mask_getexp_pbh1594 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.2561595 return _mm256_mask_getexp_pbh(__W, __U, __A);1596}1597 1598__m256bh test_mm256_maskz_getexp_pbh(__mmask16 __U, __m256bh __A) {1599 // CHECK-LABEL: @test_mm256_maskz_getexp_pbh1600 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.2561601 return _mm256_maskz_getexp_pbh(__U, __A);1602}1603 1604__m256bh test_mm256_rsqrt_pbh(__m256bh __A) {1605 // CHECK-LABEL: @test_mm256_rsqrt_pbh1606 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.2561607 return _mm256_rsqrt_pbh(__A);1608}1609 1610__m256bh test_mm256_mask_rsqrt_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1611 // CHECK-LABEL: @test_mm256_mask_rsqrt_pbh1612 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.2561613 return (__m256bh)_mm256_mask_rsqrt_pbh(__W, __U, __A);1614}1615 1616__m256bh test_mm256_maskz_rsqrt_pbh(__mmask16 __U, __m256bh __A) {1617 // CHECK-LABEL: @test_mm256_maskz_rsqrt_pbh1618 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.2561619 return _mm256_maskz_rsqrt_pbh(__U, __A);1620}1621 1622__m256bh test_mm256_reduce_pbh(__m256bh __A) {1623 // CHECK-LABEL: @test_mm256_reduce_pbh1624 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.2561625 return _mm256_reduce_pbh(__A, 3);1626}1627 1628__m256bh test_mm256_mask_reduce_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1629 // CHECK-LABEL: @test_mm256_mask_reduce_pbh1630 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.2561631 return _mm256_mask_reduce_pbh(__W, __U, __A, 1);1632}1633 1634__m256bh test_mm256_maskz_reduce_pbh(__mmask16 __U, __m256bh __A) {1635 // CHECK-LABEL: @test_mm256_maskz_reduce_pbh1636 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.2561637 return _mm256_maskz_reduce_pbh(__U, __A, 1);1638}1639 1640__m256bh test_mm256_roundscale_pbh(__m256bh __A) {1641 // CHECK-LABEL: @test_mm256_roundscale_pbh1642 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.2561643 return _mm256_roundscale_pbh(__A, 3);1644}1645 1646__m256bh test_mm256_mask_roundscale_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1647 // CHECK-LABEL: @test_mm256_mask_roundscale_pbh1648 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.2561649 return _mm256_mask_roundscale_pbh(__W, __U, __A, 1);1650}1651 1652__m256bh test_mm256_maskz_roundscale_pbh(__mmask16 __U, __m256bh __A) {1653 // CHECK-LABEL: @test_mm256_maskz_roundscale_pbh1654 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.2561655 return _mm256_maskz_roundscale_pbh(__U, __A, 1 );1656}1657 1658__m256bh test_mm256_getmant_pbh(__m256bh __A) {1659 // CHECK-LABEL: @test_mm256_getmant_pbh1660 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.2561661 return _mm256_getmant_pbh(__A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1662}1663 1664__m256bh test_mm256_mask_getmant_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1665 // CHECK-LABEL: @test_mm256_mask_getmant_pbh1666 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.2561667 return _mm256_mask_getmant_pbh(__W, __U, __A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1668}1669 1670__m256bh test_mm256_maskz_getmant_pbh(__mmask16 __U, __m256bh __A) {1671 // CHECK-LABEL: @test_mm256_maskz_getmant_pbh1672 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.2561673 return _mm256_maskz_getmant_pbh(__U, __A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1674}1675 1676__m256bh test_mm256_sqrt_pbh(__m256bh __A) {1677 // CHECK-LABEL: @test_mm256_sqrt_pbh1678 // CHECK: call <16 x bfloat> @llvm.sqrt.v16bf16(<16 x bfloat> %{{.*}})1679 return _mm256_sqrt_pbh(__A);1680}1681 1682__m256bh test_mm256_mask_sqrt_pbh(__m256bh __W, __mmask16 __U, __m256bh __A) {1683 // CHECK-LABEL: @test_mm256_mask_sqrt_pbh1684 // CHECK: @llvm.sqrt.v16bf161685 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1686 return (__m256bh)_mm256_mask_sqrt_pbh(__W, __U, __A);1687}1688 1689__m256bh test_mm256_maskz_sqrt_pbh(__mmask16 __U, __m256bh __A) {1690 // CHECK-LABEL: @test_mm256_maskz_sqrt_pbh1691 // CHECK: @llvm.sqrt.v16bf161692 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1693 return _mm256_maskz_sqrt_pbh(__U, __A);1694}1695 1696__m128bh test_mm_scalef_pbh(__m128bh __A, __m128bh __B) {1697 // CHECK-LABEL: @test_mm_scalef_pbh1698 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.1281699 return _mm_scalef_pbh(__A, __B);1700}1701 1702__m128bh test_mm_mask_scalef_pbh(__m128bh __W, __mmask8 __U, __m128bh __A, __m128bh __B) {1703 // CHECK-LABEL: @test_mm_mask_scalef_pbh1704 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.1281705 return _mm_mask_scalef_pbh(__W, __U, __A, __B);1706}1707 1708__m128bh test_mm_maskz_scalef_pbh(__mmask8 __U, __m128bh __A, __m128bh __B) {1709 // CHECK-LABEL: @test_mm_maskz_scalef_pbh1710 // CHECK: @llvm.x86.avx10.mask.scalef.bf16.1281711 return _mm_maskz_scalef_pbh(__U, __A, __B);1712}1713 1714__m128bh test_mm_rcp_pbh(__m128bh __A) {1715 // CHECK-LABEL: @test_mm_rcp_pbh1716 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.1281717 return _mm_rcp_pbh(__A);1718}1719 1720__m128bh test_mm_mask_rcp_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1721 // CHECK-LABEL: @test_mm_mask_rcp_pbh1722 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.1281723 return (__m128bh)_mm_mask_rcp_pbh(__W, __U, __A);1724}1725 1726__m128bh test_mm_maskz_rcp_pbh(__mmask8 __U, __m128bh __A) {1727 // CHECK-LABEL: @test_mm_maskz_rcp_pbh1728 // CHECK: @llvm.x86.avx10.mask.rcp.bf16.1281729 return _mm_maskz_rcp_pbh(__U, __A);1730}1731 1732__m128bh test_mm_getexp_pbh(__m128bh __A) {1733 // CHECK-LABEL: @test_mm_getexp_pbh1734 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.1281735 return _mm_getexp_pbh(__A);1736}1737 1738__m128bh test_mm_mask_getexp_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1739 // CHECK-LABEL: @test_mm_mask_getexp_pbh1740 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.1281741 return _mm_mask_getexp_pbh(__W, __U, __A);1742}1743 1744__m128bh test_mm_maskz_getexp_pbh(__mmask8 __U, __m128bh __A) {1745 // CHECK-LABEL: @test_mm_maskz_getexp_pbh1746 // CHECK: @llvm.x86.avx10.mask.getexp.bf16.1281747 return _mm_maskz_getexp_pbh(__U, __A);1748}1749 1750__m128bh test_mm_rsqrt_pbh(__m128bh __A) {1751 // CHECK-LABEL: @test_mm_rsqrt_pbh1752 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.1281753 return _mm_rsqrt_pbh(__A);1754}1755 1756__m128bh test_mm_mask_rsqrt_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1757 // CHECK-LABEL: @test_mm_mask_rsqrt_pbh1758 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.1281759 return (__m128bh)_mm_mask_rsqrt_pbh(__W, __U, __A);1760}1761 1762__m128bh test_mm_maskz_rsqrt_pbh(__mmask8 __U, __m128bh __A) {1763 // CHECK-LABEL: @test_mm_maskz_rsqrt_pbh1764 // CHECK: @llvm.x86.avx10.mask.rsqrt.bf16.1281765 return _mm_maskz_rsqrt_pbh(__U, __A);1766}1767 1768__m128bh test_mm_reduce_pbh(__m128bh __A) {1769 // CHECK-LABEL: @test_mm_reduce_pbh1770 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.1281771 return _mm_reduce_pbh(__A, 3);1772}1773 1774__m128bh test_mm_mask_reduce_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1775 // CHECK-LABEL: @test_mm_mask_reduce_pbh1776 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.1281777 return _mm_mask_reduce_pbh(__W, __U, __A, 1);1778}1779 1780__m128bh test_mm_maskz_reduce_pbh(__mmask8 __U, __m128bh __A) {1781 // CHECK-LABEL: @test_mm_maskz_reduce_pbh1782 // CHECK: @llvm.x86.avx10.mask.reduce.bf16.1281783 return _mm_maskz_reduce_pbh(__U, __A, 1);1784}1785 1786__m128bh test_mm_roundscale_pbh(__m128bh __A) {1787 // CHECK-LABEL: @test_mm_roundscale_pbh1788 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.1281789 return _mm_roundscale_pbh(__A, 3);1790}1791 1792__m128bh test_mm_mask_roundscale_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1793 // CHECK-LABEL: @test_mm_mask_roundscale_pbh1794 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.1281795 return _mm_mask_roundscale_pbh(__W, __U, __A, 1);1796}1797 1798__m128bh test_mm_maskz_roundscale_pbh(__mmask8 __U, __m128bh __A) {1799 // CHECK-LABEL: @test_mm_maskz_roundscale_pbh1800 // CHECK: @llvm.x86.avx10.mask.rndscale.bf16.1281801 return _mm_maskz_roundscale_pbh(__U, __A, 1 );1802}1803 1804__m128bh test_mm_getmant_pbh(__m128bh __A) {1805 // CHECK-LABEL: @test_mm_getmant_pbh1806 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.1281807 return _mm_getmant_pbh(__A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1808}1809 1810__m128bh test_mm_mask_getmant_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1811 // CHECK-LABEL: @test_mm_mask_getmant_pbh1812 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.1281813 return _mm_mask_getmant_pbh(__W, __U, __A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1814}1815 1816__m128bh test_mm_maskz_getmant_pbh(__mmask8 __U, __m128bh __A) {1817 // CHECK-LABEL: @test_mm_maskz_getmant_pbh1818 // CHECK: @llvm.x86.avx10.mask.getmant.bf16.1281819 return _mm_maskz_getmant_pbh(__U, __A, _MM_MANT_NORM_p5_2, _MM_MANT_SIGN_nan);1820}1821 1822__m128bh test_mm_sqrt_pbh(__m128bh __A) {1823 // CHECK-LABEL: @test_mm_sqrt_pbh1824 // CHECK: call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> {{.*}})1825 return _mm_sqrt_pbh(__A);1826}1827 1828__m128bh test_mm_mask_sqrt_pbh(__m128bh __W, __mmask8 __U, __m128bh __A) {1829 // CHECK-LABEL: @test_mm_mask_sqrt_pbh1830 // CHECK: call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> {{.*}})1831 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}1832 return (__m128bh)_mm_mask_sqrt_pbh(__W, __U, __A);1833}1834 1835__m128bh test_mm_maskz_sqrt_pbh(__mmask8 __U, __m128bh __A) {1836 // CHECK-LABEL: @test_mm_maskz_sqrt_pbh1837 // CHECK: call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> {{.*}})1838 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}1839 return _mm_maskz_sqrt_pbh(__U, __A);1840}1841 1842__m256bh test_mm256_fmadd_pbh(__m256bh __A, __m256bh __B, __m256bh __C) {1843 // CHECK-LABEL: @test_mm256_fmadd_pbh1844 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1845 return _mm256_fmadd_pbh(__A, __B, __C);1846}1847 1848__m256bh test_mm256_mask_fmadd_pbh(__m256bh __A, __mmask16 __U, __m256bh __B, __m256bh __C) {1849 // CHECK-LABEL: @test_mm256_mask_fmadd_pbh1850 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1851 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1852 return _mm256_mask_fmadd_pbh(__A, __U, __B, __C);1853}1854 1855__m256bh test_mm256_mask3_fmadd_pbh(__m256bh __A, __m256bh __B, __m256bh __C, __mmask16 __U) {1856 // CHECK-LABEL: @test_mm256_mask3_fmadd_pbh1857 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1858 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1859 return _mm256_mask3_fmadd_pbh(__A, __B, __C, __U);1860}1861 1862__m256bh test_mm256_maskz_fmadd_pbh(__mmask16 __U, __m256bh __A, __m256bh __B, __m256bh __C) {1863 // CHECK-LABEL: @test_mm256_maskz_fmadd_pbh1864 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1865 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1866 return _mm256_maskz_fmadd_pbh(__U, __A, __B, __C);1867}1868 1869__m256bh test_mm256_fmsub_pbh(__m256bh __A, __m256bh __B, __m256bh __C) {1870 // CHECK-LABEL: @test_mm256_fmsub_pbh1871 // CHECK: fneg1872 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1873 return _mm256_fmsub_pbh(__A, __B, __C);1874}1875 1876__m256bh test_mm256_mask_fmsub_pbh(__m256bh __A, __mmask16 __U, __m256bh __B, __m256bh __C) {1877 // CHECK-LABEL: @test_mm256_mask_fmsub_pbh1878 // CHECK: fneg1879 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1880 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1881 return _mm256_mask_fmsub_pbh(__A, __U, __B, __C);1882}1883 1884__m256bh test_mm256_mask3_fmsub_pbh(__m256bh __A, __m256bh __B, __m256bh __C, __mmask16 __U) {1885 // CHECK-LABEL: @test_mm256_mask3_fmsub_pbh1886 // CHECK: fneg1887 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1888 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1889 return _mm256_mask3_fmsub_pbh(__A, __B, __C, __U);1890}1891 1892__m256bh test_mm256_maskz_fmsub_pbh(__mmask16 __U, __m256bh __A, __m256bh __B, __m256bh __C) {1893 // CHECK-LABEL: @test_mm256_maskz_fmsub_pbh1894 // CHECK: fneg1895 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1896 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1897 return _mm256_maskz_fmsub_pbh(__U, __A, __B, __C);1898}1899 1900__m256bh test_mm256_fnmadd_pbh(__m256bh __A, __m256bh __B, __m256bh __C) {1901 // CHECK-LABEL: @test_mm256_fnmadd_pbh1902 // CHECK: fneg1903 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1904 return _mm256_fnmadd_pbh(__A, __B, __C);1905}1906 1907__m256bh test_mm256_mask_fnmadd_pbh(__m256bh __A, __mmask16 __U, __m256bh __B, __m256bh __C) {1908 // CHECK-LABEL: @test_mm256_mask_fnmadd_pbh1909 // CHECK: fneg1910 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1911 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1912 return _mm256_mask_fnmadd_pbh(__A, __U, __B, __C);1913}1914 1915__m256bh test_mm256_mask3_fnmadd_pbh(__m256bh __A, __m256bh __B, __m256bh __C, __mmask16 __U) {1916 // CHECK-LABEL: @test_mm256_mask3_fnmadd_pbh1917 // CHECK: fneg1918 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1919 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1920 return _mm256_mask3_fnmadd_pbh(__A, __B, __C, __U);1921}1922 1923__m256bh test_mm256_maskz_fnmadd_pbh(__mmask16 __U, __m256bh __A, __m256bh __B, __m256bh __C) {1924 // CHECK-LABEL: @test_mm256_maskz_fnmadd_pbh1925 // CHECK: fneg1926 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1927 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1928 return _mm256_maskz_fnmadd_pbh(__U, __A, __B, __C);1929}1930 1931__m256bh test_mm256_fnmsub_pbh(__m256bh __A, __m256bh __B, __m256bh __C) {1932 // CHECK-LABEL: @test_mm256_fnmsub_pbh1933 // CHECK: fneg1934 // CHECK: fneg1935 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1936 return _mm256_fnmsub_pbh(__A, __B, __C);1937}1938 1939__m256bh test_mm256_mask_fnmsub_pbh(__m256bh __A, __mmask16 __U, __m256bh __B, __m256bh __C) {1940 // CHECK-LABEL: @test_mm256_mask_fnmsub_pbh1941 // CHECK: fneg1942 // CHECK: fneg1943 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1944 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1945 return _mm256_mask_fnmsub_pbh(__A, __U, __B, __C);1946}1947 1948__m256bh test_mm256_mask3_fnmsub_pbh(__m256bh __A, __m256bh __B, __m256bh __C, __mmask16 __U) {1949 // CHECK-LABEL: @test_mm256_mask3_fnmsub_pbh1950 // CHECK: fneg1951 // CHECK: fneg1952 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1953 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1954 return _mm256_mask3_fnmsub_pbh(__A, __B, __C, __U);1955}1956 1957__m256bh test_mm256_maskz_fnmsub_pbh(__mmask16 __U, __m256bh __A, __m256bh __B, __m256bh __C) {1958 // CHECK-LABEL: @test_mm256_maskz_fnmsub_pbh1959 // CHECK: fneg1960 // CHECK: fneg1961 // CHECK: call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}})1962 // CHECK: select <16 x i1> %{{.*}}, <16 x bfloat> %{{.*}}, <16 x bfloat> %{{.*}}1963 return _mm256_maskz_fnmsub_pbh(__U, __A, __B, __C);1964}1965 1966__m128bh test_mm_fmadd_pbh(__m128bh __A, __m128bh __B, __m128bh __C) {1967 // CHECK-LABEL: @test_mm_fmadd_pbh1968 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})1969 return _mm_fmadd_pbh(__A, __B, __C);1970}1971 1972__m128bh test_mm_mask_fmadd_pbh(__m128bh __A, __mmask8 __U, __m128bh __B, __m128bh __C) {1973 // CHECK-LABEL: @test_mm_mask_fmadd_pbh1974 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})1975 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}1976 return _mm_mask_fmadd_pbh(__A, __U, __B, __C);1977}1978 1979__m128bh test_mm_mask3_fmadd_pbh(__m128bh __A, __m128bh __B, __m128bh __C, __mmask8 __U) {1980 // CHECK-LABEL: @test_mm_mask3_fmadd_pbh1981 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})1982 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}1983 return _mm_mask3_fmadd_pbh(__A, __B, __C, __U);1984}1985 1986__m128bh test_mm_maskz_fmadd_pbh(__mmask8 __U, __m128bh __A, __m128bh __B, __m128bh __C) {1987 // CHECK-LABEL: @test_mm_maskz_fmadd_pbh1988 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})1989 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}1990 return _mm_maskz_fmadd_pbh(__U, __A, __B, __C);1991}1992 1993__m128bh test_mm_fmsub_pbh(__m128bh __A, __m128bh __B, __m128bh __C) {1994 // CHECK-LABEL: @test_mm_fmsub_pbh1995 // CHECK: fneg1996 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})1997 return _mm_fmsub_pbh(__A, __B, __C);1998}1999 2000__m128bh test_mm_mask_fmsub_pbh(__m128bh __A, __mmask8 __U, __m128bh __B, __m128bh __C) {2001 // CHECK-LABEL: @test_mm_mask_fmsub_pbh2002 // CHECK: fneg2003 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2004 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2005 return _mm_mask_fmsub_pbh(__A, __U, __B, __C);2006}2007 2008__m128bh test_mm_mask3_fmsub_pbh(__m128bh __A, __m128bh __B, __m128bh __C, __mmask8 __U) {2009 // CHECK-LABEL: @test_mm_mask3_fmsub_pbh2010 // CHECK: fneg2011 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2012 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2013 return _mm_mask3_fmsub_pbh(__A, __B, __C, __U);2014}2015 2016__m128bh test_mm_maskz_fmsub_pbh(__mmask8 __U, __m128bh __A, __m128bh __B, __m128bh __C) {2017 // CHECK-LABEL: @test_mm_maskz_fmsub_pbh2018 // CHECK: fneg2019 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2020 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2021 return _mm_maskz_fmsub_pbh(__U, __A, __B, __C);2022}2023 2024__m128bh test_mm_fnmadd_pbh(__m128bh __A, __m128bh __B, __m128bh __C) {2025 // CHECK-LABEL: @test_mm_fnmadd_pbh2026 // CHECK: fneg2027 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2028 return _mm_fnmadd_pbh(__A, __B, __C);2029}2030 2031__m128bh test_mm_mask_fnmadd_pbh(__m128bh __A, __mmask8 __U, __m128bh __B, __m128bh __C) {2032 // CHECK-LABEL: @test_mm_mask_fnmadd_pbh2033 // CHECK: fneg2034 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2035 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2036 return _mm_mask_fnmadd_pbh(__A, __U, __B, __C);2037}2038 2039__m128bh test_mm_mask3_fnmadd_pbh(__m128bh __A, __m128bh __B, __m128bh __C, __mmask8 __U) {2040 // CHECK-LABEL: @test_mm_mask3_fnmadd_pbh2041 // CHECK: fneg2042 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2043 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2044 return _mm_mask3_fnmadd_pbh(__A, __B, __C, __U);2045}2046 2047__m128bh test_mm_maskz_fnmadd_pbh(__mmask8 __U, __m128bh __A, __m128bh __B, __m128bh __C) {2048 // CHECK-LABEL: @test_mm_maskz_fnmadd_pbh2049 // CHECK: fneg2050 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2051 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2052 return _mm_maskz_fnmadd_pbh(__U, __A, __B, __C);2053}2054 2055__m128bh test_mm_fnmsub_pbh(__m128bh __A, __m128bh __B, __m128bh __C) {2056 // CHECK-LABEL: @test_mm_fnmsub_pbh2057 // CHECK: fneg2058 // CHECK: fneg2059 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2060 return _mm_fnmsub_pbh(__A, __B, __C);2061}2062 2063__m128bh test_mm_mask_fnmsub_pbh(__m128bh __A, __mmask8 __U, __m128bh __B, __m128bh __C) {2064 // CHECK-LABEL: @test_mm_mask_fnmsub_pbh2065 // CHECK: fneg2066 // CHECK: fneg2067 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2068 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2069 return _mm_mask_fnmsub_pbh(__A, __U, __B, __C);2070}2071 2072__m128bh test_mm_mask3_fnmsub_pbh(__m128bh __A, __m128bh __B, __m128bh __C, __mmask8 __U) {2073 // CHECK-LABEL: @test_mm_mask3_fnmsub_pbh2074 // CHECK: fneg2075 // CHECK: fneg2076 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2077 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2078 return _mm_mask3_fnmsub_pbh(__A, __B, __C, __U);2079}2080 2081__m128bh test_mm_maskz_fnmsub_pbh(__mmask8 __U, __m128bh __A, __m128bh __B, __m128bh __C) {2082 // CHECK-LABEL: @test_mm_maskz_fnmsub_pbh2083 // CHECK: fneg2084 // CHECK: fneg2085 // CHECK: call <8 x bfloat> @llvm.fma.v8bf16(<8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}})2086 // CHECK: select <8 x i1> %{{.*}}, <8 x bfloat> %{{.*}}, <8 x bfloat> %{{.*}}2087 return _mm_maskz_fnmsub_pbh(__U, __A, __B, __C);2088}2089