Skip to content

Commit d069343

Browse files
committed
Revert "[RISCV] Fix reporting of incorrect commutable operand indices"
This reverts commit a793329. This commit caused some bot failures: clang-with-thin-lto-ubuntu-release lld-x86_64-win-release llvm-clang-x86_64-expensive-checks-debian-release
1 parent 1828e57 commit d069343

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ bool RISCVInstrInfo::findCommutedOpIndices(const MachineInstr &MI,
12231223
// Both of operands are not fixed. Set one of commutable
12241224
// operands to the tied source.
12251225
CommutableOpIdx1 = 1;
1226-
} else if (SrcOpIdx1 == CommuteAnyOperandIndex) {
1226+
} else if (SrcOpIdx1 == CommutableOpIdx1) {
12271227
// Only one of the operands is not fixed.
12281228
CommutableOpIdx1 = SrcOpIdx2;
12291229
}

llvm/test/CodeGen/RISCV/rvv/commuted-op-indices-regression.mir

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)