Jin Huang 02ca50e560
[profcheck] Fix missing profile metadata in ExpandMemCmp (#169979)
This patch fixes a profile metadata missing in the `ExpandMemCmp` pass
when it expanding `memcmp` calls. This would cause branches between
different blocks to lose their profile data, potentially leading to
suboptimal code generation.

The patch updates the `ExpandMemCmp` pass to set branch weights to a
default `unknown`(50/50 weights) value when a profile is available. This
prevents the expansion from making a previously profiled branch
unprofiled.

The patch also includes updates to the tests to reflect the new branch
weights.

Co-authored-by: Jin Huang <jingold@google.com>
2025-12-04 15:45:44 -08:00
..