summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_test_checks.py
Commit message (Collapse)AuthorAgeFilesLines
* [UpdateTestChecks] Remove unnecessary return from add_ir_checksSimon Pilgrim2018-04-051-1/+1
| | | | llvm-svn: 329262
* Fix LLVM IR check lines in utils/update_cc_test_checks.pyFangrui Song2018-03-141-1/+1
| | | | | | | | | | Reviewers: arichardson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44400 llvm-svn: 327538
* [utils] Refactor utils/update_{,llc_}test_checks.py to share more codeFangrui Song2018-02-101-127/+4
| | | | | | | | | | | | | | Summary: This revision refactors 1. parser 2. CHECK line adder of utils/update_{,llc_}test_checks.py so that thir functionality can be re-used by other utility scripts (e.g. D42712) Reviewers: asb, craig.topper, RKSimon, echristo Subscribers: llvm-commits, spatel Differential Revision: https://reviews.llvm.org/D42805 llvm-svn: 324803
* [utils] De-duplicate utils/update_{llc_,}test_checks.pyFangrui Song2018-01-301-70/+16
| | | | | | | | Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42654 llvm-svn: 323718
* [utils] remove ability to generate llc check lines from update_test_checks.pySanjay Patel2017-06-121-69/+27
| | | | | | | | | The dream of a unified check-line auto-generator for all phases of compilation is dead. The llc script has already diverged to be better at its goal, so having 2 scripts that do almost the same thing just causes confusion. Now, this script will only work with opt to produce check lines for IR transforms. llvm-svn: 305208
* Update update_test_checks so that . is a valid identifier character in ↵Daniel Berlin2017-01-151-1/+1
| | | | | | addition to _ llvm-svn: 292056
* [utils] Improve extraction of check prefixes from RUN linesNikolai Bozhenov2017-01-141-3/+3
| | | | | | | | | | | | Correct handling of the following FileCheck options is implemented in update_llc_test_checks.py and update_test_checks.py scripts: 1) -check-prefix (with a single dash) 2) -check-prefixes (with multiple prefixes) Differential Revision: https://reviews.llvm.org/D28572 llvm-svn: 292008
* Fix update_test_checks not to accidentally believe type names are variable namesDaniel Berlin2017-01-131-1/+1
| | | | llvm-svn: 291980
* Fix function regex in update_tests so it can handle {}'s in function argsDaniel Berlin2017-01-091-1/+1
| | | | llvm-svn: 291467
* Update update_test_checks to work properly with phi nodes and other fun things.Daniel Berlin2017-01-071-23/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, phi nodes were never considered defs, and so we ended up with undefined variables for any loop. Now, instead of trying to find just defs, we iterate over each actual IR value in the line, and replace them one by one with either a definition or a use. We also don't try to match anything in the comment portions of the line. I've tested it even on things like function pointer calls, etc, and against existing test cases uses update_test_checks With this change, we are able to use update_tests on the cyclic cases in newgvn. The only case i'm aware of that will misfire is if you have a string with which contains a valid token. However, this is the same as it is now, with a slightly larger set of strings that may misfire. Prior to this change, a test with the string " %a =" would be replaced. Reviewers: spatel, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28384 llvm-svn: 291357
* Fix indentation in r290716.Bryant Wong2016-12-291-4/+4
| | | | | | Use two-space indentation like the rest of the file. llvm-svn: 290722
* Correctly handle multi-lined RUN lines.Bryant Wong2016-12-291-1/+8
| | | | | | | | | | `utils/update_{llc_test,test}_checks` ought to be able to handle RUN commands that span multiple lines, as shown in the example at http://llvm.org/docs/CommandGuide/FileCheck.html#the-filecheck-check-prefix-option Differential Revision: https://reviews.llvm.org/D26523 llvm-svn: 290716
* Fix `update_test_checks.py` bug that incorrectly truncates IR body.Bryant Wong2016-12-251-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D26619 llvm-svn: 290529
* [X86][AVX512] Add support for masked shuffle commentsSimon Pilgrim2016-07-031-1/+1
| | | | | | | | | | This patch adds support for including the avx512 mask register information in the mask/maskz versions of shuffle instruction comments. This initial version just adds support for MOVDDUP/MOVSHDUP/MOVSLDUP to reduce the mass of test regenerations, other shuffle instructions can be added in due course. Differential Revision: http://reviews.llvm.org/D21953 llvm-svn: 274459
* [X86] Updated test checks script to generalise LCPI symbol refsSimon Pilgrim2016-06-111-0/+3
| | | | | | | | The script now replace '.LCPI888_8' style asm symbols with the {{\.LCPI.*}} re pattern - this helps stop hardcoded symbols in 32-bit x86 tests changing with every edit of the file Refreshed some tests to demonstrate the new check llvm-svn: 272488
* fixed to discard earlier advertisingSanjay Patel2016-04-051-3/+4
| | | | | | | Also, hardcode (there must be a better way...) the 'utils' dir in the advertisement, so it's easier to find. llvm-svn: 265444
* add example usage and workflow to --help outputSanjay Patel2016-04-051-2/+25
| | | | llvm-svn: 265430
* check or check-next the first line of the function tooSanjay Patel2016-04-051-5/+15
| | | | | | | | | | | | | | | | We could make this an option if people don't like it. But since part of the reason for using a script to generate checks is to prevent lazy checking that lets bugs crawl through, let's have the script check the first line too. For asm tests, it ensures that nothing unexpected has happened before the first line of asm. This matches the existing behavior of update_llc_test_checks.py. More discussion in PR22897: https://llvm.org/bugs/show_bug.cgi?id=22897 llvm-svn: 265414
* workaround for an IR variable named %.Sanjay Patel2016-03-271-0/+2
| | | | | | (which SimplifyCFG can produce...) llvm-svn: 264543
* add scrubber for excessive leading whitespaceSanjay Patel2016-03-271-0/+3
| | | | llvm-svn: 264542
* fix IR function name regex to allow hyphensSanjay Patel2016-03-251-2/+2
| | | | llvm-svn: 264422
* Add utility script to generate checks for opt or llc regression testsSanjay Patel2016-03-241-0/+355
This is an enhancement of the existing update_llc_test_checks.py script. It adds some of the functionality from the script used in D17999 to make the IR checking more flexible. The bad news: This actually is 'My First Python Program'. Thus, it's likely that I have violated all best practices of Python programming if I've made a functional change from the original program. If you see anything that's obviously wrong, please let me know or feel free to fix it. I didn't even read any documentation... The good news: I tested this on ~10 existing opt/llc regression tests, and it does what I hoped for. It produces exact checking for IR regression tests and doesn't signficantly change the existing llc-with-x86-target asm checking. The opt tests that were modified in r263667, r263668, r263674, and r263679 are examples of the expected results, except that this version of the script puts the check lines ahead of the IR to follow the existing llc/asm behavior. If there are no complaints/fallout, we should be able to remove the original script. Extending this script to be used for non-x86 and clang regression tests would be the expected follow-up steps. llvm-svn: 264357
OpenPOWER on IntegriCloud