mir-opt tests: rename unit-test -> test-mir-pass
This commit is contained in:
parent
a61b14d15e
commit
75d0fdd967
152 changed files with 157 additions and 156 deletions
|
@ -244,7 +244,7 @@ mod directives {
|
||||||
pub const STDERR_PER_BITWIDTH: &'static str = "stderr-per-bitwidth";
|
pub const STDERR_PER_BITWIDTH: &'static str = "stderr-per-bitwidth";
|
||||||
pub const INCREMENTAL: &'static str = "incremental";
|
pub const INCREMENTAL: &'static str = "incremental";
|
||||||
pub const KNOWN_BUG: &'static str = "known-bug";
|
pub const KNOWN_BUG: &'static str = "known-bug";
|
||||||
pub const MIR_UNIT_TEST: &'static str = "unit-test";
|
pub const TEST_MIR_PASS: &'static str = "test-mir-pass";
|
||||||
pub const REMAP_SRC_BASE: &'static str = "remap-src-base";
|
pub const REMAP_SRC_BASE: &'static str = "remap-src-base";
|
||||||
pub const COMPARE_OUTPUT_LINES_BY_SUBSET: &'static str = "compare-output-lines-by-subset";
|
pub const COMPARE_OUTPUT_LINES_BY_SUBSET: &'static str = "compare-output-lines-by-subset";
|
||||||
pub const LLVM_COV_FLAGS: &'static str = "llvm-cov-flags";
|
pub const LLVM_COV_FLAGS: &'static str = "llvm-cov-flags";
|
||||||
|
@ -549,7 +549,7 @@ impl TestProps {
|
||||||
|
|
||||||
config.set_name_value_directive(
|
config.set_name_value_directive(
|
||||||
ln,
|
ln,
|
||||||
MIR_UNIT_TEST,
|
TEST_MIR_PASS,
|
||||||
&mut self.mir_unit_test,
|
&mut self.mir_unit_test,
|
||||||
|s| s.trim().to_string(),
|
|s| s.trim().to_string(),
|
||||||
);
|
);
|
||||||
|
@ -922,7 +922,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
|
||||||
"should-fail",
|
"should-fail",
|
||||||
"should-ice",
|
"should-ice",
|
||||||
"stderr-per-bitwidth",
|
"stderr-per-bitwidth",
|
||||||
"unit-test",
|
"test-mir-pass",
|
||||||
"unset-exec-env",
|
"unset-exec-env",
|
||||||
"unset-rustc-env",
|
"unset-rustc-env",
|
||||||
// tidy-alphabetical-end
|
// tidy-alphabetical-end
|
||||||
|
|
|
@ -14,17 +14,18 @@ presence of pointers in constants or other bit width dependent things. In that c
|
||||||
|
|
||||||
to your test, causing separate files to be generated for 32bit and 64bit systems.
|
to your test, causing separate files to be generated for 32bit and 64bit systems.
|
||||||
|
|
||||||
## Unit testing
|
## Testing a particular MIR pass
|
||||||
|
|
||||||
If you are only testing the behavior of a particular mir-opt pass on some specific input (as is
|
If you are only testing the behavior of a particular mir-opt pass on some specific input (as is
|
||||||
usually the case), you should add
|
usually the case), you should add
|
||||||
|
|
||||||
```
|
```
|
||||||
// unit-test: PassName
|
//@ test-mir-pass: PassName
|
||||||
```
|
```
|
||||||
|
|
||||||
to the top of the file. This makes sure that other passes don't run which means you'll get the input
|
to the top of the file. This makes sure that other passes don't run which means you'll get the input
|
||||||
you expected and your test won't break when other code changes.
|
you expected and your test won't break when other code changes. This also lets you test passes
|
||||||
|
that are disabled by default.
|
||||||
|
|
||||||
## Emit a diff of the mir for a specific optimization
|
## Emit a diff of the mir for a specific optimization
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: SimplifyCfg-pre-optimizations
|
//@ test-mir-pass: SimplifyCfg-pre-optimizations
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// Retagging (from Stacked Borrows) relies on the array index being a fresh
|
// Retagging (from Stacked Borrows) relies on the array index being a fresh
|
||||||
// temporary, so that side-effects cannot change it.
|
// temporary, so that side-effects cannot change it.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: ElaborateDrops
|
//@ test-mir-pass: ElaborateDrops
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
// this tests move up progration, which is not yet implemented
|
// this tests move up progration, which is not yet implemented
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: ElaborateDrops
|
//@ test-mir-pass: ElaborateDrops
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
#![feature(rustc_attrs, stmt_expr_attributes)]
|
#![feature(rustc_attrs, stmt_expr_attributes)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
static FOO: &[(Option<i32>, &[&str])] =
|
static FOO: &[(Option<i32>, &[&str])] =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
// EMIT_MIR const_allocation2.main.GVN.after.mir
|
// EMIT_MIR const_allocation2.main.GVN.after.mir
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
// EMIT_MIR const_allocation3.main.GVN.after.mir
|
// EMIT_MIR const_allocation3.main.GVN.after.mir
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: ConstDebugInfo
|
//@ test-mir-pass: ConstDebugInfo
|
||||||
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
|
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
|
||||||
|
|
||||||
struct Point {
|
struct Point {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR address_of_pair.fn0.GVN.diff
|
// EMIT_MIR address_of_pair.fn0.GVN.diff
|
||||||
pub fn fn0() -> bool {
|
pub fn fn0() -> bool {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O
|
||||||
|
|
||||||
// EMIT_MIR aggregate.main.GVN.diff
|
// EMIT_MIR aggregate.main.GVN.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
// EMIT_MIR bad_op_div_by_zero.main.GVN.diff
|
// EMIT_MIR bad_op_div_by_zero.main.GVN.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
// EMIT_MIR bad_op_mod_by_zero.main.GVN.diff
|
// EMIT_MIR bad_op_mod_by_zero.main.GVN.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR boolean_identities.test.GVN.diff
|
// EMIT_MIR boolean_identities.test.GVN.diff
|
||||||
pub fn test(x: bool, y: bool) -> bool {
|
pub fn test(x: bool, y: bool) -> bool {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR cast.main.GVN.diff
|
// EMIT_MIR cast.main.GVN.diff
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -C overflow-checks=on
|
//@ compile-flags: -C overflow-checks=on
|
||||||
|
|
||||||
// EMIT_MIR checked_add.main.GVN.diff
|
// EMIT_MIR checked_add.main.GVN.diff
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -Zmir-opt-level=1
|
//@ compile-flags: -Zmir-opt-level=1
|
||||||
|
|
||||||
trait NeedsDrop: Sized {
|
trait NeedsDrop: Sized {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with
|
// FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with
|
||||||
// `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect`
|
// `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -C overflow-checks=on
|
//@ compile-flags: -C overflow-checks=on
|
||||||
|
|
||||||
// EMIT_MIR indirect.main.GVN.diff
|
// EMIT_MIR indirect.main.GVN.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// Check that we do not propagate past an indirect mutation.
|
// Check that we do not propagate past an indirect mutation.
|
||||||
#![feature(raw_ref_op)]
|
#![feature(raw_ref_op)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -Zmir-enable-passes=+Inline
|
//@ compile-flags: -Zmir-enable-passes=+Inline
|
||||||
|
|
||||||
// After inlining, this will contain a `CheckedBinaryOp`.
|
// After inlining, this will contain a `CheckedBinaryOp`.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -Zmir-enable-passes=+RemoveZsts
|
//@ compile-flags: -Zmir-enable-passes=+RemoveZsts
|
||||||
// Verify that we can pretty print invalid constants.
|
// Verify that we can pretty print invalid constants.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected
|
// Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected
|
||||||
// outputs below, after GVN this is how _2 would look like with the bug:
|
// outputs below, after GVN this is how _2 would look like with the bug:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// This used to ICE in const-prop
|
// This used to ICE in const-prop
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mult_by_zero.test.GVN.diff
|
// EMIT_MIR mult_by_zero.test.GVN.diff
|
||||||
fn test(x: i32) -> i32 {
|
fn test(x: i32) -> i32 {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mutable_variable.main.GVN.diff
|
// EMIT_MIR mutable_variable.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mutable_variable_aggregate.main.GVN.diff
|
// EMIT_MIR mutable_variable_aggregate.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff
|
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mutable_variable_aggregate_partial_read.main.GVN.diff
|
// EMIT_MIR mutable_variable_aggregate_partial_read.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// Verify that we do not propagate the contents of this mutable static.
|
// Verify that we do not propagate the contents of this mutable static.
|
||||||
static mut STATIC: u32 = 0x42424242;
|
static mut STATIC: u32 = 0x42424242;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff
|
// EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
#![feature(offset_of_enum, offset_of_nested)]
|
#![feature(offset_of_enum, offset_of_nested)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O
|
||||||
|
|
||||||
// Regression test for https://github.com/rust-lang/rust/issues/118328
|
// Regression test for https://github.com/rust-lang/rust/issues/118328
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
fn read(_: usize) { }
|
fn read(_: usize) { }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
static FOO: u8 = 2;
|
static FOO: u8 = 2;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR ref_deref.main.GVN.diff
|
// EMIT_MIR ref_deref.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// This does not currently propagate (#67862)
|
// This does not currently propagate (#67862)
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
|
|
||||||
// EMIT_MIR ref_deref_project.main.GVN.diff
|
// EMIT_MIR ref_deref_project.main.GVN.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR reify_fn_ptr.main.GVN.diff
|
// EMIT_MIR reify_fn_ptr.main.GVN.diff
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ compile-flags: -C overflow-checks=on
|
//@ compile-flags: -C overflow-checks=on
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
// EMIT_MIR scalar_literal_propagation.main.GVN.diff
|
// EMIT_MIR scalar_literal_propagation.main.GVN.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -Zmir-enable-passes=+InstSimplify
|
//@ compile-flags: -Zmir-enable-passes=+InstSimplify
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
|
//@ compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
//@ compile-flags: -O --crate-type=lib
|
//@ compile-flags: -O --crate-type=lib
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR tuple_literal_propagation.main.GVN.diff
|
// EMIT_MIR tuple_literal_propagation.main.GVN.diff
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: GVN
|
//@ test-mir-pass: GVN
|
||||||
// EMIT_MIR while_let_loops.change_loop_body.GVN.diff
|
// EMIT_MIR while_let_loops.change_loop_body.GVN.diff
|
||||||
|
|
||||||
pub fn change_loop_body() {
|
pub fn change_loop_body() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//! Tests that we bail out when there are multiple assignments to the same local.
|
//! Tests that we bail out when there are multiple assignments to the same local.
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
fn val() -> i32 {
|
fn val() -> i32 {
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// Check that CopyProp does propagate return values of call terminators.
|
// Check that CopyProp does propagate return values of call terminators.
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// Check that CopyProp does not propagate an assignment to a function argument
|
// Check that CopyProp does not propagate an assignment to a function argument
|
||||||
// (doing so can break usages of the original argument value)
|
// (doing so can break usages of the original argument value)
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
fn dummy(x: u8) -> u8 {
|
fn dummy(x: u8) -> u8 {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
|
//! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
fn val() -> i32 {
|
fn val() -> i32 {
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
fn id<T>(x: T) -> T {
|
fn id<T>(x: T) -> T {
|
||||||
x
|
x
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
|
// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
|
||||||
// that that pass enables this one to do more optimizations.
|
// that that pass enables this one to do more optimizations.
|
||||||
|
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
//@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination
|
//@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination
|
||||||
|
|
||||||
fn id<T>(x: T) -> T {
|
fn id<T>(x: T) -> T {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
// EMIT_MIR issue_107511.main.CopyProp.diff
|
// EMIT_MIR issue_107511.main.CopyProp.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// Test that we do not move multiple times from the same local.
|
// Test that we do not move multiple times from the same local.
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
// EMIT_MIR move_arg.f.CopyProp.diff
|
// EMIT_MIR move_arg.f.CopyProp.diff
|
||||||
pub fn f<T: Copy>(a: T) {
|
pub fn f<T: Copy>(a: T) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
//
|
//
|
||||||
// This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB
|
// This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB
|
||||||
// according to Miri. However, the decision to make this UB - and to allow
|
// according to Miri. However, the decision to make this UB - and to allow
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
// Verify that we do not ICE on partial initializations.
|
// Verify that we do not ICE on partial initializations.
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics)]
|
#![feature(custom_mir, core_intrinsics)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// Check that CopyProp considers reborrows as not mutating the pointer.
|
// Check that CopyProp considers reborrows as not mutating the pointer.
|
||||||
//@ unit-test: CopyProp
|
//@ test-mir-pass: CopyProp
|
||||||
|
|
||||||
#![feature(raw_ref_op)]
|
#![feature(raw_ref_op)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
// EMIT_MIR array_index.main.DataflowConstProp.diff
|
// EMIT_MIR array_index.main.DataflowConstProp.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR boolean_identities.test.DataflowConstProp.diff
|
// EMIT_MIR boolean_identities.test.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR cast.main.DataflowConstProp.diff
|
// EMIT_MIR cast.main.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
//@ compile-flags: -Coverflow-checks=on
|
//@ compile-flags: -Coverflow-checks=on
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline
|
//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
#![feature(custom_mir, core_intrinsics, rustc_attrs)]
|
#![feature(custom_mir, core_intrinsics, rustc_attrs)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR if.main.DataflowConstProp.diff
|
// EMIT_MIR if.main.DataflowConstProp.diff
|
||||||
// CHECK-LABEL: fn main(
|
// CHECK-LABEL: fn main(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
//@ compile-flags: -Zmir-enable-passes=+Inline
|
//@ compile-flags: -Zmir-enable-passes=+Inline
|
||||||
|
|
||||||
// EMIT_MIR inherit_overflow.main.DataflowConstProp.diff
|
// EMIT_MIR inherit_overflow.main.DataflowConstProp.diff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR issue_81605.f.DataflowConstProp.diff
|
// EMIT_MIR issue_81605.f.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR mult_by_zero.test.DataflowConstProp.diff
|
// EMIT_MIR mult_by_zero.test.DataflowConstProp.diff
|
||||||
// CHECK-LABEL: fn test(
|
// CHECK-LABEL: fn test(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
#![feature(offset_of_nested)]
|
#![feature(offset_of_nested)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
fn escape<T>(x: &T) {}
|
fn escape<T>(x: &T) {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// The struct has scalar ABI, but is not a scalar type.
|
// The struct has scalar ABI, but is not a scalar type.
|
||||||
// Make sure that we handle this correctly.
|
// Make sure that we handle this correctly.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR self_assign.main.DataflowConstProp.diff
|
// EMIT_MIR self_assign.main.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR self_assign_add.main.DataflowConstProp.diff
|
// EMIT_MIR self_assign_add.main.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// used to modify `x.1` - if it did not, then it might incorrectly assume that it
|
// used to modify `x.1` - if it did not, then it might incorrectly assume that it
|
||||||
// can infer the value of `x.1` at the end of this function.
|
// can infer the value of `x.1` at the end of this function.
|
||||||
|
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
// EMIT_MIR sibling_ptr.main.DataflowConstProp.diff
|
// EMIT_MIR sibling_ptr.main.DataflowConstProp.diff
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
//@ compile-flags: -Zmir-enable-passes=+InstSimplify
|
//@ compile-flags: -Zmir-enable-passes=+InstSimplify
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
|
|
||||||
fn foo(n: i32) {}
|
fn foo(n: i32) {}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
//@ compile-flags: -O --crate-type=lib
|
//@ compile-flags: -O --crate-type=lib
|
||||||
//@ ignore-endian-big
|
//@ ignore-endian-big
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//@ unit-test: DataflowConstProp
|
//@ test-mir-pass: DataflowConstProp
|
||||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||||
|
|
||||||
// EMIT_MIR tuple.main.DataflowConstProp.diff
|
// EMIT_MIR tuple.main.DataflowConstProp.diff
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DeadStoreElimination-final
|
//@ test-mir-pass: DeadStoreElimination-final
|
||||||
//@ compile-flags: -Zmir-enable-passes=+CopyProp
|
//@ compile-flags: -Zmir-enable-passes=+CopyProp
|
||||||
|
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// report that *all* of these stores are live.
|
// report that *all* of these stores are live.
|
||||||
//
|
//
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
//@ unit-test: DeadStoreElimination-initial
|
//@ test-mir-pass: DeadStoreElimination-initial
|
||||||
|
|
||||||
#![feature(core_intrinsics, custom_mir)]
|
#![feature(core_intrinsics, custom_mir)]
|
||||||
use std::intrinsics::mir::*;
|
use std::intrinsics::mir::*;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Verify that we account for the `PlaceMention` statement as a use of the tuple,
|
// Verify that we account for the `PlaceMention` statement as a use of the tuple,
|
||||||
// and don't remove it as a dead store.
|
// and don't remove it as a dead store.
|
||||||
//
|
//
|
||||||
//@ unit-test: DeadStoreElimination-initial
|
//@ test-mir-pass: DeadStoreElimination-initial
|
||||||
//@ compile-flags: -Zmir-keep-place-mention
|
//@ compile-flags: -Zmir-keep-place-mention
|
||||||
|
|
||||||
// EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff
|
// EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Test that we don't remove pointer to int casts or retags
|
// Test that we don't remove pointer to int casts or retags
|
||||||
//@ unit-test: DeadStoreElimination-initial
|
//@ test-mir-pass: DeadStoreElimination-initial
|
||||||
//@ compile-flags: -Zmir-emit-retag
|
//@ compile-flags: -Zmir-emit-retag
|
||||||
|
|
||||||
// EMIT_MIR provenance_soundness.pointer_to_int.DeadStoreElimination-initial.diff
|
// EMIT_MIR provenance_soundness.pointer_to_int.DeadStoreElimination-initial.diff
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//@ unit-test: DeduplicateBlocks
|
//@ test-mir-pass: DeduplicateBlocks
|
||||||
|
|
||||||
// EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff
|
// EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff
|
||||||
pub const fn is_line_doc_comment_2(s: &str) -> bool {
|
pub const fn is_line_doc_comment_2(s: &str) -> bool {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: Derefer
|
//@ test-mir-pass: Derefer
|
||||||
// EMIT_MIR derefer_complex_case.main.Derefer.diff
|
// EMIT_MIR derefer_complex_case.main.Derefer.diff
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: Derefer
|
//@ test-mir-pass: Derefer
|
||||||
// EMIT_MIR derefer_inline_test.main.Derefer.diff
|
// EMIT_MIR derefer_inline_test.main.Derefer.diff
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: Derefer
|
//@ test-mir-pass: Derefer
|
||||||
// EMIT_MIR derefer_terminator_test.main.Derefer.diff
|
// EMIT_MIR derefer_terminator_test.main.Derefer.diff
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: Derefer
|
//@ test-mir-pass: Derefer
|
||||||
// EMIT_MIR derefer_test.main.Derefer.diff
|
// EMIT_MIR derefer_test.main.Derefer.diff
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut a = (42,43);
|
let mut a = (42,43);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
//@ unit-test: Derefer
|
//@ test-mir-pass: Derefer
|
||||||
// EMIT_MIR derefer_test_multiple.main.Derefer.diff
|
// EMIT_MIR derefer_test_multiple.main.Derefer.diff
|
||||||
fn main () {
|
fn main () {
|
||||||
let mut a = (42, 43);
|
let mut a = (42, 43);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
//! Tests that assignment in both branches of an `if` are eliminated.
|
//! Tests that assignment in both branches of an `if` are eliminated.
|
||||||
//@ unit-test: DestinationPropagation
|
//@ test-mir-pass: DestinationPropagation
|
||||||
fn val() -> i32 {
|
fn val() -> i32 {
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||||
// Check that DestinationPropagation does not propagate an assignment to a function argument
|
// Check that DestinationPropagation does not propagate an assignment to a function argument
|
||||||
// (doing so can break usages of the original argument value)
|
// (doing so can break usages of the original argument value)
|
||||||
//@ unit-test: DestinationPropagation
|
//@ test-mir-pass: DestinationPropagation
|
||||||
fn dummy(x: u8) -> u8 {
|
fn dummy(x: u8) -> u8 {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue