fix PR9017, a bug where we'd assert when promoting in unreachable
[oota-llvm.git] / test / Transforms / ScalarRepl / crash.ll
1 ; RUN: opt -scalarrepl %s -disable-output
2 ; RUN: opt -scalarrepl-ssa %s -disable-output
3
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
5 target triple = "x86_64-apple-darwin10.0.0"
6
7 ; PR9017
8 define void @test1() nounwind readnone ssp {
9 entry:
10   %l_72 = alloca i32*, align 8
11   unreachable
12
13 for.cond:                                         ; preds = %for.cond
14   %tmp1.i = load i32** %l_72, align 8
15   store i32* %tmp1.i, i32** %l_72, align 8
16   br label %for.cond
17
18 if.end:                                           ; No predecessors!
19   ret void
20 }