Skip to content

Commit 9242939

Browse files
committed
Yul: Implement CLZ exception in EVMDialect with hasCLZ function
also resolve a whitespace issue in one test
1 parent 4f5ea4a commit 9242939

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libyul/backends/evm/EVMDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ std::set<std::string, std::less<>> createReservedIdentifiers(langutil::EVMVersio
136136
// clz for VMs before osaka.
137137
auto clzException = [&](evmasm::Instruction _instr) -> bool
138138
{
139-
return _instr == evmasm::Instruction::CLZ && _evmVersion < langutil::EVMVersion::osaka();
139+
return _instr == evmasm::Instruction::CLZ && !_evmVersion.hasCLZ();
140140
};
141141

142142
auto eofIdentifiersException = [&](evmasm::Instruction _instr) -> bool

test/libyul/yulSyntaxTests/clz_pre_osaka.yul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111

1212
// ====
1313
// EVMVersion: <osaka
14-
// ----
14+
// ----

0 commit comments

Comments
 (0)