[llvm] [IR] Add new function attribute nocreateundeforpoison (PR #164809)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 04:04:51 PDT 2025


================
@@ -2741,6 +2741,10 @@ For example:
 ``"nooutline"``
     This attribute indicates that outlining passes should not modify the
     function.
+``nocreateundeforpoison``
+    This attribute indicates that the result of the function will not be undef
+    or poison if all arguments are not undef and not poison. Otherwise, it is
+    undefined behavior.
----------------
jayfoad wrote:

Not sure what you mean by "base value" and I don't see that term used elsewhere. Are you suggesting we separate out the callee's internal view of the return value and the caller's external view of it? (Like "intensional" and "extensional" definitions in logic/semantics.) `nocreateundeforpoison` says something about the internal view. Poison-generating attributes and fast math flags only affect the external view, e.g. `nnan` says that if the internal is NaN then the external is poison.

https://github.com/llvm/llvm-project/pull/164809


More information about the llvm-commits mailing list