The local stellar mass density is observed to be significantly lower than the value obtained from integrating the cosmic star formation history (SFH), assuming that all the stars formed with a Salpeter initial mass function (IMF). Even other favoured IMFs, more successful in reconciling the observed z= 0 stellar mass density with that inferred from the SFH, have difficulties in reproducing the stellar mass density observed at higher redshift. In this study, we investigate to what extent this discrepancy can be alleviated for any universal power-law IMF. We find that an IMF with a high-mass slope shallower (2.15) than the Salpeter slope (2.35) reconciles the observed stellar mass density with the cosmic SFH, but only at low redshifts. At higher redshifts z > 0.5, we find that the observed stellar mass densities are systematically lower than predicted from the cosmic SFH, for any universal power-law IMF.