Skip to content

Cranelift: umulhi.i8/smulhi.i8 is not implemented on x86_64 #5468

@afonso360

Description

@afonso360

👋 Hey

.clif Test Case

test interpret
test run
target x86_64
target aarch64

function %umulhi_i8(i8) -> i8 {
block0(v0: i8):
    v1 = umulhi.i8 v0, v0
    return v1
}
; run: %umulhi_i8(129) == 65


function %smulhi_i8(i8) -> i8 {
block0(v0: i8):
    v1 = smulhi.i8 v0, v0
    return v1
}
; run: %smulhi_i8(129) == 63

Steps to Reproduce

  • clif-util test ./the-above.clif

Expected Results

The above test to pass

Actual Results

thread 'worker #0' panicked at 'should be implemented in ISLE: inst = `v1 = umulhi.i8 v0, v0`, type = `Some(types::I8)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: should be implemented in ISLE: inst = `v1 = umulhi.i8 v0, v0`, type = `Some(types::I8)`
FAIL ./lmao.clif: panicked in worker #0: should be implemented in ISLE: inst = `v1 = umulhi.i8 v0, v0`, type = `Some(types::I8)`
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: X86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generatorcranelift:area:x64Issues related to x64 codegen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions