[TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting...
[oota-llvm.git] / test / CodeGen / X86 / fastcall-correct-mangling.ll
1 ; RUN: llc < %s -mtriple=i386-unknown-mingw32 | \
2 ; RUN: FileCheck --check-prefix=CHECK32 %s
3
4 ; RUN: llc < %s -mtriple=i386-unknown-win32 | \
5 ; RUN: FileCheck --check-prefix=CHECK32 %s
6
7 ; RUN: llc < %s -mtriple=x86_64-unknown-mingw32 | \
8 ; RUN: FileCheck --check-prefix=CHECK64 %s
9
10 ; RUN: llc < %s -mtriple=x86_64-unknown-mingw32 | \
11 ; RUN: FileCheck --check-prefix=CHECK64 %s
12
13 ; Check that a fastcall function gets correct mangling
14
15 define x86_fastcallcc void @func(i64 %X, i8 %Y, i8 %G, i16 %Z) {
16 ; CHECK32-LABEL: {{^}}@func@20:
17 ; CHECK64-LABEL: {{^}}func:
18         ret void
19 }
20
21 define x86_fastcallcc i32 @"\01DoNotMangle"(i32 %a) {
22 ; CHECK32-LABEL: {{^}}DoNotMangle:
23 ; CHECK64-LABEL: {{^}}DoNotMangle:
24 entry:
25   ret i32 %a
26 }
27
28 define private x86_fastcallcc void @dontCrash() {
29 ; The name is fairly arbitrary since it is private. Just don't crash.
30 ; CHECK32-LABEL: {{^}}L@dontCrash@0:
31 ; CHECK64-LABEL: {{^}}LdontCrash:
32   ret void
33 }