Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[AMDGPU] Trim trailing undefs from the end of image and buffer store

Authored by matejam on Jun 8 2023, 6:02 AM.



Remove undef values from the end of the vector operand in image and
buffer store instructions.

Continuation of: 88421ea973916e Trim zero components from buffer and image stores.

Diff Detail

Event Timeline

matejam created this revision.Jun 8 2023, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 6:02 AM
matejam requested review of this revision.Jun 8 2023, 6:02 AM
arsenm added inline comments.Jun 8 2023, 7:24 AM

You can skip the whole computeKnownFPClass call in this case


Should use poison in place of undef

matejam updated this revision to Diff 529915.Jun 9 2023, 4:55 AM

Instead of call to computeKnownFPClass, use findScalarElement.

foad added inline comments.Jun 15 2023, 3:47 AM

I don't think there's any need for this. Almost everything is an Instruction or a Constant, and anything that is not will just break out of the loop on the first iteration anyway.


Should use isNullValue because we don't want to match -0.0.

matejam updated this revision to Diff 531720.Jun 15 2023, 6:01 AM

Remove unnecessary if, use isNullValue instead of isZeroValue.
Thanks @foad.

foad accepted this revision.Jun 15 2023, 6:10 AM
foad added inline comments.

Should really put braces around the "else" part if there are braces around the "if" part.

This revision is now accepted and ready to land.Jun 15 2023, 6:10 AM
This revision was landed with ongoing or failed builds.Jun 15 2023, 6:20 AM
This revision was automatically updated to reflect the committed changes.
matejam marked an inline comment as done.Jun 15 2023, 6:20 AM