mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-30 01:35:30 +00:00
emit attribute for readonly non-pure inline assembly fixes https://github.com/rust-lang/rust/issues/146761 Provide a better `MemoryEffects` to LLVM when an inline assembly block specifies `readonly` but not `pure`. That means that the assembly block may not perform any writes, but that there still may be side effects from its instructions. I haven't been able to find a case yet where this actually matters, though. So the test checks that the right attribute is applied, but the generated assembly is equivalent to not specifying `readonly` at all. r? ````@nikic```` cc ````@Amanieu````