[PATCH] D144319: [SimplifyCFG] Check if the return instruction causes undefined behavior

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 18 05:47:51 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:7137
+      if (C->isNullValue() &&
+          Ret->getFunction()->hasRetAttribute(Attribute::NonNull)) {
+        return true;
----------------
This requires both nonnull and noundef.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144319/new/

https://reviews.llvm.org/D144319



More information about the llvm-commits mailing list