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

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

Issue 622113002: Handle GPR and vector shift ops. Handle pmull also. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: xx Created 6 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/nacl-other-intrinsics.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 test checks support for vector arithmetic. 1 ; This test checks support for vector arithmetic.
2 2
3 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer 3 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer
4 ; doesn't know how to symbolize non-section-local functions. 4 ; doesn't know how to symbolize non-section-local functions.
5 ; The newer LLVM 3.6 one does work, but watch out for other bugs. 5 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
6 6
7 ; RUN: %p2i -i %s -a -O2 --verbose none\ 7 ; RUN: %p2i -i %s -a -O2 --verbose none\
8 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s 8 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
9 ; RUN: %p2i -i %s -a -O2 --verbose none \ 9 ; RUN: %p2i -i %s -a -O2 --verbose none \
10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
11 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 11 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
12 ; RUN: %p2i -i %s -a -Om1 --verbose none \ 12 ; RUN: %p2i -i %s -a -Om1 --verbose none \
13 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 13 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
14 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 14 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
15 ; RUN: %p2i -i %s -a -O2 -mattr=sse4.1 --verbose none \ 15 ; RUN: %p2i -i %s -a -O2 -mattr=sse4.1 --verbose none \
16 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 16 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
17 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ 17 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
18 ; RUN: | FileCheck --check-prefix=SSE41 %s 18 ; RUN: | FileCheck --check-prefix=SSE41 %s
19 ; RUN: %p2i -i %s -a -Om1 -mattr=sse4.1 --verbose none \ 19 ; RUN: %p2i -i %s -a -Om1 -mattr=sse4.1 --verbose none \
20 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 20 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
21 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ 21 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
22 ; RUN: | FileCheck --check-prefix=SSE41 %s 22 ; RUN: | FileCheck --check-prefix=SSE41 %s
23 ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s 23 ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
24 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
jvoung (off chromium) 2014/10/02 22:04:13 Hmm p2i leaves out the inttoptr, so I wasn't sure
Jim Stichnoth 2014/10/03 04:00:00 Yeah, the DUMP test's days are numbered, as we mov
25 24
26 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) { 25 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) {
27 entry: 26 entry:
28 %res = fadd <4 x float> %arg0, %arg1 27 %res = fadd <4 x float> %arg0, %arg1
29 ret <4 x float> %res 28 ret <4 x float> %res
30 ; CHECK-LABEL: test_fadd: 29 ; CHECK-LABEL: test_fadd:
31 ; CHECK: addps 30 ; CHECK: addps
32 } 31 }
33 32
34 define <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) { 33 define <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 335 }
337 336
338 define <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 337 define <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
339 entry: 338 entry:
340 %res = mul <8 x i16> %arg0, %arg1 339 %res = mul <8 x i16> %arg0, %arg1
341 ret <8 x i16> %res 340 ret <8 x i16> %res
342 ; CHECK-LABEL: test_mul_v8i16: 341 ; CHECK-LABEL: test_mul_v8i16:
343 ; CHECK: pmullw 342 ; CHECK: pmullw
344 } 343 }
345 344
345 define <8 x i16> @test_mul_v8i16_mem(<8 x i16> %arg0, i32 %arg1_iptr) {
346 entry:
347 %arg1_ptr = inttoptr i32 %arg1_iptr to <8 x i16>*
348 %arg1 = load <8 x i16>* %arg1_ptr, align 2
349 %res_vec = mul <8 x i16> %arg0, %arg1
350 ret <8 x i16> %res_vec
351 ; CHECK-LABEL: test_mul_v8i16_mem:
352 ; CHECK: pmullw xmm{{.*}}, xmmword ptr
353 }
354
346 define <8 x i16> @test_shl_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 355 define <8 x i16> @test_shl_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
347 entry: 356 entry:
348 %res = shl <8 x i16> %arg0, %arg1 357 %res = shl <8 x i16> %arg0, %arg1
349 ret <8 x i16> %res 358 ret <8 x i16> %res
350 ; CHECK-LABEL: test_shl_v8i16: 359 ; CHECK-LABEL: test_shl_v8i16:
351 ; CHECK: shl 360 ; CHECK: shl
352 ; CHECK: shl 361 ; CHECK: shl
353 ; CHECK: shl 362 ; CHECK: shl
354 ; CHECK: shl 363 ; CHECK: shl
355 ; CHECK: shl 364 ; CHECK: shl
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 %res = mul <4 x i32> %arg0, %arg1 502 %res = mul <4 x i32> %arg0, %arg1
494 ret <4 x i32> %res 503 ret <4 x i32> %res
495 ; CHECK-LABEL: test_mul_v4i32: 504 ; CHECK-LABEL: test_mul_v4i32:
496 ; CHECK: pmuludq 505 ; CHECK: pmuludq
497 ; CHECK: pmuludq 506 ; CHECK: pmuludq
498 ; 507 ;
499 ; SSE41-LABEL: test_mul_v4i32: 508 ; SSE41-LABEL: test_mul_v4i32:
500 ; SSE41: pmulld 509 ; SSE41: pmulld
501 } 510 }
502 511
512 define <4 x i32> @test_mul_v4i32_mem(<4 x i32> %arg0, i32 %arg1_iptr) {
513 entry:
514 %arg1_ptr = inttoptr i32 %arg1_iptr to <4 x i32>*
515 %arg1 = load <4 x i32>* %arg1_ptr, align 4
516 %res = mul <4 x i32> %arg0, %arg1
517 ret <4 x i32> %res
518 ; CHECK-LABEL: test_mul_v4i32_mem:
519 ; CHECK: pmuludq xmm{{.*}}, xmmword ptr
520 ; CHECK: pmuludq
521 ;
522 ; SSE41-LABEL: test_mul_v4i32_mem:
523 ; SSE41: pmulld xmm{{.*}}, xmmword ptr
524 }
525
503 define <4 x i32> @test_shl_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) { 526 define <4 x i32> @test_shl_v4i32(<4 x i32> %arg0, <4 x i32> %arg1) {
504 entry: 527 entry:
505 %res = shl <4 x i32> %arg0, %arg1 528 %res = shl <4 x i32> %arg0, %arg1
506 ret <4 x i32> %res 529 ret <4 x i32> %res
507 ; CHECK-LABEL: test_shl_v4i32: 530 ; CHECK-LABEL: test_shl_v4i32:
508 ; CHECK: shl 531 ; CHECK: shl
509 ; CHECK: shl 532 ; CHECK: shl
510 ; CHECK: shl 533 ; CHECK: shl
511 ; CHECK: shl 534 ; CHECK: shl
512 535
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 ret <4 x i32> %res 598 ret <4 x i32> %res
576 ; CHECK-LABEL: test_srem_v4i32: 599 ; CHECK-LABEL: test_srem_v4i32:
577 ; CHECK: idiv 600 ; CHECK: idiv
578 ; CHECK: idiv 601 ; CHECK: idiv
579 ; CHECK: idiv 602 ; CHECK: idiv
580 ; CHECK: idiv 603 ; CHECK: idiv
581 } 604 }
582 605
583 ; ERRORS-NOT: ICE translation error 606 ; ERRORS-NOT: ICE translation error
584 ; DUMP-NOT: SZ 607 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698