Skip to content

Commit b565126

Browse files
committed
Revert "update_test_checks: keep meta variables stable by default"
This reverts commit fb02f9a. Looks like some Python version incompatibility, will investigate.
1 parent 66bd3cd commit b565126

File tree

9 files changed

+43
-554
lines changed

9 files changed

+43
-554
lines changed

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values.ll.expected

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
define i32 @func({i32, i32} %x, i32 %y) {
1010
; CHECK-LABEL: define i32 @func(
1111
; CHECK-SAME: { i32, i32 } [[X:%.*]], i32 [[Y:%.*]]) {
12-
; CHECK-NEXT: [[X_I33:%.*]] = extractvalue { i32, i32 } [[X]], 0
13-
; CHECK-NEXT: [[TMP3:%.*]] = add i32 [[Y]], 1
14-
; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[X_I33]], [[TMP3]]
15-
; CHECK-NEXT: [[TMP2:%.*]] = mul i32 [[TMP1]], 3
16-
; CHECK-NEXT: ret i32 [[TMP2]]
12+
; CHECK-NEXT: [[X_I34:%.*]] = extractvalue { i32, i32 } [[X]], 0
13+
; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[Y]], 1
14+
; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[X_I34]], [[TMP1]]
15+
; CHECK-NEXT: [[TMP3:%.*]] = mul i32 [[TMP2]], 3
16+
; CHECK-NEXT: ret i32 [[TMP3]]
1717
;
1818
%x.i34 = extractvalue {i32, i32} %x, 0
1919
%1 = add i32 %y, 1

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values.ll.expected.reset

Lines changed: 0 additions & 23 deletions
This file was deleted.

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values2.ll.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ define i32 @func(i32 %x) {
55
; CHECK-LABEL: define i32 @func(
66
; CHECK-SAME: i32 [[X:%.*]]) {
77
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[X]], 0
8-
; CHECK-NEXT: [[TMP6:%.*]] = call i32 @foo(i1 [[TMP1]])
9-
; CHECK-NEXT: [[TMP7:%.*]] = icmp eq i32 [[X]], 2
10-
; CHECK-NEXT: [[TMP8:%.*]] = call i32 @foo(i1 [[TMP7]])
11-
; CHECK-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
12-
; CHECK-NEXT: [[TMP10:%.*]] = select i1 [[TMP9]], i32 [[TMP8]], i32 [[TMP6]]
13-
; CHECK-NEXT: ret i32 [[TMP10]]
8+
; CHECK-NEXT: [[TMP2:%.*]] = call i32 @foo(i1 [[TMP1]])
9+
; CHECK-NEXT: [[TMP3:%.*]] = icmp eq i32 [[X]], 2
10+
; CHECK-NEXT: [[TMP4:%.*]] = call i32 @foo(i1 [[TMP3]])
11+
; CHECK-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
12+
; CHECK-NEXT: [[TMP6:%.*]] = select i1 [[TMP5]], i32 [[TMP4]], i32 [[TMP2]]
13+
; CHECK-NEXT: ret i32 [[TMP6]]
1414
;
1515
%1 = icmp eq i32 %x, 0
1616
%2 = call i32 @foo(i1 %1)

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values3.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
22
; RUN: opt < %s -S | FileCheck %s
33

4+
; Test that we don't regress diff quality by trying to keep variable names
5+
; stable (and messing up the matching).
6+
47
define i32 @func(i32 %x) {
58
; CHECK-LABEL: define i32 @func(
69
; CHECK-SAME: i32 [[X:%.*]]) {

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values3.ll.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
22
; RUN: opt < %s -S | FileCheck %s
33

4+
; Test that we don't regress diff quality by trying to keep variable names
5+
; stable (and messing up the matching).
6+
47
define i32 @func(i32 %x) {
58
; CHECK-LABEL: define i32 @func(
69
; CHECK-SAME: i32 [[X:%.*]]) {

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/stable_ir_values4.ll.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ define i32 @func(i32 %x) {
1515
; CHECK-NEXT: [[TMP6:%.*]] = call i32 @foo(i32 [[TMP5]])
1616
; CHECK-NEXT: [[TMP7:%.*]] = call i32 @foo(i32 [[TMP6]])
1717
; CHECK-NEXT: [[TMP8:%.*]] = xor i32 [[TMP7]], 1
18-
; CHECK-NEXT: [[TMP13:%.*]] = call i32 @foo(i32 [[TMP8]])
19-
; CHECK-NEXT: [[TMP9:%.*]] = add i32 [[TMP13]], 1
20-
; CHECK-NEXT: [[TMP10:%.*]] = call i32 @foo(i32 [[TMP9]])
18+
; CHECK-NEXT: [[TMP9:%.*]] = call i32 @foo(i32 [[TMP8]])
19+
; CHECK-NEXT: [[TMP10:%.*]] = add i32 [[TMP9]], 1
2120
; CHECK-NEXT: [[TMP11:%.*]] = call i32 @foo(i32 [[TMP10]])
2221
; CHECK-NEXT: [[TMP12:%.*]] = call i32 @foo(i32 [[TMP11]])
23-
; CHECK-NEXT: ret i32 [[TMP12]]
22+
; CHECK-NEXT: [[TMP13:%.*]] = call i32 @foo(i32 [[TMP12]])
23+
; CHECK-NEXT: ret i32 [[TMP13]]
2424
;
2525
%1 = mul i32 %x, 3
2626
%2 = call i32 @foo(i32 %1)
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
# RUN: cp -f %S/Inputs/stable_ir_values.ll %t.ll && %update_test_checks %t.ll
22
# RUN: diff -u %t.ll %S/Inputs/stable_ir_values.ll.expected
3-
# Now test that we can reset all the names
4-
# RUN: %update_test_checks %t.ll --reset-variable-names
5-
# RUN: diff -u %t.ll %S/Inputs/stable_ir_values.ll.expected.reset

0 commit comments

Comments
 (0)