[PATCH] D27283: Fix invalid addrspacecast due to combining alloca with global var
Vedran Miletić via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 11:22:07 PST 2017
rivanvx accepted this revision.
rivanvx added a comment.
This revision is now accepted and ready to land.
To the extent of my knowledge and testing, this looks good.
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:256
+ if (!Inst)
+ return;
+ DEBUG(dbgs() << "Found pointer user: " << *U << '\n');
----------------
If the first user isn't an instruction, what guarantees that others aren't? How come there isn't a continue here instead?
================
Comment at: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:287-288
+ auto *NewI = new LoadInst(V);
+ NewI->takeName(LT);
+ IC.InsertNewInstWith(NewI, *LT);
+ IC.replaceInstUsesWith(*LT, NewI);
----------------
Does the order matter here? If not, can you make it consistent with other two cases?
https://reviews.llvm.org/D27283
More information about the llvm-commits
mailing list