[llvm] [RISCV] Add codegen support for ri.vinsert.v.x and ri.vextract.x.v (PR #136708)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 09:07:58 PDT 2025
================
@@ -538,6 +546,18 @@ DemandedFields getDemanded(const MachineInstr &MI, const RISCVSubtarget *ST) {
Res.MaskPolicy = false;
}
+ if (isVExtractInstr(MI)) {
+ assert(!RISCVII::hasVLOp(TSFlags));
+ // TODO: LMUL can be any larger value (without cost)
+ Res.TailPolicy = false;
+ Res.MaskPolicy = false;
+ }
+
+ if (isVInsertInstr(MI)) {
+ // TODO: LMUL can be any larger value (without cost)
+ Res.MaskPolicy = false;
----------------
topperc wrote:
Setting `MaskPolicy` to false should have already been done by the earlier check for `!RISCVII::usesMaskPolicy(TSFlags)`.
That's true for most of the existing places we write MaskPolicy to false. So I'm not sure if this is an intentional choice we've made to repeat it.
https://github.com/llvm/llvm-project/pull/136708
More information about the llvm-commits
mailing list