Complex(Real(c), Imag(c)) -> c
| 2642 | |
| 2643 | // Complex(Real(c), Imag(c)) -> c |
| 2644 | Status AlgebraicSimplifierVisitor::HandleComplex(HloInstruction* complex) { |
| 2645 | HloInstruction *c0, *c1; |
| 2646 | if (Match(complex, m::Complex(m::Real(m::Op(&c0)), m::Imag(m::Op(&c1)))) && |
| 2647 | c0 == c1) { |
| 2648 | return ReplaceInstruction(complex, c0); |
| 2649 | } |
| 2650 | return Status::OK(); |
| 2651 | } |
| 2652 | |
| 2653 | // Real(Complex(r, i)) -> r |
| 2654 | Status AlgebraicSimplifierVisitor::HandleReal(HloInstruction* real) { |