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

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

Issue 389653002: Lower vector floating point arithmetic operations. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Avoid _movp() trickery Created 6 years, 5 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
OLDNEW
(Empty)
1 ; This test checks support for vector arithmetic.
2
3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
8 ; RUN: | FileCheck --check-prefix=DUMP %s
9
10 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) {
11 entry:
12 %res = fadd <4 x float> %arg0, %arg1
13 ret <4 x float> %res
14 ; CHECK-LABEL: test_fadd:
15 ; CHECK: addps
16 }
17
18 define <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) {
19 entry:
20 %res = fsub <4 x float> %arg0, %arg1
21 ret <4 x float> %res
22 ; CHECK-LABEL: test_fsub:
23 ; CHECK: subps
24 }
25
26 define <4 x float> @test_fmul(<4 x float> %arg0, <4 x float> %arg1) {
27 entry:
28 %res = fmul <4 x float> %arg0, %arg1
29 ret <4 x float> %res
30 ; CHECK-LABEL: test_fmul:
31 ; CHECK: mulps
32 }
33
34 define <4 x float> @test_fdiv(<4 x float> %arg0, <4 x float> %arg1) {
35 entry:
36 %res = fdiv <4 x float> %arg0, %arg1
37 ret <4 x float> %res
38 ; CHECK-LABEL: test_fdiv:
39 ; CHECK: divps
40 }
41
42 define <4 x float> @test_frem(<4 x float> %arg0, <4 x float> %arg1) {
43 entry:
44 %res = frem <4 x float> %arg0, %arg1
45 ret <4 x float> %res
46 ; CHECK-LABEL: test_frem:
47 ; CHECK: __frem_v4f32
48 }
49
50 ; ERRORS-NOT: ICE translation error
51 ; DUMP-NOT: SZ
OLDNEW
« src/IceTargetLoweringX8632.cpp ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698