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
5.7 KiB
5.7 KiB