[PATCH] D141764: [WIP][9/N][Clang][RISCV][NFC] Use correct type for `RVVTypeCache::computeTypes` under RISCVVEmitter.cpp

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 14 07:21:22 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.

`MaskedPrototype` is used nowhere, by context and symmetry it should be
used by `RVVTypeCache::computeTypes`. The existing code is doing fine
because the default policy for unmasked intrinsics are set to TAMU.

This is something to be fixed because if the default policy is TAMA,
the code will be incorrect.

Depends on D141762 <https://reviews.llvm.org/D141762>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141764

Files:
  clang/utils/TableGen/RISCVVEmitter.cpp


Index: clang/utils/TableGen/RISCVVEmitter.cpp
===================================================================
--- clang/utils/TableGen/RISCVVEmitter.cpp
+++ clang/utils/TableGen/RISCVVEmitter.cpp
@@ -585,7 +585,7 @@
           continue;
         // Create a masked intrinsic
         std::optional<RVVTypes> MaskTypes =
-            TypeCache.computeTypes(BT, Log2LMUL, NF, Prototype);
+            TypeCache.computeTypes(BT, Log2LMUL, NF, MaskedPrototype);
         Out.push_back(std::make_unique<RVVIntrinsic>(
             Name, SuffixStr, OverloadedName, OverloadedSuffixStr, MaskedIRName,
             /*IsMasked=*/true, HasMaskedOffOperand, HasVL, MaskedPolicyScheme,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141764.489248.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230114/e9a5d5fe/attachment-0001.bin>


More information about the cfe-commits mailing list