PR #11309: Run algebraic simplifier after layout normalization
PR #11309: Run algebraic simplifier after layout normalization

Imported from GitHub PR https://github.com/openxla/xla/pull/11309

The newly introduced layout normalization pass (https://github.com/openxla/xla/pull/10811) leaves redundant bitcasts in the HLO graph. In particular, the bitcasts for the host buffer intializations confuse HostOffloadLegalize pass. The legalization pass tries to ensure that host-offloader’s alias analysis can treat dynamic-update-slice instructions as in-place by duplicating (for each use) the broadcast instructions that will be treated as buffer initializations. However, the layout normalization pass l introduces a single bitcast as a user of the broadcast instruction, so the broadcast does not get duplicated.

This patch runs algebraic simplifier after layout normalization to get rid of the redundant bitcasts.
Copybara import of the project:

--
aa918f1939b0c9f192034aad8f87d1d9358892e9 by Jaroslav Sevcik <jsevcik@nvidia.com>:

Run algebraic simplifier after layout normalization

Merging this change closes #11309

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11309 from jaro-sevcik:introduce-algsimp-after-layoutnorm-gpu aa918f1939b0c9f192034aad8f87d1d9358892e9
