<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Varun,<br>
<br>
Thanks for confirming that flang generates only calls to scalar routines and these are later converted to vector calls by changes in LLVM.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When you say vector routines are present in the Flang libraries, I am assuming that you meant to say the vector routines are present in the libpgmath library. My other question was whether there are<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"> calls
 to vector pgmath routines in libflang/libflangrti.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
--Kiran</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Varun Jayathirtha <vjayathirtha@nvidia.com><br>
<b>Sent:</b> 17 September 2019 18:31<br>
<b>To:</b> Kiran Chandramohan <Kiran.Chandramohan@arm.com>; flang-dev@lists.flang-compiler.org <flang-dev@lists.flang-compiler.org>; flang-dev@lists.llvm.org <flang-dev@lists.llvm.org><br>
<b>Subject:</b> RE: Usage of vector pgmath symbols in Flang</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.x_MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
p.x_msonormal0, li.x_msonormal0, div.x_msonormal0
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.x_EmailStyle18
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal">Hi Kiran,<br>
<br>
Vector pgmath routines are present in the Flang libraries, however the Flang front end only generates scalar pgmath calls.<br>
<br>
The LLVM vectorizer has been modified to recognize scalar pgmath calls and generate appropriate vector calls. Here’s the PR that introduced this change if you’re interested:<br>
<a href="https://github.com/flang-compiler/llvm/pull/43/files">https://github.com/flang-compiler/llvm/pull/43/files</a><br>
<br>
Regards,<br>
Varun Jayathirtha</p>
<p class="x_MsoNormal"> </p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b>From:</b> flang-dev <flang-dev-bounces@lists.flang-compiler.org>
<b>On Behalf Of </b>Kiran Chandramohan<br>
<b>Sent:</b> Friday, September 13, 2019 7:11 AM<br>
<b>To:</b> flang-dev@lists.flang-compiler.org; flang-dev@lists.llvm.org<br>
<b>Subject:</b> [Flang-dev] Usage of vector pgmath symbols in Flang</p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">Hi,<br>
<br>
Are vector pgmath symbols called directly in Flang? Are they directly used in the Flang libraries?</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">As far as I understand it is scalar pgmath symbols that are always generated by Flang and these are then converted to vector symbols by veclib in LLVM.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt; color:black"><br>
Thanks,<br>
Kiran</span></p>
</div>
<p class="x_MsoNormal">IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person,
 use it for any purpose, or store or copy the information in any medium. Thank you.
</p>
</div>
<div>
<hr>
</div>
<div>This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by
 reply email and destroy all copies of the original message. </div>
<div>
<hr>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.
</body>
</html>