summaryrefslogtreecommitdiff
path: root/test/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll
blob: 18121634dd9ba71d5f782707c90be8cf10ef732e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; This testcase, which was distilled from a HUGE function, causes problems
; because both the source and the destination of the %Y cast are converted
; to a new type, which causes massive problems.

; RUN: llvm-upgrade < %s | llvm-as | opt -raise -raise-start-inst=W

int **%test(sbyte **%S) {
BB0:
   br label %Loop

Loop:
   %X = phi sbyte* [null , %BB0], [%Z, %Loop]

   %Y = cast sbyte *%X to sbyte **
   %Z = load sbyte** %Y
   br bool true, label %Loop, label %Out

Out:
  %W = cast sbyte** %Y to int**
  ret int** %W
}