Commit Graph

8 Commits

Author SHA1 Message Date
Josh Stone
580b4891aa Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
Folkert de Vries
d25910eaeb make prefetch intrinsics safe 2025-08-20 00:35:42 +02:00
Matthew Maurer
258915a555 llvm: Accept new LLVM lifetime format
LLVM removed the size parameter from the lifetime format.
Tolerate not having that size parameter.
2025-08-11 22:00:41 +00:00
bors
283a0746a2 Auto merge of #143860 - scottmcm:transmute-always-rvalue, r=WaffleLapkin
Let `codegen_transmute_operand` just handle everything

When combined with rust-lang/rust#143720, this means `rvalue_creates_operand` can just return `true` for *every* `Rvalue`.  (A future PR could consider removing it, though just letting it optimize out is fine for now.)

It's nicer anyway, IMHO, because it avoids needing the layout checks to be consistent in the two places, and thus is an overall reduction in code.  Plus it's a more helpful building block when used in other places this way.

(TBH, it probably would have been better to have it this way the whole time, but I clearly didn't understand `rvalue_creates_operand` when I originally wrote rust-lang/rust#109843.)
2025-07-26 22:45:18 +00:00
Scott McMurray
a93a9aa2d5 Don't emit two assumes in transmutes when one is a subset of the other
For example, transmuting between `bool` and `Ordering` doesn't need two `assume`s because one range is a superset of the other.

Multiple are still used for things like `char` <-> `NonZero<u32>`, which overlap but where neither fully contains the other.
2025-07-23 09:16:32 -07:00
Scott McMurray
ea0c7788c0 re-enable direct bitcasts for Int/Float vector transmutes (but not ones involving pointers) 2025-07-23 08:32:46 -07:00
Scott McMurray
231dddde3e Let codegen_transmute_operand just handle everything
When combined with 143720, this means `rvalue_creates_operand` can just return `true` for *every* `Rvalue`.  (A future PR could consider removing it, though just letting it optimize out is fine for now.)

It's nicer anyway, IMHO, because it avoids needing the layout checks to be consistent in the two places, and thus is an overall reduction in code.  Plus it's a more helpful building block when used in other places this way.
2025-07-23 08:25:13 -07:00
Guillaume Gomez
a27f3e3fd1 Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00