rust/src/test/codegen
Matthew Maurer fb2c27d73f CFI: Monomorphize transparent ADTs before typeid
Monomorphise `#[repr(transparent)]` parameterized ADTs before turning
them into an Itanium mangled String.

`#[repr(transparent)]` ADTs currently use the single field to represent
them in their CFI type ID to ensure that they are compatible. However,
if that type involves a type parameter instantiated at the ADT level, as
in `ManuallyDrop`, this will currently ICE as the `Parameter` type
cannot be mangled. Since this happens at lowering time, it should always
be concrete after substitution.

Fixes #106230
2022-12-29 10:21:07 -08:00
..
auxiliary test/codegen: test inter-crate linkage with static relocation 2022-11-29 11:21:16 +01:00
avr fix transmutes between pointers in different address spaces 2022-12-11 22:27:09 -05:00
dllimports Ignore gnu systems (windows-msvc only) 2022-12-01 14:40:10 +01:00
intrinsics fix ptr_mask codegen test wrt llvm opaque pointers 2022-08-21 07:04:11 +04:00
non-terminate Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
remap_path_prefix Fix failing codegen tests on s390x 2022-12-06 18:12:46 +01:00
riscv-abi Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
simd-intrinsic Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
src-hash-algorithm Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
unwind-abis abort immediately on bad mem::zeroed/uninit 2022-12-22 16:37:42 +01:00
abi-efiapi.rs Use aapcs for efiapi calling convention on arm 2022-11-06 18:05:24 -05:00
abi-main-signature-16bit-c-int.rs test: codegen: skip tests inappropriate for riscv64 2020-06-04 12:02:03 +01:00
abi-main-signature-32bit-c-int.rs Allow hidden in src/test/codegen/abi-main-signature-32bit-c-int.rs 2022-09-30 14:55:26 -07:00
abi-repr-ext.rs Update codegen tests to accommodate the potential presence/absence of the 2022-08-19 16:15:15 -04:00
abi-sysv64.rs short-circuit the easy cases in is_copy_modulo_regions 2022-03-10 01:19:02 -08:00
abi-x86-interrupt.rs short-circuit the easy cases in is_copy_modulo_regions 2022-03-10 01:19:02 -08:00
abi-x86_64_sysv.rs Remove licenses 2018-12-25 21:08:33 -07:00
adjustments.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
align-enum.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
align-fn.rs Allow specifying alignment for functions 2021-04-05 17:36:51 -04:00
align-struct.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
alloc-optimisation.rs Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
array-clone.rs Specialize array cloning for Copy types 2021-11-09 21:43:20 -08:00
array-equality.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
asm-clobber_abi.rs fix clobber_abi tests 2022-05-17 07:11:29 -04:00
asm-clobbers.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
asm-may_unwind.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
asm-multiple-options.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
asm-options.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
asm-powerpc-clobbers.rs Add features gates for experimental asm features 2021-11-07 01:23:53 +00:00
asm-sanitize-llvm.rs Fix lint capitalization and ignoring, test with include_str 2021-08-04 13:38:17 -04:00
asm-target-clobbers.rs Handle tmm_reg in rustc_codegen_gcc 2022-05-17 06:34:58 -04:00
async-fn-debug-awaitee-field.rs Avoid GenFuture shim when compiling async constructs 2022-11-24 10:04:27 +01:00
async-fn-debug-msvc.rs [debuginfo] Update codegen tests for new cpp-like enum debuginfo encoding. 2022-08-12 12:00:02 +02:00
async-fn-debug.rs debuginfo: Refactor debuginfo generation for types 2022-03-14 16:49:06 +01:00
atomic-operations.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
autovectorize-f32x4.rs Add a missing #[no_mangle] 2022-03-03 19:52:45 +00:00
binary-search-index-no-bound-check.rs Tell LLVM that partition_point returns a valid fencepost 2022-09-30 23:39:15 -07:00
bool-cmp.rs Update bool-cmp.rs codegen 2020-01-07 21:28:22 +01:00
box-maybe-uninit-llvm14.rs codegen: use new {re,de,}allocator annotations in llvm 2022-07-26 09:43:28 -04:00
box-maybe-uninit.rs codegen: use new {re,de,}allocator annotations in llvm 2022-07-26 09:43:28 -04:00
bpf-alu32.rs BPF: remove unnecessary flags from src/test/codegen/bpf-alu32.rs 2021-05-30 11:50:43 +10:00
branch-protection.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
c-variadic-copy.rs Expose VaListImpl as the Rust equivalent of __va_list_tag and implement Clone for it. 2019-06-17 16:04:49 -07:00
c-variadic-opt.rs Expose VaListImpl as the Rust equivalent of __va_list_tag and implement Clone for it. 2019-06-17 16:04:49 -07:00
c-variadic.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
call-llvm-intrinsics.rs Update tests for extern block linting 2021-01-13 07:49:16 -05:00
call-metadata.rs Apply noundef attribute to all scalar types which do not permit raw init 2022-02-26 16:42:33 -05:00
catch-unwind.rs Fix failing codegen tests on s390x 2022-12-06 18:12:46 +01:00
cdylib-external-inline-fns.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
cf-protection.rs Add support for control-flow protection 2022-02-14 08:31:24 -08:00
cfguard-checks.rs Stabilize control-flow-guard codegen option 2020-07-14 15:27:42 +01:00
cfguard-disabled.rs Stabilize control-flow-guard codegen option 2020-07-14 15:27:42 +01:00
cfguard-nochecks.rs Stabilize control-flow-guard codegen option 2020-07-14 15:27:42 +01:00
cfguard-non-msvc.rs Stabilize control-flow-guard codegen option 2020-07-14 15:27:42 +01:00
codemodels.rs Use only x86_64 flag 2021-03-14 01:46:00 +09:00
coercions.rs Remove licenses 2018-12-25 21:08:33 -07:00
cold-call-declare-and-call.rs Fix the coldcc codegen test on wasm32 2022-06-05 16:02:10 -07:00
comparison-operators-newtype.rs Codegen test for derived < on trivial newtype [TEST ONLY] 2022-12-23 15:14:54 -08:00
consts.rs Avoid unnecessary 1-tuples in derived code. 2022-07-04 18:37:29 +10:00
dealloc-no-unwind.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
debug-alignment.rs Specify DWARF alignment in bits, not bytes. 2022-06-07 13:38:35 -07:00
debug-column-msvc.rs Test that column information is not emitted for MSVC targets 2020-02-26 21:45:34 +01:00
debug-column.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
debug-compile-unit-path.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
debug-linkage-name.rs Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
debug-vtable.rs [debuginfo] Update codegen tests for new cpp-like enum debuginfo encoding. 2022-08-12 12:00:02 +02:00
debuginfo-generic-closure-env-names.rs Use CHECK-DAG in codegen/debuginfo-generic-closure-env-names.rs 2022-03-01 15:53:22 -08:00
deduced-param-attrs.rs Introduce deduced parameter attributes, and use them for deducing readonly on 2022-10-21 02:33:15 -07:00
default-requires-uwtable.rs Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
drop.rs Fix codegen test for MSVC 2022-02-19 17:29:56 +00:00
dst-vtable-align-nonzero.rs disable mergefunc instead of making fns unique 2022-12-08 19:33:14 -05:00
dst-vtable-size-range.rs disable mergefunc instead of making fns unique 2022-12-08 19:33:14 -05:00
enum-bounds-check-derived-idx.rs Remove bounds check with enum cast 2022-10-31 14:10:37 +03:00
enum-bounds-check-issue-13926.rs Remove bounds check with enum cast 2022-10-31 14:10:37 +03:00
enum-bounds-check-issue-82871.rs Change enum->int casts to not go through MIR casts. 2022-06-30 07:47:07 +00:00
enum-bounds-check.rs Remove bounds check with enum cast 2022-10-31 14:10:37 +03:00
enum-debug-clike.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
enum-debug-niche-2.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
enum-debug-niche.rs Update the minimum external LLVM to 8 2020-04-14 12:44:41 -07:00
enum-debug-tagged.rs Update the minimum external LLVM to 8 2020-04-14 12:44:41 -07:00
enum-discriminant-value.rs Update tests to remove old numeric constants 2020-11-29 00:55:55 -05:00
enum-match.rs Make enum-match.rs test robust against variable name changes 2022-12-16 17:32:29 -05:00
export-no-mangle.rs Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
external-no-mangle-fns.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
external-no-mangle-statics.rs Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by default 2022-07-27 03:20:25 +02:00
fastcall-inreg.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
fatptr.rs Remove licenses 2018-12-25 21:08:33 -07:00
fewer-names.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
ffi-const.rs LLVM 16: Switch to using MemoryEffects 2022-11-04 17:58:16 +00:00
ffi-out-of-bounds-loads.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
ffi-pure.rs LLVM 16: Switch to using MemoryEffects 2022-11-04 17:58:16 +00:00
ffi-returns-twice.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
float_math.rs Remove licenses 2018-12-25 21:08:33 -07:00
fn-impl-trait-self.rs debuginfo: Simplify TypeMap used during LLVM debuginfo generation. 2022-02-21 13:03:36 +01:00
foo.s Add global_asm tests 2017-04-12 19:12:50 -05:00
force-frame-pointers.rs Update the minimum external LLVM to 8 2020-04-14 12:44:41 -07:00
force-no-unwind-tables.rs Allow using -C force-unwind-tables=no when panic=unwind 2021-04-11 22:32:40 +08:00
force-unwind-tables.rs fully exploited the dropped support of LLVM 8 2020-11-12 14:39:47 +01:00
frame-pointer.rs short-circuit the easy cases in is_copy_modulo_regions 2022-03-10 01:19:02 -08:00
function-arguments-noopt.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
function-arguments.rs Introduce deduced parameter attributes, and use them for deducing readonly on 2022-10-21 02:33:15 -07:00
gdb_debug_script_load.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
generator-debug-msvc.rs Bless codegen. 2022-09-13 19:18:24 +02:00
generator-debug.rs Bless codegen test. 2022-09-13 19:18:24 +02:00
generic-debug.rs Remove unnecessary ignore-tidy-linelength 2019-04-23 11:42:14 +01:00
global_asm.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
global_asm_include.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
global_asm_x2.rs Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
i686-macosx-deployment-target.rs Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
i686-no-macosx-deployment-target.rs Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
inline-always-works-always.rs Support revisions for codegen tests 2019-01-24 20:13:51 +02:00
inline-debuginfo.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
inline-hint.rs mir-opt: Replace clone on primitives with copy 2022-03-10 01:19:02 -08:00
instrument-coverage.rs Add support for generating unique *.profraw files by default when using the -C instrument-coverage flag. 2022-08-11 16:04:08 -07:00
instrument-mcount.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
integer-cmp.rs Small improvement for Ord implementation of integers 2019-08-29 03:52:18 +00:00
integer-overflow.rs Added a codegen test for a recent optimization for overflow-checks=on 2020-05-24 16:20:02 -04:00
internalize-closures.rs Ensure that closure call is not removed by MIR optimizations in a test 2020-11-12 00:00:00 +00:00
intrinsic-no-unnamed-attr.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-13018.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-15953.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-27130.rs Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
issue-32031.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
issue-32364.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-34634.rs Fix a bunch of typo 2022-08-31 18:24:55 +08:00
issue-34947-pow-i32.rs Gate llvm.sideeffect under -Z insert-sideeffect 2019-09-28 07:13:53 +08:00
issue-37945.rs fix tests, update size asserts 2022-11-22 23:12:26 +01:00
issue-44056-macos-tls-align.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
issue-45222.rs Disable failing codegen test 2020-02-08 18:47:41 -05:00
issue-45466.rs ignore some codegen tests in debug mode 2019-07-15 16:56:43 +02:00
issue-45964-bounds-check-slice-pos.rs Add codegen test for #45964 2020-10-23 01:15:08 +02:00
issue-47278.rs Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
issue-47442.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-56267-2.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
issue-56267.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
issue-56927.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
issue-58881.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
issue-59352.rs Bump mir-opt-level from 2 to 3 in tests 2021-03-05 17:13:57 -03:00
issue-69101-bounds-check.rs Slightly improve panic messages when range indices are out of bounds 2020-07-20 00:40:42 +02:00
issue-73031.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
issue-73338-effecient-cmp.rs Optimize PartialOrd le 2021-04-04 20:37:48 +03:00
issue-73396-bounds-check-after-position.rs Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
issue-73827-bounds-check-index-in-subexpr.rs Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
issue-75525-bounds-checks.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
issue-75546.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
issue-75659.rs Amend codegen test. 2022-07-01 17:45:13 +02:00
issue-77812.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
issue-81408-dllimport-thinlto-windows.rs Fix Access Violation when using lld & ThinLTO on windows-msvc 2022-11-03 11:17:42 -04:00
issue-84268.rs Don't set fast(-math) for certain simd ops 2021-04-17 23:33:10 +03:00
issue-85872-multiple-reverse.rs Add test for issue #85872 2022-08-30 15:03:22 +02:00
issue-96274.rs Add another MaybeUninit array test with const 2022-08-29 23:17:24 -04:00
issue-96497-slice-size-nowrap.rs use unchecked mul to compute slice sizes 2022-06-14 17:09:07 -04:00
issue-98156-const-arg-temp-lifetime.rs Added test for const arg lifetimes suggested by erikdesjardins. 2022-06-25 16:43:32 +02:00
issue-98294-get-mut-copy-from-slice-opt.rs Add test for #98294 2022-09-05 15:24:18 +02:00
issue-103285-ptr-addr-overflow-check.rs Don't use usub.with.overflow intrinsic 2022-10-20 12:47:17 +02:00
issue-105386-ub-in-debuginfo.rs Don't generate pointer loads to spills unless necessary 2022-12-08 20:38:23 -05:00
iter-repeat-n-trivial-drop.rs VecDeque::resize should re-use the buffer in the passed-in element 2022-11-15 00:53:26 -08:00
layout-size-checks.rs Re-optimize Layout::array 2022-07-13 17:07:41 -07:00
lifetime_start_end.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
link-dead-code.rs test: support both (legacy and v0) choices of mangling. 2019-05-31 18:24:53 +03:00
link_section.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
loads.rs remove box derefs from codgen 2022-06-15 18:38:26 -07:00
local-generics-in-exe-internalized.rs test: support both (legacy and v0) choices of mangling. 2019-05-31 18:24:53 +03:00
lto-removes-invokes.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
mainsubprogram.rs Adjust codegen tests for DISPFlagMainSubprogram 2019-07-09 21:55:29 +02:00
mainsubprogramstart.rs Adjust codegen tests for DISPFlagMainSubprogram 2019-07-09 21:55:29 +02:00
match-optimized.rs Use br instead of switch in more cases. 2022-10-31 10:16:39 +11:00
match-optimizes-away.rs Remove licenses 2018-12-25 21:08:33 -07:00
match-unoptimized.rs Use br instead of switch in more cases. 2022-10-31 10:16:39 +11:00
mem-replace-direct-memcpy.rs fix tests, update size asserts 2022-11-22 23:12:26 +01:00
merge-functions.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
mir-inlined-line-numbers.rs Fix line numbers for MIR inlined code 2022-10-14 18:44:30 -04:00
mir_zst_stores.rs Remove licenses 2018-12-25 21:08:33 -07:00
naked-functions.rs Reject unsupported naked functions 2022-01-21 17:38:21 +01:00
naked-nocoverage.rs Disable coverage instrumentation for naked functions 2022-12-03 01:03:28 +01:00
naked-noinline.rs Stop emitting CET prologues for naked functions 2022-07-06 22:44:54 -07:00
no-assumes-on-casts.rs Remove licenses 2018-12-25 21:08:33 -07:00
no-dllimport-w-cross-lang-lto.rs Stabilize linker-plugin based LTO. 2019-02-12 15:10:29 +01:00
no-jump-tables.rs Add -Zno-jump-tables 2022-12-20 21:42:54 +01:00
no-plt.rs Relax a codegen test 2021-08-03 07:59:59 -07:00
noalias-box-off.rs Add flag to configure noalias on Box<T> 2022-07-19 16:02:59 +02:00
noalias-box.rs Add flag to configure noalias on Box<T> 2022-07-19 16:02:59 +02:00
noalias-refcell.rs Test RefCell aliasing 2022-05-13 12:08:54 -07:00
noalias-rwlockreadguard.rs UnsafeCell -> RwLock 2022-06-20 04:44:25 +00:00
noalias-unpin.rs Don't compute optimized PointerKind for unoptimized builds 2021-03-21 20:54:42 +01:00
noreturn-uninhabited.rs Remove unnecessary ignore-tidy-linelength 2019-04-23 11:42:14 +01:00
noreturnflag.rs Remove unnecessary ignore-tidy-linelength 2019-04-23 11:42:14 +01:00
nounwind.rs Remove double trailing newlines 2019-04-22 16:57:01 +01:00
nrvo.rs Test that NRVO elides the call to memcpy 2020-05-17 10:24:06 -07:00
optimize-attr-1.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
option-nonzero-eq.rs Specialize PartialEq for Option<num::NonZero*> and Option<ptr::NonNull> 2022-10-31 16:43:31 +00:00
packed.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
panic-abort-windows.rs Ignore gnu systems (windows-msvc only) 2022-12-01 14:40:10 +01:00
panic-in-drop-abort.rs Drop inaccurate comment 2022-04-20 09:25:47 +02:00
panic-unwind-default-uwtable.rs Allow using -C force-unwind-tables=no when panic=unwind 2021-04-11 22:32:40 +08:00
personality_lifetimes.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
pgo-counter-bias.rs Don't internalize __llvm_profile_counter_bias 2022-12-07 16:32:59 +00:00
pgo-instrumentation.rs Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pic-relocation-model.rs Auto merge of #97800 - pnkfelix:issue-97463-fix-aarch64-call-abi-does-not-zeroext, r=wesleywiser 2022-09-16 20:08:05 +00:00
pie-relocation-model.rs update test for LLVM change 2022-08-19 15:52:43 +00:00
README.md elaborate how revisions work with FileCheck stuff in src/test/codegen 2022-08-19 16:40:26 -04:00
refs.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
repeat-trusted-len.rs Tune RepeatWith::try_fold and Take::for_each and Vec::extend_trusted 2022-11-24 19:14:19 -08:00
repr-transparent-aggregates-1.rs Fix failing codegen tests on s390x 2022-12-06 18:12:46 +01:00
repr-transparent-aggregates-2.rs Update codegen test for opaque pointers 2022-07-27 16:19:07 +02:00
repr-transparent-aggregates-3.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
repr-transparent-sysv64.rs Update codegen tests with unnamed arguments 2020-01-07 21:28:22 +01:00
repr-transparent.rs Fix failing codegen tests on s390x 2022-12-06 18:12:46 +01:00
sanitizer-cfi-add-canonical-jump-tables-flag.rs Add fine-grained LLVM CFI support to the Rust compiler 2022-07-23 10:51:34 -07:00
sanitizer-cfi-emit-type-checks.rs Make CFI tests opaque pointers compatible 2022-07-27 16:37:36 +02:00
sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs CFI: Monomorphize transparent ADTs before typeid 2022-12-29 10:21:07 -08:00
sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs Make CFI tests opaque pointers compatible 2022-07-27 16:37:36 +02:00
sanitizer-kcfi-add-kcfi-flag.rs Add LLVM KCFI support to the Rust compiler 2022-12-08 17:24:39 -08:00
sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs KCFI test: Also support LLVM 16 output 2022-12-11 19:05:37 +00:00
sanitizer-memory-track-orgins.rs compiletest: Add directives to detect sanitizer support 2020-06-13 14:24:30 +02:00
sanitizer-no-sanitize-inlining.rs Bump mir-opt-level from 3 to 4 in tests 2021-03-05 17:13:57 -03:00
sanitizer-no-sanitize.rs Fix typo in code comment 2020-12-10 19:06:29 -05:00
sanitizer-recover.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
sanitizer_memtag_attr_check.rs MemTagSanitizer Support 2022-02-16 09:39:03 -05:00
sanitizer_scs_attr_check.rs Fix the sanitizer_scs_attr_check.rs test 2022-10-05 21:55:24 -07:00
scalar-pair-bool.rs Apply noundef attribute to &T, &mut T, Box<T>, bool 2022-02-05 01:09:52 -05:00
set-discriminant-invalid.rs Check if call return type is visibly uninhabited when building MIR 2022-03-24 23:56:12 +01:00
simd-wide-sum.rs Introduce core::simd trait imports in tests 2022-07-20 18:08:20 -07:00
simd_arith_offset.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
slice-as_chunks.rs Try ignore-debug in the codegen test 2021-01-16 14:52:48 -08:00
slice-init.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
slice-iter-len-eq-zero.rs fix tests, update size asserts 2022-11-22 23:12:26 +01:00
slice-position-bounds-check.rs Remove licenses 2018-12-25 21:08:33 -07:00
slice-ref-equality.rs Amend codegen test. 2022-07-01 17:45:13 +02:00
slice-reverse.rs Don't run the codegen test when debug_assert is enabled 2021-11-14 16:24:31 -08:00
slice-windows-no-bounds-check.rs Add codegen test 2020-10-07 16:17:01 +03:00
slice_as_from_ptr_range.rs Add a codegen test for slice::from_ptr_range 2022-09-17 18:54:00 -07:00
some-abis-do-extend-params-to-32-bits.rs unit tests that inspect LLVM output directly. This relies on a human being to confirm that the 2022-07-06 10:53:22 -04:00
some-global-nonnull.rs Emit == null instead of <= null 2020-08-08 10:45:15 +02:00
sparc-struct-abi.rs Add test for nested structures. 2022-02-24 13:46:34 +01:00
sse42-implies-crc32.rs rustc_codegen_llvm: make sse4.2 imply crc32 for LLVM 14 2021-09-20 11:31:55 -04:00
stack-probes-call.rs Enable inline stack probes on X86 with LLVM 16 2022-09-29 19:49:23 -07:00
stack-probes-inline.rs Enable inline stack probes on X86 with LLVM 16 2022-09-29 19:49:23 -07:00
stack-protector.rs add rustc option for using LLVM stack smash protection 2021-11-22 20:06:22 +01:00
static-relocation-model-msvc.rs test/codegen: test inter-crate linkage with static relocation 2022-11-29 11:21:16 +01:00
staticlib-external-inline-fns.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
stores.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
swap-large-types.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
swap-simd-types.rs Stop manually SIMDing in swap_nonoverlapping 2022-02-21 00:54:02 -08:00
swap-small-types.rs Amend codegen test. 2022-07-01 17:45:13 +02:00
target-cpu-on-functions.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
target-feature-overrides.rs Always include global target features in function attributes 2022-03-04 16:57:34 +01:00
thread-local.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
to_vec.rs Change slice::to_vec to not use extend_from_slice 2020-11-22 22:22:03 +00:00
transmute-scalar.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
try_identity.rs Fix tests broken by deaggregation change 2022-04-11 09:26:26 -04:00
try_question_mark_nop.rs Add LLVM15-specific codegen test for try/?s that now optimize away 2022-08-17 12:09:59 -07:00
tune-cpu-on-functions.rs Remove redundant ignore-tidy-linelength annotations 2021-04-03 22:30:20 +02:00
tuple-layout-opt.rs add tests related to tuple scalar layout with ZST in last field 2020-08-30 14:58:03 -04:00
unchecked-float-casts.rs Improve codegen for unchecked float casts on wasm 2020-07-22 15:05:05 -07:00
unchecked_shifts.rs Ignore the unchecked-shifts codegen test in debug-assertions builds 2022-11-16 15:58:43 -08:00
uninit-consts.rs Fix failing codegen tests on s390x 2022-12-06 18:12:46 +01:00
union-abi.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
unpadded-simd.rs Add testcase for proper LLVM representation of SIMD types. 2021-08-04 23:36:14 +02:00
unwind-and-panic-abort.rs abort immediately on bad mem::zeroed/uninit 2022-12-22 16:37:42 +01:00
unwind-extern-exports.rs Fix a bunch of typo 2022-08-31 18:24:55 +08:00
unwind-extern-imports.rs rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
used_with_arg.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +02:00
var-names.rs Manually set dso_local when its valid to do so 2021-04-03 00:00:29 +03:00
vec-calloc-llvm14.rs codegen: use new {re,de,}allocator annotations in llvm 2022-07-26 09:43:28 -04:00
vec-calloc.rs Do the calloc optimization for Option<bool> 2022-10-02 12:26:58 -07:00
vec-in-place.rs more dupe word typos 2022-10-14 12:57:56 +08:00
vec-iter-collect-len.rs Gate llvm.sideeffect under -Z insert-sideeffect 2019-09-28 07:13:53 +08:00
vec-optimizes-away.rs we can enable one more codegen test in debug mode now 2020-06-16 16:01:30 -04:00
vec-shrink-panik.rs fix codegen test 2022-12-25 15:46:20 +01:00
vecdeque_no_panic.rs Remove unreachable panics from VecDeque 2021-01-14 19:31:56 +01:00
virtual-function-elimination-32bit.rs Add VFE test for 32 bit 2022-06-14 14:50:53 +02:00
virtual-function-elimination.rs Add VFE test for 32 bit 2022-06-14 14:50:53 +02:00
wasm_casts_trapping.rs Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
x86_64-macosx-deployment-target.rs Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
x86_64-no-macosx-deployment-target.rs Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
zip.rs Remove licenses 2018-12-25 21:08:33 -07:00
zst-offset.rs Update some codegen tests for opaque pointers 2022-05-25 17:29:37 +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