[mlir][StandardToSPIRV] Use spv.UMod for index re-calculation
Per Vulkan's SPIR-V environment spec: "While the OpSRem and OpSMod instructions are supported by the Vulkan environment, they require non-negative values and thus do not enable additional functionality beyond what OpUMod provides." The `getOffsetForBitwidth` function is used for lowering std.load and std.store, whose indices are of `index` type and cannot be negative. So we should be okay to use spv.UMod directly here to be exact. Also made the comment explicit about the assumption. Differential Revision: https://reviews.llvm.org/D83714
Loading
Please sign in to comment