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

Side by Side Diff: tests_lit/assembler/x86/immediate_encodings.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: Ready for review. 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
OLDNEW
1 ; Tests various aspects of x86 immediate encoding. Some encodings are shorter. 1 ; Tests various aspects of x86 immediate encoding. Some encodings are shorter.
2 ; For example, the encoding is shorter for 8-bit immediates or when using EAX. 2 ; For example, the encoding is shorter for 8-bit immediates or when using EAX.
3 ; This assumes that EAX is chosen as the first free register in O2 mode. 3 ; This assumes that EAX is chosen as the first free register in O2 mode.
4 4
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s
6 6
7 define internal i32 @testXor8Imm8(i32 %arg) { 7 define internal i32 @testXor8Imm8(i32 %arg) {
8 entry: 8 entry:
9 %arg_i8 = trunc i32 %arg to i8 9 %arg_i8 = trunc i32 %arg to i8
10 %result_i8 = xor i8 %arg_i8, 127 10 %result_i8 = xor i8 %arg_i8, 127
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 ret i64 %shl 284 ret i64 %shl
285 } 285 }
286 ; CHECK-LABEL: test_via_shl64Bit 286 ; CHECK-LABEL: test_via_shl64Bit
287 ; CHECK: 0f a5 c2 shld edx,eax,cl 287 ; CHECK: 0f a5 c2 shld edx,eax,cl
288 ; CHECK: d3 e0 shl eax,cl 288 ; CHECK: d3 e0 shl eax,cl
289 ; CHECK: f6 c1 20 test cl,0x20 289 ; CHECK: f6 c1 20 test cl,0x20
290 290
291 ; Test a few register encodings of "test". 291 ; Test a few register encodings of "test".
292 declare i64 @llvm.ctlz.i64(i64, i1) 292 declare i64 @llvm.ctlz.i64(i64, i1)
293 293
294 define i64 @test_via_ctlz_64(i64 %x, i64 %y, i64 %z, i64 %w) { 294 define internal i64 @test_via_ctlz_64(i64 %x, i64 %y, i64 %z, i64 %w) {
295 entry: 295 entry:
296 %r = call i64 @llvm.ctlz.i64(i64 %x, i1 false) 296 %r = call i64 @llvm.ctlz.i64(i64 %x, i1 false)
297 %r2 = call i64 @llvm.ctlz.i64(i64 %y, i1 false) 297 %r2 = call i64 @llvm.ctlz.i64(i64 %y, i1 false)
298 %r3 = call i64 @llvm.ctlz.i64(i64 %z, i1 false) 298 %r3 = call i64 @llvm.ctlz.i64(i64 %z, i1 false)
299 %r4 = call i64 @llvm.ctlz.i64(i64 %w, i1 false) 299 %r4 = call i64 @llvm.ctlz.i64(i64 %w, i1 false)
300 %res1 = add i64 %r, %r2 300 %res1 = add i64 %r, %r2
301 %res2 = add i64 %r3, %r4 301 %res2 = add i64 %r3, %r4
302 %res = add i64 %res1, %res2 302 %res = add i64 %res1, %res2
303 ret i64 %res 303 ret i64 %res
304 } 304 }
305 ; CHECK-LABEL: test_via_ctlz_64 305 ; CHECK-LABEL: test_via_ctlz_64
306 ; CHECK-DAG: 85 c0 test eax,eax 306 ; CHECK-DAG: 85 c0 test eax,eax
307 ; CHECK-DAG: 85 db test ebx,ebx 307 ; CHECK-DAG: 85 db test ebx,ebx
308 ; CHECK-DAG: 85 f6 test esi,esi 308 ; CHECK-DAG: 85 f6 test esi,esi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698