This reverts commit 60b70bb332. It appears to have minimal performance impact, and fails to compile on nvidia cards.
60b70bb332