[PATCH] D79644: [mlir][StandardToSPIRV] Add support for lowering index_cast to SPIR-V.
Lei Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 18:17:15 PDT 2020
antiagainst requested changes to this revision.
antiagainst added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp:870
ReturnOpPattern, SelectOpPattern, IntStoreOpPattern, StoreOpPattern,
+ TypeCastingOpPattern<IndexCastOp, spirv::SConvertOp>,
TypeCastingOpPattern<SIToFPOp, spirv::ConvertSToFOp>,
----------------
I think we need to special treat the case where the src/target bitwidth == `SPIRVTypeConverter::getIndexType()` by just removing this op? OpSConvert requires the source and target bitwidth to be different. Casting from `index` to `i32` will result in an invalid OpSConvert.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79644/new/
https://reviews.llvm.org/D79644
More information about the llvm-commits
mailing list