mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-22 23:31:32 +00:00
12ff96854d
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17514 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
609 B
LLVM
21 lines
609 B
LLVM
; XFAIL: *
|
|
; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
|
|
|
|
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
|
|
|
|
uint %addfile(%FILE* %f) {
|
|
%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
|
|
ret uint %cast250
|
|
}
|