mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
fixed bug in llvm ir computing required memory size
This commit is contained in:
parent
4b4265c160
commit
7305fb32d3
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ llvm::Function* Memory::createRequireFunc(GasMeter& _gasMeter, RuntimeManager& _
|
|||
auto sizeRequired = m_builder.CreateExtractValue(uaddRes, 0, "sizeReq");
|
||||
auto overflow1 = m_builder.CreateExtractValue(uaddRes, 1, "overflow1");
|
||||
auto currSize = m_builder.CreateLoad(m_size, "currSize");
|
||||
auto tooSmall = m_builder.CreateICmpULE(size, sizeRequired, "tooSmall");
|
||||
auto tooSmall = m_builder.CreateICmpULE(currSize, sizeRequired, "tooSmall");
|
||||
auto resizeNeeded = m_builder.CreateOr(tooSmall, overflow1, "resizeNeeded");
|
||||
m_builder.CreateCondBr(resizeNeeded, resizeBB, returnBB); // OPT branch weights?
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue