[PATCH] D116796: [RISCV] Delete duplicate judgments in InsertVSETVLI
Chenbing.Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 00:40:18 PST 2022
Chenbing.Zheng created this revision.
Chenbing.Zheng added reviewers: craig.topper, benshi001, frasercrmck.
Chenbing.Zheng added a project: LLVM.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Chenbing.Zheng requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Delete duplicate judgments and move a scene into hasCompatibleVTYPE.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116796
Files:
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Index: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -219,6 +219,10 @@
if (Strict)
return false;
+ // Store instructions don't use the policy fields.
+ if (InstrInfo.StoreOp && VLMul == InstrInfo.VLMul && SEW == InstrInfo.SEW)
+ return true;
+
// If this is a mask reg operation, it only cares about VLMAX.
// FIXME: Mask reg operations are probably ok if "this" VLMAX is larger
// than "InstrInfo".
@@ -271,15 +275,6 @@
if (hasCompatibleVTYPE(InstrInfo, Strict))
return true;
- // Strict matches must ensure a full VTYPE match.
- if (Strict)
- return false;
-
- // Store instructions don't use the policy fields.
- // TODO: Move into hasCompatibleVTYPE?
- if (InstrInfo.StoreOp && VLMul == InstrInfo.VLMul && SEW == InstrInfo.SEW)
- return true;
-
// Anything else is not compatible.
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116796.398061.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220107/3df51e0b/attachment-0001.bin>
More information about the llvm-commits
mailing list