Skip to content

Cranelift: i128 bit shifts not working on x86_64 #4699

@afonso360

Description

@afonso360

👋 Hey,

This issue is mostly to track the filetests/filetests/runtests/i128-shifts-small-types.clif file. We have these cases disabled on x86_64 since they are broken.

.clif Test Case

function %ishl_i16_i128(i16, i128) -> i16 {
block0(v0: i16, v1: i128):
    v2 = ishl.i16 v0, v1
    return v2
}
; run: %ishl_i16_i128(0x0004, 16) == 0x0004

Steps to Reproduce

clif-util test ./the-above.clif

Expected Results

The test to pass

Actual Results

 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL .\filetests\filetests\runtests\i128-shifts-small-types.clif: run

Caused by:
    Failed test: run: %ishl_i16_i128(4, 16) == 4, actual: 0
1 tests

Versions and Environment

Cranelift version or commit: main
Operating system: Windows
Architecture: x86_64

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