152 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s2; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s3@a = global float 3.000000e+00, align 44@b = global float 4.000000e+00, align 45@c = global double 3.000000e+00, align 86@d = global double 4.000000e+00, align 87 8; Function Attrs: nounwind9define float @emit_xsaddsp() {10entry:11 %0 = load float, ptr @a, align 412 %1 = load float, ptr @b, align 413 %add = fadd float %0, %114 ret float %add15; CHECK-LABEL: @emit_xsaddsp16; CHECK: xsaddsp {{[0-9]+}}17}18 19; Function Attrs: nounwind20define float @emit_xssubsp() {21entry:22 %0 = load float, ptr @a, align 423 %1 = load float, ptr @b, align 424 %sub = fsub float %0, %125 ret float %sub26; CHECK-LABEL: @emit_xssubsp27; CHECK: xssubsp {{[0-9]+}}28}29 30; Function Attrs: nounwind31define float @emit_xsdivsp() {32entry:33 %0 = load float, ptr @a, align 434 %1 = load float, ptr @b, align 435 %div = fdiv float %0, %136 ret float %div37; CHECK-LABEL: @emit_xsdivsp38; CHECK: xsdivsp {{[0-9]+}}39}40 41; Function Attrs: nounwind42define float @emit_xsmulsp() {43entry:44 %0 = load float, ptr @a, align 445 %1 = load float, ptr @b, align 446 %mul = fmul float %0, %147 ret float %mul48; CHECK-LABEL: @emit_xsmulsp49; CHECK: xsmulsp {{[0-9]+}}50}51 52; Function Attrs: nounwind53define float @emit_xssqrtsp() {54entry:55 %0 = load float, ptr @b, align 456 %call = call float @sqrtf(float %0)57 ret float %call58; CHECK-LABEL: @emit_xssqrtsp59; CHECK: xssqrtsp {{[0-9]+}}60}61 62; Function Attrs: nounwind63declare float @sqrtf(float)64 65; Function Attrs: nounwind66define double @emit_xsadddp() {67entry:68 %0 = load double, ptr @c, align 869 %1 = load double, ptr @d, align 870 %add = fadd double %0, %171 ret double %add72; CHECK-LABEL: @emit_xsadddp73; CHECK: xsadddp {{[0-9]+}}74}75 76; Function Attrs: nounwind77define double @emit_xssubdp() {78entry:79 %0 = load double, ptr @c, align 880 %1 = load double, ptr @d, align 881 %sub = fsub double %0, %182 ret double %sub83; CHECK-LABEL: @emit_xssubdp84; CHECK: xssubdp {{[0-9]+}}85}86 87; Function Attrs: nounwind88define double @emit_xsdivdp() {89entry:90 %0 = load double, ptr @c, align 891 %1 = load double, ptr @d, align 892 %div = fdiv double %0, %193 ret double %div94; CHECK-LABEL: @emit_xsdivdp95; CHECK: xsdivdp {{[0-9]+}}96}97 98; Function Attrs: nounwind99define double @emit_xsmuldp() {100entry:101 %0 = load double, ptr @c, align 8102 %1 = load double, ptr @d, align 8103 %mul = fmul double %0, %1104 ret double %mul105; CHECK-LABEL: @emit_xsmuldp106; CHECK: xsmuldp {{[0-9]+}}107}108 109; Function Attrs: nounwind110define double @emit_xssqrtdp() {111entry:112 %0 = load double, ptr @d, align 8113 %call = call double @sqrt(double %0)114 ret double %call115; CHECK-LABEL: @emit_xssqrtdp116; CHECK: xssqrtdp {{[0-9]+}}117}118 119; Vector forms120; Function Attrs: nounwind121define <4 x float> @emit_xvrsqrtesp() {122entry:123; CHECK-LABEL: @emit_xvrsqrtesp124 %vf = alloca <4 x float>, align 16125 %vfr = alloca <4 x float>, align 16126 %0 = load <4 x float>, ptr %vf, align 16127 %call = call <4 x float> @llvm.ppc.vsx.xvrsqrtesp(<4 x float> %0)128; CHECK: xvrsqrtesp {{[0-9]+}}, {{[0-9]+}}129 ret <4 x float> %call130}131 132; Function Attrs: nounwind133define <2 x double> @emit_xvrsqrtedp() {134entry:135; CHECK-LABEL: @emit_xvrsqrtedp136 %vd = alloca <2 x double>, align 16137 %vdr = alloca <2 x double>, align 16138 %0 = load <2 x double>, ptr %vd, align 16139 %call = call <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double> %0)140 ret <2 x double> %call141; CHECK: xvrsqrtedp {{[0-9]+}}, {{[0-9]+}}142}143 144; Function Attrs: nounwind145declare double @sqrt(double)146 147; Function Attrs: nounwind readnone148declare <4 x float> @llvm.ppc.vsx.xvrsqrtesp(<4 x float>)149 150; Function Attrs: nounwind readnone151declare <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double>)152