Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'.
[oota-llvm.git] / test / Transforms / LevelRaise / 2002-05-23-MissedRaise.ll
1 ; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
2
3 %FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
4
5 uint %addfile(%FILE* %f) {
6         %cast255 = cast %FILE* %f to sbyte*
7
8         ; Addreses a ubyte member in memory...
9         %reg2421 = getelementptr sbyte* %cast255, long 24
10
11         ; Loads the ubyte
12         %reg130 = load sbyte* %reg2421
13
14         ; Error, cast cannot convert the source operand to ubyte because then
15         ; the sign extension would not be performed.  Need to insert a cast.
16         ;
17         %cast250 = cast sbyte %reg130 to uint  ; This is a sign extension instruction
18         ret uint %cast250
19 }