Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform constant propagation into terminators #60745

Merged
merged 4 commits into from
May 20, 2019

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented May 11, 2019

Perform constant propagation into MIR Assert and SwitchInt Terminators which in some cases allows them to be removed by the branch simplification pass.

r? @oli-obk

@wesleywiser
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented May 11, 2019

⌛ Trying commit 269ef5a with merge 7f66c41...

bors added a commit that referenced this pull request May 11, 2019
[WIP] Const prop into terminators

Rebased on top of #60597. New commits start at eea75dc.

Last commit is just for testing purposes and I'll remove it before we merge this.

r? @ghost
@wesleywiser

This comment has been minimized.

@rust-timer

This comment has been minimized.

@wesleywiser
Copy link
Member Author

@rust-timer build 7f66c41

@rust-timer
Copy link
Collaborator

Success: Queued 7f66c41 with parent 5f1924c, comparison URL.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:061e5910:start=1557596056481301272,finish=1557596142380239694,duration=85898938422
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:20:32] 
[01:20:32] running 47 tests
[01:20:52] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:512:22
[01:20:52] .....................................F.........
[01:20:52] 
[01:20:52] ---- [mir-opt] mir-opt/simplify_if.rs stdout ----
[01:20:52] ---- [mir-opt] mir-opt/simplify_if.rs stdout ----
[01:20:52] thread '[mir-opt] mir-opt/simplify_if.rs' panicked at 'Did not find expected line, error: ran out of mir dump to match against
[01:20:52] Expected Line: "    switchInt(const false) -> [false: bb3, otherwise: bb1];"
[01:20:52] Test Name: rustc.main.SimplifyBranches-after-copy-prop.before.mir
[01:20:52] ... (elided)
[01:20:52] bb0: {
[01:20:52] ... (elided)
[01:20:52] ... (elided)
[01:20:52]     switchInt(const false) -> [false: bb3, otherwise: bb1];
[01:20:52] }
[01:20:52] Actual:
[01:20:52] | User Type Annotations
[01:20:52] | 0: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: TypeOf(DefId(2:6690 ~ core[6ea2]::fmt[0]::{{impl}}[2]::new_v1[0]), UserSubsts { substs: [ReLateBound(DebruijnIndex(0), BrAnon(0))], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(2:6688 ~ core[6ea2]::fmt[0]::{{impl}}[2]), self_ty: std::fmt::Arguments<'_> }) }) } at <::std::macros::println macros>:2:29: 2:63
[01:20:52] |
[01:20:52] fn  main() -> () {
[01:20:52]     let mut _0: ();
[01:20:52]     let mut _1: bool;
[01:20:52]     let mut _2: ();
[01:20:52]     let mut _3: ();
[01:20:52]     let mut _4: std::fmt::Arguments;
[01:20:52]     let mut _5: &[&str];
[01:20:52]     let mut _6: &[&str; 1];
[01:20:52]     let mut _7: &[&str; 1];
[01:20:52]     let _8: [&str; 1];
[01:20:52]     let mut _9: &str;
[01:20:52]     let mut _10: &str;
[01:20:52]     let mut _11: &[std::fmt::ArgumentV1];
[01:20:52]     let mut _12: &[std::fmt::ArgumentV1; 0];
[01:20:52]     let mut _13: &[std::fmt::ArgumentV1; 0];
[01:20:52]     let _14: [std::fmt::ArgumentV1; 0];
[01:20:52]     let mut _15: ();
[01:20:52]     scope 1 {
[01:20:52]         let mut _16: &[&str];
[01:20:52]         let mut _17: std::option::Option<&[std::fmt::rt::v1::Argument]>;
[01:20:52]         let mut _18: &[std::fmt::ArgumentV1];
[01:20:52]     bb0: {
[01:20:52]     bb0: {
[01:20:52]         StorageLive(_1);
[01:20:52]         _1 = const false;
[01:20:52]         goto -> bb3;
[01:20:52]     bb1: {
[01:20:52]     bb1: {
[01:20:52]         StorageLive(_4);
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         _7 = &(promoted[1]: [&str; 1]);
[01:20:52]         nop;
[01:20:52]         _5 = move _7 as &[&str] (Pointer(Unsize));
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         StorageLive(_15);
[01:20:52]         nop;
[01:20:52]         _13 = &(promoted[0]: [std::fmt::ArgumentV1; 0]);
[01:20:52]         nop;
[01:20:52]         _11 = move _13 as &[std::fmt::ArgumentV1] (Pointer(Unsize));
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         StorageLive(_17);
[01:20:52]         discriminant(_17) = 0;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         (_4.0: &[&str]) = move _5;
[01:20:52]         (_4.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _17;
[01:20:52]         (_4.2: &[std::fmt::ArgumentV1]) = move _11;
[01:20:52]         nop;
[01:20:52]         StorageDead(_17);
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         _3 = const std::io::_print(move _4) -> bb2;
[01:20:52]     bb2: {
[01:20:52]     bb2: {
[01:20:52]         StorageDead(_4);
[01:20:52]         nop;
[01:20:52]         StorageDead(_15);
[01:20:52]         nop;
[01:20:52]         nop;
[01:20:52]         goto -> bb4;
[01:20:52]     }
[01:20:52]     }
[01:20:52]     bb3: {
[01:20:52]         nop;
[01:20:52]         goto -> bb4;
[01:20:52]     }
[01:20:52]     bb4: {
[01:20:52]         StorageDead(_1);
[01:20:52]         return;
[01:20:52] }', src/tools/compiletest/src/runtest.rs:3093:13
[01:20:52] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:20:52] 
[01:20:52] 
[01:20:52] 
[01:20:52] failures:
[01:20:52]     [mir-opt] mir-opt/simplify_if.rs
[01:20:52] 
[01:20:52] test result: FAILED. 46 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:20:52] 
[01:20:52] 
[01:20:52] 
[01:20:52] 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" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:20:52] 
[01:20:52] 
[01:20:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:20:52] Build completed unsuccessfully in 0:11:54
[01:20:52] Build completed unsuccessfully in 0:11:54
[01:20:52] Makefile:48: recipe for target 'check' failed
[01:20:52] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:112fc1c9
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat May 11 18:56:44 UTC 2019
---
travis_time:end:19c1e5c0:start=1557601005737255262,finish=1557601005741924663,duration=4669401
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0bd7e44c
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:04b4a4c4
travis_time:start:04b4a4c4
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:016a19b8
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented May 11, 2019

☀️ Try build successful - checks-travis
Build commit: 7f66c41

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 7f66c41

@wesleywiser wesleywiser changed the title [WIP] Const prop into terminators Perform constant propagation into terminators May 17, 2019
@wesleywiser
Copy link
Member Author

r? @oli-obk

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:099bb986:start=1558093176546806059,finish=1558093264702666206,duration=88155860147
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:20:57] 
[01:20:57] running 48 tests
[01:21:18] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:512:22
[01:21:18] ......................................F.........
[01:21:18] 
[01:21:18] ---- [mir-opt] mir-opt/simplify_if.rs stdout ----
[01:21:18] ---- [mir-opt] mir-opt/simplify_if.rs stdout ----
[01:21:18] thread '[mir-opt] mir-opt/simplify_if.rs' panicked at 'Did not find expected line, error: ran out of mir dump to match against
[01:21:18] Expected Line: "    switchInt(const false) -> [false: bb3, otherwise: bb1];"
[01:21:18] Test Name: rustc.main.SimplifyBranches-after-copy-prop.before.mir
[01:21:18] ... (elided)
[01:21:18] bb0: {
[01:21:18] ... (elided)
[01:21:18] ... (elided)
[01:21:18]     switchInt(const false) -> [false: bb3, otherwise: bb1];
[01:21:18] }
[01:21:18] Actual:
[01:21:18] | User Type Annotations
[01:21:18] | 0: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: TypeOf(DefId(2:6704 ~ core[6ea2]::fmt[0]::{{impl}}[2]::new_v1[0]), UserSubsts { substs: [ReLateBound(DebruijnIndex(0), BrAnon(0))], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(2:6702 ~ core[6ea2]::fmt[0]::{{impl}}[2]), self_ty: std::fmt::Arguments<'_> }) }) } at <::std::macros::println macros>:2:29: 2:63
[01:21:18] |
[01:21:18] fn  main() -> () {
[01:21:18]     let mut _0: ();
[01:21:18]     let mut _1: bool;
[01:21:18]     let mut _2: ();
[01:21:18]     let mut _3: ();
[01:21:18]     let mut _4: std::fmt::Arguments;
[01:21:18]     let mut _5: &[&str];
[01:21:18]     let mut _6: &[&str; 1];
[01:21:18]     let mut _7: &[&str; 1];
[01:21:18]     let _8: [&str; 1];
[01:21:18]     let mut _9: &str;
[01:21:18]     let mut _10: &str;
[01:21:18]     let mut _11: &[std::fmt::ArgumentV1];
[01:21:18]     let mut _12: &[std::fmt::ArgumentV1; 0];
[01:21:18]     let mut _13: &[std::fmt::ArgumentV1; 0];
[01:21:18]     let _14: [std::fmt::ArgumentV1; 0];
[01:21:18]     let mut _15: ();
[01:21:18]     scope 1 {
[01:21:18]         let mut _16: &[&str];
[01:21:18]         let mut _17: std::option::Option<&[std::fmt::rt::v1::Argument]>;
[01:21:18]         let mut _18: &[std::fmt::ArgumentV1];
[01:21:18]     bb0: {
[01:21:18]     bb0: {
[01:21:18]         StorageLive(_1);
[01:21:18]         _1 = const false;
[01:21:18]         goto -> bb3;
[01:21:18]     bb1: {
[01:21:18]     bb1: {
[01:21:18]         StorageLive(_4);
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         _7 = &(promoted[1]: [&str; 1]);
[01:21:18]         nop;
[01:21:18]         _5 = move _7 as &[&str] (Pointer(Unsize));
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         StorageLive(_15);
[01:21:18]         nop;
[01:21:18]         _13 = &(promoted[0]: [std::fmt::ArgumentV1; 0]);
[01:21:18]         nop;
[01:21:18]         _11 = move _13 as &[std::fmt::ArgumentV1] (Pointer(Unsize));
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         StorageLive(_17);
[01:21:18]         discriminant(_17) = 0;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         (_4.0: &[&str]) = move _5;
[01:21:18]         (_4.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _17;
[01:21:18]         (_4.2: &[std::fmt::ArgumentV1]) = move _11;
[01:21:18]         nop;
[01:21:18]         StorageDead(_17);
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         _3 = const std::io::_print(move _4) -> bb2;
[01:21:18]     bb2: {
[01:21:18]     bb2: {
[01:21:18]         StorageDead(_4);
[01:21:18]         nop;
[01:21:18]         StorageDead(_15);
[01:21:18]         nop;
[01:21:18]         nop;
[01:21:18]         goto -> bb4;
[01:21:18]     }
[01:21:18]     }
[01:21:18]     bb3: {
[01:21:18]         nop;
[01:21:18]         goto -> bb4;
[01:21:18]     }
[01:21:18]     bb4: {
[01:21:18]         StorageDead(_1);
[01:21:18]         return;
[01:21:18] }', src/tools/compiletest/src/runtest.rs:3102:13
[01:21:18] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:21:18] 
[01:21:18] 
[01:21:18] 
[01:21:18] failures:
[01:21:18]     [mir-opt] mir-opt/simplify_if.rs
[01:21:18] 
[01:21:18] test result: FAILED. 47 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:21:18] 
[01:21:18] 
[01:21:18] 
[01:21:18] 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" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:21:18] 
[01:21:18] 
[01:21:18] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:21:18] Build completed unsuccessfully in 0:12:32
[01:21:18] Build completed unsuccessfully in 0:12:32
[01:21:18] make: *** [check] Error 1
[01:21:18] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:134d5ff0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri May 17 13:02:32 UTC 2019
---
travis_time:end:0148bb80:start=1558098154284330538,finish=1558098154289739543,duration=5409005
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2b3f9412
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1e87a61a
travis_time:start:1e87a61a
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:182c3d90
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@wesleywiser
Copy link
Member Author

Resolved

@oli-obk
Copy link
Contributor

oli-obk commented May 18, 2019

@bors r+

@bors
Copy link
Contributor

bors commented May 18, 2019

📌 Commit 23ad8c526be3b50f35eeffdaf0990e3888d99945 has been approved by oli-obk

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 18, 2019
@bors
Copy link
Contributor

bors commented May 19, 2019

⌛ Testing commit 23ad8c526be3b50f35eeffdaf0990e3888d99945 with merge 5337f4ab83efefcb5bcbd8e3012bc854e14933b2...

@bors
Copy link
Contributor

bors commented May 19, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job test-various of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:12:58] ---- [mir-opt] mir-opt/const_prop/switch_int.rs stdout ----
[01:12:58] 
[01:12:58] error: test run failed!
[01:12:58] status: exit code: 101
[01:12:58] command: "/node-v9.2.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/const_prop/switch_int/a.wasm"
[01:12:58] ------------------------------------------
[01:12:58] 
[01:12:58] ------------------------------------------
[01:12:58] stderr:
[01:12:58] stderr:
[01:12:58] ------------------------------------------
[01:12:58] RuntimeError: unreachable
[01:12:58]     at _ZN3std7process4exit17h51f592b24e75ba54E (wasm-function[45]:7)
[01:12:58]     at _ZN10switch_int4main17h111c63dfc6bd55dfE (wasm-function[4]:3)
[01:12:58]     at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h7c60c3b15001320bE (wasm-function[1]:25)
[01:12:58]     at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h0e4d065d7831dc3cE (wasm-function[49]:8)
[01:12:58]     at _ZN3std9panicking3try7do_call17h0ec38f4cd0f182c0E (wasm-function[57]:20)
[01:12:58]     at __rust_maybe_catch_panic (wasm-function[68]:5)
[01:12:58]     at _ZN3std2rt19lang_start_internal17h2b50dd71369ffc77E (wasm-function[66]:270)
[01:12:58]     at main (wasm-function[5]:46)
[01:12:58]     at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:126:20)
[01:12:58]     at Module._compile (module.js:641:30)
[01:12:58]     at Object.Module._extensions..js (module.js:652:10)
[01:12:58]     at Module.load (module.js:560:32)
[01:12:58]     at tryModuleLoad (module.js:503:12)
[01:12:58]     at Function.Module._load (module.js:495:3)
[01:12:58]     at Function.Module.runMain (module.js:682:10)
[01:12:58]     at startup (bootstrap_node.js:191:16)
[01:12:58]     at bootstrap_node.js:613:3
[01:12:58] ------------------------------------------
[01:12:58] 
[01:12:58] 
[01:12:58] 
[01:12:58] 
[01:12:58] failures:
[01:12:58]     [mir-opt] mir-opt/const_prop/switch_int.rs
[01:12:58] 
[01:12:58] test result: FAILED. 41 passed; 1 failed; 6 ignored; 0 measured; 0 filtered out
[01:12:58] 
[01:12:58] 
[01:12:58] 
[01:12:58] 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" "--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-v9.2.0-linux-x64/bin/node" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "8.0.0-rust-1.36.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:12:58] 
[01:12:58] 
[01:12:58] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:512:22
[01:12:58] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
---
travis_time:end:075eec48:start=1558245877163809992,finish=1558245877172679354,duration=8869362
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0f8bfef4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:20f6d0fc
travis_time:start:20f6d0fc
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:196062d5
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 19, 2019
@oli-obk
Copy link
Contributor

oli-obk commented May 19, 2019

@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2019

📌 Commit ec853ba has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 19, 2019
Centril added a commit to Centril/rust that referenced this pull request May 19, 2019
…tors, r=oli-obk

Perform constant propagation into terminators

Perform constant propagation into MIR `Assert` and `SwitchInt` `Terminator`s which in some cases allows them to be removed by the branch simplification pass.

r? @oli-obk
bors added a commit that referenced this pull request May 20, 2019
Rollup of 6 pull requests

Successful merges:

 - #60590 (Test interaction of unions with non-zero/niche-filling optimization)
 - #60745 (Perform constant propagation into terminators)
 - #60895 (Enable thumbv7a-pc-windows-msvc target build end to end in rust/master)
 - #60908 (Fix lints handling in rustdoc)
 - #60960 (Stop using gensyms in HIR lowering)
 - #60962 (Fix data types indication)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented May 20, 2019

⌛ Testing commit ec853ba with merge 128b4c8...

@bors bors merged commit ec853ba into rust-lang:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants