[llvm] [NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization (PR #66314)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 00:08:50 PDT 2023


================
@@ -2765,6 +2771,7 @@ NewGVN::makePossiblePHIOfOps(Instruction *I,
       // Clone the instruction, create an expression from it that is
       // translated back into the predecessor, and see if we have a leader.
       Instruction *ValueOp = I->clone();
+      ValueOp->insertBefore(I);
----------------
nikic wrote:

Can we insert this into PredBB instead and thus avoid the need for the special case?

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


More information about the llvm-commits mailing list