Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2073)

Unified Diff: test/NaCl/PNaClABI/types.ll

Issue 221693002: PNaCl: Add support for GCC/LLVM vector extensions (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Address dschuff's comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/NaCl/PNaClABI/types.ll
diff --git a/test/NaCl/PNaClABI/types.ll b/test/NaCl/PNaClABI/types.ll
index 855ca027a05c1aafc98ba45f6f0c31e6f1a45adc..b9606e7428455d28fd6128dc05f6f80a526e6ad7 100644
--- a/test/NaCl/PNaClABI/types.ll
+++ b/test/NaCl/PNaClABI/types.ll
@@ -27,6 +27,7 @@ block:
; Allowed types
+ ; Scalars.
phi i1 [ undef, %entry ]
phi i8 [ undef, %entry ]
phi i16 [ undef, %entry ]
@@ -34,6 +35,14 @@ block:
phi i64 [ undef, %entry ]
phi float [ undef, %entry ]
phi double [ undef, %entry ]
+ ; Vectors.
+ phi <4 x i1> [ undef, %entry ]
+ phi <8 x i1> [ undef, %entry ]
+ phi <16 x i1> [ undef, %entry ]
+ phi <16 x i8> [ undef, %entry ]
+ phi <8 x i16> [ undef, %entry ]
+ phi <4 x i32> [ undef, %entry ]
+ phi <4 x float> [ undef, %entry ]
; CHECK-NOT: disallowed
@@ -84,9 +93,64 @@ block:
phi <{ i8, i32 }> [ undef, %entry ]
; CHECK-NEXT: disallowed: bad operand: {{.*}} <{ i8, i32 }>
- ; Vector types are disallowed
+ ; Vector types of weird bit width are disallowed
+ phi <1 x i1> [ undef, %entry ]
+ phi <3 x i1> [ undef, %entry ]
+ phi <17 x i1> [ undef, %entry ]
+ phi <1 x i32> [ undef, %entry ]
phi <2 x i32> [ undef, %entry ]
+ phi <3 x i32> [ undef, %entry ]
+ phi <5 x i32> [ undef, %entry ]
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <1 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <3 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <17 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <1 x i32>
; CHECK-NEXT: disallowed: bad operand: {{.*}} <2 x i32>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <3 x i32>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <5 x i32>
+
+ ; i64 and double vectors are currently disallowed, and so are the
+ ; corresponding bool vectors.
+ phi <2 x i1> [ undef, %entry ]
+ phi <2 x i64> [ undef, %entry ]
+ phi <2 x double> [ undef, %entry ]
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <2 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <2 x i64>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <2 x double>
+
+ ; 256-bit width vectors are currently disallowed, and so are the
+ ; corresponding bool vectors.
+ phi <32 x i1> [ undef, %entry ]
+ phi <32 x i8> [ undef, %entry ]
+ phi <16 x i16> [ undef, %entry ]
+ phi <8 x i32> [ undef, %entry ]
+ phi <4 x i64> [ undef, %entry ]
+ phi <8 x float> [ undef, %entry ]
+ phi <4 x double> [ undef, %entry ]
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <32 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <32 x i8>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <16 x i16>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <8 x i32>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <4 x i64>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <8 x float>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <4 x double>
+
+ ; 512-bit width vectors are currently disallowed, and so are the
+ ; corresponding bool vectors.
+ phi <64 x i1> [ undef, %entry ]
+ phi <64 x i8> [ undef, %entry ]
+ phi <32 x i16> [ undef, %entry ]
+ phi <16 x i32> [ undef, %entry ]
+ phi <8 x i64> [ undef, %entry ]
+ phi <16 x float> [ undef, %entry ]
+ phi <8 x double> [ undef, %entry ]
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <64 x i1>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <64 x i8>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <32 x i16>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <16 x i32>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <8 x i64>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <16 x float>
+; CHECK-NEXT: disallowed: bad operand: {{.*}} <8 x double>
ret void
}

Powered by Google App Engine
This is Rietveld 408576698