[Mlir-commits] [mlir] [mlir][VectorToSPIRV] Add conversion for vector.extract with dynamic indices (PR #114137)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Nov 5 07:07:17 PST 2024
================
@@ -249,9 +242,16 @@ struct VectorInsertOpConvert final
return success();
}
- int32_t id = getFirstIntValue(insertOp.getMixedPosition());
- rewriter.replaceOpWithNewOp<spirv::CompositeInsertOp>(
- insertOp, adaptor.getSource(), adaptor.getDest(), id);
+ std::optional<int64_t> id =
+ getConstantIntValue(insertOp.getMixedPosition()[0]);
+
+ if (id.has_value())
----------------
kuhar wrote:
same here
https://github.com/llvm/llvm-project/pull/114137
More information about the Mlir-commits
mailing list