message: [XLA:CPU] Emit layout-preserving copy HLOs as memcpy
  This is primarily a compile time optimization, as we'd create a loop nest for a
  multidimensional copy and LLVM spends a lot of time optimizing that.
diff: @@ -278,8 +278,12 @@ Status IrEmitter::HandleConstant(HloInstruction* constant) {
  }
  Status IrEmitter::HandleCopy(HloInstruction* copy) {
  - if (copy->shape().IsTuple()) {
  - // kCopy shallow copies a tuple so just memcpy the top-level buffer.
  + if (copy->shape().IsTuple() ||
  + (copy->shape().IsArray() &&
  + LayoutUtil::Equal(copy->operand(0)->shape().layout(),
  + copy->shape().layout()))) {
  + // If the layouts are equal this is just a memcpy. kCopy shallow copies a
  + // tuple so just memcpy the top-level buffer for tuples.
  TF_RETURN_IF_ERROR(EmitTargetAddressForOp(copy));
  return EmitMemcpy(*(copy->operand(0)), *copy);
  } else if (copy->shape().IsArray()) {
  