<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Vivek,<div class=""><br class=""></div><div class="">Thanks for bringing that topic up.</div><div class=""><br class=""></div><div class="">We have the exact same problem to bring-up GlobalISel and we try to push the LLVM technology forward to have some infrastructure to tackle this problem.</div><div class="">Concretely, alongside doing what Hal is suggesting, we are pushing to generate test cases from the target description. Moreover, we are working on pairing llvm-stress with some fuzzing capabilities to achieve more ISel coverage.</div><div class=""><br class=""></div><div class="">For now, the test generation we are pushing aims at validating that our tablegen backend does what we tell it to do, but longer term we want to generate broader tests and ultimately this framework would tell us what support we miss and generate tests for it.</div><div class=""><br class=""></div><div class="">One problem that I don’t see how to fix automatically is that the generated tests would match whatever target description was written, thus, if the description is wrong, we are not testing the right thing and if something is handled by C++ code we don’t see it either. In particular, the interaction with the legalizer gets interesting!</div><div class=""><br class=""></div><div class="">Anyway, we are still far from that but if you want to contribute to that goal, I encourage you to do so :).</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">-Quentin</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Feb 1, 2017, at 5:35 PM, Hal Finkel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class=""><p class="">Hi Vivek,</p><p class="">We don't have a fool-proof way to do this. I recommend that you
      look at the llvm-stress tool. Run through the regression tests in
      test/CodeGen/Generic. Also, if you can fully self host (including
      libc++, etc.) that's a good sign.</p><p class=""> -Hal<br class="">
    </p>
    <br class="">
    <div class="moz-cite-prefix">On 02/01/2017 10:58 AM, vivek pandya
      via llvm-dev wrote:<br class="">
    </div>
    <blockquote cite="mid:CAHYgpo+eVw5_67XkA-zyKdqmRhRS4=Btvmqn61_pZ+59DSjmJQ@mail.gmail.com" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
      <div dir="ltr" class=""><span style="font-size:13px" class="">Hello LLVM Devs,</span>
        <div style="font-size:13px" class=""><br class="">
        </div>
        <div style="font-size:13px" class="">I have a question regarding porting
          a new target to LLVM backend.</div>
        <div style="font-size:13px" class="">When we write a llvm backend for any
          new architecture then how can we verify that each type of
          instructions are being generated i.e particular pattern is not
          missing or not handled properly, every possible addressing
          modes are getting generated etc ?</div>
        <div style="font-size:13px" class=""><br class="">
        </div>
        <div style="font-size:13px" class="">One way is that generally
          architecture developer team should provide set of benchmarks
          that can cover complete set of instructions for one compiler
          other than LLVM  but have you ever heard about any tool to
          check so? Or what is the industry standard practice that you
          guys follow or know?</div>
        <div style="font-size:13px" class=""><br class="">
        </div>
        <div style="font-size:13px" class="">For a tool very natural idea is
          write a script which does string processing to find unique
          instructions generated over a given benchmark. But Will it be
          possible to write tool which is generic enough to take LLVM's
          target description files as input and then perform certain
          check over generated assembly ?</div>
        <div style="font-size:13px" class=""><br class="">
        </div>
        <div style="font-size:13px" class="">Sincerely,</div>
        <div style="font-size:13px" class="">Vivek</div>
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </div>

_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>