@@ -68,10 +68,9 @@ TEST_F(SCFLoopLikeTest, queryUnidimensionalLooplikes) {
68
68
checkUnidimensional (forOp.get ());
69
69
70
70
OwningOpRef<scf::ForallOp> forallOp = b.create <scf::ForallOp>(
71
- loc, ArrayRef<OpFoldResult>(static_cast <Value>(lb.get ())),
72
- ArrayRef<OpFoldResult>(static_cast <Value>(ub.get ())),
73
- ArrayRef<OpFoldResult>(static_cast <Value>(step.get ())), ValueRange (),
74
- std::nullopt);
71
+ loc, ArrayRef<OpFoldResult>(lb->getResult ()),
72
+ ArrayRef<OpFoldResult>(ub->getResult ()),
73
+ ArrayRef<OpFoldResult>(step->getResult ()), ValueRange (), std::nullopt);
75
74
checkUnidimensional (forallOp.get ());
76
75
77
76
OwningOpRef<scf::ParallelOp> parallelOp = b.create <scf::ParallelOp>(
@@ -87,19 +86,17 @@ TEST_F(SCFLoopLikeTest, queryMultidimensionalLooplikes) {
87
86
b.create <arith::ConstantIndexOp>(loc, 10 );
88
87
OwningOpRef<arith::ConstantIndexOp> step =
89
88
b.create <arith::ConstantIndexOp>(loc, 2 );
90
- auto lbValue = static_cast <Value>(lb.get ());
91
- auto ubValue = static_cast <Value>(ub.get ());
92
- auto stepValue = static_cast <Value>(step.get ());
93
89
94
- OwningOpRef<scf::ForallOp> forallOp =
95
- b. create <scf::ForallOp>( loc, ArrayRef<OpFoldResult>({lbValue, lbValue }),
96
- ArrayRef<OpFoldResult>({ubValue, ubValue }),
97
- ArrayRef<OpFoldResult>({stepValue, stepValue }),
98
- ValueRange (), std::nullopt);
90
+ OwningOpRef<scf::ForallOp> forallOp = b. create <scf::ForallOp>(
91
+ loc, ArrayRef<OpFoldResult>({lb-> getResult (), lb-> getResult () }),
92
+ ArrayRef<OpFoldResult>({ub-> getResult (), ub-> getResult () }),
93
+ ArrayRef<OpFoldResult>({step-> getResult (), step-> getResult () }),
94
+ ValueRange (), std::nullopt);
99
95
checkMultidimensional (forallOp.get ());
100
96
101
97
OwningOpRef<scf::ParallelOp> parallelOp = b.create <scf::ParallelOp>(
102
- loc, ValueRange ({lbValue, lbValue}), ValueRange ({ubValue, ubValue}),
103
- ValueRange ({stepValue, stepValue}), ValueRange ());
98
+ loc, ValueRange ({lb->getResult (), lb->getResult ()}),
99
+ ValueRange ({ub->getResult (), ub->getResult ()}),
100
+ ValueRange ({step->getResult (), step->getResult ()}), ValueRange ());
104
101
checkMultidimensional (parallelOp.get ());
105
102
}
0 commit comments