gemini-code-assist[bot] commented on code in PR #19735:
URL: https://github.com/apache/tvm/pull/19735#discussion_r3398724976
##########
src/s_tir/transform/inject_permuted_layout.cc:
##########
@@ -254,12 +265,12 @@ class PermutedLayoutInjector : private
IRMutatorWithAnalyzer {
return call;
}
- if (!call->op.same_as(builtin::ptx_ldmatrix()) &&
!call->op.same_as(builtin::mma_store())) {
- return call;
- }
-
- if (call->op.same_as(builtin::ptx_ldmatrix())) {
- // form: T.ptx_ldmatrix(..., smem_ptr, smem_offset)
+ // Only the legacy intrinsic forms fold the shared memory access into a
+ // tvm_access_ptr + offset, which must be rewritten here. The non-legacy
+ // forms address shared memory through BufferLoad (e.g. via address_of),
+ // which is already handled by the BufferLoad visitor above.
+ if (IsOp(call, builtin::ptx_ldmatrix_legacy(),
"tirx.ptx.ldmatrix_legacy")) {
Review Comment:

Use the pre-retrieved static `Op` for `ptx_ldmatrix_legacy` to avoid string
comparison.
```suggestion
if (IsOp(call, builtin::ptx_ldmatrix_legacy(), ptx_ldmatrix_legacy_op)) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]