diff options
author | Roman Tereshin <rtereshin@apple.com> | 2019-10-14 22:01:58 +0000 |
---|---|---|
committer | Roman Tereshin <rtereshin@apple.com> | 2019-10-14 22:01:58 +0000 |
commit | 044297ccbfcfb4339c56d65afaf877b83486f17a (patch) | |
tree | b367fe440795d1495fb06fd759970c7c8d999bb8 /llvm/utils/update_mir_test_checks.py | |
parent | 1f40f15d54aac06421448b6de131231d2d78bc75 (diff) | |
download | bcm5719-llvm-044297ccbfcfb4339c56d65afaf877b83486f17a.tar.gz bcm5719-llvm-044297ccbfcfb4339c56d65afaf877b83486f17a.zip |
[update_mir_test_checks] Handle MI flags properly
previously we would generate literal check lines w/ no reg-exps for
vregs as MI flags (nsw, ninf, etc.) won't be recognized as a part of MI.
Fixing that. Includes updating the MIR tests that suffered from the
problem.
Reviewed By: bogner
Differential Revision: https://reviews.llvm.org/D68905
llvm-svn: 374829
Diffstat (limited to 'llvm/utils/update_mir_test_checks.py')
-rwxr-xr-x | llvm/utils/update_mir_test_checks.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/utils/update_mir_test_checks.py b/llvm/utils/update_mir_test_checks.py index 83199c8a6b3..e6c16718059 100755 --- a/llvm/utils/update_mir_test_checks.py +++ b/llvm/utils/update_mir_test_checks.py @@ -33,9 +33,12 @@ MIR_FUNC_NAME_RE = re.compile(r' *name: *(?P<func>[A-Za-z0-9_.-]+)') MIR_BODY_BEGIN_RE = re.compile(r' *body: *\|') MIR_BASIC_BLOCK_RE = re.compile(r' *bb\.[0-9]+.*:$') VREG_RE = re.compile(r'(%[0-9]+)(?::[a-z0-9_]+)?(?:\([<>a-z0-9 ]+\))?') +MI_FLAGS_STR= ( + r'(frame-setup |frame-destroy |nnan |ninf |nsz |arcp |contract |afn ' + r'|reassoc |nuw |nsw |exact |fpexcept )*') VREG_DEF_RE = re.compile( - r'^ *(?P<vregs>{0}(?:, {0})*) ' - r'= (?P<opcode>[A-Zt][A-Za-z0-9_]+)'.format(VREG_RE.pattern)) + r'^ *(?P<vregs>{0}(?:, {0})*) = ' + r'{1}(?P<opcode>[A-Zt][A-Za-z0-9_]+)'.format(VREG_RE.pattern, MI_FLAGS_STR)) MIR_PREFIX_DATA_RE = re.compile(r'^ *(;|bb.[0-9].*: *$|[a-z]+:( |$)|$)') IR_FUNC_NAME_RE = re.compile( |