[PATCH] D143129: [GVN] Restrict equality propagation for pointers

Usman Nadeem via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 25 16:37:27 PST 2023


mnadeem marked an inline comment as done.
mnadeem added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2564
   // Remove it!
   patchAndReplaceAllUsesWith(I, Repl);
   if (MD && Repl->getType()->isPtrOrPtrVectorTy())
----------------
aqjune wrote:
> As @nikic suggested in the Discourse thread, do you want to fix `patchAndReplaceAllUsesWith` so that if it is a pointer it allows replacing uses at instructions that are unaware of provenance? I wonder how things will go.
> Actually, we can count different assembly files rather than LLVM IR. If it is less than 10, then we can investigate the files more deeply. Actually, if there are diffs even after allowing this, I think it might be miscompilation bugs.
Maybe in a separate patch? I tried doing assembly files but the changes were more extensive due to register assignment changes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143129/new/

https://reviews.llvm.org/D143129



More information about the llvm-commits mailing list