1; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
3target triple = "powerpc-montavista-linux-gnuspe"
4
5%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105 = type { i8, i8, i16, i8*, i8* }
6
7define fastcc void @test1(%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args) {
8entry:
9  br i1 undef, label %repeat, label %maxlen_reached
10
11repeat:                                           ; preds = %entry
12  switch i32 undef, label %sw.bb323 [
13    i32 77, label %sw.bb72
14    i32 111, label %sw.bb309
15    i32 80, label %sw.bb313
16    i32 117, label %sw.bb326
17    i32 88, label %sw.bb321
18  ]
19
20sw.bb72:                                          ; preds = %repeat
21  unreachable
22
23sw.bb309:                                         ; preds = %repeat
24  unreachable
25
26sw.bb313:                                         ; preds = %repeat
27  unreachable
28
29sw.bb321:                                         ; preds = %repeat
30  unreachable
31
32sw.bb323:                                         ; preds = %repeat
33  %0 = va_arg %struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args, i32
34  unreachable
35
36sw.bb326:                                         ; preds = %repeat
37  unreachable
38
39maxlen_reached:                                   ; preds = %entry
40  ret void
41}
42
43; If the SD nodes are not cleaup up correctly, then this can fail to compile
44; with an error like:  Cannot select: ch = setlt [ID=6]
45; CHECK: @test1
46
47