SPIR-V doesn't have poison, but poison can be converted to undef.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for taking care of this, @Hardcode84!
mlir/include/mlir/Conversion/Passes.td | ||
---|---|---|
1064 | Nit: 'Converts supported UB ops to SPIR-V dialect ops.' | |
mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp | ||
26 | ||
40–42 | Could you define this inline? There no benefit to outlining these matchAndRewirte functions. This may be inconsistent with the older SPIR-V passed, but we converged on in-line definition in newer ones. | |
43 | Shouldn't we use the type from the adaptor, or are these the same? Also, if the adaptor is unused, the argument should be unnamed (, OpAdaptor, ) | |
63–64 | ||
mlir/test/Conversion/UBToSPIRV/ub-to-spirv.mlir | ||
16–17 | Could you add one test with vector<4xi32> to document how the non-scalar case is handled? |
mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp | ||
---|---|---|
43 | I don't see return type on adaptor, and I want to access unconverted type anyway, to avoid converting user types, which can coincidentally also be converted to primitive types. |
mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp | ||
---|---|---|
43 | SG, thanks for the explanation |
mlir/test/Conversion/UBToSPIRV/ub-to-spirv.mlir | ||
---|---|---|
16–17 | vector is not covered yet (will be rejected by isIntOrIndexOrFloat) |
mlir/test/Conversion/UBToSPIRV/ub-to-spirv.mlir | ||
---|---|---|
16–17 | This doesn't prevent us from having a test with a TODO for unsupported types that checks that at least the code doesn't crash |
Nit: 'Converts supported UB ops to SPIR-V dialect ops.'