Skip to content

[PTO][IR] CopyOp::getPipe uses srcSpace in isDstGlobal condition #105

@WenboCodes

Description

@WenboCodes

Problem

CopyOp::getPipe() appears to contain a typo in destination-global detection.

Evidence

lib/PTO/IR/PTO.cpp:6310

bool isDstGlobal = (dstSpace == AddressSpace::GM || srcSpace == AddressSpace::MAT);

The second disjunct likely should be dstSpace == AddressSpace::MAT.

Impact

PIPE routing may be incorrect for some copy routes (especially when destination is MAT but source is not MAT).

Expected behavior

Use destination space consistently:

bool isDstGlobal = (dstSpace == AddressSpace::GM || dstSpace == AddressSpace::MAT);

Acceptance criteria

  • Fix condition.
  • Add route test(s) for combinations involving dst=MAT and dst=GM.
  • Verify resulting getPipe() matches intended MTE2/MTE3 behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions