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

Side by Side Diff: tests_lit/llvm2ice_tests/vector-select.ll

Issue 427843002: Subzero: Add support for SSE4.1 instructions. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix an empty line that was deleted Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-ops.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This file tests support for the select instruction with vector valued inputs. 1 ; This file tests support for the select instruction with vector valued inputs.
2 2
3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s 3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s 4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
5 ; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
6 ; RUN: | FileCheck %s --check-prefix=SSE41
7 ; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
8 ; RUN: | FileCheck %s --check-prefix=SSE41
5 ; RUN: %llvm2ice -O2 --verbose none %s \ 9 ; RUN: %llvm2ice -O2 --verbose none %s \
6 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj 10 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
7 ; RUN: %llvm2ice -Om1 --verbose none %s \ 11 ; RUN: %llvm2ice -Om1 --verbose none %s \
8 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj 12 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
13 ; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
14 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
15 ; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
16 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 17 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s 18 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
11 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ 19 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
12 ; RUN: | FileCheck --check-prefix=DUMP %s 20 ; RUN: | FileCheck --check-prefix=DUMP %s
13 21
14 define <16 x i8> @test_select_v16i8(<16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2) { 22 define <16 x i8> @test_select_v16i8(<16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2) {
15 entry: 23 entry:
16 %res = select <16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2 24 %res = select <16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2
17 ret <16 x i8> %res 25 ret <16 x i8> %res
18 ; CHECK-LABEL: test_select_v16i8: 26 ; CHECK-LABEL: test_select_v16i8:
19 ; CHECK: pand 27 ; CHECK: pand
20 ; CHECK: pandn 28 ; CHECK: pandn
21 ; CHECK: por 29 ; CHECK: por
30
31 ; SSE41-LABEL: test_select_v16i8:
32 ; SSE41: pblendvb
22 } 33 }
23 34
24 define <16 x i1> @test_select_v16i1(<16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2) { 35 define <16 x i1> @test_select_v16i1(<16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2) {
25 entry: 36 entry:
26 %res = select <16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2 37 %res = select <16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2
27 ret <16 x i1> %res 38 ret <16 x i1> %res
28 ; CHECK-LABEL: test_select_v16i1: 39 ; CHECK-LABEL: test_select_v16i1:
29 ; CHECK: pand 40 ; CHECK: pand
30 ; CHECK: pandn 41 ; CHECK: pandn
31 ; CHECK: por 42 ; CHECK: por
43
44 ; SSE41-LABEL: test_select_v16i1:
45 ; SSE41: pblendvb
32 } 46 }
33 47
34 define <8 x i16> @test_select_v8i16(<8 x i1> %cond, <8 x i16> %arg1, <8 x i16> % arg2) { 48 define <8 x i16> @test_select_v8i16(<8 x i1> %cond, <8 x i16> %arg1, <8 x i16> % arg2) {
35 entry: 49 entry:
36 %res = select <8 x i1> %cond, <8 x i16> %arg1, <8 x i16> %arg2 50 %res = select <8 x i1> %cond, <8 x i16> %arg1, <8 x i16> %arg2
37 ret <8 x i16> %res 51 ret <8 x i16> %res
38 ; CHECK-LABEL: test_select_v8i16: 52 ; CHECK-LABEL: test_select_v8i16:
39 ; CHECK: pand 53 ; CHECK: pand
40 ; CHECK: pandn 54 ; CHECK: pandn
41 ; CHECK: por 55 ; CHECK: por
56
57 ; SSE41-LABEL: test_select_v8i16:
58 ; SSE41: pblendvb
42 } 59 }
43 60
44 define <8 x i1> @test_select_v8i1(<8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2 ) { 61 define <8 x i1> @test_select_v8i1(<8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2 ) {
45 entry: 62 entry:
46 %res = select <8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2 63 %res = select <8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2
47 ret <8 x i1> %res 64 ret <8 x i1> %res
48 ; CHECK-LABEL: test_select_v8i1: 65 ; CHECK-LABEL: test_select_v8i1:
49 ; CHECK: pand 66 ; CHECK: pand
50 ; CHECK: pandn 67 ; CHECK: pandn
51 ; CHECK: por 68 ; CHECK: por
69
70 ; SSE41-LABEL: test_select_v8i1:
71 ; SSE41: pblendvb
52 } 72 }
53 73
54 define <4 x i32> @test_select_v4i32(<4 x i1> %cond, <4 x i32> %arg1, <4 x i32> % arg2) { 74 define <4 x i32> @test_select_v4i32(<4 x i1> %cond, <4 x i32> %arg1, <4 x i32> % arg2) {
55 entry: 75 entry:
56 %res = select <4 x i1> %cond, <4 x i32> %arg1, <4 x i32> %arg2 76 %res = select <4 x i1> %cond, <4 x i32> %arg1, <4 x i32> %arg2
57 ret <4 x i32> %res 77 ret <4 x i32> %res
58 ; CHECK-LABEL: test_select_v4i32: 78 ; CHECK-LABEL: test_select_v4i32:
59 ; CHECK: pand 79 ; CHECK: pand
60 ; CHECK: pandn 80 ; CHECK: pandn
61 ; CHECK: por 81 ; CHECK: por
82
83 ; SSE41-LABEL: test_select_v4i32:
84 ; SSE41: pslld xmm0, 31
85 ; SSE41: blendvps
62 } 86 }
63 87
64 define <4 x float> @test_select_v4f32(<4 x i1> %cond, <4 x float> %arg1, <4 x fl oat> %arg2) { 88 define <4 x float> @test_select_v4f32(<4 x i1> %cond, <4 x float> %arg1, <4 x fl oat> %arg2) {
65 entry: 89 entry:
66 %res = select <4 x i1> %cond, <4 x float> %arg1, <4 x float> %arg2 90 %res = select <4 x i1> %cond, <4 x float> %arg1, <4 x float> %arg2
67 ret <4 x float> %res 91 ret <4 x float> %res
68 ; CHECK-LABEL: test_select_v4f32: 92 ; CHECK-LABEL: test_select_v4f32:
69 ; CHECK: pand 93 ; CHECK: pand
70 ; CHECK: pandn 94 ; CHECK: pandn
71 ; CHECK: por 95 ; CHECK: por
96
97 ; SSE41-LABEL: test_select_v4f32:
98 ; SSE41: pslld xmm0, 31
99 ; SSE41: blendvps
72 } 100 }
73 101
74 define <4 x i1> @test_select_v4i1(<4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2 ) { 102 define <4 x i1> @test_select_v4i1(<4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2 ) {
75 entry: 103 entry:
76 %res = select <4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2 104 %res = select <4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2
77 ret <4 x i1> %res 105 ret <4 x i1> %res
78 ; CHECK-LABEL: test_select_v4i1: 106 ; CHECK-LABEL: test_select_v4i1:
79 ; CHECK: pand 107 ; CHECK: pand
80 ; CHECK: pandn 108 ; CHECK: pandn
81 ; CHECK: por 109 ; CHECK: por
110
111 ; SSE41-LABEL: test_select_v4i1:
112 ; SSE41: pslld xmm0, 31
113 ; SSE41: blendvps
82 } 114 }
83 115
84 ; ERRORS-NOT: ICE translation error 116 ; ERRORS-NOT: ICE translation error
85 ; DUMP-NOT: SZ 117 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-ops.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698