llvm / llvm/circt

[MooreToCore] OOB array slices of unpacked arrays lowered like packed arrays

Open
#8,215 4 comments 1 reaction 0 assignees View on GitHub
Moore
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

If I understand IEEE 1800-2017 §7.4.6 Indexing and slicing of arrays right, an unpacked array slice should be 0/X in its entirety even if only a part of the slice is OOB. Currently, only the OOB part is 0/X because they are lowered just like packed arrays.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the MooreToCore lowering and trace how unpacked array slices are handled when an index is out of bounds. Compare the behavior with IEEE 1800-2017 §7.4.6 and verify that a slice containing any OOB portion produces 0/X in its entirety.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.