[llvm] 52b6168 - [DAG] visitINSERT_VECTOR_ELT - remove duplicate VT.getVectorNumElements() call. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 16 08:21:06 PDT 2022
Author: Simon Pilgrim
Date: 2022-07-16T16:20:49+01:00
New Revision: 52b6168c167e3b22823a1ff09dd00859ef7c2768
URL: https://github.com/llvm/llvm-project/commit/52b6168c167e3b22823a1ff09dd00859ef7c2768
DIFF: https://github.com/llvm/llvm-project/commit/52b6168c167e3b22823a1ff09dd00859ef7c2768.diff
LOG: [DAG] visitINSERT_VECTOR_ELT - remove duplicate VT.getVectorNumElements() call. NFC.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 13b22bf1796c..3d09ea81c476 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -19476,7 +19476,7 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
return Shuf;
// Handle <1 x ???> vector insertion special cases.
- if (VT.getVectorNumElements() == 1) {
+ if (NumElts == 1) {
// insert_vector_elt(x, extract_vector_elt(y, 0), 0) -> y
if (InVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
InVal.getOperand(0).getValueType() == VT &&
More information about the llvm-commits
mailing list