<div dir="ltr">Sure. Sounds good.<div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 1, 2015 at 2:07 PM Nemanja Ivanovic <<a href="mailto:nemanja.i.ibm@gmail.com">nemanja.i.ibm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">REPOSITORY<br>
  rL LLVM<br>
<br>
================<br>
Comment at: test/CodeGen/PowerPC/vsx-elementary-arith.ll:121-136<br>
@@ +120,18 @@<br>
+; Function Attrs: nounwind<br>
+define void @emit_xvrsqrte() #0 {<br>
+entry:<br>
+; CHECK-LABEL: @emit_xvrsqrte<br>
+  %vf = alloca <4 x float>, align 16<br>
+  %vfr = alloca <4 x float>, align 16<br>
+  %vd = alloca <2 x double>, align 16<br>
+  %vdr = alloca <2 x double>, align 16<br>
+  %0 = load <4 x float>, <4 x float>* %vf, align 16<br>
+  %1 = call <4 x float> @llvm.ppc.vsx.xvrsqrtesp(<4 x float> %0)<br>
+; CHECK: xvrsqrtesp {{[0-9]+}}, {{[0-9]+}}<br>
+  store <4 x float> %1, <4 x float>* %vfr, align 16<br>
+  %2 = load <2 x double>, <2 x double>* %vd, align 16<br>
+  %3 = call <2 x double> @llvm.ppc.vsx.xvrsqrtedp(<2 x double> %2)<br>
+; CHECK: xvrsqrtedp {{[0-9]+}}, {{[0-9]+}}<br>
+  store <2 x double> %3, <2 x double>* %vdr, align 16<br>
+  ret void<br>
+}<br>
----------------<br>
echristo wrote:<br>
> Hrm. I'd suggest running this through the optimizer but since it's just using locals that don't have external visibility it might not work. Though if the instruction selector ever does any DCE on allocas then there's going to be a problem here. Might want to have it take arguments and return something?<br>
OK, I'll split this up into two functions that return the result of the call to the builtin. Please let me know if you agree with that approach.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10874&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=maE5loYKrXY6ytWy06yfT_UfkXZbx3FykTcGea8hkgI&s=YnY5imK4MyHfdhJ4tnduLFVOsr526wPtmUZ_1Xa8smc&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10874</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=maE5loYKrXY6ytWy06yfT_UfkXZbx3FykTcGea8hkgI&s=mn01bhkboqfN0_C-oYoy9550KOE8z1WyUIqALJD_qN4&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>