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 pr33953.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr33953.s > pr33953.ll
6 ; ModuleID = 'pr33953.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 void @blockmove_NtoN_blend_noremap32(i32* %srcdata, i32 %srcwidth, i32 %srcheight, i32 %srcmodulo, i32* %dstdata, i32 %dstmodulo, i32 %srcshift) nounwind uwtable {
14 while.cond: ; preds = %while.end, %entry
15 %dstdata.addr.0 = phi i32* [ %dstdata, %entry ], [ %dstdata.addr.1.lcssa, %while.end ]
16 %srcdata.addr.0 = phi i32* [ %srcdata, %entry ], [ %srcdata.addr.1.lcssa, %while.end ]
17 %tobool = icmp eq i32 %srcheight, 0
18 br i1 %tobool, label %while.end78, label %while.body
20 while.body: ; preds = %while.cond
23 while.cond1: ; preds = %while.body4, %while.body
24 %indvar = phi i64 [ %indvar.next, %while.body4 ], [ 0, %while.body ]
25 %tmp = mul i64 %indvar, 8
26 %dstdata.addr.1 = getelementptr i32* %dstdata.addr.0, i64 %tmp
27 %tmp1 = add i64 %tmp, 7
28 %arrayidx71 = getelementptr i32* %dstdata.addr.0, i64 %tmp1
29 %tmp2 = add i64 %tmp, 6
30 %arrayidx62 = getelementptr i32* %dstdata.addr.0, i64 %tmp2
31 %tmp3 = add i64 %tmp, 5
32 %arrayidx53 = getelementptr i32* %dstdata.addr.0, i64 %tmp3
33 %tmp4 = add i64 %tmp, 4
34 %arrayidx44 = getelementptr i32* %dstdata.addr.0, i64 %tmp4
35 %tmp5 = add i64 %tmp, 3
36 %arrayidx35 = getelementptr i32* %dstdata.addr.0, i64 %tmp5
37 %tmp7 = add i64 %tmp, 2
38 %arrayidx26 = getelementptr i32* %dstdata.addr.0, i64 %tmp7
39 %tmp8 = add i64 %tmp, 1
40 %arrayidx17 = getelementptr i32* %dstdata.addr.0, i64 %tmp8
41 %srcdata.addr.1 = getelementptr i32* %srcdata.addr.0, i64 %tmp
42 %arrayidx66 = getelementptr i32* %srcdata.addr.0, i64 %tmp1
43 %arrayidx57 = getelementptr i32* %srcdata.addr.0, i64 %tmp2
44 %arrayidx48 = getelementptr i32* %srcdata.addr.0, i64 %tmp3
45 %arrayidx39 = getelementptr i32* %srcdata.addr.0, i64 %tmp4
46 %arrayidx30 = getelementptr i32* %srcdata.addr.0, i64 %tmp5
47 %arrayidx21 = getelementptr i32* %srcdata.addr.0, i64 %tmp7
48 %arrayidx12 = getelementptr i32* %srcdata.addr.0, i64 %tmp8
49 br i1 true, label %while.body4, label %while.end
51 while.body4: ; preds = %while.cond1
52 %tmp6 = load i32* %srcdata.addr.1, align 4
53 %shl = shl i32 %tmp6, %srcshift
54 %tmp10 = load i32* %dstdata.addr.1, align 4
55 %or = or i32 %tmp10, %shl
56 store i32 %or, i32* %dstdata.addr.1, align 4
57 %tmp13 = load i32* %arrayidx12, align 4
58 %shl15 = shl i32 %tmp13, %srcshift
59 %tmp18 = load i32* %arrayidx17, align 4
60 %or19 = or i32 %tmp18, %shl15
61 store i32 %or19, i32* %arrayidx17, align 4
62 %tmp22 = load i32* %arrayidx21, align 4
63 %shl24 = shl i32 %tmp22, %srcshift
64 %tmp27 = load i32* %arrayidx26, align 4
65 %or28 = or i32 %tmp27, %shl24
66 store i32 %or28, i32* %arrayidx26, align 4
67 %tmp31 = load i32* %arrayidx30, align 4
68 %shl33 = shl i32 %tmp31, %srcshift
69 %tmp36 = load i32* %arrayidx35, align 4
70 %or37 = or i32 %tmp36, %shl33
71 store i32 %or37, i32* %arrayidx35, align 4
72 %tmp40 = load i32* %arrayidx39, align 4
73 %shl42 = shl i32 %tmp40, %srcshift
74 %tmp45 = load i32* %arrayidx44, align 4
75 %or46 = or i32 %tmp45, %shl42
76 store i32 %or46, i32* %arrayidx44, align 4
77 %tmp49 = load i32* %arrayidx48, align 4
78 %shl51 = shl i32 %tmp49, %srcshift
79 %tmp54 = load i32* %arrayidx53, align 4
80 %or55 = or i32 %tmp54, %shl51
81 store i32 %or55, i32* %arrayidx53, align 4
82 %tmp58 = load i32* %arrayidx57, align 4
83 %shl60 = shl i32 %tmp58, %srcshift
84 %tmp63 = load i32* %arrayidx62, align 4
85 %or64 = or i32 %tmp63, %shl60
86 store i32 %or64, i32* %arrayidx62, align 4
87 %tmp67 = load i32* %arrayidx66, align 4
88 %shl69 = shl i32 %tmp67, %srcshift
89 %tmp72 = load i32* %arrayidx71, align 4
90 %or73 = or i32 %tmp72, %shl69
91 store i32 %or73, i32* %arrayidx71, align 4
92 %indvar.next = add i64 %indvar, 1
95 while.end: ; preds = %while.cond1
96 %srcdata.addr.1.lcssa = phi i32* [ %srcdata.addr.1, %while.cond1 ]
97 %dstdata.addr.1.lcssa = phi i32* [ %dstdata.addr.1, %while.cond1 ]
100 while.end78: ; preds = %while.cond