rust/compiler/rustc_codegen_ssa/src
Jubilee 33eb552ceb
Rollup merge of #143410 - scottmcm:redo-transmute-again, r=RalfJung,workingjubilee
Block SIMD in transmute_immediate; delete `OperandValueKind`

Vectors have been causing me problems for years in this code, for example https://github.com/rust-lang/rust/pull/110021#discussion_r1160975086 and https://github.com/rust-lang/rust/pull/143194

See conversation in <https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Is.20transmuting.20a.20.60T.60.20to.20.60Tx1.60.20.28one-element.20SIMD.20vector.29.20UB.3F/near/526262799>.

By blocking SIMD in `transmute_immediate` it can be simplified to just take the `Scalar`s involved -- the backend types can be gotten from those `Scalar`s, rather than needing to be passed.  And there's an assert added to ICE it if it does get hit.

Accordingly, this changes `rvalue_creates_operand` to not send SIMD transmutes through the operand path, but to always go through memory instead, like they did back before rust-lang/rust#108442.

And thanks to those changes, I could also remove the `OperandValueKind` type that I added back then which `@RalfJung` rightly considers pretty sketchy.

cc `@folkertdev` `@workingjubilee` from the zulip conversation too
2025-07-04 23:26:24 -07:00
..
back setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
debuginfo Flatten ifs in rustc_codegen_ssa 2025-03-17 18:56:52 +00:00
mir Rollup merge of #143410 - scottmcm:redo-transmute-again, r=RalfJung,workingjubilee 2025-07-04 23:26:24 -07:00
traits setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
assert_module_sources.rs Move methods from Map to TyCtxt, part 4. 2025-03-12 08:55:37 +11:00
base.rs Remove support for dyn* 2025-07-01 19:00:21 +00:00
codegen_attrs.rs Port #[target_feature] to the new attribute parsing infrastructure 2025-07-03 07:54:19 +02:00
common.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
errors.rs Port #[target_feature] to the new attribute parsing infrastructure 2025-07-03 07:54:19 +02:00
lib.rs [Arm64EC] Only decorate functions with # 2025-06-23 12:38:35 -07:00
meth.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
mono_item.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
size_of_val.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
target_features.rs Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obk 2025-07-03 13:29:36 +02:00