Skip to content

audit:codegen: Range's bool field projects as i8 but MIR types it bool (i1) #1413

Closed

Description

@ehartford

Found while sweeping with analyze <file> audit:all for #1381 (same on origin/main dd786a4):

test/spec/spec_ss04_7_range_values.w  violation: place 5 in count_range: projection lowers to LLVM type i8 but its MIR type 13 (bool) lowers to i1; base _3: Range[i32] (ty 425) proj[0]=kind0:2 got-int-width=8 want-int-width=1
test/spec/spec_ss04_7_ranges.w        (same, place 7 in test_stored_range_iterates_directly)
test/behavior/behav_range_value.w     (same, place 37 in main)

Range's third field (the bool) is stored as i8 in the LLVM struct, while the MIR place _3.f2 is typed bool, which lowers to i1. One of the two is wrong for a stored bool; the audit needs them to agree (with the #1381 fix the message now names both LLVM types).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions