2004-11-06 20:38:27 +00:00
|
|
|
; XFAIL: *
|
2003-09-16 15:29:54 +00:00
|
|
|
; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
|
2002-05-23 18:51:27 +00:00
|
|
|
|
|
|
|
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
|
|
|
|
|
|
|
|
uint %addfile(%FILE* %f) {
|
2002-11-04 06:16:13 +00:00
|
|
|
%cast255 = cast %FILE* %f to sbyte*
|
|
|
|
|
|
|
|
; Addreses a ubyte member in memory...
|
|
|
|
%reg2421 = getelementptr sbyte* %cast255, long 24
|
|
|
|
|
|
|
|
; Loads the ubyte
|
|
|
|
%reg130 = load sbyte* %reg2421
|
|
|
|
|
|
|
|
; Error, cast cannot convert the source operand to ubyte because then
|
|
|
|
; the sign extension would not be performed. Need to insert a cast.
|
|
|
|
;
|
|
|
|
%cast250 = cast sbyte %reg130 to uint ; This is a sign extension instruction
|
2002-05-23 18:51:27 +00:00
|
|
|
ret uint %cast250
|
|
|
|
}
|