// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s
+
+// FIXME: It's wrong to check LLVM IR transformations from clang. This run should be removed and tests added to the appropriate LLVM pass.
+
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -O2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=O2
#include <immintrin.h>
{
// O2-LABEL: @test_mm_mask_move_ss
// O2: %[[M:.*]] = and i8 %__U, 1
- // O2: %[[M2:.*]] = icmp ne i8 %[[M]], 0
- // O2: %[[ELM1:.*]] = extractelement <4 x float> %__B, i32 0
- // O2: %[[ELM2:.*]] = extractelement <4 x float> %__W, i32 0
- // O2: %[[SEL:.*]] = select i1 %[[M2]], float %[[ELM1]], float %[[ELM2]]
+ // O2: %[[M2:.*]] = icmp
+ // O2: %[[ELM1:.*]] = extractelement <4 x float>
+ // O2: %[[ELM2:.*]] = extractelement <4 x float>
+ // O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <4 x float> %__A, float %[[SEL]], i32 0
// O2: ret <4 x float> %[[RES]]
return _mm_mask_move_ss ( __W, __U, __A, __B);
{
// O2-LABEL: @test_mm_maskz_move_ss
// O2: %[[M:.*]] = and i8 %__U, 1
- // O2: %[[M2:.*]] = icmp ne i8 %[[M]], 0
+ // O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <4 x float> %__B, i32 0
- // O2: %[[SEL:.*]] = select i1 %[[M2]], float %[[ELM1]], float 0.0
+ // O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <4 x float> %__A, float %[[SEL]], i32 0
// O2: ret <4 x float> %[[RES]]
return _mm_maskz_move_ss (__U, __A, __B);
{
// O2-LABEL: @test_mm_mask_move_sd
// O2: %[[M:.*]] = and i8 %__U, 1
- // O2: %[[M2:.*]] = icmp ne i8 %[[M]], 0
- // O2: %[[ELM1:.*]] = extractelement <2 x double> %__B, i32 0
- // O2: %[[ELM2:.*]] = extractelement <2 x double> %__W, i32 0
- // O2: %[[SEL:.*]] = select i1 %[[M2]], double %[[ELM1]], double %[[ELM2]]
+ // O2: %[[M2:.*]] = icmp
+ // O2: %[[ELM1:.*]] = extractelement <2 x double>
+ // O2: %[[ELM2:.*]] = extractelement <2 x double>
+ // O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <2 x double> %__A, double %[[SEL]], i32 0
// O2: ret <2 x double> %[[RES]]
return _mm_mask_move_sd ( __W, __U, __A, __B);
{
// O2-LABEL: @test_mm_maskz_move_sd
// O2: %[[M:.*]] = and i8 %__U, 1
- // O2: %[[M2:.*]] = icmp ne i8 %[[M]], 0
+ // O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <2 x double> %__B, i32 0
- // O2: %[[SEL:.*]] = select i1 %[[M2]], double %[[ELM1]], double 0.0
+ // O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <2 x double> %__A, double %[[SEL]], i32 0
// O2: ret <2 x double> %[[RES]]
return _mm_maskz_move_sd (__U, __A, __B);