From d63e492562f255684f0e2b2e4eb14baf17a485d7 Mon Sep 17 00:00:00 2001 From: eopXD Date: Sat, 14 Jan 2023 07:28:06 -0800 Subject: [PATCH] [10/15][Clang][RISCV][NFC] Don't need to check for `MaskPolicy` in `isTAPolicy` and `isTUPolicy` 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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h b/clang/include/clang/Support/RISCVVIntrinsicUtils.h index 57faab0..e1571d7 100644 --- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h +++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h @@ -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; } -- 2.7.4