1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add testcase for raise opportunity missed.

llvm-svn: 2930
This commit is contained in:
Chris Lattner 2002-07-16 19:10:00 +00:00
parent c599f5fc93
commit a2c9351030

View File

@ -0,0 +1,25 @@
; This case fails raise because the store requires that it's argument is of a
; particular type, but the gep is unable to propogate types backwards through
; it, because it doesn't know what type to ask it's operand to be.
;
; This could be fixed by making all stores add themselves to a list, and check
; their arguments are consistent AFTER all other values are propogated.
; RUN: if as < %s | opt -raise | dis | grep '= cast'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
void %reverse(%Tree %t) {
bb0: ;[#uses=0]
%cast219 = cast %Tree %t to sbyte*** ; <sbyte***> [#uses=2]
%reg2221 = getelementptr sbyte*** %cast219, uint 6 ; <sbyte***> [#uses=1]
%reg108 = load sbyte*** %reg2221 ; <sbyte**> [#uses=2]
%reg247 = getelementptr sbyte*** %cast219, uint 5 ; <sbyte***> [#uses=1]
store sbyte** %reg108, sbyte*** %reg247
ret void
}