<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/codegen/non-terminate/infinite-loop-2.rs, branch 1.44.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.44.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.44.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2019-09-27T23:13:53+00:00</updated>
<entry>
<title>Gate llvm.sideeffect under -Z insert-sideeffect</title>
<updated>2019-09-27T23:13:53+00:00</updated>
<author>
<name>Xiang Fan</name>
<email>sfanxiang@gmail.com</email>
</author>
<published>2019-09-27T23:13:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=10c668190cb419b539a36214237382c6689f7daf'/>
<id>urn:sha1:10c668190cb419b539a36214237382c6689f7daf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add llvm.sideeffect to potential infinite loops and recursions</title>
<updated>2019-09-27T20:45:08+00:00</updated>
<author>
<name>Xiang Fan</name>
<email>sfanxiang@gmail.com</email>
</author>
<published>2019-06-06T00:39:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f71e0daa29b232d8f689f77fecb84dcb87fce6da'/>
<id>urn:sha1:f71e0daa29b232d8f689f77fecb84dcb87fce6da</id>
<content type='text'>
LLVM assumes that a thread will eventually cause side effect. This is
not true in Rust if a loop or recursion does nothing in its body,
causing undefined behavior even in common cases like `loop {}`.
Inserting llvm.sideeffect fixes the undefined behavior.

As a micro-optimization, only insert llvm.sideeffect when jumping back
in blocks or calling a function.

A patch for LLVM is expected to allow empty non-terminate code by
default and fix this issue from LLVM side.

https://github.com/rust-lang/rust/issues/28728
</content>
</entry>
</feed>
