brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · e450188 Raw
29 lines · c
1// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2-512 -fclangir -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion2// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s3// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2-512 -fclangir -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion4// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s5 6// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG7// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG8 9#include <immintrin.h>10 11__m512bh test_mm512_undefined_pbh(void) {12  // CIR-LABEL: _mm512_undefined_pbh13  // CIR: %[[A:.*]] = cir.const #cir.zero : !cir.vector<8 x !cir.double>14  // CIR: %{{.*}} = cir.cast bitcast %[[A]] : !cir.vector<8 x !cir.double> -> !cir.vector<32 x !cir.bf16>15  // CIR: cir.return %{{.*}} : !cir.vector<32 x !cir.bf16>16 17  // CIR-LABEL: cir.func {{.*}}test_mm512_undefined_pbh18  // CIR: call @_mm512_undefined_pbh19 20  // LLVM-LABEL: test_mm512_undefined_pbh21  // LLVM: store <32 x bfloat> zeroinitializer, ptr %[[A:.*]], align 6422  // LLVM: %{{.*}} = load <32 x bfloat>, ptr %[[A]], align 6423  // LLVM: ret <32 x bfloat> %{{.*}}24 25  // OGCG-LABEL: test_mm512_undefined_pbh26  // OGCG: ret <32 x bfloat> zeroinitializer27  return _mm512_undefined_pbh();28}29