Skip to content

Commit 8854dd0

Browse files
[IR] Specify alloca with poison element count (llvm#183072)
An alloca with a poison element count is undefined behavior. This matches existing behavior of optimizations. This also matches the behavior of llubui for `poison`, but llubi currently does not report immediate UB for `undef` element counts. A future patch will fix that.
1 parent 7a83886 commit 8854dd0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/docs/LangRef.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11613,6 +11613,9 @@ See :ref:`llvm.lifetime.start <int_lifestart>` and
1161311613
:ref:`llvm.lifetime.end <int_lifeend>` for the precise semantics of
1161411614
lifetime-manipulating intrinsics.
1161511615

11616+
If the element count is ``undef`` or ``poison``, this instruction has undefined
11617+
behavior.
11618+
1161611619
Example:
1161711620
""""""""
1161811621

0 commit comments

Comments
 (0)