Dan Gohman | 28beeea | 2007-08-15 13:36:28 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movzx | count 1 |
| 2 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep movsx | count 1 |
Chris Lattner | e4e4913 | 2005-12-14 19:24:08 +0000 | [diff] [blame] | 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 | } |