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

Update compiler-builtins and use it in the 128-bit lowering MIR test #46290

Merged
merged 4 commits into from
Dec 3, 2017

Conversation

scottmcm
Copy link
Member

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc #45676 @est31 @nagisa

@Mark-Simulacrum Mark-Simulacrum added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 27, 2017
@@ -13,36 +13,6 @@
#![feature(i128_type)]
#![feature(lang_items)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature attribute can be removed now.

@@ -13,35 +13,6 @@
#![feature(i128_type)]
#![feature(lang_items)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@nagisa
Copy link
Member

nagisa commented Nov 27, 2017

r? @nagisa

@bors
Copy link
Contributor

bors commented Nov 28, 2017

☔ The latest upstream changes (presumably #46142) made this pull request unmergeable. Please resolve the merge conflicts.

@nagisa
Copy link
Member

nagisa commented Nov 28, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Nov 28, 2017

📌 Commit c80fee2 has been approved by nagisa

@bors
Copy link
Contributor

bors commented Nov 29, 2017

⌛ Testing commit c80fee2 with merge 47e2cd3b8b0132edd39291a88110a2789157e6e2...

@bors
Copy link
Contributor

bors commented Nov 29, 2017

💔 Test failed - status-travis

@scottmcm
Copy link
Member Author

I don't think I caused this?

[00:12:56] In file included from /Users/travis/build/rust-lang/rust/src/llvm/lib/Support/ThreadPool.cpp:14:
[00:12:56] In file included from /Users/travis/build/rust-lang/rust/src/llvm/include/llvm/Support/ThreadPool.h:30:
[00:12:56] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1447:23: error: 'future_error' is unavailable: introduced in macOS 10.8
[00:12:56]                       future_error(make_error_code(future_errc::broken_promise))
[00:12:56]                       ^
[00:12:56] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:502:63: note: 'future_error' has been explicitly marked unavailable here
[00:12:56] class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
[00:12:56]                                                               ^
[00:12:56] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1621:23: error: 'future_error' is unavailable: introduced in macOS 10.8
[00:12:56]                       future_error(make_error_code(future_errc::broken_promise))
[00:12:56]                       ^
[00:12:56] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:502:63: note: 'future_error' has been explicitly marked unavailable here
[00:12:56] class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
[00:12:56]                                                               ^
[00:12:56] 2 errors generated.

@nagisa
Copy link
Member

nagisa commented Nov 29, 2017 via email

@bors
Copy link
Contributor

bors commented Nov 29, 2017

⌛ Testing commit c80fee2 with merge fe78375574f2c9372a0140222773ec6a65067654...

@scottmcm
Copy link
Member Author

I should have looked at the queue; it seems to be a systemic thing as all the last 8 PRs failed on xcode 7.3: https://travis-ci.org/rust-lang/rust/builds

@bors
Copy link
Contributor

bors commented Nov 29, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Nov 29, 2017

@bors retry — travis-ci/travis-ci#8821

@kennytm kennytm 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 Nov 29, 2017
arielb1 pushed a commit to arielb1/rust that referenced this pull request Nov 30, 2017
…s, r=nagisa

Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc rust-lang#45676 @est31 @nagisa
arielb1 pushed a commit to arielb1/rust that referenced this pull request Nov 30, 2017
…s, r=nagisa

Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc rust-lang#45676 @est31 @nagisa
arielb1 pushed a commit to arielb1/rust that referenced this pull request Nov 30, 2017
…s, r=nagisa

Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc rust-lang#45676 @est31 @nagisa
arielb1 pushed a commit to arielb1/rust that referenced this pull request Nov 30, 2017
…s, r=nagisa

Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc rust-lang#45676 @est31 @nagisa
@kennytm
Copy link
Member

kennytm commented Dec 1, 2017

Tests from this PR caused the latest rollup to fail in asm.js due to

LLVM ERROR: Instruction not yet supported for integer types larger than 64 bits

[02:22:18] failures:
[02:22:18] 
[02:22:18] ---- [mir-opt] mir-opt/lower_128bit_debug_test.rs stdout ----
[02:22:18] 	
[02:22:18] error: compilation failed!
[02:22:18] status: exit code: 101
[02:22:18] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/lower_128bit_debug_test.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--target=asmjs-unknown-emscripten" "-Zdump-mir=all" "-Zmir-opt-level=3" "-Zdump-mir-exclude-pass-number" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.stage2-asmjs-unknown-emscripten.js" "-Crpath" "-O" "-Lnative=/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-Z" "lower_128bit_ops" "-C" "debug_assertions=yes" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.stage2-asmjs-unknown-emscripten.aux"
[02:22:18] stdout:
[02:22:18] ------------------------------------------
[02:22:18] 
[02:22:18] ------------------------------------------
[02:22:18] stderr:
[02:22:18] ------------------------------------------
[02:22:18] error: linking with `emcc` failed: exit code: 1
[02:22:18]   |
[02:22:18]   = note: "emcc" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.lower_128bit_debug_test0.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.stage2-asmjs-unknown-emscripten.js" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_rust_eh_personality\"]" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.crate.allocator.rcgu.o" "-O2" "--memory-init-file" "0" "-g0" "-s" "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "-L" "/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_debug_test.stage2-asmjs-unknown-emscripten.aux" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd-a45336ea09f9320b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libpanic_unwind-d795c34fd7eb72c9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libunwind-0f4b95d88e53e455.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc_system-6d9370e956155877.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liblibc-f874e85b0fc1f5b8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc-c7758873e5bedec1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd_unicode-c9b8ae6d904bd621.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcore-c80c8268f013635d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcompiler_builtins-6389cf691b0a8db6.rlib" "-l" "c" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
[02:22:18]   = note: Unsupported:   call void @_ZN17compiler_builtins3int6addsub14rust_i128_addo17h7c71827c75f5a0e2E({ i128, i1 }* nocapture nonnull %9, i128 -222, i128 1)
[02:22:18]           LLVM ERROR: Instruction not yet supported for integer types larger than 64 bits
[02:22:18]           Traceback (most recent call last):
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13//emcc", line 13, in <module>
[02:22:18]               emcc.run()
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emcc.py", line 1526, in run
[02:22:18]               final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/tools/shared.py", line 1963, in emscripten
[02:22:18]               call_emscripten(cmdline)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2190, in _main
[02:22:18]               temp_files.run_and_clean(lambda: main(
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/tools/tempfiles.py", line 78, in run_and_clean
[02:22:18]               return func()
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2195, in <lambda>
[02:22:18]               DEBUG=DEBUG,
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2095, in main
[02:22:18]               temp_files=temp_files, DEBUG=DEBUG)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 93, in emscript
[02:22:18]               backend_output = compile_js(infile, settings, temp_files, DEBUG)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 127, in compile_js
[02:22:18]               backend_output = open(temp_js).read()
[02:22:18]           IOError: [Errno 2] No such file or directory: '/tmp/tmpV98C6G.4.js'
[02:22:18]           
[02:22:18] 
[02:22:18] error: aborting due to previous error
[02:22:18] 
[02:22:18] 
[02:22:18] ------------------------------------------
[02:22:18] 
[02:22:18] thread '[mir-opt] mir-opt/lower_128bit_debug_test.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2570:8
[02:22:18] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[02:22:18] 
[02:22:18] ---- [mir-opt] mir-opt/lower_128bit_test.rs stdout ----
[02:22:18] 	
[02:22:18] error: compilation failed!
[02:22:18] status: exit code: 101
[02:22:18] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/lower_128bit_test.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--target=asmjs-unknown-emscripten" "-Zdump-mir=all" "-Zmir-opt-level=3" "-Zdump-mir-exclude-pass-number" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.stage2-asmjs-unknown-emscripten.js" "-Crpath" "-O" "-Lnative=/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-Z" "lower_128bit_ops" "-C" "debug_assertions=no" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.stage2-asmjs-unknown-emscripten.aux"
[02:22:18] stdout:
[02:22:18] ------------------------------------------
[02:22:18] 
[02:22:18] ------------------------------------------
[02:22:18] stderr:
[02:22:18] ------------------------------------------
[02:22:18] error: linking with `emcc` failed: exit code: 1
[02:22:18]   |
[02:22:18]   = note: "emcc" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.lower_128bit_test0.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.stage2-asmjs-unknown-emscripten.js" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_rust_eh_personality\"]" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.crate.allocator.rcgu.o" "-O2" "--memory-init-file" "0" "-g0" "-s" "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "-L" "/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/lower_128bit_test.stage2-asmjs-unknown-emscripten.aux" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd-a45336ea09f9320b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libpanic_unwind-d795c34fd7eb72c9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libunwind-0f4b95d88e53e455.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc_system-6d9370e956155877.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liblibc-f874e85b0fc1f5b8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc-c7758873e5bedec1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd_unicode-c9b8ae6d904bd621.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcore-c80c8268f013635d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcompiler_builtins-6389cf691b0a8db6.rlib" "-l" "c" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
[02:22:18]   = note: Unsupported:   %1 = tail call i128 @_ZN17compiler_builtins3int6addsub13rust_i128_add17h64fc217d5594a832E(i128 -222, i128 1)
[02:22:18]           LLVM ERROR: Instruction not yet supported for integer types larger than 64 bits
[02:22:18]           Traceback (most recent call last):
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13//emcc", line 13, in <module>
[02:22:18]               emcc.run()
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emcc.py", line 1526, in run
[02:22:18]               final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/tools/shared.py", line 1963, in emscripten
[02:22:18]               call_emscripten(cmdline)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2190, in _main
[02:22:18]               temp_files.run_and_clean(lambda: main(
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/tools/tempfiles.py", line 78, in run_and_clean
[02:22:18]               return func()
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2195, in <lambda>
[02:22:18]               DEBUG=DEBUG,
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2095, in main
[02:22:18]               temp_files=temp_files, DEBUG=DEBUG)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 93, in emscript
[02:22:18]               backend_output = compile_js(infile, settings, temp_files, DEBUG)
[02:22:18]             File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 127, in compile_js
[02:22:18]               backend_output = open(temp_js).read()
[02:22:18]           IOError: [Errno 2] No such file or directory: '/tmp/tmpQYU40u.4.js'
[02:22:18]           
[02:22:18] 
[02:22:18] error: aborting due to previous error
[02:22:18] 
[02:22:18] 
[02:22:18] ------------------------------------------
[02:22:18] 
[02:22:18] thread '[mir-opt] mir-opt/lower_128bit_test.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2570:8
[02:22:18] 
[02:22:18] 
[02:22:18] failures:
[02:22:18]     [mir-opt] mir-opt/lower_128bit_debug_test.rs
[02:22:18]     [mir-opt] mir-opt/lower_128bit_test.rs

@bors r-

@nagisa
Copy link
Member

nagisa commented Dec 1, 2017

[02:22:18]   = note: Unsupported:   %1 = tail call i128 @_ZN17compiler_builtins3int6addsub13rust_i128_add17h64fc217d5594a832E(i128 -222, i128 1)

T_T

@scottmcm one of the ideas on how to deal with targets as broken as this was to:

  1. use sret for return type;
  2. pass arguments by reference.

I think the ideal place to do that is in the same place where ABI is handled. Do you agree @eddyb?

@shepmaster shepmaster added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 1, 2017
@nagisa
Copy link
Member

nagisa commented Dec 2, 2017

For now, ignore the tests for emscripten targets altogether. The issue seems to be not present in the LLVM 5.0 WASM target.

@scottmcm
Copy link
Member Author

scottmcm commented Dec 3, 2017

Updated; let me know if // ignore-asmjs is the wrong magic comment; I'm not sure how to test it locally.

@nagisa
Copy link
Member

nagisa commented Dec 3, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Dec 3, 2017

📌 Commit c0654ce has been approved by nagisa

@bors
Copy link
Contributor

bors commented Dec 3, 2017

⌛ Testing commit c0654ce with merge 0bae745...

bors added a commit that referenced this pull request Dec 3, 2017
Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from rust-lang/compiler-builtins#210

cc #45676 @est31 @nagisa
@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 3, 2017
@bors
Copy link
Contributor

bors commented Dec 3, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nagisa
Pushing 0bae745 to master...

@bors bors merged commit c0654ce into rust-lang:master Dec 3, 2017
@scottmcm scottmcm deleted the i128-from-compiler-builtins branch December 3, 2017 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants