The Eighth Amendment’s prohibition on cruel and unusual punishment

Does the Eighth Amendment’s prohibition on cruel and unusual punishment bar a state from imposing the death penalty on a defendant who was found guilty but mentally ill?