[llvm] [MemCpyOpt] fix miscompile for non-dominated use of src alloca for stack-move optimization (PR #66618)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 01:49:01 PDT 2023


================
@@ -1481,28 +1481,35 @@ bool MemCpyOptPass::performStackMoveOptzn(Instruction *Load, Instruction *Store,
     Worklist.push_back(AI);
     unsigned MaxUsesToExplore = getDefaultMaxUsesToExploreForCaptureTracking();
     Worklist.reserve(MaxUsesToExplore);
-    SmallSet<const Use *, 20> Visited;
+    SmallSet<Instruction *, 20> Visited;
----------------
nikic wrote:

Why did this get switched from Use to Instruction?

https://github.com/llvm/llvm-project/pull/66618


More information about the llvm-commits mailing list