brintos

brintos / llvm-project-archived public Read only

0
0
Text · 485 B · 8bc3ba1 Raw
13 lines · c
1// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -target-feature +sse4.1 -emit-llvm -verify -o /dev/null2 3typedef double __v2df __attribute__((__vector_size__(16)));4 5__v2df foo() {6    __v2df v = {0.0, 0.0};7    return __builtin_ia32_roundpd(v, 2);8}9 10__v2df __attribute__((target("no-sse4.1"), flatten)) bar() {11    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'}}12}13