[4/15][Clang][RISCV][NFC] Remove unnecessary logic under RVVIntrinsic::computeBuiltin...
authoreopXD <yueh.ting.chen@gmail.com>
Sat, 7 Jan 2023 09:04:26 +0000 (01:04 -0800)
committereopXD <yueh.ting.chen@gmail.com>
Tue, 24 Jan 2023 08:09:14 +0000 (00:09 -0800)
`PolicyAttrs::IsUnspecified` is modified in
`RVV::Intrinsic::computeBuiltInTypes` and used under
`RVVIntrinsic::updateNamesAndPolicy`. Suprisingly the modification
in `RVV::Intrinsic::computeBuiltInTypes` is completely unnecessary.
This commit removes the redundant logic.

This is the 4th commit of a patch-set that aims to change the default policy
for RVV intrinsics from TAMU to TAMA.

Please refer to the cover letter in the 1st commit (D141573) for an
overview.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D141577

clang/lib/Support/RISCVVIntrinsicUtils.cpp

index 18b8ca5..d67221e 100644 (file)
@@ -918,12 +918,6 @@ llvm::SmallVector<PrototypeDescriptor> RVVIntrinsic::computeBuiltinTypes(
   // 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