1; RUN: llc < %s | FileCheck %s 2target datalayout = "E-m:e-i64:64-n32:64" 3target triple = "powerpc64-bgq-linux" 4 5; Function Attrs: norecurse nounwind readonly 6define <4 x double> @foo(double* nocapture readonly %a) #0 { 7entry: 8 %0 = load double, double* %a, align 8 9 %vecinit.i = insertelement <4 x double> undef, double %0, i32 0 10 %shuffle.i = shufflevector <4 x double> %vecinit.i, <4 x double> undef, <4 x i32> zeroinitializer 11 ret <4 x double> %shuffle.i 12 13; CHECK-LABEL: @foo 14; CHECK: lfd 1, 0(3) 15; CHECK: blr 16} 17 18define <4 x double> @foox(double* nocapture readonly %a, i64 %idx) #0 { 19entry: 20 %p = getelementptr double, double* %a, i64 %idx 21 %0 = load double, double* %p, align 8 22 %vecinit.i = insertelement <4 x double> undef, double %0, i32 0 23 %shuffle.i = shufflevector <4 x double> %vecinit.i, <4 x double> undef, <4 x i32> zeroinitializer 24 ret <4 x double> %shuffle.i 25 26; CHECK-LABEL: @foox 27; CHECK: sldi [[REG1:[0-9]+]], 4, 3 28; CHECK: lfdx 1, 3, [[REG1]] 29; CHECK: blr 30} 31 32define <4 x double> @fooxu(double* nocapture readonly %a, i64 %idx, double** %pptr) #0 { 33entry: 34 %p = getelementptr double, double* %a, i64 %idx 35 %0 = load double, double* %p, align 8 36 %vecinit.i = insertelement <4 x double> undef, double %0, i32 0 37 %shuffle.i = shufflevector <4 x double> %vecinit.i, <4 x double> undef, <4 x i32> zeroinitializer 38 store double* %p, double** %pptr, align 8 39 ret <4 x double> %shuffle.i 40 41; CHECK-LABEL: @foox 42; CHECK: sldi [[REG1:[0-9]+]], 4, 3 43; CHECK: lfdux 1, 3, [[REG1]] 44; CHECK: std 3, 0(5) 45; CHECK: blr 46} 47 48define <4 x float> @foof(float* nocapture readonly %a) #0 { 49entry: 50 %0 = load float, float* %a, align 4 51 %vecinit.i = insertelement <4 x float> undef, float %0, i32 0 52 %shuffle.i = shufflevector <4 x float> %vecinit.i, <4 x float> undef, <4 x i32> zeroinitializer 53 ret <4 x float> %shuffle.i 54 55; CHECK-LABEL: @foof 56; CHECK: lfs 1, 0(3) 57; CHECK: blr 58} 59 60define <4 x float> @foofx(float* nocapture readonly %a, i64 %idx) #0 { 61entry: 62 %p = getelementptr float, float* %a, i64 %idx 63 %0 = load float, float* %p, align 4 64 %vecinit.i = insertelement <4 x float> undef, float %0, i32 0 65 %shuffle.i = shufflevector <4 x float> %vecinit.i, <4 x float> undef, <4 x i32> zeroinitializer 66 ret <4 x float> %shuffle.i 67 68; CHECK-LABEL: @foofx 69; CHECK: sldi [[REG1:[0-9]+]], 4, 2 70; CHECK: lfsx 1, 3, [[REG1]] 71; CHECK: blr 72} 73 74attributes #0 = { norecurse nounwind readonly "target-cpu"="a2q" "target-features"="+qpx,-altivec,-bpermd,-crypto,-direct-move,-extdiv,-power8-vector,-vsx" } 75 76