[llvm] [GVNSink] Replace combineKnownMetadata with combineMetadataForCSE (PR #92197)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 17:16:30 PDT 2024
================
@@ -996,8 +984,8 @@ unsigned GVNHoist::rauw(const SmallVecInsn &Candidates, Instruction *Repl,
MSSAUpdater->removeMemoryAccess(OldMA);
}
+ combineMetadataForCSE(Repl, I, true);
----------------
hiraditya wrote:
Moving combineMetadataForCSE above andIRFlags is intentional for two reasons.
1. In future if andIRFlags does something to manipulate metadata(unlikely), calling it later makes this pass more resilient to change.
2. GVNSink takes a similar approach. https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/GVNSink.cpp#L920
https://github.com/llvm/llvm-project/pull/92197
More information about the llvm-commits
mailing list