Skip to content

Conversation

@zluda-violet
Copy link
Collaborator

The inverse of #580, for st instead of ld.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables implicit conversion from vector types to bit scalar types for the st (store) instruction, mirroring the existing functionality for ld (load) instructions from PR #580. The change allows storing vector registers (e.g., v2.b32) to memory locations expecting scalar bit types (e.g., b64) when the total size matches.

Key changes:

  • Added Display implementation for StCacheOperator to enable proper formatting of store instructions
  • Extended relaxed type checking to allow vector-to-scalar bitcasts for store source operands
  • Added test coverage demonstrating the conversion behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ptx_parser/src/ast.rs Added Display implementation for StCacheOperator enum to format cache modifiers (.cg, .cs, .wt) and display block for St instruction
ptx/src/pass/insert_implicit_conversions.rs Extended should_convert_relaxed_src to allow vector-to-scalar bitcast conversions using valid_vector_scalar_bitcast
ptx/src/pass/test/insert_implicit_conversions/default_relaxed.ptx Added test function default_relaxed_st and expected output showing vector-to-scalar conversion for store operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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