rust icon indicating copy to clipboard operation
rust copied to clipboard

Mir-Opt for copying enums with large discrepancies

Open JulianKnodt opened this issue 3 years ago • 141 comments

I have been meaning to make this for quite a while, based off of this hackmd.

I'm not sure where to put this opt now that I've made it, so I'd appreciate suggestions on that! It's also one long chain of statements, not sure if there's a more friendly format to make it.

r? @tmiasko I would r oli but he's on leave so he suggested I r tmiasko or wesleywiser.

JulianKnodt avatar May 10 '21 20:05 JulianKnodt

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
Checking which error codes lack tests...
tidy: Skipping binary file check, read-only filesystem
* 625 error codes
* highest error code: E0783
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:24: TODO is deprecated; use FIXME
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:98: TODO is deprecated; use FIXME
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:112: TODO is deprecated; use FIXME
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:131: TODO is deprecated; use FIXME
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:151: TODO is deprecated; use FIXME
Found 0 error codes with no tests
Done!
* 335 features
some tidy checks failed
some tidy checks failed


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-tidy" "/checkout" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build" "16"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 src/tools/tidy
Build completed unsuccessfully in 0:00:12

rust-log-analyzer avatar May 10 '21 20:05 rust-log-analyzer

This general pattern for copying the data appears to be opaque to memcpy optimizations, i.e., every single transformed copy remains. Any ideas how this could be improved?

tmiasko avatar May 12 '21 15:05 tmiasko

Maybe codegen would be a better fit?

That would mean it would have the monomorphized versions of the enum too, right? Could be handy for anything using a generic Result and such...

scottmcm avatar May 12 '21 16:05 scottmcm

Mmmm I've not written anything for codegen at all, but if that makes more sense I can close this and move it to that, altho seeing a guide before it would be helpful.

JulianKnodt avatar May 12 '21 18:05 JulianKnodt

As you prefer. The current implementation is not that far from the point where we could run some tests on it. The one missing component is a mapping from a discriminant to a variant index (or limiting the transformation to the cases where there is direct correspondence between the two).

tmiasko avatar May 12 '21 19:05 tmiasko

ah I thought reading from the array of sizes was handled around line 132, but I guess mapping discriminants to variant idxes is not guaranteed to be 1-1, is there anyway to check that?

JulianKnodt avatar May 12 '21 22:05 JulianKnodt

but I guess mapping discriminants to variant idxes is not guaranteed to be 1-1, is there anyway to check that?

I believe

enum Foo {
    Bar = 2,
    Baz = 0,
}

has variant index 0 for Bar, but discriminant 2 and variant index 1 for Baz, but discriminant 0.

bjorn3 avatar May 13 '21 07:05 bjorn3

mapping discriminants to variant idxes is not guaranteed to be 1-1, is there anyway to check that?

The InterpCx::read_discriminant exercises related API and contains explanatory comments, might be good starting point.

tmiasko avatar May 13 '21 09:05 tmiasko

Does this fix #54360?

camelid avatar May 28 '21 00:05 camelid

I believe so? I don't remember the original issue.

JulianKnodt avatar May 28 '21 02:05 JulianKnodt

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_mir_build v0.0.0 (/checkout/compiler/rustc_mir_build)
    Checking rustc_passes v0.0.0 (/checkout/compiler/rustc_passes)
    Checking rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
    Checking rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
error: unused variable: `tag_enc`
  --> compiler/rustc_mir/src/transform/large_enums.rs:73:63
   |
