scf.for loop was restricted to only operate on Index type since
splitting out from affine.for. Relax requirement to allow for signless
integer types additionally. This allows specifying explicitly different
bitwidths for different loops as well as specialize from index to iN
while still using scf.for.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do we need to also update the lowering to LLVM? It may assume type is always index and end up using a different bitwidth.
Comment Actions
I checked the final assembly output and saw different outputs as I changed width here. But let me double check the code.
Comment Actions
SCFToControlFlow.cpp is handling this by way of using type inference method (and the constraints added on ForOp here with matching element type)
SCFToGPU.cpp seems to be only operating on AffineForOp
SCFToSPIRV.cpp is handling this by explicit element type queries
VectorToGPU.cpp looks also not to depend on requiring index type
I see no other lowering from scf::ForOp conversion side.