Wireless communications via intelligent reflecting surfaces (IRSs) has received considerable attention from both academia and industry. In particular, IRSs are able to create favorable wireless propagation environments with typically lowcost passive devices. While various IRS-aided wireless communication systems have been investigated in the literature, thus far, the optimal design of such systems is not well understood. In this paper, IRS-assisted single-user multiple-input single-output (MISO) communication is investigated. To maximize the spectral efficiency, a branch-and-bound (BnB) algorithm is proposed to obtain globally optimal solutions for both the active and passive beamformers at the access point (AP) and the IRS, respectively. Simulation results confirm the effectiveness of deploying IRSs in wireless systems. Furthermore, by taking the proposed optimal BnB algorithm as the performance benchmark, the optimality of existing design algorithms is investigated.