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 pr30843.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr30843.s > pr30843.ll
6 ; ModuleID = 'pr30843.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 @dacP98FillRGBMap(i8* %pBuffer) nounwind uwtable {
14 for.cond: ; preds = %for.inc, %entry
15 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
16 %dw1.0 = mul i64 %indvar, 16843009
17 %tmp2 = mul i64 %indvar, 32
18 %tmp3 = add i64 %tmp2, 24
19 %scevgep = getelementptr i8* %pBuffer, i64 %tmp3
20 %incdec.ptr9 = bitcast i8* %scevgep to i64*
21 %tmp5 = add i64 %tmp2, 16
22 %scevgep6 = getelementptr i8* %pBuffer, i64 %tmp5
23 %incdec.ptr6 = bitcast i8* %scevgep6 to i64*
24 %tmp8 = add i64 %tmp2, 8
25 %scevgep9 = getelementptr i8* %pBuffer, i64 %tmp8
26 %incdec.ptr = bitcast i8* %scevgep9 to i64*
27 %scevgep11 = getelementptr i8* %pBuffer, i64 %tmp2
28 %pdw.0 = bitcast i8* %scevgep11 to i64*
29 %exitcond = icmp eq i64 %indvar, 256
30 br i1 %exitcond, label %for.end, label %for.body
32 for.body: ; preds = %for.cond
33 store i64 %dw1.0, i64* %pdw.0, align 8
34 store i64 %dw1.0, i64* %incdec.ptr, align 8
35 store i64 %dw1.0, i64* %incdec.ptr6, align 8
36 store i64 %dw1.0, i64* %incdec.ptr9, align 8
39 for.inc: ; preds = %for.body
40 %indvar.next = add i64 %indvar, 1
43 for.end: ; preds = %for.cond