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

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) Remove StringList. 2) Assign redundant assign TODO to stichnot. 3) Fix RUN line. 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
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..42839db50b8b16da6c0e87421361bc787fb58bbf
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/vector-pool.ll
@@ -0,0 +1,51 @@
+; This file tests support for vector constant pooling.
+
+; The order in which vector constants appear in the output is unspecified.
+; Hence, we check for the presence of only one constant per run line.
+;
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=I16
+; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s --check-prefix=I16
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=FLOAT
+; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s --check-prefix=FLOAT
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=I1
+; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s --check-prefix=I1
+;
+; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
+
+define <8 x i16> @test_v8i16() {
+entry:
+ ret <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
+}
+
+; I16: .long 0x10000
+; I16-NEXT: .long 0x30002
+; I16-NEXT: .long 0x50004
+; I16-NEXT: .long 0x70006
+
+define <4 x float> @test_v4f32() {
+entry:
+ ret <4 x float> <float 4.000000e+00, float 3.000000e+00, float 2.000000e+00, float 1.000000e+00>
+}
+
+; FLOAT: .long 0x40800000
+; FLOAT-NEXT: .long 0x40400000
+; FLOAT-NEXT: .long 0x40000000
+; FLOAT-NEXT: .long 0x3f800000
+
+define <8 x i1> @test_v4i1() {
+entry:
+ ret <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 1>
+}
+
+; I1: .short 0x0
+; I1-NEXT: .short 0x1
+; I1-NEXT: .short 0x0
+; I1-NEXT: .short 0x1
+; I1-NEXT: .short 0x1
+; I1-NEXT: .short 0x1
+; I1-NEXT: .short 0x1
+; I1-NEXT: .short 0x1
+
+; ERRORS-NOT: ICE translation error
+; DUMP-NOT: SZ
« tests_lit/llvm2ice_tests/vector-const.ll ('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