about summary refs log tree commit diff
path: root/src/test/codegen/packed.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-153/+0
2022-05-25Update some codegen tests for opaque pointersNikita Popov-20/+20
2022-02-06apply noundef explicitly in all cases instead of relying on dereferenceable ↵Erik Desjardins-2/+2
implying it
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-1/+1
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-21Don't compute optimized PointerKind for unoptimized buildsNikita Popov-1/+1
This saves us both the Freeze/Unpin queries, and avoids placing noalias attributes, which have a compile-time impact on LLVM even in optnone builds (due to always_inline functions).
2021-02-28Support LLVM 12 in rustcNikita Popov-2/+2
2019-12-02Update the minimum external LLVM to 7Josh Stone-1/+0
LLVM 7 is over a year old, which should be plenty for compatibility. The last LLVM 6 holdout was llvm-emscripten, which went away in #65501. I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`, which was broken by #66522.
2019-04-22Remove double trailing newlinesvarkor-1/+0
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-23Rollup merge of #57053 - nikic:fix-gep-align, r=nagisaMazdak Farrokhzad-0/+36
Fix alignment for array indexing We need to reduce the alignment with the used offset. If the offset isn't known, use the element size, as this will yield the minimum possible alignment. This handles both direct array indexing, and array repeat expressions. Fixes #56927. r? @nagisa
2018-12-21Fix alignment for array indexingNikita Popov-0/+36
We need to reduce the alignment with the used offset. If the offset isn't known, we need to reduce with the element size to support arbitrary offsets.
2018-12-21Stabilize #[repr(packed(N))]Taylor Cramer-1/+0
2018-11-04Support memcpy/memmove with differing src/dst alignmentNikita Popov-2/+2
If LLVM 7 is used, generate memcpy/memmove with differing src/dst alignment. I've added new FFI functions to construct these through the builder API, which is more convenient than dealing with differing intrinsic signatures depending on the LLVM version.
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-6/+8
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-04-11Implementation of `#[repr(packed(n))]` RFC 1399.Cameron Hart-13/+71
2017-12-02rustc: don't unpack newtypes of scalar-pairs with mismatched alignment.Eduard-Mihai Burtescu-0/+11
2017-11-19rustc_trans: work around i686-pc-windows-msvc byval align LLVM bug.Eduard-Mihai Burtescu-1/+1
2017-11-19rustc: encode scalar pairs in layout ABI.Eduard-Mihai Burtescu-4/+1
2017-11-19rustc_trans: compute better align/dereferenceable attributes from pointees.Eduard-Mihai Burtescu-1/+1
2017-03-13emit !align attributes on stores of operand pairsAriel Ben-Yehuda-0/+33
cc #40373
2017-02-08emit "align 1" metadata on loads/stores of packed structsAriel Ben-Yehuda-0/+29
According to the LLVM reference: > A value of 0 or an omitted align argument means that the operation has the ABI alignment for the target. So loads/stores of fields of packed structs need to have their align set to 1. Implement that by tracking the alignment of `LvalueRef`s. Fixes #39376.