reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/ext-vector.c b/test/CodeGen/ext-vector.c
index e3b6211..4739a66 100644
--- a/test/CodeGen/ext-vector.c
+++ b/test/CodeGen/ext-vector.c
@@ -115,9 +115,7 @@
a /= c;
a %= c;
- // Vector comparisons can sometimes crash the x86 backend: rdar://6326239,
- // reject them until the implementation is stable.
-#if 0
+ // Vector comparisons.
int4 cmp;
cmp = a < b;
cmp = a <= b;
@@ -125,5 +123,4 @@
cmp = a >= b;
cmp = a == b;
cmp = a != b;
-#endif
}
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 3fd1437..faa6c28 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -94,15 +94,12 @@
P = ^(){}; // expected-error {{blocks support disabled - compile with -fblocks}}
}
-
-// rdar://6326239 - Vector comparisons are not fully trusted yet, until the
-// backend is known to work, just unconditionally reject them.
void test14() {
typedef long long __m64 __attribute__((__vector_size__(8)));
typedef short __v4hi __attribute__((__vector_size__(8)));
+ // Ok.
__v4hi a;
- __m64 mask = (__m64)((__v4hi)a > // expected-error {{comparison of vector types ('__v4hi' and '__v4hi') not supported yet}}
- (__v4hi)a);
+ __m64 mask = (__m64)((__v4hi)a > (__v4hi)a);
}