@@ -210,7 +210,6 @@ func testArrayUninitializedIntrinsicFunctionResult(_ x: Float, _ y: Float) -> [F
210
210
// CHECK: [ACTIVE] %18 = apply %17(%0, %1, %16) : $@convention(method) (Float, Float, @thin Float.Type) -> Float
211
211
212
212
// TF-975: Test nested array literals.
213
- // FIXME(TF-975): Some values are incorrectly not marked as active: `%0`, `%1`, etc.
214
213
@differentiable
215
214
func testArrayUninitializedIntrinsicNested( _ x: Float , _ y: Float ) -> [ Float ] {
216
215
let array = [ x, y]
@@ -251,7 +250,6 @@ func testArrayUninitializedIntrinsicNested(_ x: Float, _ y: Float) -> [Float] {
251
250
// CHECK: [NONE] %36 = apply %35<Float>(%29, %34, %30) : $@convention(method) <τ_0_0> (Int, @guaranteed Array<τ_0_0>) -> @out τ_0_0
252
251
253
252
// TF-978: Test array literal initialized with `apply` indirect results.
254
- // FIXME(TF-978): Some values are incorrectly not marked as active: `%0`, `%1`, etc.
255
253
struct Wrapper < T: Differentiable > : Differentiable {
256
254
var value : T
257
255
}
@@ -585,6 +583,31 @@ class C: Differentiable {
585
583
// CHECK: [ACTIVE] %8 = apply %7(%0, %6, %4) : $@convention(method) (Float, Float, @thin Float.Type) -> Float
586
584
}
587
585
586
+ // TF-1176: Test class property `modify` accessor.
587
+ @differentiable
588
+ func testClassModifyAccessor( _ c: inout C ) {
589
+ c. float *= c. float
590
+ }
591
+
592
+ // FIXME(TF-1176): Some values are incorrectly not marked as active: `%16`, etc.
593
+ // CHECK-LABEL: [AD] Activity info for ${{.*}}testClassModifyAccessor{{.*}} at (source=0 parameters=(0))
594
+ // CHECK: [ACTIVE] %0 = argument of bb0 : $*C
595
+ // CHECK: [NONE] %2 = metatype $@thin Float.Type
596
+ // CHECK: [ACTIVE] %3 = begin_access [read] [static] %0 : $*C
597
+ // CHECK: [VARIED] %4 = load [copy] %3 : $*C
598
+ // CHECK: [ACTIVE] %6 = begin_access [read] [static] %0 : $*C
599
+ // CHECK: [VARIED] %7 = load [copy] %6 : $*C
600
+ // CHECK: [VARIED] %9 = begin_borrow %7 : $C
601
+ // CHECK: [VARIED] %10 = class_method %9 : $C, #C.float!getter.1 : (C) -> () -> Float, $@convention(method) (@guaranteed C) -> Float
602
+ // CHECK: [VARIED] %11 = apply %10(%9) : $@convention(method) (@guaranteed C) -> Float
603
+ // CHECK: [VARIED] %14 = begin_borrow %4 : $C
604
+ // CHECK: [VARIED] %15 = class_method %14 : $C, #C.float!modify.1 : (C) -> () -> (), $@yield_once @convention(method) (@guaranteed C) -> @yields @inout Float
605
+ // CHECK: [VARIED] (**%16**, %17) = begin_apply %15(%14) : $@yield_once @convention(method) (@guaranteed C) -> @yields @inout Float
606
+ // CHECK: [VARIED] (%16, **%17**) = begin_apply %15(%14) : $@yield_once @convention(method) (@guaranteed C) -> @yields @inout Float
607
+ // CHECK: [NONE] // function_ref static Float.*= infix(_:_:)
608
+ // CHECK: [NONE] %19 = apply %18(%16, %11, %2) : $@convention(method) (@inout Float, Float, @thin Float.Type) -> ()
609
+ // CHECK: [NONE] %23 = tuple ()
610
+
588
611
//===----------------------------------------------------------------------===//
589
612
// Enum differentiation
590
613
//===----------------------------------------------------------------------===//
0 commit comments