Abstract: The conventional core accretion scenario predicts that the final assembly of terrestrial planets involves catastrophic collisions between lunar to Mars-sized planetary embryos. Gas giant planets are also likely to experience giant impacts during and after disk dispersal. From the observational point of view, close-in exoplanets exhibit a huge diversity in their bulk densities. Several post-formation processes have been proposed for explaining the origin of the compositional diversity. However, none of them can satisfactorily account for the whole population. In this talk, I will try to argue that such a diversity is a natural consequence of giant impacts at the final stage of planet formation. I will present the results of our latest three-dimensional hydrodynamic simulations of planetary collisions and their implications for the formation of some exotic exoplanet systems.