[llvm] [GlobalISel][RISCV] Use constant pool for large integer constants. (PR #81101)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 21:47:24 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 351f94d981f363909ae6e76ed57cd0a75c3f5688 ae82b9bae0aea042c81573cbd10009ba214f6a60 -- llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
index 1b3a8f51dd..b899dcff6a 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
@@ -186,13 +186,9 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
}
auto &ConstantActions = getActionDefinitionsBuilder(G_CONSTANT);
- ConstantActions
- .legalFor({s32, p0})
- if (ST.is64Bit())
- ConstantActions.customFor({s64});
- ConstantActions
- .widenScalarToNextPow2(0)
- .clampScalar(0, s32, sXLen);
+ ConstantActions.legalFor({s32, p0}) if (ST.is64Bit())
+ ConstantActions.customFor({s64});
+ ConstantActions.widenScalarToNextPow2(0).clampScalar(0, s32, sXLen);
getActionDefinitionsBuilder(G_IMPLICIT_DEF)
.legalFor({s32, sXLen, p0})
``````````
</details>
https://github.com/llvm/llvm-project/pull/81101
More information about the llvm-commits
mailing list