Skip to content

Commit aade2a1

Browse files
Update llvm/docs/UndefinedBehavior.rst
Co-authored-by: Antonio Frighetto <[email protected]>
1 parent 9e6c3fe commit aade2a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/docs/UndefinedBehavior.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ We would obtain the following IR:
7575
However, this transformation is not correct! Since division triggers UB
7676
when the divisor is zero, we can only execute speculatively if we are sure we
7777
don't hit that condition.
78-
For the function above, when called like ``f(false, 0)``, before the optimization
79-
it would return 0, and after the optimization it now triggers UB.
78+
The function above, when called as ``f(false, 0)``, would return 0 before the
79+
optimization, and triggers UB after being optimizing.
8080

8181
This example highlights why we minimize the cases that trigger immediate UB
8282
as much as possible.

0 commit comments

Comments
 (0)