2011-03-16 20:15:44 +00:00
|
|
|
; RUN: llc < %s -march=x86-64 | FileCheck %s
|
|
|
|
|
|
|
|
; CHECK: @bar1
|
2011-04-14 01:46:37 +00:00
|
|
|
; CHECK: movzbl
|
2011-03-16 20:15:44 +00:00
|
|
|
; CHECK: callq
|
|
|
|
define void @bar1(i1 zeroext %v1) nounwind ssp {
|
|
|
|
entry:
|
|
|
|
%conv = zext i1 %v1 to i32
|
2011-03-16 22:20:18 +00:00
|
|
|
%call = tail call i32 (...)* @foo1(i32 %conv) nounwind
|
2011-03-16 20:15:44 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: @bar2
|
2011-04-14 01:46:37 +00:00
|
|
|
; CHECK-NOT: movzbl
|
2011-03-16 20:15:44 +00:00
|
|
|
; CHECK: callq
|
|
|
|
define void @bar2(i8 zeroext %v1) nounwind ssp {
|
|
|
|
entry:
|
|
|
|
%conv = zext i8 %v1 to i32
|
2011-03-16 22:20:18 +00:00
|
|
|
%call = tail call i32 (...)* @foo1(i32 %conv) nounwind
|
2011-03-16 20:15:44 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2011-03-16 22:20:18 +00:00
|
|
|
; CHECK: @bar3
|
|
|
|
; CHECK: callq
|
2011-04-14 01:46:37 +00:00
|
|
|
; CHECK-NOT: movzbl
|
2011-03-16 22:20:18 +00:00
|
|
|
; CHECK-NOT: and
|
|
|
|
; CHECK: ret
|
|
|
|
define zeroext i1 @bar3() nounwind ssp {
|
|
|
|
entry:
|
|
|
|
%call = call i1 @foo2() nounwind
|
|
|
|
ret i1 %call
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @foo1(...)
|
|
|
|
declare zeroext i1 @foo2()
|