Skip to content

[MLIR][LLVM] Incorrect #llvm.constant_range parse #122996

@Kuree

Description

@Kuree

See godbolt: https://godbolt.org/z/x34YarsrE

range(i32 0, -2147483648) is imported as #llvm.constant_range<i32, 0, -2147483648>, but -2147483648 is internally stored as a 40-bit integer, causing the verifier to fail:

if (lower.getBitWidth() != upper.getBitWidth())
return emitError()
<< "expected lower and upper to have matching bitwidths but got "
<< lower.getBitWidth() << " vs. " << upper.getBitWidth();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions