[llvm] [DAG] Extend extract_element(bitcast(scalar_to_vector(X))) -> trunc(srl(X,C)) (PR #117900)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 08:03:31 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 f67ba5855278401728413431216dda5d370ac2e0 c52267eeb7943494aff6890bbdaef6b2b6cfa60d --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index ec8d582445..6c8e996978 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -23071,7 +23071,8 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
"Scalar bitwidth must be a multiple of vector element bitwidth");
if (ExtractIndex != BCTruncElt) {
- unsigned ShiftIndex = IsLE ? ExtractIndex : (Scale - 1) - ExtractIndex;
+ unsigned ShiftIndex =
+ IsLE ? ExtractIndex : (Scale - 1) - ExtractIndex;
X = DAG.getNode(
ISD::SRL, DL, XVT, X,
DAG.getShiftAmountConstant(ShiftIndex * VecEltBitWidth, XVT, DL));
``````````
</details>
https://github.com/llvm/llvm-project/pull/117900
More information about the llvm-commits
mailing list