1; RUN: opt %loadPolly -basic-aa -polly-detect < %s
2
3; Used to fail with:
4; ../../isl/isl_aff.c:591: position out of bounds
5
6target 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-S128"
7
8declare double @frexp(double)
9
10define void @vorbis_lsp_to_curve(float* %lsp, i32 %m) {
11entry:
12  %q.1.reg2mem = alloca float, align 4
13  br i1 undef, label %do.body, label %while.end
14
15do.body:                                          ; preds = %do.body, %entry
16  %ftmp.0 = phi float* [ %add.ptr, %do.body ], [ %lsp, %entry ]
17  %add.ptr = getelementptr inbounds float, float* %ftmp.0, i64 2
18  br i1 true, label %do.end, label %do.body
19
20do.end:                                           ; preds = %do.body
21  br i1 false, label %if.end.single_exit, label %if.then
22
23if.then:                                          ; preds = %do.end
24  %0 = load float, float* %add.ptr, align 4
25  store float %0, float* %q.1.reg2mem, align 4
26  br label %if.end.single_exit
27
28if.end.single_exit:                               ; preds = %do.end, %if.then
29  br label %if.end
30
31if.end:                                           ; preds = %if.end.single_exit
32  %q.1.reload = load float, float* %q.1.reg2mem, align 4
33  %conv31 = fpext float %q.1.reload to double
34  %call32 = call double @frexp(double %conv31)
35  unreachable
36
37while.end:                                        ; preds = %entry
38  ret void
39}
40