Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / CodeGen / X86 / extend.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movzx | wc -l | grep 1
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movsx | wc -l | grep 1
3
4 %G1 = internal global ubyte 0           ; <ubyte*> [#uses=1]
5 %G2 = internal global sbyte 0           ; <sbyte*> [#uses=1]
6
7 implementation   ; Functions:
8
9 short %test1() {  ;; one zext
10         %tmp.0 = load ubyte* %G1                ; <ubyte> [#uses=1]
11         %tmp.3 = cast ubyte %tmp.0 to short             ; <short> [#uses=1]
12         ret short %tmp.3
13 }
14
15 short %test2() {  ;; one sext
16         %tmp.0 = load sbyte* %G2                ; <sbyte> [#uses=1]
17         %tmp.3 = cast sbyte %tmp.0 to short             ; <short> [#uses=1]
18         ret short %tmp.3
19 }