<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/8/2016 10:01 AM, Jim Lewis via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:1AF78BDE-29E7-4E2F-B12B-D37A8C3C05A8@knupath.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<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:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:Calibri;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:Calibri;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">I’m looking
into problems with the function DAGCombiner::MatchBSwapHWord
and had a couple questions on how to proceed (I’m new here,
and to llvm). It looks like there was never any test
coverage for this code, and it doesn’t match the patterns it
claims to be looking for. I found a fix for this in our
fork, but the fix is even worse in that it matches a whole
bunch of invalid patterns as well as the canonical patterns.
I have simple test cases that break both the existing code
and our local fix.</span></p>
</div>
</blockquote>
<br>
Are you sure there isn't any test coverage? As far as I can tell,
the tests from <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/rL133503">https://reviews.llvm.org/rL133503</a> are still in the
tree.<br>
<br>
<blockquote
cite="mid:1AF78BDE-29E7-4E2F-B12B-D37A8C3C05A8@knupath.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">I see
equivalent matching code upstream in
InstCombiner::MatchBSwap() (InstCombineAndOrXor.cpp), but
not an easy way to re-use it AFAICT. Questions:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--Is this
functionality even worth fixing in DAGCombiner (ie, what is
the probability that this complex pattern would re-emerge in
codegen after the InstCombiner transform, weighed against
the obviously error-prone nature of the matching code)?</span></p>
</div>
</blockquote>
<br>
I don't think there is any existing code to match this particular
pattern in instcombine. I guess it wouldn't be hard to add, though.<br>
<br>
-Eli<br>
<pre class="moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</body>
</html>