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 pr40238.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr40238.s > pr40238.ll
6 ; ModuleID = 'pr40238.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 define i32 @xgp_ahd_interpolate(i32 %tile) nounwind uwtable {
12 %p = alloca [4 x i32], align 16
13 switch i32 %tile, label %sw.default [
24 sw.default: ; preds = %entry
27 sw.bb: ; preds = %sw.default, %entry, %entry
28 %arrayidx = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
29 store i32 0, i32* %arrayidx, align 16
30 %arrayidx1 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 1
31 store i32 1, i32* %arrayidx1, align 4
32 %arrayidx2 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 2
33 store i32 2, i32* %arrayidx2, align 8
34 %arrayidx3 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 3
35 store i32 3, i32* %arrayidx3, align 4
38 sw.bb4: ; preds = %entry, %entry
39 %arrayidx5 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
40 store i32 1, i32* %arrayidx5, align 16
41 %arrayidx6 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 1
42 store i32 0, i32* %arrayidx6, align 4
43 %arrayidx7 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 2
44 store i32 3, i32* %arrayidx7, align 8
45 %arrayidx8 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 3
46 store i32 2, i32* %arrayidx8, align 4
49 sw.bb9: ; preds = %entry, %entry
50 %arrayidx10 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
51 store i32 3, i32* %arrayidx10, align 16
52 %arrayidx11 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 1
53 store i32 2, i32* %arrayidx11, align 4
54 %arrayidx12 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 2
55 store i32 1, i32* %arrayidx12, align 8
56 %arrayidx13 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 3
57 store i32 0, i32* %arrayidx13, align 4
60 sw.bb14: ; preds = %entry, %entry
61 %arrayidx15 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
62 store i32 2, i32* %arrayidx15, align 16
63 %arrayidx16 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 1
64 store i32 3, i32* %arrayidx16, align 4
65 %arrayidx17 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 2
66 store i32 0, i32* %arrayidx17, align 8
67 %arrayidx18 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 3
68 store i32 1, i32* %arrayidx18, align 4
71 sw.epilog: ; preds = %sw.bb14, %sw.bb9, %sw.bb4, %sw.bb
72 %arraydecay = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
73 %call = call i32 @xdo_rb_ctr_row(i32* %arraydecay) nounwind
74 %arraydecay19 = getelementptr inbounds [4 x i32]* %p, i64 0, i64 0
75 %call20 = call i32 @xdo_rb_ctr_row(i32* %arraydecay19) nounwind
79 declare i32 @xdo_rb_ctr_row(i32*)