summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ext-vector.c
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2011-10-17 21:00:38 +0000
committerTanya Lattner <tonic@nondot.org>2011-10-17 21:00:38 +0000
commit49b38413985c5e74790d9f6ff9459c82773e932f (patch)
tree5f7a2fbddaf0d4dbe3f7550d0c1e1aca53362558 /clang/test/CodeGen/ext-vector.c
parent502d2eee0993186a6eb4a9c8647a0e44d9a76e6a (diff)
downloadbcm5719-llvm-49b38413985c5e74790d9f6ff9459c82773e932f.tar.gz
bcm5719-llvm-49b38413985c5e74790d9f6ff9459c82773e932f.zip
The comparison of two vectors should return a signed result. hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also
changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type. I added a new test case and updated exisiting test cases that assumed an unsigned result. llvm-svn: 142250
Diffstat (limited to 'clang/test/CodeGen/ext-vector.c')
-rw-r--r--clang/test/CodeGen/ext-vector.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/test/CodeGen/ext-vector.c b/clang/test/CodeGen/ext-vector.c
index a222f9445e0..896814bc24a 100644
--- a/clang/test/CodeGen/ext-vector.c
+++ b/clang/test/CodeGen/ext-vector.c
@@ -252,7 +252,8 @@ int4 test13(int4 *V) {
void test14(uint4 *ap, uint4 *bp, unsigned c) {
uint4 a = *ap;
uint4 b = *bp;
-
+ int4 d;
+
// CHECK: udiv <4 x i32>
// CHECK: urem <4 x i32>
a = a / b;
@@ -269,10 +270,10 @@ void test14(uint4 *ap, uint4 *bp, unsigned c) {
// CHECK: icmp uge
// CHECK: icmp eq
// CHECK: icmp ne
- a = a < b;
- a = a <= b;
- a = a > b;
- a = a >= b;
- a = a == b;
- a = a != b;
+ d = a < b;
+ d = a <= b;
+ d = a > b;
+ d = a >= b;
+ d = a == b;
+ d = a != b;
}
OpenPOWER on IntegriCloud