diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/CodeGen/attr-mprefer-vector-width.c | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Notes
Diffstat (limited to 'test/CodeGen/attr-mprefer-vector-width.c')
-rw-r--r-- | test/CodeGen/attr-mprefer-vector-width.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/attr-mprefer-vector-width.c b/test/CodeGen/attr-mprefer-vector-width.c new file mode 100644 index 0000000000000..30edba5852f96 --- /dev/null +++ b/test/CodeGen/attr-mprefer-vector-width.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -mprefer-vector-width=128 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK128 +// RUN: %clang_cc1 -mprefer-vector-width=256 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK256 +// RUN: %clang_cc1 -mprefer-vector-width=none -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECKNONE + +int baz(int a) { return 4; } + +// CHECK128: baz{{.*}} #0 +// CHECK128: #0 = {{.*}}"prefer-vector-width"="128" + +// CHECK256: baz{{.*}} #0 +// CHECK256: #0 = {{.*}}"prefer-vector-width"="256" + +// CHECKNONE: baz{{.*}} #0 +// CHECKNONE-NOT: #0 = {{.*}}"prefer-vector-width"="none" |