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

Side by Side Diff: tests_lit/llvm2ice_tests/rng.ll

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 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/returns_twice_no_coalesce.ll ('k') | tests_lit/llvm2ice_tests/sdiv.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 is a smoke test of random number generator. 1 ; This is a smoke test of random number generator.
2 ; The random number generators for different randomization passes should be 2 ; The random number generators for different randomization passes should be
3 ; decoupled. The random number used in one randomization pass should not be 3 ; decoupled. The random number used in one randomization pass should not be
4 ; influenced by the existence of other randomization passes. 4 ; influenced by the existence of other randomization passes.
5 5
6 ; REQUIRES: allow_dump, target_X8632 6 ; REQUIRES: allow_dump, target_X8632
7 7
8 ; Command for checking constant blinding (Need to turn off nop-insertion) 8 ; Command for checking constant blinding (Need to turn off nop-insertion)
9 ; RUN: %p2i --target x8632 -i %s --filetype=obj --disassemble --args -O2 \ 9 ; RUN: %p2i --target x8632 -i %s --filetype=obj --disassemble --args -O2 \
10 ; RUN: -sz-seed=1 -randomize-pool-immediates=randomize \ 10 ; RUN: -sz-seed=1 -randomize-pool-immediates=randomize \
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 @PrimitiveInitConst = internal constant [4 x i8] c"\0D\00\00\00", align 4 97 @PrimitiveInitConst = internal constant [4 x i8] c"\0D\00\00\00", align 4
98 @ArrayInit = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1E\00\00\00(\0 0\00\002\00\00\00", align 4 98 @ArrayInit = internal global [20 x i8] c"\0A\00\00\00\14\00\00\00\1E\00\00\00(\0 0\00\002\00\00\00", align 4
99 @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\00\00\00Z\ 00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", align 4 99 @ArrayInitPartial = internal global [40 x i8] c"<\00\00\00F\00\00\00P\00\00\00Z\ 00\00\00d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", align 4
100 @PrimitiveInitStatic = internal global [4 x i8] zeroinitializer, align 4 100 @PrimitiveInitStatic = internal global [4 x i8] zeroinitializer, align 4
101 @PrimitiveUninit = internal global [4 x i8] zeroinitializer, align 4 101 @PrimitiveUninit = internal global [4 x i8] zeroinitializer, align 4
102 @ArrayUninit = internal global [20 x i8] zeroinitializer, align 4 102 @ArrayUninit = internal global [20 x i8] zeroinitializer, align 4
103 @ArrayUninitConstDouble = internal constant [200 x i8] zeroinitializer, align 8 103 @ArrayUninitConstDouble = internal constant [200 x i8] zeroinitializer, align 8
104 @ArrayUninitConstInt = internal constant [20 x i8] zeroinitializer, align 4 104 @ArrayUninitConstInt = internal constant [20 x i8] zeroinitializer, align 4
105 105
106 106
107 define <4 x i32> @func1(<4 x i32> %a, <4 x i32> %b) { 107 define internal <4 x i32> @func1(<4 x i32> %a, <4 x i32> %b) {
108 entry: 108 entry:
109 %res = mul <4 x i32> %a, %b 109 %res = mul <4 x i32> %a, %b
110 ret <4 x i32> %res 110 ret <4 x i32> %res
111 111
112 ; NOPINSERTION-LABEL: func1 112 ; NOPINSERTION-LABEL: func1
113 ; NOPINSERTION: nop # variant = 1 113 ; NOPINSERTION: nop # variant = 1
114 ; NOPINSERTION: subl $60, %esp 114 ; NOPINSERTION: subl $60, %esp
115 ; NOPINSERTION: nop # variant = 3 115 ; NOPINSERTION: nop # variant = 3
116 ; NOPINSERTION: movups %xmm0, 32(%esp) 116 ; NOPINSERTION: movups %xmm0, 32(%esp)
117 ; NOPINSERTION: movups %xmm1, 16(%esp) 117 ; NOPINSERTION: movups %xmm1, 16(%esp)
(...skipping 11 matching lines...) Expand all
129 ; NOPINSERTION: pshufd $216, %xmm0, %xmm0 129 ; NOPINSERTION: pshufd $216, %xmm0, %xmm0
130 ; NOPINSERTION: nop # variant = 1 130 ; NOPINSERTION: nop # variant = 1
131 ; NOPINSERTION: movups %xmm0, (%esp) 131 ; NOPINSERTION: movups %xmm0, (%esp)
132 ; NOPINSERTION: movups (%esp), %xmm0 132 ; NOPINSERTION: movups (%esp), %xmm0
133 ; NOPINSERTION: addl $60, %esp 133 ; NOPINSERTION: addl $60, %esp
134 ; NOPINSERTION: ret 134 ; NOPINSERTION: ret
135 } 135 }
136 136
137 137
138 138
139 define float @func2(float* %arg) { 139 define internal float @func2(float* %arg) {
140 entry: 140 entry:
141 %arg.int = ptrtoint float* %arg to i32 141 %arg.int = ptrtoint float* %arg to i32
142 %addr.int = add i32 %arg.int, 200000 142 %addr.int = add i32 %arg.int, 200000
143 %addr.ptr = inttoptr i32 %addr.int to float* 143 %addr.ptr = inttoptr i32 %addr.int to float*
144 %addr.load = load float, float* %addr.ptr, align 4 144 %addr.load = load float, float* %addr.ptr, align 4
145 ret float %addr.load 145 ret float %addr.load
146 146
147 ; BLINDINGO2-LABEL: func2 147 ; BLINDINGO2-LABEL: func2
148 ; BLINDINGO2: lea [[REG:e[a-z]*]],{{[[]}}{{e[a-z]*}}+0x69ed4ee7{{[]]}} 148 ; BLINDINGO2: lea [[REG:e[a-z]*]],{{[[]}}{{e[a-z]*}}+0x69ed4ee7{{[]]}}
149 } 149 }
150 150
151 define float @func3(i32 %arg, float %input) { 151 define internal float @func3(i32 %arg, float %input) {
152 entry: 152 entry:
153 switch i32 %arg, label %return [ 153 switch i32 %arg, label %return [
154 i32 0, label %sw.bb 154 i32 0, label %sw.bb
155 i32 1, label %sw.bb1 155 i32 1, label %sw.bb1
156 i32 2, label %sw.bb2 156 i32 2, label %sw.bb2
157 i32 3, label %sw.bb3 157 i32 3, label %sw.bb3
158 i32 4, label %sw.bb4 158 i32 4, label %sw.bb4
159 ] 159 ]
160 160
161 sw.bb: 161 sw.bb:
(...skipping 14 matching lines...) Expand all
176 176
177 sw.bb4: 177 sw.bb4:
178 %rbb4 = fadd float %input, 2.500000e-01 178 %rbb4 = fadd float %input, 2.500000e-01
179 br label %return 179 br label %return
180 180
181 return: 181 return:
182 %retval.0 = phi float [ %rbb, %sw.bb ], [ %rbb1, %sw.bb1 ], [ %rbb2, %sw.bb2 ] , [ %rbb3, %sw.bb3 ], [ %rbb4, %sw.bb4], [ 0.000000e+00, %entry ] 182 %retval.0 = phi float [ %rbb, %sw.bb ], [ %rbb1, %sw.bb1 ], [ %rbb2, %sw.bb2 ] , [ %rbb3, %sw.bb3 ], [ %rbb4, %sw.bb4], [ 0.000000e+00, %entry ]
183 ret float %retval.0 183 ret float %retval.0
184 } 184 }
185 185
186 define <4 x i32> @func4(<4 x i32> %a, <4 x i32> %b) { 186 define internal <4 x i32> @func4(<4 x i32> %a, <4 x i32> %b) {
187 entry: 187 entry:
188 %res = mul <4 x i32> %a, %b 188 %res = mul <4 x i32> %a, %b
189 ret <4 x i32> %res 189 ret <4 x i32> %res
190 190
191 ; REGALLOC-LABEL: func4 191 ; REGALLOC-LABEL: func4
192 ; REGALLOC: movups xmm3,xmm0 192 ; REGALLOC: movups xmm3,xmm0
193 ; REGALLOC-NEXT: pshufd xmm0,xmm0,0x31 193 ; REGALLOC-NEXT: pshufd xmm0,xmm0,0x31
194 ; REGALLOC-NEXT: pshufd xmm5,xmm1,0x31 194 ; REGALLOC-NEXT: pshufd xmm5,xmm1,0x31
195 ; REGALLOC-NEXT: pmuludq xmm3,xmm1 195 ; REGALLOC-NEXT: pmuludq xmm3,xmm1
196 ; REGALLOC-NEXT: pmuludq xmm0,xmm5 196 ; REGALLOC-NEXT: pmuludq xmm0,xmm5
197 ; REGALLOC-NEXT: shufps xmm3,xmm0,0x88 197 ; REGALLOC-NEXT: shufps xmm3,xmm0,0x88
198 ; REGALLOC-NEXT: pshufd xmm3,xmm3,0xd8 198 ; REGALLOC-NEXT: pshufd xmm3,xmm3,0xd8
199 ; REGALLOC-NEXT: movups xmm0,xmm3 199 ; REGALLOC-NEXT: movups xmm0,xmm3
200 ; REGALLOC-NEXT: ret 200 ; REGALLOC-NEXT: ret
201 } 201 }
202 202
203 define void @func5(i32 %foo, i32 %bar) { 203 define internal void @func5(i32 %foo, i32 %bar) {
204 entry: 204 entry:
205 %r1 = icmp eq i32 %foo, %bar 205 %r1 = icmp eq i32 %foo, %bar
206 br i1 %r1, label %BB1, label %BB2 206 br i1 %r1, label %BB1, label %BB2
207 BB1: 207 BB1:
208 %r2 = icmp sgt i32 %foo, %bar 208 %r2 = icmp sgt i32 %foo, %bar
209 br i1 %r2, label %BB3, label %BB4 209 br i1 %r2, label %BB3, label %BB4
210 BB2: 210 BB2:
211 %r3 = icmp slt i32 %foo, %bar 211 %r3 = icmp slt i32 %foo, %bar
212 br i1 %r3, label %BB3, label %BB4 212 br i1 %r3, label %BB3, label %BB4
213 BB3: 213 BB3:
214 ret void 214 ret void
215 BB4: 215 BB4:
216 ret void 216 ret void
217 217
218 ; BBREORDERING-LABEL: func5: 218 ; BBREORDERING-LABEL: func5:
219 ; BBREORDERING: .Lfunc5$entry: 219 ; BBREORDERING: .Lfunc5$entry:
220 ; BBREORDERING: .Lfunc5$BB1: 220 ; BBREORDERING: .Lfunc5$BB1:
221 ; BBREORDERING: .Lfunc5$BB2: 221 ; BBREORDERING: .Lfunc5$BB2:
222 ; BBREORDERING: .Lfunc5$BB4: 222 ; BBREORDERING: .Lfunc5$BB4:
223 ; BBREORDERING: .Lfunc5$BB3 223 ; BBREORDERING: .Lfunc5$BB3
224 } 224 }
225 225
226 define i32 @func6(i32 %arg) { 226 define internal i32 @func6(i32 %arg) {
227 entry: 227 entry:
228 %res = add i32 200000, %arg 228 %res = add i32 200000, %arg
229 ret i32 %res 229 ret i32 %res
230 230
231 ; BLINDINGO2-LABEL: func6 231 ; BLINDINGO2-LABEL: func6
232 ; BLINDINGO2: mov [[REG:e[a-z]*]],0x77254ee7 232 ; BLINDINGO2: mov [[REG:e[a-z]*]],0x77254ee7
233 ; BLINDINGO2-NEXT: lea [[REG]],{{[[]}}[[REG]]-0x772241a7{{[]]}} 233 ; BLINDINGO2-NEXT: lea [[REG]],{{[[]}}[[REG]]-0x772241a7{{[]]}}
234 } 234 }
235 235
236 ; Check for function reordering 236 ; Check for function reordering
(...skipping 12 matching lines...) Expand all
249 ; GLOBALVARS-LABEL: ArrayUninit 249 ; GLOBALVARS-LABEL: ArrayUninit
250 ; GLOBALVARS-LABEL: PrimitiveInitStatic 250 ; GLOBALVARS-LABEL: PrimitiveInitStatic
251 ; GLOBALVARS-LABEL: ArrayUninitConstDouble 251 ; GLOBALVARS-LABEL: ArrayUninitConstDouble
252 ; GLOBALVARS-LABEL: ArrayUninitConstInt 252 ; GLOBALVARS-LABEL: ArrayUninitConstInt
253 ; GLOBALVARS-LABEL: PrimitiveInitConst 253 ; GLOBALVARS-LABEL: PrimitiveInitConst
254 254
255 ; Check for pooled constant reordering 255 ; Check for pooled constant reordering
256 ; POOLEDCONSTANTS-LABEL: .rodata.cst4 256 ; POOLEDCONSTANTS-LABEL: .rodata.cst4
257 ; POOLEDCONSTANTS: 0000803e 0000803f 00000000 0000003f 257 ; POOLEDCONSTANTS: 0000803e 0000803f 00000000 0000003f
258 ; POOLEDCONSTANTS: 00008040 00000040 258 ; POOLEDCONSTANTS: 00008040 00000040
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/returns_twice_no_coalesce.ll ('k') | tests_lit/llvm2ice_tests/sdiv.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698