[llvm] [DAG] FoldConstantArithmetic - allow binop folding to work with differing bitcasted constants (PR #94863)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 8 09:58:15 PDT 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 c8992fb7bf123345911c467a34dc3690aac0933d 09aad160ff594c8772829f23c5d3dfca2b4b2c6d -- 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 855cbd4604..523d3aea66 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -6560,7 +6560,7 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL,
SDValue N2 = peekThroughBitcasts(Ops[1]);
auto *BV1 = dyn_cast<BuildVectorSDNode>(N1);
auto *BV2 = dyn_cast<BuildVectorSDNode>(N2);
- if (BV1 && BV2 && N1.getValueType().isInteger() &&
+ if (BV1 && BV2 && N1.getValueType().isInteger() &&
N2.getValueType().isInteger()) {
bool IsLE = getDataLayout().isLittleEndian();
unsigned EltBits = VT.getScalarSizeInBits();
``````````
</details>
https://github.com/llvm/llvm-project/pull/94863
More information about the llvm-commits
mailing list