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

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

Issue 1745393002: Subzero. ARM32. Reverts cl 1687553002. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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/push-pop.ll ('k') | tests_lit/assembler/arm32/sandboxing.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 ; Show that we know how to translate vector urem, srem and frem. 1 ; Show that we know how to translate vector urem, srem and frem.
2 2
3 ; NOTE: We use -O2 to get rid of memory stores. 3 ; NOTE: We use -O2 to get rid of memory stores.
4 4
5 ; REQUIRES: allow_dump 5 ; REQUIRES: allow_dump
6 6
7 ; Compile using standalone assembler. 7 ; Compile using standalone assembler.
8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -mattr=hwdiv-arm \ 8 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 -mattr=hwdiv-arm \
9 ; RUN: | FileCheck %s --check-prefix=ASM 9 ; RUN: | FileCheck %s --check-prefix=ASM
10 10
11 define internal <4 x i32> @Urem4i32(<4 x i32> %a, <4 x i32> %b) { 11 define internal <4 x i32> @Urem4i32(<4 x i32> %a, <4 x i32> %b) {
12 ; ASM-LABEL:Urem4i32: 12 ; ASM-LABEL:Urem4i32:
13 13
14 entry: 14 entry:
15 ; ASM-NEXT:.LUrem4i32$entry: 15 ; ASM-NEXT:.LUrem4i32$entry:
16 16
17 %v = urem <4 x i32> %a, %b 17 %v = urem <4 x i32> %a, %b
18 18
19 ; ASM-LABEL:.LUrem4i32$local$__0: 19 ; ASM-LABEL:.LUrem4i32$local$__0:
20 ; ASM-NEXT:» udiv» r2, r0, r1 20 ; ASM-NEXT: udiv r2, r0, r1
21 ; ASM-NEXT:» mls» r2, r2, r1, r0 21 ; ASM-NEXT: mls r2, r2, r1, r0
22 ; ASM-NEXT:» vmov.32»d4[0], r2 22 ; ASM-NEXT: vmov.32 d4[0], r2
23 23
24 ; ASM-LABEL:.LUrem4i32$local$__1: 24 ; ASM-LABEL:.LUrem4i32$local$__1:
25 ; ASM-NEXT:» udiv» r2, r0, r1 25 ; ASM-NEXT: udiv r2, r0, r1
26 ; ASM-NEXT:» mls» r2, r2, r1, r0 26 ; ASM-NEXT: mls r2, r2, r1, r0
27 ; ASM-NEXT:» vmov.32»d4[1], r2 27 ; ASM-NEXT: vmov.32 d4[1], r2
28 28
29 ; ASM-LABEL:.LUrem4i32$local$__2: 29 ; ASM-LABEL:.LUrem4i32$local$__2:
30 ; ASM-NEXT:» udiv» r2, r0, r1 30 ; ASM-NEXT: udiv r2, r0, r1
31 ; ASM-NEXT:» mls» r2, r2, r1, r0 31 ; ASM-NEXT: mls r2, r2, r1, r0
32 ; ASM-NEXT:» vmov.32»d5[0], r2 32 ; ASM-NEXT: vmov.32 d5[0], r2
33 33
34 ; ASM-LABEL:.LUrem4i32$local$__3: 34 ; ASM-LABEL:.LUrem4i32$local$__3:
35 ; ASM-NEXT:» udiv» r2, r0, r1 35 ; ASM-NEXT: udiv r2, r0, r1
36 ; ASM-NEXT:» mls» r2, r2, r1, r0 36 ; ASM-NEXT: mls r2, r2, r1, r0
37 ; ASM-NEXT:» vmov.32»d5[1], r2 37 ; ASM-NEXT: vmov.32 d5[1], r2
38 38
39 ret <4 x i32> %v 39 ret <4 x i32> %v
40 } 40 }
41 41
42 define internal <4 x i32> @Srem4i32(<4 x i32> %a, <4 x i32> %b) { 42 define internal <4 x i32> @Srem4i32(<4 x i32> %a, <4 x i32> %b) {
43 ; ASM-LABEL:Srem4i32: 43 ; ASM-LABEL:Srem4i32:
44 44
45 entry: 45 entry:
46 ; ASM-NEXT:.LSrem4i32$entry: 46 ; ASM-NEXT:.LSrem4i32$entry:
47 47
48 %v = srem <4 x i32> %a, %b 48 %v = srem <4 x i32> %a, %b
49 49
50 ; ASM-LABEL:.LSrem4i32$local$__0: 50 ; ASM-LABEL:.LSrem4i32$local$__0:
51 ; ASM-NEXT:» sdiv» r2, r0, r1 51 ; ASM-NEXT: sdiv r2, r0, r1
52 ; ASM-NEXT:» mls» r2, r2, r1, r0 52 ; ASM-NEXT: mls r2, r2, r1, r0
53 ; ASM-NEXT:» vmov.32»d4[0], r2 53 ; ASM-NEXT: vmov.32 d4[0], r2
54 54
55 ; ASM-LABEL:.LSrem4i32$local$__1: 55 ; ASM-LABEL:.LSrem4i32$local$__1:
56 ; ASM-NEXT:» sdiv» r2, r0, r1 56 ; ASM-NEXT: sdiv r2, r0, r1
57 ; ASM-NEXT:» mls» r2, r2, r1, r0 57 ; ASM-NEXT: mls r2, r2, r1, r0
58 ; ASM-NEXT:» vmov.32»d4[1], r2 58 ; ASM-NEXT: vmov.32 d4[1], r2
59 59
60 ; ASM-LABEL:.LSrem4i32$local$__2: 60 ; ASM-LABEL:.LSrem4i32$local$__2:
61 ; ASM-NEXT:» sdiv» r2, r0, r1 61 ; ASM-NEXT: sdiv r2, r0, r1
62 ; ASM-NEXT:» mls» r2, r2, r1, r0 62 ; ASM-NEXT: mls r2, r2, r1, r0
63 ; ASM-NEXT:» vmov.32»d5[0], r2 63 ; ASM-NEXT: vmov.32 d5[0], r2
64 64
65 ; ASM-LABEL:.LSrem4i32$local$__3: 65 ; ASM-LABEL:.LSrem4i32$local$__3:
66 ; ASM-NEXT:» sdiv» r2, r0, r1 66 ; ASM-NEXT: sdiv r2, r0, r1
67 ; ASM-NEXT:» mls» r2, r2, r1, r0 67 ; ASM-NEXT: mls r2, r2, r1, r0
68 ; ASM-NEXT:» vmov.32»d5[1], r2 68 ; ASM-NEXT: vmov.32 d5[1], r2
69 69
70 ret <4 x i32> %v 70 ret <4 x i32> %v
71 } 71 }
72 72
73 define internal <4 x float> @Frem4float(<4 x float> %a, <4 x float> %b) { 73 define internal <4 x float> @Frem4float(<4 x float> %a, <4 x float> %b) {
74 ; ASM-LABEL:Frem4float: 74 ; ASM-LABEL:Frem4float:
75 75
76 entry: 76 entry:
77 ; ASM-NEXT:.LFrem4float$entry: 77 ; ASM-NEXT:.LFrem4float$entry:
78 78
79 %v = frem <4 x float> %a, %b 79 %v = frem <4 x float> %a, %b
80 80
81 ; ASM:» »vmov.f32» s0, s16 81 ; ASM: vmov.f32 s0, s16
82 ; ASM-NEXT:» vmov.f32» s1, s20 82 ; ASM-NEXT: vmov.f32 s1, s20
83 ; ASM-NEXT:» movw» r0, #:lower16:fmodf 83 ; ASM-NEXT: bl fmodf
84 ; ASM-NEXT:» movt» r0, #:upper16:fmodf
85 ; ASM-NEXT:» blx» r0
86 84
87 ; ASM:» » vmov.f32» s0, s17 85 ; ASM: vmov.f32 s0, s17
88 ; ASM-NEXT:» vmov.f32» s1, s21 86 ; ASM-NEXT: vmov.f32 s1, s21
89 ; ASM-NEXT:» movw» r0, #:lower16:fmodf 87 ; ASM-NEXT: bl fmodf
90 ; ASM-NEXT:» movt» r0, #:upper16:fmodf
91 ; ASM-NEXT:» blx» r0
92 88
93 ; ASM:» » vmov.f32» s0, s18 89 ; ASM: vmov.f32 s0, s18
94 ; ASM-NEXT:» vmov.f32» s1, s22 90 ; ASM-NEXT: vmov.f32 s1, s22
95 ; ASM-NEXT:» movw» r0, #:lower16:fmodf 91 ; ASM-NEXT: bl fmodf
96 ; ASM-NEXT:» movt» r0, #:upper16:fmodf
97 ; ASM-NEXT:» blx» r0
98 92
99 ; ASM:» » vmov.f32» s16, s19 93 ; ASM: vmov.f32 s16, s19
100 ; ASM-NEXT:» vmov.f32» s20, s23 94 ; ASM-NEXT: vmov.f32 s20, s23
101 ; ASM-NEXT:» movw» r0, #:lower16:fmodf 95 ; ASM: bl fmodf
102 ; ASM-NEXT:» movt» r0, #:upper16:fmodf
103 ; ASM:» blx» r0
104 96
105 ret <4 x float> %v 97 ret <4 x float> %v
106 } 98 }
OLDNEW
« no previous file with comments | « tests_lit/assembler/arm32/push-pop.ll ('k') | tests_lit/assembler/arm32/sandboxing.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698