<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 2:19 PM, Sanjay Patel <span dir="ltr"><<a href="mailto:spatel@rotateright.com" target="_blank">spatel@rotateright.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>It's sparse. :)<br></div>If you have suggestions for where the following should go, let me know or feel free to add to the appropriate docs.<br><br>I've been invoking it like this:<br>utils $ ./update_test_checks.py --tool=../../build/bin/opt ../test/Transforms/InstCombine/zero-point-zero-add.ll<br><br></div><div>Ie, the script lives under 'llvm/utils', my local copies of opt and llc live in the usual build dir, and you point the script at some regression test(s) under 'llvm/test'.<br><br>Note: "update_test_checks.py" is supposed to subsume 
"update_llc_test_checks.py", but I have not removed the original script from trunk out of 
fear that the new script may have bugs for x86 llc that don't exist in the original.<br><br></div>AFAIK, the best description of the intended workflow comes from Chandler's initial commit message for the original script:<br><div><div><div><div><div><a href="http://reviews.llvm.org/rL225618" target="_blank">http://reviews.llvm.org/rL225618</a></div></div></div></div></div></div></blockquote><div><br></div><div>Ah!</div><div><br></div><div>Between this email and chandler's commit message there seems to be pretty much what I wanted!</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><br></div><div><br></div><div>I should probably paraphrase that into the help comments for the script itself.</div></div></div></div></div></div></blockquote><div><br></div><div>Perfect, thanks!</div><div><br class="">-- Sean Silva <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div> That help text should also be updated to note that 'llc' is the default for --tool-binary:<br></div><div><br>$ ./utils/update_test_checks.py --help<br>usage: update_test_checks.py [-h] [-v] [--tool-binary TOOL_BINARY]<br>                             [--function FUNCTION]<br>                             tests [tests ...]<br><br>A test case update script. This script is a utility to update LLVM opt or llc<br>test cases with new FileCheck patterns. It can either update all of the tests<br>in the file or a single test function.<br><br>positional arguments:<br>  tests<br><br>optional arguments:<br>  -h, --help            show this help message and exit<br>  -v, --verbose         Show verbose output<br>  --tool-binary TOOL_BINARY<br>                        The tool used to generate the test case<br>  --function FUNCTION   The function in the test file to update<br><br></div></div></div></div></div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 2:32 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Do we have any documentation for this script? It would be nice to have some examples for how to use it.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 11:01 AM, Sanjay Patel via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: spatel<br>
Date: Fri Mar 25 13:01:23 2016<br>
New Revision: 264431<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=264431&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=264431&view=rev</a><br>
Log:<br>
[InstCombine] use FileCheck for better checking<br>
<br>
(testing script for autogeneration of check lines)<br>
<br>
<br>
Modified:<br>
    llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll<br>
<br>
Modified: llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll?rev=264431&r1=264430&r2=264431&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll?rev=264431&r1=264430&r2=264431&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll (original)<br>
+++ llvm/trunk/test/Transforms/InstCombine/zero-point-zero-add.ll Fri Mar 25 13:01:23 2016<br>
@@ -1,14 +1,23 @@<br>
-; RUN: opt < %s -instcombine -S | grep 0.0 | count 1<br>
+; NOTE: Assertions have been autogenerated by update_test_checks.py<br>
+; RUN: opt < %s -instcombine -S | FileCheck %s<br>
<br>
 declare double @abs(double)<br>
<br>
 define double @test(double %X) {<br>
+; CHECK-LABEL: @test(<br>
+; CHECK:         [[Y:%.*]] = fadd double %X, 0.000000e+00<br>
+; CHECK-NEXT:    ret double [[Y]]<br>
+;<br>
   %Y = fadd double %X, 0.0          ;; Should be a single add x, 0.0<br>
   %Z = fadd double %Y, 0.0<br>
   ret double %Z<br>
 }<br>
<br>
 define double @test1(double %X) {<br>
+; CHECK-LABEL: @test1(<br>
+; CHECK:         [[Y:%.*]] = call double @abs(double %X)<br>
+; CHECK-NEXT:    ret double [[Y]]<br>
+;<br>
   %Y = call double @abs(double %X)<br>
   %Z = fadd double %Y, 0.0<br>
   ret double %Z<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>