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

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

Issue 2412053002: [SubZero] Implement Fcmp, ICmp, Cast and Select for vector type (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master Created 4 years, 2 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/fp.cmp.ll ('k') | tests_lit/llvm2ice_tests/vector-fcmp.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This test checks that when SSE instructions access memory and require full 1 ; This test checks that when SSE instructions access memory and require full
2 ; alignment, memory operands are limited to properly aligned stack operands. 2 ; alignment, memory operands are limited to properly aligned stack operands.
3 ; This would only happen when we fuse a load instruction with another 3 ; This would only happen when we fuse a load instruction with another
4 ; instruction, which currently only happens with non-scalarized Arithmetic 4 ; instruction, which currently only happens with non-scalarized Arithmetic
5 ; instructions. 5 ; instructions.
6 6
7 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s 7 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s
8 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s 8 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s
9 9
10 ; RUN: %if --need=target_MIPS32 --need=allow_dump \
11 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\
12 ; RUN: -i %s --args -O2 --skip-unimplemented \
13 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \
14 ; RUN: --command FileCheck --check-prefix MIPS32 %s
15
10 define internal <4 x i32> @test_add(i32 %addr_i, <4 x i32> %addend) { 16 define internal <4 x i32> @test_add(i32 %addr_i, <4 x i32> %addend) {
11 entry: 17 entry:
12 %addr = inttoptr i32 %addr_i to <4 x i32>* 18 %addr = inttoptr i32 %addr_i to <4 x i32>*
13 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4 19 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4
14 %result = add <4 x i32> %addend, %loaded 20 %result = add <4 x i32> %addend, %loaded
15 ret <4 x i32> %result 21 ret <4 x i32> %result
16 } 22 }
17 ; CHECK-LABEL: test_add 23 ; CHECK-LABEL: test_add
18 ; CHECK-NOT: paddd xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 24 ; CHECK-NOT: paddd xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
19 ; CHECK: paddd xmm{{.}}, 25 ; CHECK: paddd xmm{{.}},
20 26
27 ; MIPS32-LABEL: test_add
28 ; MIPS32: addu
29 ; MIPS32: addu
30 ; MIPS32: addu
31 ; MIPS32: addu
32
21 define internal <4 x i32> @test_and(i32 %addr_i, <4 x i32> %addend) { 33 define internal <4 x i32> @test_and(i32 %addr_i, <4 x i32> %addend) {
22 entry: 34 entry:
23 %addr = inttoptr i32 %addr_i to <4 x i32>* 35 %addr = inttoptr i32 %addr_i to <4 x i32>*
24 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4 36 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4
25 %result = and <4 x i32> %addend, %loaded 37 %result = and <4 x i32> %addend, %loaded
26 ret <4 x i32> %result 38 ret <4 x i32> %result
27 } 39 }
28 ; CHECK-LABEL: test_and 40 ; CHECK-LABEL: test_and
29 ; CHECK-NOT: pand xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 41 ; CHECK-NOT: pand xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
30 ; CHECK: pand xmm{{.}}, 42 ; CHECK: pand xmm{{.}},
31 43
44 ; MIPS32-LABEL: test_and
45 ; MIPS32: and
46 ; MIPS32: and
47 ; MIPS32: and
48 ; MIPS32: and
49
32 define internal <4 x i32> @test_or(i32 %addr_i, <4 x i32> %addend) { 50 define internal <4 x i32> @test_or(i32 %addr_i, <4 x i32> %addend) {
33 entry: 51 entry:
34 %addr = inttoptr i32 %addr_i to <4 x i32>* 52 %addr = inttoptr i32 %addr_i to <4 x i32>*
35 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4 53 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4
36 %result = or <4 x i32> %addend, %loaded 54 %result = or <4 x i32> %addend, %loaded
37 ret <4 x i32> %result 55 ret <4 x i32> %result
38 } 56 }
39 ; CHECK-LABEL: test_or 57 ; CHECK-LABEL: test_or
40 ; CHECK-NOT: por xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 58 ; CHECK-NOT: por xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
41 ; CHECK: por xmm{{.}}, 59 ; CHECK: por xmm{{.}},
42 60
61 ; MIPS32-LABEL: test_or
62 ; MIPS32: or
63 ; MIPS32: or
64 ; MIPS32: or
65 ; MIPS32: or
66
43 define internal <4 x i32> @test_xor(i32 %addr_i, <4 x i32> %addend) { 67 define internal <4 x i32> @test_xor(i32 %addr_i, <4 x i32> %addend) {
44 entry: 68 entry:
45 %addr = inttoptr i32 %addr_i to <4 x i32>* 69 %addr = inttoptr i32 %addr_i to <4 x i32>*
46 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4 70 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4
47 %result = xor <4 x i32> %addend, %loaded 71 %result = xor <4 x i32> %addend, %loaded
48 ret <4 x i32> %result 72 ret <4 x i32> %result
49 } 73 }
50 ; CHECK-LABEL: test_xor 74 ; CHECK-LABEL: test_xor
51 ; CHECK-NOT: pxor xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 75 ; CHECK-NOT: pxor xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
52 ; CHECK: pxor xmm{{.}}, 76 ; CHECK: pxor xmm{{.}},
53 77
78 ; MIPS32-LABEL: test_xor
79 ; MIPS32: xor
80 ; MIPS32: xor
81 ; MIPS32: xor
82 ; MIPS32: xor
83
54 define internal <4 x i32> @test_sub(i32 %addr_i, <4 x i32> %addend) { 84 define internal <4 x i32> @test_sub(i32 %addr_i, <4 x i32> %addend) {
55 entry: 85 entry:
56 %addr = inttoptr i32 %addr_i to <4 x i32>* 86 %addr = inttoptr i32 %addr_i to <4 x i32>*
57 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4 87 %loaded = load <4 x i32>, <4 x i32>* %addr, align 4
58 %result = sub <4 x i32> %addend, %loaded 88 %result = sub <4 x i32> %addend, %loaded
59 ret <4 x i32> %result 89 ret <4 x i32> %result
60 } 90 }
61 ; CHECK-LABEL: test_sub 91 ; CHECK-LABEL: test_sub
62 ; CHECK-NOT: psubd xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 92 ; CHECK-NOT: psubd xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
63 ; CHECK: psubd xmm{{.}}, 93 ; CHECK: psubd xmm{{.}},
64 94
95 ; MIPS32-LABEL: test_sub
96 ; MIPS32: subu
97 ; MIPS32: subu
98 ; MIPS32: subu
99 ; MIPS32: subu
100
65 define internal <4 x float> @test_fadd(i32 %addr_i, <4 x float> %addend) { 101 define internal <4 x float> @test_fadd(i32 %addr_i, <4 x float> %addend) {
66 entry: 102 entry:
67 %addr = inttoptr i32 %addr_i to <4 x float>* 103 %addr = inttoptr i32 %addr_i to <4 x float>*
68 %loaded = load <4 x float>, <4 x float>* %addr, align 4 104 %loaded = load <4 x float>, <4 x float>* %addr, align 4
69 %result = fadd <4 x float> %addend, %loaded 105 %result = fadd <4 x float> %addend, %loaded
70 ret <4 x float> %result 106 ret <4 x float> %result
71 } 107 }
72 ; CHECK-LABEL: test_fadd 108 ; CHECK-LABEL: test_fadd
73 ; CHECK-NOT: addps xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 109 ; CHECK-NOT: addps xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
74 ; CHECK: addps xmm{{.}}, 110 ; CHECK: addps xmm{{.}},
75 111
112 ; MIPS32-LABEL: test_fadd
113 ; MIPS32: add.s
114 ; MIPS32: add.s
115 ; MIPS32: add.s
116 ; MIPS32: add.s
117
76 define internal <4 x float> @test_fsub(i32 %addr_i, <4 x float> %addend) { 118 define internal <4 x float> @test_fsub(i32 %addr_i, <4 x float> %addend) {
77 entry: 119 entry:
78 %addr = inttoptr i32 %addr_i to <4 x float>* 120 %addr = inttoptr i32 %addr_i to <4 x float>*
79 %loaded = load <4 x float>, <4 x float>* %addr, align 4 121 %loaded = load <4 x float>, <4 x float>* %addr, align 4
80 %result = fsub <4 x float> %addend, %loaded 122 %result = fsub <4 x float> %addend, %loaded
81 ret <4 x float> %result 123 ret <4 x float> %result
82 } 124 }
83 ; CHECK-LABEL: test_fsub 125 ; CHECK-LABEL: test_fsub
84 ; CHECK-NOT: subps xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}} 126 ; CHECK-NOT: subps xmm{{.}},XMMWORD PTR [e{{ax|cx|dx|di|si|bx|bp}}
85 ; CHECK: subps xmm{{.}}, 127 ; CHECK: subps xmm{{.}},
128
129 ; MIPS32-LABEL: test_fsub
130 ; MIPS32: sub.s
131 ; MIPS32: sub.s
132 ; MIPS32: sub.s
133 ; MIPS32: sub.s
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/fp.cmp.ll ('k') | tests_lit/llvm2ice_tests/vector-fcmp.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698