<div dir="ltr">No, this doesn't deal with this. Should I start from the negate and push it down if it is transitively used by fma?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 22, 2018 at 9:38 AM, Sanjay Patel via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">spatel added a comment.<br>
<br>
Does this patch deal with the case if we negate the scalar before doing the splat?<br>
<br>
define <8 x float> @test7(float %a, <8 x float> %b, <8 x float> %c)  {<br>
<br>
  %t0 = fsub float -0.0, %a<br>
  %t1 = insertelement <8 x float> undef, float %t0, i32 0<br>
  %t2 = shufflevector <8 x float> %t1, <8 x float> undef, <8 x i32> zeroinitializer<br>
  %t3 = tail call <8 x float> @llvm.fma.v8f32(<8 x float> %t2, <8 x float> %b, <8 x float> %c)<br>
  ret <8 x float> %t3<br>
<br>
}<br>
<br>
That transform was suggested as a canonicalization in:<br>
<a href="https://bugs.llvm.org/show_bug.cgi?id=37463" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=37463</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D48467" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D48467</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>