Skip to content

Commit 90ad689

Browse files
authored
[AutoDiff][test] Enable some previously XFAIL'ed tests (#84915)
In #84704, some tests were XFAIL'ed since they've become failing. The root cause of failures is lack of ownership info on the 2nd run of AutoDiff closure specialization pass. Ownership info is required for the pass run after #84704, so at the moment only the 1st run of the pass is effective. Several test cases still remain passing because for some cases we are lucky and all the inlining required for specialization is done before the 1st pass run. This patch enables such test cases back so we have at least some test coverage.
1 parent b1774aa commit 90ad689

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

test/AutoDiff/validation-test/closure_specialization/multi_bb_no_bte.swift

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@
1111
// RUN: %target-run %t/opt.out
1212

1313
// RUN: %target-swift-frontend -emit-sil %s -O -o %t/out.sil
14-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK1
15-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK2
16-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK3
17-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
1814

19-
// TODO: re-enable this test once we have OSSA throughout the pipeline
20-
// XFAIL: *
15+
// TODO: Re-enable these tests once we have OSSA throughout the pipeline.
16+
// AutoDiff Closure Specialization pass runs twice, but at the second
17+
// run we currently do not perform any transformation because ownership
18+
// eliminator is run before. Disabled tests below rely on the second
19+
// pass run performing transformation, so they currently fail.
20+
// https://github.com/swiftlang/swift/issues/84920
21+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK1
22+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK2
23+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK3
24+
25+
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
2126

2227
import DifferentiationUnittest
2328
import StdlibUnittest

test/AutoDiff/validation-test/closure_specialization/single_bb2.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@
1111
// RUN: %target-run %t/opt.out
1212

1313
// RUN: %target-swift-frontend -emit-sil %s -O -o %t/out.sil
14-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
15-
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK5
1614

17-
// TODO: re-enable this test once we have OSSA throughout the pipeline
18-
// XFAIL: *
15+
// TODO: Re-enable these tests once we have OSSA throughout the pipeline.
16+
// AutoDiff Closure Specialization pass runs twice, but at the second
17+
// run we currently do not perform any transformation because ownership
18+
// eliminator is run before. Disabled tests below rely on the second
19+
// pass run performing transformation, so they currently fail.
20+
// https://github.com/swiftlang/swift/issues/84920
21+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
22+
23+
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK5
1924

2025
import DifferentiationUnittest
2126
import StdlibUnittest

0 commit comments

Comments
 (0)