rust/tests/codegen-llvm
bors f8463896a9 Auto merge of #150681 - meithecatte:always-discriminate, r=JonathanBrouwer,Nadrieril
Make operational semantics of pattern matching independent of crate and module

The question of "when does matching an enum against a pattern of one of its variants read its discriminant" is currently an underspecified part of the language, causing weird behavior around borrowck, drop order, and UB.

Of course, in the common cases, the discriminant must be read to distinguish the variant of the enum, but currently the following exceptions are implemented:

1. If the enum has only one variant, we currently skip the discriminant read.
     - This has the advantage that single-variant enums behave the same way as structs in this regard.
     - However, it means that if the discriminant exists in the layout, we can't say that this discriminant being invalid is UB. This makes me particularly uneasy in its interactions with niches – consider the following example ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=5904a6155cbdd39af4a2e7b1d32a9b1a)), where miri currently doesn't detect any UB (because the semantics don't specify any):

        <details><summary>Example 1</summary>

        ```rust
        #![allow(dead_code)]
        use core::mem::{size_of, transmute};
        
        #[repr(u8)]
        enum Inner {
            X(u8),
        }
        
        enum Outer {
            A(Inner),
            B(u8),
        }
        
        fn f(x: &Inner) {
            match x {
                Inner::X(v) => {
                    println!("{v}");
                }
            }
        }
        
        fn main() {
            assert_eq!(size_of::<Inner>(), 2);
            assert_eq!(size_of::<Outer>(), 2);
            let x = Outer::B(42);
            let y = &x;
            f(unsafe { transmute(y) });
        }
        ```

      </details>

2. For the purpose of the above, enums with marked with `#[non_exhaustive]` are always considered to have multiple variants when observed from foreign crates, but the actual number of variants is considered in the current crate.
    - This means that whether code has UB can depend on which crate it is in: https://github.com/rust-lang/rust/issues/147722
    - In another case of `#[non_exhaustive]` affecting the runtime semantics, its presence or absence can change what gets captured by a closure, and by extension, the drop order: https://github.com/rust-lang/rust/issues/147722#issuecomment-3674554872
    - Also at the above link, there is an example where removing `#[non_exhaustive]` can cause borrowck to suddenly start failing in another crate.
3. Moreover, we currently make a more specific check: we only read the discriminant if there is more than one *inhabited* variant in the enum.
    - This means that the semantics can differ between `foo<!>`, and a copy of `foo` where `T` was manually replaced with `!`: rust-lang/rust#146803
    - Moreover, due to the privacy rules for inhabitedness, it means that the semantics of code can depend on the *module* in which it is located.
    - Additionally, this inhabitedness rule is even uglier due to the fact that closure capture analysis needs to happen before we can determine whether types are uninhabited, which means that whether the discriminant read happens has a different answer specifically for capture analysis.
    - For the two above points, see the following example ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=a07d8a3ec0b31953942e96e2130476d9)):

        <details><summary>Example 2</summary>

        ```rust
        #![allow(unused)]
        
        mod foo {
            enum Never {}
            struct PrivatelyUninhabited(Never);
            pub enum A {
                V(String, String),
                Y(PrivatelyUninhabited),
            }
            
            fn works(mut x: A) {
                let a = match x {
                    A::V(ref mut a, _) => a,
                    _ => unreachable!(),
                };
                
                let b = match x {
                    A::V(_, ref mut b) => b,
                    _ => unreachable!(),
                };
            
                a.len(); b.len();
            }
            
            fn fails(mut x: A) {
                let mut f = || match x {
                    A::V(ref mut a, _) => (),
                    _ => unreachable!(),
                };
                
                let mut g = || match x {
                    A::V(_, ref mut b) => (),
                    _ => unreachable!(),
                };
            
                f(); g();
            }
        }
        
        use foo::A;
        
        fn fails(mut x: A) {
            let a = match x {
                A::V(ref mut a, _) => a,
                _ => unreachable!(),
            };
            
            let b = match x {
                A::V(_, ref mut b) => b,
                _ => unreachable!(),
            };
        
            a.len(); b.len();
        }
        
        
        fn fails2(mut x: A) {
            let mut f = || match x {
                A::V(ref mut a, _) => (),
                _ => unreachable!(),
            };
            
            let mut g = || match x {
                A::V(_, ref mut b) => (),
                _ => unreachable!(),
            };
        
            f(); g();
        }
        ```

        </details>

