message: [XLA] Remove bitcast-converts between same shape.
diff: @@ -122,6 +122,8 @@ class AlgebraicSimplifierVisitor : public DfsHloVisitorWithDefault {
  Status HandleBitcast(HloInstruction* bitcast) override;
  + Status HandleBitcastConvert(HloInstruction* bitcast) override;
  +
  Status HandleBroadcast(HloInstruction* broadcast) override;
  Status HandleConcatenate(HloInstruction* concatenate) override;
  @@ -411,6 +413,13 @@ Status AlgebraicSimplifierVisitor::HandleBitcast(HloInstruction* bitcast) {
  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) {
  