File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,10 @@ The following is equivalent in non-concurrent situations:
87
87
88
88
However, LLVM is not allowed to transform the former to the latter: it could
89
89
indirectly introduce undefined behavior if another thread can access ``x `` at
90
- the same time. (This example is particularly of interest because before the
91
- concurrency model was implemented, LLVM would perform this transformation.)
90
+ the same time. That thread would read `undef ` instead of the value it was
91
+ expecting, which can lead to undefined behavior down the line. (This example is
92
+ particularly of interest because before the concurrency model was implemented,
93
+ LLVM would perform this transformation.)
92
94
93
95
Note that speculative loads are allowed; a load which is part of a race returns
94
96
``undef ``, but does not have undefined behavior.
You can’t perform that action at this time.
0 commit comments