Skip to content

[MooreToCore] Handle empty array slices and creation#10697

Closed
AmurG wants to merge 1 commit into
llvm:mainfrom
AmurG:moore-empty-array-slices
Closed

[MooreToCore] Handle empty array slices and creation#10697
AmurG wants to merge 1 commit into
llvm:mainfrom
AmurG:moore-empty-array-slices

Conversation

@AmurG

@AmurG AmurG commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

AI generated content follows. Some of this work is gated on PRs that are yet to merge but are also filed by me before.

Handle empty array creation and array extract with negative/zero slice widths in MooreToCore (IEEE 1800-2017 § 11.8.1). Empty arrays bitcast from zero constants; slices with out-of-bounds or zero-size windows fold using createZeroArray helper with proper padding and prefix/middle/suffix composition. Standalone.

Tests: array-create-empty.mlir, array-extract-negative-slice.mlir, array-extract-zero-slice.mlir

Lower zero-element array creation and static array slices without constructing empty array_create/array_concat or mismatched bitcasts. Negative-low padding is clamped to the requested slice size.
@circt-bot

circt-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

Results of circt-tests run for 91f1871 compared to results for 2aaa416: no change to test results.

@AmurG

AmurG commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing this and the rest of my June tranche, with an explanation this time (the July 1 batch close had none — poor form, apologies). The tranche's volume outran what anyone could reasonably review, so I've reset to a small set of PRs, each human-reviewed before filing, each with a reproducer. The empty-slice handling returns with the aggregate-lowering work once the #10642 lifetime design settles. Thanks for the CI runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant