Stephenson's Fall, or Dodge in Hell deals with this extensively. It's even more meandering than most of his work and I would not overall call it one of his best but the parts dealing with whether or not an uploaded copy of someone's brain is the same person are pretty interesting.