This patch introduces new conversion patterns for bit and logical negation op: spv.Not and spv.LogicalNot. They are implemented by applying xor on the operand and mask with all bits set.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
- [MLIR][SPIRVToLLVM] Removed commented out code
Removed the code for commented out pattern.
Comment Actions
LGTM after addressing the comments
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp | ||
---|---|---|
56 | Nit: please put a full stop at the end of each sentence. (https://llvm.org/docs/CodingStandards.html#commenting) | |
187 | Is this cast necessary? AFAIR, VectorType derives from ShapedType |
Comment Actions
- [MLIR][SPIRVToLLVM] Addressed comments on NotPattern conversion class
Added a full stop at the end of each sentence. When creating a vector constant with all bits set, cast of srcType to VectorType is used instead of ShapedType. The cast is necessary for type checks.
Nit: please put a full stop at the end of each sentence. (https://llvm.org/docs/CodingStandards.html#commenting)