IBM is set to report its second-quarter earnings on Wednesday, with investors closely watching whether the technology giant can restore confidence.