The clustering of galaxies in the SWIRE survey