Skip to content

[x86-64] Allow branching on shl/shr setting zero flag #168867

@Validark

Description

@Validark

Zig Godbolt

export fn shl_test(x: u64, _: u8, _: u8, y: u8) bool {
    return 0 == x << @truncate(y);
}
shl_test:
        shl     rdi, cl
-       test    rdi, rdi
        sete    al
        ret

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions