This reverts the revert 28c04794. The failing MLIR test that caused the revert should be fixed in this version. Also includes a PPC test fix previously in 1f87c7c4.