b6c9ecbf47a4057a5022e26da76705db2459cb85
[oota-llvm.git] / test / CodeGen / X86 / 20090313-signext.ll
1 ; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=pic > %t
2 ; RUN: grep {movswl     %ax, %edi} %t
3 ; RUN: grep {movw       (%rax), %ax} %t
4
5 @x = common global i16 0
6
7 define signext i16 @f() nounwind {
8 entry:
9         %0 = tail call signext i16 @h() nounwind
10         %1 = sext i16 %0 to i32
11         tail call void @g(i32 %1) nounwind
12         %2 = load i16* @x, align 2
13         ret i16 %2
14 }
15
16 declare signext i16 @h()
17
18 declare void @g(i32)