[PATCH] D19245: [SimplifyCFG] Fold `llvm.guard(false)` to unreachable

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 17:10:19 PDT 2016


reames added inline comments.

================
Comment at: include/llvm/Transforms/Utils/Local.h:295
@@ +294,3 @@
+/// a call to @llvm.trap before the newly inserted unreachable instruction.
+/// Returns the number of instructions deleted.
+unsigned appendUnreachable(Instruction *I, bool UseLLVMTrap);
----------------
I'm still missing something here.  I get why you can't remove the *guard*, but why can't you remove the instruction *after* the guard?  changeToUnreachable(std::next(BBI))?


http://reviews.llvm.org/D19245





More information about the llvm-commits mailing list