[PATCH] D137452: [RISCV] Support BSET/BCLR/BINV in isAllUsesReadW.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 4 11:28:06 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: mohammed-nurulhoque, reames, kito-cheng, frasercrmck, asb, luismarques.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
These instructions set, clear, or invert a single bit. If their
users don't use the upper 32 bits, they don't use the upper 32 bits
of their input.
Additionally the second operand BSET/BCLR/BINV is a shift amount
which only uses 6 bits of the source.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137452
Files:
llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
Index: llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
+++ llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
@@ -140,6 +140,9 @@
break;
case RISCV::SLL:
+ case RISCV::BSET:
+ case RISCV::BCLR:
+ case RISCV::BINV:
// Operand 2 is the shift amount which uses 6 bits.
if (OpIdx == 2)
break;
@@ -200,6 +203,9 @@
case RISCV::SH2ADD:
case RISCV::SH3ADD:
case RISCV::XNOR:
+ case RISCV::BSETI:
+ case RISCV::BCLRI:
+ case RISCV::BINVI:
Worklist.push_back(UserMI);
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137452.473300.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221104/3a777fc5/attachment.bin>
More information about the llvm-commits
mailing list