aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/target-features-error-5.c
blob: 8bc3ba193463d94a8050131f7266d88b98233672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -target-feature +sse4.1 -emit-llvm -verify -o /dev/null

typedef double __v2df __attribute__((__vector_size__(16)));

__v2df foo() {
    __v2df v = {0.0, 0.0};
    return __builtin_ia32_roundpd(v, 2);
}

__v2df __attribute__((target("no-sse4.1"), flatten)) bar() {
    return foo(); // expected-error {{flatten function 'bar' calls 'foo' which requires target feature 'sse4.1', but the caller is compiled without support for 'sse4.1'}}
}