Skip to content

Commit 09d2076

Browse files
committed
[llvm] Fix update_analyze_test_checks and add a test to prevent further breakage
1 parent abda8d2 commit 09d2076

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; RUN: opt -passes='print<scalar-evolution>' < %s -disable-output 2>&1 | FileCheck %s
2+
3+
define i32 @basic(i32 %x, i32 %y) {
4+
%r = add i32 %x, %y
5+
ret i32 %r
6+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2+
; RUN: opt -passes='print<scalar-evolution>' < %s -disable-output 2>&1 | FileCheck %s
3+
4+
define i32 @basic(i32 %x, i32 %y) {
5+
; CHECK-LABEL: 'basic'
6+
; CHECK-NEXT: Classifying expressions for: @basic
7+
; CHECK-NEXT: %r = add i32 %x, %y
8+
; CHECK-NEXT: --> (%x + %y) U: full-set S: full-set
9+
; CHECK-NEXT: Determining loop execution counts for: @basic
10+
;
11+
%r = add i32 %x, %y
12+
ret i32 %r
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Basic test checking that update_analyze_test_checks.py works correctly
2+
# RUN: cp -f %S/Inputs/basic.ll %t.ll && %update_analyze_test_checks %t.ll
3+
# RUN: diff -u %t.ll %S/Inputs/basic.ll.expected
4+
## Check that running the script again does not change the result:
5+
# RUN: %update_analyze_test_checks %t.ll
6+
# RUN: diff -u %t.ll %S/Inputs/basic.ll.expected
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These tests require opt.
2+
if 'opt-binary' not in config.available_features:
3+
config.unsupported = True

llvm/utils/update_analyze_test_checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def main():
112112
run_list = prefix_list,
113113
flags = type('', (object,), {
114114
'verbose': args.verbose,
115+
'filters': args.filters,
115116
'function_signature': False,
116117
'check_attributes': False,
117118
'replace_value_regex': []}),

0 commit comments

Comments
 (0)