blob: 3558376dfce64387990a6017ec1f1793a93e36ac [file] [log] [blame]
Chad Rosier5def9652011-05-20 17:49:39 +00001; 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
Cameron Zwarich0a006152011-03-16 20:15:44 +00003
Chad Rosier5def9652011-05-20 17:49:39 +00004; X64: @bar1
5; X64: movzbl
6; X64: jmp
7; WIN64: @bar1
8; WIN64: movzbl
9; WIN64: callq
Cameron Zwarich0a006152011-03-16 20:15:44 +000010define void @bar1(i1 zeroext %v1) nounwind ssp {
11entry:
12 %conv = zext i1 %v1 to i32
Cameron Zwarichebe81732011-03-16 22:20:18 +000013 %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
Cameron Zwarich0a006152011-03-16 20:15:44 +000014 ret void
15}
16
Chad Rosier5def9652011-05-20 17:49:39 +000017; X64: @bar2
18; X64-NOT: movzbl
19; X64: jmp
20; WIN64: @bar2
21; WIN64-NOT: movzbl
22; WIN64: callq
Cameron Zwarich0a006152011-03-16 20:15:44 +000023define void @bar2(i8 zeroext %v1) nounwind ssp {
24entry:
25 %conv = zext i8 %v1 to i32
Cameron Zwarichebe81732011-03-16 22:20:18 +000026 %call = tail call i32 (...)* @foo1(i32 %conv) nounwind
Cameron Zwarich0a006152011-03-16 20:15:44 +000027 ret void
28}
29
Chad Rosier5def9652011-05-20 17:49:39 +000030; 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
Cameron Zwarichebe81732011-03-16 22:20:18 +000040define 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()