<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Venkat.,</p>
<p>thanks for adding the support for libmvec!</p>
<p>Is there a pass or something similar to replace calls to
intrinsics that already operate on vector operands with calls to
libmvec? <br>
</p>
<p>inject-tli-mappings seems to add the attributes only to scalar
calls to intrinsics such as llvm.exp and the loop-vectorizer then
might vectorize these calls. <br>
</p>
<p>In my use case, I'm getting vectorized calls to LLVM intrinsics
from MLIR and would like to replace those with calls to libmvec,
but as the code is already vectorized, the LoopVectorizer does not
do these replacements. <br>
</p>
<p>So for example, in the LLVM IR generated from MLIR, there is a
call such as:</p>
<p>%103 = fmul <4 x double> %102, <double -5.000000e-01,
double -5.000000e-01, double -5.000000e-01, double
-5.000000e-01><br>
%104 = tail call <4 x double> @llvm.exp.v4f64(<4 x
double> %103)</p>
<p>I would like to have a pass replace the call to llvm.exp.v4f64
with a call @_ZGVdN4v_exp(<4 x double>), whose declaration
is inserted by inject-tli-mappings.</p>
<p>Are you aware of such a pass or another way to achieve this
behavior?</p>
<p>Thanks in advance,</p>
<p>Lukas<br>
</p>
<pre class="moz-signature" cols="72">Lukas Sommer, M.Sc.
TU Darmstadt
Embedded Systems and Applications Group (ESA)
Hochschulstr. 10, 64289 Darmstadt, Germany
Phone: +49 6151 1622429
<a class="moz-txt-link-abbreviated" href="http://www.esa.informatik.tu-darmstadt.de">www.esa.informatik.tu-darmstadt.de</a></pre>
<div class="moz-cite-prefix">On 23.09.20 17:11, Venkataramanan Kumar
via llvm-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAF_C6=SX1NrmYCaDJXVmaoL_=yRqK7wpf0Tv_7f_4U-YQvy4Ag@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
<div>Hi Florian and Alexandre, </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 15 Sep 2020 at
19:30, Alexandre Bique <<a
href="mailto:bique.alexandre@gmail.com"
moz-do-not-send="true">bique.alexandre@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">On Tue, Sep 15, 2020 at
3:58 PM Venkataramanan Kumar<br>
<<a href="mailto:venkataramanan.kumar.llvm@gmail.com"
target="_blank" moz-do-not-send="true">venkataramanan.kumar.llvm@gmail.com</a>>
wrote:<br>
> I have not yet started the patch work.<br>
><br>
> Collected information about the ABI for the routines.
To start with I am thinking of supporting
pow/lib/exp/sin/cos/log routines till VF 8 which are non
masked variants in the initial patch.<br>
> I will try to send the patch early next week.<br>
<br>
Great, let me know if you need help or don't have time to
look at it.<br>
</blockquote>
<div><br>
</div>
<div>I made a patch and submitted it here. </div>
<div><a href="https://reviews.llvm.org/D88154"
moz-do-not-send="true">https://reviews.llvm.org/D88154</a><br>
</div>
<div><br>
</div>
<div>regards,</div>
<div>venkat.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Alexandre<br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</body>
</html>