[PATCH] D94180: [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 09:32:23 PST 2021
lebedev.ri 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.
----------------
And what if `C` is actually `undef`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94180/new/
https://reviews.llvm.org/D94180
More information about the llvm-commits
mailing list