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