[llvm] 2d95ad0 - [RISCV][GISel] Use boolean predicated legalization action method to simplify code. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 09:26:00 PST 2024
Author: Craig Topper
Date: 2024-11-13T09:21:53-08:00
New Revision: 2d95ad05311e91037e60ce4d0e724c13e6f009ec
URL: https://github.com/llvm/llvm-project/commit/2d95ad05311e91037e60ce4d0e724c13e6f009ec
DIFF: https://github.com/llvm/llvm-project/commit/2d95ad05311e91037e60ce4d0e724c13e6f009ec.diff
LOG: [RISCV][GISel] Use boolean predicated legalization action method to simplify code. NFC
Added:
Modified:
llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
index 0002476a6fccf1..82b6dcdcd34bc7 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
@@ -153,14 +153,11 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
.clampScalar(1, sXLen, sXLen)
.clampScalar(0, sXLen, sXLen);
- auto &ExtActions =
- getActionDefinitionsBuilder({G_ZEXT, G_SEXT, G_ANYEXT})
- .legalIf(all(typeIsLegalIntOrFPVec(0, IntOrFPVecTys, ST),
- typeIsLegalIntOrFPVec(1, IntOrFPVecTys, ST)));
- if (ST.is64Bit()) {
- ExtActions.legalFor({{sXLen, s32}});
- }
- ExtActions.customIf(typeIsLegalBoolVec(1, BoolVecTys, ST))
+ getActionDefinitionsBuilder({G_ZEXT, G_SEXT, G_ANYEXT})
+ .legalIf(all(typeIsLegalIntOrFPVec(0, IntOrFPVecTys, ST),
+ typeIsLegalIntOrFPVec(1, IntOrFPVecTys, ST)))
+ .legalFor(ST.is64Bit(), {{sXLen, s32}})
+ .customIf(typeIsLegalBoolVec(1, BoolVecTys, ST))
.maxScalar(0, sXLen);
getActionDefinitionsBuilder(G_SEXT_INREG)
More information about the llvm-commits
mailing list