Skip to content

[P1] Address masking is inconsistent for NonZeroAddressType in arith.cmpi lowering path #23

@ngmachado

Description

@ngmachado

Problem

ConvertCmpOp masks both AddressType and NonZeroAddressType, but ConvertArithCmpIOp only masks AddressType.

Evidence

  • ConvertCmpOp handles both: src/mlir/ora/lowering/OraToSIR/patterns/Arithmetic.cpp:150
  • ConvertArithCmpIOp only checks address: src/mlir/ora/lowering/OraToSIR/patterns/Arithmetic.cpp:740

Impact

Potential high-bit garbage leakage into comparisons through one lowering path.

Acceptance Criteria

  • Both compare paths apply identical 160-bit masking rules for all address-like types.
  • Add targeted cmp regression for address and non_zero_address through both paths.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions