1; RUN: opt -S -ipsccp < %s | FileCheck %s
2target datalayout = "E-m:e-i64:64-n32:64"
3target triple = "powerpc64-bgq-linux"
4
5define void @test(i32 signext %n) {
6
7; CHECK-LABEL: @test
8
9entry:
10  br i1 undef, label %if.then, label %if.end
11
12if.then:                                          ; preds = %entry
13  ret void
14
15if.end:                                           ; preds = %entry
16  br i1 undef, label %if.then2, label %if.end4
17
18if.then2:                                         ; preds = %if.end
19  unreachable
20
21if.end4:                                          ; preds = %if.end
22  %sub.n = select i1 undef, i32 undef, i32 %n
23  switch i32 %sub.n, label %if.else14 [
24    i32 0, label %if.then9
25    i32 1, label %if.then12
26  ]
27
28if.then9:                                         ; preds = %if.end4
29  unreachable
30
31if.then12:                                        ; preds = %if.end4
32  unreachable
33
34if.else14:                                        ; preds = %if.end4
35  br label %do.body
36
37do.body:                                          ; preds = %do.body, %if.else14
38  %scale.0 = phi ppc_fp128 [ 0xM3FF00000000000000000000000000000, %if.else14 ], [ %scale.0, %do.body ]
39  br i1 undef, label %do.body, label %if.then33
40
41if.then33:                                        ; preds = %do.body
42  br i1 undef, label %_ZN5boost4math4signIgEEiRKT_.exit30, label %cond.false.i28
43
44cond.false.i28:                                   ; preds = %if.then33
45  %0 = bitcast ppc_fp128 %scale.0 to i128
46  %tobool.i26 = icmp slt i128 %0, 0
47  br label %_ZN5boost4math4signIgEEiRKT_.exit30
48
49_ZN5boost4math4signIgEEiRKT_.exit30:              ; preds = %cond.false.i28, %if.then33
50  unreachable
51}
52
53