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

Unified Diff: tests_lit/llvm2ice_tests/vector-pool.ll

Issue 353553004: Add support for vector types and vector constants. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: 1) Fix alignment in type table. 2) Add VECT128_BYTES constant. 3) add _movp() function. Created 6 years, 6 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
« src/llvm2ice.cpp ('K') | « tests_lit/llvm2ice_tests/vector-const.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/vector-pool.ll
diff --git a/tests_lit/llvm2ice_tests/vector-pool.ll b/tests_lit/llvm2ice_tests/vector-pool.ll
new file mode 100644
index 0000000000000000000000000000000000000000..0db4b8066dce2746319e7229a77bfcbb64a6a8cf
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/vector-pool.ll
@@ -0,0 +1,33 @@
+; This file tests support for vector constant pooling.
+
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
+; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
+; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
+
+define <4 x float> @test_v4f32(i32 %arg) {
jvoung (off chromium) 2014/06/26 23:33:46 Might as well check an integer typed const pool va
+entry:
+ ret <4 x float> <float 4.000000e+00, float 3.000000e+00, float 2.000000e+00, float 1.000000e+00>
+}
+
+; CHECK: .long 0x40800000
+; CHECK-NEXT: .long 0x40400000
+; CHECK-NEXT: .long 0x40000000
+; CHECK-NEXT: .long 0x3f800000
+
+define <8 x i1> @test_v4i1(i32 %arg) {
+entry:
+ ret <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 1>
+}
+
+; CHECK: .short 0x0
+; CHECK-NEXT: .short 0x1
+; CHECK-NEXT: .short 0x0
+; CHECK-NEXT: .short 0x1
+; CHECK-NEXT: .short 0x1
+; CHECK-NEXT: .short 0x1
+; CHECK-NEXT: .short 0x1
+; CHECK-NEXT: .short 0x1
+
+; ERRORS-NOT: ICE translation error
+; DUMP-NOT: SZ
« src/llvm2ice.cpp ('K') | « tests_lit/llvm2ice_tests/vector-const.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698