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

Side by Side Diff: tests_lit/assembler/arm32/vec-sh-imm.ll

Issue 1886263004: Subzero. ARM32. Implements vector select. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 8 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/assembler/arm32/vcvt.u32.f32.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 ; Show that we know how to translate vshl and vshr with immediate shift amounts. 1 ; Show that we know how to translate vshl and vshr with immediate shift amounts.
2 ; We abuse sign extension of vectors of i1 because that's the only way to force 2 ; We abuse sign extension of vectors of i1 because that's the only way to force
3 ; Subzero to emit these instructions. 3 ; Subzero to emit these instructions.
4 4
5 ; NOTE: We use -O2 to get rid of memory stores. 5 ; NOTE: We use -O2 to get rid of memory stores.
6 6
7 ; REQUIRES: allow_dump 7 ; REQUIRES: allow_dump
8 8
9 ; Compile using standalone assembler. 9 ; Compile using standalone assembler.
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
(...skipping 16 matching lines...) Expand all
27 ; DIS-LABEL:00000000 <SextV4I1>: 27 ; DIS-LABEL:00000000 <SextV4I1>:
28 ; IASM-LABEL:SextV4I1: 28 ; IASM-LABEL:SextV4I1:
29 29
30 %trunc = trunc <4 x i32> %a to <4 x i1> 30 %trunc = trunc <4 x i32> %a to <4 x i1>
31 %sext = sext <4 x i1> %trunc to <4 x i32> 31 %sext = sext <4 x i1> %trunc to <4 x i32>
32 ret <4 x i32> %sext 32 ret <4 x i32> %sext
33 ; ASM: vshl.u32 {{.*}}, #31 33 ; ASM: vshl.u32 {{.*}}, #31
34 ; ASM-NEXT: vshr.s32 {{.*}}, #31 34 ; ASM-NEXT: vshr.s32 {{.*}}, #31
35 ; DIS: 0: f2bf0550 35 ; DIS: 0: f2bf0550
36 ; DIS-NEXT: 4: f2a10050 36 ; DIS-NEXT: 4: f2a10050
37 ; IASM-NOT: vshl.u32 {{.*}}, #31 37 ; IASM-NOT: vshl
38 ; IASM-NOT: vshr.s32 {{.*}}, #31 38 ; IASM-NOT: vshr
39 } 39 }
40 40
41 define internal <8 x i16> @SextV8I1(<8 x i16> %a) { 41 define internal <8 x i16> @SextV8I1(<8 x i16> %a) {
42 ; ASM-LABEL:SextV8I1 42 ; ASM-LABEL:SextV8I1
43 ; DIS-LABEL:00000010 <SextV8I1>: 43 ; DIS-LABEL:00000010 <SextV8I1>:
44 ; IASM-LABEL:SextV8I1: 44 ; IASM-LABEL:SextV8I1:
45 45
46 %trunc = trunc <8 x i16> %a to <8 x i1> 46 %trunc = trunc <8 x i16> %a to <8 x i1>
47 %sext = sext <8 x i1> %trunc to <8 x i16> 47 %sext = sext <8 x i1> %trunc to <8 x i16>
48 ret <8 x i16> %sext 48 ret <8 x i16> %sext
49 ; ASM: vshl.u16 {{.*}}, #15 49 ; ASM: vshl.u16 {{.*}}, #15
50 ; ASM-NEXT: vshr.s16 {{.*}}, #15 50 ; ASM-NEXT: vshr.s16 {{.*}}, #15
51 ; DIS: 10: f29f0550 51 ; DIS: 10: f29f0550
52 ; DIS-NEXT: 14: f2910050 52 ; DIS-NEXT: 14: f2910050
53 ; IASM-NOT: vshl.u16 {{.*}}, #15 53 ; IASM-NOT: vshl
54 ; IASM-NOT: vshr.s16 {{.*}}, #15 54 ; IASM-NOT: vshr
55 } 55 }
56 56
57 define internal <16 x i8> @SextV16I1(<16 x i8> %a) { 57 define internal <16 x i8> @SextV16I1(<16 x i8> %a) {
58 ; ASM-LABEL:SextV16I1 58 ; ASM-LABEL:SextV16I1
59 ; DIS-LABEL:00000020 <SextV16I1>: 59 ; DIS-LABEL:00000020 <SextV16I1>:
60 ; IASM-LABEL:SextV16I1: 60 ; IASM-LABEL:SextV16I1:
61 61
62 %trunc = trunc <16 x i8> %a to <16 x i1> 62 %trunc = trunc <16 x i8> %a to <16 x i1>
63 %sext = sext <16 x i1> %trunc to <16 x i8> 63 %sext = sext <16 x i1> %trunc to <16 x i8>
64 ret <16 x i8> %sext 64 ret <16 x i8> %sext
65 ; ASM: vshl.u8 {{.*}}, #7 65 ; ASM: vshl.u8 {{.*}}, #7
66 ; ASM-NEXT: vshr.s8 {{.*}}, #7 66 ; ASM-NEXT: vshr.s8 {{.*}}, #7
67 ; DIS: 20: f28f0550 67 ; DIS: 20: f28f0550
68 ; DIS-NEXT: 24: f2890050 68 ; DIS-NEXT: 24: f2890050
69 ; IASM-NOT: vshl.u8 {{.*}}, #7 69 ; IASM-NOT: vshl
70 ; IASM-NOT: vshr.s8 {{.*}}, #7 70 ; IASM-NOT: vshr
71 } 71 }
OLDNEW
« no previous file with comments | « tests_lit/assembler/arm32/vcvt.u32.f32.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698