diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2025-09-17 16:52:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-17 15:52:09 +0000 |
commit | 57d67bec6d708b8266f09d06d7841739d4f53d5a (patch) | |
tree | 2911d177c979aa327cab0a12338a46a85974da9f /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 05c4681668d0acd15a5a06e91be94916acd1c799 (diff) | |
download | llvm-57d67bec6d708b8266f09d06d7841739d4f53d5a.zip llvm-57d67bec6d708b8266f09d06d7841739d4f53d5a.tar.gz llvm-57d67bec6d708b8266f09d06d7841739d4f53d5a.tar.bz2 |
[DAG] getNode() - reuse result type instead of calling getValueType again. NFC. (#159381)
We have assertions above confirming VT == N1.getValueType() for INSERT_VECTOR_ELT nodes.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 029eb02..5b2c09f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -8247,8 +8247,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, // INSERT_VECTOR_ELT into out-of-bounds element is an UNDEF, except // for scalable vectors where we will generate appropriate code to // deal with out-of-bounds cases correctly. - if (N3C && N1.getValueType().isFixedLengthVector() && - N3C->getZExtValue() >= N1.getValueType().getVectorNumElements()) + if (N3C && VT.isFixedLengthVector() && + N3C->getZExtValue() >= VT.getVectorNumElements()) return getUNDEF(VT); // Undefined index can be assumed out-of-bounds, so that's UNDEF too. |