In light of the above, and following the discussion at rust-lang/rust#138961 and rust-lang/rust#147722, this PR ~~makes it so that, operationally, matching on an enum *always* reads its discriminant.~~ introduces the following changes to this behavior:

 - matching on a `#[non_exhaustive]` enum will always introduce a discriminant read, regardless of whether the enum is from an external crate
 - uninhabited variants now count just like normal ones, and don't get skipped in the checks

As per the discussion below, the resolution for point (1) above is that it should land as part of a separate PR, so that the subtler decision can be more carefully considered.

Note that this is a breaking change, due to the aforementioned changes in borrow checking behavior, new UB (or at least UB newly detected by miri), as well as drop order around closure captures. However, it seems to me that the combination of this PR with rust-lang/rust#138961 should have smaller real-world impact than rust-lang/rust#138961 by itself.

Fixes rust-lang/rust#142394 
Fixes rust-lang/rust#146590
Fixes rust-lang/rust#146803 (though already marked as duplicate)
Fixes parts of rust-lang/rust#147722
Fixes rust-lang/miri#4778

r? @Nadrieril @RalfJung 

@rustbot label +A-closures +A-patterns +T-opsem +T-lang
2026-02-14 12:53:09 +00:00
..
annotate-moves Add -Zannotate-moves for profiler visibility of move/copy operations 2025-11-06 15:39:45 -08:00
asm Restrict spe_acc to PowerPC SPE targets 2025-12-05 08:37:22 -06:00
autodiff Shorten the autodiff batching test, to make it more reliable 2026-01-23 23:18:52 -08:00
autovec Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
auxiliary add overflow_checks intrinsic 2025-11-08 10:57:35 -07:00
avr compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
bounds-checking Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cffi c_variadic: use Clone instead of LLVM va_copy 2026-01-20 18:38:50 +01:00
compiletest-self-test compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
cross-crate-inlining Don't treat asserts as a call in cross-crate inlining 2025-12-18 19:12:09 -05:00
debug-accessibility Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debuginfo-proc-macro Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
dllimports Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
enum discriminant reads: make semantics independent of module/crate 2026-01-15 19:12:13 +01:00
ergonomic-clones Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
float Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
gpu_offload Split ol mapper into more specific to/kernel/from mapper and move init_all_rtls into global ctor 2026-02-07 17:34:39 -08:00
hint Stabilize core::hint::cold_path 2026-01-26 13:43:06 -06:00
instrument-coverage Relax test expectation for @__llvm_profile_runtime_user 2026-01-12 11:03:07 +01:00
instrument-xray Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
intrinsics skip codegen for intrinsics with big fallback bodies if backend does not need them 2026-01-02 23:14:02 +01:00
issues Adopt matches-logical-or-141497.rs to LLVM HEAD 2026-02-04 19:20:10 +01:00
lib-optimizations Disable append-elements.rs test with debug assertions 2026-01-30 13:01:22 +01:00
loongarch LoongArch: Fix direct-access-external-data test 2026-01-20 16:26:15 +08:00
loongarch-abi Rollup merge of #151405 - heiher:fix-cli, r=Mark-Simulacrum 2026-01-25 16:27:23 +01:00
macos compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
meta-filecheck Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
naked-fn sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
non-terminate Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
option-niche-unfixed Avoid should-fail in a codegen-llvm test 2026-01-13 15:21:20 +00:00
patchable-function-entry Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
remap_path_prefix Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
repr compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
riscv-abi compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
sanitizer Adds two new Tier 3 targets - aarch64v8r-unknown-none and aarch64v8r-unknown-none-softfloat. 2026-01-26 12:43:52 +00:00
scalable-vectors codegen: implement repr(scalable) 2025-12-16 11:00:12 +00:00
simd add test for simd from array repeat codegen 2026-02-03 22:44:44 +01:00
simd-intrinsic Add alignment parameter to simd_masked_{load,store} 2025-11-04 02:30:59 +05:30
src-hash-algorithm Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
unwind-abis Skip cleanups on unsupported targets 2025-09-11 16:13:32 -07:00
aarch64-softfloat.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
aarch64-struct-align-128.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
aarch64v8r-softfloat.rs Adds two new Tier 3 targets - aarch64v8r-unknown-none and aarch64v8r-unknown-none-softfloat. 2026-01-26 12:43:52 +00:00
abi-efiapi.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
abi-main-signature-16bit-c-int.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
abi-main-signature-32bit-c-int.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
abi-repr-ext.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
abi-sysv64.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
abi-win64-zst.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
abi-x86-interrupt.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
abi-x86-sse.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
abi-x86_64_sysv.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
addr-of-mutate.rs llvm: Tolerate dead_on_return attribute changes 2026-01-21 23:39:03 +00:00
adjustments.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
align-byval-alignment-mismatch.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
align-byval-vector.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
align-byval.rs Turn moves into copies after copy propagation 2025-11-20 19:23:10 +01:00
align-enum.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
align-fn.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
align-offset.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
align-static.rs allow #[rustc_align_static(N)] on statics 2025-09-09 21:54:54 +02:00
align-struct.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
alloc-optimisation.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
amdgpu-addrspacecast.rs Avoid passing addrspacecast to lifetime intrinsics 2026-01-20 14:47:04 +01:00
amdgpu-dispatch-ptr.rs Add amdgpu_dispatch_ptr intrinsic 2026-01-09 10:41:37 +01:00
array-clone.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-cmp.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-codegen.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-equality.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-from_fn.rs sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
array-map.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-optimized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
array-repeat.rs stabilize array repeat 2025-08-15 16:42:21 +00:00
ascii-char.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
assign-desugar-debuginfo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
async-closure-debug.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
async-fn-debug-awaitee-field.rs pub async fn implementation coroutine (func::{closure#0}) is monomorphized, when func itself is monomorphized 2025-09-01 13:45:00 +07:00
async-fn-debug-msvc.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
async-fn-debug.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
atomic-operations.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
atomicptr.rs stabilize strict provenance atomic ptr 2025-08-15 16:56:11 +00:00
autovectorize-f32x4.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
backchain.rs remove redundant backchain attribute in codegen 2026-02-12 09:58:25 +01:00
become-musttail.rs Implement support for explicit tail calls in the MIR block builders and the LLVM codegen backend. 2025-07-26 01:02:29 +02:00
bigint-helpers.rs Move bigint helper tracking issues 2026-02-02 18:45:26 -05:00
binary-heap-peek-mut-pop-no-panic.rs sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
binary-search-index-no-bound-check.rs Consolidate panicking functions in slice/index.rs 2025-08-21 11:07:25 +01:00
bool-cmp.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
bounds-check-elision-slice-min.rs Multiple bounds checking elision failures 2025-08-01 18:38:22 +01:00
box-default-debug-copies.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
box-uninit-bytes.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
bpf-abi-indirect-return.rs bpf: return results larger than one register indirectly 2025-10-13 16:52:12 +00:00
bpf-alu32.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
branch-protection.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
c-variadic-lifetime.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
call-llvm-intrinsics.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
call-tmps-lifetime.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
cast-optimized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cast-target-abi.rs Fix passing/returning structs with the 64-bit SPARC ABI 2026-02-10 12:39:45 +01:00
catch-unwind.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cdylib-external-inline-fns.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cf-protection.rs Emit error when using path-segment keyword as cfg pred 2025-11-21 18:48:04 +08:00
cfguard-checks.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cfguard-disabled.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cfguard-nochecks.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cfguard-non-msvc.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
char-ascii-branchless.rs Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'. 2025-11-21 13:04:48 -06:00
char-escape-debug-no-bounds-check.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
checked_ilog.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
checked_math.rs Stabilize unchecked_neg and unchecked_shifts 2025-11-19 13:19:22 +04:00
clone-shims.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
clone_as_copy.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
codemodels.rs Verify llvm-needs-components are not empty and match the --target value 2025-07-29 11:20:23 -07:00
coercions.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
cold-attribute.rs sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
cold-call-declare-and-call.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
common_prim_int_ptr.rs Change int-to-ptr transmute lowering back to inttoptr 2025-10-10 20:14:23 -04:00
comparison-operators-2-struct.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
comparison-operators-2-tuple.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
comparison-operators-newtype.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
const-array.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
const-vector.rs Fix tests/codegen-llvm/const-vector.rs test failure on riscv64 2025-07-23 11:23:36 +00:00
const_scalar_pair.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
constant-branch.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
consts.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
coroutine-debug-msvc.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
coroutine-debug.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
darwin-no-objc.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
darwin-objc-abi-v1.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
darwin-objc-abi-v2.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
darwin-objc-cross-crate.rs initial implementation of the darwin_objc unstable feature 2025-09-13 16:06:22 -07:00
dead_on_return.rs Set dead_on_return attribute for indirect arguments 2025-08-11 12:39:23 +02:00
dealloc-no-unwind.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-alignment.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-column-msvc.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-column.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-compile-unit-path.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-fndef-size.rs mir-opt: Eliminate dead ref statements 2025-10-02 14:55:50 +08:00
debug-limited.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-line-directives-only.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-line-tables-only.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-linkage-name.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debug-vtable.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debuginfo-constant-locals.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debuginfo-cyclic-structure.rs fix(debuginfo): disable overflow check for 2025-07-27 14:42:07 +03:00
debuginfo-dse.rs debuginfo: Use LocalRef to simplify reference debuginfos 2025-10-03 08:08:22 +08:00
debuginfo-generic-closure-env-names.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
debuginfo-inline-callsite-location.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
deduced-param-attrs.rs Update tests/codegen-llvm/deduced-param-attrs.rs 2025-11-11 12:31:37 +03:00
default-requires-uwtable.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
default-visibility.rs Ignore intrinsic calls in cross-crate-inlining cost model 2025-09-05 20:44:49 -04:00
direct-access-external-data.rs LoongArch: Fix direct-access-external-data test 2026-01-20 16:26:15 +08:00
diverging-function-call-debuginfo.rs tests: Test line number in debuginfo for diverging function calls 2025-07-29 18:59:09 +02:00
dont_codegen_private_const_fn_only_used_in_const_eval.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
drop-in-place-noalias.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
drop.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
dst-offset.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
dst-vtable-align-nonzero.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
dst-vtable-size-range.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
ehcontguard_disabled.rs Verify llvm-needs-components are not empty and match the --target value 2025-07-29 11:20:23 -07:00
ehcontguard_enabled.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
emscripten-catch-unwind-js-eh.rs Emscripten: Turn wasm-eh on by default 2025-12-03 14:34:07 -08:00
emscripten-catch-unwind-wasm-eh.rs Replace NullOp::SizeOf and NullOp::AlignOf by lang items. 2025-10-23 00:38:28 +00:00
enable-lto-unit-splitting.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
error-provide.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
export-no-mangle.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
external-no-mangle-fns.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
external-no-mangle-statics.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
f128-wasm32-callconv.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
fastcall-inreg.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
fatptr.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
fewer-names.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
fixed-x18.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
float_math.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
fn-impl-trait-self.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
fn-parameters-on-different-lines-debuginfo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
force-frame-pointers.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
force-no-unwind-tables.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
force-unwind-tables.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
frame-pointer-cli-control.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
frame-pointer.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
fromrangeiter-overflow-checks.rs library: Rename IterRange* to Range*Iter 2025-12-02 16:20:50 -05:00
function-arguments-noopt.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
function-arguments.rs llvm: Tolerate dead_on_return attribute changes 2026-01-21 23:39:03 +00:00
function-return.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
gdb_debug_script_load.rs Revert "Preserve the .debug_gdb_scripts section" 2025-08-06 18:01:07 +00:00
generic-debug.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
gep-index.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
global-allocator-attributes.rs Add attributes for #[global_allocator] functions 2025-09-23 10:21:17 +02:00
gpu-kernel-abi.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
i128-wasm32-callconv.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
i128-x86-align.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
i128-x86-callconv.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
indirect-branch-cs-prefix.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
infallible-unwrap-in-opt-z.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
inherit_overflow.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
inline-always-callsite.rs Fix issue with callsite inline attribute not being applied sometimes. 2025-11-26 13:31:26 +00:00
inline-always-works-always.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
inline-debuginfo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
inline-function-args-debug-info.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
inline-hint.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
instrument-mcount.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
int-ptr-int-enum-miscompile.rs Change int-to-ptr transmute lowering back to inttoptr 2025-10-10 20:14:23 -04:00
integer-cmp.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
integer-overflow.rs Consolidate panicking functions in slice/index.rs 2025-08-21 11:07:25 +01:00
internalize-closures.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
intrinsic-no-unnamed-attr.rs Mark float intrinsics with no preconditions as safe 2025-09-21 20:37:51 -04:00
is_val_statically_known.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
issue-97217.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
iter-repeat-n-trivial-drop.rs Use repeat_packed when calculating layouts in RawVec 2026-01-21 01:11:12 -08:00
layout-size-checks.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
lifetime_start_end.rs llvm: Accept new LLVM lifetime format 2025-08-11 22:00:41 +00:00
link-dead-code.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
link_section.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
llvm-ident.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
llvm_module_flags.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
loads.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
local-generics-in-exe-internalized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
lto-removes-invokes.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mainsubprogram.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
match-optimized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
match-optimizes-away.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
match-unoptimized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
maybeuninit-array.rs Fix MaybeUninit codegen using GVN 2025-11-23 08:23:49 -05:00
maybeuninit-rvo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mem-replace-big-type.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mem-replace-simple-type.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
merge-functions.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
method-declaration.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
min-function-alignment.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mir-aggregate-no-alloca.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mir-inlined-line-numbers.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
mir_zst_stores.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
move-before-nocapture-ref-arg.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
move-operands.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
naked-asan.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
no-alloca-inside-if-false.rs sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
no-assumes-on-casts.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
no-dllimport-w-cross-lang-lto.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
no-jump-tables.rs Stabilize -Zjump-tables=<bool> into -Cjump-table=<bool> 2025-11-03 08:12:16 -06:00
no-plt.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
no-redundant-item-monomorphization.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
no_builtins-at-crate.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-box-off.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-box.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-flag.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-freeze.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-refcell.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-rwlockreadguard.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noalias-unpin.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noreturn-uninhabited.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
noreturnflag.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
nounwind.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
nrvo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
optimize-attr-1.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
option-as-slice.rs Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'. 2025-11-21 13:04:48 -06:00
option-niche-eq.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
overaligned-constant.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
overflow-checks.rs tests: Fix overflow-checks test for RISC-V target 2025-11-12 17:52:14 +08:00
packed.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
panic-abort-windows.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
panic-in-drop-abort.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
panic-unwind-default-uwtable.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
pattern_type_symbols.rs Add proper name mangling for pattern types 2025-09-23 10:59:29 +00:00
personality_lifetimes.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
pgo-counter-bias.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
pgo-instrumentation.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
pic-relocation-model.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
pie-relocation-model.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
placement-new.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
powerpc64le-struct-align-128.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
precondition-checks.rs sess: default to v0 symbol mangling 2025-11-19 11:55:09 +00:00
preserve-none.rs abi: add a rust-preserve-none calling convention 2026-01-24 19:23:17 +02:00
ptr-arithmetic.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
ptr-read-metadata.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
range-attribute.rs Add LLVM range attributes to slice length parameters 2025-10-31 16:12:30 -07:00
range-loop.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
range_to_inclusive.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
read-only-capture-opt.rs Tell LLVM about read-only captures 2025-08-20 19:08:16 +02:00
README.md Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
refs.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
reg-struct-return.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
regparm-inreg.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
repeat-operand-zero-len.rs tests: fix RISC-V failures and adjust transmute-scalar.rs target 2025-08-18 19:37:13 +00:00
repeat-operand-zst-elem.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
repeat-trusted-len.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
retpoline.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
riscv-target-abi.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
rust-abi-arch-specific-adjustment.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
s390x-simd.rs stabilize s390x_target_feature_vector 2025-11-06 12:49:48 +01:00
scalar-pair-bool.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
set-discriminant-invalid.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
skip-mono-inside-if-false.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice-as_chunks.rs Add LLVM range attributes to slice length parameters 2025-10-31 16:12:30 -07:00
slice-indexing.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice-init.rs Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'. 2025-11-21 13:04:48 -06:00
slice-iter-fold.rs Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'. 2025-11-21 13:04:48 -06:00
slice-iter-len-eq-zero.rs Reinstate bonus for unused UbChecks. 2025-12-21 00:58:00 +00:00
slice-iter-nonnull.rs Add LLVM range attributes to slice length parameters 2025-10-31 16:12:30 -07:00
slice-last-elements-optimization.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
slice-len-math.rs Add LLVM range attributes to slice length parameters 2025-10-31 16:12:30 -07:00
slice-pointer-nonnull-unwrap.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice-position-bounds-check.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice-ref-equality.rs Add LLVM range attributes to slice length parameters 2025-10-31 16:12:30 -07:00
slice-reverse.rs Consolidate panicking functions in slice/index.rs 2025-08-21 11:07:25 +01:00
slice-split-at.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice-windows-no-bounds-check.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice_as_from_ptr_range.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
slice_cse_optimization.rs add CSE optimization tests for iterating over slice 2026-01-05 05:17:56 +09:00
slp-vectorization-mul3.rs Update min-llvm-version: 22 2026-02-02 16:47:09 +05:30
some-abis-do-extend-params-to-32-bits.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
some-global-nonnull.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
some-non-zero-from-atomic-optimization.rs tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs: New test 2025-12-31 15:22:07 +01:00
sparc-struct-abi.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
split-lto-unit.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
sroa-fragment-debuginfo.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
sse42-implies-crc32.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
stack-probes-inline.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
stack-protector.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
static-relocation-model-msvc.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
staticlib-external-inline-fns.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
step_by-overflow-checks.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
stores.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
string-push.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
swap-large-types.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
swap-small-types.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
target-cpu-on-functions.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
target-feature-inline-closure.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
target-feature-negative-implication.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
target-feature-overrides.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
terminating-catchpad.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
thread-local.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
tied-features-strength.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
to_vec.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
trailing_zeros.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
transmute-optimized.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
transmute-scalar.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
try_question_mark_nop.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
tune-cpu-on-functions.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
tuple-layout-opt.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
ub-checks.rs Verify llvm-needs-components are not empty and match the --target value 2025-07-29 11:20:23 -07:00
unchecked-float-casts.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
unchecked_shifts.rs Stabilize unchecked_neg and unchecked_shifts 2025-11-19 13:19:22 +04:00
uninhabited-transparent-return-abi.rs tests: fix RISC-V failures and adjust transmute-scalar.rs target 2025-08-18 19:37:13 +00:00
uninit-consts.rs Fix MaybeUninit codegen using GVN 2025-11-23 08:23:49 -05:00
uninit-repeat-in-aggregate.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
union-abi.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
union-aggregate.rs Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
unwind-and-panic-abort.rs Skip cleanups on unsupported targets 2025-09-11 16:13:32 -07:00
unwind-extern-exports.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
unwind-extern-imports.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
unwind-landingpad-cold.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
unwind-landingpad-inline.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
used_with_arg.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
var-names.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-as-ptr.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-calloc.rs Pass alloc-variant-zeroed to LLVM 2025-08-20 17:08:46 +01:00
vec-in-place.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-iter-collect-len.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-iter.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-len-invariant.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-optimizes-away.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-reserve-extend.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-shrink-panik.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec-with-capacity.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vec_pop_push_noop.rs tests: use max-llvm-major-version instead of ignore-llvm-version 2025-09-26 13:32:03 -04:00
vecdeque-drain.rs Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'. 2025-11-21 13:04:48 -06:00
vecdeque-nonempty-get-no-panic.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vecdeque_no_panic.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vecdeque_pop_push.rs tests: use max-llvm-major-version instead of ignore-llvm-version 2025-09-26 13:32:03 -04:00
virtual-call-attrs-issue-137646.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
virtual-function-elimination-32bit.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
virtual-function-elimination.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vtable-loads.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
vtable-upcast.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
wasm_casts_trapping.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
wasm_exceptions.rs Move wasm throw intrinsic back to unwind 2025-10-30 15:13:32 +03:00
zip.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
zst-offset.rs Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00

The files here use the LLVM FileCheck framework, documented at https://llvm.org/docs/CommandGuide/FileCheck.html.

One extension worth noting is the use of revisions as custom prefixes for FileCheck. If your codegen test has different behavior based on the chosen target or different compiler flags that you want to exercise, you can use a revisions annotation, like so:

// revisions: aaa bbb
// [bbb] compile-flags: --flags-for-bbb

After specifying those variations, you can write different expected, or explicitly unexpected output by using <prefix>-SAME: and <prefix>-NOT:, like so:

// CHECK: expected code
// aaa-SAME: emitted-only-for-aaa
// aaa-NOT:                        emitted-only-for-bbb
// bbb-NOT:  emitted-only-for-aaa
// bbb-SAME:                       emitted-only-for-bbb