Skip to content

Cranelift: unimplemented >64 bits error during bxor_not and icmp optimization #10929

@akldc

Description

@akldc

.clif Test Case

test optimize
set opt_level=none
set preserve_frame_pointers=true
set enable_multi_ret_implicit_sret=true

function %main() -> i32x4 fast {
    ss0 = explicit_slot 32
    ss1 = explicit_slot 32
    const0 = 0x40ad3fb47cb16076c8cb1fdd8189d40f

block0():
    v1 = vconst.i32x4 const0
    v2 = bxor_not v1, v1
    v3 = icmp.i32x4 ne v1, v2
    return v3
}

; print: %main()

Result

When opt_level is set to none, it runs correctly.

[x86    ] %main() -> 0xffffffffffffffffffffffffffffffff
[aarch64] %main() -> 0xffffffffffffffffffffffffffffffff

Then set opt_level to speed.

[x86    ] thread 'main' panicked at cranelift/codegen/src/opts.rs:189:5:
unimplemented for > 64 bits
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
return code: 101

[aarch64] thread 'main' panicked at cranelift/codegen/src/opts.rs:189:5:
unimplemented for > 64 bits
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
return code: 101

The issue likely occurs during optimization of bxor and icmp instructions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions