[PATCH] D88851: InstCombine: Fix infinite loop in copy-constant-to-alloca transform
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 10:05:31 PDT 2020
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:326
+
+ IC.Builder.SetInsertPoint(MemCpy);
+ auto *NewI = IC.Builder.CreateMemTransferInst(
----------------
I spent a while trying to figure out if this transform carried over the source location (the !dbg metadata). Setting the insertion point of the irbuilder happens to have the side effect of copying the location of of the instruction insertion point. Maybe that is common knowledge, but if not, I would consider a comment about it here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88851/new/
https://reviews.llvm.org/D88851
More information about the llvm-commits
mailing list