diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-09 16:47:17 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-11 16:29:42 +0000 |
| commit | 7493ad0abec1ecbd5f8a9d14a67cc3197e6176c7 (patch) | |
| tree | dde9c04e021511a31a798880f60dc01e4cb1d5ea /tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff | |
| parent | bcfe1a4bf2347e2f8df209f72930b335d5edddcf (diff) | |
| download | rust-7493ad0abec1ecbd5f8a9d14a67cc3197e6176c7.tar.gz rust-7493ad0abec1ecbd5f8a9d14a67cc3197e6176c7.zip | |
Duplicate output for test.
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff')
| -rw-r--r-- | tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff new file mode 100644 index 00000000000..960e69ee916 --- /dev/null +++ b/tests/mir-opt/dataflow-const-prop/enum.mutate_discriminant.DataflowConstProp.64bit.diff @@ -0,0 +1,26 @@ +- // MIR for `mutate_discriminant` before DataflowConstProp ++ // MIR for `mutate_discriminant` after DataflowConstProp + + fn mutate_discriminant() -> u8 { + let mut _0: u8; + let mut _1: std::option::Option<NonZeroUsize>; + let mut _2: isize; + + bb0: { + discriminant(_1) = 1; + (((_1 as variant#1).0: NonZeroUsize).0: usize) = const 0_usize; + _2 = discriminant(_1); + switchInt(_2) -> [0: bb1, otherwise: bb2]; + } + + bb1: { + _0 = const 1_u8; + return; + } + + bb2: { + _0 = const 2_u8; + unreachable; + } + } + |
