summaryrefslogtreecommitdiff
path: root/test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll
blob: 59a4248d5a8af9235f100c802c2275144c7bb641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; XFAIL: *
; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast

%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
}