Skip to content

memmerge pass flushes too aggressively on certain barriers #4420

@charles-cooper

Description

@charles-cooper

Version Information

  • vyper Version (output of vyper --version): 9c98b3e

What's your issue about?

the following venom program is resistant to the memory merge pass. the sequence mstore(64, mload(416)); mstore(96, mload(448)) should get merged to mcopy(64, 416, 64), but because of sequencing of the barriers, the optimization does not get applied.

function global {
main:
    invoke @test, 352
    %49 = mload 352
    mstore 448, %49
    %51 = mload 416
    mstore 64, %51
    %54 = mload 448  ; barrier, flushes mload 416 from list of potential copies
    mstore 96, %54
    stop
}

function test {
main:
    stop
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions