[PATCH] D27283: Fix invalid addrspacecast due to combining alloca with global var
David Majnemer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 14:07:59 PST 2016
majnemer added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:253-256
+ auto *NewI = GetElementPtrInst::Create(NT->getElementType(), V, Indices);
+ InsertNewInstWith(NewI, *GEP);
+ if (!replacePointer(*GEP, NewI))
+ return false;
----------------
yaxunl wrote:
> majnemer wrote:
> > Is it possible for you to create instructions which you never RAUW?
> Yes, but then these instructions will be removed. The lit test checks that.
It is bad form to create new instructions in instcombine if you aren't sure you will want to keep them. Please keep in mind that IC is heavily relied upon and shows up several times in the pass pipeline.
https://reviews.llvm.org/D27283
More information about the llvm-commits
mailing list