[PATCH] D152754: [PowerPC] Correct missue of getOperandConstraint in PPCInstrInfo::commuteInstructionImpl

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 07:31:22 PDT 2023


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

Sorry I missed this. LGTM.



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1177
   if (Reg0 == Reg1) {
     // Must be two address instruction!
+    assert(MI.getDesc().getOperandConstraint(1, MCOI::TIED_TO) == 0 &&
----------------
Maybe clarify here with a comment such as:
```
// Must be two address instruction (i.e. op1 is tied to op0).
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152754/new/

https://reviews.llvm.org/D152754



More information about the llvm-commits mailing list