Using sha256
to compare strings is stressing out the register allocator.
#4356
Labels
compiler: codegen
Everything to do with IR->ASM, register allocation, etc.
P: high
Should be looked at if there are no critical issues left
In #4336 I had to massage both the
stdlib/vec
andtest_contracts/basic_storage
tests to isolate parts which were comparing strings. They were usingassert(sha256(str_a) == sha256(str_b))
. For some reason putting a few of these together would use up all the registers.I have a hunch it's because both
sha256
andassert
use ASM blocks which are optimisation blockers. But there might be a simple solution.The register allocator is to be rewritten next so this isn't necessarily high priority, but if there is a simple fix then it's worth taking a look.
The text was updated successfully, but these errors were encountered: