I have created a forop.
Value outerstep = builder.create<arith::ConstantIndexOp>(elseLoc, 1);
auto forOp = builder.create<mlir::scf::ForOp>(elseLoc, outerlb, inputIndex, outerstep);
I need this type of forop: for(uint32_t i = 1; i < n; i *= 2)
I don’t want to use whileop, I set the step in the following but there is an error.
forOp.setStep(forOpBody.create<arith::IndexCastOp>(forOpLoc,
forOpBody.getIndexType(), stepIndex->getResult(0)));
error: operand #2 does not dominate this use
note: operand defined here (op in a child region)