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

LLVM assert with SIMD and Emscripten #45351

Closed
alexcrichton opened this issue Oct 18, 2017 · 2 comments
Closed

LLVM assert with SIMD and Emscripten #45351

alexcrichton opened this issue Oct 18, 2017 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

Fails with:

            %21 = trunc <4 x i32> %_93.12.vec.insert.i to <4 x i8>
          LLVM ERROR: invalid vector instr

full error:

failures:

---- [run-pass] run-pass/simd-intrinsic-generic-cast.rs stdout ----
	
error: compilation failed!
status: exit code: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/simd-intrinsic-generic-cast.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--target=asmjs-unknown-emscripten" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-generic-cast.stage2-asmjs-unknown-emscripten.js" "-Crpath" "-O" "-Lnative=/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-generic-cast.stage2-asmjs-unknown-emscripten.run-pass.libaux"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error: linking with `emcc` failed: exit code: 1
  |
  = 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/run-pass/simd-intrinsic-generic-cast.simd_intrinsic_generic_cast0.rust-cgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-generic-cast.stage2-asmjs-unknown-emscripten.js" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"___rdl_grow_in_place\",\"___rdl_shrink_in_place\",\"___rdl_alloc_excess\",\"___rdl_alloc\",\"___rdl_oom\",\"___rdl_usable_size\",\"___rdl_dealloc\",\"___rdl_realloc_excess\",\"___rdl_realloc\",\"___rdl_alloc_zeroed\",\"_rust_eh_personality\"]" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-generic-cast.crate.allocator.rust-cgu.o" "-O2" "--memory-init-file" "0" "-g0" "-s" "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "-L" "/checkout/obj/build/asmjs-unknown-emscripten/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-generic-cast.stage2-asmjs-unknown-emscripten.run-pass.libaux" "-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/libtest-7174f69942758dfc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libterm-b41696b9a2882d36.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libgetopts-e55773ea6141a812.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd-5e8ebc384e5dfd82.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libpanic_unwind-368647e9b9ca3b39.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libunwind-eda6aedbad712bc0.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc_system-67992b04c9027e70.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liblibc-bdd38e4620ffab1c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc-c15d9e20191e711b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libstd_unicode-b3230a4723442795.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/librand-efc56d5e4c2b1ee8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcore-3181dd9e46400ebd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/asmjs-unknown-emscripten/lib/libcompiler_builtins-fa8533728d55e42b.rlib" "-l" "c" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
  = note: INFO:root:generating system asset: is_vanilla.txt... (this will be cached in "/home/user/.emscripten_cache/is_vanilla.txt" for subsequent builds)
          INFO:root: - ok
          INFO:root:(Emscripten: Running sanity checks)
          WARNING:root:java does not seem to exist, required for closure compiler, which is optional (define JAVA in /emsdk-portable/.emscripten if you want it)
          WARNING:root:closure compiler will not be available
          INFO:root:generating system library: libc.bc... (this will be cached in "/home/user/.emscripten_cache/asmjs/libc.bc" for subsequent builds)
          INFO:root: - ok
          INFO:root:generating system library: dlmalloc.bc... (this will be cached in "/home/user/.emscripten_cache/asmjs/dlmalloc.bc" for subsequent builds)
          INFO:root: - ok
            %21 = trunc <4 x i32> %_93.12.vec.insert.i to <4 x i8>
          LLVM ERROR: invalid vector instr
          Traceback (most recent call last):
            File "/emsdk-portable/emscripten/1.37.13//emcc", line 13, in <module>
              emcc.run()
            File "/emsdk-portable/emscripten/1.37.13/emcc.py", line 1526, in run
              final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
            File "/emsdk-portable/emscripten/1.37.13/tools/shared.py", line 1963, in emscripten
              call_emscripten(cmdline)
            File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2190, in _main
              temp_files.run_and_clean(lambda: main(
            File "/emsdk-portable/emscripten/1.37.13/tools/tempfiles.py", line 78, in run_and_clean
              return func()
            File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2195, in <lambda>
              DEBUG=DEBUG,
            File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 2095, in main
              temp_files=temp_files, DEBUG=DEBUG)
            File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 93, in emscript
              backend_output = compile_js(infile, settings, temp_files, DEBUG)
            File "/emsdk-portable/emscripten/1.37.13/emscripten.py", line 127, in compile_js
              backend_output = open(temp_js).read()
          IOError: [Errno 2] No such file or directory: '/tmp/tmpVE4wuP.4.js'
          

error: aborting due to previous error


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

thread '[run-pass] run-pass/simd-intrinsic-generic-cast.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2478:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    [run-pass] run-pass/simd-intrinsic-generic-cast.rs

test result: FAILED. 0 passed; 1 failed; 2792 ignored; 0 measured; 0 filtered out
@alexcrichton alexcrichton added A-SIMD Area: SIMD (Single Instruction Multiple Data) O-asmjs Target: asm.js - http://asmjs.org/ labels Oct 18, 2017
@XAMPPRocky XAMPPRocky added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 12, 2018
@sanxiyn sanxiyn added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 1, 2019
@tlively
Copy link
Contributor

tlively commented Jan 10, 2020

@alexcrichton This is no longer an issue. I am working on a PR that re-enables all the tests that were ignored due to this bug, but since the fix is already in, I don't think we need to wait to close this issue.

@alexcrichton
Copy link
Member Author

Nice!

@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
folkertdev added a commit to folkertdev/rust that referenced this issue Feb 24, 2025
these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 24, 2025
…, r=<try>

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

try-job: test-various
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 25, 2025
…, r=<try>

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
fmease added a commit to fmease/rust that referenced this issue Feb 26, 2025
…ts, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
fmease added a commit to fmease/rust that referenced this issue Feb 26, 2025
…ts, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 26, 2025
Rollup merge of rust-lang#137559 - folkertdev:run-more-emscripten-tests, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants