Skip to content

Commit 7ffdba8

Browse files
committed
[AutoDiff][test] Enable some previously XFAIL'ed tests
In swiftlang#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 swiftlang#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 ccea096 commit 7ffdba8

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
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+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK1
21+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK2
22+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK3
23+
24+
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
2125

2226
import DifferentiationUnittest
2327
import StdlibUnittest

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
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+
// TODO: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK4
21+
22+
// RUN: cat %t/out.sil | %FileCheck %s --check-prefix=CHECK5
1923

2024
import DifferentiationUnittest
2125
import StdlibUnittest

0 commit comments

Comments
 (0)