[10/15][Clang][RISCV][NFC] Don't need to check for `MaskPolicy` in `isTAPolicy` and...
authoreopXD <yueh.ting.chen@gmail.com>
Sat, 14 Jan 2023 15:28:06 +0000 (07:28 -0800)
committereopXD <yueh.ting.chen@gmail.com>
Tue, 24 Jan 2023 15:12:34 +0000 (07:12 -0800)
Caller of the two utilities is always companied with a predicate to
check for `!IsMask`, so we don't need to check for the mask policy
here.

This also removes dependency to `Policy::PolicyType::Omit`, which will
be removed.

This is the 10th 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: kito-cheng

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

clang/include/clang/Support/RISCVVIntrinsicUtils.h

index 57faab0..e1571d7 100644 (file)
@@ -126,13 +126,9 @@ struct Policy {
     return TailPolicy == Undisturbed && MaskPolicy == Undisturbed;
   }
 
-  bool isTAPolicy() const {
-    return TailPolicy == Agnostic && MaskPolicy == Omit;
-  }
+  bool isTAPolicy() const { return TailPolicy == Agnostic; }
 
-  bool isTUPolicy() const {
-    return TailPolicy == Undisturbed && MaskPolicy == Omit;
-  }
+  bool isTUPolicy() const { return TailPolicy == Undisturbed; }
 
   bool isMAPolicy() const { return MaskPolicy == Agnostic; }