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

Side by Side Diff: tests_lit/llvm2ice_tests/fp.pnacl.ll

Issue 444443002: Subzero: Align the stack at the point of function calls. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Comments round 3 Created 6 years, 4 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/ebp_args.ll ('k') | tests_lit/llvm2ice_tests/undef.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 tries to be a comprehensive test of f32 and f64 operations. 1 ; This tries to be a comprehensive test of f32 and f64 operations.
2 ; The CHECK lines are only checking for basic instruction patterns 2 ; The CHECK lines are only checking for basic instruction patterns
3 ; that should be present regardless of the optimization level, so 3 ; that should be present regardless of the optimization level, so
4 ; there are no special OPTM1 match lines. 4 ; there are no special OPTM1 match lines.
5 5
6 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s 6 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
7 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s 7 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
8 ; RUN: %llvm2ice -O2 --verbose none %s \ 8 ; RUN: %llvm2ice -O2 --verbose none %s \
9 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj 9 ; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
10 ; RUN: %llvm2ice -Om1 --verbose none %s \ 10 ; RUN: %llvm2ice -Om1 --verbose none %s \
(...skipping 27 matching lines...) Expand all
38 define internal i32 @passFpArgs(float %a, double %b, float %c, double %d, float %e, double %f) { 38 define internal i32 @passFpArgs(float %a, double %b, float %c, double %d, float %e, double %f) {
39 entry: 39 entry:
40 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double %b) 40 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double %b)
41 %call1 = call i32 @ignoreFpArgsNoInline(float %c, i32 123, double %d) 41 %call1 = call i32 @ignoreFpArgsNoInline(float %c, i32 123, double %d)
42 %call2 = call i32 @ignoreFpArgsNoInline(float %e, i32 123, double %f) 42 %call2 = call i32 @ignoreFpArgsNoInline(float %e, i32 123, double %f)
43 %add = add i32 %call1, %call 43 %add = add i32 %call1, %call
44 %add3 = add i32 %add, %call2 44 %add3 = add i32 %add, %call2
45 ret i32 %add3 45 ret i32 %add3
46 } 46 }
47 ; CHECK-LABEL: passFpArgs 47 ; CHECK-LABEL: passFpArgs
48 ; CHECK: push 123 48 ; CHECK: mov dword ptr [esp+4], 123
49 ; CHECK: call ignoreFpArgsNoInline 49 ; CHECK: call ignoreFpArgsNoInline
50 ; CHECK: push 123 50 ; CHECK: mov dword ptr [esp+4], 123
51 ; CHECK: call ignoreFpArgsNoInline 51 ; CHECK: call ignoreFpArgsNoInline
52 ; CHECK: push 123 52 ; CHECK: mov dword ptr [esp+4], 123
53 ; CHECK: call ignoreFpArgsNoInline 53 ; CHECK: call ignoreFpArgsNoInline
54 54
55 declare i32 @ignoreFpArgsNoInline(float, i32, double) 55 declare i32 @ignoreFpArgsNoInline(float, i32, double)
56 56
57 define internal i32 @passFpConstArg(float %a, double %b) { 57 define internal i32 @passFpConstArg(float %a, double %b) {
58 entry: 58 entry:
59 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double 2.340000e+00) 59 %call = call i32 @ignoreFpArgsNoInline(float %a, i32 123, double 2.340000e+00)
60 ret i32 %call 60 ret i32 %call
61 } 61 }
62 ; CHECK-LABEL: passFpConstArg 62 ; CHECK-LABEL: passFpConstArg
63 ; CHECK: push 123 63 ; CHECK: mov dword ptr [esp+4], 123
64 ; CHECK: call ignoreFpArgsNoInline 64 ; CHECK: call ignoreFpArgsNoInline
65 65
66 define internal i32 @passFp32ConstArg(float %a) { 66 define internal i32 @passFp32ConstArg(float %a) {
67 entry: 67 entry:
68 %call = call i32 @ignoreFp32ArgsNoInline(float %a, i32 123, float 2.0) 68 %call = call i32 @ignoreFp32ArgsNoInline(float %a, i32 123, float 2.0)
69 ret i32 %call 69 ret i32 %call
70 } 70 }
71 ; CHECK-LABEL: passFp32ConstArg 71 ; CHECK-LABEL: passFp32ConstArg
72 ; CHECK: push dword 72 ; CHECK: mov dword ptr [esp+4], 123
73 ; CHECK: push 123 73 ; CHECK: movss dword ptr [esp+8]
74 ; CHECK: call ignoreFp32ArgsNoInline 74 ; CHECK: call ignoreFp32ArgsNoInline
75 75
76 declare i32 @ignoreFp32ArgsNoInline(float, i32, float) 76 declare i32 @ignoreFp32ArgsNoInline(float, i32, float)
77 77
78 define internal float @returnFloatArg(float %a) { 78 define internal float @returnFloatArg(float %a) {
79 entry: 79 entry:
80 ret float %a 80 ret float %a
81 } 81 }
82 ; CHECK-LABEL: returnFloatArg 82 ; CHECK-LABEL: returnFloatArg
83 ; CHECK: fld dword ptr [esp 83 ; CHECK: fld dword ptr [esp
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 ; CHECK-LABEL: unsigned64ToFloat 408 ; CHECK-LABEL: unsigned64ToFloat
409 ; CHECK: call cvtui64tof 409 ; CHECK: call cvtui64tof
410 ; CHECK: fstp 410 ; CHECK: fstp
411 411
412 define internal double @unsigned64ToDoubleConst() { 412 define internal double @unsigned64ToDoubleConst() {
413 entry: 413 entry:
414 %conv = uitofp i64 12345678901234 to double 414 %conv = uitofp i64 12345678901234 to double
415 ret double %conv 415 ret double %conv
416 } 416 }
417 ; CHECK-LABEL: unsigned64ToDouble 417 ; CHECK-LABEL: unsigned64ToDouble
418 ; CHECK: push 2874 418 ; CHECK: mov dword ptr [esp+4], 2874
419 ; CHECK: push 1942892530 419 ; CHECK: mov dword ptr [esp], 1942892530
420 ; CHECK: call cvtui64tod 420 ; CHECK: call cvtui64tod
421 ; CHECK: fstp 421 ; CHECK: fstp
422 422
423 define internal double @signed32ToDouble(i32 %a) { 423 define internal double @signed32ToDouble(i32 %a) {
424 entry: 424 entry:
425 %conv = sitofp i32 %a to double 425 %conv = sitofp i32 %a to double
426 ret double %conv 426 ret double %conv
427 } 427 }
428 ; CHECK-LABEL: signed32ToDouble 428 ; CHECK-LABEL: signed32ToDouble
429 ; CHECK: cvtsi2sd 429 ; CHECK: cvtsi2sd
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 %cond = select i1 %cmp, double %a, double %b 1127 %cond = select i1 %cmp, double %a, double %b
1128 ret double %cond 1128 ret double %cond
1129 } 1129 }
1130 ; CHECK-LABEL: selectDoubleVarVar 1130 ; CHECK-LABEL: selectDoubleVarVar
1131 ; CHECK: ucomisd 1131 ; CHECK: ucomisd
1132 ; CHECK: ja . 1132 ; CHECK: ja .
1133 ; CHECK: fld 1133 ; CHECK: fld
1134 1134
1135 ; ERRORS-NOT: ICE translation error 1135 ; ERRORS-NOT: ICE translation error
1136 ; DUMP-NOT: SZ 1136 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/ebp_args.ll ('k') | tests_lit/llvm2ice_tests/undef.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698