[PATCH] D141577: [WIP][4/N][Clang][RISCV][NFC] Remove unnecessary logic under RVVIntrinsic::computeBuiltinTypes

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 12 00:53:32 PST 2023


eopXD created this revision.
Herald added subscribers: sunshaoce, 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, arichardson.
Herald added a project: All.
eopXD requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, MaskRay.
Herald added a project: clang.

The logic that relies upon PolicyAttrs::IsUnspecified, which happens
both under RVV::Intrinsic::computeBuiltInTypes and
RVVIntrinsic::updateNamesAndPolicy may give the misperception that these
two functions are coupled together, but in fact they don't.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141577

Files:
  clang/lib/Support/RISCVVIntrinsicUtils.cpp


Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp
===================================================================
--- clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -918,12 +918,6 @@
   // Update PolicyAttrs if need (TA or TAMA) for compute builtin types.
   if (PolicyAttrs.isMAPolicy())
     PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TAMA
-  if (PolicyAttrs.isUnspecified()) {
-    if (!IsMasked) {
-      PolicyAttrs.IsUnspecified = false;
-      PolicyAttrs.TailPolicy = Policy::PolicyType::Agnostic; // TA
-    }
-  }
   bool HasPassthruOp = DefaultScheme == PolicyScheme::HasPassthruOperand;
   if (IsMasked) {
     // If HasMaskedOffOperand, insert result type as first input operand if


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141577.488515.patch
Type: text/x-patch
Size: 760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230112/cf52b8be/attachment.bin>


More information about the cfe-commits mailing list