• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=X64
2; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s -check-prefix=WIN64
3
4; X64: @bar1
5; X64: movzbl
6; X64: jmp
7; WIN64: @bar1
8; WIN64: movzbl
9; WIN64: callq
10define void @bar1(i1 zeroext %v1) nounwind ssp {
11entry:
12  %conv = zext i1 %v1 to i32
13  %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
14  ret void
15}
16
17; X64: @bar2
18; X64-NOT: movzbl
19; X64: jmp
20; WIN64: @bar2
21; WIN64-NOT: movzbl
22; WIN64: callq
23define void @bar2(i8 zeroext %v1) nounwind ssp {
24entry:
25  %conv = zext i8 %v1 to i32
26  %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
27  ret void
28}
29
30; X64: @bar3
31; X64: callq
32; X64-NOT: movzbl
33; X64-NOT: and
34; X64: ret
35; WIN64: @bar3
36; WIN64: callq
37; WIN64-NOT: movzbl
38; WIN64-NOT: and
39; WIN64: ret
40define zeroext i1 @bar3() nounwind ssp {
41entry:
42  %call = call i1 @foo2() nounwind
43  ret i1 %call
44}
45
46declare i32 @foo1(...)
47declare zeroext i1 @foo2()
48