1; RUN: opt %loadPolly -basic-aa -polly-codegen -polly-vectorizer=polly \ 2; RUN: -polly-invariant-load-hoisting=true -dce -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 double] zeroinitializer, align 16 7 8define void @simple_vec_const() nounwind { 9bb: 10 br label %bb1 11 12bb1: ; preds = %bb3, %bb 13 %indvar = phi i64 [ %indvar.next, %bb3 ], [ 0, %bb ] 14 %scevgep = getelementptr [1024 x double], [1024 x double]* @B, i64 0, i64 %indvar 15 %exitcond = icmp ne i64 %indvar, 4 16 br i1 %exitcond, label %bb2, label %bb4 17 18bb2: ; preds = %bb1 19 %tmp = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i64 0, i64 0), align 16 20 %tmp2 = fpext float %tmp to double 21 store double %tmp2, double* %scevgep, align 4 22 br label %bb3 23 24bb3: ; preds = %bb2 25 %indvar.next = add i64 %indvar, 1 26 br label %bb1 27 28bb4: ; preds = %bb1 29 ret void 30} 31 32; CHECK: %.load = load float, float* getelementptr inbounds ([1024 x float], [1024 x float]* @A, i32 0, i32 0) 33 34; CHECK: polly.stmt.bb2: ; preds = %polly.start 35; CHECK: %tmp_p.splatinsert = insertelement <4 x float> undef, float %.load, i32 0 36; CHECK: %tmp_p.splat = shufflevector <4 x float> %tmp_p.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer 37; CHECK: %0 = fpext <4 x float> %tmp_p.splat to <4 x double> 38; CHECK: store <4 x double> %0, <4 x double>* 39