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

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

Issue 417653004: Lower the select instruction when the operands are of vector type. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Grammar 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 | « src/IceTargetLoweringX8632.cpp ('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
(Empty)
1 ; This file tests support for the select instruction with vector valued inputs.
2
3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
5 ; RUN: %llvm2ice -O2 --verbose none %s \
6 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
7 ; RUN: %llvm2ice -Om1 --verbose none %s \
8 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
11 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
12 ; RUN: | FileCheck --check-prefix=DUMP %s
13
14 define <16 x i8> @test_select_v16i8(<16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2) {
15 entry:
16 %res = select <16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2
17 ret <16 x i8> %res
18 ; CHECK-LABEL: test_select_v16i8:
19 ; CHECK: pand
20 ; CHECK: pandn
21 ; CHECK: por
22 }
23
24 define <16 x i1> @test_select_v16i1(<16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2) {
25 entry:
26 %res = select <16 x i1> %cond, <16 x i1> %arg1, <16 x i1> %arg2
27 ret <16 x i1> %res
28 ; CHECK-LABEL: test_select_v16i1:
29 ; CHECK: pand
30 ; CHECK: pandn
31 ; CHECK: por
32 }
33
34 define <8 x i16> @test_select_v8i16(<8 x i1> %cond, <8 x i16> %arg1, <8 x i16> % arg2) {
35 entry:
36 %res = select <8 x i1> %cond, <8 x i16> %arg1, <8 x i16> %arg2
37 ret <8 x i16> %res
38 ; CHECK-LABEL: test_select_v8i16:
39 ; CHECK: pand
40 ; CHECK: pandn
41 ; CHECK: por
42 }
43
44 define <8 x i1> @test_select_v8i1(<8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2 ) {
45 entry:
46 %res = select <8 x i1> %cond, <8 x i1> %arg1, <8 x i1> %arg2
47 ret <8 x i1> %res
48 ; CHECK-LABEL: test_select_v8i1:
49 ; CHECK: pand
50 ; CHECK: pandn
51 ; CHECK: por
52 }
53
54 define <4 x i32> @test_select_v4i32(<4 x i1> %cond, <4 x i32> %arg1, <4 x i32> % arg2) {
55 entry:
56 %res = select <4 x i1> %cond, <4 x i32> %arg1, <4 x i32> %arg2
57 ret <4 x i32> %res
58 ; CHECK-LABEL: test_select_v4i32:
59 ; CHECK: pand
60 ; CHECK: pandn
61 ; CHECK: por
62 }
63
64 define <4 x float> @test_select_v4f32(<4 x i1> %cond, <4 x float> %arg1, <4 x fl oat> %arg2) {
65 entry:
66 %res = select <4 x i1> %cond, <4 x float> %arg1, <4 x float> %arg2
67 ret <4 x float> %res
68 ; CHECK-LABEL: test_select_v4f32:
69 ; CHECK: pand
70 ; CHECK: pandn
71 ; CHECK: por
72 }
73
74 define <4 x i1> @test_select_v4i1(<4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2 ) {
75 entry:
76 %res = select <4 x i1> %cond, <4 x i1> %arg1, <4 x i1> %arg2
77 ret <4 x i1> %res
78 ; CHECK-LABEL: test_select_v4i1:
79 ; CHECK: pand
80 ; CHECK: pandn
81 ; CHECK: por
82 }
83
84 ; ERRORS-NOT: ICE translation error
85 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698