<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/9/2016 11:03 AM, Jim Lewis via
      llvm-dev wrote:<br>
    </div>
    <blockquote
      cite="mid:87BC2DDF-4C9D-463A-B587-19BEC9AC4222@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:"Courier New";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        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-size:10.0pt;}
@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" style="text-autospace:none"><span
            style="font-size:11.0pt">Thanks, that helps enormously! The
            issue is that the match is supposed to support both cascade
            and tree OR patterns, but there appears to be a problem with
            the tree matching. Both test1 and test6 in the ARM tests
            exercise the cascade pattern, and I remember now our fix is
            confined to the tree case.<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt"> <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt">I hesitate to claim now that
            there’s no coverage for the tree pattern, but it is failing
            to match the patterns we use in our tests, one of which
            looks like this:<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt"> <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">define i32
            @test_tree(i32 %x) {</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt">     </span><span
            style="font-size:11.0pt;font-family:Courier">%byte0 = and
            i32 %x, 255        ; 0x000000ff</span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %byte1 = and
            i32 %x, 65280      ; 0x0000ff00</span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %byte2 = and
            i32 %x, 16711680   ; 0x00ff0000</span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %byte3 = and
            i32 %x, 4278190080 ; 0xff000000</span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier"> </span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %tmp0 = shl 
            i32 %byte0, 8</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %tmp1 = lshr
            i32 %byte1, 8</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %tmp2 = shl 
            i32 %byte2, 8</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %tmp3 = lshr
            i32 %byte3, 8</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier"> </span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %or0 = or i32
            %tmp0, %tmp1</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %or1 = or i32
            %tmp2, %tmp3</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier"> </span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  %result = or
            i32 %or0, %or1</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">  ret i32
            %result</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt;font-family:Courier">}</span><span
            style="font-size:11.0pt"><o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt"> <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt">I’m still investigating exactly how
            it’s failing on this one; let me know if I’m missing
            something else here.<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-size:11.0pt"> </span><br>
        </p>
      </div>
    </blockquote>
    <br>
    Oh, I see... yes, the existing tree matching logic is complete
    nonsense.  It somehow manages to completely ignore N1, which is
    where half the value is supposed to come from.<br>
    <br>
    -Eli<br>
    <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>