1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 pr33866.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr33866.s > pr33866.ll
6 ; ModuleID = 'pr33866.s'
7 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"
8 target triple = "x86_64-unknown-linux-gnu"
10 %struct.fill_iter_info = type { i64* }
12 define void @test_select_fill_hyper_simple(i64* %offset) nounwind uwtable {
14 %start = alloca [2 x i64], align 16
15 %points = alloca [16 x [2 x i64]], align 16
16 %iter_info = alloca %struct.fill_iter_info, align 8
17 %tmp5 = getelementptr inbounds [16 x [2 x i64]]* %points, i64 0, i64 0, i64 0
18 %coords = getelementptr inbounds %struct.fill_iter_info* %iter_info, i64 0, i32 0
19 store i64* %tmp5, i64** %coords, align 8
22 for.cond: ; preds = %for.inc, %entry
23 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
24 %arrayidx18 = getelementptr [16 x [2 x i64]]* %points, i64 0, i64 %indvar, i64 1
25 %arrayidx9 = getelementptr [16 x [2 x i64]]* %points, i64 0, i64 %indvar, i64 0
26 %tmp = add i64 %indvar, 0
27 %tmp3 = add i64 %indvar, undef
28 %j.0 = trunc i64 %tmp3 to i32
29 %arrayidx = getelementptr inbounds [2 x i64]* %start, i64 0, i64 1
30 %tmp1 = load i64* %arrayidx, align 8
31 %conv = trunc i64 %tmp1 to i32
32 %cmp = icmp slt i32 %j.0, %conv
33 br i1 %cmp, label %for.body, label %for.end
35 for.body: ; preds = %for.cond
36 %arrayidx5 = getelementptr inbounds [2 x i64]* %start, i64 0, i64 0
37 %tmp6 = load i64* %arrayidx5, align 16
38 store i64 %tmp6, i64* %arrayidx9, align 16
39 %arrayidx12 = getelementptr inbounds [2 x i64]* %start, i64 0, i64 1
40 %tmp13 = load i64* %arrayidx12, align 8
41 %add14 = add i64 %tmp13, %tmp
42 store i64 %add14, i64* %arrayidx18, align 8
45 for.inc: ; preds = %for.body
46 %indvar.next = add i64 %indvar, 1
49 for.end: ; preds = %for.cond
50 %call = call i32 @H5Diterate(%struct.fill_iter_info* %iter_info) nounwind
54 declare i32 @H5Diterate(%struct.fill_iter_info*)