[PATCH] D144278: [RISCV] xtheadmac: fix commutativity issue for the in/out register
Philipp Tomsich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 10:08:09 PST 2023
philipp.tomsich created this revision.
philipp.tomsich added a reviewer: craig.topper.
Herald added subscribers: luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
philipp.tomsich requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144278
Files:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/test/CodeGen/RISCV/bitextract-mac.ll
llvm/test/CodeGen/RISCV/xtheadmac.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144278.498431.patch
Type: text/x-patch
Size: 8936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230217/cde865e8/attachment.bin>
More information about the llvm-commits
mailing list