14 Commits

Author SHA1 Message Date
cyrgani 83ef5059d6 make rustc_allow_const_fn_unstable an actual rustc_attrs attribute 2026-02-17 20:16:29 +00:00
Ralf Jung 57e44f5046 skip codegen for intrinsics with big fallback bodies if backend does not need them 2026-01-02 23:14:02 +01:00
Ben Kimock 315646a7a0 Remove the explicit branch hint from const_panic 2025-12-29 10:30:02 -05:00
Ralf Jung a00db66b00 use fallback impl in LLVM backend 2025-11-06 08:02:10 +01:00
Ralf Jung 3796f7de57 compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
Ben Kimock 029579d177 Change int-to-ptr transmute lowering back to inttoptr 2025-10-10 20:14:23 -04:00
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