[PATCH] D30827: [mips][msa] Disable commutativity for dpadd_[su].df instructions

Stefan Maksimovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 07:38:17 PST 2017


smaksimovic created this revision.

Removal of the isCommutable flag.
Prior to this change, there were cases where the vector that is to be added to the dot product of the other two could take a position other than the first one in the instruction, generating false output in the destination vector.

Such behavior has been noticed in the two functions generating v2i64 output values so far. Other ones may exhibit such behavior as well, just not for the vector operands which are present in the test at the moment.

Tests altered so that the function's first operand is a constant splat so that it can be loaded with a ldi instruction, since that is the case in which the erroneous instruction operand placement has occurred. We check that the register which is present in the ldi instruction is placed as the first operand in the corresponding dpadd instruction.


https://reviews.llvm.org/D30827

Files:
  lib/Target/Mips/MipsMSAInstrInfo.td
  test/CodeGen/Mips/msa/3r_4r_widen.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30827.91341.patch
Type: text/x-patch
Size: 11056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170310/b5ac1c12/attachment.bin>


More information about the llvm-commits mailing list