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

Unimplemented in ISLE error with egraphs and simd #5437

Closed
alexcrichton opened this issue Dec 14, 2022 · 2 comments · Fixed by #5438
Closed

Unimplemented in ISLE error with egraphs and simd #5437

alexcrichton opened this issue Dec 14, 2022 · 2 comments · Fixed by #5438
Labels
fuzz-bug Bugs found by a fuzzer

Comments

@alexcrichton
Copy link
Member

This input:

(module
  (type (;0;) (func))
  (func (;0;) (type 0)
    (local v128)
    i32.const 0
    if ;; label = @1
      unreachable
    end
    local.get 0
    local.get 0
    i16x8.lt_u
    i32x4.bitmask
    i32.const 0
    br_if 0 (;@0;)
    call 2
    br_table 0 (;@0;) 0 (;@0;)
    call 1
  )
  (func (;1;) (type 0))
  (func (;2;) (type 0))
)

fails to compile with:

$ cargo run compile --cranelift-set use_egraphs=true ./testcase0.shrunken.wat
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/wasmtime compile --cranelift-set use_egraphs=true ./testcase0.shrunken.wat`
thread '<unnamed>' panicked at 'should be implemented in ISLE: inst = `v10 = iconst.i16x8 0`, type = `Some(types::I16X8)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

on x86_64

@alexcrichton alexcrichton added the fuzz-bug Bugs found by a fuzzer label Dec 14, 2022
@cfallin
Copy link
Member

cfallin commented Dec 14, 2022

Taking a look!

@jameysharp
Copy link
Contributor

iconst shouldn't be used with vector types, right? I'd guess this is the icmp x, x optimization rule firing on types where it isn't valid.

cfallin added a commit to cfallin/wasmtime that referenced this issue Dec 14, 2022
We could do these for vectors too, in theory, but for now let's fix the
bug by applying the equivalence only for integer types.

Fixes bytecodealliance#5437.
cfallin added a commit to cfallin/wasmtime that referenced this issue Dec 14, 2022
We could do these for vectors too, in theory, but for now let's fix the
bug by applying the equivalence only for integer types.

Fixes bytecodealliance#5437.
cfallin added a commit that referenced this issue Dec 14, 2022
…#5438)

We could do these for vectors too, in theory, but for now let's fix the
bug by applying the equivalence only for integer types.

Fixes #5437.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzz-bug Bugs found by a fuzzer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants