[PATCH] D31281: [LoopUnroll] Remap references in peeled iteration

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 05:19:55 PDT 2017


sepavloff added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:419
+
+    // Rewrite the cloned instruction operands to use the values created when
+    // the clone is created.
----------------
mkuper wrote:
> Something here is wrong. There's already a call to remapInstructionsInBlocks in line 443 (original) that does exactly this, so everything ought to be updated correctly. If it isn't, then something's going wrong between here and there, and I'm not sure what it is.
Indeed, you are right. But the remapping is made too late, it must be done prior to dominator tree calculation, which in turn must be done prior to call to `SplitBlock`.


https://reviews.llvm.org/D31281





More information about the llvm-commits mailing list