<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src/mir, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-20T17:22:09+00:00</updated>
<entry>
<title>Ban projecting into SIMD types [MCP838]</title>
<updated>2025-07-20T17:22:09+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2025-03-07T03:13:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=41ce1ed252f194756fb2f3e3e92bbdfb3940088d'/>
<id>urn:sha1:41ce1ed252f194756fb2f3e3e92bbdfb3940088d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too</title>
<updated>2025-07-20T03:50:02+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2025-07-10T06:59:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0586c63e070981af7df53e2f778d3e50293d8103'/>
<id>urn:sha1:0586c63e070981af7df53e2f778d3e50293d8103</id>
<content type='text'>
The conversation in 143502 made be realize how easy this is to handle, since the only possibilty is ZSTs -- everything else ends up with the destination being `LocalKind::Memory` and thus doesn't call `codegen_rvalue_operand` at all.

This gets us perilously close to a world where `rvalue_creates_operand` only ever returns true.  I'll try out such a world next :)

</content>
</entry>
<entry>
<title>Auto merge of #143784 - scottmcm:enums-again-new-ex2, r=dianqk</title>
<updated>2025-07-19T08:03:40+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-07-19T08:03:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=83825dd277503edf5d7eda6be8b5fb9896f343f5'/>
<id>urn:sha1:83825dd277503edf5d7eda6be8b5fb9896f343f5</id>
<content type='text'>
Simplify discriminant codegen for niche-encoded variants which don't wrap across an integer boundary

Inspired by rust-lang/rust#139729, this attempts to be a much-simpler and more-localized change while still making a difference.  (Specifically, this does not try to solve the problem with select-sinking, leaving that to be fixed by https://github.com/llvm/llvm-project/issues/134024 -- once it gets released -- instead of in rustc's codegen.)

What this *does* improve is checking for the variant in a 3+ variant enum when that variant is the type providing the niche.  Something like `if let Foo::WithBool(_) = ...` previously compiled to `ugt(add(x, -2), 2)`, which is non-trivial to think about because it's depending on the unsigned wrapping to shift the 0/1 up above 2.  With this PR it compiles to just `ult(x, 2)`, which is probably what you'd have written yourself if you were doing it by hand to look for "is this byte a bool?".

That's done by leaving most of the codegen alone, but adding a couple new special cases to the `is_niche` check.  The default looks at the relative discriminant, but in the common cases where there's no wraparound involved, we can just check the original value, rather than the offsetted one.

The first commit just adds some tests, so the best way to see the effect of this change is to look at the second commit and how it updates the test expectations.
</content>
</entry>
<entry>
<title>use `codegen_instance_attrs` where an instance is (easily) available</title>
<updated>2025-07-16T21:24:32+00:00</updated>
<author>
<name>Folkert de Vries</name>
<email>folkert@folkertdev.nl</email>
</author>
<published>2025-07-02T09:12:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9c8ab891876b37aac458a7461d904fe593856745'/>
<id>urn:sha1:9c8ab891876b37aac458a7461d904fe593856745</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add `codegen_instance_attrs` query</title>
<updated>2025-07-16T19:38:58+00:00</updated>
<author>
<name>Folkert de Vries</name>
<email>folkert@folkertdev.nl</email>
</author>
<published>2025-07-02T08:46:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ec0ff720d1a89cb51edd90116c6e70051affa95f'/>
<id>urn:sha1:ec0ff720d1a89cb51edd90116c6e70051affa95f</id>
<content type='text'>
and use it for naked functions
</content>
</entry>
<entry>
<title>Improve comments inside `codegen_get_discr`</title>
<updated>2025-07-16T05:30:46+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2025-07-16T05:28:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4fa23d96bc9334716b8f50511f5a920b46d349dd'/>
<id>urn:sha1:4fa23d96bc9334716b8f50511f5a920b46d349dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify codegen for niche-encoded variant tests</title>
<updated>2025-07-12T11:53:24+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2025-07-11T12:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d5bcfb334b616e01c3589ba7b1697c7ebc47a024'/>
<id>urn:sha1:d5bcfb334b616e01c3589ba7b1697c7ebc47a024</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #143766 - matthiaskrgr:rollup-0x7t69s, r=matthiaskrgr</title>
<updated>2025-07-12T07:44:04+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-07-12T07:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2f9c9cede68be26774ea44efc79d0391f1c58af2'/>
<id>urn:sha1:2f9c9cede68be26774ea44efc79d0391f1c58af2</id>
<content type='text'>
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#142391 (rust: library: Add `setsid` method to `CommandExt` trait)
 - rust-lang/rust#143302 (`tests/ui`: A New Order [27/N])
 - rust-lang/rust#143303 (`tests/ui`: A New Order [28/28] FINAL PART)
 - rust-lang/rust#143568 (std: sys: net: uefi: tcp4: Add timeout support)
 - rust-lang/rust#143611 (Mention more APIs in `ParseIntError` docs)
 - rust-lang/rust#143661 (chore: Improve how the other suggestions message gets rendered)
 - rust-lang/rust#143708 (fix: Include frontmatter in -Zunpretty output )
 - rust-lang/rust#143718 (Make UB transmutes really UB in LLVM)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: i686-gnu-nopt-1
try-job: test-various
</content>
</entry>
<entry>
<title>Rollup merge of #143718 - scottmcm:ub-transmute-is-ub, r=WaffleLapkin</title>
<updated>2025-07-11T05:35:22+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-07-11T05:35:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e43481e362431442f2a6e39c3c2d3001ff0cf917'/>
<id>urn:sha1:e43481e362431442f2a6e39c3c2d3001ff0cf917</id>
<content type='text'>
Make UB transmutes really UB in LLVM

Ralf suggested in &lt;https://github.com/rust-lang/rust/pull/143410#discussion_r2184928123&gt; that UB transmutes shouldn't be trapping, which happened for the one path *that* PR was changing, but there's another path as well, so *this* PR changes that other path to match.

r? codegen
</content>
</entry>
<entry>
<title>Auto merge of #142911 - mejrs:unsized, r=compiler-errors</title>
<updated>2025-07-11T05:27:32+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-07-11T05:27:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=855e0fe46e68d94e9f6147531b75ac2d488c548e'/>
<id>urn:sha1:855e0fe46e68d94e9f6147531b75ac2d488c548e</id>
<content type='text'>
Remove support for dynamic allocas

Followup to rust-lang/rust#141811
</content>
</entry>
</feed>
