[PATCH] D94180: [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument.
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 09:39:22 PST 2021
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6591-6592
+ if (auto *CB = dyn_cast<CallBase>(Use)) {
+ if (NullPointerIsDefined(CB->getFunction()))
+ return false;
+ // A call to null is undefined.
----------------
lebedev.ri wrote:
> And what if `C` is actually `undef`?
So in this case, we require noundef attribute only (?) @aqjune
I will add a testcase.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94180/new/
https://reviews.llvm.org/D94180
More information about the llvm-commits
mailing list