about summary refs log tree commit diff
path: root/src/test/codegen/loads.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-152/+0
2022-06-15remove box derefs from codgenDrMeepster-20/+20
2022-05-25Update some codegen tests for opaque pointersNikita Popov-18/+18
2022-03-02make test work on noopt builderErik Desjardins-1/+1
2022-03-02fix tests on platforms where Align16 is represented as i128Erik Desjardins-1/+1
2022-02-28Add !align metadata on loads of &/&mut/BoxErik Desjardins-8/+36
Note that this refers to the alignment of what the loaded value points to, _not_ the alignment of the loaded value itself.
2022-02-27Apply noundef metadata to loads of types that do not permit raw initErik Desjardins-4/+83
This matches the noundef attributes we apply on arguments/return types.
2020-10-26simplify-locals: Remove unused assignments regardless of rvalue kindTomasz Miąsko-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2016-08-24Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit.Eduard Burtescu-3/+1
2016-06-20trans: generalize immediate temporaries to all MIR locals.Eduard Burtescu-0/+3
2015-09-21Avoid loading the whole gdb debug scripts section.Richard Diamond-0/+2
This is so LLVM isn't forced to load every byte of it. Also sets the alignment of the load. Adds a test for the debug script section.
2015-08-19Issue #27628 - Also support the LLVM 3.6 IR format in two testsSylvestre Ledru-4/+4
2015-06-16rustc: Update LLVMAlex Crichton-4/+4
This commit updates the LLVM submodule in use to the current HEAD of the LLVM repository. This is primarily being done to start picking up unwinding support for MSVC, which is currently unimplemented in the revision of LLVM we are using. Along the way a few changes had to be made: * As usual, lots of C++ debuginfo bindings in LLVM changed, so there were some significant changes to our RustWrapper.cpp * As usual, some pass management changed in LLVM, so clang was re-scrutinized to ensure that we're doing the same thing as clang. * Some optimization options are now passed directly into the `PassManagerBuilder` instead of through CLI switches to LLVM. * The `NoFramePointerElim` option was removed from LLVM, favoring instead the `no-frame-pointer-elim` function attribute instead. Additionally, LLVM has picked up some new optimizations which required fixing an existing soundness hole in the IR we generate. It appears that the current LLVM we use does not expose this hole. When an enum is moved, the previous slot in memory is overwritten with a bit pattern corresponding to "dropped". When the drop glue for this slot is run, however, the switch on the discriminant can often start executing the `unreachable` block of the switch due to the discriminant now being outside the normal range. This was patched over locally for now by having the `unreachable` block just change to a `ret void`.
2015-05-27Revamp codegen tests to check IR quality instead of quantityBjörn Steinbrink-0/+52
The current codegen tests only compare IR line counts between similar rust and C programs, the latter getting compiled with clang. That looked like a good idea back then, but actually things like lifetime intrinsics mean that less IR isn't always better, so the metric isn't really helpful. Instead, we can start doing tests that check specific aspects of the generated IR, like attributes or metadata. To do that, we can use LLVM's FileCheck tool which has a number of useful features for such tests. To start off, I created some tests for a few things that were recently added and/or broken.