PR #12091: [XLA:CPU][oneDNN] Perf regression fix on matmul weight prepacking.
PR #12091: [XLA:CPU][oneDNN] Perf regression fix on matmul weight prepacking.

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

This PR fixes a regression caused by refactoring of weight prepacking. Essentially, the current PR restores the conditions for weight prepacking as before.
(1) Restores weights to have multiple users. Since weights are prepacked only when it can be evaluated as constant it is safe.
(2) Restores the HloEvaluator to evaluate constants recursively.
Copybara import of the project:

--
da6af5e2747e60d0568b0b8432c9de53ec83809f by mdfaijul <md.faijul.amin@intel.com>:

Fix matmul weight prepacking.

Merging this change closes #12091

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/12091 from Intel-tensorflow:amin/prepack-weight-bug-fix da6af5e2747e60d0568b0b8432c9de53ec83809f
