<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><font size="-1">Built LLVM 8.0.1 for debug using
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.</font></p>
    <p><font size="-1">Put together a sequence using
        clang/utils/check_cfc on the compile list using the same compile
        parameters except for the -g and -o options that check_cfc
        provides.</font></p>
    <p><font size="-1">2506 files were successfully processed by
        check_cfc out of a total of 2833.</font></p>
    <p><font size="-1">Three was the maximum number of differences
        obtained with the possibly interesting types here.<br>
        <br>
        4 of this type.<br>
      </font><tt>- push  + sh  %r</tt><tt><br>
      </tt><tt>- mov   + v   %r</tt><tt><br>
      </tt><tt>- sub   + b   $0</tt><font size="-1"><br>
        <br>
        3 of this type.<br>
      </font><tt>- pq 66 + v   -0</tt><tt><br>
      </tt><tt>- v  -0 + v   %r</tt><tt><br>
      </tt><tt>- v  %r + llq 6d</tt><font size="-1"><br>
        <br>
        1 each of these types.<br>
      </font><tt>- pq ef + pq  ea</tt><tt><br>
      </tt><tt>- pq 68 + a   -0</tt><tt><br>
      </tt><tt>- a  -0 + llq 6c</tt><tt><br>
      </tt><tt><br>
      </tt><tt>- pq 3a + vb  $0</tt><tt><br>
      </tt><tt>- vb $0 + a   -0</tt><tt><br>
      </tt><tt>- a  -0 + v   %r</tt><tt><br>
      </tt><tt><br>
      </tt><tt>- jmpq  + mov</tt><tt><br>
      </tt><tt>- mov   + and</tt><tt><br>
      </tt><tt>- and   + mov</tt><font size="-1"><br>
      </font></p>
    <p><font size="-1">Regards, Neil Nelson<br>
      </font></p>
    <div class="moz-cite-prefix"><font size="-1">On 7/24/19 4:41 AM,
        Greg Bedwell via llvm-dev wrote:<br>
      </font></div>
    <blockquote type="cite"
cite="mid:CANWqj-v4YZV42+9FH0tS8AhynAJ5WTDHoCq5WMad_MkT_rNN3A@mail.gmail.com"><font
        size="-1">
      </font>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><font size="-1"><br>
          </font></div>
        <font size="-1"><br>
        </font>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr"><font size="-1">On Wed, 24
              Jul 2019 at 10:52, Oliver Stannard via llvm-dev <<a
                href="mailto:llvm-dev@lists.llvm.org"
                moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
              wrote:<br>
            </font></div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="ltr"><font size="-1">Your script looks OK, though
                you won't want to use the -opt-bisect-limit= option
                until you've found a case where code-generation changes.
                Instead, that's a tool which you could use to narrow
                down the pass inside LLVM which is causing the change.</font>
              <div><font size="-1"><br>
                </font></div>
              <div><font size="-1">The problem is that your input code
                  is far too simple to trigger any interesting
                  optimisations. I'd suggest starting with either some
                  code from the LLVM test suite (<a
                    href="https://github.com/llvm/llvm-test-suite"
                    target="_blank" moz-do-not-send="true">https://github.com/llvm/llvm-test-suite</a>),
                  or some code generated by csmith (<a
                    href="https://embed.cs.utah.edu/csmith/"
                    target="_blank" moz-do-not-send="true">https://embed.cs.utah.edu/csmith/</a>).
                  The former has the advantage of being (mostly) real
                  code people actually write, and the latter can
                  generate a large amount of complex code without any
                  external dependencies (so it's easy to build).</font></div>
              <div><font size="-1"><br>
                </font></div>
            </div>
          </blockquote>
          <div><font size="-1"><br>
            </font></div>
          <div><font size="-1">A few other things to note:</font></div>
          <div><font size="-1"><br>
            </font></div>
          <div><font size="-1">There's a tool in clang here ( <a
href="https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc"
                moz-do-not-send="true">https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc</a> )
              called check_cfc which uses the same basic idea as the
              script above.  It's designed to transparently wrap clang
              invocations so that any differences in codegen will
              actually trigger a build failure.  There are a few more
              details in these slides ( <a
href="https://llvm.org/devmtg/2015-04/slides/Verifying_code_gen_dash_g_final.pdf"
                moz-do-not-send="true">https://llvm.org/devmtg/2015-04/slides/Verifying_code_gen_dash_g_final.pdf</a> ). 
              Ultimately it doesn't matter which tools you use in order
              to find bugs, but you may find it useful.</font></div>
          <div><font size="-1"><br>
            </font></div>
          <div><font size="-1">We've got a meta-bug here to which we've
              been attaching already-reported bugs in this area ( <a
                href="https://bugs.llvm.org/show_bug.cgi?id=37728"
                moz-do-not-send="true">https://bugs.llvm.org/show_bug.cgi?id=37728</a> )
              which might be a nice place to start so that you can try
              replicating the results.  In particular <a
                href="https://bugs.llvm.org/show_bug.cgi?id=42138"
                moz-do-not-send="true">https://bugs.llvm.org/show_bug.cgi?id=42138</a> is
              a bug that one of our interns found recently using the
              check_cfc script with llvm test-suite (and then reducing
              with creduce).  Unfortunately it was right at the end of
              his internship so he didn't get a chance to try and fix
              it. It might be a good starting point to have a go at
              replicating the failure and then trying to figure out
              what's happening and fixing it (assuming that it's still
              present).  I'm sure that there are plenty of people in the
              community willing to help out with any specific issues you
              run into along the way.</font></div>
          <div><font size="-1"><br>
            </font></div>
          <div><font size="-1">Good luck, with whichever approach you
              take!</font></div>
          <div><font size="-1"><br>
            </font></div>
          <div><font size="-1">-Greg</font></div>
          <div><font size="-1"><br>
            </font></div>
        </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>