73 |                         let (total_size, num_variants, sizes, tag_enc) =
   |                                                               ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tag_enc`
   |
   = note: `-D unused-variables` implied by `-D warnings`
    Checking rustc_privacy v0.0.0 (/checkout/compiler/rustc_privacy)
error: aborting due to previous error

error: could not compile `rustc_mir`
error: could not compile `rustc_mir`

To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" " llvm max_level_info" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-p" "rustc-main" "-p" "rustc_driver" "-p" "rustc_lint" "-p" "rustc_attr" "-p" "rustc_macros" "-p" "rustc_lexer" "-p" "rustc_index" "-p" "rustc_trait_selection" "-p" "rustc_infer" "-p" "rustc_graphviz" "-p" "rustc_parse_format" "-p" "rustc_save_analysis" "-p" "rustc_hir_pretty" "-p" "rustc_hir" "-p" "rustc_data_structures" "-p" "rustc_parse" "-p" "rustc_span" "-p" "rustc_arena" "-p" "rustc_typeck" "-p" "rustc_ty_utils" "-p" "rustc_session" "-p" "rustc_fs_util" "-p" "rustc_lint_defs" "-p" "rustc_ast_pretty" "-p" "rustc_serialize" "-p" "rustc_metadata" "-p" "rustc_expand" "-p" "rustc_ast_passes" "-p" "rustc_errors" "-p" "rustc_mir" "-p" "coverage_test_macros" "-p" "rustc_apfloat" "-p" "rustc_plugin_impl" "-p" "rustc_interface" "-p" "rustc_symbol_mangling" "-p" "rustc_ast_lowering" "-p" "rustc_passes" "-p" "rustc_builtin_macros" "-p" "rustc_query_impl" "-p" "rustc_query_system" "-p" "rustc_resolve" "-p" "rustc_codegen_llvm" "-p" "rustc_llvm" "-p" "rustc_privacy" "-p" "rustc_incremental" "-p" "rustc_traits" "-p" "rustc_ast" "-p" "rustc_error_codes" "-p" "rustc_target" "-p" "rustc_middle" "-p" "rustc_type_ir" "-p" "rustc_mir_build" "-p" "rustc_feature" "-p" "rustc_codegen_ssa" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:02:39

rust-log-analyzer avatar May 28 '21 04:05 rust-log-analyzer

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
Checking which error codes lack tests...
tidy: Skipping binary file check, read-only filesystem
* 625 error codes
* highest error code: E0783
tidy error: /checkout/compiler/rustc_mir/src/transform/large_enums.rs:95: TODO is deprecated; use FIXME
Found 0 error codes with no tests
Done!
* 337 features
some tidy checks failed
some tidy checks failed


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-tidy" "/checkout" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build" "16"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 src/tools/tidy
Build completed unsuccessfully in 0:00:14

rust-log-analyzer avatar May 28 '21 04:05 rust-log-analyzer

In terms of placement in MIR pipeline, I would put it towards the end, somewhere after SimplifyLocals, maybe just last? I wouldn't expect it to create any new optimization opportunities.

tmiasko avatar May 28 '21 16:05 tmiasko

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
   Compiling miniz_oxide v0.4.0
   Compiling hashbrown v0.11.0
   Compiling object v0.22.0
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb6[12]:
bad arg (u8 != collections::btree::set::DifferenceInner<T>)
    |
    |
309 |                 return Difference { inner: DifferenceInner::Iterate(self.iter()) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb12[12]:
bad arg (u8 != collections::btree::set::DifferenceInner<T>)
    |
    |
315 |                 return Difference { inner: DifferenceInner::Iterate(self.iter()) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb35[8]:
bad arg (u8 != collections::btree::set::DifferenceInner<T>)
    |
317 | /         Difference {
317 | /         Difference {
318 | |             inner: match (self_min.cmp(other_max), self_max.cmp(other_min)) {
319 | |                 (Greater, _) | (_, Less) => DifferenceInner::Iterate(self.iter()),
320 | |                 (Equal, _) => {
337 | |             },
338 | |         }
    | |_________^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb3[11]:
bad arg (u8 != collections::btree::set::IntersectionInner<T>)
    |
    |
398 |                 return Intersection { inner: IntersectionInner::Answer(None) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb8[11]:
bad arg (u8 != collections::btree::set::IntersectionInner<T>)
    |
    |
404 |                 return Intersection { inner: IntersectionInner::Answer(None) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb32[8]:
bad arg (u8 != collections::btree::set::IntersectionInner<T>)
    |
406 | /         Intersection {
406 | /         Intersection {
407 | |             inner: match (self_min.cmp(other_max), self_max.cmp(other_min)) {
408 | |                 (Greater, _) | (_, Less) => IntersectionInner::Answer(None),
409 | |                 (Equal, _) => IntersectionInner::Answer(Some(self_min)),
418 | |             },
419 | |         }
    | |_________^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2981 ~ alloc[6322]::collections::btree::set::{impl#35}::clone), const_param_did: None }) (end of phase Optimization) at bb9[8]:
bad arg (u8 != collections::btree::set::DifferenceInner<T>)
     |
1393 | /         Difference {
1393 | /         Difference {
1394 | |             inner: match &self.inner {
1395 | |                 DifferenceInner::Stitch { self_iter, other_iter } => DifferenceInner::Stitch {
1396 | |                     self_iter: self_iter.clone(),
1403 | |             },
1404 | |         }
     | |_________^
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3006 ~ alloc[6322]::collections::btree::set::{impl#41}::clone), const_param_did: None }) (end of phase Optimization) at bb8[8]:
bad arg (u8 != collections::btree::set::IntersectionInner<T>)
     |
1495 | /         Intersection {
1495 | /         Intersection {
1496 | |             inner: match &self.inner {
1497 | |                 IntersectionInner::Stitch { a, b } => {
1498 | |                     IntersectionInner::Stitch { a: a.clone(), b: b.clone() }
1504 | |             },
1505 | |         }
     | |_________^
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1021:13

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (391e44947 2021-06-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
error: could not compile `alloc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1184 ~ gimli[3066]::read::abbrev::{impl#6}::parse_attributes), const_param_did: None }) (end of phase Optimization) at bb9[11]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:267:12
267 |         Ok(attrs)
    |            ^^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1184 ~ gimli[3066]::read::abbrev::{impl#6}::parse_attributes), const_param_did: None }) (end of phase Optimization) at bb9[21]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:267:9
267 |         Ok(attrs)
    |         ^^^^^^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1186 ~ gimli[3066]::read::abbrev::{impl#6}::parse), const_param_did: None }) (end of phase Optimization) at bb23[9]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:280:26
280 |         let attributes = Self::parse_attributes(input)?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1186 ~ gimli[3066]::read::abbrev::{impl#6}::parse), const_param_did: None }) (end of phase Optimization) at bb23[20]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:280:26
280 |         let attributes = Self::parse_attributes(input)?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1186 ~ gimli[3066]::read::abbrev::{impl#6}::parse), const_param_did: None }) (end of phase Optimization) at bb23[41]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:281:65
    |
281 |         let abbrev = Abbreviation::new(code, tag, has_children, attributes);
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:6008 ~ gimli[3066]::read::abbrev::{impl#23}::clone), const_param_did: None }) (end of phase Optimization) at bb4[12]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:184:17
    |
184 |   #[derive(Debug, Clone, PartialEq, Eq)]
    |                   ^^^^^ in this macro invocation
   ::: /checkout/library/core/src/clone.rs:139:1
    |
    |
139 | / pub macro Clone($item:item) {
141 | | }
141 | | }
    | |_- in this expansion of `#[derive(Clone)]`
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1175 ~ gimli[3066]::read::abbrev::{impl#6}::new), const_param_did: None }) (end of phase Optimization) at bb2[19]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:209:13
209 |             attributes,
    |             ^^^^^^^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1175 ~ gimli[3066]::read::abbrev::{impl#6}::new), const_param_did: None }) (end of phase Optimization) at bb2[32]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:205:9
205 | /         Abbreviation {
206 | |             code,
207 | |             tag,
208 | |             has_children,
208 | |             has_children,
209 | |             attributes,
210 | |         }
    | |_________^
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1192 ~ gimli[3066]::read::abbrev::{impl#7}::push), const_param_did: None }) (end of phase Optimization) at bb12[8]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:320:17
    |
320 |                 *self = Attributes::Heap(list);
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1192 ~ gimli[3066]::read::abbrev::{impl#7}::push), const_param_did: None }) (end of phase Optimization) at bb13[8]:
bad arg (u8 != read::abbrev::Attributes)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.23.0/src/read/abbrev.rs:320:17
    |
320 |                 *self = Attributes::Heap(list);
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1021:13

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (391e44947 2021-06-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:360 ~ object[5791]::read::any::{impl#0}::parse), const_param_did: None }) (end of phase Optimization) at bb80[16]:
bad arg (u8 != read::any::FileInternal)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/object-0.22.0/src/read/any.rs:217:19
    |
217 |         Ok(File { inner })
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:360 ~ object[5791]::read::any::{impl#0}::parse), const_param_did: None }) (end of phase Optimization) at bb80[26]:
bad arg (u8 != read::any::FileInternal)
   --> /cargo/registry/src/github.com-1ecc6299db9ec823/object-0.22.0/src/read/any.rs:217:12
    |
217 |         Ok(File { inner })
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:120:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1021:13

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (391e44947 2021-06-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

rust-log-analyzer avatar Jun 01 '21 02:06 rust-log-analyzer

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/compiler/rustc_mir/src/transform/large_enums.rs at line 87:
                                 vec![0; std::mem::size_of::<usize>() * num_variants as usize];
                             let mut curr = 0;
                             let mut curr = 0;
-                            for byte in sizes.iter().flat_map(|sz| sz.bytes().to_ne_bytes()).take(data.len()) {
-                              data[curr] = byte;
-                              curr += 1;
+                            for byte in sizes
+                                .iter()
+                                .flat_map(|sz| sz.bytes().to_ne_bytes())
+                                .take(data.len())
+                            {
+                                data[curr] = byte;
+                                curr += 1;
                             let alloc = interpret::Allocation::from_bytes(
                                 data,
                                 data,
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_mir/src/transform/deduplicate_blocks.rs" "/checkout/compiler/rustc_mir/src/transform/large_enums.rs" "/checkout/compiler/rustc_mir/src/transform/remove_storage_markers.rs" "/checkout/compiler/rustc_mir/src/transform/dest_prop.rs" "/checkout/compiler/rustc_mir/src/transform/match_branches.rs" "/checkout/compiler/rustc_mir/src/transform/validate.rs" "/checkout/compiler/rustc_mir/src/transform/function_item_references.rs" "/checkout/compiler/rustc_mir/src/transform/dump_mir.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
Build completed unsuccessfully in 0:00:15

rust-log-analyzer avatar Jun 01 '21 03:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling miniz_oxide v0.4.0
   Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.11.0
   Compiling object v0.22.0
rustc exited with signal: 11 (core dumped)
error: could not compile `panic_abort`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name panic_abort --edition=2018 library/panic_abort/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C metadata=bc5ad156c220f809 -C extra-filename=-bc5ad156c220f809 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc-6d6a8e4e639cfe07.rmeta --extern cfg_if=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcfg_if-2c899f9cbb2c9925.rmeta --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-77f5a314527a1c59.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-eabf50a85df947a1.rmeta --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-96605bc7abf56807.rmeta -Zmacro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Cembed-bitcode=yes -Z binary-dep-depinfo -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-1d95660a0cf7529d/out` (exit status: 254)
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy

rust-log-analyzer avatar Jun 01 '21 03:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.11.0
   Compiling object v0.22.0
   Compiling miniz_oxide v0.4.0
rustc: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
rustc exited with signal: 6 (core dumped)
error: could not compile `panic_abort`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name panic_abort --edition=2018 library/panic_abort/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C metadata=bc5ad156c220f809 -C extra-filename=-bc5ad156c220f809 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern alloc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liballoc-6d6a8e4e639cfe07.rmeta --extern cfg_if=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcfg_if-2c899f9cbb2c9925.rmeta --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-77f5a314527a1c59.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-eabf50a85df947a1.rmeta --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-96605bc7abf56807.rmeta -Zmacro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Cembed-bitcode=yes -Z binary-dep-depinfo -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-1d95660a0cf7529d/out` (exit status: 254)
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy

rust-log-analyzer avatar Jun 02 '21 03:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling alloc v0.0.0 (/checkout/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:148 ~ rustc_demangle[f982]::demangle), const_param_did: None }) (end of phase Optimization) at bb16[17]:
bad index (isize != usize)
   |
   |
86 |             Some(DemangleStyle::Legacy(d))
   |
   |
   = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:148 ~ rustc_demangle[f982]::demangle), const_param_did: None }) (end of phase Optimization) at bb20[17]:
bad index (isize != usize)
   |
   |
91 |                 Some(DemangleStyle::V0(d))
   |
   |
   = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1023:13

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (02a27c49f 2021-06-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
end of query stack
error: could not compile `rustc-demangle`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:601 ~ alloc[6322]::borrow::{impl#14}::add), const_param_did: None }) (end of phase Optimization) at bb1[6]:
bad index (isize != usize)
    |
443 |         self
    |         ^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:605 ~ alloc[6322]::borrow::{impl#15}::add), const_param_did: None }) (end of phase Optimization) at bb0[7]:
bad index (isize != usize)
    |
    |
454 |         self += rhs;
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:605 ~ alloc[6322]::borrow::{impl#15}::add), const_param_did: None }) (end of phase Optimization) at bb1[6]:
bad index (isize != usize)
    |
455 |         self
    |         ^^^^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:814 ~ alloc[6322]::collections::binary_heap::{impl#26}::size_hint), const_param_did: None }) (end of phase Optimization) at bb1[13]:
bad index (isize != usize)
     |
     |
1342 |         (exact, Some(exact))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:853 ~ alloc[6322]::collections::binary_heap::{impl#35}::size_hint), const_param_did: None }) (end of phase Optimization) at bb1[13]:
bad index (isize != usize)
     |
     |
1444 |         (exact, Some(exact))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1396 ~ alloc[6322]::collections::btree::map::{impl#15}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1307 |         (self.length, Some(self.length))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1429 ~ alloc[6322]::collections::btree::map::{impl#21}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1376 |         (self.length, Some(self.length))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1483 ~ alloc[6322]::collections::btree::map::{impl#29}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1500 |         (self.length, Some(self.length))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1588 ~ alloc[6322]::collections::btree::map::{impl#46}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[10]:
bad index (isize != usize)
     |
     |
1718 |         (0, Some(*self.length))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1924 ~ alloc[6322]::collections::btree::navigate::{impl#8}::next_unchecked::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb1[7]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:322:31
    |
322 |             let kv = unsafe { kv.ok().unwrap_unchecked() };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1926 ~ alloc[6322]::collections::btree::navigate::{impl#8}::next_back_unchecked::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb1[7]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:335:31
    |
335 |             let kv = unsafe { kv.ok().unwrap_unchecked() };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1932 ~ alloc[6322]::collections::btree::navigate::{impl#9}::next_unchecked::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb1[7]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:350:31
    |
350 |             let kv = unsafe { kv.ok().unwrap_unchecked() };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1934 ~ alloc[6322]::collections::btree::navigate::{impl#9}::next_back_unchecked::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb1[7]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:365:31
    |
365 |             let kv = unsafe { kv.ok().unwrap_unchecked() };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1965 ~ alloc[6322]::collections::btree::navigate::{impl#12}::visit_nodes_in_order), const_param_did: None }) (end of phase Optimization) at bb2[15]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:460:17
    |
460 |                 visit(Position::Internal(internal));
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1965 ~ alloc[6322]::collections::btree::navigate::{impl#12}::visit_nodes_in_order), const_param_did: None }) (end of phase Optimization) at bb4[14]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:458:27
    |
458 |             Leaf(leaf) => visit(Position::Leaf(leaf)),
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1965 ~ alloc[6322]::collections::btree::navigate::{impl#12}::visit_nodes_in_order), const_param_did: None }) (end of phase Optimization) at bb11[15]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:475:29
    |
475 | ...                   visit(Position::Internal(internal));
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1965 ~ alloc[6322]::collections::btree::navigate::{impl#12}::visit_nodes_in_order), const_param_did: None }) (end of phase Optimization) at bb13[15]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:465:29
    |
465 | ...                   visit(Position::Leaf(leaf));
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1965 ~ alloc[6322]::collections::btree::navigate::{impl#12}::visit_nodes_in_order), const_param_did: None }) (end of phase Optimization) at bb18[15]:
bad index (isize != usize)
   --> library/alloc/src/collections/btree/navigate.rs:468:37
    |
468 | ...                   visit(Position::InternalKV(kv));
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb6[7]:
bad index (isize != usize)
    |
    |
309 |                 return Difference { inner: DifferenceInner::Iterate(self.iter()) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb12[7]:
bad index (isize != usize)
    |
    |
315 |                 return Difference { inner: DifferenceInner::Iterate(self.iter()) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2805 ~ alloc[6322]::collections::btree::set::{impl#6}::difference), const_param_did: None }) (end of phase Optimization) at bb35[3]:
bad index (isize != usize)
    |
317 | /         Difference {
317 | /         Difference {
318 | |             inner: match (self_min.cmp(other_max), self_max.cmp(other_min)) {
319 | |                 (Greater, _) | (_, Less) => DifferenceInner::Iterate(self.iter()),
320 | |                 (Equal, _) => {
337 | |             },
338 | |         }
    | |_________^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb3[6]:
bad index (isize != usize)
    |
    |
398 |                 return Intersection { inner: IntersectionInner::Answer(None) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb8[6]:
bad index (isize != usize)
    |
    |
404 |                 return Intersection { inner: IntersectionInner::Answer(None) };
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2809 ~ alloc[6322]::collections::btree::set::{impl#6}::intersection), const_param_did: None }) (end of phase Optimization) at bb32[3]:
bad index (isize != usize)
    |
406 | /         Intersection {
406 | /         Intersection {
407 | |             inner: match (self_min.cmp(other_max), self_max.cmp(other_min)) {
408 | |                 (Greater, _) | (_, Less) => IntersectionInner::Answer(None),
409 | |                 (Equal, _) => IntersectionInner::Answer(Some(self_min)),
418 | |             },
419 | |         }
    | |_________^
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2981 ~ alloc[6322]::collections::btree::set::{impl#35}::clone), const_param_did: None }) (end of phase Optimization) at bb9[3]:
bad index (isize != usize)
     |
1393 | /         Difference {
1393 | /         Difference {
1394 | |             inner: match &self.inner {
1395 | |                 DifferenceInner::Stitch { self_iter, other_iter } => DifferenceInner::Stitch {
1396 | |                     self_iter: self_iter.clone(),
1403 | |             },
1404 | |         }
     | |_________^
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2988 ~ alloc[6322]::collections::btree::set::{impl#36}::size_hint), const_param_did: None }) (end of phase Optimization) at bb11[12]:
bad index (isize != usize)
     |
     |
1446 |         (self_len.saturating_sub(other_len), Some(self_len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3000 ~ alloc[6322]::collections::btree::set::{impl#39}::size_hint), const_param_did: None }) (end of phase Optimization) at bb1[22]:
bad index (isize != usize)
     |
     |
1481 |         (0, Some(a_len + b_len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3006 ~ alloc[6322]::collections::btree::set::{impl#41}::clone), const_param_did: None }) (end of phase Optimization) at bb8[3]:
bad index (isize != usize)
     |
1495 | /         Intersection {
1495 | /         Intersection {
1496 | |             inner: match &self.inner {
1497 | |                 IntersectionInner::Stitch { a, b } => {
1498 | |                     IntersectionInner::Stitch { a: a.clone(), b: b.clone() }
1504 | |             },
1505 | |         }
     | |_________^
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3012 ~ alloc[6322]::collections::btree::set::{impl#42}::size_hint), const_param_did: None }) (end of phase Optimization) at bb2[7]:
bad index (isize != usize)
     |
     |
1540 |             IntersectionInner::Answer(Some(_)) => (1, Some(1)),
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3012 ~ alloc[6322]::collections::btree::set::{impl#42}::size_hint), const_param_did: None }) (end of phase Optimization) at bb7[9]:
bad index (isize != usize)
     |
     |
1537 |             IntersectionInner::Stitch { a, b } => (0, Some(min(a.len(), b.len()))),
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3012 ~ alloc[6322]::collections::btree::set::{impl#42}::size_hint), const_param_did: None }) (end of phase Optimization) at bb9[8]:
bad index (isize != usize)
     |
     |
1538 |             IntersectionInner::Search { small_iter, .. } => (0, Some(small_iter.len())),
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3012 ~ alloc[6322]::collections::btree::set::{impl#42}::size_hint), const_param_did: None }) (end of phase Optimization) at bb10[7]:
bad index (isize != usize)
     |
     |
1539 |             IntersectionInner::Answer(None) => (0, Some(0)),
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3024 ~ alloc[6322]::collections::btree::set::{impl#45}::size_hint), const_param_did: None }) (end of phase Optimization) at bb2[18]:
bad index (isize != usize)
     |
     |
1570 |         (max(a_len, b_len), Some(a_len + b_len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3194 ~ alloc[6322]::collections::linked_list::{impl#9}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1009 |         (self.len, Some(self.len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3211 ~ alloc[6322]::collections::linked_list::{impl#13}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1063 |         (self.len, Some(self.len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3295 ~ alloc[6322]::collections::linked_list::{impl#23}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[16]:
bad index (isize != usize)
     |
     |
1549 |         (0, Some(self.old_len - self.idx))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3321 ~ alloc[6322]::collections::linked_list::{impl#26}::size_hint), const_param_did: None }) (end of phase Optimization) at bb0[12]:
bad index (isize != usize)
     |
     |
1601 |         (self.list.len, Some(self.list.len))
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3610 ~ alloc[6322]::collections::vec_deque::iter_mut::{impl#3}::size_hint), const_param_did: None }) (end of phase Optimization) at bb2[15]:
bad index (isize != usize)
  --> library/alloc/src/collections/vec_deque/iter_mut.rs:61:9
   |
61 |         (len, Some(len))
   |
   |
   = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3661 ~ alloc[6322]::collections::vec_deque::into_iter::{impl#1}::size_hint), const_param_did: None }) (end of phase Optimization) at bb1[13]:
bad index (isize != usize)
  --> library/alloc/src/collections/vec_deque/into_iter.rs:37:9
   |
37 |         (len, Some(len))
   |
   |
   = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3723 ~ alloc[6322]::collections::vec_deque::iter::{impl#2}::size_hint), const_param_did: None }) (end of phase Optimization) at bb2[15]:
bad index (isize != usize)
  --> library/alloc/src/collections/vec_deque/iter.rs:53:9
   |
53 |         (len, Some(len))
   |
   |
   = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:4613 ~ alloc[6322]::rc::{impl#42}::to_rc_slice), const_param_did: None }) (end of phase Optimization) at bb1[7]:
bad index (isize != usize)
     |
     |
1959 |         let (low, high) = self.size_hint();
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5272 ~ alloc[6322]::string::{impl#0}::from_utf16_lossy::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb0[4]:
bad index (isize != usize)
    |
    |
650 |         decode_utf16(v.iter().cloned()).map(|r| r.unwrap_or(REPLACEMENT_CHARACTER)).collect()
    |
    |
    = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5323 ~ alloc[6322]::string::{impl#0}::replace_range), const_param_did: None }) (end of phase Optimization) at bb29[7]:
bad index (isize != usize)
     |
     |
1705 |         unsafe { self.as_mut_vec() }.splice((start, end), replace_with.bytes());
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5323 ~ alloc[6322]::string::{impl#0}::replace_range), const_param_did: None }) (end of phase Optimization) at bb29[18]:
bad index (isize != usize)
     |
     |
1705 |         unsafe { self.as_mut_vec() }.splice((start, end), replace_with.bytes());
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5323 ~ alloc[6322]::string::{impl#0}::replace_range), const_param_did: None }) (end of phase Optimization) at bb29[28]:
bad index (isize != usize)
     |
     |
1705 |         unsafe { self.as_mut_vec() }.splice((start, end), replace_with.bytes());
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5323 ~ alloc[6322]::string::{impl#0}::replace_range), const_param_did: None }) (end of phase Optimization) at bb29[38]:
bad index (isize != usize)
     |
     |
1705 |         unsafe { self.as_mut_vec() }.splice((start, end), replace_with.bytes());
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5356 ~ alloc[6322]::string::{impl#10}::from_iter), const_param_did: None }) (end of phase Optimization) at bb3[4]:
bad index (isize != usize)
     |
     |
1900 |             Some(cow) => {
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5356 ~ alloc[6322]::string::{impl#10}::from_iter), const_param_did: None }) (end of phase Optimization) at bb3[16]:
bad index (isize != usize)
     |
     |
1901 |                 let mut buf = cow.into_owned();
     |
     |
     = note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:5953 ~ alloc[6322]::sync::{impl#55}::to_arc_slice), const_param_did: None }) (end of phase Optimization) at bb1[7]:

rust-log-analyzer avatar Jun 04 '21 03:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 272 tests
ii.....i...i..........iii.........ii...i.iii.........i.ii.........i.i........F.....i............i..i 100/272
..iii........ii.iiii.i..........i.....i...iiii........i..i.i....iii..iiii........................... 200/272
Some tests failed in compiletest suite=codegen mode=codegen host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
failures:

---- [codegen] codegen/consts.rs stdout ----


error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-10/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll" "/checkout/src/test/codegen/consts.rs"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
/checkout/src/test/codegen/consts.rs:46:12: error: CHECK: expected string not found in input
 // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 2 %1, i8* align 2 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:49:28: note: scanning from here
define i64 @low_align_const() unnamed_addr #0 {
                           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:49:28: note: with "LOW_HIGH" equal to "@alloc16"
define i64 @low_align_const() unnamed_addr #0 {
                           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:56:18: note: possible intended match here
 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %1, i8* align 8 getelementptr inbounds (<{ [16 x i8] }>, <{ [16 x i8] }>* @0, i32 0, i32 0, i32 0), i64 16, i1 false)
                 ^
/checkout/src/test/codegen/consts.rs:54:12: error: CHECK: expected string not found in input
 // CHECK: memcpy.p0i8.p0i8.i{{(32|64)}}(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i{{(32|64)}} 8, i1 false)
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:71:29: note: scanning from here
define i64 @high_align_const() unnamed_addr #0 {
                            ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:71:29: note: with "LOW_HIGH" equal to "@alloc16"
define i64 @high_align_const() unnamed_addr #0 {
                            ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/consts/consts.ll:78:18: note: possible intended match here
 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %1, i8* align 8 getelementptr inbounds (<{ [16 x i8] }>, <{ [16 x i8] }>* @0, i32 0, i32 0, i32 0), i64 16, i1 false)

------------------------------------------


---
test result: FAILED. 212 passed; 1 failed; 59 ignored; 0 measured; 0 filtered out; finished in 2.89s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "codegen" "--mode" "codegen" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:13:08

rust-log-analyzer avatar Jun 04 '21 03:06 rust-log-analyzer

Is it fine to remove this test for now? I assume it's checking for some optimization on enums, but since the coverage is now over all enum copies essentially, it should be fine?

JulianKnodt avatar Jun 05 '21 23:06 JulianKnodt

This test would be src/test/codegen/consts.rs? I think we should keep the test. The enums there shouldn't qualify for the transformation once we use proper threshold. For the time being, you could ignore the test or use -Zmir-opt-level=0 in compile-flags:.

tmiasko avatar Jun 06 '21 06:06 tmiasko

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.45
   Compiling unwind v0.0.0 (/checkout/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/library/rustc-std-workspace-core)
error: internal compiler error: /checkout/compiler/rustc_middle/src/ty/consts/int.rs:230:13: expected int of size 4, but got size 8
thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:1007:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (9d1cc6521 2021-06-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C linker=cc -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

rust-log-analyzer avatar Jun 07 '21 09:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.45
   Compiling unwind v0.0.0 (/checkout/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/library/rustc-std-workspace-core)
error: internal compiler error: /checkout/compiler/rustc_middle/src/ty/consts/int.rs:230:13: expected int of size 4, but got size 8
thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:1007:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (4adb53e9b 2021-06-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C linker=cc -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

rust-log-analyzer avatar Jun 08 '21 01:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.45
   Compiling unwind v0.0.0 (/checkout/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/library/rustc-std-workspace-core)
error: internal compiler error: /checkout/compiler/rustc_middle/src/ty/consts/int.rs:230:13: expected int of size 4, but got size 8
thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:1007:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (3c430ea61 2021-06-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off -C linker=cc -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 -C embed-bitcode=yes --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

rust-log-analyzer avatar Jun 08 '21 07:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_errors v0.0.0 (/checkout/compiler/rustc_errors)
   Compiling tracing-tree v0.1.9
   Compiling chalk-solve v0.55.0
   Compiling rustc_session v0.0.0 (/checkout/compiler/rustc_session)
rustc exited with signal: 7 (core dumped)
error: could not compile `chalk-solve`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name chalk_solve --edition=2018 /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-solve-0.55.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off --cfg 'feature="default"' --cfg 'feature="tracing-full"' --cfg 'feature="tracing-subscriber"' --cfg 'feature="tracing-tree"' -C metadata=ca9aeb112c1d5252 -C extra-filename=-ca9aeb112c1d5252 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern chalk_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/libchalk_derive-a038ef3a44c81047.so --extern chalk_ir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libchalk_ir-fb5dcda25976c811.rmeta --extern ena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libena-881176effda5ada3.rmeta --extern itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libitertools-76742db14aa48b54.rmeta --extern petgraph=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libpetgraph-0b476a9ba7a9bf67.rmeta --extern rustc_hash=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_hash-530eb8c7b938ca62.rmeta --extern tracing=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing-79d3b33458163f0d.rmeta --extern tracing_subscriber=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing_subscriber-933dff66d1c74b45.rmeta --extern tracing_tree=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing_tree-68d5b821ebd306dd.rmeta --cap-lints allow -Zmacro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Ztls-model=initial-exec -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo` (exit status: 254)
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy

rust-log-analyzer avatar Jun 16 '21 05:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_errors v0.0.0 (/checkout/compiler/rustc_errors)
   Compiling tracing-tree v0.1.9
   Compiling rustc_session v0.0.0 (/checkout/compiler/rustc_session)
   Compiling chalk-solve v0.55.0
rustc exited with signal: 7 (core dumped)
error: could not compile `chalk-solve`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name chalk_solve --edition=2018 /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-solve-0.55.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off --cfg 'feature="default"' --cfg 'feature="tracing-full"' --cfg 'feature="tracing-subscriber"' --cfg 'feature="tracing-tree"' -C metadata=ca9aeb112c1d5252 -C extra-filename=-ca9aeb112c1d5252 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern chalk_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/libchalk_derive-a038ef3a44c81047.so --extern chalk_ir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libchalk_ir-fb5dcda25976c811.rmeta --extern ena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libena-881176effda5ada3.rmeta --extern itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libitertools-76742db14aa48b54.rmeta --extern petgraph=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libpetgraph-0b476a9ba7a9bf67.rmeta --extern rustc_hash=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_hash-530eb8c7b938ca62.rmeta --extern tracing=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing-79d3b33458163f0d.rmeta --extern tracing_subscriber=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing_subscriber-933dff66d1c74b45.rmeta --extern tracing_tree=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing_tree-68d5b821ebd306dd.rmeta --cap-lints allow -Zmacro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Ztls-model=initial-exec -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Cllvm-args=-import-instr-limit=10 -Z binary-dep-depinfo` (exit status: 254)
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy

rust-log-analyzer avatar Jun 16 '21 06:06 rust-log-analyzer

Is this spurious? It compiles and runs on my machine™

JulianKnodt avatar Jun 16 '21 07:06 JulianKnodt

Unlikely to be spurious. The continuous integration uses ./x.py --stage 2 test, the default --stage 1 might be insufficient to reproduce.

tmiasko avatar Jun 16 '21 13:06 tmiasko

A few mir-opt test cases would be nice to have. A positive one demonstrating the transformation, and a negative that transform is not applied for enums using niche encoding, and in cases where discriminant cannot be naturally used as indices, e.g., #[repr(u32)] pub enum E { A = 37549, B([u8; 1024]) }.

tmiasko avatar Jun 16 '21 13:06 tmiasko

It does panic on the variant with the explicit discriminant value, I might just disallow that case

JulianKnodt avatar Jun 21 '21 08:06 JulianKnodt

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Warning: Skipping "src/test/mir-opt": not a regular file or directory
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu)

running 162 tests
...................................i..............................iF.............i.................. 100/162
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
failures:


---- [mir-opt] mir-opt/enum_opt.rs stdout ----
29           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:24:35: 24:36
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
- +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
+ +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
33 +                                          // mir::Constant
34 +                                          // + span: $DIR/enum_opt.rs:24:3: 24:36
- +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [8, 0, 0, 0, 0, 0, 0, 0, 8, 32, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
+ +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 4, 32, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
36 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
37 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:24:3: 24:36
38 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:24:3: 24:36

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.diff', src/tools/compiletest/src/runtest.rs:3573:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 157 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.28s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test src/test/mir-opt --host= --target=i686-unknown-linux-gnu
Build completed unsuccessfully in 0:01:37

rust-log-analyzer avatar Jun 21 '21 08:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.............................i................................
failures:
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
29           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:22:35: 22:36
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
- +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
+ +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
33 +                                          // mir::Constant
34 +                                          // + span: $DIR/enum_opt.rs:22:3: 22:36
- +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [8, 0, 0, 0, 0, 0, 0, 0, 8, 32, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
+ +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 4, 32, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
36 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
37 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
38 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:22:3: 22:36

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.diff', src/tools/compiletest/src/runtest.rs:3573:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 157 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.05s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test src/test/mir-opt --host= --target=i686-unknown-linux-gnu
Build completed unsuccessfully in 0:01:33

rust-log-analyzer avatar Jun 21 '21 09:06 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
.............................i................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
29           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:22:35: 22:36
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
- +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
+ +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
33 +                                          // mir::Constant
34 +                                          // + span: $DIR/enum_opt.rs:22:3: 22:36
- +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [8, 0, 0, 0, 0, 0, 0, 0, 8, 32, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
+ +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 4, 32, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
36 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
37 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:22:3: 22:36
38 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:22:3: 22:36

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.diff', src/tools/compiletest/src/runtest.rs:3576:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 157 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.20s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test src/test/mir-opt --host= --target=i686-unknown-linux-gnu
Build completed unsuccessfully in 0:01:34

rust-log-analyzer avatar Jun 21 '21 19:06 rust-log-analyzer

Hm this is odd, it passes locally again but I'm not sure why it isn't on CI, will I have to only select 64 bit width?

JulianKnodt avatar Jun 21 '21 19:06 JulianKnodt

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
.............................i................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Output file `/checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff` from test does not exist', src/tools/compiletest/src/runtest.rs:3568:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 157 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.06s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test src/test/mir-opt --host= --target=i686-unknown-linux-gnu
Build completed unsuccessfully in 0:01:43

rust-log-analyzer avatar Jun 21 '21 20:06 rust-log-analyzer

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

JulianKnodt avatar Jun 22 '21 05:06 JulianKnodt

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
..............................i................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
3   
4   fn unin() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/enum_opt.rs:28:15: 28:15
-       let mut _1: Uninhabited;             // in scope 0 at $DIR/enum_opt.rs:29:7: 29:12
-       let mut _2: Uninhabited;             // in scope 0 at $DIR/enum_opt.rs:30:7: 30:36
-       let mut _3: [u64; 1024];             // in scope 0 at $DIR/enum_opt.rs:30:26: 30:35
- +     let mut _4: [usize; 2];              // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _5: isize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _6: usize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _7: usize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _8: *mut Uninhabited;        // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _9: *mut u8;                 // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _10: *const Uninhabited;     // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
- +     let mut _11: *const u8;              // in scope 0 at $DIR/enum_opt.rs:30:3: 30:36
+       let mut _1: Niche;                   // in scope 0 at $DIR/enum_opt.rs:29:7: 29:12
+       let mut _2: Niche;                   // in scope 0 at $DIR/enum_opt.rs:30:7: 30:30
+       let mut _3: [u64; 1024];             // in scope 0 at $DIR/enum_opt.rs:30:20: 30:29
+ +     let mut _4: [usize; 2];              // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _5: isize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _6: usize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _7: usize;                   // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _8: *mut Niche;              // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _9: *mut u8;                 // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _10: *const Niche;           // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
+ +     let mut _11: *const u8;              // in scope 0 at $DIR/enum_opt.rs:30:3: 30:30
17       scope 1 {
18           debug a => _1;                   // in scope 1 at $DIR/enum_opt.rs:29:7: 29:12

20   
21       bb0: {
21       bb0: {
22           StorageLive(_1);                 // scope 0 at $DIR/enum_opt.rs:29:7: 29:12
-           discriminant(_1) = 0;            // scope 0 at $DIR/enum_opt.rs:29:15: 29:32
-           StorageLive(_2);                 // scope 1 at $DIR/enum_opt.rs:30:7: 30:36
-           StorageLive(_3);                 // scope 1 at $DIR/enum_opt.rs:30:26: 30:35
-           _3 = [const 1_u64; 1024];        // scope 1 at $DIR/enum_opt.rs:30:26: 30:35
-           ((_2 as Large).0: [u64; 1024]) = move _3; // scope 1 at $DIR/enum_opt.rs:30:7: 30:36
-           discriminant(_2) = 1;            // scope 1 at $DIR/enum_opt.rs:30:7: 30:36
-           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:30:35: 30:36
- -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
+           discriminant(_1) = 0;            // scope 0 at $DIR/enum_opt.rs:29:15: 29:26
+           StorageLive(_2);                 // scope 1 at $DIR/enum_opt.rs:30:7: 30:30
+           StorageLive(_3);                 // scope 1 at $DIR/enum_opt.rs:30:20: 30:29
+           _3 = [const 1_u64; 1024];        // scope 1 at $DIR/enum_opt.rs:30:20: 30:29
+           ((_2 as Large).0: [u64; 1024]) = move _3; // scope 1 at $DIR/enum_opt.rs:30:7: 30:30
+           discriminant(_2) = 1;            // scope 1 at $DIR/enum_opt.rs:30:7: 30:30
+           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:30:29: 30:30
+ -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
33 +                                          // mir::Constant
- +                                          // + span: $DIR/enum_opt.rs:30:3: 30:36
+ +                                          // + span: $DIR/enum_opt.rs:30:3: 30:30
35 +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 4, 32, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
- +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _8 = &raw mut _1;                // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _9 = _8 as *mut u8 (Misc);       // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _10 = &raw const _2;             // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         _11 = _10 as *const u8 (Misc);   // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         copy_nonoverlapping(src=_11, dst=_9, count=_7); // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
- +         StorageDead(_4);                 // scope 1 at $DIR/enum_opt.rs:30:3: 30:36
-           StorageDead(_2);                 // scope 1 at $DIR/enum_opt.rs:30:35: 30:36
+ +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _8 = &raw mut _1;                // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _9 = _8 as *mut u8 (Misc);       // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _10 = &raw const _2;             // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         _11 = _10 as *const u8 (Misc);   // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         copy_nonoverlapping(src=_11, dst=_9, count=_7); // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+ +         StorageDead(_4);                 // scope 1 at $DIR/enum_opt.rs:30:3: 30:30
+           StorageDead(_2);                 // scope 1 at $DIR/enum_opt.rs:30:29: 30:30
46           StorageDead(_1);                 // scope 0 at $DIR/enum_opt.rs:31:1: 31:2
47           return;                          // scope 0 at $DIR/enum_opt.rs:31:2: 31:2


thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff', src/tools/compiletest/src/runtest.rs:3576:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 158 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.49s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test src/test/mir-opt --host= --target=i686-unknown-linux-gnu
Build completed unsuccessfully in 0:01:49

rust-log-analyzer avatar Jun 23 '21 08:06 rust-log-analyzer

I won't be able to review anything in the near future.

r? @wesleywiser

tmiasko avatar Jun 23 '21 13:06 tmiasko

Sorry for the delay on reviewing this. I don't have time this week to do a thorough review but I will put it on my calendar for next week. In the mean time, it looks like we haven't done a perf run yet to see what the impact is so I'll go ahead and kick that off.

wesleywiser avatar Jul 22 '21 18:07 wesleywiser

@bors try @rust-timer queue

wesleywiser avatar Jul 22 '21 18:07 wesleywiser

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Jul 22 '21 18:07 rust-timer

:hourglass: Trying commit 4a350eb028897c10245726432f52e6dfb92004fb with merge 91b660469a36edc27f49b83a864a5bc95fcf0b7f...

bors avatar Jul 22 '21 18:07 bors

No worries, whenever you have time!

JulianKnodt avatar Jul 22 '21 18:07 JulianKnodt

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_mir v0.0.0 (/checkout/compiler/rustc_mir)
error[E0308]: mismatched types
   --> compiler/rustc_mir/src/transform/large_enums.rs:102:65
    |
102 |         Some((adt_def, num_discrs, alloc_cache.entry(ty).insert(alloc).get()))
    |                                                                 ^^^^^ expected `()`, found struct `rustc_middle::mir::interpret::AllocId`
    |
    = note: expected reference `&'tcx rustc_middle::mir::interpret::Allocation<()>`

error[E0308]: mismatched types
   --> compiler/rustc_mir/src/transform/large_enums.rs:139:60
    |
    |
139 | ...                   interpret::ConstValue::ByRef { alloc, offset: Size::ZERO },
    |                                                      ^^^^^ expected struct `rustc_middle::mir::interpret::AllocId`, found `()`
    = note: expected reference `&rustc_middle::mir::interpret::Allocation`
               found reference `&rustc_middle::mir::interpret::Allocation<()>`
note: return type inferred to be `&rustc_middle::mir::interpret::Allocation` here
   --> compiler/rustc_mir/src/transform/large_enums.rs:121:25
   --> compiler/rustc_mir/src/transform/large_enums.rs:121:25
    |
121 |                         self.candidate(tcx, param_env, ty, &mut alloc_cache)?;

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.

rust-log-analyzer avatar Jul 22 '21 18:07 rust-log-analyzer

:broken_heart: Test failed - checks-actions

bors avatar Jul 22 '21 18:07 bors

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
..............................i.................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
32 +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +                                          // mir::Constant
- +                                          // + span: $DIR/enum_opt.rs:44:3: 44:31
- +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [8, 0, 0, 0, 0, 0, 0, 0, 8, 32, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
36 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
37 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
38 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:44:3: 44:31

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff', src/tools/compiletest/src/runtest.rs:3588:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 160 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 2.67s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:13:46

rust-log-analyzer avatar Jul 22 '21 19:07 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
..............................i.................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
32 +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +                                          // mir::Constant
- +                                          // + span: $DIR/enum_opt.rs:44:3: 44:31
- +                                          // + literal: Const { ty: [usize; 2], val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 4, 32, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
36 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
37 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
38 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:44:3: 44:31

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff', src/tools/compiletest/src/runtest.rs:3588:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 159 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 2.30s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:01:42

rust-log-analyzer avatar Jul 22 '21 21:07 rust-log-analyzer

@bors try @rust-timer queue

jyn514 avatar Jul 22 '21 23:07 jyn514

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Jul 22 '21 23:07 rust-timer

:hourglass: Trying commit fdb64aaceacf0b76cce98e04b8d20e90e41ea303 with merge 6f16a2c239667ca0125e994a182608eb024316eb...

bors avatar Jul 22 '21 23:07 bors

:sunny: Try build successful - checks-actions Build commit: 6f16a2c239667ca0125e994a182608eb024316eb (6f16a2c239667ca0125e994a182608eb024316eb)

bors avatar Jul 22 '21 23:07 bors

Queued 6f16a2c239667ca0125e994a182608eb024316eb with parent 027187094ee05011d6602f5742f550851ccc7fd6, future comparison URL.

rust-timer avatar Jul 22 '21 23:07 rust-timer

Finished benchmarking try commit (6f16a2c239667ca0125e994a182608eb024316eb): comparison url.

Summary: This change led to significant mixed results 🤷 in compiler performance.

  • Very large regression in instruction counts (up to 28.9% on full builds of wg-grammar-check)
  • Moderate improvement in instruction counts (up to -1.2% on incr-patched: println builds of webrender-opt)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never @rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

rust-timer avatar Jul 23 '21 03:07 rust-timer

oof well having it on for all enums is definitely bad, but maybe the discrepancy parameter may make it more tractable. I may experiment with tuning it after reviews

JulianKnodt avatar Jul 23 '21 04:07 JulianKnodt

Ping from triage: @JulianKnodt what is the status of this PR? Is it ready for reviews?

JohnCSimon avatar Aug 09 '21 06:08 JohnCSimon

@JohnCSimon It should be ready for reviews now

JulianKnodt avatar Aug 09 '21 07:08 JulianKnodt

Ping from triage: @JulianKnodt can you please address the merge conflicts?

JohnCSimon avatar Sep 13 '21 02:09 JohnCSimon

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
error[E0433]: failed to resolve: use of undeclared crate or module `large_enums`
   --> compiler/rustc_mir_transform/src/lib.rs:529:10
    |
529 |         &large_enums::EnumSizeOpt { discrepancy: 128 },
    |          ^^^^^^^^^^^ use of undeclared crate or module `large_enums`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `rustc_mir_transform` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

rust-log-analyzer avatar Sep 13 '21 03:09 rust-log-analyzer

The job x86_64-gnu-llvm-10 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
...............................i.................................
failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
6       let mut _1: NoData;                  // in scope 0 at $DIR/enum_opt.rs:43:7: 43:12
7       let mut _2: NoData;                  // in scope 0 at $DIR/enum_opt.rs:44:7: 44:31
8       let mut _3: [u64; 1024];             // in scope 0 at $DIR/enum_opt.rs:44:21: 44:30
- +     let mut _4: [usize; 2];              // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _5: isize;                   // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _6: usize;                   // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _7: usize;                   // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _8: *mut NoData;             // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _9: *mut u8;                 // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _10: *const NoData;          // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
- +     let mut _11: *const u8;              // in scope 0 at $DIR/enum_opt.rs:44:3: 44:31
17       scope 1 {
18           debug a => _1;                   // in scope 1 at $DIR/enum_opt.rs:43:7: 43:12


27           ((_2 as Large).0: [u64; 1024]) = move _3; // scope 1 at $DIR/enum_opt.rs:44:7: 44:31
28           discriminant(_2) = 1;            // scope 1 at $DIR/enum_opt.rs:44:7: 44:31
29           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:44:30: 44:31
- -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _8 = &raw mut _1;                // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _9 = _8 as *mut u8 (Misc);       // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _10 = &raw const _2;             // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         _11 = _10 as *const u8 (Misc);   // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         copy_nonoverlapping(src=_11, dst=_9, count=_7); // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
- +         StorageDead(_4);                 // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
+           _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:44:3: 44:31
42           StorageDead(_2);                 // scope 1 at $DIR/enum_opt.rs:44:30: 44:31
43           StorageDead(_1);                 // scope 0 at $DIR/enum_opt.rs:45:1: 45:2
44           return;                          // scope 0 at $DIR/enum_opt.rs:45:2: 45:2

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff', src/tools/compiletest/src/runtest.rs:3578:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 161 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 1.84s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:10:59

rust-log-analyzer avatar Oct 03 '21 14:10 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #89933) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Oct 19 '21 17:10 bors

I finally got around to looking through it, and I think because of its place in the optimization pipeline it wasn't getting hit. I don't think it should be first, but I was wondering where it should go

JulianKnodt avatar Oct 25 '21 00:10 JulianKnodt

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Warning: Skipping "src/test/mir-opt": not a regular file or directory
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu)

running 167 tests
...................................i..............................i...............i.F............... 100/167
Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=i686-unknown-linux-gnu
failures:


---- [mir-opt] mir-opt/enum_opt.rs stdout ----
4   fn unin() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/enum_opt.rs:43:15: 43:15
6       let mut _1: NoData;                  // in scope 0 at $DIR/enum_opt.rs:44:7: 44:12
+       let mut _2: NoData;                  // in scope 0 at $DIR/enum_opt.rs:45:7: 45:31
+       let mut _3: [u64; 1024];             // in scope 0 at $DIR/enum_opt.rs:45:21: 45:30
+ +     let mut _4: [usize; 2];              // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _5: isize;                   // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _6: usize;                   // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _7: usize;                   // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _8: *mut NoData;             // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _9: *mut u8;                 // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _10: *const NoData;          // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
+ +     let mut _11: *const u8;              // in scope 0 at $DIR/enum_opt.rs:45:3: 45:31
7       scope 1 {
8           debug a => _1;                   // in scope 1 at $DIR/enum_opt.rs:44:7: 44:12

10   
11       bb0: {
11       bb0: {
+           StorageLive(_1);                 // scope 0 at $DIR/enum_opt.rs:44:7: 44:12
12           discriminant(_1) = 0;            // scope 0 at $DIR/enum_opt.rs:44:15: 44:27
-           ((_1 as Large).0: [u64; 1024]) = [const 1_u64; 1024]; // scope 1 at $DIR/enum_opt.rs:45:21: 45:30
-           discriminant(_1) = 1;            // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
+           StorageLive(_2);                 // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
+           StorageLive(_3);                 // scope 1 at $DIR/enum_opt.rs:45:21: 45:30
+           _3 = [const 1_u64; 1024];        // scope 1 at $DIR/enum_opt.rs:45:21: 45:30
+           ((_2 as Large).0: [u64; 1024]) = move _3; // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
+           discriminant(_2) = 1;            // scope 1 at $DIR/enum_opt.rs:45:7: 45:31
+           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:45:30: 45:31
+ -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _8 = &raw mut _1;                // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _9 = _8 as *mut u8 (Misc);       // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _10 = &raw const _2;             // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _11 = _10 as *const u8 (Misc);   // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         copy_nonoverlapping(src=_11, dst=_9, count=_7); // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         StorageDead(_4);                 // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+           StorageDead(_2);                 // scope 1 at $DIR/enum_opt.rs:45:30: 45:31
+           _0 = const ();                   // scope 0 at $DIR/enum_opt.rs:43:15: 46:2
+           StorageDead(_1);                 // scope 0 at $DIR/enum_opt.rs:46:1: 46:2
15           return;                          // scope 0 at $DIR/enum_opt.rs:46:2: 46:2
17   }


thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff', src/tools/compiletest/src/runtest.rs:3360:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 162 passed; 1 failed; 4 ignored; 0 measured; 0 filtered out; finished in 3.09s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i686-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-i686-unknown-linux-gnu" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "i686-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-12/bin/FileCheck" "--nodejs" "/usr/bin/node" "--linker" "cc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/i686-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "12.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hellonew hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:01:47

rust-log-analyzer avatar Oct 25 '21 01:10 rust-log-analyzer

We can start with the pass there for now since it's disabled by default. We should try to re-visit that later though.

@bors r+

wesleywiser avatar Nov 01 '21 19:11 wesleywiser

:pushpin: Commit 0f842de72c05ebbfef78b0b577fdac58b8160183 has been approved by wesleywiser

bors avatar Nov 01 '21 19:11 bors

:hourglass: Testing commit 0f842de72c05ebbfef78b0b577fdac58b8160183 with merge cf39a698349261113d0422fe418862f4a0efcc49...

bors avatar Nov 01 '21 20:11 bors

:broken_heart: Test failed - checks-actions

bors avatar Nov 01 '21 21:11 bors

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [mir-opt] mir-opt/storage_live_dead_in_statics.rs ... ok

failures:

---- [mir-opt] mir-opt/enum_opt.rs stdout ----
29           StorageDead(_3);                 // scope 1 at $DIR/enum_opt.rs:45:30: 45:31
30 -         _1 = move _2;                    // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
31 +         StorageLive(_4);                 // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
- +         _4 = const [4_usize, 8196_usize]; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
+ +         _4 = const [8_usize, 8200_usize]; // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
33 +         _5 = discriminant(_2);           // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
34 +         _6 = _5 as usize (Misc);         // scope 1 at $DIR/enum_opt.rs:45:3: 45:31
35 +         _7 = _4[_6];                     // scope 1 at $DIR/enum_opt.rs:45:3: 45:31

thread '[mir-opt] mir-opt/enum_opt.rs' panicked at 'Actual MIR output differs from expected MIR output /checkout/src/test/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff', src/tools/compiletest/src/runtest.rs:3360:25


failures:
    [mir-opt] mir-opt/enum_opt.rs
    [mir-opt] mir-opt/enum_opt.rs

test result: FAILED. 142 passed; 1 failed; 24 ignored; 0 measured; 0 filtered out; finished in 7.78s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-wasm32-unknown-unknown" "--suite" "mir-opt" "--mode" "mir-opt" "--target" "wasm32-unknown-unknown" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--nodejs" "/node-v15.14.0-linux-x64/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--llvm-version" "13.0.0-rust-1.58.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:18:36

rust-log-analyzer avatar Nov 01 '21 21:11 rust-log-analyzer

@bors r- (bors having hiccup and trying to retest failed prs)

matthiaskrgr avatar Nov 07 '21 11:11 matthiaskrgr

@matthiaskrgr Is this spurious or a real issue? I've not had a ton of time to look into it

JulianKnodt avatar Nov 07 '21 21:11 JulianKnodt

This afternoon, there were like 5-8 PRs suddenly queued up for being merged/tested by bors, but most of them already failed in CI previously and didn't have any changes done to them in the meantime. I manually disapproved the PRs again (removing them from the approved-queue as to not waste 12-18 hours of CI-time on PRs that would fail anyway.

I have no how this happened, but I don't think you have anything to worry about :)

matthiaskrgr avatar Nov 07 '21 21:11 matthiaskrgr

Ping from triage: @matthiaskrgr can you please address the test failures?

JohnCSimon avatar Dec 05 '21 01:12 JohnCSimon

:umbrella: The latest upstream changes (presumably #91475) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Dec 05 '21 06:12 bors

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
   Compiling rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
   Compiling rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
   Compiling rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> compiler/rustc_mir_transform/src/large_enums.rs:76:41
70 | /         macro_rules! encode_store {
70 | /         macro_rules! encode_store {
71 | |             ($curr_idx: expr, $endian: expr, $bytes: expr) => {
72 | |                 let bytes = match $endian {
73 | |                     rustc_target::abi::Endian::Little => $bytes.to_le_bytes(),
...  |
76 | |                 for (i, b) in IntoIter::new(bytes).enumerate() {
...  |
79 | |             };
80 | |         }
   | |_________- in this expansion of `encode_store!`
   | |_________- in this expansion of `encode_store!`
...
88 |                       encode_store!(curr_idx, data_layout.endian, sz.bytes() as u32);
   |
   |
   = note: `-D deprecated` implied by `-D warnings`

error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> compiler/rustc_mir_transform/src/large_enums.rs:76:41
70 | /         macro_rules! encode_store {
70 | /         macro_rules! encode_store {
71 | |             ($curr_idx: expr, $endian: expr, $bytes: expr) => {
72 | |                 let bytes = match $endian {
73 | |                     rustc_target::abi::Endian::Little => $bytes.to_le_bytes(),
...  |
76 | |                 for (i, b) in IntoIter::new(bytes).enumerate() {
...  |
79 | |             };
80 | |         }
   | |_________- in this expansion of `encode_store!`
   | |_________- in this expansion of `encode_store!`
...
91 |                       encode_store!(curr_idx, data_layout.endian, sz.bytes());


error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
   --> compiler/rustc_mir_transform/src/large_enums.rs:250:42
250 |                     let iter = IntoIter::new([
    |                                          ^^^

error: could not compile `rustc_mir_transform` due to 3 previous errors

rust-log-analyzer avatar Dec 06 '21 22:12 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
   Compiling rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
   Compiling rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
   Compiling rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> compiler/rustc_mir_transform/src/large_enums.rs:76:41
70 | /         macro_rules! encode_store {
70 | /         macro_rules! encode_store {
71 | |             ($curr_idx: expr, $endian: expr, $bytes: expr) => {
72 | |                 let bytes = match $endian {
73 | |                     rustc_target::abi::Endian::Little => $bytes.to_le_bytes(),
...  |
76 | |                 for (i, b) in IntoIter::new(bytes).enumerate() {
...  |
79 | |             };
80 | |         }
   | |_________- in this expansion of `encode_store!`
   | |_________- in this expansion of `encode_store!`
...
88 |                       encode_store!(curr_idx, data_layout.endian, sz.bytes() as u32);
   |
   |
   = note: `-D deprecated` implied by `-D warnings`

error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
  --> compiler/rustc_mir_transform/src/large_enums.rs:76:41
70 | /         macro_rules! encode_store {
70 | /         macro_rules! encode_store {
71 | |             ($curr_idx: expr, $endian: expr, $bytes: expr) => {
72 | |                 let bytes = match $endian {
73 | |                     rustc_target::abi::Endian::Little => $bytes.to_le_bytes(),
...  |
76 | |                 for (i, b) in IntoIter::new(bytes).enumerate() {
...  |
79 | |             };
80 | |         }
   | |_________- in this expansion of `encode_store!`
   | |_________- in this expansion of `encode_store!`
...
91 |                       encode_store!(curr_idx, data_layout.endian, sz.bytes());


error: use of deprecated associated function `std::array::IntoIter::<T, N>::new`: use `IntoIterator::into_iter` instead
   --> compiler/rustc_mir_transform/src/large_enums.rs:250:42
250 |                     let iter = IntoIter::new([
    |                                          ^^^

error: could not compile `rustc_mir_transform` due to 3 previous errors

rust-log-analyzer avatar Dec 06 '21 22:12 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #91902) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Dec 14 '21 14:12 bors

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_traits v0.0.0 (/checkout/compiler/rustc_traits)
    Checking rustc_mir_build v0.0.0 (/checkout/compiler/rustc_mir_build)
    Checking rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
    Checking rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
error: the feature `iter_zip` has been stable since 1.59.0 and no longer requires an attribute to enable
   |
   |
16 | #![feature(iter_zip)]
   |
   |
   = note: `-D stable-features` implied by `-D warnings`
error: could not compile `rustc_const_eval` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Build completed unsuccessfully in 0:03:15

rust-log-analyzer avatar Dec 15 '21 22:12 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_lint v0.0.0 (/checkout/compiler/rustc_lint)
   Compiling rustc_const_eval v0.0.0 (/checkout/compiler/rustc_const_eval)
   Compiling rustc_ty_utils v0.0.0 (/checkout/compiler/rustc_ty_utils)
   Compiling rustc_traits v0.0.0 (/checkout/compiler/rustc_traits)
error: the feature `entry_insert` has been stable since 1.59.0 and no longer requires an attribute to enable
   |
15 | #![feature(entry_insert)]
   |            ^^^^^^^^^^^^
   |
   |
   = note: `-D stable-features` implied by `-D warnings`
error: could not compile `rustc_const_eval` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Build completed unsuccessfully in 0:03:12

rust-log-analyzer avatar Dec 26 '21 07:12 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
   Compiling rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
   Compiling rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
   Compiling rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
error[E0599]: no method named `insert` found for enum `std::collections::hash_map::Entry` in the current scope
   --> compiler/rustc_mir_transform/src/large_enums.rs:101:59
    |
101 |         Some((adt_def, num_discrs, *alloc_cache.entry(ty).insert(alloc).get()))
    |                                                           ^^^^^^ method not found in `std::collections::hash_map::Entry<'_, &'tcx TyS<'tcx>, AllocId>`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `rustc_mir_transform` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

rust-log-analyzer avatar Dec 26 '21 09:12 rust-log-analyzer

@wesleywiser this is ready for review

Dylan-DPC avatar Feb 21 '22 23:02 Dylan-DPC

I agree that this opt should be moved to codegen, for the following reasons:

  1. We have another set of MIR opts, the simplify try related stuff (especially SimplifyArmIdentity) that has basically exactly the job of undoing what is done here. Specifically, it will take a by-field move and turn it back into a move of the whole thing. How these things should interact should, imo, be addressed before this PR is merged.
  2. Relatedly, I strongly believe that MIR opts should be working towards some "canonicalized" MIR. Since the input and output of this optimization are semantically equivalent and these kinds of patterns generally inhibit other optimizations, I can't imagine that this is a part of such canonicalized MIR.
  3. This optimization won't be applied to generic parameters, which is 1) unfortunate and 2) probably surprising to users. Rust claims to provide zero runtime cost abstractions via generics, and random optimizations not firing on generics for opaque reasons is not really compatible with that.

JakobDegen avatar Mar 17 '22 16:03 JakobDegen

@JulianKnodt Thanks for rebasing and resolving merge conflicts! This looks ready to go to me.

@JakobDegen In general, your comment raises some good points and I find myself agreeing with much of it! Having a canonicalized MIR dialect/form will be critical to have more complex optimizations that consistently trigger. I will note that MIR optimizations in general all suffer from the third point you mention but, conversely, the whole point of MIR opts for us is that they indeed apply pre-monomorphization. The real goal IMO is to drive down compilation time by reducing duplicated work in LLVM. Any improvements to code quality as a result of MIR opts are merely an unexpected bonus. 🙂

Having said of that, our policy right now is to be willing to merge new MIR passes that are disabled by default and give them time to mature in-tree. If we decide on a canonicalized form of MIR in the future, this pass could be adapted to generate that form or dropped if need be. I don't think we need to block merging this PR on that discussion because we're always free to change our minds later.

@bors r+

wesleywiser avatar Mar 24 '22 14:03 wesleywiser

@wesleywiser yeah, I don't mind merging it either - it doesn't really affect things either way.

I will note that MIR optimizations in general all suffer from the third point you mention

I don't think this is the case. Many MIR opts - eg InstCombine, SimplifyArmIdentity, UninhabitedEnumBranching - all don't have problems with generics because the operations they are interested in can't be applied to values of types that are parameters in the first place. For example, everywhere where you can match val, the type of val is non-generic and so UninhabitedEnumBranching can run. Other opts like DestProp don't care at all - they only deal with operations (moves/copies) that can be performed on all types regardless of if they are parameters or not. This particular opt is sort of special because it tries to turn an operation that can be done on all types (moving/copying) into an operation that can be done on only some types

JakobDegen avatar Mar 25 '22 01:03 JakobDegen

@bors r=wesleywiser

(bors didn't pick this up it seems)

matthiaskrgr avatar Mar 25 '22 15:03 matthiaskrgr

:pushpin: Commit 0bcd82a57e5a787ef7aab0718a405cea158eed62 has been approved by wesleywiser

bors avatar Mar 25 '22 15:03 bors

:hourglass: Testing commit 0bcd82a57e5a787ef7aab0718a405cea158eed62 with merge 21cc049c9306a23b0ecd8e7e12aaf9c9428d8c25...

bors avatar Mar 25 '22 19:03 bors

:broken_heart: Test failed - checks-actions

bors avatar Mar 25 '22 19:03 bors

The job x86_64-gnu-debug failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_typeck v0.0.0 (/checkout/compiler/rustc_typeck)
    Checking rustc_plugin_impl v0.0.0 (/checkout/compiler/rustc_plugin_impl)
    Checking rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
    Checking rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
error: hidden lifetime parameters in types are deprecated
  --> compiler/rustc_mir_transform/src/large_enums.rs:32:24
   |
32 |     ) -> Option<(&'tcx AdtDef, usize, AllocId)> {
   |                        ^^^^^^ expected named lifetime parameter
   |
   = note: `-D elided-lifetimes-in-paths` implied by `-D warnings`
help: consider using the `'_` lifetime
   |
32 |     ) -> Option<(&'tcx AdtDef<'_>, usize, AllocId)> {

error[E0615]: attempted to take value of method `size` on type `&rustc_target::abi::Layout<'_>`
  --> compiler/rustc_mir_transform/src/large_enums.rs:48:45
   |
   |
48 |         let min = variants.iter().map(|v| v.size).min().unwrap();
   |
help: use parentheses to call the method
   |
   |
48 |         let min = variants.iter().map(|v| v.size()).min().unwrap();

error[E0615]: attempted to take value of method `size` on type `&rustc_target::abi::Layout<'_>`
  --> compiler/rustc_mir_transform/src/large_enums.rs:49:45
   |
   |
49 |         let max = variants.iter().map(|v| v.size).max().unwrap();
   |
help: use parentheses to call the method
   |
   |
49 |         let max = variants.iter().map(|v| v.size()).max().unwrap();

error[E0308]: mismatched types
  --> compiler/rustc_mir_transform/src/large_enums.rs:61:49
   |
   |
61 |         if let Some(alloc_id) = alloc_cache.get(ty) {
   |                                                 |
   |                                                 |
   |                                                 expected `&rustc_middle::ty::Ty<'_>`, found struct `rustc_middle::ty::Ty`
   |                                                 help: consider borrowing here: `&ty`
error[E0615]: attempted to take value of method `size` on type `&rustc_target::abi::Layout<'_>`
  --> compiler/rustc_mir_transform/src/large_enums.rs:84:29
   |
   |
84 |             let sz = layout.size;
   |
help: use parentheses to call the method
   |
   |
84 |             let sz = layout.size();

error[E0615]: attempted to take value of method `repr` on type `&AdtDef<'_>`
   --> compiler/rustc_mir_transform/src/large_enums.rs:151:58
    |
    |
151 | ...                   .push(LocalDecl::new(adt_def.repr.discr_type().to_ty(tcx), span)),
    |
help: use parentheses to call the method
    |
    |
151 |                             .push(LocalDecl::new(adt_def.repr().discr_type().to_ty(tcx), span)),

error: unused import: `rustc_middle::ty::util::IntTypeExt`
 --> compiler/rustc_mir_transform/src/large_enums.rs:5:5
  |
  |
5 | use rustc_middle::ty::util::IntTypeExt;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `-D unused-imports` implied by `-D warnings`
Some errors have detailed explanations: E0308, E0615.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `rustc_mir_transform` due to 7 previous errors
warning: build failed, waiting for other jobs to finish...

rust-log-analyzer avatar Mar 25 '22 19:03 rust-log-analyzer

That looks like a legitimate failure to me,

@rustbot author @bors r-

scottmcm avatar Mar 25 '22 19:03 scottmcm

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/compiler/rustc_mir_transform/src/large_enums.rs at line 1:
+use crate::rustc_middle::ty::util::IntTypeExt;
 use crate::MirPass;
 use rustc_data_structures::stable_map::FxHashMap;
 use rustc_middle::mir::interpret::AllocId;
Diff in /checkout/compiler/rustc_mir_transform/src/large_enums.rs at line 4:
 use rustc_middle::mir::*;
-use crate::rustc_middle::ty::util::IntTypeExt;
 use rustc_middle::ty::{self, AdtDef, Const, ParamEnv, Ty, TyCtxt};
 use rustc_target::abi::{HasDataLayout, Size, TagEncoding, Variants};
 
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_mir_transform/src/const_prop.rs" "/checkout/compiler/rustc_mir_transform/src/large_enums.rs" "/checkout/compiler/rustc_mir_transform/src/marker.rs" "/checkout/compiler/rustc_mir_transform/src/inline.rs" "/checkout/compiler/rustc_mir_transform/src/remove_zsts.rs" "/checkout/compiler/rustc_mir_transform/src/normalize_array_len.rs" "/checkout/compiler/rustc_mir_transform/src/simplify.rs" "/checkout/compiler/rustc_mir_transform/src/const_debuginfo.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.

rust-log-analyzer avatar Mar 25 '22 21:03 rust-log-analyzer

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   |
14 | #![feature(in_band_lifetimes)]
   |            ^^^^^^^^^^^^^^^^^ feature has been removed
   |
   = note: removed due to unsolved ergonomic questions and added lifetime resolution complexity
For more information about this error, try `rustc --explain E0557`.
error: could not compile `rustc_const_eval` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

rust-log-analyzer avatar Mar 25 '22 23:03 rust-log-analyzer

@scottmcm I believe the issues were fixed!

JulianKnodt avatar Mar 26 '22 16:03 JulianKnodt

@bors r=wesleywiser

scottmcm avatar Mar 26 '22 17:03 scottmcm

:pushpin: Commit f11a286f2539f5b3cf8beaef886f26c8b4fa6017 has been approved by wesleywiser

bors avatar Mar 26 '22 17:03 bors

:hourglass: Testing commit f11a286f2539f5b3cf8beaef886f26c8b4fa6017 with merge 47f0ebe2cbe0ffbd86cc178ecbf3a5469b6f7aa1...

bors avatar Mar 26 '22 17:03 bors

:broken_heart: Test failed - checks-actions

bors avatar Mar 26 '22 17:03 bors

The job dist-aarch64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

rust-log-analyzer avatar Mar 26 '22 17:03 rust-log-analyzer

The bors queue is suspiciously empty, so I suspect there's an infra problem here, not something wrong in the PR.

scottmcm avatar Mar 26 '22 17:03 scottmcm

I think the bors queue being empty is just a coincidence. If there is a network error, you can usually check https://www.githubstatus.com/history and https://status.crates.io/ to see if there are any known issues. In this case, I don't think it looks like an ongoing problem.

@bors retry

ehuss avatar Mar 26 '22 18:03 ehuss

:hourglass: Testing commit f11a286f2539f5b3cf8beaef886f26c8b4fa6017 with merge fc3909ad1cea5b11d36d8d701281733f838b426f...

bors avatar Mar 26 '22 18:03 bors

:broken_heart: Test failed - checks-actions

bors avatar Mar 26 '22 18:03 bors