<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thanks! That’s the information I was looking for.<o:p></o:p></p>
<p class="MsoNormal">(I should probably have searched Bugzilla before asking, but did not consider that there would be a tracking ticket for this.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/Björn<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Sanjay Patel <spatel@rotateright.com> <br>
<b>Sent:</b> den 4 maj 2021 17:40<br>
<b>To:</b> Björn Pettersson A <bjorn.a.pettersson@ericsson.com><br>
<b>Cc:</b> llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [llvm-dev] What is the status regarding min/max intrinsics?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">We're getting closer to canonicalizing to the intrinsics...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">But there are still some missing optimizations (mostly in instcombine I think) that we are hoping to address to reduce the chance of regressions:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is the most current view of what's left:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://protect2.fireeye.com/v1/url?k=76eaed62-2971d421-76eaadf9-861fcb972bfc-86120ef2147243d4&q=1&e=9a685f40-a59c-44c4-b6e7-242740966e6b&u=https%3A%2F%2Freviews.llvm.org%2FD98152" target="_blank">https://reviews.llvm.org/D98152</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">We've also been tracking the work with:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://protect2.fireeye.com/v1/url?k=3009013b-6f923878-300941a0-861fcb972bfc-3d5c7dc1e9443079&q=1&e=9a685f40-a59c-44c4-b6e7-242740966e6b&u=https%3A%2F%2Fllvm.org%2FPR46915">https://llvm.org/PR46915</a>
<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, May 4, 2021 at 4:59 AM Björn Pettersson A via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">The llvm.smin, llvm.smax, llvm.umin and llvm.umax intrinsics were<br>
introduced quite some time ago.<br>
<br>
As far as I known we still don't canonicalize IR to use those<br>
intrinsics (but I suppose that is the end goal), nor do we<br>
canonicalize by doing a reverse transform into a select.<br>
<br>
Are there any known limitations in support for the min/max intrinsics<br>
that prevents us from using them or trying to canonicalize IR into<br>
using the intrinsics?<br>
(and if so, shouldn't we canonicalize into a select-pattern if that<br>
form still is "better")<br>
<br>
Main reason for asking is that I'd like to know if it is safe<br>
to simplify clang/opt to use the min/max intrinsics directly<br>
instead of emitting a select-kind-of-pattern. Or is it a huge risk<br>
that I end up with regressions due to optimizers not understanding<br>
the min/max intrinsics yet?<br>
<br>
Regards,<br>
Björn<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://protect2.fireeye.com/v1/url?k=39b675ac-662d4cef-39b63537-861fcb972bfc-4149570410d2a0ce&q=1&e=9a685f40-a59c-44c4-b6e7-242740966e6b&u=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>