[MooreToCore] Handle empty array slices and creation#10697
Closed
AmurG wants to merge 1 commit into
Closed
Conversation
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.
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. |
This was referenced Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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