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 pr37730.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr37730.s > pr37730.ll
6 ; ModuleID = 'pr37730.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 @add_opush.formats = internal unnamed_addr constant [7 x i8] c"\01\02\03\04\05\06\FF", align 1
12 define void @add_opush() nounwind uwtable {
14 %formats1 = alloca [7 x i8], align 1
15 %dtds = alloca [7 x i8*], align 16
16 %dtd = alloca i8, align 1
17 %formats1.sub = getelementptr inbounds [7 x i8]* %formats1, i64 0, i64 0
18 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %formats1.sub, i8* getelementptr inbounds ([7 x i8]* @add_opush.formats, i64 0, i64 0), i64 7, i32 1, i1 false)
19 store i8 8, i8* %dtd, align 1
22 for.cond: ; preds = %for.inc, %entry
23 %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
24 %arrayidx = getelementptr [7 x i8*]* %dtds, i64 0, i64 %indvar
25 %exitcond = icmp ne i64 %indvar, 7
26 br i1 %exitcond, label %for.body, label %for.end
28 for.body: ; preds = %for.cond
29 store i8* %dtd, i8** %arrayidx, align 8
32 for.inc: ; preds = %for.body
33 %indvar.next = add i64 %indvar, 1
36 for.end: ; preds = %for.cond
37 %arraydecay = getelementptr inbounds [7 x i8*]* %dtds, i64 0, i64 0
38 %call = call i32 (...)* @sdp_seq_alloc(i8** %arraydecay) nounwind
42 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
44 declare i32 @sdp_seq_alloc(...)