[PATCH] D108731: [TwoAddressInstructionPass] Improve the SrcRegMap and DstRegMap computation
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 17 23:32:24 PDT 2021
pengfei added inline comments.
================
Comment at: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:401
+ unsigned Src1 = TII->CommuteAnyOperandIndex;
+ unsigned Src2 = UseMI.findRegisterUseOperandIdx(Reg);
+ if (TII->findCommutedOpIndices(UseMI, Src1, Src2)) {
----------------
I'm confused about the code here. `findRegisterUseOperandIdx` return `-1` when the function fails. But `-1` is equal to `CommuteAnyOperandIndex`, which means we allow any operand to be commutable?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108731/new/
https://reviews.llvm.org/D108731
More information about the llvm-commits
mailing list