ScopedContext scope(rewriter, loc);
MemRefView vOp(result);
IndexedValue iOp(result);
- for (uint64_t i = 0; i < shape[0]; ++i) {
+ for (uint64_t i = 0, ie = shape[0]; i < ie; ++i) {
if (shape.size() == 1) {
auto value = cstValue.getValue(ArrayRef<uint64_t>{i})
.cast<FloatAttr>()
iOp(constant_index(i)) = constant_float(value, f64Ty);
continue;
}
- for (uint64_t j = 0; j < shape[1]; ++j) {
+ for (uint64_t j = 0, je = shape[1]; j < je; ++j) {
auto value = cstValue.getValue(ArrayRef<uint64_t>{i, j})
.cast<FloatAttr>()
.getValue();