[PATCH] D47974: [SimplifyIndVars] Ignore dead users

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 9 22:55:29 PDT 2018


sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:839
 
+    if (UseInst->use_empty() && !UseInst->mayHaveSideEffects()) {
+      DeadInsts.emplace_back(UseInst);
----------------
How about `isInstructionTriviallyDead`?

Also, please add a short comment here on why this is needed.


https://reviews.llvm.org/D47974





More information about the llvm-commits mailing list