Chad Rosier | 5def965 | 2011-05-20 17:49:39 +0000 | [diff] [blame] | 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 |
Cameron Zwarich | 0a00615 | 2011-03-16 20:15:44 +0000 | [diff] [blame] | 3 | |
Chad Rosier | 5def965 | 2011-05-20 17:49:39 +0000 | [diff] [blame] | 4 | ; X64: @bar1 |
| 5 | ; X64: movzbl |
| 6 | ; X64: jmp |
| 7 | ; WIN64: @bar1 |
| 8 | ; WIN64: movzbl |
| 9 | ; WIN64: callq |
Cameron Zwarich | 0a00615 | 2011-03-16 20:15:44 +0000 | [diff] [blame] | 10 | define void @bar1(i1 zeroext %v1) nounwind ssp { |
| 11 | entry: |
| 12 | %conv = zext i1 %v1 to i32 |
Cameron Zwarich | ebe8173 | 2011-03-16 22:20:18 +0000 | [diff] [blame] | 13 | %call = tail call i32 (...)* @foo1(i32 %conv) nounwind |
Cameron Zwarich | 0a00615 | 2011-03-16 20:15:44 +0000 | [diff] [blame] | 14 | ret void |
| 15 | } |
| 16 | |
Chad Rosier | 5def965 | 2011-05-20 17:49:39 +0000 | [diff] [blame] | 17 | ; X64: @bar2 |
| 18 | ; X64-NOT: movzbl |
| 19 | ; X64: jmp |
| 20 | ; WIN64: @bar2 |
| 21 | ; WIN64-NOT: movzbl |
| 22 | ; WIN64: callq |
Cameron Zwarich | 0a00615 | 2011-03-16 20:15:44 +0000 | [diff] [blame] | 23 | define void @bar2(i8 zeroext %v1) nounwind ssp { |
| 24 | entry: |
| 25 | %conv = zext i8 %v1 to i32 |
Cameron Zwarich | ebe8173 | 2011-03-16 22:20:18 +0000 | [diff] [blame] | 26 | %call = tail call i32 (...)* @foo1(i32 %conv) nounwind |
Cameron Zwarich | 0a00615 | 2011-03-16 20:15:44 +0000 | [diff] [blame] | 27 | ret void |
| 28 | } |
| 29 | |
Chad Rosier | 5def965 | 2011-05-20 17:49:39 +0000 | [diff] [blame] | 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 |
Cameron Zwarich | ebe8173 | 2011-03-16 22:20:18 +0000 | [diff] [blame] | 40 | define zeroext i1 @bar3() nounwind ssp { |
| 41 | entry: |
| 42 | %call = call i1 @foo2() nounwind |
| 43 | ret i1 %call |
| 44 | } |
| 45 | |
| 46 | declare i32 @foo1(...) |
| 47 | declare zeroext i1 @foo2() |