Skip to content

Optimize away useless conversions #4119

Closed
@petar-dambovaliev

Description

@petar-dambovaliev

The Go compiler optimizes away useless conversions.
This can be easily viewed in godbolt by looking at the machine code.
There isn't any code to convert a: int to b: int

package main

func main() {
    
}

func foo(a int) {
    b := int(a)
    println(b)
}

Gnovm however performs this conversion.

Metadata

Metadata

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions