Skip to content

Commit

Permalink
[clang][RISCV] Fix the condition of checking signature in getIndex (#…
Browse files Browse the repository at this point in the history
…67403)

The current condition causes assert failing if try to add a new vendor
vector file which only contains the same type signature.
  • Loading branch information
jacquesguan committed Oct 11, 2023
1 parent 26d9f85 commit bccf2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/utils/TableGen/RISCVVEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ unsigned SemaSignatureTable::getIndex(ArrayRef<PrototypeDescriptor> Signature) {
return 0;

// Checking Signature already in table or not.
if (Signature.size() < SignatureTable.size()) {
if (Signature.size() <= SignatureTable.size()) {
size_t Bound = SignatureTable.size() - Signature.size() + 1;
for (size_t Index = 0; Index < Bound; ++Index) {
if (equal(Signature.begin(), Signature.end(),
Expand Down

0 comments on commit bccf2c8

Please sign in to comment.