We applied density functional theory based on ultrasoft pseudopotentials to study the structural properties of Ir4 clusters both in the gas phase and adsorbed on a MgO(100) surface. To resolve the discrepancy between experimental data which suggest a tetrahedral structure for Ir4 and theoretical results which show a strong preference for the square isomer, we investigated the effect of several adsorbates on the equilibrium atomic structure of the clusters. Calculated binding energies of a single H, C, or O atom, as well as one CO or OH molecule, to three stable Ir4 isomers indicate that C or CO adsorption significantly influences the relative stability of Ir4 isomers. For MgO(100)-supported Ir4, atomic carbon is able to change the isomer preference from the square to the tetrahedral geometry.