Status HandleBitcast(HloInstruction* bitcast) override;
+ Status HandleBitcastConvert(HloInstruction* bitcast) override;
+
Status HandleBroadcast(HloInstruction* broadcast) override;
Status HandleConcatenate(HloInstruction* concatenate) override;
return Status::OK();
}
+Status AlgebraicSimplifierVisitor::HandleBitcastConvert(
+ HloInstruction* bitcast) {
+ // Eliminate bitcast converts between same shape.
+ ReplaceInstructionIfSameShape(bitcast, bitcast->mutable_operand(0));
+ return Status::OK();
+}
+
Status AlgebraicSimplifierVisitor::HandleCopy(HloInstruction* copy) {
// If a copy feeds a copy, make it a single copy.
if (copy->operand(0)->opcode() == HloOpcode::kCopy) {