llvm-project
6f44f333 - [TBAA] Only keep the immutable flag if both merged tags have it (#225907)

Commit
62 days ago
[TBAA] Only keep the immutable flag if both merged tags have it (#225907) getMostGenericTBAA() can return one of the two tags unchanged, as it does when both have the same base type and offset. If only that tag has the immutable flag, the merged access claims that the memory is constant on both paths. For example, after SimplifyCFG hoists two such loads, GVN can forward a load across a store to the same location. Keep the immutable flag only if both tags have it. Otherwise drop just the flag and keep the rest of the tag.
Author
Parents
Loading