Skip to content

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Oct 12, 2025

The Unsupported case is special and doesn't have an entry in the
vector, and is directly emitted as the 0 case. This should be
harmless as it is, but could break if the right number of new
libcalls is added.

The Unsupported case is special and doesn't have an entry in the
vector, and is directly emitted as the 0 case. This should be
harmless as it is, but could break if the right number of new
libcalls is added.
@arsenm arsenm marked this pull request as ready for review October 12, 2025 17:54
Copy link
Contributor Author

arsenm commented Oct 12, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Oct 12, 2025

@llvm/pr-subscribers-tablegen

Author: Matt Arsenault (arsenm)

Changes

The Unsupported case is special and doesn't have an entry in the
vector, and is directly emitted as the 0 case. This should be
harmless as it is, but could break if the right number of new
libcalls is added.


Full diff: https://github.com/llvm/llvm-project/pull/163083.diff

1 Files Affected:

  • (modified) llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp (+1-1)
diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
index fd8ddb1056ac3..3938d3910f62a 100644
--- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
@@ -592,7 +592,7 @@ void RuntimeLibcallEmitter::emitSystemRuntimeLibrarySetCalls(
     DenseMap<PredicateWithCC, LibcallsWithCC> Pred2Funcs;
 
     SmallVector<uint64_t, 32> BitsetValues(
-        divideCeil(RuntimeLibcallImplDefList.size(), BitsPerStorageElt));
+        divideCeil(RuntimeLibcallImplDefList.size() + 1, BitsPerStorageElt));
 
     for (const Record *Elt : *Elements) {
       const RuntimeLibcallImpl *LibCallImpl = getRuntimeLibcallImpl(Elt);

@arsenm arsenm merged commit aaf5493 into main Oct 13, 2025
14 checks passed
@arsenm arsenm deleted the users/arsenm/tablegen/account-unsupported-libcall-impl-size branch October 13, 2025 02:32
DharuniRAcharya pushed a commit to DharuniRAcharya/llvm-project that referenced this pull request Oct 13, 2025
)

The Unsupported case is special and doesn't have an entry in the
vector, and is directly emitted as the 0 case. This should be
harmless as it is, but could break if the right number of new
libcalls is added.
akadutta pushed a commit to akadutta/llvm-project that referenced this pull request Oct 14, 2025
)

The Unsupported case is special and doesn't have an entry in the
vector, and is directly emitted as the 0 case. This should be
harmless as it is, but could break if the right number of new
libcalls is added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants