Skip to content

Commit 1856e22

Browse files
committed
[LangRef] minor fixes to poison examples and well-defined values section (NFC)
1 parent e987fbd commit 1856e22

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/docs/LangRef.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3743,8 +3743,8 @@ Here are some examples:
37433743

37443744
%narrowaddr = bitcast i32* @g to i16*
37453745
%wideaddr = bitcast i32* @g to i64*
3746-
%poison3 = load i16, i16* %narrowaddr ; Returns a poison value.
3747-
%poison4 = load i64, i64* %wideaddr ; Returns a poison value.
3746+
%poison4 = load i16, i16* %narrowaddr ; Returns a poison value.
3747+
%poison5 = load i64, i64* %wideaddr ; Returns a poison value.
37483748

37493749
%cmp = icmp slt i32 %poison, 0 ; Returns a poison value.
37503750
br i1 %cmp, label %end, label %end ; undefined behavior
@@ -3763,8 +3763,7 @@ The padding of an aggregate isn't considered, since it isn't visible
37633763
without storing it into memory and loading it with a different type.
37643764

37653765
A constant of a :ref:`single value <t_single_value>`, non-vector type is well
3766-
defined if it is a non-undef constant. Note that there is no poison constant
3767-
in LLVM.
3766+
defined if it is neither '``undef``' constant nor '``poison``' constant.
37683767
The result of :ref:`freeze instruction <i_freeze>` is well defined regardless
37693768
of its operand.
37703769

0 commit comments

Comments
 (0)