| 747 | } |
| 748 | |
| 749 | Status AlgebraicSimplifierVisitor::HandleBitcast(HloInstruction* bitcast) { |
| 750 | // If a bitcast feeds a bitcast, make it a single bitcast. |
| 751 | HloInstruction* op; |
| 752 | if (Match(bitcast, m::Bitcast(m::Bitcast(m::Op(&op))))) { |
| 753 | return ReplaceWithNewInstruction( |
| 754 | bitcast, HloInstruction::CreateBitcast(bitcast->shape(), op)); |
| 755 | } |
| 756 | // All bitcasts can be eliminated (assuming layout constraints are |
| 757 | // satisfied). |
| 758 | ReplaceInstructionIfSameShape(bitcast, bitcast->mutable_operand(0)); |
| 759 | return Status::OK(); |
| 760 | } |
| 761 | |
| 762 | Status AlgebraicSimplifierVisitor::HandleBitcastConvert( |
| 763 | HloInstruction* bitcast) { |
nothing calls this directly
no test coverage detected