Skip to content

Calling the llvmint::cttz_iX is broken #34382

Closed
@gnzlbg

Description

@gnzlbg

I am trying to call the llvmint::cttz_i8(1i8, false) intrinsic from the llvmint crate and am getting the following error:

is_zero_undef argument of bit counting intrinsics must be a constant int
 %17 = call i8 @llvm.cttz.i8(i8 %14, i1 zeroext %16)

The problem seems to be that rustc is not propagating false to LLVM properly.

This was also reported to the llvmint crate: huonw/llvmint#5

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions