We can use a common templatized conversion for EqualOp and NotEqualOp.
This allows to reuse most of the logic for the conversion of EqualOp.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp | ||
|---|---|---|
| 79 | Would it make sense to get rid of this if statement and just pass the replacement op type, like ComparisonOpConversion<complex::EqualOp, CmpFPredicate::OEQ, AndOp>? or even better, make AndOp the function of typename ComparisonOp. | |
Comment Actions
Derive result combination op type via std::conditional_t from comparison op type.
| mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp | ||
|---|---|---|
| 79 | Thanks, learned now about std::conditional_t | |
Would it make sense to get rid of this if statement and just pass the replacement op type, like
ComparisonOpConversion<complex::EqualOp, CmpFPredicate::OEQ, AndOp>?
or even better, make AndOp the function of typename ComparisonOp.