This reverts commit 3aa009cc. The reverted commit causes an infinite loop in instcombine. See PR51584.