[llvm] [SDAG] Don't allow implicit trunc in getConstant() (PR #117558)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 05:51:03 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 3699931dee058c02f52818529b4e6b53613a2dc2 45be4ce0286b70208918631b84040560443a9974 --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index f67f30b8c1..fa6a0bdbd1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1638,8 +1638,8 @@ SDValue SelectionDAG::getBoolConstant(bool V, const SDLoc &DL, EVT VT,
SDValue SelectionDAG::getConstant(uint64_t Val, const SDLoc &DL, EVT VT,
bool isT, bool isO) {
EVT EltVT = VT.getScalarType();
- return getConstant(APInt(EltVT.getSizeInBits(), Val, /*isSigned=*/false),
- DL, VT, isT, isO);
+ return getConstant(APInt(EltVT.getSizeInBits(), Val, /*isSigned=*/false), DL,
+ VT, isT, isO);
}
SDValue SelectionDAG::getConstant(const APInt &Val, const SDLoc &DL, EVT VT,
``````````
</details>
https://github.com/llvm/llvm-project/pull/117558
More information about the llvm-commits
mailing list