[PATCH] D30667: GVNHoist: handle basic blocks with UnreachableInst
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 16:51:36 PDT 2017
efriedma added a comment.
> There is? We could propagate the unreachableness of this function to its callsites, but I don't see what that has to do with the value of the function argument.
LangRef states "This indicates that the parameter or return pointer is not null", i.e. if the parameter is null, the function has undefined behavior. The function in my example always has undefined behavior, therefore it has undefined behavior if you call it with a null pointer, therefore you can mark the parameter nonnull.
Repository:
rL LLVM
https://reviews.llvm.org/D30667
More information about the llvm-commits
mailing list