Converting between a complex<f32> to i64 could be useful for handling interop
between the arith and complex dialects.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Updated for jpienaar@ comments. Included adding complex.bitcast -> arith.bitcast canonicalizer.
mlir/lib/Dialect/Complex/IR/ComplexOps.cpp | ||
---|---|---|
95 | We want to allow bitcasting between i64 and complex<f32> so both need to be allowed. However we want to avoid complex.bitcast being used between unsupported types (e.g. tensor<complex<f32>>) for now. | |
150 | Essentially yes. If we see a complex.bitcast -> arith.bitcast we merge this into a single complex.bitcast. I would argue its just sucking the arith.bitcast into the complex.bitcast but thats just a minor detail. I realized I should include a complex.bitcast to arith.bitcast conversion so that if two complex.bitcasts are merged such that they are a valid arith.bitcast, we should just canonocalize to it. |
Elide trivial braces