@@ -84,14 +84,15 @@ def testAlternativesOp(target):
8484 left_or_right = tune .AlternativesOp (
8585 [transform .AnyParamType .get ()], "left_or_right" , 2
8686 )
87- with ir .InsertionPoint (left_or_right .alternatives [_left := 0 ].blocks [0 ]):
87+ idx_for_left , idx_for_right = 0 , 1
88+ with ir .InsertionPoint (left_or_right .alternatives [idx_for_left ].blocks [0 ]):
8889 # CHECK: %[[C0:.*]] = transform.param.constant 0
8990 i32_0 = ir .IntegerAttr .get (ir .IntegerType .get_signless (32 ), 0 )
9091 c0 = transform .ParamConstantOp (transform .AnyParamType .get (), i32_0 )
9192 # CHECK: transform.yield %[[C0]]
9293 transform .yield_ (c0 )
9394 # CHECK-NEXT: }, {
94- with ir .InsertionPoint (left_or_right .alternatives [_right := 1 ].blocks [0 ]):
95+ with ir .InsertionPoint (left_or_right .alternatives [idx_for_right ].blocks [0 ]):
9596 # CHECK: %[[C1:.*]] = transform.param.constant 1
9697 i32_1 = ir .IntegerAttr .get (ir .IntegerType .get_signless (32 ), 1 )
9798 c1 = transform .ParamConstantOp (transform .AnyParamType .get (), i32_1 )
@@ -104,14 +105,14 @@ def testAlternativesOp(target):
104105 fork_in_the_road = tune .AlternativesOp (
105106 [transform .AnyParamType .get ()], "fork_in_the_road" , 2 , selected_region = 0
106107 )
107- with ir .InsertionPoint (fork_in_the_road .alternatives [_left := 0 ].blocks [0 ]):
108+ with ir .InsertionPoint (fork_in_the_road .alternatives [idx_for_left ].blocks [0 ]):
108109 # CHECK: %[[C0:.*]] = transform.param.constant 0
109110 i32_0 = ir .IntegerAttr .get (ir .IntegerType .get_signless (32 ), 0 )
110111 c0 = transform .ParamConstantOp (transform .AnyParamType .get (), i32_0 )
111112 # CHECK: transform.yield %[[C0]]
112113 transform .yield_ (c0 )
113114 # CHECK-NEXT: }, {
114- with ir .InsertionPoint (fork_in_the_road .alternatives [_right := 1 ].blocks [0 ]):
115+ with ir .InsertionPoint (fork_in_the_road .alternatives [idx_for_right ].blocks [0 ]):
115116 # CHECK: %[[C1:.*]] = transform.param.constant 1
116117 i32_1 = ir .IntegerAttr .get (ir .IntegerType .get_signless (32 ), 1 )
117118 c1 = transform .ParamConstantOp (transform .AnyParamType .get (), i32_1 )
0 commit comments