1; RUN: opt %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly -dce \ 2; RUN: -polly-invariant-load-hoisting=true -S < %s | FileCheck %s 3target 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" 4 5@A = common global [1024 x float] zeroinitializer, align 16 6@B = common global [1024 x float**] zeroinitializer, align 16 7 8declare float** @foo(float) readnone 9 10define void @simple_vec_call() nounwind { 11entry: 12 br label %body 13 14body: 15 %indvar = phi i64 [ 0, %entry ], [ %indvar_next, %body ] 16 %scevgep = getelementptr [1024 x float**], [1024 x float**]* @B, i64 0, i64 %indvar 17 %value = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16 18 %result = tail call float** @foo(float %value) nounwind 19 store float** %result, float*** %scevgep, align 4 20 %indvar_next = add i64 %indvar, 1 21 %exitcond = icmp eq i64 %indvar_next, 4 22 br i1 %exitcond, label %return, label %body 23 24return: 25 ret void 26} 27 28; CHECK: [[RES1:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW:#[0-9]+]] 29; CHECK: [[RES2:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] 30; CHECK: [[RES3:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] 31; CHECK: [[RES4:%[a-zA-Z0-9_]+]] = tail call float** @foo(float %.load) [[NUW]] 32; CHECK: %0 = insertelement <4 x float**> undef, float** %p_result, i32 0 33; CHECK: %1 = insertelement <4 x float**> %0, float** %p_result1, i32 1 34; CHECK: %2 = insertelement <4 x float**> %1, float** %p_result2, i32 2 35; CHECK: %3 = insertelement <4 x float**> %2, float** %p_result3, i32 3 36; CHECK: store <4 x float**> %3, <4 x float**>* bitcast ([1024 x float**]* @B to <4 x float**>*), align 37; CHECK: attributes [[NUW]] = { nounwind } 38