[RISCV] xtheadmac: fix commutativity issue for the in/out register
The instructions in the XTHeadMac extension (multiply accumulate instructions) were marked as commutative but because the destination register was also an input (accumulate) register and was connected to the destination register with a register allocator constraint, all three operands (instead of two) were incorrectly considered commutative. To fix that an appropriate fixCommutedOpIndices call was added for these instructions in findCommutedOpIndices New test functions have been added to test the correct behaviour in xtheadmac.ll. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D144278
Loading
Please sign in to comment