This patch introduces conversion for spv.Branch and spv.BranchConditional ops. Branch weigths for spv.BranchConditional are not supported at the moment, and conversion in this case fails.
This revision relies on https://reviews.llvm.org/D83786.
Paths
| Differential D83784
[MLIR][SPIRVToLLVM] Conversion of SPIR-V branch ops ClosedPublic Authored by georgemitenkov on Jul 14 2020, 9:05 AM.
Details Summary This patch introduces conversion for spv.Branch and spv.BranchConditional ops. Branch weigths for spv.BranchConditional are not supported at the moment, and conversion in this case fails. This revision relies on https://reviews.llvm.org/D83786.
Diff Detail
Event Timelinegeorgemitenkov added a parent revision: D83786: [MLIR][SPIRVToLLVM] SPIRV function fix and nits.Jul 14 2020, 9:38 AM georgemitenkov added a child revision: D83860: [MLIR][LLVMDialect] SelectionOp conversion pattern.Jul 15 2020, 2:25 AM antiagainst added inline comments.
This revision is now accepted and ready to land.Jul 20 2020, 6:10 AM Closed by commit rG05d3160c9c4f: [MLIR][SPIRVToLLVM] Conversion of SPIR-V branch ops (authored by georgemitenkov). · Explain WhyJul 21 2020, 12:53 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 277862 mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir
|
You can just write this as if (auto weights = ...) return failure.