Pebble accretion onto clumps born through gravitational instability: the composition of gas giants, super-Earths and Neptunes We use 3D simulations to show that the gravitational instability (GI) planet formation mechanism naturally produces metal rich gas giants and solid super-Earth mass cores when coupled with pebble accretion. This is in contrast to the traditional view that GI can only form planets with the same compositions as their host stars. GI fragments born in the outer regions of young massive discs migrate inwards rapidly on timescales of ten thousand years, during this phase they accrete gas and condensed metals. If accreting gas can cool efficiently, GI planets grow rapidly in mass and become massive Brown Dwarfs. However, if these planets cool slowly, gas remains too hot to be captured but the accretion of millimetre and upwards sized pebbles continues unabated. This process leads to a metal enrichment that inversely correlates with planet mass, in accordance with trends observed in the Solar System and for exosolar planets (Humphries & Nayakshin 2018a, MNRAS). For the first time we use global 3D simulations to show that feedback energy released from these cores may lead to the complete tidal disruption of their gaseous envelopes. The end product of this process is a population of leftover super-Earth/Neptune mass cores in the inner disc with compositions dominated by rocks rather than ices.