[clang] 5704630 - [RISCV] Remove redundant _ta suffix in RVV intrinsics builtins. NFC
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 9 08:40:41 PDT 2023
Author: eopXD
Date: 2023-07-09T08:40:36-07:00
New Revision: 5704630ec40dbf1ebc7b16181b226e1545f8eb5c
URL: https://github.com/llvm/llvm-project/commit/5704630ec40dbf1ebc7b16181b226e1545f8eb5c
DIFF: https://github.com/llvm/llvm-project/commit/5704630ec40dbf1ebc7b16181b226e1545f8eb5c.diff
LOG: [RISCV] Remove redundant _ta suffix in RVV intrinsics builtins. NFC
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D154693
Added:
Modified:
clang/lib/Sema/SemaChecking.cpp
clang/lib/Support/RISCVVIntrinsicUtils.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 294d9bfac73a5c..3284cf1b4f91be 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -4697,24 +4697,24 @@ bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI,
case RISCV::BI__builtin_riscv_aes64ks1i_64:
return SemaBuiltinConstantArgRange(TheCall, 1, 0, 10);
// Check if value range for vxrm is in [0, 3]
- case RISCVVector::BI__builtin_rvv_vaaddu_vv_ta:
- case RISCVVector::BI__builtin_rvv_vaaddu_vx_ta:
- case RISCVVector::BI__builtin_rvv_vaadd_vv_ta:
- case RISCVVector::BI__builtin_rvv_vaadd_vx_ta:
- case RISCVVector::BI__builtin_rvv_vasubu_vv_ta:
- case RISCVVector::BI__builtin_rvv_vasubu_vx_ta:
- case RISCVVector::BI__builtin_rvv_vasub_vv_ta:
- case RISCVVector::BI__builtin_rvv_vasub_vx_ta:
- case RISCVVector::BI__builtin_rvv_vsmul_vv_ta:
- case RISCVVector::BI__builtin_rvv_vsmul_vx_ta:
- case RISCVVector::BI__builtin_rvv_vssra_vv_ta:
- case RISCVVector::BI__builtin_rvv_vssra_vx_ta:
- case RISCVVector::BI__builtin_rvv_vssrl_vv_ta:
- case RISCVVector::BI__builtin_rvv_vssrl_vx_ta:
- case RISCVVector::BI__builtin_rvv_vnclip_wv_ta:
- case RISCVVector::BI__builtin_rvv_vnclip_wx_ta:
- case RISCVVector::BI__builtin_rvv_vnclipu_wv_ta:
- case RISCVVector::BI__builtin_rvv_vnclipu_wx_ta:
+ case RISCVVector::BI__builtin_rvv_vaaddu_vv:
+ case RISCVVector::BI__builtin_rvv_vaaddu_vx:
+ case RISCVVector::BI__builtin_rvv_vaadd_vv:
+ case RISCVVector::BI__builtin_rvv_vaadd_vx:
+ case RISCVVector::BI__builtin_rvv_vasubu_vv:
+ case RISCVVector::BI__builtin_rvv_vasubu_vx:
+ case RISCVVector::BI__builtin_rvv_vasub_vv:
+ case RISCVVector::BI__builtin_rvv_vasub_vx:
+ case RISCVVector::BI__builtin_rvv_vsmul_vv:
+ case RISCVVector::BI__builtin_rvv_vsmul_vx:
+ case RISCVVector::BI__builtin_rvv_vssra_vv:
+ case RISCVVector::BI__builtin_rvv_vssra_vx:
+ case RISCVVector::BI__builtin_rvv_vssrl_vv:
+ case RISCVVector::BI__builtin_rvv_vssrl_vx:
+ case RISCVVector::BI__builtin_rvv_vnclip_wv:
+ case RISCVVector::BI__builtin_rvv_vnclip_wx:
+ case RISCVVector::BI__builtin_rvv_vnclipu_wv:
+ case RISCVVector::BI__builtin_rvv_vnclipu_wx:
return SemaBuiltinConstantArgRange(TheCall, 2, 0, 3);
case RISCVVector::BI__builtin_rvv_vaaddu_vv_tu:
case RISCVVector::BI__builtin_rvv_vaaddu_vx_tu:
diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index b7406f7b672a62..cba4ab7c675886 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -1080,10 +1080,9 @@ void RVVIntrinsic::updateNamesAndPolicy(bool IsMasked, bool HasPolicy,
} else {
if (PolicyAttrs.isTUPolicy())
appendPolicySuffix("_tu");
- else if (PolicyAttrs.isTAPolicy()) {
- if (HasPolicy)
- BuiltinName += "_ta";
- } else
+ else if (PolicyAttrs.isTAPolicy()) // no suffix needed
+ return;
+ else
llvm_unreachable("Unhandled policy condition");
}
}
More information about the cfe-commits
mailing list