Commit Graph

8 Commits

Author SHA1 Message Date
DianQK
9589eb95d2
Add -Zlint-llvm-ir 2024-08-29 18:12:31 +08:00
DianQK
2ef82805d5
Use the aligned size for alloca at ret when the pass mode is cast. 2024-07-02 06:33:40 +08:00
DianQK
c453dcd62a
Use the aligned size for alloca at args when the pass mode is cast.
The `load` and `store` instructions in LLVM access the aligned size.
2024-07-02 06:33:35 +08:00
DianQK
09e0abb0d1
Add the definition for extern "C" at cast-target-abi.rs. 2024-07-02 06:31:35 +08:00
Nicholas Nethercote
72800d3b89 Run rustfmt on tests/codegen/.
Except for `simd-intrinsic/`, which has a lot of files containing
multiple types like `u8x64` which really are better when hand-formatted.

There is a surprising amount of two-space indenting in this directory.

Non-trivial changes:
- `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the
  test.
- `rustfmt::skip` used in a few places where hand-formatting read more
  nicely: `enum/enum-match.rs`
- Line number adjustments needed for the expected output of
  `debug-column.rs` and `coroutine-debug.rs`.
2024-05-31 15:56:43 +10:00
Erik Desjardins
f4426c189f use [N x i8] for alloca types 2024-04-11 21:42:35 -04:00
Erik Desjardins
dec81ac223 disable crashing test on sparc 2024-03-17 13:40:27 -04:00
Erik Desjardins
8d5fd94e62 add tests for PassMode::Cast fixes
Tests added in cast-target-abi.rs, covering the single element, array,
and prefix cases in `CastTarget::llvm_type`, and the Rust-is-larger/smaller
cases in the Rust<->ABI copying code.

ffi-out-of-bounds-loads.rs was overhauled to be runnable on any
platform. Its alignment also increases due to the removal of a `min` in
the previous commit; this was probably an insufficient workaround for
this issue or similar. The higher alignment is fine, since the alloca is
actually aligned to 8 bytes, as the test checks now confirm.
2024-03-17 00:39:21 -04:00