about summary refs log tree commit diff
path: root/tests/codegen-llvm
AgeCommit message (Collapse)AuthorLines
2025-07-26Rollup merge of #144359 - RalfJung:vararg-codegen, r=compiler-errorsJacob Pratt-0/+86
add codegen test for variadics This is a part of https://github.com/rust-lang/rust/pull/144066 that can land without FCP.
2025-07-26Auto merge of #143860 - scottmcm:transmute-always-rvalue, r=WaffleLapkinbors-10/+192
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-26Rollup merge of #144341 - CaiWeiran:const-vector_test, r=wesleywiserTrevor Gross-0/+2
Enable const-vector.rs test on RISC-V (riscv64) This PR replaces [#144283](https://github.com/rust-lang/rust/pull/144283) to resolve merge conflicts. This PR adds support for running the `tests/codegen/const-vector.rs` test on the RISC-V (riscv64) architecture. Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent. The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected. ### Notes: - This change is scoped specifically to improve RISC-V compatibility. - It does not affect behavior or test results on other architectures.
2025-07-23Don't emit two `assume`s in transmutes when one is a subset of the otherScott McMurray-8/+41
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-23re-enable direct `bitcast`s for Int/Float vector transmutes (but not ones ↵Scott McMurray-0/+176
involving pointers)
2025-07-23Let `codegen_transmute_operand` just handle everythingScott McMurray-10/+16
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-23add codegen test for variadics (also replacing some existing does-this-build ↵Ralf Jung-0/+86
tests)
2025-07-23Fix tests/codegen-llvm/const-vector.rs test failure on riscv64Caiweiran-0/+2
2025-07-22Rename `tests/codegen` into `tests/codegen-llvm`Guillaume Gomez-0/+31706