Treat makeatom() as a load from vars (bug 555568 r=tharwood+, rreitmai+)
Treat makeatom() as a load from vars (bug 555568 r=tharwood+, rreitmai+)

In the unlikely event we need to call makeatom() to construct an atom from a
representation that is not known at compile time, we call makeatom(core,
&vars[INDEX*8], tag[INDEX]), where INDEX is a compile time constant.

The deadvars optimization pass must treat such calls as a load from
vars[INDEX], or else previous stores to that index will be incorrectly removed.

This was already done for the common case when INDEX > 0:  the LIR code would
be makeatom(#const, addp(vars, INDEX*8), ldb(tags, INDEX).

But, for INDEX=0, we optimize addp(vars, 0) => vars, and miss the implicit
load.  worse, LIR on 32bit machines did this optimization, but LIR on 64bit
machines did not (due to a missing optimization for 64-bit cpu's).

The patch correctly handles both cases:  makeatom(core, vars, ld(tag, 0)) and
makeatom(core, addp(vars,INDEX*8)), ldb(tag, INDEX))

pfgenyun/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pfgenyun/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pfgenyun/tamarin-redux,pnkfelix/tamarin-redux,pnkfelix/tamarin-redux