summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/convertvector.c
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2016-01-28 01:38:18 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2016-01-28 01:38:18 +0000
commita2f29fa694214e622ea21e6c5b541d406970bf4f (patch)
tree246c67ca0ed6d2e801897ab1d4dfdc0e9349e94a /clang/test/CodeGen/convertvector.c
parent502ff66967c754205c10a7ecc508b0923e33442e (diff)
downloadbcm5719-llvm-a2f29fa694214e622ea21e6c5b541d406970bf4f.tar.gz
bcm5719-llvm-a2f29fa694214e622ea21e6c5b541d406970bf4f.zip
[Sema] Make extended vectors of `bool` an error.
In OpenCL, `bool` vectors are a reserved type, and are therefore illegal. Outside of OpenCL, if we try to make an extended vector of N `bool`s, Clang will lower it to an `[N x i1]`. LLVM has no ABI for bitvectors, so lots of operations on such vectors are thoroughly broken. As a result, this patch makes them illegal in everything else, as well. :) Differential Revision: http://reviews.llvm.org/D15721 llvm-svn: 259011
Diffstat (limited to 'clang/test/CodeGen/convertvector.c')
-rw-r--r--clang/test/CodeGen/convertvector.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/test/CodeGen/convertvector.c b/clang/test/CodeGen/convertvector.c
index 2b23dd96e1b..a534b85a423 100644
--- a/clang/test/CodeGen/convertvector.c
+++ b/clang/test/CodeGen/convertvector.c
@@ -9,14 +9,6 @@ typedef unsigned long vector8ulong __attribute__((__vector_size__(64)));
typedef unsigned short vector8ushort __attribute__((__vector_size__(16)));
#ifdef __cplusplus
-#define BOOL bool
-#else
-#define BOOL _Bool
-#endif
-
-typedef BOOL vector8bool __attribute__((__ext_vector_type__(8)));
-
-#ifdef __cplusplus
extern "C" {
#endif
@@ -32,13 +24,6 @@ vector8double flt_ext(vector8float x) {
// CHECK: fpext <8 x float> %{{[^ ]}} to <8 x double>
}
-vector8bool flt_tobool(vector8float x) {
- return __builtin_convertvector(x, vector8bool);
- // CHECK-LABEL: @flt_tobool
- // CHECK-NOT: fptoui <8 x float> %{{[^ ]}} to <8 x i1>
- // CHECK: fcmp une <8 x float> %{{[^ ]}}, zeroinitializer
-}
-
vector8long flt_tosi(vector8float x) {
return __builtin_convertvector(x, vector8long);
// CHECK-LABEL: @flt_tosi
@@ -69,13 +54,6 @@ vector8long int_sext(vector8short x) {
// CHECK: sext <8 x i16> %{{[^ ]}} to <8 x i64>
}
-vector8bool int_tobool(vector8short x) {
- return __builtin_convertvector(x, vector8bool);
- // CHECK-LABEL: @int_tobool
- // CHECK-NOT: trunc <8 x i16> %{{[^ ]}} to <8 x i1>
- // CHECK: icmp ne <8 x i16> %{{[^ ]}}, zeroinitializer
-}
-
vector8float int_tofp(vector8short x) {
return __builtin_convertvector(x, vector8float);
// CHECK-LABEL: @int_tofp
OpenPOWER on IntegriCloud