llvm.org GIT mirror llvm / b972f33
Use CHECK-LABEL to make this test more strict. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196321 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
1 changed file(s) with 20 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
1212
1313 define void @sret1(i8* sret %x) nounwind {
1414 entry:
15 ; WIN32: sret1
15 ; WIN32-LABEL: _sret1:
1616 ; WIN32: movb $42, (%eax)
1717 ; WIN32-NOT: popl %eax
1818 ; WIN32: {{ret$}}
1919
20 ; MINGW_X86: sret1
20 ; MINGW_X86-LABEL: _sret1:
2121 ; MINGW_X86: ret $4
2222
23 ; LINUX: sret1
23 ; LINUX-LABEL: sret1:
2424 ; LINUX: ret $4
2525
2626 store i8 42, i8* %x, align 4
2929
3030 define void @sret2(i8* sret %x, i8 %y) nounwind {
3131 entry:
32 ; WIN32: sret2
32 ; WIN32-LABEL: _sret2:
3333 ; WIN32: movb {{.*}}, (%eax)
3434 ; WIN32-NOT: popl %eax
3535 ; WIN32: {{ret$}}
3636
37 ; MINGW_X86: sret2
37 ; MINGW_X86-LABEL: _sret2:
3838 ; MINGW_X86: ret $4
3939
40 ; LINUX: sret2
40 ; LINUX-LABEL: sret2:
4141 ; LINUX: ret $4
4242
4343 store i8 %y, i8* %x
4646
4747 define void @sret3(i8* sret %x, i8* %y) nounwind {
4848 entry:
49 ; WIN32: sret3
49 ; WIN32-LABEL: _sret3:
5050 ; WIN32: movb $42, (%eax)
5151 ; WIN32-NOT: movb $13, (%eax)
5252 ; WIN32-NOT: popl %eax
5353 ; WIN32: {{ret$}}
5454
55 ; MINGW_X86: sret3
55 ; MINGW_X86-LABEL: _sret3:
5656 ; MINGW_X86: ret $4
5757
58 ; LINUX: sret3
58 ; LINUX-LABEL: sret3:
5959 ; LINUX: ret $4
6060
6161 store i8 42, i8* %x
6868
6969 define void @sret4(%struct.S4* noalias sret %agg.result) {
7070 entry:
71 ; WIN32: sret4
71 ; WIN32-LABEL: _sret4:
7272 ; WIN32: movl $42, (%eax)
7373 ; WIN32-NOT: popl %eax
7474 ; WIN32: {{ret$}}
7575
76 ; MINGW_X86: sret4
76 ; MINGW_X86-LABEL: _sret4:
7777 ; MINGW_X86: ret $4
7878
79 ; LINUX: sret4
79 ; LINUX-LABEL: sret4:
8080 ; LINUX: ret $4
8181
8282 %x = getelementptr inbounds %struct.S4* %agg.result, i32 0, i32 0
9595 %x = getelementptr inbounds %struct.S5* %agg.result, i32 0, i32 0
9696 store i32 42, i32* %x, align 4
9797 ret void
98 ; WIN32: {{^}}"?foo@C5@@QAE?AUS5@@XZ":
98 ; WIN32-LABEL: {{^}}"?foo@C5@@QAE?AUS5@@XZ":
99 ; MINGW_X86-LABEL: {{^}}"?foo@C5@@QAE?AUS5@@XZ":
100 ; LINUX-LABEL: {{^}}"?foo@C5@@QAE?AUS5@@XZ":
99101
100102 ; The address of the return structure is passed as an implicit parameter.
101103 ; In the -O0 build, %eax is spilled at the beginning of the function, hence we
110112 %c = alloca %class.C5, align 1
111113 %s = alloca %struct.S5, align 4
112114 call x86_thiscallcc void @"\01?foo@C5@@QAE?AUS5@@XZ"(%struct.S5* sret %s, %class.C5* %c)
113 ; WIN32: {{^}}_call_foo5:
115 ; WIN32-LABEL: {{^}}_call_foo5:
116 ; MINGW_X86-LABEL: {{^}}_call_foo5:
117 ; LINUX-LABEL: {{^}}call_foo5:
118
114119
115120 ; Load the address of the result and put it onto stack
116121 ; (through %ecx in the -O0 build).
129134 define void @test6_f(%struct.test6* %x) nounwind {
130135 ; WIN32-LABEL: _test6_f:
131136 ; MINGW_X86-LABEL: _test6_f:
137 ; LINUX-LABEL: test6_f:
132138
133139 ; The %x argument is moved to %ecx. It will be the this pointer.
134140 ; WIN32: movl 8(%ebp), %ecx