News for hackers. Stuff that matters.
Re:Gollvm from Google by loeg on Saturday May 27, 2017 @12:54PM (#14430828)
> Why does it store a 0

Go language semantics define that variables receive a zero initialization.[0]

> and then a 1 in "$ret0"?

The 1 is because the code explicitly stores a 1 :-).

Clearly the output code has not been through an optimization pass.

[0]: https://gobyexample.com/variables

Re:Gollvm from Google by zeusk on Saturday May 27, 2017 @09:51PM (#14432774)
but if you look at the code, there isn't a "variable" to be initialized - the function is supposed to return a constant/literal one.