Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / X86 / avx512-error.c
blob422cc7a8679dcf656e164e04810956ac0f583d63
1 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx512bw -target-feature -evex512 -emit-llvm -o /dev/null -verify=noevex
2 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx512bw -emit-llvm -o /dev/null -verify
3 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx10.1-256 -emit-llvm -o /dev/null -verify=noevex
4 // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx10.1-512 -emit-llvm -o /dev/null -verify
6 #include <immintrin.h>
8 // No error emitted whether we have "evex512" feature or not.
9 __attribute__((target("avx512bw,no-evex512")))
10 __mmask64 k64_verify_1(__mmask64 a) {
11 return _knot_mask64(a); // expected-no-diagnostics
14 __mmask64 k64_verify_2(__mmask64 a) {
15 return _knot_mask64(a); // expected-no-diagnostic
18 __attribute__((target("avx512bw,evex512")))
19 __m512d zmm_verify_ok(__m512d a) {
20 // No error emitted if we have "evex512" feature.
21 return __builtin_ia32_sqrtpd512(a, _MM_FROUND_CUR_DIRECTION); // expected-no-diagnostic
24 __m512d zmm_error(__m512d a) {
25 // CHECK-LABEL: @test_mm512_sqrt_pd
26 return __builtin_ia32_sqrtpd512(a, _MM_FROUND_CUR_DIRECTION); // noevex-error {{'__builtin_ia32_sqrtpd512' needs target feature avx512f,evex512}}
28 #if defined(__AVX10_1__) && !defined(__AVX10_1_512__)
29 // noevex-warning@*:* {{invalid feature combination: +avx512bw +avx10.1-256; will be promoted to avx10.1-512}}
30 // noevex-warning@*:* {{invalid feature combination: +avx512bw +avx10.1-256; will be promoted to avx10.1-512}}
31 // noevex-warning@*:* {{invalid feature combination: +avx512bw +avx10.1-256; will be promoted to avx10.1-512}}
32 #endif